init
This commit is contained in:
44
modules/EcmPaymentStates/interestController.php
Normal file
44
modules/EcmPaymentStates/interestController.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
class interestController
|
||||
{
|
||||
public $model;
|
||||
public $ss;
|
||||
|
||||
|
||||
function __construct(){
|
||||
$this->model = new interestModel();
|
||||
$this->ss = new Sugar_Smarty ();
|
||||
global $mod_strings;
|
||||
$this->ss->assign ( "MOD", $mod_strings );
|
||||
}
|
||||
|
||||
function editAction()
|
||||
{
|
||||
|
||||
$this->ss->assign ( "POSITIONS",json_encode($this->model->getRecords()));
|
||||
$this->ss->display ( 'modules/EcmPaymentStates/tpls/interestEditView.tpl' );
|
||||
}
|
||||
|
||||
function saveAction()
|
||||
{
|
||||
$this->model->saveRecords();
|
||||
header('Location: index.php?module=EcmPaymentStates&action=interestView&step=detailAction');
|
||||
}
|
||||
|
||||
function detailAction()
|
||||
{
|
||||
$this->ss->assign ( "POSITIONS",$this->model->getRecords());
|
||||
$this->ss->display ( 'modules/EcmPaymentStates/tpls/interestDetailView.tpl' );
|
||||
}
|
||||
|
||||
function calculateAction(){
|
||||
|
||||
$this->ss->assign ( "POSITIONS",$this->model->getRecords());
|
||||
$this->ss->assign ( "TABLE",$this->model->calculateRecords());
|
||||
$this->ss->assign ( "TOTAL",$this->model->total);
|
||||
$this->ss->assign ( "REQ",$_REQUEST);
|
||||
$this->ss->display ( 'modules/EcmPaymentStates/tpls/interestDetailView.tpl' );
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user