diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index d62ff935..7a53dd25 100755 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -204,23 +204,17 @@ class cashbook extends BaseController { $bankdate = $this->input->post('bankdate'); - $bankid = $this->input->post('bankid'); + $bankid = $this->input->post('bakid'); $amount = $this->input->post('bankamount'); - $amounttype = $this->input->post('type'); - //echo $amounttype; - $totalbankamount = $this->input->post('totalbankamount'); - //$totalbankcreditamount - //echo $totalbankamount; + $amounttype = $this->input->post('type'); + $totalbankamount = $this->input->post('totalbankamount'); $alreadypaid=$this->input->post('alreadypaid'); $directamount = $this->input->post('totalamount'); - //echo $alreadypaid; $debitamount=$this->input->post('debitamount'); $alreadycreditpaid=$this->input->post('alreadycreditpaid'); $bankorcash=$this->input->post('borc'); - $total=$directamount+$alreadypaid; $ctotal=$directamount+$alreadycreditpaid; - //echo $totalbankamount; if($amounttype==CREDIT) { $type=RECEIPT; @@ -330,14 +324,11 @@ class cashbook extends BaseController if($amounttype=='CREDIT') { $cashbookstatus1= array('cclearbalance'=>$ctotal,'cstatus'=>$statu); - //print_r($cashbookstatus1); - //die(); $res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid); } else { $cashbookstatus = array('Clearbalance'=>$total,'Status'=>$stat); - //print_r($cashbookstatus); $res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid); } diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index 3c5538fc..de9e277b 100755 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -87,7 +87,7 @@ class cashbook_model extends CI_Model } function viewdepartment($sid='') { - $sql="SELECT ie.*,br.ID,ie.totalbankamount,ac.name,ie.id,date_format(ie.date,'%d-%m-%Y')as date FROM t_income_expense ie + $sql="SELECT ie.*,br.*,br.ID,ie.totalbankamount,ac.name,ie.id,date_format(ie.date,'%d-%m-%Y')as date FROM t_income_expense ie left join t_accountcode ac on ac.code=ie.account_code left join T_bankreport br on br.ID=ie.bankid WHERE ie.id = ?"; @@ -155,11 +155,11 @@ class cashbook_model extends CI_Model $status='ST057'; //echo $tdate; //die(); - $this->db->distinct(); - $this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName, - POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid, - POM.PODate,POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status, - PUADV.AdvanceAmount'); + $this->db->distinct(); + $this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName, + POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid, + POM.PODate,POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status, + PUADV.AdvanceAmount'); $this->db->from ('T_PurchaseOrder_Master POM'); $this->db->join('T_SupplierDetailsN supp','supp.SupplierID = POM.SupplierID'); @@ -189,7 +189,7 @@ class cashbook_model extends CI_Model $this->db->join ('ip_invoices iv','iv.invoice_id = iva.invoice_id','left'); $this->db->join ('ip_clients ic','ic.client_id = iv.client_id','left'); $this->db->join ('T_Bankinvoicereport BI','BI.invoiceno = iva.invoice_id','left'); - $this->db->where('iva.receivedstatus !=','ST065'); + $this->db->where('iva.receivedstatus !=','ST065'); $this->db->where('ic.client_name',$Customer); $this->db->or_where('iv.invoice_date_created BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"'); $this->db->group_by('iva.invoice_id'); @@ -296,7 +296,7 @@ function debitpolist($bankid) function mappingcash($SupplierName,$fdate,$tdate,$bankid) { - $this->db->select('date,bankid,cashtype,amounttype,total,account_code'); + $this->db->select('date,bankid,cashtype,amounttype,total,account_code,totalbankamount'); $this->db->from ('t_income_expense'); //$this->db->join ('t_income_expense ie','ie.bankid = bmc.mid','left'); $this->db->where('bankid',$bankid); diff --git a/application/views/bankcashnew.php b/application/views/bankcashnew.php index 5a22200b..02481896 100644 --- a/application/views/bankcashnew.php +++ b/application/views/bankcashnew.php @@ -1,18 +1,13 @@ - - -amounttype; - } -} - -?> -
Payment ID:
+Payment Mode: Bank
+Payment Amount:
+Payment Amount Type: amounttype?>
+