bankstatement
This commit is contained in:
parent
7ce38fd82f
commit
67f838d52d
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"git.ignoreLimitWarning": true
|
||||||
|
}
|
||||||
@ -249,6 +249,7 @@ $route['ServicePOBilling'] = "servicepurchaseorder/viewServicePOReportForBilling
|
|||||||
$route['ViewIncomeExpense'] = "cashbook/incomeExpenseList";
|
$route['ViewIncomeExpense'] = "cashbook/incomeExpenseList";
|
||||||
//$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
|
//$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
|
||||||
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
||||||
|
$route['AdvanceList']="cashbook/AdvanceList";
|
||||||
|
|
||||||
/**-----------Application Bank book Routes------------------**/
|
/**-----------Application Bank book Routes------------------**/
|
||||||
|
|
||||||
@ -258,7 +259,7 @@ $route['Bankingstatement']= "cashbook/bankdata";
|
|||||||
$route['Debitstatement']= "cashbook/bankdebitdata";
|
$route['Debitstatement']= "cashbook/bankdebitdata";
|
||||||
$route['Cashstatement']= "cashbook/cashreceipt";
|
$route['Cashstatement']= "cashbook/cashreceipt";
|
||||||
$route['BankingFile']= "cashbook/bankfileupload";
|
$route['BankingFile']= "cashbook/bankfileupload";
|
||||||
$route['Filelist']="cashbook/filelist";
|
//$route['Filelist']="cashbook/filelist";
|
||||||
//$route['Bankingrecord']= "cashbook/bankdata";
|
//$route['Bankingrecord']= "cashbook/bankdata";
|
||||||
$route['Bankamountpaid']= "cashbook/amountpaid";
|
$route['Bankamountpaid']= "cashbook/amountpaid";
|
||||||
$route['Bankamountreceived']= "cashbook/amountreceived";
|
$route['Bankamountreceived']= "cashbook/amountreceived";
|
||||||
|
|||||||
508
application/controllers/cashbook.php
Executable file → Normal file
508
application/controllers/cashbook.php
Executable file → Normal file
@ -189,6 +189,7 @@ class cashbook extends BaseController
|
|||||||
function addNewIncomeExpenseLoad()
|
function addNewIncomeExpenseLoad()
|
||||||
{
|
{
|
||||||
$data['dropdownvalues'] = $this->cashbook_model->getAccounTypes();
|
$data['dropdownvalues'] = $this->cashbook_model->getAccounTypes();
|
||||||
|
$data['getsupplier'] = $this->cashbook_model->getsupplier();
|
||||||
//$this->global['pageTitle'] = 'Resico : Cash Book: Add New Income Expense ';
|
//$this->global['pageTitle'] = 'Resico : Cash Book: Add New Income Expense ';
|
||||||
$this->global['pageTitle'] = $this->CompanyName.': Cash Book: Add New Income Expense ';
|
$this->global['pageTitle'] = $this->CompanyName.': Cash Book: Add New Income Expense ';
|
||||||
$this->loadViews("addnewIncomeExpense", $this->global, $data , NULL);
|
$this->loadViews("addnewIncomeExpense", $this->global, $data , NULL);
|
||||||
@ -312,7 +313,7 @@ class cashbook extends BaseController
|
|||||||
$balance=$sheet->getCell('H'.$x)->getValue();
|
$balance=$sheet->getCell('H'.$x)->getValue();
|
||||||
|
|
||||||
// $IsActive=0;
|
// $IsActive=0;
|
||||||
$filedataupload= array('reportdate'=>$Date1,'valuedate'=>$Date2,'chequeNo'=>$cod,'Narration'=>$narration,'Cod'=> $chqno,'Debit'=>$debit,'Credit'=>$credit,'Balance'=>$balance,'Bankname'=>$bank);
|
$filedataupload= array('reportdate'=>$Date1,'valuedate'=>$Date2,'chequeNo'=>$cod,'Narration'=>$narration,'Cod'=> $chqno,'Debit'=>$debit,'Credit'=>$credit,'cbalancetocleared'=>$credit,'Balance'=>$balance,'Bankname'=>$bank);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -339,54 +340,34 @@ class cashbook extends BaseController
|
|||||||
//function addIncomeExpense()
|
//function addIncomeExpense()
|
||||||
function addReceipt()
|
function addReceipt()
|
||||||
{
|
{
|
||||||
$bankdate = $this->input->post('bankdate');
|
|
||||||
$bankid = $this->input->post('bakid');
|
$bankid = $this->input->post('bakid');
|
||||||
$remaindebitamount=$this->input->post('remaindebitamount');
|
$remaindebitamount=$this->input->post('remaindebitamount');
|
||||||
$remaincreditamount=$this->input->post('remaincreditamount');
|
$remaincreditamount=$this->input->post('remaincreditamount');
|
||||||
$amount = $this->input->post('bankamount');
|
//$amount = $this->input->post('bankamount');//need to ask
|
||||||
$amounttype = $this->input->post('type');
|
$bankamounttype = $this->input->post('type');
|
||||||
$totalbankamount = $this->input->post('totalbankamount');
|
$totalbankamount = $this->input->post('totalbankamount');
|
||||||
$alreadypaid=$this->input->post('alreadydebitpaid');
|
$alreadypaid=$this->input->post('alreadydebitpaid');
|
||||||
$directamount = $this->input->post('totalamount');
|
$directamount = $this->input->post('totalamount');
|
||||||
$debitamount=$this->input->post('debitamount');
|
//$debitamount=$this->input->post('debitamount');// need to ask
|
||||||
$alreadycreditpaid=$this->input->post('alreadycreditpaid');
|
$alreadycreditpaid=$this->input->post('alreadycreditpaid');
|
||||||
$bankorcash=$this->input->post('borc');
|
$bankorcash=$this->input->post('borc');
|
||||||
$total=$directamount+$alreadypaid;
|
$total=$directamount+$alreadypaid;
|
||||||
$ctotal=$directamount+$alreadycreditpaid;
|
$ctotal=$directamount+$alreadycreditpaid;
|
||||||
$updateBalancetocleared= $remaindebitamount-$directamount;
|
$updateBalancetocleared= $remaindebitamount-$directamount;
|
||||||
$updatecbalancetocleared= $remaincreditamount-$directamount;
|
$updatecbalancetocleared= $remaincreditamount-$directamount;
|
||||||
if($amounttype==CREDIT)
|
|
||||||
{
|
|
||||||
echo "ad";
|
|
||||||
$type=RECEIPT;
|
|
||||||
$bankamounttype=CREDIT;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "ad2";
|
|
||||||
$type=PAYMENT;
|
|
||||||
$bankamounttype=DEBIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$accounttype = $this->input->post('myradio');
|
$accounttype = 'RECEIPT';
|
||||||
//if($accounttype == 1)
|
$accountcode = $this->input->post('accode');
|
||||||
//{
|
$date = $this->input->post('Date');
|
||||||
$accounttype = 'RECEIPT';
|
$date = date_create($date);//,'Y-m-d');
|
||||||
//}
|
$date = date_format($date,'Y-m-d');
|
||||||
//else
|
$towhome = $this->input->post('towhome');
|
||||||
//{
|
$supplier = $this->input->post('supplier');
|
||||||
//$accounttype = 'PAYMENT';
|
|
||||||
//}
|
|
||||||
$accountcode = $this->input->post('accode');
|
|
||||||
$date = $this->input->post('Date');
|
|
||||||
$date = date_create($date);//,'Y-m-d');
|
|
||||||
$date = date_format($date,'Y-m-d');
|
|
||||||
$towhome = $this->input->post('towhome');
|
|
||||||
$supplier = $this->input->post('supplier');
|
|
||||||
|
|
||||||
$gsttoggle = $this->input->post('gsttoggle');
|
$gsttoggle = $this->input->post('gsttoggle');
|
||||||
$invoiceno = null;
|
$invoiceno = null;
|
||||||
$merchantname = null;
|
$merchantname = null;
|
||||||
$mergstno = null;
|
$mergstno = null;
|
||||||
$hsn = null;
|
$hsn = null;
|
||||||
@ -407,9 +388,9 @@ class cashbook extends BaseController
|
|||||||
$igst = $this->input->post('IGST');
|
$igst = $this->input->post('IGST');
|
||||||
}
|
}
|
||||||
|
|
||||||
//$totalamount = $this->input->post('totalamount');
|
$totalamount = $this->input->post('totalamount');
|
||||||
$cashbookamount=$this->input->post('totalamount1');
|
// $cashbookamount=$this->input->post('totalamount1');
|
||||||
$totalamount=$directamount+$cashbookamount;
|
// $totalamount=$directamount+$cashbookamount;
|
||||||
|
|
||||||
$description = $this->input->post('description');
|
$description = $this->input->post('description');
|
||||||
if(empty($description)){$description = 'NA';}
|
if(empty($description)){$description = 'NA';}
|
||||||
@ -427,13 +408,13 @@ class cashbook extends BaseController
|
|||||||
$document = $path.$fs;
|
$document = $path.$fs;
|
||||||
|
|
||||||
}
|
}
|
||||||
if($bankorcash==Bank)
|
if($bankorcash=='Bank')
|
||||||
{
|
{
|
||||||
$option=Bank;
|
$option='Bank';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$option=Cash;
|
$option='Cash';
|
||||||
}
|
}
|
||||||
$balance=$totalbankamount-$totalamount;
|
$balance=$totalbankamount-$totalamount;
|
||||||
$IsActive=1;
|
$IsActive=1;
|
||||||
@ -459,44 +440,52 @@ class cashbook extends BaseController
|
|||||||
{
|
{
|
||||||
$statu='OPEN';
|
$statu='OPEN';
|
||||||
}
|
}
|
||||||
$debitbalance=$totalbankamount-$total;
|
// $debitbalance=$totalbankamount-$total;
|
||||||
if($debitbalance==0)
|
// if($debitbalance==0)
|
||||||
|
|
||||||
{
|
// {
|
||||||
$statu1='CLOSE';
|
// $statu1='CLOSE';
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
$statu1='OPEN';
|
// $statu1='OPEN';
|
||||||
}
|
// }
|
||||||
$isactive=1;
|
// $isactive=1;
|
||||||
//$clearbalance=$totalbankamount-
|
// //$clearbalance=$totalbankamount-
|
||||||
if($amounttype=='CREDIT')
|
// if($amounttype=='CREDIT')
|
||||||
{
|
// {
|
||||||
$cashbookstatus1= array('cclearbalance'=>$ctotal,'cbalancetocleared'=>$updatecbalancetocleared,'cstatus'=>$statu,'IsActive'=>$isactive);
|
$cashbookstatus1= array('cclearbalance'=>$ctotal,'cbalancetocleared'=>$updatecbalancetocleared,'cstatus'=>$statu);
|
||||||
//print_r($cashbookstatus1);
|
//print_r($cashbookstatus1);
|
||||||
//die();
|
//die();
|
||||||
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
$cashbookstatus = array('Clearbalance'=>$total,'Balancetocleared'=>$updateBalancetocleared,'Status'=>$statu1,'IsActive'=>$isactive);
|
// $cashbookstatus = array('Clearbalance'=>$total,'Balancetocleared'=>$updateBalancetocleared,'Status'=>$statu1);
|
||||||
$res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
// $res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = $this->cashbook_model->saveIncomeExpense($addincomexpense);
|
$res = $this->cashbook_model->saveIncomeExpense($addincomexpense);
|
||||||
if( $res == 1 ){
|
if( $res >= 1 ){
|
||||||
//echo "<script>alert('Saved Successfully!');window.location.href='ViewIncomeExpense';</script>";
|
|
||||||
echo "<script>alert('Saved Successfully!');</script>";
|
|
||||||
|
|
||||||
if($amounttype == ' ')//Redirct To Listing Screen
|
|
||||||
|
if($bankorcash=='Bank')//Redirct To Bank Report Screen
|
||||||
{
|
{
|
||||||
redirect('ViewIncomeExpense','refresh');
|
|
||||||
|
|
||||||
|
echo "<script>alert('Saved Successfully!');
|
||||||
|
window.location.href='bankdata';</script>";
|
||||||
|
|
||||||
}
|
}
|
||||||
else if($amounttype != ' ')//Redirct To Bank Report Screen
|
else
|
||||||
{
|
{
|
||||||
redirect('Bankingstatement','refresh');
|
|
||||||
|
//Redirct To Listing Screen
|
||||||
|
echo "<script>alert('Saved Successfully!');
|
||||||
|
window.location.href='incomeExpenseList';</script>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -514,6 +503,34 @@ class cashbook extends BaseController
|
|||||||
*/
|
*/
|
||||||
function addPayment()
|
function addPayment()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$bankid = $this->input->post('hideBankID');
|
||||||
|
$remaindebitamount=$this->input->post('hideRemainDebitAmount');
|
||||||
|
//$remaincreditamount=$this->input->post('remaincreditamount');
|
||||||
|
//$amount = $this->input->post('bankamount');//need to ask
|
||||||
|
$amounttype = $this->input->post('hideBAtype');
|
||||||
|
$totalbankamount = $this->input->post('hideTotalBankAmount');
|
||||||
|
$alreadypaid=$this->input->post('hideAlreadyDebitPaid');
|
||||||
|
$directamount = $this->input->post('Paymenttotalamount');
|
||||||
|
//$debitamount=$this->input->post('debitamount');// need to ask
|
||||||
|
//$alreadycreditpaid=$this->input->post('alreadycreditpaid');
|
||||||
|
$bankorcash=$this->input->post('hideborc');
|
||||||
|
$total=$directamount+$alreadypaid;
|
||||||
|
//$ctotal=$directamount+$alreadycreditpaid;
|
||||||
|
$updateBalancetocleared= $remaindebitamount-$directamount;
|
||||||
|
//$updatecbalancetocleared= $remaincreditamount-$directamount;
|
||||||
|
// if($amounttype==CREDIT)
|
||||||
|
// {
|
||||||
|
// $type=RECEIPT;
|
||||||
|
// $bankamounttype=CREDIT;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
$type=PAYMENT;
|
||||||
|
$bankamounttype=DEBIT;
|
||||||
|
// }
|
||||||
|
|
||||||
$count = $this->input->post('hidecounter');
|
$count = $this->input->post('hidecounter');
|
||||||
$constantcount = $this->input->post('hideconstant');
|
$constantcount = $this->input->post('hideconstant');
|
||||||
|
|
||||||
@ -522,35 +539,10 @@ class cashbook extends BaseController
|
|||||||
$date = date_create($date);//,'Y-m-d');
|
$date = date_create($date);//,'Y-m-d');
|
||||||
$date = date_format($date,'Y-m-d');
|
$date = date_format($date,'Y-m-d');
|
||||||
$paidto = $this->input->post('PaymentPaidto');
|
$paidto = $this->input->post('PaymentPaidto');
|
||||||
$supplier = $this->input->post('supplier');
|
$supplier = $this->input->post('Paymentsupplier');
|
||||||
$vouchercode = $this->input->post('Paymentvouchercode');
|
$vouchercode = $this->input->post('Paymentvouchercode');
|
||||||
|
|
||||||
$bankdate = $this->input->post('bankdate');
|
|
||||||
$bankid = $this->input->post('bakid');
|
|
||||||
$remaindebitamount=$this->input->post('remaindebitamount');
|
|
||||||
$remaincreditamount=$this->input->post('remaincreditamount');
|
|
||||||
$amount = $this->input->post('bankamount');
|
|
||||||
$amounttype = $this->input->post('type');
|
|
||||||
$totalbankamount = $this->input->post('totalbankamount');
|
|
||||||
$alreadypaid=$this->input->post('alreadydebitpaid');
|
|
||||||
$directamount = $this->input->post('totalamount');
|
|
||||||
$debitamount=$this->input->post('debitamount');
|
|
||||||
$alreadycreditpaid=$this->input->post('alreadycreditpaid');
|
|
||||||
$bankorcash=$this->input->post('borc');
|
|
||||||
$total=$directamount+$alreadypaid;
|
|
||||||
$ctotal=$directamount+$alreadycreditpaid;
|
|
||||||
$updateBalancetocleared= $remaindebitamount-$directamount;
|
|
||||||
$updatecbalancetocleared= $remaincreditamount-$directamount;
|
|
||||||
if($amounttype==CREDIT)
|
|
||||||
{
|
|
||||||
$type=RECEIPT;
|
|
||||||
$bankamounttype=CREDIT;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$type=PAYMENT;
|
|
||||||
$bankamounttype=DEBIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//echo $count.$consantcount;
|
//echo $count.$consantcount;
|
||||||
@ -572,8 +564,8 @@ class cashbook extends BaseController
|
|||||||
$cgst = $this->input->post('PaymentCGST');
|
$cgst = $this->input->post('PaymentCGST');
|
||||||
$igst = $this->input->post('PaymentIGST');
|
$igst = $this->input->post('PaymentIGST');
|
||||||
|
|
||||||
$cashbookamount=$this->input->post('totalamount1');
|
// $cashbookamount=$this->input->post('totalamount1');
|
||||||
$totalamount=$directamount+$cashbookamount;
|
// $totalamount=$directamount+$cashbookamount; where its comes from
|
||||||
//$totalamount = $this->input->post('Paymenttotalamount');
|
//$totalamount = $this->input->post('Paymenttotalamount');
|
||||||
$description = $this->input->post('Paymentdescription');
|
$description = $this->input->post('Paymentdescription');
|
||||||
|
|
||||||
@ -615,8 +607,64 @@ class cashbook extends BaseController
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
$addPayments = array('type'=>$accounttype,'account_code'=>$Paymentaccode,'date'=>$date,'towhom'=>$paidto,'invoice_no'=>$vouchercode,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$totalamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by,'paymentsubdesc'=>$subdescription);
|
|
||||||
$res = $this->cashbook_model->saveIncomeExpense($addPayments);
|
if($bankorcash=='Bank')
|
||||||
|
{ $option='Bank'; }
|
||||||
|
else { $option='Cash'; }
|
||||||
|
$balance=$totalbankamount-$totalamount;
|
||||||
|
$IsActive=1;
|
||||||
|
|
||||||
|
$addPayments = array('type'=>$accounttype,'account_code'=>$Paymentaccode,'date'=>$date,'towhom'=>$paidto,'Supplier_id'=>$supplier,'invoice_no'=>$vouchercode,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$directamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by,'paymentsubdesc'=>$subdescription,'cashtype'=>$option,'bankid'=>$bankid,'totalbankamount'=>$totalbankamount,'balance'=>$balance,'gststatus'=>(!empty($gsttoggle)?'1':'0'),'amounttype'=>$amounttype,'IsActive'=>$IsActive);
|
||||||
|
$res = $this->cashbook_model->saveIncomeExpense($addPayments);
|
||||||
|
|
||||||
|
if($balance=='0')
|
||||||
|
{
|
||||||
|
$stat='CLOSE';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stat='OPEN';
|
||||||
|
}
|
||||||
|
// $creditbalance=$totalbankamount-$ctotal;
|
||||||
|
// //echo $creditbalance;
|
||||||
|
// //die();
|
||||||
|
// if($creditbalance==0)
|
||||||
|
// {
|
||||||
|
// $statu='CLOSE';
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// $statu='OPEN';
|
||||||
|
// }
|
||||||
|
$debitbalance=$totalbankamount-$total;
|
||||||
|
if($debitbalance==0)
|
||||||
|
|
||||||
|
{
|
||||||
|
$statu1='CLOSE';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$statu1='OPEN';
|
||||||
|
}
|
||||||
|
$isactive=1;
|
||||||
|
|
||||||
|
// if($amounttype=='CREDIT')
|
||||||
|
// {
|
||||||
|
// $cashbookstatus1= array('cclearbalance'=>$ctotal,'cbalancetocleared'=>$updatecbalancetocleared,'cstatus'=>$statu);
|
||||||
|
//print_r($cashbookstatus1);
|
||||||
|
//die();
|
||||||
|
// $res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
$cashbookstatus = array('Clearbalance'=>$total,'Balancetocleared'=>$updateBalancetocleared,'Status'=>$statu1);
|
||||||
|
$res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -624,9 +672,64 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
$accountcode = '999';
|
$accountcode = '999';
|
||||||
$subdescription = 'Multiple';
|
$subdescription = 'Multiple';
|
||||||
$addPayments = array('type'=>$accounttype,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$paidto,'invoice_no'=>$vouchercode,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$totalamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by,'paymentsubdesc'=>$subdescription);
|
|
||||||
|
if($bankorcash=='Bank')
|
||||||
|
{ $option='Bank'; }
|
||||||
|
else { $option='Cash'; }
|
||||||
|
$balance=$totalbankamount-$totalamount;
|
||||||
|
$IsActive=1;
|
||||||
|
|
||||||
|
$addPayments = array('type'=>$accounttype,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$paidto,'Supplier_id'=>$supplier,'invoice_no'=>$vouchercode,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$directamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by,'paymentsubdesc'=>$subdescription,'cashtype'=>$option,'bankid'=>$bankid,'totalbankamount'=>$totalbankamount,'balance'=>$balance,'gststatus'=>(!empty($gsttoggle)?'1':'0'),'amounttype'=>$amounttype,'IsActive'=>$IsActive);
|
||||||
$res = $this->cashbook_model->saveIncomeExpense($addPayments);
|
$res = $this->cashbook_model->saveIncomeExpense($addPayments);
|
||||||
|
|
||||||
|
if($balance=='0')
|
||||||
|
{
|
||||||
|
$stat='CLOSE';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stat='OPEN';
|
||||||
|
}
|
||||||
|
// $creditbalance=$totalbankamount-$ctotal;
|
||||||
|
// //echo $creditbalance;
|
||||||
|
// //die();
|
||||||
|
// if($creditbalance==0)
|
||||||
|
// {
|
||||||
|
// $statu='CLOSE';
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// $statu='OPEN';
|
||||||
|
// }
|
||||||
|
$debitbalance=$totalbankamount-$total;
|
||||||
|
if($debitbalance==0)
|
||||||
|
|
||||||
|
{
|
||||||
|
$statu1='CLOSE';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$statu1='OPEN';
|
||||||
|
}
|
||||||
|
$isactive=1;
|
||||||
|
|
||||||
|
// if($amounttype=='CREDIT')
|
||||||
|
// {
|
||||||
|
// $cashbookstatus1= array('cclearbalance'=>$ctotal,'cbalancetocleared'=>$updatecbalancetocleared,'cstatus'=>$statu);
|
||||||
|
//print_r($cashbookstatus1);
|
||||||
|
//die();
|
||||||
|
// $res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
$cashbookstatus = array('Clearbalance'=>$total,'Balancetocleared'=>$updateBalancetocleared,'Status'=>$statu1);
|
||||||
|
$res23 = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$Paymentaccode = '';
|
$Paymentaccode = '';
|
||||||
$subdescription = '';
|
$subdescription = '';
|
||||||
$Paymentamount = '';
|
$Paymentamount = '';
|
||||||
@ -682,11 +785,31 @@ class cashbook extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
}//new else
|
}//new else
|
||||||
if( $res >= 1 ){
|
// if( $res >= 1 ){
|
||||||
echo "<script>alert('Saved Successfully!');
|
// echo "<script>alert('Saved Successfully!');
|
||||||
window.location.href='incomeExpenseList';</script>";
|
// window.location.href='incomeExpenseList';</script>";
|
||||||
|
// }
|
||||||
|
if( $res >= 1 ){
|
||||||
|
|
||||||
|
|
||||||
|
if($bankorcash=='Bank')//Redirct To Bank Report Screen
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
echo "<script>alert('Saved Successfully!');
|
||||||
|
window.location.href='bankdata';</script>";
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
//Redirct To Listing Screen
|
||||||
|
echo "<script>alert('Saved Successfully!');
|
||||||
|
window.location.href='incomeExpenseList';</script>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function cashpayment()
|
public function cashpayment()
|
||||||
@ -865,7 +988,7 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
$data['data'] = $this->cashbook_model->getAdvanceList($aid);
|
$data['data'] = $this->cashbook_model->getAdvanceList($aid);
|
||||||
//print_r($data['dropdownvalues']);die();
|
//print_r($data['dropdownvalues']);die();
|
||||||
$this->global['pageTitle'] = 'Siddharth : Cash Book: View Income Expense ';
|
$this->global['pageTitle'] = $this->CompanyName.' : Cash Book: View Income Expense ';
|
||||||
$this->loadViews("viewIndIncomeExpense", $this->global, $data , NULL);
|
$this->loadViews("viewIndIncomeExpense", $this->global, $data , NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -875,7 +998,7 @@ class cashbook extends BaseController
|
|||||||
// $this->global['pageTitle'] = 'Siddharth : Cash Book: Listing';
|
// $this->global['pageTitle'] = 'Siddharth : Cash Book: Listing';
|
||||||
|
|
||||||
// $this->loadViews("income_expense_list", $this->global, $data , NULL);
|
// $this->loadViews("income_expense_list", $this->global, $data , NULL);
|
||||||
$this->global['pageTitle'] = 'Siddharth : Cash Book: Listing';
|
$this->global['pageTitle'] = $this->CompanyName.' : Cash Book: Advance List';
|
||||||
|
|
||||||
if ($this->input->post('btn_submit')) {
|
if ($this->input->post('btn_submit')) {
|
||||||
|
|
||||||
@ -938,8 +1061,10 @@ class cashbook extends BaseController
|
|||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
$acc_createddt = $dt->format('Y-m-d H:i:s');
|
$acc_createddt = $dt->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
//$cashbookdatas = array('type'=>$acc_type,'code'=>$acc_code,'name'=>$acc_name,'description'=>$acc_desc,'status'=>$acc_status,'created_on'=>$acc_createddt);
|
$cashbookdatas = array('type'=>$acc_type,'code'=>$acc_code,'name'=>$acc_name,'description'=>$acc_desc,'status'=>$acc_status,'created_on'=>$acc_createddt);
|
||||||
$cashbookdatas = array('type'=>$acc_type,'code'=>$acc_code,'name'=>$acc_name,'accountname'=>$acc_pname,'categories'=>$acc_categories,'description'=>$acc_desc,'status'=>$acc_status,'created_on'=>$acc_createddt);
|
/** accountname and category fields aree not available so that comment */
|
||||||
|
//$cashbookdatas = array('type'=>$acc_type,'code'=>$acc_code,'name'=>$acc_name,'accountname'=>$acc_pname,'categories'=>$acc_categories,'description'=>$acc_desc,'status'=>$acc_status,'created_on'=>$acc_createddt);
|
||||||
|
|
||||||
$result = $this->cashbook_model->Cashbook($cashbookdatas);
|
$result = $this->cashbook_model->Cashbook($cashbookdatas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -947,7 +1072,6 @@ class cashbook extends BaseController
|
|||||||
echo "Successfully Saved!";
|
echo "Successfully Saved!";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For edit cashbook screen
|
* For edit cashbook screen
|
||||||
*/
|
*/
|
||||||
@ -1101,7 +1225,7 @@ class cashbook extends BaseController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$updatedepit=$poamnt+$cashamnt;
|
$updatedepit=$poamnt+$cashamnt;
|
||||||
$cashbookstatus = array('Clearbalance'=>$updatedepit,'Status'=>$status,'IsActive'=>$isactive);
|
$cashbookstatus = array('Clearbalance'=>$updatedepit,'Status'=>$status);
|
||||||
// print_r($cashbookstatus);
|
// print_r($cashbookstatus);
|
||||||
//die();
|
//die();
|
||||||
$res = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
$res = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
||||||
@ -1110,8 +1234,12 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
//if( $res == 1 ){
|
//if( $res == 1 ){
|
||||||
echo "<script>alert('Saved Successfully!');window.location.href='ViewIncomeExpense';</script>";
|
// echo "<script>alert('Saved Successfully!');window.location.href='ViewIncomeExpense';</script>";
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
echo "<script>alert('Saved Successfully!');
|
||||||
|
window.location.href='incomeExpenseList';
|
||||||
|
</script>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1128,7 +1256,7 @@ class cashbook extends BaseController
|
|||||||
$date = date_format($date,'Y-m-d');
|
$date = date_format($date,'Y-m-d');
|
||||||
|
|
||||||
$towhome1 = $this->input->post('PaymentPaidto');
|
$towhome1 = $this->input->post('PaymentPaidto');
|
||||||
$supplier = $this->input->post('supplier');
|
$supplier = $this->input->post('Paymentsupplier');
|
||||||
$Invoiceno1 = $this->input->post('Paymentvouchercode');
|
$Invoiceno1 = $this->input->post('Paymentvouchercode');
|
||||||
$merchant1 = $this->input->post('Paymentmerchant');
|
$merchant1 = $this->input->post('Paymentmerchant');
|
||||||
$Merchantgst1 = $this->input->post('PaymentMerchantgst');
|
$Merchantgst1 = $this->input->post('PaymentMerchantgst');
|
||||||
@ -1141,6 +1269,11 @@ class cashbook extends BaseController
|
|||||||
$description1 = $this->input->post('Paymentdescription');
|
$description1 = $this->input->post('Paymentdescription');
|
||||||
$deleteflag = $this->input->post('deleteflag');
|
$deleteflag = $this->input->post('deleteflag');
|
||||||
$oldfile = $this->input->post('oldfile');
|
$oldfile = $this->input->post('oldfile');
|
||||||
|
$amounttype = $this->input->post('amounttype');
|
||||||
|
$bankid=$this->input->post('bankid');
|
||||||
|
$normalid=$this->input->post('normalid');
|
||||||
|
$bankamount=$this->input->post('bankamount');
|
||||||
|
$gsttoggle = $this->input->post('gsttoggle');
|
||||||
$document =null;
|
$document =null;
|
||||||
|
|
||||||
|
|
||||||
@ -1186,8 +1319,52 @@ class cashbook extends BaseController
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
$UpdatePayment = array('type'=>$option,'account_code'=>$Paymentaccode,'date'=>$date,'towhom'=>$towhome1,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'description'=>$description1,'document'=>$document,'paymentsubdesc'=>$subdescription);
|
$UpdatePayment = array('type'=>$option,'account_code'=>$Paymentaccode,'date'=>$date,'towhom'=>$towhome1,'Supplier_id'=>$supplier,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'description'=>$description1,'document'=>$document,'paymentsubdesc'=>$subdescription,'gststatus'=>(!empty($gsttoggle)?'1':'0'),'description'=>$description1,'document'=>$document);
|
||||||
$res = $this->cashbook_model->updatepaymentmaster($UpdatePayment,$id1);
|
$res = $this->cashbook_model->updatepaymentmaster($UpdatePayment,$id1);
|
||||||
|
$cashbookamount=$this->cashbook_model->cashbookamount($bankid);
|
||||||
|
$invoiceamount=$this->cashbook_model->invoiceamonut($bankid);
|
||||||
|
$poamount=$this->cashbook_model->poamonut($bankid);
|
||||||
|
foreach($invoiceamount as $ia)
|
||||||
|
{
|
||||||
|
$invam=$ia->amountreceived;
|
||||||
|
}
|
||||||
|
foreach($poamount as $pa)
|
||||||
|
{
|
||||||
|
$poamnt=$pa->amountpaid;
|
||||||
|
}
|
||||||
|
foreach($cashbookamount as $ca)
|
||||||
|
{
|
||||||
|
$cashamnt=$ca->total;
|
||||||
|
}
|
||||||
|
if($bankamount==$cashamnt)
|
||||||
|
{
|
||||||
|
$status='CLOSE';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$status='OPEN';
|
||||||
|
}
|
||||||
|
//print_r($invoiceamount);
|
||||||
|
if($amounttype=='CREDIT')
|
||||||
|
{
|
||||||
|
$updatecredit=$invam+$cashamnt;
|
||||||
|
$isactive=0;
|
||||||
|
$cashbookstatus1= array('cclearbalance'=>$updatecredit,'cstatus'=>$status,'IsActive'=>$isactive);
|
||||||
|
//print_r($cashbookstatus1);
|
||||||
|
//die();
|
||||||
|
|
||||||
|
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$updatedepit=$poamnt+$cashamnt;
|
||||||
|
$cashbookstatus = array('Clearbalance'=>$updatedepit,'Status'=>$status);
|
||||||
|
// print_r($cashbookstatus);
|
||||||
|
//die();
|
||||||
|
$res = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1196,9 +1373,55 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
$accountcode = '999';
|
$accountcode = '999';
|
||||||
$subdescription0 = 'Multiple';
|
$subdescription0 = 'Multiple';
|
||||||
$UpdatePayment = array('type'=>$option,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$towhome1,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'description'=>$description1,'document'=>$document,'paymentsubdesc'=>$subdescription0);
|
$UpdatePayment = array('type'=>$option,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$towhome1,'Supplier_id'=>$supplier,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'description'=>$description1,'document'=>$document,'paymentsubdesc'=>$subdescription0,'gststatus'=>(!empty($gsttoggle)?'1':'0'),'description'=>$description1,'document'=>$document);
|
||||||
$res = $this->cashbook_model->updatepaymentmaster($UpdatePayment,$id1);
|
$res = $this->cashbook_model->updatepaymentmaster($UpdatePayment,$id1);
|
||||||
|
|
||||||
|
$cashbookamount=$this->cashbook_model->cashbookamount($bankid);
|
||||||
|
$invoiceamount=$this->cashbook_model->invoiceamonut($bankid);
|
||||||
|
$poamount=$this->cashbook_model->poamonut($bankid);
|
||||||
|
foreach($invoiceamount as $ia)
|
||||||
|
{
|
||||||
|
$invam=$ia->amountreceived;
|
||||||
|
}
|
||||||
|
foreach($poamount as $pa)
|
||||||
|
{
|
||||||
|
$poamnt=$pa->amountpaid;
|
||||||
|
}
|
||||||
|
foreach($cashbookamount as $ca)
|
||||||
|
{
|
||||||
|
$cashamnt=$ca->total;
|
||||||
|
}
|
||||||
|
if($bankamount==$cashamnt)
|
||||||
|
{
|
||||||
|
$status='CLOSE';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$status='OPEN';
|
||||||
|
}
|
||||||
|
//print_r($invoiceamount);
|
||||||
|
if($amounttype=='CREDIT')
|
||||||
|
{
|
||||||
|
$updatecredit=$invam+$cashamnt;
|
||||||
|
$isactive=0;
|
||||||
|
$cashbookstatus1= array('cclearbalance'=>$updatecredit,'cstatus'=>$status,'IsActive'=>$isactive);
|
||||||
|
//print_r($cashbookstatus1);
|
||||||
|
//die();
|
||||||
|
|
||||||
|
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$updatedepit=$poamnt+$cashamnt;
|
||||||
|
$cashbookstatus = array('Clearbalance'=>$updatedepit,'Status'=>$status);
|
||||||
|
// print_r($cashbookstatus);
|
||||||
|
//die();
|
||||||
|
$res = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for($i=1;$i<=$constantcount;$i++){
|
for($i=1;$i<=$constantcount;$i++){
|
||||||
|
|
||||||
$varname = 'mydata'.$i;
|
$varname = 'mydata'.$i;
|
||||||
@ -1287,7 +1510,7 @@ class cashbook extends BaseController
|
|||||||
echo "<script>alert('Saved Successfully!');
|
echo "<script>alert('Saved Successfully!');
|
||||||
window.location.href='incomeExpenseList';
|
window.location.href='incomeExpenseList';
|
||||||
</script>";
|
</script>";
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bankdata()
|
public function bankdata()
|
||||||
@ -1312,6 +1535,8 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function bankdebitdata()
|
public function bankdebitdata()
|
||||||
{
|
{
|
||||||
$this->global['pageTitle'] = $this->CompanyName.' : Bank Debit Report';
|
$this->global['pageTitle'] = $this->CompanyName.' : Bank Debit Report';
|
||||||
@ -1346,18 +1571,32 @@ class cashbook extends BaseController
|
|||||||
$this->loadViews("bankinvoice", $this->global,$data,NULL);
|
$this->loadViews("bankinvoice", $this->global,$data,NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
public function filelist()
|
function IGRFilelist()
|
||||||
{
|
{
|
||||||
$pono= $this->input->post('pono');
|
$igrno= $this->input->post('igrno');
|
||||||
$data = $this->cashbook_model->debitimage($pono);
|
$pono =$this->input->post('pono');
|
||||||
echo json_encode($data);
|
$igrsingle = $this->cashbook_model->igrmastersingle($igrno,$pono);
|
||||||
|
$igrmultiple =$this->cashbook_model->igrmastermultiple($igrno,$pono);
|
||||||
|
$data = array_merge($igrsingle,$igrmultiple);
|
||||||
|
echo json_encode($data);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public function filelist()
|
||||||
|
|
||||||
|
{
|
||||||
|
$igrno= $this->input->post('igrno');
|
||||||
|
$pono =$this->input->post('pono');
|
||||||
|
$data = $this->cashbook_model->debitimage($igrno,$pono);
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mappingpo()
|
public function mappingpo()
|
||||||
{
|
{
|
||||||
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Debited Settlements';
|
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Debited Settlements';
|
||||||
$SupplierName = $this->input->post('SupplierName');
|
$SupplierName = $this->input->post('SupplierName');
|
||||||
$fdate = $this->input->post('from_date');
|
$fdate = $this->input->post('from_date');
|
||||||
$tdate = $this->input->post('to_date');
|
$tdate = $this->input->post('to_date');
|
||||||
$bankid= $_GET['d'];
|
$bankid= $_GET['d'];
|
||||||
@ -1427,7 +1666,7 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
// $this->global['pageTitle'] = 'Siddharth : mappingcredit';
|
// $this->global['pageTitle'] = 'Siddharth : mappingcredit';
|
||||||
$this->global['pageTitle'] = 'Siddharth : Bank Report - Credited Details ';
|
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Credited Details ';
|
||||||
$SupplierName = $this->input->post('SupplierName');
|
$SupplierName = $this->input->post('SupplierName');
|
||||||
$fdate = $this->input->post('from_date');
|
$fdate = $this->input->post('from_date');
|
||||||
$tdate = $this->input->post('to_date');
|
$tdate = $this->input->post('to_date');
|
||||||
@ -1437,9 +1676,10 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function receipt()
|
public function receipt()
|
||||||
{
|
{
|
||||||
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Store Debited Details';
|
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Store Debited Details';
|
||||||
|
|
||||||
$check = $this->input->post('check');
|
$check = $this->input->post('check');
|
||||||
$rw = $this->input->post('rw');
|
$rw = $this->input->post('rw');
|
||||||
$date = $this->input->post('podate');
|
$date = $this->input->post('podate');
|
||||||
@ -1495,7 +1735,7 @@ class cashbook extends BaseController
|
|||||||
}
|
}
|
||||||
$earlypaid = 0;
|
$earlypaid = 0;
|
||||||
//echo $earlypaid;
|
//echo $earlypaid;
|
||||||
$earlypaid = $this->cashbook_model->getearlyamount($pono);
|
$earlypaid = $this->cashbook_model->getearlyamount($igrlineitem);
|
||||||
if(empty($earlypaid))
|
if(empty($earlypaid))
|
||||||
{
|
{
|
||||||
$ePay=0;
|
$ePay=0;
|
||||||
@ -1520,7 +1760,7 @@ class cashbook extends BaseController
|
|||||||
$podata = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IGRLineItemNo'=>$igrlineitem);
|
$podata = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IGRLineItemNo'=>$igrlineitem);
|
||||||
//die();
|
//die();
|
||||||
|
|
||||||
$result3 = $this->cashbook_model->getpono($pono);
|
$result3 = $this->cashbook_model->getpono($igrlineitem);
|
||||||
|
|
||||||
$resultn = $this->cashbook_model->mappingpo($podata1);
|
$resultn = $this->cashbook_model->mappingpo($podata1);
|
||||||
if(count($result3)<=0)
|
if(count($result3)<=0)
|
||||||
@ -1532,7 +1772,7 @@ class cashbook extends BaseController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//echo "update";
|
//echo "update";
|
||||||
$result3 = $this->cashbook_model->poupdate($podata,$pono);
|
$result3 = $this->cashbook_model->poupdate($podata,$igrlineitem);
|
||||||
|
|
||||||
}
|
}
|
||||||
if($rw == $rowcount)
|
if($rw == $rowcount)
|
||||||
@ -1558,7 +1798,7 @@ class cashbook extends BaseController
|
|||||||
public function invoiceamount1()
|
public function invoiceamount1()
|
||||||
{
|
{
|
||||||
//$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
|
//$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
|
||||||
$this->global['pageTitle'] = 'Siddharth : Bank Report - Store Credited Details';
|
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Store Credited Details';
|
||||||
$check = $this->input->post('check');
|
$check = $this->input->post('check');
|
||||||
$rw = $this->input->post('rw');
|
$rw = $this->input->post('rw');
|
||||||
|
|
||||||
@ -1598,7 +1838,8 @@ class cashbook extends BaseController
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$clearedblnce=-$totalpaidamount-(-$arec);
|
//$clearedblnce=-$totalpaidamount-(-$arec);
|
||||||
|
$clearedblnce=$totalpaidamount+$arec;
|
||||||
}
|
}
|
||||||
$balancetoreceived =($bankcreditamount-$totalpaidamount);
|
$balancetoreceived =($bankcreditamount-$totalpaidamount);
|
||||||
$check =1;
|
$check =1;
|
||||||
@ -1617,6 +1858,7 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
$active=1;
|
$active=1;
|
||||||
$bankdata = array('cclearbalance'=>$clearedblnce,'cbalancetocleared'=>$balancetoreceived,'cstatus'=>$status);
|
$bankdata = array('cclearbalance'=>$clearedblnce,'cbalancetocleared'=>$balancetoreceived,'cstatus'=>$status);
|
||||||
|
|
||||||
if($check == 1)
|
if($check == 1)
|
||||||
{
|
{
|
||||||
$res = $this->cashbook_model->bankcreditupdate($bankdata,$bankid);
|
$res = $this->cashbook_model->bankcreditupdate($bankdata,$bankid);
|
||||||
@ -1683,7 +1925,7 @@ class cashbook extends BaseController
|
|||||||
{
|
{
|
||||||
|
|
||||||
//$this->global['pageTitle'] = 'Siddharth : amountpaid';
|
//$this->global['pageTitle'] = 'Siddharth : amountpaid';
|
||||||
$this->global['pageTitle'] = 'Siddharth : Bank Report - Amount Payment Details';
|
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Amount Payment Details';
|
||||||
if ($this->input->post('btn_submit'))
|
if ($this->input->post('btn_submit'))
|
||||||
{
|
{
|
||||||
$SupplierName = $this->input->post('SupplierName');
|
$SupplierName = $this->input->post('SupplierName');
|
||||||
@ -1702,7 +1944,7 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
// $this->load->model('cashbook_model');
|
// $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';
|
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Received Amount Details';
|
||||||
if ($this->input->post('btn_submit'))
|
if ($this->input->post('btn_submit'))
|
||||||
{
|
{
|
||||||
$Customer = $this->input->post('Customer');
|
$Customer = $this->input->post('Customer');
|
||||||
@ -1809,6 +2051,7 @@ class cashbook extends BaseController
|
|||||||
|
|
||||||
$result= $this->cashbook_model->IgrDetailsStatusUpdate($igrno,$BankStatus);
|
$result= $this->cashbook_model->IgrDetailsStatusUpdate($igrno,$BankStatus);
|
||||||
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear);
|
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear);
|
||||||
|
|
||||||
//for update mapping amount in t_bankmappingpo table//
|
//for update mapping amount in t_bankmappingpo table//
|
||||||
$balancetopay=$_GET['balancetopay'];
|
$balancetopay=$_GET['balancetopay'];
|
||||||
$totalbalancetopay=$Amount + $balancetopay;
|
$totalbalancetopay=$Amount + $balancetopay;
|
||||||
@ -1818,6 +2061,7 @@ class cashbook extends BaseController
|
|||||||
//for update mapping amount inT_Bankporeport table//
|
//for update mapping amount inT_Bankporeport table//
|
||||||
$result3= $this->cashbook_model->updateBankporeportpo($igrno,$totalbalancetopay,$updatebankpoamount,$Bankid);
|
$result3= $this->cashbook_model->updateBankporeportpo($igrno,$totalbalancetopay,$updatebankpoamount,$Bankid);
|
||||||
|
|
||||||
|
|
||||||
if(count($result2)>0)
|
if(count($result2)>0)
|
||||||
{
|
{
|
||||||
redirect('Bankingstatement','refresh');
|
redirect('Bankingstatement','refresh');
|
||||||
@ -1827,7 +2071,7 @@ class cashbook extends BaseController
|
|||||||
public function deletemappingiv()
|
public function deletemappingiv()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : Bank Report - Delete Mapping Invoice';
|
$this->global['pageTitle'] = $this->CompanyName.' : Bank Report - Delete Mapping Invoice';
|
||||||
$credit= $this->input->post('credit');
|
$credit= $this->input->post('credit');
|
||||||
$invoiceno = $this->input->post('invoiceno');
|
$invoiceno = $this->input->post('invoiceno');
|
||||||
$bankid = $this->input->post('bankid');
|
$bankid = $this->input->post('bankid');
|
||||||
@ -1840,11 +2084,13 @@ class cashbook extends BaseController
|
|||||||
$updatebalancetoclear=$amountreceived+$bankingbalclear;
|
$updatebalancetoclear=$amountreceived+$bankingbalclear;
|
||||||
if($amountreceived<0)
|
if($amountreceived<0)
|
||||||
{
|
{
|
||||||
$updateclearbalance=$bankingclear+$amountreceived;
|
//$updateclearbalance=$bankingclear+$amountreceived;
|
||||||
|
$updateclearbalance=$bankingclear-($amountreceived);//450-(-250)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$updateclearbalance=$bankingclear-$amountreceived;
|
$updateclearbalance=$bankingclear-$amountreceived;//450-650
|
||||||
|
//$updateclearbalance=$bankingclear-$amountreceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
//update Isactive field in T_Bankreport //////
|
//update Isactive field in T_Bankreport //////
|
||||||
|
|||||||
@ -1301,7 +1301,7 @@ $prefile =array();
|
|||||||
{
|
{
|
||||||
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
||||||
|
|
||||||
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -524,8 +524,12 @@ $prefile =array();
|
|||||||
{
|
{
|
||||||
|
|
||||||
$IGRNO= $this->input->post('id');
|
$IGRNO= $this->input->post('id');
|
||||||
|
//echo $IGRNO;
|
||||||
|
|
||||||
$data = $this->inwardgateregister_model->viewigr($IGRNO);
|
$data = $this->inwardgateregister_model->viewigr($IGRNO);
|
||||||
echo json_encode($data);
|
|
||||||
|
// print_r($data);
|
||||||
|
echo json_encode($data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,6 +541,8 @@ $prefile =array();
|
|||||||
$igrfile = $this->inwardgateregister_model->viewIGRFile($IGRNO);
|
$igrfile = $this->inwardgateregister_model->viewIGRFile($IGRNO);
|
||||||
$billfile = $this->inwardgateregister_model->ViewIGRfile1($IGRNO);
|
$billfile = $this->inwardgateregister_model->ViewIGRfile1($IGRNO);
|
||||||
$data = array_merge($igrfile,$billfile);
|
$data = array_merge($igrfile,$billfile);
|
||||||
|
|
||||||
|
//print_r($data);
|
||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1381,13 +1381,13 @@ class purchaseorder extends BaseController
|
|||||||
//$PONO = $_GET['PO'];
|
//$PONO = $_GET['PO'];
|
||||||
$PoStatus='';
|
$PoStatus='';
|
||||||
$data['AmendmentPDF'] = $this->purchaseorder_model->amendpdf($PONO);
|
$data['AmendmentPDF'] = $this->purchaseorder_model->amendpdf($PONO);
|
||||||
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformationforPDF();
|
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformationforPDF();
|
||||||
$data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
|
$data['GetPoFormat'] = $this->purchaseorder_model->GetPoFormat($PONO);
|
||||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
|
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
|
||||||
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
|
$data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO);
|
||||||
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR');
|
$data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR');
|
||||||
$data['reveuetax']=$this->purchaseorder_model->getRevenueTaxinforforpdf($PONO);
|
$data['reveuetax']=$this->purchaseorder_model->getRevenueTaxinforforpdf($PONO);
|
||||||
$data['AmendmentPDF'] = $this->purchaseorder_model->amendpdf($PONO);
|
$data['AmendmentPDF'] = $this->purchaseorder_model->amendpdf($PONO);
|
||||||
$Currencycode='';
|
$Currencycode='';
|
||||||
|
|
||||||
$TotalOrderValue=$data['POItem'][0]->TotalOrderValue;
|
$TotalOrderValue=$data['POItem'][0]->TotalOrderValue;
|
||||||
|
|||||||
@ -41,21 +41,7 @@ class cashbook_model extends CI_Model
|
|||||||
$r = $this->db->get();
|
$r = $this->db->get();
|
||||||
return $r->result();
|
return $r->result();
|
||||||
}
|
}
|
||||||
// function getIncomeExpenseList($i="",$type)
|
|
||||||
// {
|
|
||||||
// $sql="SELECT `t_accountcode`.`name`, `T_Employee_Details`.`FirstName`,
|
|
||||||
// `T_Employee_Details`.`LastName`, `t_income_expense`.*
|
|
||||||
// FROM (`t_income_expense`)
|
|
||||||
// JOIN `t_accountcode` ON `t_income_expense`.`account_code`=`t_accountcode`.`code` or `t_income_expense`.`account_code` = '999'
|
|
||||||
// JOIN `tbl_users` ON `t_income_expense`.`Created_By`=`tbl_users`.`userId`
|
|
||||||
// JOIN `T_Employee_Details` ON `tbl_users`.`EmpID`=`T_Employee_Details`.`EmpID`
|
|
||||||
// WHERE `t_income_expense`.`id` = ".$i."
|
|
||||||
// and t_income_expense.type = '".$type."'
|
|
||||||
// group by t_income_expense.id";
|
|
||||||
// $query = $this->db->query($sql);
|
|
||||||
// $result = $query->result();
|
|
||||||
// return $result;
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To Get Recepit and Payment datas for list
|
* To Get Recepit and Payment datas for list
|
||||||
@ -69,9 +55,9 @@ class cashbook_model extends CI_Model
|
|||||||
JOIN `t_accountcode` ON `t_income_expense`.`account_code`=`t_accountcode`.`code` or `t_income_expense`.`account_code` = '999'
|
JOIN `t_accountcode` ON `t_income_expense`.`account_code`=`t_accountcode`.`code` or `t_income_expense`.`account_code` = '999'
|
||||||
JOIN `tbl_users` ON `t_income_expense`.`Created_By`=`tbl_users`.`userId`
|
JOIN `tbl_users` ON `t_income_expense`.`Created_By`=`tbl_users`.`userId`
|
||||||
JOIN `T_Employee_Details` ON `tbl_users`.`EmpID`=`T_Employee_Details`.`EmpID`
|
JOIN `T_Employee_Details` ON `tbl_users`.`EmpID`=`T_Employee_Details`.`EmpID`
|
||||||
group by t_income_expense.id";
|
group by t_income_expense.id";
|
||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
function getIncomeExpense($firstyear,$secondyear,$frmdt,$todt)
|
function getIncomeExpense($firstyear,$secondyear,$frmdt,$todt)
|
||||||
{
|
{
|
||||||
@ -82,6 +68,7 @@ class cashbook_model extends CI_Model
|
|||||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left');
|
$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.IsActive',1);
|
||||||
$this->db->where('t_income_expense.account_code !=','ADV001');
|
$this->db->where('t_income_expense.account_code !=','ADV001');
|
||||||
|
$this->db->where('t_income_expense.account_code !=','0013');
|
||||||
if ($firstyear and $secondyear != '')
|
if ($firstyear and $secondyear != '')
|
||||||
{
|
{
|
||||||
$finyear = "t_income_expense.date >= '".$firstyear."-04-01' and t_income_expense.date <= '".$secondyear."-03-31'";
|
$finyear = "t_income_expense.date >= '".$firstyear."-04-01' and t_income_expense.date <= '".$secondyear."-03-31'";
|
||||||
@ -108,8 +95,8 @@ class cashbook_model extends CI_Model
|
|||||||
$this->db->join('tbl_users','t_income_expense.Created_By=tbl_users.userId','left');
|
$this->db->join('tbl_users','t_income_expense.Created_By=tbl_users.userId','left');
|
||||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left');
|
$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.IsActive',1);
|
||||||
$this->db->where('t_income_expense.account_code','ADV001');
|
$this->db->where('t_income_expense.account_code','ADV001');
|
||||||
//$this->db->where('t_income_expense.account_code','0013');
|
$this->db->or_where('t_income_expense.account_code','0013');
|
||||||
$this->db->order_by("date","desc");
|
$this->db->order_by("date","desc");
|
||||||
if(!empty($i))
|
if(!empty($i))
|
||||||
{
|
{
|
||||||
@ -129,33 +116,36 @@ class cashbook_model extends CI_Model
|
|||||||
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left');
|
$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.IsActive',1);
|
||||||
$this->db->where('t_income_expense.account_code','ADV001');
|
$this->db->where('t_income_expense.account_code','ADV001');
|
||||||
if ($firstyear and $secondyear != ''){
|
$this->db->or_where('t_income_expense.account_code','0013');
|
||||||
$finyear = "t_income_expense.date >= '".$firstyear."-04-01' and t_income_expense.date <= '".$secondyear."-03-31'";
|
if ($firstyear and $secondyear != '')
|
||||||
$this->db->where($finyear);
|
{
|
||||||
|
$finyear = "t_income_expense.date >= '".$firstyear."-04-01' and t_income_expense.date <= '".$secondyear."-03-31'";
|
||||||
|
$this->db->where($finyear);
|
||||||
}
|
}
|
||||||
if ($frmdt and $todt != ''){
|
if ($frmdt and $todt != '')
|
||||||
$fromdate= date("Y-m-d",strtotime($frmdt));
|
{
|
||||||
$todate=date("Y-m-d",strtotime($todt));
|
$fromdate= date("Y-m-d",strtotime($frmdt));
|
||||||
$date = "date(t_income_expense.date) >= '".$fromdate."'
|
$todate=date("Y-m-d",strtotime($todt));
|
||||||
and date(t_income_expense.date) <= '".$todate."'";
|
$date = "date(t_income_expense.date) >= '".$fromdate."'
|
||||||
$this->db->where($date);
|
and date(t_income_expense.date) <= '".$todate."'";
|
||||||
|
$this->db->where($date);
|
||||||
}
|
}
|
||||||
$this->db->order_by("date","desc");
|
$this->db->order_by("date","desc");
|
||||||
$r = $this->db->get();
|
$r = $this->db->get();
|
||||||
return $r->result();
|
return $r->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
function finyear(){
|
function finyear()
|
||||||
|
{
|
||||||
|
|
||||||
|
$sql="SELECT
|
||||||
$sql="SELECT
|
CASE WHEN MONTH(date)>=4 THEN
|
||||||
CASE WHEN MONTH(date)>=4 THEN
|
concat(YEAR(date), '-',YEAR(date)+1)
|
||||||
concat(YEAR(date), '-',YEAR(date)+1)
|
ELSE concat(YEAR(date)-1,'-', YEAR(date)) END AS financial_year
|
||||||
ELSE concat(YEAR(date)-1,'-', YEAR(date)) END AS financial_year
|
FROM t_income_expense
|
||||||
FROM t_income_expense
|
GROUP BY financial_year";
|
||||||
GROUP BY financial_year";
|
$query = $this->db->query($sql);
|
||||||
$query = $this->db->query($sql);
|
return $query->result();
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,16 +198,7 @@ class cashbook_model extends CI_Model
|
|||||||
return $r->result();
|
return $r->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
// function viewdepartment($sid='')
|
|
||||||
// {
|
|
||||||
// $sql="SELECT ie.*,ac.name,date_format(ie.date,'%d-%m-%Y')as date FROM t_income_expense ie
|
|
||||||
// JOIN t_accountcode ac on ac.code=ie.account_code
|
|
||||||
// WHERE ie.id = ?";
|
|
||||||
// $query = $this->db->query($sql,array($sid));
|
|
||||||
// //print_r($this->db->last_query());
|
|
||||||
// //echo $sql;
|
|
||||||
// return $query->result();
|
|
||||||
// }
|
|
||||||
|
|
||||||
function viewdepartment($sid='')
|
function viewdepartment($sid='')
|
||||||
{
|
{
|
||||||
@ -244,18 +225,6 @@ class cashbook_model extends CI_Model
|
|||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
|
||||||
// function deletefile($cashid,$cashfile)
|
|
||||||
// {
|
|
||||||
|
|
||||||
// $sql="UPDATE t_income_expense SET document = NULL
|
|
||||||
// WHERE id = ?";
|
|
||||||
// $query = $this->db->query($sql,array($cashid));
|
|
||||||
// unlink("uploads/cashbook/".$cashfile);//this deletes the file on particular folder too
|
|
||||||
// //print_r($this->db->last_query());
|
|
||||||
// //echo $sql;
|
|
||||||
// $r = $this->db->affected_rows();
|
|
||||||
// return $r;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
function updatedepartment($updateaccount,$id1)
|
function updatedepartment($updateaccount,$id1)
|
||||||
@ -345,42 +314,7 @@ class cashbook_model extends CI_Model
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//function addupdatepaymentdetails($PaymentDetails,$hidekey=''){
|
|
||||||
|
|
||||||
// $paymentid = $PaymentDetails['Payment_id'];
|
|
||||||
// //$key = $PaymentDetails['ID'];
|
|
||||||
|
|
||||||
// $count=0;
|
|
||||||
|
|
||||||
// $this->db->select('count(*) as count');
|
|
||||||
// $this->db->from('T_Paymentdetails');
|
|
||||||
// $this->db->where('Payment_id',$paymentid);
|
|
||||||
// $this->db->where('ID',$hidekey);
|
|
||||||
|
|
||||||
// $isExits = $this->db->get();
|
|
||||||
// $res = $isExits->result_array();
|
|
||||||
|
|
||||||
|
|
||||||
// if(!empty($res))
|
|
||||||
// {
|
|
||||||
// $count = $res[0]['count'];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if($count == 0 )//for insert
|
|
||||||
// {
|
|
||||||
// $i = $this->db->insert('T_Paymentdetails',$PaymentDetails);
|
|
||||||
// return $i;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// elseif($count == 1)//for update
|
|
||||||
// {
|
|
||||||
// $this->db->where('Payment_id', $paymentid);
|
|
||||||
// $this->db->where('ID', $hidekey);
|
|
||||||
// $u = $this->db->update('T_Paymentdetails',$PaymentDetails);
|
|
||||||
// return $u;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -416,30 +350,32 @@ class cashbook_model extends CI_Model
|
|||||||
function getbalancedetails()
|
function getbalancedetails()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$subquery="SELECT openingbalance,closingbalance FROM T_bankbalance WHERE balance_keyid in (SELECT MAX(balance_keyid) FROM T_bankbalance)";
|
$subquery="SELECT openingbalance,closingbalance FROM T_bankbalance WHERE balance_keyid in (SELECT MAX(balance_keyid) FROM T_bankbalance)";
|
||||||
$query = $this->db->query($subquery);
|
$query = $this->db->query($subquery);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleareddebitbalance(){
|
function cleareddebitbalance()
|
||||||
|
{
|
||||||
|
|
||||||
$sql = "SELECT SUM(Balancetocleared) as debit FROM T_bankreport where Clearbalance >'0'";
|
$sql = "SELECT SUM(Balancetocleared) as debit FROM T_bankreport where Clearbalance >'0'";
|
||||||
|
|
||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
|
}
|
||||||
|
function clearedcreditbalance()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
$sql = "SELECT SUM(cbalancetocleared) as credit FROM T_bankreport where cclearbalance >'0'";
|
||||||
function clearedcreditbalance(){
|
|
||||||
|
|
||||||
$sql = "SELECT SUM(cbalancetocleared) as credit FROM T_bankreport where cclearbalance >'0'";
|
$query = $this->db->query($sql);
|
||||||
|
return $query->result();
|
||||||
$query = $this->db->query($sql);
|
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function bankfile($FileDetails)
|
function bankfile($FileDetails)
|
||||||
{
|
{
|
||||||
@ -458,53 +394,47 @@ class cashbook_model extends CI_Model
|
|||||||
$this->db->where('Balance',$filedataupload['Balance']);
|
$this->db->where('Balance',$filedataupload['Balance']);
|
||||||
|
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
if ($query->num_rows() > 0){
|
if ($query->num_rows() > 0)
|
||||||
return true;
|
{
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->db->insert('T_bankreport', $filedataupload);
|
||||||
|
$r = $this->db->affected_rows();
|
||||||
|
//print_r($this->db->last_query());
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
$this->db->insert('T_bankreport', $filedataupload);
|
|
||||||
$r = $this->db->affected_rows();
|
|
||||||
//print_r($this->db->last_query());
|
|
||||||
return $r;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function balance($balance){
|
function balance($balance)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
$this ->db->insert('T_bankbalance',$balance);
|
$this ->db->insert('T_bankbalance',$balance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function report_finyear()
|
||||||
|
{
|
||||||
|
$sql="SELECT
|
||||||
|
CASE WHEN MONTH(reportdate)>=4 THEN
|
||||||
|
concat(YEAR(reportdate), '-',YEAR(reportdate)+1)
|
||||||
|
ELSE concat(YEAR(reportdate)-1,'-', YEAR(reportdate)) END AS financial_year
|
||||||
|
FROM T_bankreport
|
||||||
|
GROUP BY financial_year";
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
function report_finyear(){
|
function bankstatement($fdate,$tdate,$fa,$aa)
|
||||||
|
{
|
||||||
|
$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 br.reportdate !=0 ";
|
||||||
$sql="SELECT
|
if ($fa and $aa != '')
|
||||||
CASE WHEN MONTH(reportdate)>=4 THEN
|
{
|
||||||
concat(YEAR(reportdate), '-',YEAR(reportdate)+1)
|
|
||||||
ELSE concat(YEAR(reportdate)-1,'-', YEAR(reportdate)) END AS financial_year
|
|
||||||
FROM T_bankreport
|
|
||||||
GROUP BY financial_year";
|
|
||||||
$query = $this->db->query($sql);
|
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function bankstatement($fdate,$tdate,$fa,$aa){
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$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 br.reportdate !=0 ";
|
|
||||||
|
|
||||||
|
|
||||||
if ($fa and $aa != ''){
|
|
||||||
|
|
||||||
$sql.=" and (reportdate >= '".$fa."-04-01' and reportdate<= '".$aa."-03-31')";
|
$sql.=" and (reportdate >= '".$fa."-04-01' and reportdate<= '".$aa."-03-31')";
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($fdate and $tdate != '')
|
if ($fdate and $tdate != '')
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -513,12 +443,12 @@ function bankstatement($fdate,$tdate,$fa,$aa){
|
|||||||
|
|
||||||
$sql.= " and date(reportdate) >= '".$fdate."'
|
$sql.= " and date(reportdate) >= '".$fdate."'
|
||||||
and date(reportdate) <= '".$tdate."'";
|
and date(reportdate) <= '".$tdate."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$sql.=" group by(br.ID) ";
|
$sql.=" group by(br.ID) ";
|
||||||
$sql.=" ORDER BY br.ID+0 DESC ";
|
$sql.=" ORDER BY br.ID+0 DESC ";
|
||||||
|
|
||||||
|
|
||||||
@ -531,11 +461,9 @@ function bankstatement($fdate,$tdate,$fa,$aa){
|
|||||||
function debitbankstatemet($Supplierid,$fdate,$tdate)
|
function debitbankstatemet($Supplierid,$fdate,$tdate)
|
||||||
{
|
{
|
||||||
$status='ST057';
|
$status='ST057';
|
||||||
//echo $tdate;
|
|
||||||
//die();
|
$this->db->distinct();
|
||||||
//$Supplierid;
|
$this->db->select('igr.PONO,igrli.IGRItemNo,igr.IGRNO,supp.SupplierName,igrli.CreatedDate,BR.Balancetopay,BR.Amountpaid,pom.Status,igrli.QuantityAsPerInvoice ,poli.Rate,(igrli.QuantityAsPerInvoice * poli.Rate) as total');
|
||||||
$this->db->distinct();
|
|
||||||
$this->db->select('igr.PONO,igrli.IGRItemNo,igr.IGRNO,supp.SupplierName,igrli.CreatedDate,BR.Balancetopay,BR.Amountpaid,pom.Status,igrli.QuantityAsPerInvoice ,poli.Rate,(igrli.QuantityAsPerInvoice * poli.Rate) as total');
|
|
||||||
$this->db->from ('T_IGR_Details igrli');
|
$this->db->from ('T_IGR_Details igrli');
|
||||||
$this->db->join('T_IGR_Master igr','igrli.IGRNO = igr.IGRNO','left');
|
$this->db->join('T_IGR_Master igr','igrli.IGRNO = igr.IGRNO','left');
|
||||||
$this->db->join('T_PurchaseOrder_LineItem poli','igr.PONO= poli.PONO and igrli.MaterialCode=poli.MaterialCode');
|
$this->db->join('T_PurchaseOrder_LineItem poli','igr.PONO= poli.PONO and igrli.MaterialCode=poli.MaterialCode');
|
||||||
@ -588,7 +516,7 @@ function debitbankstatemet($Supplierid,$fdate,$tdate)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function receiptdata()
|
function receiptdata()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->distinct();
|
$this->db->distinct();
|
||||||
@ -599,7 +527,7 @@ function receiptdata()
|
|||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
}
|
}
|
||||||
function paymentdata()
|
function paymentdata()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->distinct();
|
$this->db->distinct();
|
||||||
@ -612,49 +540,37 @@ 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');
|
|
||||||
$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');
|
|
||||||
$this->db->join ('T_bankreport br','br.ID=bp.mid');
|
|
||||||
$this->db->where('bp.IsActive',1);
|
|
||||||
$this->db->where('bp.mid',$bankid);
|
|
||||||
// $this->db->where('igrde.BankStatus !=','ST072');
|
|
||||||
$this->db->group_by('bp.id');
|
|
||||||
$query = $this->db->get();
|
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//function for image
|
//function for image
|
||||||
|
|
||||||
function debitimage($pono)
|
|
||||||
{
|
|
||||||
$this->db->select('bp.PONO,bp.mid,bu.FilePath,bu.BillNo,bu.IGRNO');
|
|
||||||
$this->db->from ('T_Bankmappingpo bp');
|
|
||||||
$this->db->join ('T_PurchaseOrder_BillUpload bu','bp.PONO = bu.PONO','left');
|
|
||||||
$this->db->where('bp.PONO',$pono);
|
|
||||||
$this->db->group_by('bu.BillNo');
|
|
||||||
$query = $this->db->get();
|
|
||||||
return $query->result();
|
|
||||||
|
|
||||||
}
|
function debitimage($igrno,$pono)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from ('T_PurchaseOrder_BillUpload');
|
||||||
|
$this->db->where('IGRNO != "" ');
|
||||||
|
$this->db->where('IGRNO',$igrno);
|
||||||
|
$this->db->or_where('PONO',$pono);
|
||||||
|
$query = $this->db->get();
|
||||||
|
$result = $query->result();
|
||||||
|
// print_r($result);die;
|
||||||
|
return $result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function debitpolistfilter($SupplierName,$fdate,$tdate)
|
function debitpolistfilter($SupplierName,$fdate,$tdate)
|
||||||
{
|
{
|
||||||
$this->db->select('bm.id,bm.mid,igrm.MaterialRcvdDate,bm.PONO,bm.Suppliername,bm.Totalpoamount,
|
$this->db->select('bm.id,bm.mid,igrm.MaterialRcvdDate,bm.PONO,bm.Suppliername,bm.Totalpoamount,
|
||||||
bm.Balancetopay,bm.Amountpaid,bm.IGRNO,igrm.file,bm.IGRLineItemNo,br.Clearbalance,br.Balancetocleared,bu.FilePath,bu.BillNo');
|
bm.Balancetopay,bm.Amountpaid,bm.IGRNO,igrm.file,bm.IGRLineItemNo,br.Clearbalance,br.Balancetocleared,bu.FilePath,bu.BillNo,inward.FilePath as Fpath');
|
||||||
$this->db->from ('T_Bankmappingpo bm');
|
$this->db->from ('T_Bankmappingpo bm');
|
||||||
$this->db->join ('T_IGR_Master igrm','igrm.IGRNO = bm.IGRNO');
|
$this->db->join ('T_IGR_Master igrm','igrm.IGRNO = bm.IGRNO');
|
||||||
//$this->db->join ('T_IGR_Details igrde','igrde.IGRNO=igrm.IGRNO');
|
//$this->db->join ('T_IGR_Details igrde','igrde.IGRNO=igrm.IGRNO');
|
||||||
$this->db->join ('T_SupplierDetailsN sd','sd.SupplierName = bm.Suppliername');
|
$this->db->join ('T_SupplierDetailsN sd','sd.SupplierName = bm.Suppliername');
|
||||||
$this->db->join ('T_bankreport br','br.ID=bm.mid');
|
$this->db->join ('T_bankreport br','br.ID=bm.mid');
|
||||||
$this->db->join ('T_PurchaseOrder_BillUpload bu','bm.PONO=bu.PONO','left');
|
$this->db->join('T_Inwardgateregister_fileupload inward','inward.IGRNO =igrm.IGRNO','left');
|
||||||
|
$this->db->join ('T_PurchaseOrder_BillUpload bu','bm.PONO=bu.PONO','left');
|
||||||
if($fdate!='' && $tdate!='')
|
if($fdate!='' && $tdate!='')
|
||||||
{
|
{
|
||||||
$this->db->where('bm.Podate BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
|
$this->db->where('bm.Podate BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
|
||||||
@ -670,7 +586,58 @@ function debitpolist($bankid)
|
|||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function igrmastersingle($igrno,$pono)
|
||||||
|
{
|
||||||
|
$this->db->distinct();
|
||||||
|
$this->db->select('IGRNO,file,PONO as pono');
|
||||||
|
$this->db->from('T_IGR_Master');
|
||||||
|
if(!empty($igrno) && !empty($pono)){
|
||||||
|
$this->db->where('PONO',$pono);
|
||||||
|
$this->db->where('IGRNO',$igrno);
|
||||||
|
}else if(!empty($pono)){
|
||||||
|
$this->db->where('PONO',$pono);
|
||||||
|
$this->db->where('IGRNO != ""');
|
||||||
|
}else{
|
||||||
|
$this->db->where('IGRNO',$IGRNO);
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = $this->db->get();
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
function igrmastermultiple($igrno,$pono)
|
||||||
|
{
|
||||||
|
$this->db->distinct();
|
||||||
|
$this->db->select('BillNo,IGRNO,FilePath,PONO,Remarks');
|
||||||
|
$this->db->from('T_Inwardgateregister_fileupload');
|
||||||
|
if(!empty($igrno) && !empty($pono)){
|
||||||
|
$this->db->where('PONO',$pono);
|
||||||
|
$this->db->where('IGRNO',$igrno);
|
||||||
|
}else if(!empty($pono)){
|
||||||
|
$this->db->where('PONO',$pono);
|
||||||
|
$this->db->where('IGRNO != ""');
|
||||||
|
}else{
|
||||||
|
$this->db->where('IGRNO',$IGRNO);
|
||||||
|
}
|
||||||
|
$query = $this->db->get();
|
||||||
|
return $query->result();
|
||||||
|
|
||||||
|
}
|
||||||
|
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->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');
|
||||||
|
$this->db->join('T_Inwardgateregister_fileupload inward','inward.IGRNO =igrm.IGRNO','left');
|
||||||
|
$this->db->join ('T_bankreport br','br.ID=bp.mid');
|
||||||
|
$this->db->where('bp.IsActive',1);
|
||||||
|
$this->db->where('bp.mid',$bankid);
|
||||||
|
// $this->db->where('igrde.BankStatus !=','ST072');
|
||||||
|
$this->db->group_by('bp.id');
|
||||||
|
$query = $this->db->get();
|
||||||
|
return $query->result();
|
||||||
|
|
||||||
|
}
|
||||||
function creditinvoicelist($bankid)
|
function creditinvoicelist($bankid)
|
||||||
{
|
{
|
||||||
$this->db->select('bm.indate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid,
|
$this->db->select('bm.indate,bm.invoiceno,bm.customername,bm.totinvoiceamount,bm.bankid,
|
||||||
@ -854,12 +821,7 @@ function debitpolist($bankid)
|
|||||||
$r = $this->db->affected_rows();
|
$r = $this->db->affected_rows();
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
// function invicedata($invoicedata)
|
|
||||||
// {
|
|
||||||
// $this->db->insert('T_Bankinvoicereport',$invoicedata);
|
|
||||||
// $r = $this->db->affected_rows();
|
|
||||||
// return $r;
|
|
||||||
// }
|
|
||||||
function mappingpo($podata)
|
function mappingpo($podata)
|
||||||
{
|
{
|
||||||
$this->db->insert('T_Bankmappingpo',$podata);
|
$this->db->insert('T_Bankmappingpo',$podata);
|
||||||
@ -876,11 +838,11 @@ function debitpolist($bankid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getpono($pono)
|
public function getpono($igrlineitem)
|
||||||
{
|
{
|
||||||
$this->db->select('PONO');
|
$this->db->select('IGRLineItemNo');
|
||||||
$this->db->from('T_Bankporeport');
|
$this->db->from('T_Bankporeport');
|
||||||
$this->db->where('PONO ',$pono);
|
$this->db->where('IGRLineItemNo ',$igrlineitem);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
// print_r( $this->db->last_query());
|
// print_r( $this->db->last_query());
|
||||||
return $query->result();
|
return $query->result();
|
||||||
@ -934,15 +896,15 @@ function debitpolist($bankid)
|
|||||||
$this->db->where('ID',$bankid);
|
$this->db->where('ID',$bankid);
|
||||||
$this->db->update('T_bankreport',$bankcreditdata);
|
$this->db->update('T_bankreport',$bankcreditdata);
|
||||||
|
|
||||||
print_r($this->db->last_query());
|
//print_r($this->db->last_query());
|
||||||
//return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
public function getearlyamount($pono)
|
public function getearlyamount($igrlineitem)
|
||||||
{
|
{
|
||||||
$this->db->select('Amountpaid');
|
$this->db->select('Amountpaid');
|
||||||
$this->db->from('T_Bankporeport');
|
$this->db->from('T_Bankporeport');
|
||||||
$this->db->where('PONO ',$pono);
|
$this->db->where('IGRLineItemNo ',$igrlineitem);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
// print_r( $this->db->last_query());
|
// print_r( $this->db->last_query());
|
||||||
return $query->result();
|
return $query->result();
|
||||||
@ -979,10 +941,10 @@ function debitpolist($bankid)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function poupdate($podata,$pono)
|
public function poupdate($podata,$igrlineitem)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->where('PONO',$pono);
|
$this->db->where('IGRLineItemNo',$igrlineitem);
|
||||||
$this->db->update('T_Bankporeport',$podata);
|
$this->db->update('T_Bankporeport',$podata);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1033,7 +995,7 @@ function debitpolist($bankid)
|
|||||||
return $r;
|
return $r;
|
||||||
|
|
||||||
}
|
}
|
||||||
function Cashbook($cashbookdatas)
|
function Cashbook($cashbookdatas)
|
||||||
{
|
{
|
||||||
$code=$cashbookdatas['code'];
|
$code=$cashbookdatas['code'];
|
||||||
$type=$cashbookdatas['type'];
|
$type=$cashbookdatas['type'];
|
||||||
|
|||||||
@ -288,22 +288,41 @@ class inwardgateregister_model extends CI_Model
|
|||||||
* @param number $IGRNO : This is IGRNO
|
* @param number $IGRNO : This is IGRNO
|
||||||
* @return array $result : result of the query (returns igr details)
|
* @return array $result : result of the query (returns igr details)
|
||||||
*/
|
*/
|
||||||
function viewigr($IGRNO)
|
// function viewigr($IGRNO)
|
||||||
|
// {
|
||||||
|
// $this->db->distinct();
|
||||||
|
// $this->db->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity');
|
||||||
|
// $this->db->from('T_IGR_Master igr');
|
||||||
|
// $this->db->join('T_IGR_Details igrd','igrd.IGRNO = igr.IGRNO');
|
||||||
|
// $this->db->join('T_PurchaseOrder_Master POM','igr.PONO = POM.PONO');
|
||||||
|
// $this->db->join('T_PurchaseOrder_LineItem POL','igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ');
|
||||||
|
// $this->db->join('T_SupplierDetailsN sup', 'sup.SupplierID = POM.SupplierID');
|
||||||
|
// $this->db->join('T_MaterialMaster MM', 'MM.MaterialCode = igrd.MaterialCode');
|
||||||
|
// $this->db->where('igrd.IGRItemNo',$IGRNO);//here not a igr no , igrlineitem no
|
||||||
|
// //$this->db->where('igr.IGRNO',$IGRNO);//this where igno old flow
|
||||||
|
|
||||||
|
|
||||||
|
// $query = $this->db->get();
|
||||||
|
|
||||||
|
// $result = $query->result();
|
||||||
|
// return $result;
|
||||||
|
// }
|
||||||
|
function viewigr($IGRNO)
|
||||||
{
|
{
|
||||||
$this->db->distinct();
|
$this->db->distinct();
|
||||||
$this->db->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity');
|
$this->db->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity');
|
||||||
|
$this->db->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity');
|
||||||
$this->db->from('T_IGR_Master igr');
|
$this->db->from('T_IGR_Master igr');
|
||||||
$this->db->join('T_IGR_Details igrd','igrd.IGRNO = igr.IGRNO');
|
$this->db->join('T_IGR_Details igrd','igrd.IGRNO = igr.IGRNO');
|
||||||
$this->db->join('T_PurchaseOrder_Master POM','igr.PONO = POM.PONO');
|
$this->db->join('T_PurchaseOrder_Master POM','igr.PONO = POM.PONO');
|
||||||
$this->db->join('T_PurchaseOrder_LineItem POL','igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ');
|
$this->db->join('T_PurchaseOrder_LineItem POL','igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ');
|
||||||
$this->db->join('T_SupplierDetailsN sup', 'sup.SupplierID = POM.SupplierID');
|
$this->db->join('T_SupplierDetailsN sup', 'sup.SupplierID = POM.SupplierID');
|
||||||
$this->db->join('T_MaterialMaster MM', 'MM.MaterialCode = igrd.MaterialCode');
|
$this->db->join('T_MaterialMaster MM', 'MM.MaterialCode = igrd.MaterialCode');
|
||||||
$this->db->where('igrd.IGRItemNo',$IGRNO);//here not a igr no , igrlineitem no
|
$this->db->where('igr.IGRNO',$IGRNO);
|
||||||
//$this->db->where('igr.IGRNO',$IGRNO);//this where igno old flow
|
|
||||||
|
|
||||||
|
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
|
// print_r( $this->db->last_query());
|
||||||
$result = $query->result();
|
$result = $query->result();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
316
application/views/Advancelist.php
Normal file
316
application/views/Advancelist.php
Normal file
@ -0,0 +1,316 @@
|
|||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.dataTables_filter input {padding: 4px;}
|
||||||
|
.dataTables_filter {
|
||||||
|
width: 50%;
|
||||||
|
float: right;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.dataTables_paginate {
|
||||||
|
width: 50%;
|
||||||
|
float: right;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
div.dt-buttons {
|
||||||
|
position: relative;
|
||||||
|
float: right;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-color: #5d0411;
|
||||||
|
border-color: #5d0411;
|
||||||
|
}
|
||||||
|
.btn-success {
|
||||||
|
border: 2px solid #5d0411 !important;}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//print_r($list);
|
||||||
|
// ?>
|
||||||
|
<!-- <CENTER><strong><h3 class="box-title">Siddharth Industries - Receipt and Payment List</h3></strong></CENTER> -->
|
||||||
|
<div class="content-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
|
||||||
|
<div class="box-header">
|
||||||
|
|
||||||
|
<CENTER><strong><h3 class="box-title"><?php echo $pageTitle;?></h3></strong></CENTER>
|
||||||
|
|
||||||
|
<div align="right" style="padding-right:10px">
|
||||||
|
<a href="addIncomeExpense" class="btn btn-primary" align="right"style="padding-right:10px" >Add New</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box-body">
|
||||||
|
<!-- <form role="form" id="Datewisecashbookreport" action="<?php echo base_url() ?>Datewisecashbookreport" enctype="multipart/form-data" method="post"> -->
|
||||||
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<b><label for="From Date">From Date:</label></b>
|
||||||
|
<div class="input-group">
|
||||||
|
<input name="from_date" id="max-date" class="form-control datepicker">
|
||||||
|
<span class="input-group-addon">
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<b><label for="To Date">To Date:</label></b>
|
||||||
|
<div class="input-group">
|
||||||
|
<input name="to_date" id="min-date" class="form-control datepicker">
|
||||||
|
<span class="input-group-addon">
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
|
||||||
|
<b><label for="year">Year:</label></b>
|
||||||
|
|
||||||
|
<select class="form-control" id="financialyear" name="financialyear">
|
||||||
|
<option value="">Select Year</option>
|
||||||
|
<?php
|
||||||
|
foreach($finyear as $item):
|
||||||
|
|
||||||
|
{?>
|
||||||
|
|
||||||
|
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
|
||||||
|
|
||||||
|
|
||||||
|
<?php } endforeach; ?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div style="padding-right:10px;padding-top: 20px;" align="right">
|
||||||
|
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-success" name="btn_submit" value="View Report">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<table id="inexlist" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
|
<div align="right" style="padding-right:10px">
|
||||||
|
<div id="content" > </div>
|
||||||
|
<div class="modal fade" role="dialog">
|
||||||
|
|
||||||
|
<thead style="background-color:#ddf">
|
||||||
|
<tr>
|
||||||
|
<th>Account Type</th>
|
||||||
|
<th>DATE</th>
|
||||||
|
<th>Account Name</th>
|
||||||
|
<th>Cash Type</th>
|
||||||
|
<th>Amount</th>
|
||||||
|
<th>Details</th>
|
||||||
|
<th>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="inexlistbody">
|
||||||
|
|
||||||
|
<?php if(!empty($list))
|
||||||
|
{
|
||||||
|
$base = base_url();
|
||||||
|
foreach($list as $l)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><?php echo '<a href="'.$base.'cashbook/incomeExpenseList/'.$l->id.'">'.$l->type.'</a>';?></td>
|
||||||
|
<td style="text-align:right;"><?php echo date_format(date_create($l->date),'d-m-Y');?></td>
|
||||||
|
<td><?php echo $l->name;?></td>
|
||||||
|
<td><?php echo $l->cashtype;?></td>
|
||||||
|
<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> </a>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div> </section>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
// Bootstrap datepicker
|
||||||
|
// Set up your table
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||||
|
table = $('#inexlist').DataTable( {
|
||||||
|
|
||||||
|
"aaSorting": [[ 1, "desc" ]],
|
||||||
|
"autoWidth": false,
|
||||||
|
//"columnDefs" : [{"targets":1, "type":"date-eu"}],
|
||||||
|
orderCellsTop: true,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"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-2'i><'col-md-10'p>>",
|
||||||
|
buttons: [
|
||||||
|
|
||||||
|
// {
|
||||||
|
// extend: 'excelHtml5',
|
||||||
|
// footer: 'true',
|
||||||
|
// messageTop: 'Cashbook Report',
|
||||||
|
// title: $('h3').text(),
|
||||||
|
// exportOptions: {
|
||||||
|
// columns: ':visible'
|
||||||
|
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
|
||||||
|
// 'colvis'
|
||||||
|
]
|
||||||
|
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
// jQuery.extend( jQuery.fn.dataTableExt.oSort, {
|
||||||
|
// "date-uk-pre": function ( a ) {
|
||||||
|
// var ukDatea = a.split('-');
|
||||||
|
// return (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
|
||||||
|
// },
|
||||||
|
|
||||||
|
// "date-uk-asc": function ( a, b ) {
|
||||||
|
// return ((a < b) ? -1 : ((a > b) ? 1 : 0));
|
||||||
|
// },
|
||||||
|
|
||||||
|
// "date-uk-desc": function ( a, b ) {
|
||||||
|
// return ((a < b) ? 1 : ((a > b) ? -1 : 0));
|
||||||
|
// }
|
||||||
|
// } );
|
||||||
|
|
||||||
|
// $('#mySelect').on('change',function(){
|
||||||
|
|
||||||
|
// table
|
||||||
|
// .column(4)
|
||||||
|
// .search(this.value)
|
||||||
|
// .draw();
|
||||||
|
// });
|
||||||
|
|
||||||
|
$( function() {
|
||||||
|
//var dateFormat = "mm/dd/yy",
|
||||||
|
from = $( "#min-date" )
|
||||||
|
.datepicker({
|
||||||
|
dateFormat: "dd-mm-yy",
|
||||||
|
defaultDate: "+0d",
|
||||||
|
changeMonth: true,
|
||||||
|
//numberOfMonths: 1
|
||||||
|
|
||||||
|
})
|
||||||
|
.on( "change", function() {
|
||||||
|
to.datepicker("option", "minDate", getDate( this ) );
|
||||||
|
}),
|
||||||
|
to = $( "#max-date" ).datepicker({
|
||||||
|
dateFormat: "dd-mm-yy",
|
||||||
|
defaultDate: "+0d",
|
||||||
|
changeMonth: true,
|
||||||
|
//numberOfMonths: 1
|
||||||
|
|
||||||
|
})
|
||||||
|
.on( "change", function() {
|
||||||
|
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||||
|
});
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
|
||||||
|
|
||||||
|
// $('#inexlist').DataTable({
|
||||||
|
// "paging": true,
|
||||||
|
// "lengthChange": true,
|
||||||
|
// "searching": true,
|
||||||
|
// "aaSorting": [[ 0, "desc" ]],
|
||||||
|
// "ordering": true,
|
||||||
|
//
|
||||||
|
// "info": true,
|
||||||
|
// "autoWidth": true
|
||||||
|
|
||||||
|
// });
|
||||||
|
from = $( "#min-date" )
|
||||||
|
.datepicker({
|
||||||
|
dateFormat: "dd-mm-yy",
|
||||||
|
defaultDate: "+0d",
|
||||||
|
changeMonth: true,
|
||||||
|
//numberOfMonths: 1
|
||||||
|
|
||||||
|
})
|
||||||
|
.on( "change", function() {
|
||||||
|
to.datepicker("option", "minDate", getDate( this ) );
|
||||||
|
}),
|
||||||
|
to = $( "#max-date" ).datepicker({
|
||||||
|
dateFormat: "dd-mm-yy",
|
||||||
|
defaultDate: "+0d",
|
||||||
|
changeMonth: true,
|
||||||
|
//numberOfMonths: 1
|
||||||
|
|
||||||
|
})
|
||||||
|
.on( "change", function() {
|
||||||
|
from.datepicker( "option", "maxDate", getDate( this ) );
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
-->
|
||||||
121
application/views/addnewIncomeExpense.php
Executable file → Normal file
121
application/views/addnewIncomeExpense.php
Executable file → Normal file
@ -1,4 +1,4 @@
|
|||||||
|
<script type="text/javascript" src="<?php echo base_url();?>assets/Autocomplete/jquery.autocomplete.js"></script>
|
||||||
<?php //print_r($dropdownvalues);?>
|
<?php //print_r($dropdownvalues);?>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
@ -38,8 +38,13 @@
|
|||||||
/* border: 1px solid #ccc; */
|
/* border: 1px solid #ccc; */
|
||||||
/* border-top: none; */
|
/* border-top: none; */
|
||||||
}
|
}
|
||||||
|
.autocomplete-suggestion{
|
||||||
|
cursor:pointer;
|
||||||
|
background-color:skyblue;
|
||||||
|
/* background-color: darkgrey; */
|
||||||
|
outline: 1px solid slategrey;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="content-wrapper" style="min-height: 537px;">
|
<div class="content-wrapper" style="min-height: 537px;">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
@ -247,6 +252,19 @@
|
|||||||
<input type="text" class="form-control required" id="PaymentPaidto" name="PaymentPaidto" required>
|
<input type="text" class="form-control required" id="PaymentPaidto" name="PaymentPaidto" required>
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
|
<div class="col-md-3"><div class="form-group">
|
||||||
|
<b><span for="Suppliername">Select Supplier:</span> </b><span style="color:red">*</span></br></br>
|
||||||
|
<select class="form-control select2 required" id="Paymentsupplier" name="Paymentsupplier">
|
||||||
|
<option value="-1">Select Supplier</option>
|
||||||
|
</select>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
<div class="col-md-3"><div class="form-group">
|
<div class="col-md-3"><div class="form-group">
|
||||||
<b><span for="PaymentMerchant">Merchant Name:</span></b></br></br>
|
<b><span for="PaymentMerchant">Merchant Name:</span></b></br></br>
|
||||||
<input type="text" class="form-control required" id="Paymentmerchant" name="Paymentmerchant">
|
<input type="text" class="form-control required" id="Paymentmerchant" name="Paymentmerchant">
|
||||||
@ -257,11 +275,6 @@
|
|||||||
<input id="Paymentmerchantgst" name="PaymentMerchantgst" class="form-control">
|
<input id="Paymentmerchantgst" name="PaymentMerchantgst" class="form-control">
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
<div class="col-md-3"><div class="form-group">
|
<div class="col-md-3"><div class="form-group">
|
||||||
<b><span for="Paymentvoucher">Voucher Code</span></b><span style="color:red">*</span></br></br>
|
<b><span for="Paymentvoucher">Voucher Code</span></b><span style="color:red">*</span></br></br>
|
||||||
<input id="Paymentvouchercode" name="Paymentvouchercode" class="form-control" required onkeypress="return isNumberKey(event)" >
|
<input id="Paymentvouchercode" name="Paymentvouchercode" class="form-control" required onkeypress="return isNumberKey(event)" >
|
||||||
@ -272,6 +285,10 @@
|
|||||||
<input id="Paymenthsn" name="Paymenthsn" class="form-control" >
|
<input id="Paymenthsn" name="Paymenthsn" class="form-control" >
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
<div class="col-md-3"><div class="form-group">
|
<div class="col-md-3"><div class="form-group">
|
||||||
<b><span for="ValuebeforeGST">Value before GST(₹):</span></b><!--<span style="color:red">*</span>--></br></br>
|
<b><span for="ValuebeforeGST">Value before GST(₹):</span></b><!--<span style="color:red">*</span>--></br></br>
|
||||||
<input id="PaymentvaluebeforegST" name="PaymentvaluebeforegST" style="text-align:right;" class="form-control" onkeypress="return isNumberKey(event)" value='0.00' readonly>
|
<input id="PaymentvaluebeforegST" name="PaymentvaluebeforegST" style="text-align:right;" class="form-control" onkeypress="return isNumberKey(event)" value='0.00' readonly>
|
||||||
@ -281,12 +298,8 @@
|
|||||||
<b><span for="SGST">SGST(₹):</span></b></br></br>
|
<b><span for="SGST">SGST(₹):</span></b></br></br>
|
||||||
<input type="text" class="form-control" style="text-align:right;" onchange="PaymentGSTvalue(this.id);" id="PaymentSGST" name="PaymentSGST" onkeypress="return isNumberKey(event)">
|
<input type="text" class="form-control" style="text-align:right;" onchange="PaymentGSTvalue(this.id);" id="PaymentSGST" name="PaymentSGST" onkeypress="return isNumberKey(event)">
|
||||||
</div> </div>
|
</div> </div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div class="col-md-3"><div class="form-group">
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-3"><div class="form-group">
|
|
||||||
<b><span for="CGST">CGST(₹):</span></b></br></br>
|
<b><span for="CGST">CGST(₹):</span></b></br></br>
|
||||||
<input type="text" class="form-control" id="PaymentCGST" style="text-align:right;" name="PaymentCGST" onkeypress="return isNumberKey(event)" onchange="PaymentGSTvalue(this.id);">
|
<input type="text" class="form-control" id="PaymentCGST" style="text-align:right;" name="PaymentCGST" onkeypress="return isNumberKey(event)" onchange="PaymentGSTvalue(this.id);">
|
||||||
</div></div>
|
</div></div>
|
||||||
@ -413,7 +426,7 @@ $('#Recepitaccode').append(options);
|
|||||||
|
|
||||||
supp = <?php echo json_encode($getsupplier)?>;
|
supp = <?php echo json_encode($getsupplier)?>;
|
||||||
$.each(supp,function(s,supp){
|
$.each(supp,function(s,supp){
|
||||||
$("#supplier").append( $('<option></option>').val(supp.SupplierID).html(supp.SupplierID+' - '+supp.SupplierName));
|
$("#supplier,#Paymentsupplier").append( $('<option></option>').val(supp.SupplierID).html(supp.SupplierID+' - '+supp.SupplierName));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -438,6 +451,88 @@ $("#PaymentDate").datepicker({
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
|
||||||
|
$("#supplier,#Paymentsupplier").select2();
|
||||||
|
|
||||||
|
/**** autocomplete ****/
|
||||||
|
$('#merchant').autocomplete({
|
||||||
|
|
||||||
|
onSearchStart: function (query) {
|
||||||
|
$('#merchant').autocomplete("option", "minLength", 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
serviceUrl: "<?php echo base_url();?>cashbook/autocomplete",
|
||||||
|
onSelect: function (suggestion) {
|
||||||
|
|
||||||
|
var data = suggestion.SupplierName;
|
||||||
|
var selectedvalue = $('input[name=merchant]').val();
|
||||||
|
if(selectedvalue != ' ' )
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
data:{id:selectedvalue},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>cashbook/getSupplierDtls",
|
||||||
|
success:function(data) {
|
||||||
|
var supplier_gstno = '';
|
||||||
|
if(data != '')
|
||||||
|
{
|
||||||
|
|
||||||
|
data = JSON.parse(data);
|
||||||
|
$.each(data,function(i,arr){
|
||||||
|
supplier_gstno = arr.GSTNO;
|
||||||
|
});
|
||||||
|
$("#merchantgst").val(supplier_gstno);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/**** receipt autocomplete ends here ********/
|
||||||
|
|
||||||
|
|
||||||
|
$('#Paymentmerchant').autocomplete({
|
||||||
|
|
||||||
|
onSearchStart: function (query) {
|
||||||
|
$('#Paymentmerchant').autocomplete("option", "minLength", 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
serviceUrl: "<?php echo base_url();?>cashbook/autocomplete",
|
||||||
|
onSelect: function (suggestion) {
|
||||||
|
|
||||||
|
var data = suggestion.SupplierName;
|
||||||
|
var selectedvalue = $('input[name=Paymentmerchant]').val();
|
||||||
|
if(selectedvalue != ' ' )
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
data:{id:selectedvalue},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>cashbook/getSupplierDtls",
|
||||||
|
success:function(data) {
|
||||||
|
var supplier_gstno = '';
|
||||||
|
if(data != '')
|
||||||
|
{
|
||||||
|
|
||||||
|
data = JSON.parse(data);
|
||||||
|
$.each(data,function(i,arr){
|
||||||
|
supplier_gstno = arr.GSTNO;
|
||||||
|
});
|
||||||
|
$("#Paymentmerchantgst").val(supplier_gstno);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**** payment autocomplete ends here ********/
|
||||||
|
|
||||||
|
});
|
||||||
function readURL(input,id) {
|
function readURL(input,id) {
|
||||||
|
|
||||||
//alert(id);
|
//alert(id);
|
||||||
|
|||||||
@ -96,7 +96,7 @@ if(!empty($amountpaid))
|
|||||||
|
|
||||||
|
|
||||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Debit Amount Paid Reports</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#5d0411"><b>Bank Debit Amount Paid Reports</b></p></h3></center>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -203,19 +203,32 @@ if(!empty($amountpaid))
|
|||||||
<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="ap<?php echo $i ?>"><span><?php echo $ap->Amountpaid?></span></td>
|
<td align="left" id="ap<?php echo $i ?>"><span><?php echo $ap->Amountpaid?></span></td>
|
||||||
<?php
|
<?php
|
||||||
if($ap->file=='')
|
if($ap->file !='')
|
||||||
{
|
|
||||||
?>
|
|
||||||
<td>N/A</td>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<td> <a target="_blank" href="<?php echo base_url().''.$ap->file ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm">Download</button></a> </td>
|
|
||||||
<?php
|
|
||||||
|
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrno(<?php echo $i ?>)"></i></a> </td>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if($ap->Fpath !='')
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrno(<?php echo $i ?>)"></i></a> </td>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} else
|
||||||
|
{ ?>
|
||||||
|
<td>N/A</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php }
|
||||||
if($ap->FilePath=='')
|
if($ap->FilePath=='')
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@ -322,14 +335,15 @@ $.ajax(
|
|||||||
}
|
}
|
||||||
function pono(i)
|
function pono(i)
|
||||||
{
|
{
|
||||||
|
var igrno=$('#igrno'+i).text();
|
||||||
var pono=$('#pono'+i).text();
|
var pono=$('#pono'+i).text();
|
||||||
$("#Fileshow").modal('show');
|
$("#Fileshow").modal('show');
|
||||||
$.ajax(
|
$.ajax(
|
||||||
|
|
||||||
{
|
{
|
||||||
data:{pono:pono},
|
data:{igrno:igrno,pono:pono},
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>Filelist",
|
url:"<?php echo base_url() ?>cashbook/filelist",
|
||||||
success:function(data)
|
success:function(data)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -418,6 +432,82 @@ $( function() {
|
|||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
function igrno(i)
|
||||||
|
{
|
||||||
|
var igrno=$('#igrno'+i).text();
|
||||||
|
var pono =$('#pono'+i).text();
|
||||||
|
$("#Fileshow").modal('show');
|
||||||
|
$.ajax(
|
||||||
|
|
||||||
|
{
|
||||||
|
data:{igrno:igrno,pono:pono},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url() ?>cashbook/IGRFilelist",
|
||||||
|
success:function(data)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var trHTML = '';
|
||||||
|
var FilePath ='';
|
||||||
|
var Filename = '';
|
||||||
|
var PONO ='';
|
||||||
|
var BillNO ='';
|
||||||
|
i=0;
|
||||||
|
$.each($.parseJSON(data),function (i, item) {
|
||||||
|
|
||||||
|
if(item.file == null)
|
||||||
|
{
|
||||||
|
// if(item.Remarks ==null)
|
||||||
|
// {
|
||||||
|
//alert()
|
||||||
|
PONO =item.PONO;
|
||||||
|
BillNO =item.BillNo;
|
||||||
|
Filename =item.FilePath;
|
||||||
|
FilePath = "<?php echo base_url()?>uploads/Igrfiles/"+item.FilePath;
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// Filename ="BillDetails";
|
||||||
|
// PONO =item.PONO;
|
||||||
|
// BillNO =item.BillNo;
|
||||||
|
// FilePath = item.FilePath;
|
||||||
|
// }
|
||||||
|
|
||||||
|
}else{
|
||||||
|
Filename = item.file;
|
||||||
|
PONO =item.pono;
|
||||||
|
BillNO = '-';
|
||||||
|
|
||||||
|
FilePath =item.file;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(Filename != null)
|
||||||
|
{
|
||||||
|
i=i+1;
|
||||||
|
i=i-1;
|
||||||
|
trHTML += '<tr id='+i+'>' +
|
||||||
|
'<td align="right">' + i + '</td>' +
|
||||||
|
'<td id="billno'+i+'">' + BillNO+ '</td>' +
|
||||||
|
'<td>' + PONO+ '</td>' +
|
||||||
|
|
||||||
|
'<td id="file'+i+'"><a target="_blank" href = '+FilePath+'>'+ Filename +'</a></td>' +
|
||||||
|
|
||||||
|
// '<td name="filepathname" id="filepathname" onclick="openbillmodel('+i+');"><i class="fa fa-pencil"></i></td>' +
|
||||||
|
'</tr>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#tbleAppend1").empty();
|
||||||
|
$('#Inwardgateregistertable1 > tbody').append(trHTML);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ foreach($financialyear as $item)
|
|||||||
|
|
||||||
|
|
||||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Credit Amount Received Report</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#5d0411"><b>Bank Credit Amount Received Report</b></p></h3></center>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -83,16 +83,6 @@ foreach($financialyear as $item)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div style=" ;margin-left:0%;margin-top: -55px;"> -->
|
|
||||||
<!-- <p style="margin-left:25px;" id="bid" value="">Payment ID: </p> -->
|
|
||||||
<!--<p style="margin-left:25px;" id="debit1amount" value="">Total Amount: </p>-->
|
|
||||||
<!-- <p style="margin-left:25px;">Payment Mode: Bank</p>
|
|
||||||
<p style="margin-left:25px;" id="bamount" </p>
|
|
||||||
<p style="margin-left:25px;" id="bdate" value="">Payment Amount Date: </p> -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label for="from_date">
|
<label for="from_date">
|
||||||
@ -229,39 +219,27 @@ foreach($financialyear as $item)
|
|||||||
</div>
|
</div>
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
</div><!-- /.col -->
|
</div><!-- /.col -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="row">
|
<div class="col-md-12" id="HideDateDiv"></div>
|
||||||
<div class="col-md-12" id="date1"></div>
|
|
||||||
|
|
||||||
<div class="col-md-12" id="purchaseono"></div>
|
<div class="col-md-12" id="HidePONODiv"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="HideIGRDiv"></div>
|
<div class="col-md-12" id="HideIGRDiv"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="hideigrline"></div>
|
<div class="col-md-12" id="HideIGRLineItem"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="supname"></div>
|
<div class="col-md-12" id="HideSuppDiv"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="aa1"></div>
|
<div class="col-md-12" id="aa1"></div>
|
||||||
|
|
||||||
<!--<div class="col-md-12" id="aa2"></div>-->
|
<div class="col-md-12" id="HideTtlPoAmtDiv"></div>
|
||||||
|
|
||||||
<div class="col-md-12" id="ttamnt"></div>
|
|
||||||
|
|
||||||
<div class="col-md-12" id="totala"></div>
|
|
||||||
<!--<input type="text" name="qw1" id="qw1">-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" name="Recid" id="Recid" value="">
|
|
||||||
<!-- <input type="hidden" name="bankid" id="bankid" value="">-->
|
|
||||||
<input type="hidden" name="bankamount" id="bankamount" value="">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12" id="HideAmtPaidDiv"></div>
|
||||||
|
|
||||||
|
<input type="hidden" name="Recid" id="Recid" value="" readonly>
|
||||||
|
|
||||||
|
<input type="hidden" name="bankamount" id="bankamount" value="" readonly>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -295,257 +273,198 @@ foreach($financialyear as $item)
|
|||||||
var i;
|
var i;
|
||||||
$.each(res1, function( index, value )
|
$.each(res1, function( index, value )
|
||||||
{
|
{
|
||||||
var res2 = value.split('-');
|
var res2 = value.split('-');
|
||||||
|
var bid=res2[0];
|
||||||
|
var bam=res2[1];
|
||||||
|
|
||||||
var bid=res2[0];
|
$('#bankid').val(bid);
|
||||||
var bam=res2[1];
|
document.getElementById("bid").innerHTML=bid;
|
||||||
//alert(bid);
|
});/** foreach closed */
|
||||||
//alert(bam);
|
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||||
$('#bankid').val(bid);
|
table = $('#req').DataTable( {
|
||||||
document.getElementById("bid").innerHTML='Payment ID:' +bid;
|
|
||||||
});
|
|
||||||
|
|
||||||
//alert(res2);
|
|
||||||
//alert(res[1]);
|
|
||||||
//var text = $('#debitamount').text();
|
|
||||||
|
|
||||||
|
|
||||||
//alert($data['cash']);
|
|
||||||
// $('#debitamount').val('10');
|
|
||||||
table = $('#req').DataTable( {
|
|
||||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
buttons: [
|
buttons: [
|
||||||
|
{
|
||||||
{
|
|
||||||
extend: 'excelHtml5',
|
extend: 'excelHtml5',
|
||||||
footer: 'true',
|
footer: 'true',
|
||||||
messageTop: $('h3').text(),
|
messageTop: $('h3').text(),
|
||||||
title: 'cashbook Overall Report',
|
title: 'cashbook Overall Report',
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
columns: ':visible'
|
columns: ':visible'
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
'colvis'
|
'colvis'
|
||||||
]
|
]
|
||||||
} );
|
} );/** datatable closed */
|
||||||
} );
|
} );/** ready closed */
|
||||||
|
|
||||||
|
var temppo=[]; // temppo - This array for PO with its value.
|
||||||
|
var tempTotal = []; // tempTotal - This array for get value from "temppo" to calculate grandtotal
|
||||||
|
var intex = 1;
|
||||||
|
var row = 0;
|
||||||
|
|
||||||
//alert(pono+'array');
|
|
||||||
var temppo=[];
|
|
||||||
var tot=0;
|
|
||||||
var tot1=0;
|
|
||||||
var intex=1;
|
|
||||||
var row=0;
|
|
||||||
var j=1;
|
|
||||||
var addvalue=0;
|
|
||||||
var tott=0;
|
|
||||||
var total=0;
|
|
||||||
function GetPayment(i)
|
function GetPayment(i)
|
||||||
{
|
{
|
||||||
//alert('check');
|
|
||||||
var value=i;
|
|
||||||
var bankdebitamount=$('#debitamount').val();
|
var bankdebitamount=$('#debitamount').val();
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
var balanceamount=bankdebitamount-totalvalue;
|
var balanceamount=bankdebitamount-totalvalue;
|
||||||
|
|
||||||
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
||||||
|
|
||||||
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
||||||
//alert(amount+'inv');
|
|
||||||
var negative=0;
|
var negative=0;
|
||||||
if(amount<0)
|
if(amount<0)
|
||||||
{
|
{
|
||||||
negative=1;
|
negative=1;
|
||||||
alert('Invalid Amount');
|
alert('Invalid Amount');
|
||||||
// $('#invoicepaymet'+i).val('');
|
}
|
||||||
|
|
||||||
|
temp=intex;
|
||||||
|
|
||||||
}
|
|
||||||
temp=intex;
|
|
||||||
//alert(temp+'temp');success
|
|
||||||
if(x==true)
|
if(x==true)
|
||||||
{
|
{
|
||||||
//alert(x);
|
row = parseInt(row)+1;
|
||||||
var bankdebitamount=$('#debitamount').val();
|
|
||||||
var totalvalue=$('#addvalue').val();
|
|
||||||
var balanceamount=bankdebitamount-totalvalue;
|
|
||||||
|
|
||||||
if(bankdebitamount==totalvalue)
|
|
||||||
{
|
|
||||||
//alert('you have remaining'+balanceamount);
|
|
||||||
//alert('your amount is equal to debit amount');
|
|
||||||
$(".checkboxcheckbox").prop("disabled", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//document.getElementById('checkboxcheckbox'+i).checked = false;
|
|
||||||
('your checkbox is disabled beacause already mapped amount')
|
|
||||||
}
|
|
||||||
|
|
||||||
row= parseInt(row)+1;
|
|
||||||
$('#Rowid').val(row);
|
$('#Rowid').val(row);
|
||||||
var date= document.getElementById ( "date"+i ).innerText;
|
var date= document.getElementById ( "date"+i ).innerText;//value taken from table, col name : date
|
||||||
var pono =document.getElementById ( "pono"+i ).innerText;
|
var pono =document.getElementById ( "pono"+i ).innerText;//value taken from table, col name : purchase order no
|
||||||
var poamount =document.getElementById ( "qw"+i ).innerText;
|
var igrno =document.getElementById ( "igrno"+i ).innerText;
|
||||||
var igrno =document.getElementById ( "igrno"+i ).innerText;
|
|
||||||
var igrlineitem=document.getElementById ( "igrlineitem"+i ).innerText;
|
var igrlineitem=document.getElementById ( "igrlineitem"+i ).innerText;
|
||||||
var tta= $('#totala').val();
|
var supname =document.getElementById ("sn"+i ).innerText;//value taken from table col name : suppliername
|
||||||
var tempid = "debited"+value;
|
var totalordervalue =document.getElementById ("tov"+i ).innerText;//value taken from table col name : total po amount
|
||||||
//var credit=parseFloat(document.getElementById(tempid).innerText);
|
var invoicepayment =document.getElementById ( "qw"+i ).innerText;//value taken from table col name : Balance to pay
|
||||||
var t ="totala"+value;
|
$('#invoicepaymet'+i).val(invoicepayment);//to copy the value from 'balance to pay' to 'amount paid'
|
||||||
var poamount1 =$(t).val();
|
|
||||||
//alert(poamount1+'amt');
|
|
||||||
var ponovalue = igrlineitem+','+poamount;
|
|
||||||
temppo.push(ponovalue);
|
|
||||||
console.log(temppo);
|
|
||||||
|
|
||||||
|
|
||||||
//console.log(temppo);
|
|
||||||
var supname =document.getElementById ("sn"+i ).innerText;
|
|
||||||
var totalordervalue =document.getElementById ("tov"+i ).innerText;
|
|
||||||
var invoicepayment =document.getElementById ( "qw"+i ).innerText;
|
|
||||||
$('#invoicepaymet'+i).val(invoicepayment);
|
|
||||||
var RowCount= $('#Rowid').val();
|
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'date1'+j,
|
name:'hidedate'+i,
|
||||||
id:'date1'+j,
|
id:'hidedate'+i,
|
||||||
value:date
|
value:date
|
||||||
}).appendTo('#date1');
|
}).appendTo('#HideDateDiv');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'purchaseono'+j,
|
name:'hidepono'+i,
|
||||||
id:'purchaseono'+j,
|
id:'hidepono'+i,
|
||||||
value:pono
|
value:pono
|
||||||
}).appendTo('#purchaseono');
|
}).appendTo('#HidePONODiv');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'hideigrno'+j,
|
name:'hideigrno'+i,
|
||||||
id:'hideigrno'+j,
|
id:'hideigrno'+i,
|
||||||
value:igrno
|
value:igrno
|
||||||
}).appendTo('#HideIGRDiv');
|
}).appendTo('#HideIGRDiv');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'hideigrline'+j,
|
name:'hideigrline'+i,
|
||||||
id:'hideigrline'+j,
|
id:'hideigrline'+i,
|
||||||
value:igrlineitem
|
value:igrlineitem
|
||||||
}).appendTo('#hideigrline');
|
}).appendTo('#HideIGRLineItem');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'supname'+j,
|
name:'hidesupname'+i,
|
||||||
id:'supname'+j,
|
id:'hidesupname'+i,
|
||||||
value:supname
|
value:supname
|
||||||
}).appendTo('#supname');
|
}).appendTo('#HideSuppDiv');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
type:'hidden',
|
type:'hidden',
|
||||||
name:'totala'+j,
|
name:'hidettlPoamt'+i,
|
||||||
id:'totala'+j,
|
id:'hidettlPoamt'+i,
|
||||||
value:invoicepayment
|
|
||||||
}).appendTo('#totala');
|
|
||||||
|
|
||||||
|
|
||||||
$('<input>').attr({
|
|
||||||
type:'hidden',
|
|
||||||
name:'ttamnt'+j,
|
|
||||||
id:'ttamnt'+j,
|
|
||||||
value:totalordervalue
|
value:totalordervalue
|
||||||
}).appendTo('#ttamnt');
|
}).appendTo('#HideTtlPoAmtDiv');
|
||||||
|
|
||||||
|
$('<input>').attr({
|
||||||
|
type:'hidden',
|
||||||
|
name:'hideamtpaid'+i,
|
||||||
|
id:'hideamtpaid'+i,
|
||||||
|
value:invoicepayment
|
||||||
|
}).appendTo('#HideAmtPaidDiv');
|
||||||
|
|
||||||
intex = parseInt(intex)+1;
|
var poamount = $('#hideamtpaid'+i).val();
|
||||||
j=parseInt(j)+1;
|
var ponovalue = i+','+igrlineitem+','+poamount;
|
||||||
//alert(j+'j');
|
temppo.push(ponovalue);
|
||||||
var to=0;
|
//console.log(temppo);
|
||||||
for(t=1;t<j;t++)
|
|
||||||
{
|
|
||||||
var total=0;
|
|
||||||
$.each(temppo, function( index, value )
|
|
||||||
{
|
|
||||||
var res2 = value.split(',');
|
|
||||||
|
|
||||||
var pono=res2[0];
|
calculategrandtotal();
|
||||||
//alert(pono+'pono');
|
|
||||||
var bam=res2[1];
|
|
||||||
//alert(bam+'bam');
|
|
||||||
total=parseFloat(bam)+parseFloat(total);
|
|
||||||
$('#addvalue').val(parseFloat(total).toFixed(2));
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
intex = parseInt(intex)+1;
|
||||||
|
|
||||||
|
var bankdebitamount=$('#debitamount').val();
|
||||||
|
var totalvalue=$('#addvalue').val();
|
||||||
|
//var balanceamount=bankdebitamount-totalvalue;
|
||||||
|
// alert(bankdebitamount);
|
||||||
|
// alert(totalvalue);
|
||||||
|
|
||||||
|
// if(parseFloat(totalvalue)>=parseFloat(bankdebitamount))
|
||||||
|
// {
|
||||||
|
// alert('your checkbox is disabled beacause already mapped amount');
|
||||||
|
// $(".checkboxcheckbox").prop("disabled", true);
|
||||||
// GetAmount(i);
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
//alert(i)
|
|
||||||
var rr= $('#Rowid').val();
|
|
||||||
var ro= parseInt(rr)-1;
|
|
||||||
|
|
||||||
var Payment= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val());
|
var rr = $('#Rowid').val();
|
||||||
|
row = parseInt(rr)-1;
|
||||||
|
|
||||||
|
var Payment = parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val());
|
||||||
|
|
||||||
var Inid = document.getElementById ('igrlineitem'+i ).innerText
|
var Inid = document.getElementById ('igrlineitem'+i ).innerText
|
||||||
var ponovalue = Inid+','+Payment;
|
var ponovalue = i+','+Inid+','+Payment;
|
||||||
|
|
||||||
|
$.each(temppo,function(i,val){
|
||||||
|
|
||||||
var a = temppo.indexOf(ponovalue);
|
var a = temppo.indexOf(ponovalue);
|
||||||
//console.log(a);
|
var b = tempTotal.indexOf(Payment);
|
||||||
if(a!=-1)
|
//console.log(a);
|
||||||
{
|
if(a != -1){
|
||||||
|
//sconsole.log('if');
|
||||||
temppo.splice(a,1);
|
temppo.splice(a,1);
|
||||||
console.log(temppo);
|
//console.log(temppo);
|
||||||
}
|
}
|
||||||
//alert(Inid)
|
if(b!=-1)
|
||||||
for(s=1;s<=j;s++)
|
{
|
||||||
{
|
tempTotal.splice(ponovalue,1);
|
||||||
// alert(j+'else');
|
//console.log(tempTotal);
|
||||||
var ch= $('#hideigrline'+s).val();
|
}
|
||||||
if(Inid==ch)
|
});
|
||||||
{
|
|
||||||
|
|
||||||
var w=s;
|
calculategrandtotal();
|
||||||
//alert(w+'w');
|
|
||||||
delamount= $('#totala'+w).val();
|
|
||||||
//break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// //alert(w);
|
|
||||||
var tote= $('#addvalue').val();
|
|
||||||
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
|
|
||||||
tot=parseFloat(tot)- parseFloat(Payment);
|
|
||||||
$('#invoicepaymet'+i).val('');
|
$('#invoicepaymet'+i).val('');
|
||||||
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
|
|
||||||
|
|
||||||
|
|
||||||
//alert(ro);
|
$('#Rowid').val(row);
|
||||||
|
|
||||||
$('#Rowid').val(ro);
|
$('#invoicepaymet'+i).val('');
|
||||||
//$('#addvalue').val('');
|
$('#hidedate'+i).val('');
|
||||||
//$('#invoicepaymet'+i).val('');
|
$('#hidepono'+i).val('');
|
||||||
|
$('#hideigrno'+i).val('');
|
||||||
$('#hideigrline'+i).val('');
|
$('#hideigrline'+i).val('');
|
||||||
$('#date1'+i).val('');
|
$('#hidesupname'+i).val('');
|
||||||
$('#purchaseono'+i).val('');
|
$('#hidettlPoamt'+i).val('');
|
||||||
$('#supname'+i).val('');
|
$('#hideamtpaid'+i).val('');
|
||||||
$('#ttamnt'+i).val('');
|
|
||||||
$('#totala'+i).val('');
|
//$('#invoicepaymet'+i).remove();
|
||||||
//$('#aa'+i).val('');
|
$('#hidedate'+i).remove();
|
||||||
|
$('#hidepono'+i).remove();
|
||||||
|
$('#hideigrno'+i).remove();
|
||||||
|
$('#hideigrline'+i).remove();
|
||||||
|
$('#hidesupname'+i).remove();
|
||||||
|
$('#hidettlPoamt'+i).remove();
|
||||||
|
$('#hideamtpaid'+i).remove();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -553,165 +472,188 @@ else
|
|||||||
|
|
||||||
function GetAmount(i)
|
function GetAmount(i)
|
||||||
{
|
{
|
||||||
//alert('text');
|
//alert("onchnage function getamount"+i);
|
||||||
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
var amount = parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
|
||||||
|
|
||||||
var negative=0;
|
var negative=0;
|
||||||
if(amount<0)
|
if(amount<0)
|
||||||
{
|
{
|
||||||
negative=1;
|
negative=1;
|
||||||
alert("Invalid Amount")
|
alert("Invalid Amount")
|
||||||
$('#invoicepaymet'+i).val('');
|
$('#invoicepaymet'+i).val('');
|
||||||
}
|
}
|
||||||
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
|
||||||
|
var x = document.getElementById('checkboxcheckbox'+i).checked;
|
||||||
|
|
||||||
|
|
||||||
if(x==true )
|
if(x==true )
|
||||||
{
|
{
|
||||||
//alert(x);
|
|
||||||
var date= document.getElementById ( "date"+i ).innerText;
|
var date= document.getElementById ( "date"+i ).innerText;
|
||||||
var pono =document.getElementById ( "pono"+i ).innerText;
|
var pono =document.getElementById ( "pono"+i ).innerText;
|
||||||
var igr =document.getElementById ( "igrno"+i ).innerText;
|
var igr =document.getElementById ( "igrno"+i ).innerText;
|
||||||
var igrlineitem=document.getElementById ( "igrlineitem"+i ).innerText;
|
var igrlineitem=document.getElementById ( "igrlineitem"+i ).innerText;
|
||||||
|
|
||||||
var supname =document.getElementById ("sn"+i ).innerText;
|
var supname =document.getElementById ("sn"+i ).innerText;
|
||||||
var totalordervalue =document.getElementById ("tov"+i ).innerText;
|
var totalordervalue =document.getElementById ("tov"+i ).innerText;
|
||||||
var balancetopay=document.getElementById ( "qw"+i ).innerText;
|
var balancetopay =document.getElementById ( "qw"+i ).innerText;
|
||||||
|
|
||||||
for(k=1;k<=j-1;k++)
|
for(k=1;k<=i;k++)
|
||||||
{
|
{
|
||||||
//alert(k)
|
//alert(k);
|
||||||
var idcheck=$('#hideigrline'+k).val();
|
var idcheck=$('#igrlineitem'+k).val();
|
||||||
// alert(idcheck)
|
|
||||||
|
|
||||||
if(igrlineitem==idcheck)
|
if(igrlineitem == idcheck)
|
||||||
{
|
{
|
||||||
var cid=k;
|
var cid=k;
|
||||||
//alert(cid+'if');
|
|
||||||
//die();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(amount<=totalordervalue)
|
if(amount<=balancetopay)//amount paid value is less than or equal to total amount paid value means
|
||||||
{
|
{
|
||||||
//alert(cid+'cid');
|
|
||||||
$('#date1').val(date);
|
$('#hidedate'+cid).val(date);
|
||||||
$('#hideigrline'+cid).val(igrlineitem);
|
$('#hidepono'+cid).val(pono);
|
||||||
$('#supname'+cid).val(supname);
|
$('#hidesupname'+cid).val(supname);
|
||||||
$('#ttamnt'+cid).val(totalordervalue);
|
$('#hidettlPoamt'+cid).val(totalordervalue);
|
||||||
$('#totala'+cid).val(amount);
|
$('#hideamtpaid'+cid).val(amount);
|
||||||
|
$('#hideigrno'+cid).val(igr);
|
||||||
|
$('#hideigrline'+cid).val(igrlineitem);
|
||||||
|
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
var bid=$('#bankid').val();
|
var bid=$('#bankid').val();
|
||||||
//$('#inv_total'+cid).val(invoicepayment);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
|
{
|
||||||
alert('You are exceeding the payment get!!');
|
alert('You are exceeding the payment get!!');
|
||||||
$('#invoicepaymet'+i).val(amount)
|
$('#invoicepaymet'+i).val(amount)
|
||||||
location.reload();
|
// location.reload();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var tot11=0
|
$.each(temppo, function( index, value )
|
||||||
for(l=1;l<j;l++)
|
{
|
||||||
{
|
var res2 = value.split(',');
|
||||||
var Payingamount=parseFloat( $('#totala'+l).val() == '' ? '0.00' : $('#totala'+l).val());
|
if(res2[1] == igrlineitem){
|
||||||
tot11= parseFloat(tot11)+parseFloat(Payingamount);
|
|
||||||
|
|
||||||
$('#addvalue').val(parseFloat(tot11).toFixed(2));
|
temppo[index] = i+','+igrlineitem+','+amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
calculategrandtotal()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// //document.getElementById('checkboxcheckbox'+i).checked = false;
|
|
||||||
// $('#invoicepaymet'+i).val('');
|
|
||||||
// $('#addvalue').val('');
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function calculategrandtotal(){
|
||||||
|
|
||||||
|
$.each(temppo, function( index, value )
|
||||||
|
{
|
||||||
|
var res2 = value.split(',');
|
||||||
|
tempTotal[index]=parseFloat(res2[2]);
|
||||||
|
});
|
||||||
|
|
||||||
|
var sum = 0;
|
||||||
|
|
||||||
|
for (var i = 0; i < tempTotal.length; i++) {
|
||||||
|
sum += tempTotal[i] << 0;
|
||||||
|
}
|
||||||
|
$('#addvalue').val(parseFloat(sum).toFixed(2));
|
||||||
|
// console.log(tempTotal);
|
||||||
|
}
|
||||||
function Save()
|
function Save()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
var rowCount= $('#Rowid').val();
|
var rowCount= $('#Rowid').val();
|
||||||
var check= 0;
|
var check= 0;
|
||||||
var rw= 0;
|
var rw= 0;
|
||||||
for(i=1;i<=rowCount;i++)
|
for(i=1;i<=rowCount;i++)
|
||||||
{
|
{
|
||||||
//alert(i);
|
var arrval = temppo[i-1];
|
||||||
rw= parseFloat(rw)+1;
|
var number = arrval.split(',');
|
||||||
check = parseFloat(check)+1;
|
number = number[0];
|
||||||
var bankdebitamount=$('#debitamount').val();
|
|
||||||
|
rw= parseFloat(rw)+1;
|
||||||
|
|
||||||
|
check = parseFloat(check)+1;
|
||||||
|
var bankdebitamount=$('#debitamount').val();
|
||||||
|
|
||||||
|
var bid =$('#bankid').val();
|
||||||
|
|
||||||
|
|
||||||
|
var date =$('#hidedate'+number).val();
|
||||||
|
|
||||||
|
var pono =$('#hidepono'+number).val();
|
||||||
|
|
||||||
|
var igrno =$('#hideigrno'+number).val();
|
||||||
|
|
||||||
|
|
||||||
|
var igrlineitem =$('#hideigrline'+number).val();
|
||||||
|
|
||||||
|
|
||||||
|
var suppliername=$('#hidesupname'+number).val();
|
||||||
|
|
||||||
|
|
||||||
|
var totalordervalue=$('#hidettlPoamt'+number).val();
|
||||||
|
|
||||||
|
|
||||||
|
var amountpaid=$('#hideamtpaid'+number).val();
|
||||||
|
|
||||||
|
|
||||||
|
var invoicepaymet=$('#invoicepaymet'+number).val();
|
||||||
|
|
||||||
|
|
||||||
var bid=$('#bankid').val();
|
|
||||||
var date =$('#date1'+i).val();
|
|
||||||
var pono =$('#purchaseono'+i).val();
|
|
||||||
var igrno =$('#hideigrno'+i).val();
|
|
||||||
|
|
||||||
var igrlineitem =$('#hideigrline'+i).val();
|
|
||||||
var suppliername=$('#supname'+i).val();
|
|
||||||
//alert(suppliername);
|
|
||||||
var totalordervalue=$('#ttamnt'+i).val();
|
|
||||||
var amountpaid=$('#totala'+i).val();
|
|
||||||
//alert(amountpaid+'qw1');
|
|
||||||
var invoicepaymet=$('#invoicepaymet'+i).text();
|
|
||||||
// alert(invoicepaymet);
|
|
||||||
var totalvalue=$('#addvalue').val();
|
var totalvalue=$('#addvalue').val();
|
||||||
//alert(totalvalue);
|
|
||||||
if(totalvalue!=0)
|
|
||||||
{
|
|
||||||
var payment = parseFloat(amountpaid);
|
var payment = parseFloat(amountpaid);
|
||||||
|
|
||||||
|
|
||||||
var balnceamount=bankdebitamount-totalvalue;
|
var balnceamount=bankdebitamount-totalvalue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(parseFloat(bankdebitamount)>=parseFloat(totalvalue))
|
if(parseFloat(bankdebitamount)>=parseFloat(totalvalue))
|
||||||
{
|
{
|
||||||
//alert(date+'date');
|
|
||||||
//die();
|
|
||||||
//alert('you have remainining'+balnceamount);
|
|
||||||
$.ajax(
|
|
||||||
{
|
|
||||||
data:{podate:date,pono:pono,igrno:igrno,igrlineitem:igrlineitem,sname:suppliername,tot:totalordervalue,aa:amountpaid,ip:invoicepaymet,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
|
|
||||||
type:"POST",
|
|
||||||
url:"<?php echo base_url() ?>cashbook/receipt",
|
|
||||||
success:function(data)
|
|
||||||
{
|
|
||||||
if(data)
|
|
||||||
{
|
|
||||||
window.location.href ="Bankingstatement";
|
|
||||||
//location.reload();
|
|
||||||
|
|
||||||
}
|
$.ajax(
|
||||||
}
|
{
|
||||||
});
|
data:{podate:date,pono:pono,igrno:igrno,igrlineitem:igrlineitem,sname:suppliername,tot:totalordervalue,aa:invoicepaymet,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url() ?>cashbook/receipt",
|
||||||
|
success:function(data)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(data)
|
||||||
|
{
|
||||||
|
//$('#content').loader('hide');
|
||||||
|
//alert(data);
|
||||||
|
window.location.href ="Bankingstatement";
|
||||||
|
//location.reload();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else{
|
else{
|
||||||
|
|
||||||
alert('You are payment exceeding');
|
alert('Your payment exceeding ');
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function isNumberKey(evt)
|
function isNumberKey(evt)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -279,31 +279,36 @@
|
|||||||
<!--<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $rel->file ?>"-->
|
<!--<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="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="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->Balancetopay?></span></td>
|
||||||
<td align="left" id="aa<?php echo $i ?>"><span><?php echo $ap->Amountpaid?></span></td>
|
<td align="left" id="aa<?php echo $i ?>"><span><?php echo $ap->Amountpaid?></span></td>
|
||||||
<?php
|
<?php
|
||||||
if($ap->file=='')
|
if($ap->file !='')
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<td>No File</td>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrno(<?php echo $i ?>)"></i></a> </td>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
<td><a target="_blank" href="<?php echo base_url().''.$ap->file ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm">Download</button></a> </td>
|
else if($ap->Fpath !='')
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
<?php
|
?>
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
<td> <a data-toggle="tooltip"><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> -Attachment Available for Download/View" onclick="igrno(<?php echo $i ?>)"></i></a> </td>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} else
|
||||||
|
{ ?>
|
||||||
|
<td>N/A</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php }
|
||||||
|
|
||||||
<?php
|
|
||||||
if($ap->FilePath=='')
|
if($ap->FilePath=='')
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
@ -317,7 +322,7 @@
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
<a data-toggle="tooltip" ><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> - Click here to Delete details" onclick="pono(<?php echo $i ?>)"></i> </a>
|
<a data-toggle="tooltip" ><i class="fa fa-download" data-toggle="tooltip" title="<?php echo $record->pono; ?> - Attachment Available for Download/view" onclick="pono(<?php echo $i ?>)"></i> </a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!--<td> <button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#myModal">Download</button></td>-->
|
<!--<td> <button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#myModal">Download</button></td>-->
|
||||||
@ -473,14 +478,15 @@
|
|||||||
|
|
||||||
function pono(i)
|
function pono(i)
|
||||||
{
|
{
|
||||||
|
var igrno=$('#igrno'+i).text();
|
||||||
var pono=$('#pono'+i).text();
|
var pono=$('#pono'+i).text();
|
||||||
$("#Fileshow").modal('show');
|
$("#Fileshow").modal('show');
|
||||||
$.ajax(
|
$.ajax(
|
||||||
|
|
||||||
{
|
{
|
||||||
data:{pono:pono},
|
data:{igrno:igrno,pono:pono},
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>Filelist",
|
url:"<?php echo base_url() ?>cashbook/filelist",
|
||||||
success:function(data)
|
success:function(data)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -531,6 +537,81 @@ function pono(i)
|
|||||||
]
|
]
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
function igrno(i)
|
||||||
|
{
|
||||||
|
var igrno=$('#igrno'+i).text();
|
||||||
|
var pono =$('#pono'+i).text();
|
||||||
|
$("#Fileshow").modal('show');
|
||||||
|
$.ajax(
|
||||||
|
|
||||||
|
{
|
||||||
|
data:{igrno:igrno,pono:pono},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url() ?>cashbook/IGRFilelist",
|
||||||
|
success:function(data)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var trHTML = '';
|
||||||
|
var FilePath ='';
|
||||||
|
var Filename = '';
|
||||||
|
var PONO ='';
|
||||||
|
var BillNO ='';
|
||||||
|
|
||||||
|
$.each($.parseJSON(data),function (i, item) {
|
||||||
|
|
||||||
|
if(item.file == null)
|
||||||
|
{
|
||||||
|
// if(item.Remarks ==null)
|
||||||
|
// {
|
||||||
|
//alert()
|
||||||
|
PONO =item.PONO;
|
||||||
|
BillNO =item.BillNo;
|
||||||
|
Filename =item.FilePath;
|
||||||
|
FilePath = "<?php echo base_url()?>uploads/Igrfiles/"+item.FilePath;
|
||||||
|
// }else{
|
||||||
|
// Filename ="BillDetails";
|
||||||
|
// PONO =item.PONO;
|
||||||
|
// BillNO =item.BillNo;
|
||||||
|
// FilePath = item.FilePath;
|
||||||
|
// }
|
||||||
|
|
||||||
|
}else{
|
||||||
|
Filename = item.file;
|
||||||
|
PONO =item.pono;
|
||||||
|
BillNO = '-';
|
||||||
|
|
||||||
|
FilePath =item.file;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(Filename != null)
|
||||||
|
{
|
||||||
|
i=i+1;
|
||||||
|
i=i-1;
|
||||||
|
trHTML += '<tr id='+i+'>' +
|
||||||
|
'<td align="right">' + i + '</td>' +
|
||||||
|
'<td id="billno'+i+'">' + BillNO+ '</td>' +
|
||||||
|
'<td>' + PONO+ '</td>' +
|
||||||
|
|
||||||
|
'<td id="file'+i+'"><a target="_blank" href = '+FilePath+'>'+ Filename +'</a></td>' +
|
||||||
|
|
||||||
|
// '<td name="filepathname" id="filepathname" onclick="openbillmodel('+i+');"><i class="fa fa-pencil"></i></td>' +
|
||||||
|
'</tr>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#tbleAppend1").empty();
|
||||||
|
$('#Inwardgateregistertable1 > tbody').append(trHTML);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
169
application/views/editincomeexpenses.php
Executable file → Normal file
169
application/views/editincomeexpenses.php
Executable file → Normal file
@ -29,8 +29,17 @@ if(!empty($RecepitPayment))
|
|||||||
{
|
{
|
||||||
$document =$rd->document;
|
$document =$rd->document;
|
||||||
$final = base_url().$document;
|
$final = base_url().$document;
|
||||||
|
$bankamount=$rd->totalbankamount;
|
||||||
|
$bankid=$rd->ID;
|
||||||
|
$normalid=$rd->id;
|
||||||
$accountcode1=$rd->account_code;
|
$accountcode1=$rd->account_code;
|
||||||
$id=$rd->id;
|
$id=$rd->id;
|
||||||
|
$amounttype=$rd->amounttype;
|
||||||
|
$alreadypaid=$rd->Clearbalance;
|
||||||
|
$alreadyreceived=$rd->cclearbalance;
|
||||||
|
//echo $alreadypaid;
|
||||||
|
//echo $alreadyreceived;
|
||||||
|
$typeofmap=$rd->cashtype;
|
||||||
$type1=$rd->type;
|
$type1=$rd->type;
|
||||||
$viewdep=$rd->total;
|
$viewdep=$rd->total;
|
||||||
$dropdown=$rd->name;
|
$dropdown=$rd->name;
|
||||||
@ -116,6 +125,21 @@ if(!empty($PaymentMultiple))
|
|||||||
<form role="form" id="updateReceipt" action="<?php echo base_url() ?>cashbook/updateReceipt" enctype="multipart/form-data" method="post">
|
<form role="form" id="updateReceipt" action="<?php echo base_url() ?>cashbook/updateReceipt" enctype="multipart/form-data" method="post">
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
|
||||||
|
<div id="detail">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-md-offset-8" style="padding-left: 109px;">
|
||||||
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -5px;font-size:14px;background-color:#ccc;">
|
||||||
|
<!-- <p style="margin-left:62px;padding-top:30px;">Payment ID: <b><?php echo $bankid;?></b></p> -->
|
||||||
|
<center><b><p id="bankid">Payment ID: <b><?php echo $bankid;?><b></p></b></center>
|
||||||
|
<p style="margin-left:20px;">Total Amount: <b><?php echo $bankamount; ?></b>Rs</p>
|
||||||
|
<p style="margin-left:20px;">Payment Mode: <b>Bank</b></p>
|
||||||
|
<p style="margin-left:20px;" id="rembalance">Remaining Balance: <b><?php echo $balancetoupdate; ?></b>Rs</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<!-- <div class="col-md-3">
|
<!-- <div class="col-md-3">
|
||||||
@ -140,7 +164,15 @@ if(!empty($PaymentMultiple))
|
|||||||
<div class="col-md-3"><div class="form-group"><b>
|
<div class="col-md-3"><div class="form-group"><b>
|
||||||
<span for="towhome" id="towhom">Recevied From</span></b><span style="color:red">*</span></br></br>
|
<span for="towhome" id="towhom">Recevied From</span></b><span style="color:red">*</span></br></br>
|
||||||
<input type="text" class="form-control required" id="towhome" name="towhome" value="<?php echo $towhom1; ?>">
|
<input type="text" class="form-control required" id="towhome" name="towhome" value="<?php echo $towhom1; ?>">
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
|
<div class="col-md-3"><div class="form-group">
|
||||||
|
<b><span for="Suppliername">Select Supplier:</span> </b><span style="color:red">*</span></br></br>
|
||||||
|
<select class="form-control select2 required" id="supplier" name="supplier">
|
||||||
|
<option value="-1">Select Supplier</option>
|
||||||
|
</select>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
</div><!-- row -->
|
</div><!-- row -->
|
||||||
</div><!-- 12-md-->
|
</div><!-- 12-md-->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -260,6 +292,20 @@ if(!empty($PaymentMultiple))
|
|||||||
</div>-->
|
</div>-->
|
||||||
<form role="form" id="updatePayment" action="<?php echo base_url() ?>cashbook/updatePayment" enctype="multipart/form-data" method="post">
|
<form role="form" id="updatePayment" action="<?php echo base_url() ?>cashbook/updatePayment" enctype="multipart/form-data" method="post">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
<div id="detail">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-md-offset-8" style="padding-left: 109px;">
|
||||||
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -5px;font-size:14px;background-color:#ccc;">
|
||||||
|
<!-- <p style="margin-left:62px;padding-top:30px;">Payment ID: <b><?php echo $bankid;?></b></p> -->
|
||||||
|
<center><b><p id="bankid">Payment ID: <b><?php echo $bankid;?><b></p></b></center>
|
||||||
|
<p style="margin-left:20px;">Total Amount: <b><?php echo $bankamount; ?></b>Rs</p>
|
||||||
|
<p style="margin-left:20px;">Payment Mode: <b>Bank</b></p>
|
||||||
|
<p style="margin-left:20px;" id="rembalance">Remaining Balance: <b><?php echo $balancetoupdate; ?></b>Rs</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@ -273,6 +319,17 @@ if(!empty($PaymentMultiple))
|
|||||||
<input type="text" class="form-control required" id="PaymentPaidto" name="PaymentPaidto" value="<?php echo $towhom1; ?>">
|
<input type="text" class="form-control required" id="PaymentPaidto" name="PaymentPaidto" value="<?php echo $towhom1; ?>">
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
|
<div class="col-md-3"><div class="form-group">
|
||||||
|
<b><span for="Suppliername">Select Supplier:</span> </b><span style="color:red">*</span></br></br>
|
||||||
|
<select class="form-control select2" id="Paymentsupplier" name="Paymentsupplier">
|
||||||
|
<option value="-1">Select Supplier</option>
|
||||||
|
</select>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
<div class="col-md-3"><div class="form-group">
|
<div class="col-md-3"><div class="form-group">
|
||||||
<b><span for="PaymentMerchant">Merchant Name:</span></b></br></br>
|
<b><span for="PaymentMerchant">Merchant Name:</span></b></br></br>
|
||||||
<input type="text" class="form-control required" id="Paymentmerchant" name="Paymentmerchant" value="<?php echo $Merchant1; ?>">
|
<input type="text" class="form-control required" id="Paymentmerchant" name="Paymentmerchant" value="<?php echo $Merchant1; ?>">
|
||||||
@ -283,10 +340,7 @@ if(!empty($PaymentMultiple))
|
|||||||
<input id="Paymentmerchantgst" name="PaymentMerchantgst" class="form-control" value="<?php echo $MerchantGST1 ; ?>">
|
<input id="Paymentmerchantgst" name="PaymentMerchantgst" class="form-control" value="<?php echo $MerchantGST1 ; ?>">
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-3"><div class="form-group">
|
<div class="col-md-3"><div class="form-group">
|
||||||
<b><span for="Paymentvoucher">Voucher Code:</span></b><span style="color:red">*</span></br></br>
|
<b><span for="Paymentvoucher">Voucher Code:</span></b><span style="color:red">*</span></br></br>
|
||||||
<input id="Paymentvouchercode" name="Paymentvouchercode" value="<?php echo $invoiceno1; ?>" class="form-control" required onkeypress="return isNumberKey(event)" >
|
<input id="Paymentvouchercode" name="Paymentvouchercode" value="<?php echo $invoiceno1; ?>" class="form-control" required onkeypress="return isNumberKey(event)" >
|
||||||
@ -297,6 +351,12 @@ if(!empty($PaymentMultiple))
|
|||||||
<input id="Paymenthsn" name="Paymenthsn" class="form-control" value="<?php echo $HSNSAC1; ?>">
|
<input id="Paymenthsn" name="Paymenthsn" class="form-control" value="<?php echo $HSNSAC1; ?>">
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
<div class="col-md-3"><div class="form-group">
|
<div class="col-md-3"><div class="form-group">
|
||||||
<b><span for="ValuebeforeGST">Value before GST(₹):</span></b><!--<span style="color:red">*</span>--></br></br>
|
<b><span for="ValuebeforeGST">Value before GST(₹):</span></b><!--<span style="color:red">*</span>--></br></br>
|
||||||
<input id="PaymentvaluebeforegST" name="PaymentvaluebeforegST" style="text-align:right;" class="form-control" onkeypress="return isNumberKey(event)" value="<?php echo $valuebeforegst1; ?>" readonly>
|
<input id="PaymentvaluebeforegST" name="PaymentvaluebeforegST" style="text-align:right;" class="form-control" onkeypress="return isNumberKey(event)" value="<?php echo $valuebeforegst1; ?>" readonly>
|
||||||
@ -306,11 +366,7 @@ if(!empty($PaymentMultiple))
|
|||||||
<b><span for="SGST">SGST(₹):</span><span style="color:red">*</span></b></br></br>
|
<b><span for="SGST">SGST(₹):</span><span style="color:red">*</span></b></br></br>
|
||||||
<input type="text" class="form-control" style="text-align:right;" onchange="PaymentGSTvalue(this.id)" id="PaymentSGST" name="PaymentSGST" onkeypress="return isNumberKey(event)" value="<?php echo $SGST1; ?>">
|
<input type="text" class="form-control" style="text-align:right;" onchange="PaymentGSTvalue(this.id)" id="PaymentSGST" name="PaymentSGST" onkeypress="return isNumberKey(event)" value="<?php echo $SGST1; ?>">
|
||||||
</div> </div>
|
</div> </div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-3"><div class="form-group">
|
<div class="col-md-3"><div class="form-group">
|
||||||
<b><span for="CGST">CGST(₹):</span><span style="color:red">*</span></b></br></br>
|
<b><span for="CGST">CGST(₹):</span><span style="color:red">*</span></b></br></br>
|
||||||
<input type="text" class="form-control" id="PaymentCGST" style="text-align:right;" name="PaymentCGST" onkeypress="return isNumberKey(event)" onchange="PaymentGSTvalue(this.id)" value="<?php echo $CGST1; ?>">
|
<input type="text" class="form-control" id="PaymentCGST" style="text-align:right;" name="PaymentCGST" onkeypress="return isNumberKey(event)" onchange="PaymentGSTvalue(this.id)" value="<?php echo $CGST1; ?>">
|
||||||
@ -488,7 +544,18 @@ if(!empty($PaymentMultiple))
|
|||||||
//var drop=$("input[type=radio][name='range']:checked").val()
|
//var drop=$("input[type=radio][name='range']:checked").val()
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#supplier").select2();
|
var typeofmap = "<?php echo $typeofmap;?>";
|
||||||
|
//alert(typeofmap+'tom');
|
||||||
|
if(typeofmap=='Cash')
|
||||||
|
|
||||||
|
{
|
||||||
|
$('#detail').hide();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#detail').show();
|
||||||
|
}
|
||||||
var type = "<?php echo $type1;?>";
|
var type = "<?php echo $type1;?>";
|
||||||
//alert(type);
|
//alert(type);
|
||||||
if(type == "RECEIPT")
|
if(type == "RECEIPT")
|
||||||
@ -503,6 +570,86 @@ $(document).ready(function(){
|
|||||||
$('#myradio2').attr('checked','true');
|
$('#myradio2').attr('checked','true');
|
||||||
$('#towhom').text('Paid To:');
|
$('#towhom').text('Paid To:');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$("#supplier,#Paymentsupplier").select2();
|
||||||
|
|
||||||
|
/**** autocomplete ****/
|
||||||
|
$('#merchant').autocomplete({
|
||||||
|
|
||||||
|
onSearchStart: function (query) {
|
||||||
|
$('#merchant').autocomplete("option", "minLength", 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
serviceUrl: "<?php echo base_url();?>cashbook/autocomplete",
|
||||||
|
onSelect: function (suggestion) {
|
||||||
|
|
||||||
|
var data = suggestion.SupplierName;
|
||||||
|
var selectedvalue = $('input[name=merchant]').val();
|
||||||
|
if(selectedvalue != ' ' )
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
data:{id:selectedvalue},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>cashbook/getSupplierDtls",
|
||||||
|
success:function(data) {
|
||||||
|
var supplier_gstno = '';
|
||||||
|
if(data != '')
|
||||||
|
{
|
||||||
|
|
||||||
|
data = JSON.parse(data);
|
||||||
|
$.each(data,function(i,arr){
|
||||||
|
supplier_gstno = arr.GSTNO;
|
||||||
|
});
|
||||||
|
$("#merchantgst").val(supplier_gstno);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/**** receipt autocomplete ends here ********/
|
||||||
|
|
||||||
|
|
||||||
|
$('#Paymentmerchant').autocomplete({
|
||||||
|
|
||||||
|
onSearchStart: function (query) {
|
||||||
|
$('#Paymentmerchant').autocomplete("option", "minLength", 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
serviceUrl: "<?php echo base_url();?>cashbook/autocomplete",
|
||||||
|
onSelect: function (suggestion) {
|
||||||
|
|
||||||
|
var data = suggestion.SupplierName;
|
||||||
|
var selectedvalue = $('input[name=Paymentmerchant]').val();
|
||||||
|
if(selectedvalue != ' ' )
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
data:{id:selectedvalue},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>cashbook/getSupplierDtls",
|
||||||
|
success:function(data) {
|
||||||
|
var supplier_gstno = '';
|
||||||
|
if(data != '')
|
||||||
|
{
|
||||||
|
|
||||||
|
data = JSON.parse(data);
|
||||||
|
$.each(data,function(i,arr){
|
||||||
|
supplier_gstno = arr.GSTNO;
|
||||||
|
});
|
||||||
|
$("#Paymentmerchantgst").val(supplier_gstno);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**** payment autocomplete ends here ********/
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -524,10 +671,12 @@ $(function() {
|
|||||||
|
|
||||||
supp = <?php echo json_encode($getsupplier)?>;
|
supp = <?php echo json_encode($getsupplier)?>;
|
||||||
$.each(supp,function(s,supp){
|
$.each(supp,function(s,supp){
|
||||||
$("#supplier").append( $('<option></option>').val(supp.SupplierID).html(supp.SupplierID+' - '+supp.SupplierName));
|
$("#supplier,#Paymentsupplier").append( $('<option></option>').val(supp.SupplierID).html(supp.SupplierID+' - '+supp.SupplierName));
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#supplier option[value="<?php echo $supplier?>"]').prop('selected', true);
|
$('#supplier option[value="<?php echo $supplier?>"]').prop('selected', true);
|
||||||
|
$('#Paymentsupplier option[value="<?php echo $supplier?>"]').prop('selected', true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if('<?php echo $accountcode1 ?>' != '999'){
|
if('<?php echo $accountcode1 ?>' != '999'){
|
||||||
|
|||||||
2
application/views/income_expense_list.php
Executable file → Normal file
2
application/views/income_expense_list.php
Executable file → Normal file
@ -90,6 +90,7 @@
|
|||||||
<th>Account Type</th>
|
<th>Account Type</th>
|
||||||
<th>DATE</th>
|
<th>DATE</th>
|
||||||
<th>Account Name</th>
|
<th>Account Name</th>
|
||||||
|
<th>Cash Type</th>
|
||||||
<th>Amount(₹)</th>
|
<th>Amount(₹)</th>
|
||||||
<th>Details</th>
|
<th>Details</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
@ -108,6 +109,7 @@
|
|||||||
<td><?php echo '<a href="'.$base.'cashbook/incomeExpenseList/'.$l->id.'">'.$l->type.'</a>';?></td>
|
<td><?php echo '<a href="'.$base.'cashbook/incomeExpenseList/'.$l->id.'">'.$l->type.'</a>';?></td>
|
||||||
<td style="text-align:right;"><?php echo date_format(date_create($l->date),'d-m-Y');?></td>
|
<td style="text-align:right;"><?php echo date_format(date_create($l->date),'d-m-Y');?></td>
|
||||||
<td><?php if($l->type == 'PAYMENT' && $l->account_code == '999') { echo $l->description; } else {echo $l->name;}?></td>
|
<td><?php if($l->type == 'PAYMENT' && $l->account_code == '999') { echo $l->description; } else {echo $l->name;}?></td>
|
||||||
|
<td><?php echo $l->cashtype;?></td>
|
||||||
<td style="text-align:right;"><?php echo $l->total;?></td>
|
<td style="text-align:right;"><?php echo $l->total;?></td>
|
||||||
<td><?php echo $l->description;?></td>
|
<td><?php echo $l->description;?></td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@ -80,24 +80,24 @@
|
|||||||
{ $index = 0;
|
{ $index = 0;
|
||||||
foreach($IGR as $record)
|
foreach($IGR as $record)
|
||||||
{
|
{
|
||||||
// print_r($record);
|
//print_r($record);
|
||||||
$index = $index +1;
|
$index = $index +1;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr id="<?php echo $index ?>" >
|
<tr id="<?php echo $index ?>" >
|
||||||
<!-- <td style="text-align: center;"><?php echo $index?></td> -->
|
|
||||||
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<%=index%>" data-userid="<?php echo $record->IGRNO.",".$record->IGRItemNo ?>" > <u><?php echo $record->IGRNO ?></u></a></td>
|
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<%=index%>" data-userid="<?php echo $record->IGRNO ?>" > <u><?php echo $record->IGRNO ?></u></a></td>
|
||||||
<!-- <td><a data-toggle="modal" data-target="#Igrshow" data-id=""<%=index%>" data-userid="<?php echo $record->IGRNO ?>" > <u><?php echo $record->IGRNO ?></u></a></td>-->
|
|
||||||
<td><?php echo $record->PONO ?></a></td>
|
<td><?php echo $record->PONO ?></a></td>
|
||||||
<td><?php echo $record->SupplierName ?></td>
|
<td><?php echo $record->SupplierName ?></td>
|
||||||
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
|
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
|
||||||
<td align="right"><?php
|
<td align="right"><?php
|
||||||
$date = new DateTime($record->DeliveryChellanDate);
|
$date = new DateTime($record->DeliveryChellanDate);
|
||||||
echo $date->format('d-m-Y'); ?></td>
|
echo $date->format('d-m-Y'); ?></td>
|
||||||
<!-- <td><span data-toggle="tooltip" title="Quantity as per Invoice"><?php echo $record->Quantity ?></span></td> -->
|
|
||||||
<td><?php echo $record->MaterialName ?></td>
|
<td><?php echo $record->MaterialName ?></td>
|
||||||
<td><span data-toggle="tooltip" title="Quantity as per Received"><?php echo $record->QuantityAsPerInvoice ?></span></td>
|
<td><span data-toggle="tooltip" title="Quantity as per Received"><?php echo $record->QuantityAsPerInvoice ?></span></td>
|
||||||
<!-- <td><span data-toggle="tooltip" title="Quantity as per Received"><?php echo $record->QuantityAsPerInvoice."/".$record->Quantity ?></span></td>-->
|
|
||||||
<td><?php echo $record->VehicleNo ?></td>
|
<td><?php echo $record->VehicleNo ?></td>
|
||||||
<td><?php echo $record->CourierNo ?></td>
|
<td><?php echo $record->CourierNo ?></td>
|
||||||
<td>
|
<td>
|
||||||
@ -468,49 +468,17 @@ function filecheck()
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// // buttons: [ {name: 'copy', extend: 'copy', exportOptions: {columns: ':gt(0)', orthogonal: 'export'}} ]
|
|
||||||
// table = $('#Inwardgateregistertable').DataTable( {
|
|
||||||
// "dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
|
||||||
// "<'row'<'col-md-3'><'col-md-6'>>" +
|
|
||||||
// "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
|
||||||
// "lengthMenu": [ 25, 50, 75, 100 ], buttons: {
|
|
||||||
// extend: 'excelHtml5',
|
|
||||||
// footer: 'true',
|
|
||||||
// //messageTop: $('h3').text(),
|
|
||||||
// title: $('h3').text(),
|
|
||||||
// exportOptions: {
|
|
||||||
// //columns: ':lt(13)', orthogonal: 'export'
|
|
||||||
// columns: ':visible'}
|
|
||||||
// },
|
|
||||||
|
|
||||||
// ]
|
|
||||||
|
|
||||||
// } );
|
|
||||||
// } );
|
|
||||||
// $(function () {
|
|
||||||
// $('#Inwardgateregistertable').DataTable({
|
|
||||||
// "paging": true,
|
|
||||||
// "lengthChange": true,
|
|
||||||
// "searching": true,
|
|
||||||
// "ordering": true,
|
|
||||||
// "info": true,
|
|
||||||
// "autoWidth": true
|
|
||||||
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
$("#Fileshow").on("shown.bs.modal",function(e) {
|
$("#Fileshow").on("shown.bs.modal",function(e) {
|
||||||
//var id = $(this).attr('id');
|
//var id = $(this).attr('id');
|
||||||
|
|
||||||
var id = $(e.relatedTarget).data('userid');
|
var id = $(e.relatedTarget).data('userid');
|
||||||
//swal(id);
|
|
||||||
|
|
||||||
// SIA/2018-2019/10243.01
|
|
||||||
// IGRNO0505
|
|
||||||
|
|
||||||
var igr = id.substring(0, 9);
|
var igr = id.substring(0, 9);
|
||||||
|
// alert(igr);
|
||||||
var po = id.substring(10, 33);
|
var po = id.substring(10, 33);
|
||||||
|
//alert(po);
|
||||||
|
|
||||||
$("#hiddenIGRNO").val(igr);
|
$("#hiddenIGRNO").val(igr);
|
||||||
$("#hiddenPONO").val(po);
|
$("#hiddenPONO").val(po);
|
||||||
@ -538,14 +506,16 @@ $("#hiddenPONO").val(po);
|
|||||||
$.each(JSON.parse(file), function (i, item)
|
$.each(JSON.parse(file), function (i, item)
|
||||||
{
|
{
|
||||||
if(item.file == null)
|
if(item.file == null)
|
||||||
{ if(item.Remarks ==null)
|
{
|
||||||
{
|
// if(item.Remarks ==null)
|
||||||
|
// {
|
||||||
//alert()
|
//alert()
|
||||||
PONO =item.PONO;
|
PONO =item.PONO;
|
||||||
BillNO =item.BillNo;
|
BillNO =item.BillNo;
|
||||||
Filename =item.FilePath;
|
Filename =item.FilePath;
|
||||||
FilePath = "<?php echo base_url()?>uploads/Igrfiles/"+item.FilePath;
|
FilePath = "<?php echo base_url()?>uploads/Igrfiles/"+item.FilePath;
|
||||||
// }else{
|
//}
|
||||||
|
// else{
|
||||||
// Filename ="BillDetails";
|
// Filename ="BillDetails";
|
||||||
// PONO =item.PONO;
|
// PONO =item.PONO;
|
||||||
// BillNO =item.BillNo;
|
// BillNO =item.BillNo;
|
||||||
@ -573,7 +543,7 @@ $("#hiddenPONO").val(po);
|
|||||||
'</tr>';
|
'</tr>';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
$("#tblefile").empty();
|
$("#tblefile").empty();
|
||||||
|
|
||||||
@ -593,6 +563,7 @@ $("#hiddenPONO").val(po);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function openbillmodel(i){
|
function openbillmodel(i){
|
||||||
|
|
||||||
// alert(i);
|
// alert(i);
|
||||||
@ -633,14 +604,16 @@ $("#hiddenPONO").val(po);
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script>
|
|
||||||
$("#Igrshow").on("shown.bs.modal", function(e) {
|
|
||||||
//var igr = $(e.relatedTarget).data('userid');
|
|
||||||
var igr_nos = $(e.relatedTarget).data('id');
|
|
||||||
var igr = igr_nos.split(',');
|
|
||||||
igr = igr[1];
|
|
||||||
|
|
||||||
//alert(igr_nos+igr);
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$("#Igrshow").on("shown.bs.modal", function(e) {
|
||||||
|
var igr = $(e.relatedTarget).data('userid');
|
||||||
|
// alert(igr);
|
||||||
|
|
||||||
|
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:igr},
|
data:{id:igr},
|
||||||
@ -652,12 +625,11 @@ $("#Igrshow").on("shown.bs.modal", function(e) {
|
|||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
var trHTML = '';
|
var trHTML = '';
|
||||||
$.each(JSON.parse(data), function (i, item) {
|
$.each(JSON.parse(data), function (i, item) {
|
||||||
//alert(igr + item.IGRNO);
|
if(igr == item.IGRNO)
|
||||||
//if(igr == item.IGRNO)
|
|
||||||
if(igr == item.IGRItemNo)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
$("#IGRNO1").val(item.IGRNO);
|
$("#IGRNO1").val(item.IGRNO);
|
||||||
|
|
||||||
$("#PONo").val(item.PONO);
|
$("#PONo").val(item.PONO);
|
||||||
$("#Supplier").val(item.SupplierName);
|
$("#Supplier").val(item.SupplierName);
|
||||||
$("#Add1").val(item.Address);
|
$("#Add1").val(item.Address);
|
||||||
@ -697,8 +669,8 @@ $("#Igrshow").on("shown.bs.modal", function(e) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
@ -717,12 +689,13 @@ counter++;
|
|||||||
|
|
||||||
var bil_count = +counter+ +file_count;
|
var bil_count = +counter+ +file_count;
|
||||||
|
|
||||||
// alert(bil_count);
|
//swal(bil_count);
|
||||||
// alert(file_count);
|
//swal(file_count);
|
||||||
if(bil_count>=6){
|
|
||||||
|
if(bil_count>6){
|
||||||
|
|
||||||
swal("You have to upload five files only");//this allows only 5 files;
|
swal("You have to upload five files only");//this allows only 5 files;
|
||||||
$('#addmorebutton').hide();
|
//$('#addmorebutton').hide();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -736,17 +709,12 @@ counter++;
|
|||||||
div.className="row";
|
div.className="row";
|
||||||
//alert(counter);
|
//alert(counter);
|
||||||
div.innerHTML='<div class="col-md-12">'+
|
div.innerHTML='<div class="col-md-12">'+
|
||||||
// '<div class="col-md-3">'+
|
|
||||||
// '<label>File Name</label>'+
|
|
||||||
// '<input type="text" id="maint_filename'+counterConstant+'" name="filename'+counterConstant+'" class="form-control" onkeypress="return false;" readonly/>'+
|
|
||||||
// '</div>'+
|
|
||||||
'<div class="col-md-3">'+
|
'<div class="col-md-3">'+
|
||||||
'<label><br></label>'+
|
'<label><br></label>'+
|
||||||
'<input type="file" name="browseFiles" id="images'+counter+'" ><br>'+
|
'<input type="file" name="browseFiles" id="images'+counter+'" ><br>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
// '<div class="col-md-3">'
|
|
||||||
// '<label><br><br></label>'+
|
|
||||||
// '<button class="btn btn-danger remove remove_this" id="removebtn'+counterConstant+'" onclick="removeRow(this.id)"><i class="fa fa-trash"></i> Remove</button></div>'+
|
|
||||||
'<div class="col-md-2">'+
|
'<div class="col-md-2">'+
|
||||||
'<label><br><br></label>'+
|
'<label><br><br></label>'+
|
||||||
'<button class="btn btn-primary" type ="button" id="addbtn" onclick="addRow()">ADD</button></div>'+
|
'<button class="btn btn-primary" type ="button" id="addbtn" onclick="addRow()">ADD</button></div>'+
|
||||||
@ -777,7 +745,7 @@ counter++;
|
|||||||
|
|
||||||
if (file == '')
|
if (file == '')
|
||||||
{
|
{
|
||||||
alert('File not found');
|
swal('File not found');
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -785,29 +753,7 @@ counter++;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fileupload(counter)
|
||||||
|
|
||||||
// function Copyfilename(id)
|
|
||||||
// {
|
|
||||||
// var size = $('input[name='+id+']')[0].files[0].size;
|
|
||||||
|
|
||||||
// var number = id.replace(/[^0-9]+/ig,"");
|
|
||||||
// if(size > 2100000){
|
|
||||||
// //alert(id);
|
|
||||||
// alert('Sorry Your File is Large To 2MB');
|
|
||||||
// removeRow(id);
|
|
||||||
// //$('input[name = browseFiles'+number+']').val(' ');
|
|
||||||
// }else {
|
|
||||||
// var name = $('input[name='+id+']')[0].files[0].name;
|
|
||||||
// //alert(name);
|
|
||||||
// $("#maint_filename"+number).val(name);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function fileupload(counter)
|
|
||||||
{
|
{
|
||||||
//alert(counter);
|
//alert(counter);
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user