diff --git a/application/controllers/batchcard.php b/application/controllers/batchcard.php index b04af021..815b4197 100755 --- a/application/controllers/batchcard.php +++ b/application/controllers/batchcard.php @@ -728,6 +728,7 @@ class batchcard extends BaseController $data['emplist'] = $this->batchcard_model->getEmplistforReport(); $data['MachineList'] = $this->batchcard_model->getmachine_codename(); + $data['supplist'] = $this->batchcard_model->getSupplierlist(); $data['MaintEdit'] = $this->batchcard_model->getmaint_dtl_MntID($MntID); $data['MaintFileEdit'] = $this->batchcard_model->getfiledetails($MntID); //print_r($data); @@ -740,8 +741,14 @@ class batchcard extends BaseController $type = $this->input->post('radiobtn'); //$maintenance_date = $this->input->post('maintenance_date'); $machinecode = $this->input->post('machine'); - if($type == '0'){ $maintenance_subtype = $this->input->post('maintenance_subtype');} - else{ $maintenance_subtype = NULL; } + if($type == '0'){ + $maintenance_subtype = $this->input->post('maintenance_subtype'); + if($maintenance_subtype == '1'){ + $supplier = $this->input->post('supplier'); + } + else{ $supplier = NULL; } + } + else{ $maintenance_subtype = NULL;$supplier = NULL; } //$maintenance_time= $this->input->post('maintenance_time'); $location = $this->input->post('location'); $maintenance_description = $this->input->post('maintenance_description'); @@ -759,7 +766,7 @@ class batchcard extends BaseController $approvedby = $this->input->post('approvedby'); $workdoneby = $this->input->post('workdoneby'); - $addmntbr = array('Type'=>$type,'Machine_Code'=>$machinecode,'Maint_Subtype'=>$maintenance_subtype, 'Maint_Location'=>$location, 'Maint_Description'=>$maintenance_description, 'Maint_Reason'=>$maintenance_reason, 'Maint_Time_from'=>$maintenance_time_from, 'Maint_Time_to'=>$maintenance_time_to, 'Maint_Total_hrs'=>$maintenance_total_hrs, 'Cost_Material'=>$cost_material, 'Cost_Labour'=>$cost_labour,'WorkDone_By'=>$workdoneby,'Approved_By'=>$approvedby,'CreatedBy'=>$createdby); + $addmntbr = array('Type'=>$type,'Machine_Code'=>$machinecode,'Maint_Subtype'=>$maintenance_subtype, 'Maint_Supplier'=>$supplier,'Maint_Location'=>$location, 'Maint_Description'=>$maintenance_description, 'Maint_Reason'=>$maintenance_reason, 'Maint_Time_from'=>$maintenance_time_from, 'Maint_Time_to'=>$maintenance_time_to, 'Maint_Total_hrs'=>$maintenance_total_hrs, 'Cost_Material'=>$cost_material, 'Cost_Labour'=>$cost_labour,'WorkDone_By'=>$workdoneby,'Approved_By'=>$approvedby,'CreatedBy'=>$createdby); //'Maint_Date'=>$maintenance_date,'Maint_Time'=>$maintenance_time, //print_r($addmntbr); //die(); @@ -828,8 +835,14 @@ class batchcard extends BaseController $type = $this->input->post('radiobtn'); $mntid = $this->input->post('mntid'); $machinecode = $this->input->post('machine'); - if($type == '0'){ $maintenance_subtype = $this->input->post('maintenance_subtype'); } - else{ $maintenance_subtype = NULL; } + if($type == '0'){ + $maintenance_subtype = $this->input->post('maintenance_subtype'); + if($maintenance_subtype == '1'){ + $supplier = $this->input->post('supplier'); + } + else{ $supplier = NULL; } + } + else{ $maintenance_subtype = NULL; $supplier = NULL; } // $maintenance_date = $this->input->post('maintenance_date'); // $maintenance_time= $this->input->post('maintenance_time'); $location = $this->input->post('location'); @@ -850,7 +863,7 @@ class batchcard extends BaseController // $date = new DateTime('now', new DateTimeZone('Asia/Kolkata')); // $updatedon = $date->format('d-m-Y H:i:s'); - $editmntbr = array('Type'=>$type,'Machine_Code'=>$machinecode,'Maint_Subtype'=>$maintenance_subtype, 'Maint_Location'=>$location, 'Maint_Description'=>$maintenance_description, 'Maint_Reason'=>$maintenance_reason, 'Maint_Time_from'=>$maintenance_time_from, 'Maint_Time_to'=>$maintenance_time_to, 'Maint_Total_hrs'=>$maintenance_total_hrs, 'Cost_Material'=>$cost_material, 'Cost_Labour'=>$cost_labour,'WorkDone_By'=>$workdoneby,'Approved_By'=>$approvedby,'UpdatedBy'=>$updatedby); + $editmntbr = array('Type'=>$type,'Machine_Code'=>$machinecode,'Maint_Subtype'=>$maintenance_subtype, 'Maint_Subtype'=>$maintenance_subtype,'Maint_Location'=>$location, 'Maint_Description'=>$maintenance_description, 'Maint_Reason'=>$maintenance_reason, 'Maint_Time_from'=>$maintenance_time_from, 'Maint_Time_to'=>$maintenance_time_to, 'Maint_Total_hrs'=>$maintenance_total_hrs, 'Cost_Material'=>$cost_material, 'Cost_Labour'=>$cost_labour,'WorkDone_By'=>$workdoneby,'Approved_By'=>$approvedby,'UpdatedBy'=>$updatedby); //'Maint_Date'=>$maintenance_date,'Maint_Time'=>$maintenance_time, //print_r($editmntbr); //die(); diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index ee88e2f2..2e72fd0f 100755 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -157,7 +157,8 @@ class cashbook extends BaseController //$data['dropdownvalues'] = $this->cashbook_model->getAccounTypes(); //print_r($data['dropdownvalues']);die(); $data['bankdetails']=$this->employeedetails_model->getBankDetails(); - $this->global['pageTitle'] = 'Siddharth : Cash Book: Add New Income Expense '; + //$this->global['pageTitle'] = 'Siddharth : Cash Book: Add New Income Expense '; + $this->global['pageTitle'] = 'Siddharth : Bank Report - File Upload'; $this->loadViews("bankingfile", $this->global, $data , NULL); } function bankfileupload() @@ -766,7 +767,7 @@ class cashbook extends BaseController public function bankdata() { - + $this->global['pageTitle'] = 'Siddharth : Bank Statement'; if ($this->input->post('btn_submit')) { $this->global['pageTitle'] = 'Siddharth : bankstatement'; @@ -788,6 +789,7 @@ class cashbook extends BaseController } public function bankdebitdata() { + $this->global['pageTitle'] = 'Siddharth : Bank Debit Report'; if ($this->input->post('btn_submit')) { $Supplierid = $this->input->post('SupplierName'); @@ -805,6 +807,7 @@ class cashbook extends BaseController } public function bankinvoice() { + $this->global['pageTitle'] = 'Siddharth : Bank Invoice Report'; if ($this->input->post('btn_submit')) { $Customer = $this->input->post('Customer'); @@ -823,7 +826,8 @@ class cashbook extends BaseController { - $this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + // $this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + $this->global['pageTitle'] = 'Siddharth : Bank Report - Debited Settlements'; $SupplierName = $this->input->post('SupplierName'); $fdate = $this->input->post('from_date'); $tdate = $this->input->post('to_date'); @@ -840,7 +844,8 @@ class cashbook extends BaseController { - $this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + //$this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + $this->global['pageTitle'] = 'Siddharth : Bank Report - Credited Settlements'; $SupplierName = $this->input->post('SupplierName'); $fdate = $this->input->post('from_date'); $tdate = $this->input->post('to_date'); @@ -857,7 +862,8 @@ class cashbook extends BaseController { - $this->global['pageTitle'] = 'Siddharth : mappingdebit'; + // $this->global['pageTitle'] = 'Siddharth : mappingdebit'; + $this->global['pageTitle'] = 'Siddharth : Bank Report - Debited Details'; $SupplierName = $this->input->post('SupplierName'); $fdate = $this->input->post('from_date'); $tdate = $this->input->post('to_date'); @@ -870,7 +876,8 @@ class cashbook extends BaseController { - $this->global['pageTitle'] = 'Siddharth : mappingcredit'; + // $this->global['pageTitle'] = 'Siddharth : mappingcredit'; + $this->global['pageTitle'] = 'Siddharth : Bank Report - Credited Details '; $SupplierName = $this->input->post('SupplierName'); $fdate = $this->input->post('from_date'); $tdate = $this->input->post('to_date'); @@ -885,7 +892,8 @@ class cashbook extends BaseController // die(); $check = $this->input->post('check'); $rw = $this->input->post('rw'); - $this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + //$this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + $this->global['pageTitle'] = 'Siddharth : Bank Report - Store Debited Details'; $date = $this->input->post('podate'); $date = date_create($date);//,'Y-m-d'); $date = date_format($date,'Y-m-d'); @@ -959,12 +967,12 @@ class cashbook extends BaseController $podata1 = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid); - print_r($podata1); + //print_r($podata1); //die(); $podata = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid); - $result3 = $this->cashbook_model->poupdate($pono); + $result3 = $this->cashbook_model->getpono($pono); $resultn = $this->cashbook_model->mappingpo($podata1); if(count($result3)<=0) @@ -976,7 +984,7 @@ class cashbook extends BaseController else { //echo "update"; - $result3 = $this->cashbook_model->poupdate1($podata,$pono); + $result3 = $this->cashbook_model->poupdate($podata,$pono); } if($rw == $rowcount) @@ -999,7 +1007,8 @@ class cashbook extends BaseController } public function invoiceamount1() { - $this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + //$this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + $this->global['pageTitle'] = 'Siddharth : Bank Report - Store Credited Details'; $check = $this->input->post('check'); $rw = $this->input->post('rw'); @@ -1119,7 +1128,8 @@ class cashbook extends BaseController - $this->global['pageTitle'] = 'Siddharth : amountpaid'; + //$this->global['pageTitle'] = 'Siddharth : amountpaid'; + $this->global['pageTitle'] = 'Siddharth : Bank Report - Amount Payment Details'; if ($this->input->post('btn_submit')) { $SupplierName = $this->input->post('SupplierName'); @@ -1131,7 +1141,7 @@ class cashbook extends BaseController $data['amountpaid'] = $this->cashbook_model->paided(); $data['supplier'] = $this->cashbook_model->getsupplier(); $this->loadViews("bankamountpaid", $this->global,$data, NULL); - + } public function amountreceived() @@ -1139,7 +1149,8 @@ class cashbook extends BaseController // $this->load->model('cashbook_model'); - $this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + //$this->global['pageTitle'] = 'Siddharth : Cashbook Listing'; + $this->global['pageTitle'] = 'Siddharth : Bank Report - Received Amount Details'; if ($this->input->post('btn_submit')) { $Customer = $this->input->post('Customer'); diff --git a/application/controllers/report.php b/application/controllers/report.php index 898111ca..f305990b 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -609,15 +609,15 @@ class report extends BaseController $data['cust']=$this->dahsboard_Model->customer_name(); $data['finyear']=$this->dahsboard_Model->report_finyear(); - if($this->DEPCode == MANAGEMENT) - { + // if($this->DEPCode == MANAGEMENT) + // { $this->loadviews("Report_attach_inward",$this->global,$data, NULL); - } + // } - else - { - $this->loadViews("access", $this->global, $data, NULL); - } + // else + // { + // $this->loadViews("access", $this->global, $data, NULL); + // } diff --git a/application/models/batchcard_model.php b/application/models/batchcard_model.php index c21bc292..ea8ea50a 100755 --- a/application/models/batchcard_model.php +++ b/application/models/batchcard_model.php @@ -17,6 +17,15 @@ class batchcard_model extends CI_Model } + function getSupplierlist(){ + + $this->db->select('SupplierName,SupplierID'); + $this->db->from('T_SupplierDetailsN'); + $supp = $this->db->get(); + return $supp->result(); + + } + function saveHourlyBatchInfo($datatostore) { $this->db->insert('T_hourly_batch_info',$datatostore); diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index e9757045..769d97cd 100755 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -508,7 +508,7 @@ function debitpolist($bankid) } - public function poupdate($pono) + public function getpono($pono) { $this->db->select('PONO'); $this->db->from('T_Bankporeport'); @@ -612,7 +612,7 @@ function debitpolist($bankid) } - public function poupdate1($podata,$pono) + public function poupdate($podata,$pono) { $this->db->where('PONO', $pono); diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index f7ca0ba9..3ddfadc9 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -2613,51 +2613,41 @@ function daybeforetotal($yesterday){ $aa=$yr2; } - $sql = "SELECT sub.name as name,sub.tincyear, - sub.expensetotal as Finyeartotalexpense, - sub.incometotal as Finyeartotalincome, - IF(month = 'Jan', sub.expensetotal, 0) AS 'Janexp', - IF(month = 'Feb', sub.expensetotal, 0) AS 'Febexp', - IF(month = 'Mar', sub.expensetotal, 0) AS 'Marexp', - IF(month = 'Apr', sub.expensetotal, 0) AS 'Aprexp', - IF(month = 'May', sub.expensetotal, 0) AS 'Mayexp', - IF(month = 'Jun', sub.expensetotal, 0) AS 'Junexp', - IF(month = 'Jul', sub.expensetotal, 0) AS 'Julexp', - IF(month = 'Aug', sub.expensetotal, 0) AS 'Augexp', - IF(month = 'Sep', sub.expensetotal, 0) AS 'Sepexp', - IF(month = 'Oct', sub.expensetotal, 0) AS 'Octexp', - IF(month = 'Nov', sub.expensetotal, 0) AS 'Novexp', - IF(month = 'Dec', sub.expensetotal, 0) AS 'Decexp', - IF(month = 'Jan', sub.incometotal, 0) AS 'Janinc', - IF(month = 'Feb', sub.incometotal, 0) AS 'Febinc', - IF(month = 'Mar', sub.incometotal, 0) AS 'Marinc', - IF(month = 'Apr', sub.incometotal, 0) AS 'Aprinc', - IF(month = 'May', sub.incometotal, 0) AS 'Mayinc', - IF(month = 'Jun', sub.incometotal, 0) AS 'Juninc', - IF(month = 'Jul', sub.incometotal, 0) AS 'Julinc', - IF(month = 'Aug', sub.incometotal, 0) AS 'Auginc', - IF(month = 'Sep', sub.incometotal, 0) AS 'Sepinc', - IF(month = 'Oct', sub.incometotal, 0) AS 'Octinc', - IF(month = 'Nov', sub.incometotal, 0) AS 'Novinc', - IF(month = 'Dec', sub.incometotal, 0) AS 'Decinc' - FROM ( - select DATE_FORMAT(tinc1.date, '%b') AS month,year(tinc1.date) as tincyear,ac1.name, - ifnull(case - when tinc1.type = 'PAYMENT' - then sum(tinc1.total) - end,'0') as expensetotal, - ifnull(case - when tinc1.type = 'RECEIPT' - then sum(tinc1.total) - end, '0') as incometotal - FROM t_income_expense tinc1 - join t_accountcode ac1 on ac1.code = tinc1.account_code - WHERE (tinc1.date >='".$fa."-04-01' and tinc1.date <= '".$aa."-03-31')"; - if ($cname!= ''){ + $sql = "select tinc.account_code,ac.name, + SUM(IF(month(tinc.date) = 4, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS AprilExpense, + SUM(IF(month(tinc.date) = 4, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS AprilIncome, + SUM(IF(month(tinc.date) = 5, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS MayExpense, + SUM(IF(month(tinc.date) = 5, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS MayIncome, + SUM(IF(month(tinc.date) = 6, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS JuneExpense, + SUM(IF(month(tinc.date) = 6, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS JuneIncome, + SUM(IF(month(tinc.date) = 7, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS JulyExpense, + SUM(IF(month(tinc.date) = 7, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS JulyIncome, + SUM(IF(month(tinc.date) = 8, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS AugustExpense, + SUM(IF(month(tinc.date) = 8, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS AugustIncome, + SUM(IF(month(tinc.date) = 9, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS SepExpense, + SUM(IF(month(tinc.date) = 9, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS SepIncome, + SUM(IF(month(tinc.date) = 10, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS OctExpense, + SUM(IF(month(tinc.date) = 10, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS OctIncome, + SUM(IF(month(tinc.date) = 11, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS NovExpense, + SUM(IF(month(tinc.date) = 11, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS NovIncome, + SUM(IF(month(tinc.date) = 12, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS DecExpense, + SUM(IF(month(tinc.date) = 12, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS DecIncome, + SUM(IF(month(tinc.date) = 1, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS JanExpense, + SUM(IF(month(tinc.date) = 1, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS JanIncome, + SUM(IF(month(tinc.date) = 2, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS FebExpense, + SUM(IF(month(tinc.date) = 2, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS FebIncome, + SUM(IF(month(tinc.date) = 3, IF(tinc.type = 'PAYMENT', tinc.total, 0), 0)) AS MarExpense, + SUM(IF(month(tinc.date) = 3, IF(tinc.type = 'RECEIPT', tinc.total, 0), 0)) AS MarIncome, + SUM(IF(tinc.type = 'RECEIPT', tinc.total, 0)) AS receiptoverall, + SUM(IF(tinc.type = 'PAYMENT', tinc.total, 0)) AS paymentoverall, + SUM(tinc.total) as overalltotal + from t_income_expense tinc + join t_accountcode ac on ac.code = tinc.account_code + where (tinc.date >='".$fa."-04-01' and tinc.date <= '".$aa."-03-31')"; + if ($cname!= ''){ $sql.="and ac1.name = '".$cname."'"; - } - $sql.= "GROUP BY ac1.name ) as sub - GROUP BY name "; + } + $sql.= "tinc.account_code"; $query = $this->db->query($sql); return $query->result(); diff --git a/application/views/BatchcardMaintAdd.php b/application/views/BatchcardMaintAdd.php index 02462ddc..0101a027 100755 --- a/application/views/BatchcardMaintAdd.php +++ b/application/views/BatchcardMaintAdd.php @@ -59,6 +59,13 @@ External + + Total,2); diff --git a/application/views/bankamountpaid.php b/application/views/bankamountpaid.php index 6b04963b..a547a04d 100644 --- a/application/views/bankamountpaid.php +++ b/application/views/bankamountpaid.php @@ -7,15 +7,6 @@ if(!empty($amountpaid)) { } - - - $inrsymbol=''; - if(!empty($Indiancurrency)) - { - foreach ($Indiancurrency as $inr) - { - $inrsymbol = $inr->FontCode2000; - }} foreach($financialyear as $item) { @@ -139,10 +130,10 @@ if(!empty($amountpaid)) Date PONO Supplier Name - Total PO Amount - - Balance To Pay - Amount Paid + Total PO Amount (₹) + + Balance To Pay (₹) + Amount Paid (₹) diff --git a/application/views/bankamountreceived.php b/application/views/bankamountreceived.php index 2d89ca16..1a930b46 100644 --- a/application/views/bankamountreceived.php +++ b/application/views/bankamountreceived.php @@ -6,25 +6,15 @@ if(!empty($amountpaid)) { -} - - - $inrsymbol=''; - if(!empty($Indiancurrency)) - { - foreach ($Indiancurrency as $inr) - { - $inrsymbol = $inr->FontCode2000; - }} - foreach($financialyear as $item) - - { - $finyear = $item->financial_year; +} +foreach($financialyear as $item) +{ + $finyear = $item->financial_year; - } ?> + } ?> - + + +
-
- -
+
+
- - - - - - -
- -
- - - - - - - -
+ +
+ +
+ +
+

Invoice Report

-
- -
+ +
- +
- +
-
+
-
+
@@ -106,76 +63,67 @@ - +
-
-
+
+ +
- + + + + - -
-
+ +
+ +
-
+
-
+




-
+ +
- - + - + - - -
-
-

>Payment ID:  

-

Payment Mode:  Bank

-

Payment Amount:  

- -
- -
-
- +
+
+

>Payment ID:  

+

Payment Mode:  Bank

+

Payment Amount:  

+
+
+
+

- + - - + - + - + - - - @@ -184,45 +132,29 @@ $ti=0.00; $tvt=0.00; if(!empty($bankinvoicedata)){ - //print_r($bankdepit); - //die(); - foreach($bankinvoicedata as $t) - //print_r($bankinvoicedata); + foreach($bankinvoicedata as $t) + { $status=$t->Paymentstatus; $balancetopay=$t->Balancetopay; - // $invoice_total=$t->invoice_total; - // $amountreceived=$t->amountreceived; - // $balancetoreceived=$invoice_total-$amountreceived - //print_r($$status); if($status !='ST057') { - ?> - - - + ?> + - + - + - - - - - - - @@ -231,10 +163,9 @@ - - + + +
SelectSelect DateInvoice NumberInvoice Number Customer NameInvoice AmountInvoice Amount (₹) Balance To Received AmountReceived
invoice_date_created),'d-m-Y');?> invoice_number?> client_name?> invoice_total?> invoice_total)-($t->amountreceived)?>
          - @@ -247,45 +178,40 @@
+
  Save - -
-
-
+
+ +
+
-
- -
- - - + + + + +
-
+
-
+
-
+
-
+
-
+
- - - - + - +
- + + - - - - @@ -298,54 +224,50 @@ var res=localStorage.getItem('test2'); $('#debitamount').val(localStorage.getItem('tes')); var amount=localStorage.getItem('tes'); - document.getElementById("bamount").innerHTML='Payment Amount:'+amount+'Rs'; + document.getElementById("bamount").innerHTML='Payment Amount:'+amount+'Rs'; var res1 = res.split(','); var i; $.each(res1, function(index, value) { - var res2 = value.split('-'); - - var bid=res2[0]; - var bam=res2[1]; - //alert(bid); - //alert(bam); - $('#bankid').val(bid); - document.getElementById("bid").innerHTML='Payment ID:' +bid; - }); - //alert($data['cash']); - // $('#debitamount').val('10'); - table = $('#req').DataTable( { - "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + -"<'row'<'col-md-6'><'col-md-6'>>" + -"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", - buttons: [ - - { - extend: 'excelHtml5', - footer: 'true', - messageTop: $('h3').text(), - title: 'cashbook Overall Report', - exportOptions: { - columns: ':visible' + var res2 = value.split('-'); + var bid=res2[0]; + var bam=res2[1]; + + $('#bankid').val(bid); + + document.getElementById("bid").innerHTML='Payment ID:' +bid; + });/** foreach closed */ + + table = $('#req').DataTable( { + "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" + + "<'row'<'col-md-6'><'col-md-6'>>" + + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", + buttons: [ + { + extend: 'excelHtml5', + footer: 'true', + messageTop: $('h3').text(), + title: 'cashbook Overall Report', + exportOptions: { + columns: ':visible' - } - }, + } + }, - 'colvis' - ] - } ); -} ); -var tempinvoice=[]; -var tot=0; -var tot1=0; -var intex=1; + 'colvis' + ] + } );/** datatable closed */ +} );/** ready closed */ + +var tempinvoice=[]; // tempinvoice - This array for Invoice no with its value and its checkbox select number('checkbox_select_number'-'id'-'value'). +var tempTotal = []; // tempTotal - This array for get value from "tempinvoice" to calculate grandtotal var row=0; -var j=1; -var tott=0; +var intex=1; + function GetPayment(i) { var x = document.getElementById('checkboxcheckbox'+i).checked; -//alert(x); + var amount= parseFloat( $('#invoicereceived'+i).val() == '' ? '0.00' : $('#invoicereceived'+i).val()) var negative=0; if(amount<0) @@ -359,169 +281,111 @@ temp=intex; if(x==true) { - row= parseInt(row)+1; - //alert(row); + row = parseInt(row)+1; $('#Rowid').val(row); var date= document.getElementById ( "invoicedate"+i ).innerText; var invid =document.getElementById ( "invoice_id"+i ).innerText; - //alert(invid+'invid'); var cusname =document.getElementById ("client_name"+i ).innerText; var invoiceamount =document.getElementById ("invoice_paid"+i ).innerText; var invoicereceived=document.getElementById ("invoice_balance"+i ).innerText; - //alert(invoicereceived+'invamount'); $('#invoicereceived'+i).val(invoicereceived); - var RowCount= $('#Rowid').val(); - var invoicevalue = invid+'-'+invoicereceived; - tempinvoice.push(invoicevalue); - var total=0; - $.each(tempinvoice, function( index, value ) - { - var res2 = value.split('-'); - - var invoiceno=res2[0]; - var cam=res2[1]; - total=parseFloat(cam)+parseFloat(total); - $('#addvalue').val(parseFloat(total).toFixed(2)); - }); - - - - - - $('').attr({ type:'hidden', - name:'invoicedate1'+j, - id:'invoicedate1'+j, + name:'hideinvoicedate'+i, + id:'hideinvoicedate'+i, value:date - }).appendTo('#invoicedate1'); + }).appendTo('#HideInvoiceDateDiv'); $('').attr({ type:'hidden', - name:'invoiceid1'+j, - id:'invoiceid1'+j, + name:'hideinvoiceid'+i, + id:'hideinvoiceid'+i, value:invid - }).appendTo('#invoiceid1'); + }).appendTo('#HideInvoiceIdDiv'); $('').attr({ type:'hidden', - name:'customername1'+j, - id:'customername1'+j, + name:'hidecustomername'+i, + id:'hidecustomername'+i, value:cusname - }).appendTo('#customername1'); + }).appendTo('#HideCustomerNameDiv'); $('').attr({ type:'hidden', - name:'invoiceamount1'+j, - id:'invoiceamount1'+j, + name:'hideinvoiceamount'+i, + id:'hideinvoiceamount'+i, value:invoiceamount - }).appendTo('#invoiceamount1'); + }).appendTo('#HideInvoiceAmtDiv'); $('').attr({ type:'hidden', - name:'invoicerec'+j, - id:'invoicerec'+j, + name:'hideinvoicerecd'+i, + id:'hideinvoicerecd'+i, value:invoicereceived - }).appendTo('#invoicerec'); + }).appendTo('#HideInvoiceRecdDiv'); - - - -//j= parseInt(j)+1; - - - - - if(negative==1) { - // alert() - for(o=1;o - - + \ No newline at end of file diff --git a/application/views/bankinvoicesettlement.php b/application/views/bankinvoicesettlement.php index 73f419d2..e3a7d6dd 100644 --- a/application/views/bankinvoicesettlement.php +++ b/application/views/bankinvoicesettlement.php @@ -9,13 +9,13 @@ if(!empty($debitmapping)) } - $inrsymbol=''; - if(!empty($Indiancurrency)) - { - foreach ($Indiancurrency as $inr) - { - $inrsymbol = $inr->FontCode2000; - }} + // $inrsymbol=''; + // if(!empty($Indiancurrency)) + // { + // foreach ($Indiancurrency as $inr) + // { + // $inrsymbol = $inr->FontCode2000; + // }} foreach($financialyear as $item) { @@ -24,7 +24,7 @@ if(!empty($debitmapping)) } ?> - +