public function index()
 {
     $errors = array();
     $s_data = array();
     // Set context from calling module
     if (isset($this->_data['cbaccount_id'])) {
         $s_data['cbaccount_id'] = $this->_data['cbaccount_id'];
     }
     if (isset($this->_data['company_id'])) {
         $s_data['company_id'] = $this->_data['company_id'];
     }
     if (isset($this->_data['source'])) {
         $s_data['source'] = $this->_data['source'];
     }
     if (isset($this->_data['status'])) {
         $s_data['status'] = $this->_data['status'];
     }
     if (isset($this->_data['frequency'])) {
         $s_data['frequency'] = $this->_data['frequency'];
     }
     $this->setSearch('PeriodicPaymentsSearch', 'useDefault', $s_data);
     $this->view->set('clickaction', 'edit');
     parent::index(new PeriodicPaymentCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['new'] = array('tag' => 'New Payment', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'));
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
示例#2
0
 public function index()
 {
     $errors = array();
     $s_data = array();
     // Preserve any search criteria selection so that the context is maintained
     if (isset($this->_data['Search'])) {
         $s_data = $this->_data['Search'];
     } elseif (!isset($this->_data['orderby']) && !isset($this->_data['page'])) {
         // Either this is the first entry to the page or the search has been cleared
         // and orderby or paging is not selected
         // so set context from calling module
         $currentPeriod = GLPeriod::getPeriod(date('Y-m-d'));
         if ($currentPeriod && count($currentPeriod) > 0) {
             $s_data['glperiods_id'] = array($currentPeriod['id']);
         }
         if (isset($this->_data['glaccount_id'])) {
             $s_data['glaccount_id'] = $this->_data['glaccount_id'];
         }
         if (isset($this->_data['glcentre_id'])) {
             $s_data['glcentre_id'] = $this->_data['glcentre_id'];
         }
     }
     $this->setSearch('glbalancesSearch', 'useDefault', $s_data);
     $this->view->set('clickaction', 'edit');
     parent::index(new GLBudgetCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['new'] = array('tag' => 'New Budget', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new')));
     $sidebarlist['viewaccounts'] = array('tag' => 'View All Accounts', 'link' => array_merge($this->_modules, array('controller' => 'glaccounts', 'action' => 'index')));
     $sidebarlist['viewcentres'] = array('tag' => 'View All Centres', 'link' => array_merge($this->_modules, array('controller' => 'glcentres', 'action' => 'index')));
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
示例#3
0
 public function index()
 {
     $this->view->set('clickaction', 'edit');
     parent::index(new TaxStatusCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('Actions', array('new' => array('link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new')), 'tag' => 'new_tax_status')));
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
示例#4
0
 public function index()
 {
     $this->view->set('clickaction', 'edit');
     parent::index(new CBAccountCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('Actions', array('new' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'new_bank_account')));
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
示例#5
0
 public function index()
 {
     $this->setSearch('glcentresSearch', 'useDefault');
     $this->view->set('clickaction', 'view');
     parent::index(new GLCentreCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('Actions', array('new' => array('link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new')), 'tag' => 'new_glcentre')));
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
示例#6
0
 public function index()
 {
     $this->view->set('clickaction', 'edit');
     parent::index(new GLParamsCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['new'] = array('tag' => 'New Parameter', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new')));
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
示例#7
0
 public function index()
 {
     // Search
     $errors = array();
     $s_data = array();
     $this->setSearch('SLDiscountSearch', 'useDefault', $s_data);
     // End of search
     $this->view->set('clickaction', 'edit');
     $this->view->set('orderby', 'id');
     parent::index(new SLDiscountCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('Actions', array('new' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'Add New Discount')));
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
示例#8
0
 public function index()
 {
     $this->view->set('clickaction', 'edit');
     parent::index(new GLPeriodCollection($this->_templateobject));
     $period = new GLPeriod();
     $period->getCurrentPeriod();
     $newperiod = new GLPeriod();
     if ($period->isLoaded()) {
         $nextyear = date(DATE_FORMAT, strtotime('+12 months', strtotime($period->enddate)));
         $newperiod->loadPeriod($nextyear);
     }
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['new'] = array('tag' => 'new_glperiod', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new')));
     $sidebarlist['close'] = array('tag' => 'Close Period ' . $period->year . ' - Period ' . $period->period, 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'close', 'id' => $period->id)));
     if (!$newperiod->isLoaded() && $period->isLoaded()) {
         $sidebarlist['viewtrans'] = array('tag' => 'Create Future Periods', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'createperiods')));
     }
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
示例#9
0
 public function all_transactions()
 {
     if (!$this->loadData()) {
         $this->dataError();
         sendBack();
     }
     $customer = $this->_uses[$this->modeltype];
     $transactions = new SLTransactionCollection();
     $sh = $this->setSearchHandler($transactions);
     $sh->addConstraint(new Constraint('slmaster_id', '=', $customer->id));
     parent::index($transactions, $sh);
     $this->view->set('collection', $transactions);
     $this->view->set('master_id', 'slmaster_id');
     $this->view->set('clickaction', 'view');
     $this->view->set('clickcontroller', 'sltransactions');
     $this->view->set('invoice_module', 'sales_invoicing');
     $this->view->set('invoice_controller', 'sinvoices');
     $this->_templateName = $this->getTemplateName('view_ledger_trans');
 }
示例#10
0
 public function index()
 {
     $this->view->set('clickaction', 'edit');
     parent::index(new GLBalanceCollection($this->_templateobject));
 }