diff --git a/application/config/database.php b/application/config/database.php index dd1c19de..5be07fdb 100755 --- a/application/config/database.php +++ b/application/config/database.php @@ -51,8 +51,8 @@ $active_record = TRUE; $db['default']['hostname'] = 'sidharthindustries.com'; $db['default']['username'] = 'kasiram9_Siddh'; $db['default']['password'] = 'sidh@1234'; -$db['default']['database'] = 'kasiram9_SIADEV'; -//$db['default']['database'] = 'kasiram9_SiddharthIndustries'; +// $db['default']['database'] = 'kasiram9_SIADEV'; +$db['default']['database'] = 'kasiram9_SiddharthIndustries'; //$db['default']['database'] = 'kasiram9_SIAPROD'; $db['default']['dbdriver'] = 'mysqli'; $db['default']['dbprefix'] = ''; diff --git a/application/controllers/cashbook.php b/application/controllers/cashbook.php index 71ef65b1..98568218 100644 --- a/application/controllers/cashbook.php +++ b/application/controllers/cashbook.php @@ -68,11 +68,12 @@ class cashbook extends BaseController } }else{ - // $data['list'] = $this->cashbook_model->getIncomeExpenseList(); + $data['list'] = $this->cashbook_model->getIncomeExpenseList(); // $this->global['pageTitle'] = 'Siddharth : Cash Book: Listing'; // $this->loadViews("income_expense_list", $this->global, $data , NULL); $this->global['pageTitle'] = 'Siddharth : Cash Book: Listing'; + $data['finyear']=$this->cashbook_model->finyear(); if ($this->input->post('btn_submit')) { @@ -88,19 +89,19 @@ class cashbook extends BaseController $data['list'] = $this->cashbook_model->getIncomeExpense($fromyear,$toyear,$fromdt,$todt); } - else{ + // else{ - if (date('m') <= 3) { - $preyear = (date('Y')-1); - $currentyear = date('Y'); - } else { - $preyear = date('Y') ; - $currentyear = (date('Y') + 1); - } + // if (date('m') <= 3) { + // $preyear = (date('Y')-1); + // $currentyear = date('Y'); + // } else { + // $preyear = date('Y') ; + // $currentyear = (date('Y') + 1); + // } - $data['list'] = $this->cashbook_model->getIncomeExpense($preyear,$currentyear); - $data['finyear']=$this->cashbook_model->finyear(); - } + // $data['list'] = $this->cashbook_model->getIncomeExpense($preyear,$currentyear); + // $data['finyear']=$this->cashbook_model->finyear(); + // } $this->loadViews("income_expense_list", $this->global, $data , NULL); } @@ -716,7 +717,7 @@ class cashbook extends BaseController // $this->loadViews("income_expense_list", $this->global, $data , NULL); $this->global['pageTitle'] = 'Siddharth : Cash Book: Listing'; - + $data['finyear']=$this->cashbook_model->finyear(); if ($this->input->post('btn_submit')) { $fromdt = $this->input->post('from_date'); @@ -731,19 +732,19 @@ class cashbook extends BaseController $data['list'] = $this->cashbook_model->getAdvance($fromyear,$toyear,$fromdt,$todt); } - else{ + // else{ - if (date('m') <= 3) { - $preyear = (date('Y')-1); - $currentyear = date('Y'); - } else { - $preyear = date('Y') ; - $currentyear = (date('Y') + 1); - } + // if (date('m') <= 3) { + // $preyear = (date('Y')-1); + // $currentyear = date('Y'); + // } else { + // $preyear = date('Y') ; + // $currentyear = (date('Y') + 1); + // } - $data['list'] = $this->cashbook_model->getAdvance($preyear,$currentyear); - $data['finyear']=$this->cashbook_model->finyear(); - } + // $data['list'] = $this->cashbook_model->getAdvance($preyear,$currentyear); + // $data['finyear']=$this->cashbook_model->finyear(); + // } $this->loadViews("Advancelist", $this->global, $data , NULL); } @@ -799,9 +800,9 @@ class cashbook extends BaseController } - public function editcashbook($sid) + public function editcashbook() { - + $sid = $this->input->get('sid'); if($sid == '') { $cash = $_GET['sid']; diff --git a/application/controllers/inwardgateregister.php b/application/controllers/inwardgateregister.php index 8630449f..57ee2ef6 100644 --- a/application/controllers/inwardgateregister.php +++ b/application/controllers/inwardgateregister.php @@ -592,6 +592,7 @@ $prefile =array(); $IGRItemStatus = REQITEM_NEW; $TotalPendingQty = ''; + $TotalPendingQty =(int)$TotalPendingQty; for ($i = 1; $i <= $RowCount; $i++) { diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index e5134617..fa2f3b97 100644 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1205,7 +1205,8 @@ function edited(){ $SupplierID = $this->input->post('drpSupplier'); $newsup=$this->input->post('newsup'); - $newSupId = split("[ - ]+", $newsup); + // $newSupId = split("[ - ]+", $newsup); + $newSupId = preg_split('[-]',$newsup); $DeliveryAddr = $this->input->post('txtDeliveryAddress'); @@ -2196,7 +2197,8 @@ function addNewImportPurchaseOrder() $newsup=$this->input->post('newsup'); - $newSupId = split("[ - ]+", $newsup); + // $newSupId = split("[ - ]+", $newsup); + $newSupId = preg_split('[-]',$newsup); /*-----------------------------------*/ $b4supplier=$this->input->post('b4supplier'); @@ -2924,7 +2926,8 @@ if($Quantity != $b4qty) $newsup=$this->input->post('newsup'); - $newSupId = split("[ - ]+", $newsup); + // $newSupId = split("[ - ]+", $newsup); + $newSupId = preg_split('[-]',$newsup); diff --git a/application/logs/log-2019-04-13.php b/application/logs/log-2019-04-13.php new file mode 100644 index 00000000..31b08546 --- /dev/null +++ b/application/logs/log-2019-04-13.php @@ -0,0 +1,32 @@ + + +ERROR - 2019-04-13 15:25:27 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given C:\xampp\htdocs\siddharth_application\system\database\drivers\mysqli\mysqli_result.php 38 +ERROR - 2019-04-13 15:25:38 --> Severity: Notice --> Undefined property: stdClass::$FirstName C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 122 +ERROR - 2019-04-13 15:25:38 --> Severity: Notice --> Undefined variable: update C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 238 +ERROR - 2019-04-13 15:25:38 --> Severity: Notice --> Undefined property: stdClass::$BillNo C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4059 +ERROR - 2019-04-13 15:25:38 --> Severity: Notice --> Undefined property: stdClass::$FilePath C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4060 +ERROR - 2019-04-13 15:25:38 --> Severity: Notice --> Undefined property: stdClass::$BillNo C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4231 +ERROR - 2019-04-13 15:25:57 --> Severity: Notice --> Undefined variable: rawmaterial C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1430 +ERROR - 2019-04-13 15:25:57 --> Severity: Notice --> Undefined offset: 1 C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1389 +ERROR - 2019-04-13 15:25:57 --> Severity: Notice --> Undefined offset: 1 C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1395 +ERROR - 2019-04-13 15:25:57 --> Severity: Notice --> Undefined variable: rawmaterial C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1430 +ERROR - 2019-04-13 15:25:57 --> Severity: Warning --> count(): Parameter must be an array or an object that implements Countable C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1465 +ERROR - 2019-04-13 15:26:00 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given C:\xampp\htdocs\siddharth_application\system\database\drivers\mysqli\mysqli_result.php 38 +ERROR - 2019-04-13 15:26:07 --> Severity: Notice --> Undefined property: stdClass::$FirstName C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 122 +ERROR - 2019-04-13 15:26:07 --> Severity: Notice --> Undefined property: stdClass::$BillNo C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4059 +ERROR - 2019-04-13 15:26:07 --> Severity: Notice --> Undefined property: stdClass::$FilePath C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4060 +ERROR - 2019-04-13 15:26:07 --> Severity: Notice --> Undefined property: stdClass::$BillNo C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4231 +ERROR - 2019-04-13 15:27:10 --> Severity: Notice --> Undefined variable: rawmaterial C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1430 +ERROR - 2019-04-13 15:27:10 --> Severity: Notice --> Undefined offset: 1 C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1389 +ERROR - 2019-04-13 15:27:10 --> Severity: Notice --> Undefined offset: 1 C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1395 +ERROR - 2019-04-13 15:27:10 --> Severity: Notice --> Undefined variable: rawmaterial C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1430 +ERROR - 2019-04-13 15:27:10 --> Severity: Warning --> count(): Parameter must be an array or an object that implements Countable C:\xampp\htdocs\siddharth_application\application\controllers\purchaseorder.php 1465 +ERROR - 2019-04-13 15:27:13 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given C:\xampp\htdocs\siddharth_application\system\database\drivers\mysqli\mysqli_result.php 38 +ERROR - 2019-04-13 15:27:19 --> Severity: Notice --> Undefined property: stdClass::$FirstName C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 122 +ERROR - 2019-04-13 15:27:19 --> Severity: Notice --> Undefined property: stdClass::$BillNo C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4059 +ERROR - 2019-04-13 15:27:19 --> Severity: Notice --> Undefined property: stdClass::$FilePath C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4060 +ERROR - 2019-04-13 15:27:19 --> Severity: Notice --> Undefined property: stdClass::$BillNo C:\xampp\htdocs\siddharth_application\application\views\editRevenuepurchaseorder.php 4231 +ERROR - 2019-04-13 15:31:24 --> Severity: Notice --> Undefined variable: finyear C:\xampp\htdocs\siddharth_application\application\views\income_expense_list.php 83 +ERROR - 2019-04-13 15:31:24 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\income_expense_list.php 83 +ERROR - 2019-04-13 16:09:33 --> Severity: Warning --> Use of undefined constant PAYMENT - assumed 'PAYMENT' (this will throw an Error in a future version of PHP) C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 856 +ERROR - 2019-04-13 16:09:34 --> Severity: Notice --> Undefined variable: isactive C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 959 diff --git a/application/models/cashbook_model.php b/application/models/cashbook_model.php index 722a6290..71258636 100644 --- a/application/models/cashbook_model.php +++ b/application/models/cashbook_model.php @@ -62,6 +62,7 @@ class cashbook_model extends CI_Model $this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left'); $this->db->where('t_income_expense.IsActive',1); $this->db->where('t_income_expense.account_code !=','ADV001'); + $this->db->where('t_income_expense.account_code !=','0013'); $this->db->order_by("date","desc"); if(!empty($i)) { @@ -969,7 +970,7 @@ function receiptdata() } function debitpolist($bankid) { - $this->db->select('bp.id,bp.mid,igrm.MaterialRcvdDate,bp.PONO,bp.Suppliername,bp.Totalpoamount,br.Debit,bp.Balancetopay,bp.Amountpaid,bp.IGRNO,bp.IGRLineItemNo,igrm.file,bu.FilePath,inward.FilePath as Fpath'); + $this->db->select('bp.id,bp.mid,igrm.MaterialRcvdDate,bp.PONO,bp.Suppliername,bp.Totalpoamount,br.Debit,bp.Balancetopay,bp.Amountpaid,bp.IGRNO,bp.IGRLineItemNo,igrm.file,bu.FilePath,inward.FilePath as Fpath,bp.IsActive'); $this->db->from ('T_Bankmappingpo bp'); $this->db->join ('T_IGR_Master igrm','bp.IGRNO = igrm.IGRNO','left'); $this->db->join ('T_PurchaseOrder_BillUpload bu','bu.PONO = bp.PONO','left'); @@ -990,7 +991,7 @@ function receiptdata() { $this->db->select('bm.indate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid, - bm.balancetoreceived,bm.amountreceived,bm.ID,br.Credit,br.cclearbalance,br.cbalancetocleared'); + bm.balancetoreceived,bm.amountreceived,bm.ID,br.Credit,br.cclearbalance,br.cbalancetocleared,bm.IsActive'); $this->db->from ('T_Bankmappingiv bm'); $this->db->join('T_bankreport br','br.ID=bm.bankid'); $this->db->where('bm.bankid',(int)$bankid); @@ -1730,7 +1731,7 @@ function receiptdata() function received($clientid,$fdate,$tdate,$fa,$aa,$m) { $this->db->select('bm.indate,bm.BankDate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid,bm.customerid, - bm.balancetoreceived,bm.amountreceived,bm.ID,br.Credit,br.cclearbalance,br.cbalancetocleared'); + bm.balancetoreceived,bm.amountreceived,bm.ID,br.Credit,br.cclearbalance,br.cbalancetocleared,bm.IsActive'); $this->db->from ('T_Bankmappingiv bm'); $this->db->join('ip_invoices iv','iv.invoice_number=bm.invoiceno'); $this->db->join('T_bankreport br','br.ID=bm.bankid'); diff --git a/application/views/bankamountpaid.php b/application/views/bankamountpaid.php index da277cae..7f77dc2d 100644 --- a/application/views/bankamountpaid.php +++ b/application/views/bankamountpaid.php @@ -277,7 +277,24 @@ if(!empty($amountpaid)) Totalpoamount?> - Totalpoamount-$ap->Amountpaid;?> + + + + IsActive != 0) + { + echo $ap->Balancetopay ; + + } + else + { + + echo $ap->Totalpoamount-$ap->Amountpaid; + } + ?> + + + igrfile !='') diff --git a/application/views/bankamountreceived.php b/application/views/bankamountreceived.php index b7afbc52..95557ee6 100644 --- a/application/views/bankamountreceived.php +++ b/application/views/bankamountreceived.php @@ -282,7 +282,23 @@ foreach($financialyear as $item) totinvoiceamount?> - totinvoiceamount- $ap->amountreceived?> + + IsActive !=0){ + + // echo "hi"; + // echo '-- '.$ap->IsActive.' ---'; + echo $ap->totinvoiceamount- $ap->amountreceived; + } + else{ + // echo "hello"; + // echo '-- '.$ap->IsActive.' ---'; + echo $ap->balancetoreceived; + } + + ?> + + amountreceived)?>amountreceived?>     @@ -310,7 +326,7 @@ foreach($financialyear as $item)     - +   diff --git a/application/views/bankinvoicesettlement.php b/application/views/bankinvoicesettlement.php index d70a2ac8..6e830bf7 100644 --- a/application/views/bankinvoicesettlement.php +++ b/application/views/bankinvoicesettlement.php @@ -181,7 +181,23 @@ foreach($financialyear as $item) amountreceived?> - balancetoreceived?> + IsActive !=0){ + + // echo "hi"; + // echo '-- '.$ap->IsActive.' ---'; + echo $ap->totinvoiceamount-$ap->amountreceived; + } + else + { + // echo "hello"; + // echo '-- '.$ap->IsActive.' ---'; + echo $ap->balancetoreceived; + } + ?> + +     diff --git a/application/views/banksettlement.php b/application/views/banksettlement.php index 9068afe1..34606d04 100644 --- a/application/views/banksettlement.php +++ b/application/views/banksettlement.php @@ -290,7 +290,28 @@ if(!empty($mapping)) Suppliername?> Totalpoamount?> - Totalpoamount-$ap->Amountpaid;?> + + + IsActive != 0) + { + + + //echo "hello"; + echo $ap->Totalpoamount - $ap->Amountpaid; + // echo '-- '.$ap->IsActive.' ---'; + + } + else + { + echo "hi".$ap->Balancetopay; + // echo '-- '.$ap->IsActive.' ---'; + } + ?> + + + + file !='') diff --git a/application/views/editincomeexpenses.php b/application/views/editincomeexpenses.php index f408484f..09f15ddc 100755 --- a/application/views/editincomeexpenses.php +++ b/application/views/editincomeexpenses.php @@ -20,22 +20,25 @@ $id=''; $file1=''; $document = ''; $supplier=''; +//echo "sdlfhn,sdfnkldsnsflkdsn"; //print_r( $DepDetails); + //print_r($dropdownvalues);die(); if(!empty($DepDetails)) { foreach ($DepDetails as $ded) { $document =$ded->document; - //echo $document; + // echo $document; $final = base_url().$document; - //echo $final; + // echo $final; // print_r( $DepDetails);die(); $bankamount=$ded->totalbankamount; $bankid=$ded->ID; $normalid=$ded->id; $accountcode1=$ded->account_code; $id=$ded->id; + // echo $id; die(); $amounttype=$ded->amounttype; $alreadypaid=$ded->Clearbalance; $alreadyreceived=$ded->cclearbalance; diff --git a/application/views/income_expense_list.php b/application/views/income_expense_list.php index 9d63e23c..440967c1 100755 --- a/application/views/income_expense_list.php +++ b/application/views/income_expense_list.php @@ -144,10 +144,11 @@ total;?> description;?> - type; ?>." Details ">    + + type; ?>. "Details">    - + - +