function populate() { $trans = new SLTransactionCollection(new SLTransaction()); $pl = new PageList('aged_debtors_summary'); $this->contents = $trans->agedSummary(); }
public function allocate() { if (!$this->loadData()) { $this->dataError(); sendBack(); } $customer = $this->_uses[$this->modeltype]; $transaction = DataObjectFactory::Factory('SLTransaction'); $transactions = new SLTransactionCollection($transaction, 'sl_allocation_overview'); $sh = new SearchHandler($transactions, false); $db = DB::Instance(); $sh->addConstraint(new Constraint('status', 'in', '(' . $db->qstr($transaction->open()) . ',' . $db->qstr($transaction->partPaid()) . ')')); $sh->addConstraint(new Constraint('slmaster_id', '=', $customer->id)); $sh->setOrderby('transaction_date'); $transactions->load($sh); $this->view->set('allocated_total', 0); $this->view->set('transactions', $transactions); $this->view->set('no_ordering', true); }
public function getAgedDebtorSummary($_aged_months) { $trans = new SLTransactionCollection(); return $trans->agedDebtor($this->id, $_aged_months); }