public function _on_creating() { if ($this->invoice && $this->position == 0) { $invoice = org_openpsa_invoices_invoice_dba::get_cached($this->invoice); $this->position = count($invoice->get_invoice_items()) + 1; } return true; }
public function _on_creating() { if ($this->invoice && $this->position == 0) { $invoice = org_openpsa_invoices_invoice_dba::get_cached($this->invoice); $this->position = count($invoice->get_invoice_items()) + 1; } return true; }