bank statement mapping based on inward summary
This commit is contained in:
parent
4f84d6795e
commit
0cf127b637
@ -1114,8 +1114,8 @@ class cashbook extends BaseController
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$fdate = $this->input->post('from_date');
|
||||
$tdate = $this->input->post('to_date');
|
||||
$igrlineitem= $_GET['sid'];
|
||||
$data['debitmapping'] = $this->cashbook_model->debitlistpo($igrlineitem);
|
||||
$pono= $_GET['sid'];
|
||||
$data['debitmapping'] = $this->cashbook_model->debitlistpo($pono);
|
||||
$this->loadViews("bankposettlement", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
@ -1148,8 +1148,8 @@ class cashbook extends BaseController
|
||||
$bankdate = date_create($bankdate);//,'Y-m-d');
|
||||
$bankdate = date_format($bankdate,'Y-m-d');
|
||||
$pono = $this->input->post('pono');
|
||||
$igrno=$this->input->post('igrno');
|
||||
$igrlineitem=$this->input->post('igrlineitem');
|
||||
// $igrno=$this->input->post('igrno');
|
||||
// $igrlineitem=$this->input->post('igrlineitem');
|
||||
|
||||
$sname = $this->input->post('sname');
|
||||
$sid = $this->input->post('sid');
|
||||
@ -1208,7 +1208,7 @@ class cashbook extends BaseController
|
||||
}
|
||||
$earlypaid = 0;
|
||||
//echo $earlypaid;
|
||||
$earlypaid = $this->cashbook_model->getearlyamount($igrlineitem);
|
||||
$earlypaid = $this->cashbook_model->getearlyamount($pono);
|
||||
if(empty($earlypaid))
|
||||
{
|
||||
$ePay=0;
|
||||
@ -1228,7 +1228,8 @@ class cashbook extends BaseController
|
||||
|
||||
$amtpaid= ($ip+$ePay);
|
||||
$IsActive=1;
|
||||
|
||||
$igrno='IGR';
|
||||
$igrlineitem='IGRLINo';
|
||||
$podata1 = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'SupplierID'=>$sid,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IGRLineItemNo'=>$igrlineitem,'IsActive'=>$IsActive,'BankDate'=>$bankdate);
|
||||
|
||||
$resultn = $this->cashbook_model->mappingpo($podata1);
|
||||
@ -1236,7 +1237,7 @@ class cashbook extends BaseController
|
||||
$podata = array('Podate'=>$date,'PONO'=>$pono,'IGRNO'=>$igrno,'Suppliername'=>$sname,'SupplierID'=>$sid,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid,'IGRLineItemNo'=>$igrlineitem,'IsActive'=>$IsActive,'BankDate'=>$bankdate);
|
||||
//die();
|
||||
|
||||
$result3 = $this->cashbook_model->getpono($igrlineitem);
|
||||
$result3 = $this->cashbook_model->getpono($pono);
|
||||
|
||||
|
||||
if(count($result3)<=0)
|
||||
@ -1248,7 +1249,7 @@ class cashbook extends BaseController
|
||||
else
|
||||
{
|
||||
//echo "update";
|
||||
$result3 = $this->cashbook_model->poupdate($podata,$igrlineitem);
|
||||
$result3 = $this->cashbook_model->poupdate($podata,$pono);
|
||||
|
||||
}
|
||||
if($rw == $rowcount)
|
||||
@ -1260,16 +1261,17 @@ class cashbook extends BaseController
|
||||
$now = date('Y-m-d H:i:s');
|
||||
if($balancetopay==0)
|
||||
{
|
||||
$igrstatus=AMOUNT_PAIDIGR;
|
||||
$postatus=AMOUNT_PAIDIGR;
|
||||
}
|
||||
else
|
||||
{
|
||||
$igrstatus=PARTIALLY_PAIDIGR;
|
||||
$postatus=PARTIALLY_PAIDIGR;
|
||||
|
||||
}
|
||||
$igrdetails=array('BankStatus'=>$igrstatus,'StatusUpdatedDate'=>$now);
|
||||
$result1 = $this->cashbook_model->igrdetailstatus($igrdetails,$igrlineitem);
|
||||
//$result1 = $this->cashbook_model->poamountstatus($pomaster,$pono);
|
||||
$podetails=array('Paymentstatus'=>$postatus,'StatusUpdatedDate'=>$now);
|
||||
//$podetails=array('Paymentstatus'=>$postatus);
|
||||
//$result1 = $this->cashbook_model->igrdetailstatus($podetails,$pono);
|
||||
$result1 = $this->cashbook_model->poamountstatus($podetails,$pono);
|
||||
$this->loadViews("bankstatement", $this->global,$data, NULL);
|
||||
}
|
||||
public function invoiceamount1()
|
||||
@ -1888,6 +1890,7 @@ class cashbook extends BaseController
|
||||
$id=$this->input->post('mappingid');
|
||||
|
||||
$igrno = $this->input->post('IGRItemNo');
|
||||
$pono = $this->input->post('pono');
|
||||
$Bankid = $this->input->post('bankid');
|
||||
$balancetoclear=$this->input->post('balancetobankingclear');
|
||||
$clearedbalance=$this->input->post('clearbalance');
|
||||
@ -1895,22 +1898,22 @@ class cashbook extends BaseController
|
||||
$updatebalancetoclear=$Amount+$balancetoclear;
|
||||
$data['$bankmappingamount'] = $this->cashbook_model->gettotalbankmappingpo($id);
|
||||
$amountpaid=$data['$bankmappingamount'][0]->Amountpaid;
|
||||
$data['$bankmappingamountcount'] = $this->cashbook_model->gettotalbankmappingpocount($igrno);
|
||||
$data['$bankmappingamountcount'] = $this->cashbook_model->gettotalbankmappingpocount($pono);
|
||||
$count= $data['$bankmappingamountcount'][0]->countAmountpaid;
|
||||
//$data['$totallineitemamount']=$this->cashbook_model->gettotallineitem($igrno);
|
||||
|
||||
if($count==1)
|
||||
{
|
||||
$BankStatus=NO_PAIDIGR;
|
||||
$PaymentStatus=NO_PAIDIGR;
|
||||
}
|
||||
else
|
||||
{
|
||||
$BankStatus=PARTIALLY_PAIDIGR;
|
||||
$PaymentStatus=PARTIALLY_PAIDIGR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$result= $this->cashbook_model->IgrDetailsStatusUpdate($igrno,$BankStatus);
|
||||
$result= $this->cashbook_model->PoStatusUpdate($pono,$PaymentStatus);
|
||||
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear);
|
||||
//for update mapping amount in t_bankmappingpo table//
|
||||
$balancetopay=$this->input->post('balancetopay');
|
||||
@ -1919,7 +1922,7 @@ class cashbook extends BaseController
|
||||
//$updateamount=0;
|
||||
$IsActive=0;
|
||||
$result2= $this->cashbook_model->deleteBankmappingpo($id,$IsActive);
|
||||
$data['$poreportamount'] = $this->cashbook_model->gettotalbankpoamount($igrno);
|
||||
$data['$poreportamount'] = $this->cashbook_model->gettotalbankpoamount($pono);
|
||||
$amountpaidpo= $data['$poreportamount'][0]->Amountpaid;
|
||||
$balancetopaypo= $data['$poreportamount'][0]->Balancetopay;
|
||||
$amountpaidupdate=($amountpaidpo) - ($Amount);
|
||||
@ -1932,7 +1935,7 @@ class cashbook extends BaseController
|
||||
{
|
||||
$IsAct=1;
|
||||
}
|
||||
$result3= $this->cashbook_model->updateBankporeport($igrno,$balancetopayupdate,$amountpaidupdate,$IsAct);
|
||||
$result3= $this->cashbook_model->updateBankporeport($pono,$balancetopayupdate,$amountpaidupdate,$IsAct);
|
||||
$this->loadViews("bankstatement", $this->global,$data, NULL);
|
||||
}
|
||||
public function Deletemappingpo()
|
||||
@ -1940,7 +1943,7 @@ public function Deletemappingpo()
|
||||
$totalamount = $_GET['totalpoamount'];//totalpoamount
|
||||
$Bankid = $_GET['bankid'];
|
||||
$Amount = $_GET['amount'];//paid amount
|
||||
$igrno = $_GET['igrno'];
|
||||
$pono = $_GET['pono'];
|
||||
$balancetoclear=$_GET['balancetoclear'];
|
||||
//for T_Bankreport IsActive//
|
||||
$bankdebit=$_GET['debit'];
|
||||
@ -1953,21 +1956,21 @@ public function Deletemappingpo()
|
||||
$updatebalancetoclear=$Amount+$balancetoclear;
|
||||
$data['$bankmappingamount'] = $this->cashbook_model->gettotalbankmappingpo($id);
|
||||
$amountpaid=$data['$bankmappingamount'][0]->Amountpaid;
|
||||
$data['$bankmappingamountcount'] = $this->cashbook_model->gettotalbankmappingpocount($igrno);
|
||||
$data['$bankmappingamountcount'] = $this->cashbook_model->gettotalbankmappingpocount($pono);
|
||||
$count= $data['$bankmappingamountcount'][0]->countAmountpaid;
|
||||
|
||||
|
||||
if($count==1)
|
||||
{
|
||||
$BankStatus=NO_PAIDIGR;
|
||||
$PaymentStatus=NO_PAIDIGR;
|
||||
}
|
||||
else
|
||||
{
|
||||
$BankStatus=PARTIALLY_PAIDIGR;
|
||||
$PaymentStatus=PARTIALLY_PAIDIGR;
|
||||
}
|
||||
|
||||
|
||||
$result= $this->cashbook_model->IgrDetailsStatusUpdate($igrno,$BankStatus);
|
||||
$result= $this->cashbook_model->PoStatusUpdate($pono,$PaymentStatus);
|
||||
$result1= $this->cashbook_model->deletemapping($Bankid,$updateamount,$updatebalancetoclear);
|
||||
//for update mapping amount in t_bankreport table//
|
||||
$balancetopay=$_GET['balancetopay'];//balancetopay
|
||||
@ -1976,7 +1979,7 @@ public function Deletemappingpo()
|
||||
$updatebankpoamount=$totalamount-$totalbalancetopay;
|
||||
$result2= $this->cashbook_model->deleteBankmappingpo($id,$IsActive);
|
||||
//$result3= $this->cashbook_model->updatemappingamount($igrno,$amountpaid);
|
||||
$data['$poreportamount'] = $this->cashbook_model->gettotalbankpoamount($igrno);
|
||||
$data['$poreportamount'] = $this->cashbook_model->gettotalbankpoamount($pono);
|
||||
$amountpaidpo= $data['$poreportamount'][0]->Amountpaid;
|
||||
$balancetopay= $data['$poreportamount'][0]->Balancetopay;
|
||||
$amountpaidupdate=$amountpaidpo-$Amount;
|
||||
@ -1991,7 +1994,7 @@ public function Deletemappingpo()
|
||||
{
|
||||
$IsAct=1;
|
||||
}
|
||||
$result3= $this->cashbook_model->updateBankporeport($igrno,$balancetopayupdate,$amountpaidupdate,$IsAct);
|
||||
$result3= $this->cashbook_model->updateBankporeport($pono,$balancetopayupdate,$amountpaidupdate,$IsAct);
|
||||
|
||||
if(count($result3)>0)
|
||||
{
|
||||
|
||||
@ -381,9 +381,9 @@ function add($pathname)
|
||||
$RegNo = $Req[0]['ReqNo'];
|
||||
}
|
||||
|
||||
|
||||
$paymentstatus = NO_PAIDIGR;
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$ServiceWorkStatus,'POType'=>$POType,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'Description_Of_Service'=>$DescriptionOfPo,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'BudgetType'=>$BudgetType);
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$ServiceWorkStatus,'POType'=>$POType,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'Description_Of_Service'=>$DescriptionOfPo,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'BudgetType'=>$BudgetType,'Paymentstatus'=>$paymentstatus);
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$ServiceTypeOptions);
|
||||
$PONO = '';
|
||||
@ -686,7 +686,8 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
$RegNo = $Req[0]['ReqNo'];
|
||||
}
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||
$paymentstatus = NO_PAIDIGR;
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType,'Paymentstatus'=>$paymentstatus);
|
||||
//print_r($POList);
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);
|
||||
|
||||
|
||||
@ -1098,8 +1098,9 @@ function edited(){
|
||||
$Local_Interstate=$this->input->post('Range');
|
||||
|
||||
$Qualitycheck=1;
|
||||
$paymentstatus = NO_PAIDIGR;
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType,'Paymentstatus'=>$paymentstatus);
|
||||
|
||||
// print_r($POList);
|
||||
// die();
|
||||
@ -2047,8 +2048,8 @@ function addNewImportPurchaseOrder()
|
||||
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType);
|
||||
|
||||
$Qualitycheck=1;
|
||||
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$Insurance,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||
$paymentstatus = NO_PAIDIGR;
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$Insurance,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType,'Paymentstatus'=>$paymentstatus);
|
||||
|
||||
//print_r($POList);
|
||||
//die();
|
||||
@ -2750,8 +2751,8 @@ if($Quantity != $b4qty)
|
||||
$currencytypeID = $this->input->post('currencytype');
|
||||
|
||||
$Qualitycheck=1;
|
||||
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||
$paymentstatus = NO_PAIDIGR;
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType,'Paymentstatus'=>$paymentstatus);
|
||||
|
||||
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin);
|
||||
|
||||
|
||||
1813
application/logs/log-2018-11-27.php
Normal file
1813
application/logs/log-2018-11-27.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -428,85 +428,100 @@ function clearedcreditbalance(){
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
|
||||
}
|
||||
function debitbankstatemet($Supplierid,$fdate,$tdate){
|
||||
function debitbankstatemet(){
|
||||
|
||||
$this->db->select('pom.PONO,pom.TotalOrderValue,pom.PODate,sd.SupplierName,sd.SupplierID,
|
||||
bm.Balancetopay,bm.Amountpaid');
|
||||
$this->db->from ('T_PurchaseOrder_Master pom');
|
||||
$this->db->join('T_Bankporeport bm','bm.PONO=pom.PONO','left');
|
||||
$this->db->join('T_SupplierDetailsN sd','sd.SupplierID=pom.SupplierID','left');
|
||||
$this->db->where('pom.Status','ST027');
|
||||
$this->db->or_where('pom.Status','ST056');
|
||||
$this->db->where('pom.Paymentstatus !=','ST070');
|
||||
$this->db->group_by('pom.PONO');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
|
||||
|
||||
$sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as PONO,im.IGRNO,id.IGRItemNo,im.MaterialRcvdDate as CreatedDate,br.Balancetopay,br.Amountpaid,sd.SupplierName as SupplierName,sd.SupplierID as SupplierID,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(rt.SGST/100)),
|
||||
(id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(st.SGST /100))),0),2) as sgst,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(rt.CGST/100)),
|
||||
(id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(st.CGST /100))),0),2) as cgst,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(rt.IGST/100)),
|
||||
(id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(st.IGST /100))),0),2) as igst,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * pl.Rate)- (rt.AfterDiscount),
|
||||
(id.QuantityAsPerInvoice * pl.Rate)- (st.Afterdiscountval)),0),2) as discount,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * pl.Rate) + (rt.AfterFreightValue),
|
||||
(id.QuantityAsPerInvoice * pl.Rate) + (st.AfterFreightValue)),0),2) as freight,
|
||||
round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * pl.Rate) +(rt.AfterPackagingValue),0),0),2) as Package,
|
||||
|
||||
round((
|
||||
if(POType = 'IMPORT',(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
if(POType = 'CAPITAL' && CapitalRange = 0,(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
ifnull((id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
(id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
|
||||
(id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
|
||||
(id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
|
||||
(id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
|
||||
+ round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
|
||||
- round(ifnull(if(POType = 'REVENUE',
|
||||
(id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
|
||||
(id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total
|
||||
from T_IGR_Master im
|
||||
left join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
|
||||
join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
|
||||
left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
left join T_Bankporeport br on br.IGRLineItemNo=id.IGRItemNo and br.IsActive = 1
|
||||
where im.IGRStatus = 'ST027' and id.BankStatus!='ST070'";
|
||||
|
||||
|
||||
if ($Supplierid!= '')
|
||||
{
|
||||
|
||||
$sql.="and sd.SupplierID = '".$Supplierid."'";
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($fdate and $tdate != ''){
|
||||
$fromd= date("Y-m-d",strtotime($fdate));
|
||||
$tod=date("Y-m-d",strtotime($tdate));
|
||||
|
||||
$sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
and date(im.CreatedDate) <= '".$tod."'";
|
||||
|
||||
}
|
||||
// function debitbankstatemet($Supplierid,$fdate,$tdate){
|
||||
|
||||
|
||||
// $sql="select im.IGRNO as igrn,pm.POType as potype,im.PONO as PONO,im.IGRNO,id.IGRItemNo,im.MaterialRcvdDate as CreatedDate,br.Balancetopay,br.Amountpaid,sd.SupplierName as SupplierName,sd.SupplierID as SupplierID,
|
||||
// round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(rt.SGST/100)),
|
||||
// (id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(st.SGST /100))),0),2) as sgst,
|
||||
// round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(rt.CGST/100)),
|
||||
// (id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(st.CGST /100))),0),2) as cgst,
|
||||
// round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(rt.IGST/100)),
|
||||
// (id.QuantityAsPerInvoice * pl.Rate)+((id.QuantityAsPerInvoice * pl.Rate)*(st.IGST /100))),0),2) as igst,
|
||||
// round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * pl.Rate)- (rt.AfterDiscount),
|
||||
// (id.QuantityAsPerInvoice * pl.Rate)- (st.Afterdiscountval)),0),2) as discount,
|
||||
// round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * pl.Rate) + (rt.AfterFreightValue),
|
||||
// (id.QuantityAsPerInvoice * pl.Rate) + (st.AfterFreightValue)),0),2) as freight,
|
||||
// round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * pl.Rate) +(rt.AfterPackagingValue),0),0),2) as Package,
|
||||
|
||||
// round((
|
||||
// if(POType = 'IMPORT',(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
// if(POType = 'CAPITAL' && CapitalRange = 0,(pm.ExchangeRate * (id.QuantityAsPerInvoice * pl.Rate)),
|
||||
// ifnull((id.QuantityAsPerInvoice * pl.Rate),0)))
|
||||
// + round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * rt.AfterSGST / pl.Quantity),
|
||||
// (id.QuantityAsPerInvoice * st.After_SGST / pl.Quantity)),0),2)
|
||||
// + round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * rt.AfterCGST / pl.Quantity),
|
||||
// (id.QuantityAsPerInvoice * st.After_CGST / pl.Quantity)),0),2)
|
||||
// + round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * rt.AfterIGST / pl.Quantity),
|
||||
// (id.QuantityAsPerInvoice * st.After_IGST / pl.Quantity)),0),2)
|
||||
// + round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * rt.AfterFreightValue / pl.Quantity),
|
||||
// (id.QuantityAsPerInvoice * st.AfterFreightValue / pl.Quantity)),0),2)
|
||||
// + round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * rt.AfterPackagingValue / pl.Quantity),0),0),2)
|
||||
// - round(ifnull(if(POType = 'REVENUE',
|
||||
// (id.QuantityAsPerInvoice * rt.AfterDiscount / pl.Quantity),
|
||||
// (id.QuantityAsPerInvoice * st.Afterdiscountval / pl.Quantity)),0),2)),2) as total
|
||||
// from T_IGR_Master im
|
||||
// left join T_PurchaseOrder_LineItem pl on pl.PONO = im.PONO
|
||||
// join T_IGR_Details id on id.IGRNO = im.IGRNO and id.MaterialCode = pl.MaterialCode
|
||||
// join T_PurchaseOrder_Master pm on pm.PONO = pl.PONO
|
||||
// left join T_SupplierDetailsN sd on sd.SupplierID = pm.SupplierID
|
||||
// left join T_Service_Tax st on st.LineItemNo = pl.LineItemNo
|
||||
// left join T_Revenue_Tax rt on rt.LineItemNo = pl.LineItemNo
|
||||
// left join T_Bankporeport br on br.IGRLineItemNo=id.IGRItemNo and br.IsActive = 1
|
||||
// where im.IGRStatus = 'ST027' and id.BankStatus!='ST070'";
|
||||
|
||||
|
||||
// if ($Supplierid!= '')
|
||||
// {
|
||||
|
||||
// $sql.="and sd.SupplierID = '".$Supplierid."'";
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// if ($fdate and $tdate != ''){
|
||||
// $fromd= date("Y-m-d",strtotime($fdate));
|
||||
// $tod=date("Y-m-d",strtotime($tdate));
|
||||
|
||||
// $sql.="and date(im.CreatedDate) >= '".$fromd."'
|
||||
// and date(im.CreatedDate) <= '".$tod."'";
|
||||
|
||||
// }
|
||||
|
||||
|
||||
$sql.="group by id.IGRItemNo";
|
||||
//echo $sql;
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
// $sql.="group by id.IGRItemNo";
|
||||
// //echo $sql;
|
||||
// $query = $this->db->query($sql);
|
||||
// return $query->result();
|
||||
// }
|
||||
// function debitbankstatemet1(){
|
||||
|
||||
|
||||
@ -1078,7 +1093,7 @@ function receiptdata()
|
||||
and date(bm.BankDate) <= '".$todate."'";
|
||||
$this->db->where($date);
|
||||
}
|
||||
$this->db->group_by('bm.IGRLineItemNo');
|
||||
$this->db->group_by('bm.id');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
|
||||
@ -1459,12 +1474,12 @@ function receiptdata()
|
||||
|
||||
}
|
||||
|
||||
function debitlistpo($igrlineitem)
|
||||
function debitlistpo($pono)
|
||||
{
|
||||
$this->db->select('bmp.mid,bmp.PONO,bmp.IGRLineItemNo,bmp.Amountpaid,br.Narration');
|
||||
$this->db->from ('T_Bankmappingpo as bmp');
|
||||
$this->db->join('T_bankreport br','br.ID = bmp.mid');
|
||||
$this->db->where('bmp.IGRLineItemNo',$igrlineitem);
|
||||
$this->db->where('bmp.PONO',$pono);
|
||||
$this->db->where('bmp.IsActive',1);
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
@ -1682,10 +1697,10 @@ function receiptdata()
|
||||
|
||||
}
|
||||
|
||||
public function poupdate($podata,$igrlineitem)
|
||||
public function poupdate($podata,$pono)
|
||||
{
|
||||
|
||||
$this->db->where('IGRLineItemNo',$igrlineitem);
|
||||
$this->db->where('PONO',$pono);
|
||||
$this->db->update('T_Bankporeport',$podata);
|
||||
|
||||
return TRUE;
|
||||
@ -2082,15 +2097,15 @@ function receiptdata()
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function igrdetailstatus($igrdetails,$igrlineitem)
|
||||
{
|
||||
echo $igrdetails;
|
||||
$this->db->where('IGRItemNo',$igrlineitem);
|
||||
$this->db->update('T_IGR_Details',$igrdetails);
|
||||
$r = $this->db->affected_rows();
|
||||
return $r;
|
||||
// function podetailstatus($podetails,$pono)
|
||||
// {
|
||||
// echo $igrdetails;
|
||||
// $this->db->where('PONO',$pono);
|
||||
// $this->db->update('T_PurchaseOrder_Master',$podetails);
|
||||
// $r = $this->db->affected_rows();
|
||||
// return $r;
|
||||
|
||||
}
|
||||
// }
|
||||
function invoiceamountstatus($invoicemaster,$invid)
|
||||
{
|
||||
|
||||
@ -2100,14 +2115,14 @@ function receiptdata()
|
||||
return $r;
|
||||
|
||||
}
|
||||
// function poamountstatus1($pomaster1,$pono)
|
||||
// {
|
||||
// $this->db->where('PONO', $pono);
|
||||
// $this->db->update('T_PurchaseOrder_Master',$pomaster1);
|
||||
// $r = $this->db->affected_rows();
|
||||
// return $r;
|
||||
function poamountstatus($podetails,$pono)
|
||||
{
|
||||
$this->db->where('PONO',$pono);
|
||||
$this->db->update('T_PurchaseOrder_Master',$podetails);
|
||||
$r = $this->db->affected_rows();
|
||||
return $r;
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
function Cashbook($cashbookdatas)
|
||||
{
|
||||
@ -2161,12 +2176,12 @@ function receiptdata()
|
||||
return $r;
|
||||
|
||||
}
|
||||
function IgrDetailsStatusUpdate($igrno,$BankStatus)
|
||||
function PoStatusUpdate($pono,$PaymentStatus)
|
||||
{
|
||||
|
||||
$this->db->set('BankStatus',$BankStatus);
|
||||
$this->db->where('IGRItemNo',$igrno);
|
||||
$this->db->update('T_IGR_Details');
|
||||
$this->db->set('Paymentstatus',$PaymentStatus);
|
||||
$this->db->where('PONO',$pono);
|
||||
$this->db->update('T_PurchaseOrder_Master');
|
||||
$r = $this->db->affected_rows();
|
||||
return $r;
|
||||
}
|
||||
@ -2222,24 +2237,13 @@ function receiptdata()
|
||||
// $r = $this->db->affected_rows();
|
||||
// return $r;
|
||||
// }
|
||||
function updateBankporeportpo($igrno,$balancetopayupdate,$amountpaidupdate,$Bankid,$IsAct)
|
||||
|
||||
function updateBankporeport($pono,$balancetopayupdate,$amountpaidupdate,$IsAct)
|
||||
{
|
||||
$this->db->set('Balancetopay',$balancetopayupdate);
|
||||
$this->db->set('Amountpaid',$amountpaidupdate);
|
||||
$this->db->set('IsActive',$IsAct);
|
||||
$this->db->where('IGRLineItemNo',$igrno);
|
||||
$this->db->where('mid',$Bankid);
|
||||
$this->db->update('T_Bankporeport');
|
||||
$r = $this->db->affected_rows();
|
||||
return $r;
|
||||
|
||||
}
|
||||
function updateBankporeport($igrno,$balancetopayupdate,$amountpaidupdate,$IsAct)
|
||||
{
|
||||
$this->db->set('Balancetopay',$balancetopayupdate);
|
||||
$this->db->set('Amountpaid',$amountpaidupdate);
|
||||
$this->db->set('IsActive',$IsAct);
|
||||
$this->db->where('IGRLineItemNo',$igrno);
|
||||
$this->db->where('PONO',$pono);
|
||||
//$this->db->where('mid',$Bankid);
|
||||
$this->db->update('T_Bankporeport');
|
||||
$r = $this->db->affected_rows();
|
||||
@ -2268,11 +2272,11 @@ function receiptdata()
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
function gettotalbankmappingpocount($igrno)
|
||||
function gettotalbankmappingpocount($pono)
|
||||
{
|
||||
$this->db->select('count(Amountpaid)as countAmountpaid');
|
||||
$this->db->from ('T_Bankmappingpo');
|
||||
$this->db->where('IGRLineItemNo',$igrno);
|
||||
$this->db->where('PONO',$pono);
|
||||
$this->db->where('IsActive',1);
|
||||
//$this->db->group_by('T_Bankmappingpo.IGRLineItemNo');
|
||||
$query = $this->db->get();
|
||||
@ -2288,11 +2292,11 @@ function receiptdata()
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
function gettotalbankpoamount($igrno)
|
||||
function gettotalbankpoamount($pono)
|
||||
{
|
||||
$this->db->select('Amountpaid,Balancetopay');
|
||||
$this->db->from ('T_Bankporeport');
|
||||
$this->db->where('IGRLineItemNo',$igrno);
|
||||
$this->db->where('PONO',$pono);
|
||||
$this->db->where('IsActive',1);
|
||||
//$this->db->group_by('T_Bankmappingpo.IGRLineItemNo');
|
||||
$query = $this->db->get();
|
||||
|
||||
@ -233,8 +233,8 @@ if(!empty($amountpaid))
|
||||
<th>Date</th>
|
||||
<th>BankDate</th>
|
||||
<th>PONO</th>
|
||||
<th>IGR NO</th>
|
||||
<th>IGRItemNo</th>
|
||||
<!--<th>IGR NO</th>
|
||||
<th>IGRItemNo</th>-->
|
||||
<!--<th>Supplier Name</th>-->
|
||||
<th>Total PO Amount (₹)</th>
|
||||
<!--<th>Advance PO Amount (₹)</th>-->
|
||||
@ -271,10 +271,10 @@ if(!empty($amountpaid))
|
||||
|
||||
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($ap->Podate),'d-m-Y'); ?></span></td>
|
||||
<td align="left" id="bankdate<?php echo $i ?>"><span><?php echo date_format(date_create($ap->BankDate),'d-m-Y'); ?></span></td>
|
||||
<td align="left" id="pono<?php echo $i ?>"><span><?php echo $ap->PONO?></span></td>
|
||||
<td align="left" id="pono<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $ap->PONO;?>"><span><?php echo $ap->PONO?></span></td>
|
||||
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
|
||||
<td align="left" id="igrno<?php echo $i ?>"><span><?php echo $ap->IGRNO?></span></td>
|
||||
<td align="left" id="igritemno<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $ap->IGRLineItemNo;?>"><span><?php echo $ap->IGRLineItemNo?></span></a></td>
|
||||
<!--<td align="left" id="igrno<?php echo $i ?>"><span><?php echo $ap->IGRNO?></span></td>
|
||||
<td align="left" id="igritemno<?php echo $i ?>"><?php echo $ap->IGRLineItemNo?></span></a></td>-->
|
||||
<!--<td align="left" id="sn<?php echo $i ?>"><span><?php echo $ap->Suppliername?></span></td>-->
|
||||
<td align="left" id="tpoa<?php echo $i ?>"><span><?php echo $ap->Totalpoamount?></span></td>
|
||||
<td align="left" id="btp<?php echo $i ?>"><span><?php echo $ap->Totalpoamount-$ap->Amountpaid;?></span></td>
|
||||
@ -335,12 +335,12 @@ if(!empty($amountpaid))
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<!--<td> </td>
|
||||
<td> </td>-->
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
<td class="amount"><strong>
|
||||
<?php echo $tot_amount; ?>
|
||||
</strong></td>
|
||||
@ -390,7 +390,7 @@ var paidamount=$('#ap'+i).text();//amountpaid
|
||||
var balancetopay=$('#btp'+i).text();//balancetopay
|
||||
|
||||
var Igritemno=$('#igritemno'+i).text();//igritemno
|
||||
|
||||
var pono=$('#pono'+i).text();//pono
|
||||
|
||||
var bankid=$('#bankingid'+i).val();//bankid
|
||||
|
||||
@ -403,7 +403,7 @@ var bankingclear=$('#bankingbalclear'+i).val();
|
||||
var clearedbalance=$('#clearbal'+i).val();
|
||||
|
||||
$.ajax({
|
||||
data:{mappingid:mappingid,Totalpoamount:totalamount,paidamount:paidamount,balancetopay:balancetopay,IGRItemNo:Igritemno,bankid:bankid,balancetobankingclear:bankingclear,clearbalance:clearedbalance},
|
||||
data:{mappingid:mappingid,Totalpoamount:totalamount,paidamount:paidamount,balancetopay:balancetopay,pono:pono,IGRItemNo:Igritemno,bankid:bankid,balancetobankingclear:bankingclear,clearbalance:clearedbalance},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>DeletePo",
|
||||
success:function(data)
|
||||
|
||||
@ -155,11 +155,11 @@ foreach($financialyear as $item)
|
||||
<th>Select</th>
|
||||
<th>Date</th>
|
||||
<th>PONO</th>
|
||||
<th>IGRNO</th>
|
||||
<th>IGR Item No</th>
|
||||
<!--<th>IGRNO</th>
|
||||
<th>IGR Item No</th>-->
|
||||
<th>Supplier Name</th>
|
||||
<th style="display:none;">Supplier ID</th>
|
||||
<th>IGR Amount (₹)</th>
|
||||
<th>PO Amount (₹)</th>
|
||||
<th>Balance payable (₹)</th>
|
||||
<th>Amount Paid (₹)</th>
|
||||
</tr>
|
||||
@ -177,7 +177,7 @@ foreach($financialyear as $item)
|
||||
$balancetopay=$t->Balancetopay;
|
||||
$ReceivedQuantity=$t->ReceivedQuantity;
|
||||
//$rate=$t->total;
|
||||
$rate=$t->total;
|
||||
$rate=$t->TotalOrderValue;
|
||||
if($status !='ST057')
|
||||
{
|
||||
?>
|
||||
@ -186,8 +186,8 @@ foreach($financialyear as $item)
|
||||
<td data-name="sell"><input type="checkbox" class="checkboxcheckbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
|
||||
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($t->CreatedDate),'d-m-Y');?></span></td>
|
||||
<td align="left" id="pono<?php echo $i ?>"><span><?php echo $t->PONO?></span></td>
|
||||
<td align="left" id="igrno<?php echo $i ?>"><span><?php echo $t->IGRNO?></span></td>
|
||||
<td align="left" id="igrlineitem<?php echo $i ?>"><span><?php echo trim($t->IGRItemNo)?></span></td>
|
||||
<!--<td align="left" id="igrno<?php echo $i ?>"><span><?php echo $t->IGRNO?></span></td>
|
||||
<td align="left" id="igrlineitem<?php echo $i ?>"><span><?php echo trim($t->IGRItemNo)?></span></td>-->
|
||||
<td align="left" id="sn<?php echo $i ?>"><span><?php echo $t->SupplierName?></span></td>
|
||||
<td style="display:none;" align="left" id="sid<?php echo $i ?>"><span><?php echo $t->SupplierID?></span></td>
|
||||
<td align="left" id="tov<?php echo $i ?>" ><span><?php echo round($rate,2)?></span></td>
|
||||
@ -204,8 +204,7 @@ foreach($financialyear as $item)
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
@ -235,9 +234,9 @@ foreach($financialyear as $item)
|
||||
|
||||
<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="HideIGRLineItem"></div>
|
||||
<!--<div class="col-md-12" id="HideIGRLineItem"></div>-->
|
||||
|
||||
<div class="col-md-12" id="HideSuppDiv"></div>
|
||||
|
||||
@ -342,11 +341,12 @@ function GetPayment(i)
|
||||
$('#Rowid').val(row);
|
||||
var date= document.getElementById ("date"+i).innerText;//value taken from table, col name : date
|
||||
|
||||
var pono =document.getElementById ("pono"+i).innerText;//value taken from table, col name : purchase
|
||||
var igrno1 =document.getElementById ("igrno"+i).innerText;
|
||||
var igrno=igrno1.trim();
|
||||
var igrlineitem1=document.getElementById ("igrlineitem"+i).innerText;
|
||||
var igrlineitem=igrlineitem1.trim();
|
||||
var pono1 =document.getElementById ("pono"+i).innerText;//value taken from table, col name : purchase
|
||||
var pono=pono1.trim();
|
||||
// var igrno1 =document.getElementById ("igrno"+i).innerText;
|
||||
// var igrno=igrno1.trim();
|
||||
// var igrlineitem1=document.getElementById ("igrlineitem"+i).innerText;
|
||||
// var igrlineitem=igrlineitem1.trim();
|
||||
|
||||
var supname =document.getElementById ("sn"+i).innerText;//value taken from table col name : suppliername
|
||||
var supid =document.getElementById ("sid"+i ).innerText;
|
||||
@ -370,19 +370,19 @@ function GetPayment(i)
|
||||
value:pono
|
||||
}).appendTo('#HidePONODiv');
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
name:'hideigrno'+i,
|
||||
id:'hideigrno'+i,
|
||||
value:igrno
|
||||
}).appendTo('#HideIGRDiv');
|
||||
// $('<input>').attr({
|
||||
// type:'hidden',
|
||||
// name:'hideigrno'+i,
|
||||
// id:'hideigrno'+i,
|
||||
// value:igrno
|
||||
// }).appendTo('#HideIGRDiv');
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
name:'hideigrline'+i,
|
||||
id:'hideigrline'+i,
|
||||
value:igrlineitem
|
||||
}).appendTo('#HideIGRLineItem');
|
||||
// $('<input>').attr({
|
||||
// type:'hidden',
|
||||
// name:'hideigrline'+i,
|
||||
// id:'hideigrline'+i,
|
||||
// value:igrlineitem
|
||||
// }).appendTo('#HideIGRLineItem');
|
||||
|
||||
$('<input>').attr({
|
||||
type:'hidden',
|
||||
@ -415,7 +415,7 @@ function GetPayment(i)
|
||||
var poamount1 = $('#hideamtpaid'+i).val();
|
||||
var poamount=poamount1.trim();
|
||||
//alert(poamount+'1');
|
||||
var ponovalue = i+','+igrlineitem+','+poamount;
|
||||
var ponovalue = i+','+pono+','+poamount;
|
||||
temppo.push(ponovalue);
|
||||
console.log(temppo);
|
||||
|
||||
@ -446,7 +446,7 @@ else
|
||||
|
||||
var Payment = parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val());
|
||||
|
||||
var Inid1 = document.getElementById ('igrlineitem'+i ).innerText
|
||||
var Inid1 = document.getElementById ('pono'+i ).innerText
|
||||
var Inid=Inid1.trim();
|
||||
var ponovalue = i+','+Inid+','+Payment;
|
||||
|
||||
@ -477,8 +477,8 @@ else
|
||||
$('#invoicepaymet'+i).val('');
|
||||
$('#hidedate'+i).val('');
|
||||
$('#hidepono'+i).val('');
|
||||
$('#hideigrno'+i).val('');
|
||||
$('#hideigrline'+i).val('');
|
||||
// $('#hideigrno'+i).val('');
|
||||
// $('#hideigrline'+i).val('');
|
||||
$('#hidesupname'+i).val('');
|
||||
$('#hidesupid'+i).val('');
|
||||
$('#hidettlPoamt'+i).val('');
|
||||
@ -487,8 +487,8 @@ else
|
||||
//$('#invoicepaymet'+i).remove();
|
||||
$('#hidedate'+i).remove();
|
||||
$('#hidepono'+i).remove();
|
||||
$('#hideigrno'+i).remove();
|
||||
$('#hideigrline'+i).remove();
|
||||
// $('#hideigrno'+i).remove();
|
||||
// $('#hideigrline'+i).remove();
|
||||
$('#hidesupname'+i).remove();
|
||||
$('#hidesupid'+i).remove();
|
||||
$('#hidettlPoamt'+i).remove();
|
||||
@ -530,10 +530,11 @@ function GetAmount(i)
|
||||
{
|
||||
|
||||
var date= document.getElementById ("date"+i).innerText;
|
||||
var pono =document.getElementById ("pono"+i).innerText;
|
||||
var igr =document.getElementById ("igrno"+i).innerText;
|
||||
var igrlineitem1=document.getElementById ("igrlineitem"+i).innerText;
|
||||
var igrlineitem=igrlineitem1.trim();
|
||||
var pono1 =document.getElementById ("pono"+i).innerText;
|
||||
var pono=pono1.trim();
|
||||
// var igr =document.getElementById ("igrno"+i).innerText;
|
||||
// var igrlineitem1=document.getElementById ("igrlineitem"+i).innerText;
|
||||
// var igrlineitem=igrlineitem1.trim();
|
||||
|
||||
var supname =document.getElementById ("sn"+i).innerText;
|
||||
var supid =document.getElementById ("sid"+i ).innerText;
|
||||
@ -544,10 +545,10 @@ function GetAmount(i)
|
||||
for(k=1;k<=i;k++)
|
||||
{
|
||||
//alert(k);
|
||||
var idcheck=$('#hideigrline'+k).val();
|
||||
var idcheck=$('#hidepono'+k).val();
|
||||
//var idcheck=idcheck1.trim();
|
||||
|
||||
if(igrlineitem == idcheck)
|
||||
if(pono == idcheck)
|
||||
{
|
||||
var cid=k;
|
||||
break;
|
||||
@ -565,8 +566,8 @@ function GetAmount(i)
|
||||
$('#hidesupid'+cid).val(supid);
|
||||
$('#hidettlPoamt'+cid).val(totalordervalue);
|
||||
$('#hideamtpaid'+cid).val(amount);
|
||||
$('#hideigrno'+cid).val(igr);
|
||||
$('#hideigrline'+cid).val(igrlineitem);
|
||||
// $('#hideigrno'+cid).val(igr);
|
||||
// $('#hideigrline'+cid).val(igrlineitem);
|
||||
|
||||
var totalvalue=$('#addvalue').val();
|
||||
var bid=$('#bankid').val();
|
||||
@ -583,9 +584,9 @@ function GetAmount(i)
|
||||
$.each(temppo, function( index, value )
|
||||
{
|
||||
var res2 = value.split(',');
|
||||
if(res2[1] == igrlineitem){
|
||||
if(res2[1] == pono){
|
||||
|
||||
temppo[index] = i+','+igrlineitem+','+amount;
|
||||
temppo[index] = i+','+pono+','+amount;
|
||||
}
|
||||
|
||||
});
|
||||
@ -636,28 +637,17 @@ function Save()
|
||||
number = number[0];
|
||||
//alert('rowcount'+i+'selectedcheckboxnumber'+number+'tempinvoice'+arrval);
|
||||
rw= parseFloat(rw)+1;
|
||||
// alert('rwval'+'-'+rw);
|
||||
check = parseFloat(check)+1;
|
||||
var bankdebitamount=$('#debitamount').val();
|
||||
var bankdate=localStorage.getItem('cddate');
|
||||
// alert('bankdebitamountval'+'-'+bankdebitamount);
|
||||
var bid =$('#bankid').val();
|
||||
|
||||
// alert('bidval'+'-'+bid);
|
||||
var date =$('#hidedate'+number).val();
|
||||
// alert('dateval'+'-'+date);
|
||||
var pono =$('#hidepono'+number).val();
|
||||
//alert('ponoval'+'-'+pono);
|
||||
var igrno =$('#hideigrno'+number).val();
|
||||
|
||||
// alert('igrnoval'+'-'+igrno);
|
||||
|
||||
var igrlineitem =$('#hideigrline'+number).val();
|
||||
// var igrno =$('#hideigrno'+number).val();
|
||||
// var igrlineitem =$('#hideigrline'+number).val();
|
||||
|
||||
var suppliername=$('#hidesupname'+number).val();
|
||||
|
||||
var supplierid=$('#hidesupid'+number).val();
|
||||
|
||||
var supplierid=$('#hidesupid'+number).val();
|
||||
var totalordervalue=$('#hidettlPoamt'+number).val();
|
||||
|
||||
var amountpaid=$('#hideamtpaid'+number).val();
|
||||
@ -672,11 +662,9 @@ function Save()
|
||||
var balnceamount=bankdebitamount-totalvalue;
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax(
|
||||
$.ajax(
|
||||
{
|
||||
data:{bankdate:bankdate,podate:date,pono:pono,igrno:igrno,igrlineitem:igrlineitem,sname:suppliername,sid:supplierid,tot:totalordervalue,aa:amountpaid,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
|
||||
data:{bankdate:bankdate,podate:date,pono:pono,sname:suppliername,sid:supplierid,tot:totalordervalue,aa:amountpaid,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
|
||||
//alert(data);
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>cashbook/receipt",
|
||||
|
||||
@ -82,7 +82,7 @@ if(!empty($debitmapping))
|
||||
<th>Bank ID</th>
|
||||
<th>Narration</th>
|
||||
<th>PONO</th>
|
||||
<th>IGRLine Item No</th>
|
||||
<!--<th>IGRLine Item No</th>-->
|
||||
<th>Amount Paid (₹) </th>
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ if(!empty($debitmapping))
|
||||
<td align="left" id="tov"><span><?php echo $ap->mid?></span></td>
|
||||
<td align="left" id="aa"><span><?php echo $ap->Narration?></span></td>
|
||||
<td align="left" id="aa"><span><?php echo $ap->PONO?></span></td>
|
||||
<td align="left" id="aa"><span><?php echo $ap->IGRLineItemNo?></span></td>
|
||||
<!--<td align="left" id="aa"><span><?php echo $ap->IGRLineItemNo?></span></td>-->
|
||||
<td align="left" id="aa"><span><?php echo $ap->Amountpaid?></span></td>
|
||||
|
||||
|
||||
|
||||
@ -251,8 +251,8 @@ if(!empty($mapping))
|
||||
|
||||
<th>Date</th>
|
||||
<th>PONO</th>
|
||||
<th>IGR NO</th>
|
||||
<th>IGR Item NO</th>
|
||||
<!--<th>IGR NO</th>
|
||||
<th>IGR Item NO</th>-->
|
||||
<th>Supplier Name</th>
|
||||
<th>Total PO Amount (₹)</th>
|
||||
<!--<th>Advance PO Amount (₹)</th>-->
|
||||
@ -284,8 +284,8 @@ if(!empty($mapping))
|
||||
|
||||
<td align="left" id="date<?php echo $i ?>"><span><?php echo date_format(date_create($ap->MaterialRcvdDate),'d-m-Y');?></span></td>
|
||||
<td align="left" id="pono<?php echo $i ?>"><!--<a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $ap->PONO;?>">--><span><?php echo $ap->PONO?></span></a></td>
|
||||
<td align="left" id="igrno<?php echo $i ?>"><!--<a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $ap->IGRNO;?>">--><span><?php echo $ap->IGRNO?></span></a></td>
|
||||
<td align="left" id="sn<?php echo $i ?>"><span><?php echo $ap->IGRLineItemNo?></span></td>
|
||||
<!--<td align="left" id="igrno<?php echo $i ?>"><span><?php echo $ap->IGRNO?></span></a></td>
|
||||
<td align="left" id="sn<?php echo $i ?>"><span><?php echo $ap->IGRLineItemNo?></span></td>-->
|
||||
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
|
||||
<!--<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>
|
||||
@ -342,7 +342,7 @@ if(!empty($mapping))
|
||||
|
||||
?>
|
||||
<td>
|
||||
<a data-toggle="tooltip" href="<?php echo base_url().'cashbook/Deletemappingpo?bankid='.$ap->mid; ?>&id=<?php echo $ap->id ?>&amount=<?php echo $ap->Amountpaid?>&bankamount=<?php echo $bankamount?>&balancetoclear=<?php echo$balancetoclear?>&igrno=<?php echo $ap->IGRLineItemNo?>&balancetopay=<?php echo $ap->Balancetopay?>&totalpoamount=<?php echo $ap->Totalpoamount?>&debit=<?php echo $ap->Debit?>"><i class="fa fa-trash" data-toggle="tooltip" title="<?php echo $record->AdjustmentId; ?> - Click here to Delete details"></i> </a>
|
||||
<a data-toggle="tooltip" href="<?php echo base_url().'cashbook/Deletemappingpo?bankid='.$ap->mid; ?>&id=<?php echo $ap->id ?>&amount=<?php echo $ap->Amountpaid?>&bankamount=<?php echo $bankamount?>&balancetoclear=<?php echo$balancetoclear?>&pono=<?php echo $ap->PONO?>&balancetopay=<?php echo $ap->Balancetopay?>&totalpoamount=<?php echo $ap->Totalpoamount?>&debit=<?php echo $ap->Debit?>"><i class="fa fa-trash" data-toggle="tooltip" title="<?php echo $record->AdjustmentId; ?> - Click here to Delete details"></i> </a>
|
||||
</td>
|
||||
|
||||
|
||||
@ -359,8 +359,8 @@ if(!empty($mapping))
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<!--<td> </td>
|
||||
<td> </td>-->
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user