diff --git a/src/Invoice.php b/src/Invoice.php index c88ed33..2e33300 100644 --- a/src/Invoice.php +++ b/src/Invoice.php @@ -136,10 +136,6 @@ public function get(string $fieldName) */ public function setPrintPage(callable $fx): void { - if (!($this->getPage('popup') === 'print')) { - return; - } - $this->printPage->set($fx, [$this->invoiceId]); } @@ -153,9 +149,6 @@ public function getDir($dirName) */ public function setInvoicePage(callable $fx): void { - if (!($this->getPage() === 'invoice')) { - return; - } $this->invoicePage->set($fx, [$this->invoiceId]); } @@ -164,21 +157,9 @@ public function setInvoicePage(callable $fx): void */ public function setPaymentPage(callable $fx): void { - if (!$this->hasPayment || !($this->getPage() === 'payment')) { - return; - } - $this->paymentPage->set($fx, [$this->invoiceId]); } - /** - * Return current VirtualPage - */ - public function getPage(string $type = 'callback'): string - { - return array_search($type, $_GET) ? array_search($type, $_GET) : ''; - } - /** * Return an IIF js function that will set document.location via javascript. */