Пример #1
0
 public function __construct($organisationId, $invoiceId = null)
 {
     parent::__construct($organisationId);
     $this->invoices = OrganisationInvoice::getByOrganisationId($this->organisation->id);
     if ($invoiceId !== null) {
         $this->invoice = OrganisationInvoice::getById($invoiceId);
     }
     if ($this->isPostBack()) {
         if ($this->invoice && $this->invoice->hasRow()) {
             $this->update();
         } else {
             $this->save();
         }
     }
 }
Пример #2
0
 public function __construct()
 {
     parent::__construct();
     $this->prependSiteTitle(lang('Invoices'));
     $this->invoices = OrganisationInvoice::getByOrganisationId($this->activeOrganisation->id);
 }