public function generateReport() { $myfirm = \ZippyERP\System\System::getOptions("firmdetail"); $myaccount = \ZippyERP\ERP\Entity\MoneyFund::load($this->headerdata['bankaccount']); $mybank = \ZippyERP\ERP\Entity\Bank::load($myaccount->bank); $customer = \ZippyERP\ERP\Entity\Customer::load($this->headerdata['customer']); $cbank = \ZippyERP\ERP\Entity\Bank::load($customer->bank); $header = array('date' => date('d.m.Y', $this->document_date), 'myname' => $myfirm['name'], 'mycode' => $myfirm['code'], 'mybankaccount' => $myaccount->bankaccount, 'mybank' => $mybank->bank_name, 'mybankcode' => $mybank->mfo, 'cname' => $customer->customer_name, 'ccode' => $customer->code, 'cbankaccount' => $customer->bankaccount, 'cbank' => $cbank->bank_name, 'cbankcode' => $cbank->mfo, "document_number" => $this->document_number, "document_date" => date('Y.m.d', $this->document_date), "notes" => $this->headerdata['notes'], "amount" => H::fm($this->amount), "amountstr" => \ZippyERP\ERP\Util::ucfirst(\ZippyERP\ERP\Util::money2str($this->amount / 100))); $report = new \ZippyERP\ERP\Report('transferorder.tpl'); $html = $report->generate($header, array()); return $html; }
public function generateReport() { $types = $this->getTypes(); $i = 1; $detail = array(); $total = 0; foreach ($this->detaildata as $value) { $detail[] = array("type" => $types[$value['optype']], "cust" => $value['customername'], "amount" => H::fm($value['amount']), "comment" => $value['comment']); } $header = array('date' => date('d.m.Y', $this->document_date), 'bankaccount' => \ZippyERP\ERP\Entity\MoneyFund::load($this->headerdata['bankaccount'])->title, "document_number" => $this->document_number); $report = new \ZippyERP\ERP\Report('bankstatement.tpl'); $html = $report->generate($header, $detail); return $html; }
public function addfbtnOnClick($sender) { $id = $this->docform->e_flist->getValue(); if (isset($this->_farr[$id])) { $this->setError('Дублирование строки'); return; } $f = MoneyFund::load($id); $f->val = 100 * $this->docform->e_famount->getText(); $f->op = $this->docform->e_foper->getValue(); $this->_farr[$id] = $f; $this->docform->ftable->Reload(); $this->docform->e_famount->setText(''); }