editpo,cashbook and bank statement

This commit is contained in:
rajasekar 2019-04-13 19:43:00 +05:30
parent 648207ba24
commit 7a2572d729
13 changed files with 156 additions and 44 deletions

View File

@ -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'] = '';

View File

@ -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'];

View File

@ -592,6 +592,7 @@ $prefile =array();
$IGRItemStatus = REQITEM_NEW;
$TotalPendingQty = '';
$TotalPendingQty =(int)$TotalPendingQty;
for ($i = 1; $i <= $RowCount; $i++)
{

View File

@ -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);

View File

@ -0,0 +1,32 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
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

View File

@ -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');

View File

@ -277,7 +277,24 @@ if(!empty($amountpaid))
<!--<td align="left" id="igritemno<?php echo $i ?>"><?php echo $ap->IGRLineItemNo?></span></a></td>-->
<!--<td align="left" id="sn<?php echo $i ?>"><span><?php echo $ap->Suppliername?></span></td>-->
<td align="left" id="tpoa<?php echo $i ?>"><span><?php echo $ap->Totalpoamount?></span></td>
<td align="left" id="btp<?php echo $i ?>"><span><?php echo $ap->Totalpoamount-$ap->Amountpaid;?></span></td>
<!--<td align="left" id="btp<?php echo $i ?>"><span><?php echo $ap->Totalpoamount-$ap->Amountpaid;?></span></td> -->
<td align="left" id="aa<?php echo $i ?>">
<span><?php
if($ap->IsActive != 0)
{
echo $ap->Balancetopay ;
}
else
{
echo $ap->Totalpoamount-$ap->Amountpaid;
}
?>
</span></td>
<td align="left" id="ap<?php echo $i ?>"><span><?php $tot_amount=$tot_amount+round($rate)?> <?php echo round($rate,2)?></span></td>
<?php
if($ap->igrfile !='')

View File

@ -282,7 +282,23 @@ foreach($financialyear as $item)
<!--<td align="left" id="sn<?php echo $i ?>"><span><?php echo $ap->customername?></span></td>-->
<td align="left" id="totinvoiceamount<?php echo $i ?>"><span><?php echo $ap->totinvoiceamount?></span></td>
<td align="left" id="balancetoreceived<?php echo $i ?>"><span><?php echo $ap->totinvoiceamount- $ap->amountreceived?></span></td>
<td align="left" id="balancetoreceived<?php echo $i ?>">
<span><?php
if($ap->IsActive !=0){
// echo "hi";
// echo '-- '.$ap->IsActive.' ---';
echo $ap->totinvoiceamount- $ap->amountreceived;
}
else{
// echo "hello";
// echo '-- '.$ap->IsActive.' ---';
echo $ap->balancetoreceived;
}
?></span></td>
<td align="left" id="amountreceived<?php echo $i ?>"><span><?php $tot_amount=$tot_amount+round( $ap->amountreceived)?><?php echo $ap->amountreceived?></span></td>
<td>
<a data-toggle="tooltip" ><i class="fa fa-trash" data-toggle="tooltip" title="<?php echo $record->AdjustmentId; ?> - Click here to Delete details" onclick="invoice(<?php echo $i ?>)"></i>&nbsp;&nbsp;&nbsp;</a>
@ -310,7 +326,7 @@ foreach($financialyear as $item)
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="amount"><strong>
<?php echo $tot_amount; ?>
</strong></td>

View File

@ -181,7 +181,23 @@ foreach($financialyear as $item)
<td align="left" id="amountreceived<?php echo $i ?>"><span><?php echo $ap->amountreceived?></span></td>
<!--<td align="left" id="balancetoreceived<?php echo $i ?>"><span><?php echo $ap->totinvoiceamount-$ap->amountreceived?></span></td>-->
<td align="left" id="balancetoreceived<?php echo $i ?>"><span><?php echo $ap->balancetoreceived?></span></td>
<td align="left" id="balancetoreceived<?php echo $i ?>"><span><?php
if($ap->IsActive !=0){
// echo "hi";
// echo '-- '.$ap->IsActive.' ---';
echo $ap->totinvoiceamount-$ap->amountreceived;
}
else
{
// echo "hello";
// echo '-- '.$ap->IsActive.' ---';
echo $ap->balancetoreceived;
}
?></span></td>
<td>
<a data-toggle="tooltip" ><i class="fa fa-trash" data-toggle="tooltip" title="<?php echo $record->AdjustmentId; ?> - Click here to Delete details" onclick="invoice(<?php echo $i ?>)"></i>&nbsp;&nbsp;&nbsp;</a>
</td>

View File

@ -290,7 +290,28 @@ if(!empty($mapping))
<!--<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $rel->file ?>"-->
<td align="left" id="sn<?php echo $i ?>"><span><?php echo $ap->Suppliername?></span></td>
<td align="left" id="tov<?php echo $i ?>"><span><?php echo $ap->Totalpoamount?></span></td>
<td align="left" id="aa<?php echo $i ?>"><span><?php echo $ap->Totalpoamount-$ap->Amountpaid;?></span></td>
<!-- <td align="left" id="aa<?php echo $i ?>"><span><?php echo $ap->Totalpoamount-$ap->Amountpaid;?></span></td>-->
<td align="left" id="aa<?php echo $i ?>">
<span><?php
if($ap->IsActive != 0)
{
//echo "hello";
echo $ap->Totalpoamount - $ap->Amountpaid;
// echo '-- '.$ap->IsActive.' ---';
}
else
{
echo "hi".$ap->Balancetopay;
// echo '-- '.$ap->IsActive.' ---';
}
?>
</span></td>
<td align="left" id="aa<?php echo $i ?>"><span><?php $tot_amount=$tot_amount+round($total);?><?php echo round($total,2)?></span></td>
<?php
if($ap->file !='')

View File

@ -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;

View File

@ -144,10 +144,11 @@
<td style="text-align:right;"><?php echo $l->total;?></td>
<td><?php echo $l->description;?></td>
<td>
<a href="<?php echo base_url(); ?>cashbook/editcashbook?sid=<?php echo $l->id;?>"><i class="fa fa-pencil" data-toggle="tooltip" data-placement="left" title="Click here to view/Edit the ".<?php echo $l->type; ?>." Details "></i>&nbsp;&nbsp;&nbsp;</a>
<a href="<?php echo base_url(); ?>cashbook/editcashbook?sid=<?php echo $l->id;?>">
<i class="fa fa-pencil" data-toggle="tooltip" data-placement="left" title="Click here to view/Edit the".<?php echo $l->type; ?>. "Details"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
</td>
</tr>
<?php

View File

@ -86,7 +86,7 @@ if(!empty($data))
</div>
</div> </section>
</div>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>