diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index 35d760a9..d0ca44c1 100755 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -220,7 +220,7 @@ class cashbook extends BaseController $total=$directamount+$alreadypaid; $ctotal=$directamount+$alreadycreditpaid; - echo $totalbankamount; + //echo $totalbankamount; if($amounttype==0) { $type=RECEIPT; @@ -374,6 +374,8 @@ class cashbook extends BaseController } $bankcash1 = array('cdate'=>$bankdate,'mid'=>$bankid,'btype'=>$type,'amount'=>$alreadypaid,'boption'=>$option,'mappingamount'=>$forstatus,'totalamount'=>$amount,'amounttype'=>$bankamounttype,'alreadycreditpaid'=>$alreadycreditpaid); + print_r($bankcash1); + //die(); $res1 = $this->cashbook_model->addcashbook($bankcash1); } @@ -956,16 +958,9 @@ class cashbook extends BaseController } - - + echo ""; - //echo ""; - - - - - - } + } public function amountpaid() { diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index b312dd08..996afdc8 100755 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -41,7 +41,7 @@ class cashbook_model extends CI_Model function getIncomeExpenseList($i="") { // echo $i; - $this->db->select('t_accountcode.name,T_Employee_Details.FirstName,T_Employee_Details.LastName,t_income_expense.*'); + $this->db->select('t_accountcode.name,cashtype,T_Employee_Details.FirstName,T_Employee_Details.LastName,t_income_expense.*'); $this->db->from('t_income_expense'); $this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code','left'); $this->db->join('tbl_users','t_income_expense.Created_By=tbl_users.userId','left'); @@ -134,7 +134,7 @@ class cashbook_model extends CI_Model function bankstatement($fdate,$tdate){ - $sql="SELECT *,date_format(reportdate,'%d-%m-%Y')as date,tie.total,date_format(valuedate,'%d-%m-%Y')as valuedate from T_bankreport as br left join t_income_expense as tie on tie.bankid=br.ID where reportdate !=0"; + $sql="SELECT *,date_format(reportdate,'%d-%m-%Y')as date,tie.total,date_format(valuedate,'%d-%m-%Y')as valuedate from T_bankreport as br left join t_income_expense as tie on tie.bankid=br.ID where reportdate !=0 group by(br.ID)"; if ($fdate and $tdate != ''){ $fdate= date("Y-m-d",strtotime($fdate)); $tdate=date("Y-m-d",strtotime($tdate)); @@ -240,14 +240,27 @@ function debitpolist($bankid) return $query->result(); } -function mappingcash($SupplierName,$fdate,$tdate,$bankid) - { - $this->db->select('cdate,mid,btype,amount,boption,ie.total,ie.account_code'); - $this->db->from ('T_Bankmappingcashbook bmc'); - $this->db->join ('t_income_expense ie','ie.bankid = bmc.mid','left'); - $this->db->where('mid',$bankid); +// function mappingcash($SupplierName,$fdate,$tdate,$bankid) + // { + // $this->db->select('mid,btype,amount,boption,ie.total,ie.account_code,ie.date'); + // $this->db->from ('T_Bankmappingcashbook bmc'); + // $this->db->join ('t_income_expense ie','ie.bankid = bmc.mid','left'); + // $this->db->where('mid',$bankid); - $this->db->group_by('mid'); + // $this->db->group_by('mid'); + // $query = $this->db->get(); + // return $query->result(); + + // } + + function mappingcash($SupplierName,$fdate,$tdate,$bankid) + { + $this->db->select('date,bankid,cashtype,amounttype,total,account_code'); + $this->db->from ('t_income_expense'); + //$this->db->join ('t_income_expense ie','ie.bankid = bmc.mid','left'); + $this->db->where('bankid',$bankid); + + //$this->db->group_by('mid'); $query = $this->db->get(); return $query->result(); @@ -280,7 +293,7 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono) function creditlistinv($invno) { $this->db->select('bmp.bankid,bmp.invoiceno,bmp.amountreceived,br.Narration'); - $this->db->from ('T_Bankmappingiv as bmp'); + $this->db->from ('T_Bankinvoicereport as bmp'); $this->db->join('T_bankreport br','br.ID = bmp.bankid'); $this->db->where('invoiceno',$invno); diff --git a/application/views/bankcashnew.php b/application/views/bankcashnew.php index 8ec411fb..a8c66e44 100644 --- a/application/views/bankcashnew.php +++ b/application/views/bankcashnew.php @@ -148,18 +148,41 @@ if(!empty($cashbanking))
- -
- + amounttype; + ?> + + +
+
+
+ Select Account type:

+ + PAYMENT +
+
+
+ +
Select Account type:

RECEIPT         - PAYMENT -
-
+
+
+ + +
@@ -301,7 +324,7 @@ if(!empty($cashbanking)) - + diff --git a/application/views/bankdebit.php b/application/views/bankdebit.php index bdc5be40..e0de72a3 100644 --- a/application/views/bankdebit.php +++ b/application/views/bankdebit.php @@ -275,7 +275,7 @@
- + @@ -427,7 +427,7 @@ if(x==true) }).appendTo('#sn1'); $('').attr({ - type:'text', + type:'hidden', name:'qw1'+j, id:'qw1'+j, value:invoicepayment diff --git a/application/views/bankinvoice.php b/application/views/bankinvoice.php index f253ce1d..89e00f39 100644 --- a/application/views/bankinvoice.php +++ b/application/views/bankinvoice.php @@ -135,8 +135,8 @@
-
-
+
+
@@ -144,6 +144,11 @@
+
+
+
@@ -154,7 +159,7 @@

- + @@ -383,7 +388,7 @@ if(x==true) }).appendTo('#invoiceamount1'); $('').attr({ - type:'text', + type:'hidden', name:'invoice_balance1'+j, id:'invoice_balance1'+j, value:invoicereceived diff --git a/application/views/bankinvoicesettlement.php b/application/views/bankinvoicesettlement.php index eeea136a..8d013cdf 100644 --- a/application/views/bankinvoicesettlement.php +++ b/application/views/bankinvoicesettlement.php @@ -247,15 +247,15 @@ if(!empty($debitmapping)) - + - - + + - + diff --git a/application/views/banksettlement.php b/application/views/banksettlement.php index f7235ce8..b690c940 100644 --- a/application/views/banksettlement.php +++ b/application/views/banksettlement.php @@ -251,15 +251,15 @@ if(!empty($mapping)) - + - - + + - +
cdate?>date?> account_code?> mid?>btype?>bankid?>amounttype?> total?>boption?>cashtype?>cdate?>date?> account_code?> mid?>btype?>bankid?>amounttype?> total?>boption?>cashtype?>