done amend capital po pdf and screen changes
This commit is contained in:
parent
ceb44d8f28
commit
d27e37971a
@ -107,6 +107,7 @@ class amendmentpurchaseorder extends BaseController
|
||||
$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
|
||||
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
||||
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
||||
$data['PoTypeOptions'] = $this->purchaseorder_model->getConfigValue('C026');
|
||||
if($ReqType == SERVICE)
|
||||
{
|
||||
|
||||
@ -566,13 +567,14 @@ class amendmentpurchaseorder extends BaseController
|
||||
|
||||
function UpdateAmendServicePurchaseOrder()
|
||||
{
|
||||
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
|
||||
$MAD='';
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
//echo $PODate;
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
@ -611,7 +613,7 @@ function UpdateAmendServicePurchaseOrder()
|
||||
// }
|
||||
|
||||
$PaymentTermsText=$this->input->post('beforePaymentTermsText');
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$Otherpayment=$this->input->post('Otherpayment');
|
||||
$Otherpaymentamend=$this->input->post('Otherpayment');
|
||||
$beforePaymentTerms=$this->input->post('beforePaymentTerms');
|
||||
@ -623,7 +625,16 @@ function UpdateAmendServicePurchaseOrder()
|
||||
//echo "MAD IS" . $MAD . "<br>";
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
|
||||
|
||||
$ModeOfShipment=$this->input->post('addmodeofshipment');
|
||||
$SupplierReference=$this->input->post('amendsupplierreference');
|
||||
$SuppliersOfferNo=$this->input->post('amendsupplierofferno');
|
||||
$OtherReferences=$this->input->post('amendotherreference');
|
||||
$Fincap=$this->input->post('amendfincap');
|
||||
$InsuranceOptions=$this->input->post('insuranceStatus');
|
||||
$InsuranceNo=$this->input->post('insuranceNo');
|
||||
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
||||
$DescriptionOfPo = $this->input->post('amenddescofpo');
|
||||
$scopeofwork = $this->input->post('ScopeofWork');
|
||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
@ -643,7 +654,7 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$Otherpayment='';
|
||||
|
||||
}
|
||||
$POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD);
|
||||
$POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD,'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);
|
||||
|
||||
//print_r($POMaster);
|
||||
|
||||
@ -675,7 +686,7 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
$beforeitemRate = $this->input->post('beforeitemRate'.$i);
|
||||
|
||||
$Per = $this->input->post('per'.$i);
|
||||
$AfterSGST = $this->input->post('AfterSgst'.$i);
|
||||
$beforeSGSTvalue = $this->input->post('beforeSgstvalue'.$i);
|
||||
$AfterCGST = $this->input->post('AfterCgst'.$i);
|
||||
@ -748,7 +759,7 @@ function UpdateAmendServicePurchaseOrder()
|
||||
|
||||
//echo "<br>CAD IS" . $CAD . "<br>";
|
||||
|
||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'ServiceMaterialDescription'=>$servicematerialdescription,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ReceivedQuantity'=>$RecQtyvalue,'AmendedDetails'=>$CAD);
|
||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'ServiceMaterialDescription'=>$servicematerialdescription,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ReceivedQuantity'=>$RecQtyvalue,'AmendedDetails'=>$CAD,'Per'=>$Per);
|
||||
//print_r($POLineItemList);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
@ -771,8 +782,9 @@ function UpdateAmendServicePurchaseOrder()
|
||||
|
||||
function EditAmendCapitalPurchaseOrder()
|
||||
{
|
||||
|
||||
|
||||
//echo "WELCOME-";
|
||||
|
||||
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
//echo $PONO."--";
|
||||
@ -821,6 +833,15 @@ function UpdateAmendServicePurchaseOrder()
|
||||
//echo "Tjb" . $Totalserviceorder."--" . $PreServiceTotalorder;die();
|
||||
$TotalCapitalorder= $this->input->post('CapitalToatlOrder');//For International total CapitalOrder
|
||||
$preTotalCapitalorder= $this->input->post('preinterTotalorderValue');//For International pre total CapitalOrder
|
||||
|
||||
$ModeOfShipment=$this->input->post('addmodeofshipment');
|
||||
$SupplierReference=$this->input->post('amendsupplierreference');
|
||||
$SuppliersOfferNo=$this->input->post('amendsupplierofferno');
|
||||
$OtherReferences=$this->input->post('amendotherreference');
|
||||
$Fincap=$this->input->post('amendfincap');
|
||||
$InsuranceOptions=$this->input->post('insuranceStatus');
|
||||
$InsuranceNo=$this->input->post('insuranceNo');
|
||||
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
||||
//echo $TotalCapitalorder . "-" . $preTotalCapitalorder;
|
||||
if($PoRange==1){
|
||||
$MAD.="Amended TotalOrder Vale: " . $PreServiceTotalorder . "<br>";
|
||||
@ -893,7 +914,7 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$Otherpayment='';
|
||||
}
|
||||
$updatedBy = $this->session->userdata ( 'userId' );
|
||||
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$FinalTotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentOtherDescription'=>$Otherpayment,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin);
|
||||
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$FinalTotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentOtherDescription'=>$Otherpayment,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions);
|
||||
// print_r($POMaster);
|
||||
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$CreateBy,$PONO);
|
||||
@ -926,7 +947,7 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$preitemRate = $this->input->post('itemRate'.$i);
|
||||
$itemRate = $this->input->post('rateInUs'.$i);
|
||||
|
||||
$Per = $this->input->post('per'.$i);
|
||||
$Exchangerate = $this->input->post('echangeRate'.$i);
|
||||
$BasicPriceinmton = $this->input->post('rateInUs'.$i);
|
||||
$Productprice = $this->input->post('basicvalInINR'.$i);
|
||||
@ -971,9 +992,9 @@ function UpdateAmendServicePurchaseOrder()
|
||||
|
||||
$SGST = $this->input->post('SGST'.$i);
|
||||
$preSGST = $this->input->post('beforeSGST'.$i);
|
||||
$CGST = $this->input->post('CGST'.$i);
|
||||
$CGST = $this->input->post('CGST'.$i);
|
||||
$preCGST = $this->input->post('beforeCGST'.$i);
|
||||
$IGST = $this->input->post('IGST'.$i);
|
||||
$IGST = $this->input->post('IGST'.$i);
|
||||
$preIGST = $this->input->post('beforeIGST'.$i);
|
||||
|
||||
$SGSTvalue=$this->input->post('afterSGST'.$i);
|
||||
@ -983,9 +1004,20 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$IGSTvalue=$this->input->post('afterIGST'.$i);
|
||||
$preIGSTvalue=$this->input->post('beforeIGSTvalue'.$i);
|
||||
$otherallowance=$this->input->post('otherallowance'.$i);
|
||||
$preotherallowance=$this->input->post('beforeotherallowance'.$i);
|
||||
$TotalServiceOrderValue = $this->input->post('totalservicevalue'.$i);
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$preotherallowance=$this->input->post('beforeotherallowance'.$i);
|
||||
$DiscountType = $this->input->post('DisType'.$i);
|
||||
$DiscountValue = $this->input->post('DisVal'.$i);
|
||||
$AfterDiscount = $this->input->post('AfterDisVal'.$i);
|
||||
$preDiscountType = $this->input->post('beforeDisType'.$i);
|
||||
$preDiscountValue = $this->input->post('beforeDisVal'.$i);
|
||||
$preAfterDiscount = $this->input->post('beforeAfterDisVal'.$i);
|
||||
$TotalServiceOrderValue = $this->input->post('totalservicevalue'.$i);
|
||||
$CapitalItemDescrition = $this->input->post('CapitalItemDescrition'.$i);
|
||||
$FreightType = $this->input->post('FreightType'.$i);
|
||||
$FreightValue = $this->input->post('FreightVal'.$i);
|
||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
||||
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$rowspanvalue=0;
|
||||
|
||||
if($Quantity != $preQuantity)
|
||||
@ -999,7 +1031,11 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$CAD.="<tr><td>Amended Rate : " . $preitemRate ."</td><td>Current Rate : " . $itemRate . "</td></tr>";
|
||||
}
|
||||
|
||||
if($PoRange==1){
|
||||
if($PoRange==1){
|
||||
if(($DiscountValue!=$preDiscountValue) && ($AfterDiscount!=$preAfterDiscount)){
|
||||
$rowspanvalue+=2;
|
||||
$CAD.="<tr><td>Amended Discount : " . $preDiscountValue ."</td><td>Current Discount : " . $DiscountValue . "</td></tr><tr><td>Amended Discount value : " . $preAfterDiscount ."</td><td>Current Discount value: " . $AfterDiscount . "</td></tr>";
|
||||
}
|
||||
if(($SGST != $preSGST) && ($SGSTvalue != $preSGSTvalue))
|
||||
{
|
||||
$rowspanvalue+=2;
|
||||
@ -1031,10 +1067,10 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$CAD.=$CAD2;
|
||||
}
|
||||
|
||||
//echo $CAD;
|
||||
|
||||
|
||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD);
|
||||
// print_r($POLineItemList);
|
||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD,'Per'=>$Per,'ServiceMaterialDescription'=>$CapitalItemDescrition);
|
||||
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
|
||||
@ -1043,22 +1079,19 @@ function UpdateAmendServicePurchaseOrder()
|
||||
foreach($POLineItem as $line):
|
||||
$LineItemNo = $line['LineItemNo'];
|
||||
endforeach;
|
||||
//echo $LineItemNo;
|
||||
|
||||
|
||||
if(trim($POType) == CAPITAL )
|
||||
{
|
||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$CGST,'After_CGST'=>$CGSTvalue,'SGST'=>$SGST,'After_SGST'=>$SGSTvalue,'IGST'=>$IGST,'After_IGST'=>$IGSTvalue, 'otherallowance'=>$otherallowance,'TotalValue'=>$TotalServiceOrderValue,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
|
||||
// print_r($ServiceTaxList);
|
||||
if($capitalType=='1'){
|
||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$CGST,'After_CGST'=>$CGSTvalue,'SGST'=>$SGST,'After_SGST'=>$SGSTvalue,'IGST'=>$IGST,'After_IGST'=>$IGSTvalue, 'otherallowance'=>$otherallowance,'TotalValue'=>$TotalServiceOrderValue,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'discount'=>$DiscountType,'discountval'=>$DiscountValue,'Afterdiscountval'=>$AfterDiscount);
|
||||
|
||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
//echo "Service";
|
||||
//print_r($ServiceTax);
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem);
|
||||
//print_r($ImportTaxList);
|
||||
//die();
|
||||
|
||||
|
||||
} //echo "Service";
|
||||
else if($capitalType=='0'){ //print_r($ServiceTax);
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem,'FreightType'=>$FreightType,'NoOfTrip'=>$NOOfTrip,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue);
|
||||
$ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1538,4 +1571,4 @@ function UpdateAmendServicePurchaseOrder()
|
||||
return $retDate;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -452,7 +452,7 @@ class purchaseorder extends BaseController
|
||||
$CapitalRange = $_GET['CapitalRange'];
|
||||
|
||||
$CapitalAvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
print_r($CapitalAvlBudget);die();
|
||||
|
||||
if(count($CapitalAvlBudget)>0)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,82 +1,99 @@
|
||||
<?php
|
||||
$insuranceStatus = array(
|
||||
array("name"=>"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
|
||||
);
|
||||
$DeliverOption='';
|
||||
$SupId = '';
|
||||
$SupName = '';
|
||||
$Address = '';
|
||||
$PODate = '';
|
||||
|
||||
$DeliverOption='';
|
||||
$SupId = '';
|
||||
$SupName = '';
|
||||
$Address = '';
|
||||
$PODate = '';
|
||||
|
||||
$DeliveryAddress ='';
|
||||
$PONOStatus = '';
|
||||
$PONO = '';
|
||||
|
||||
$TotalCgst = 0.0;
|
||||
$TotalSgst = 0.0;
|
||||
$TotalIgst = 0.0;
|
||||
$TotalSummary = 0.0;
|
||||
$Totalotherallowance=0.0;
|
||||
$TotalBasicAmount = 0.0;
|
||||
$ServiceDescription = '';
|
||||
$PaymentOtherDescription='';
|
||||
$DeliveryAddress ='';
|
||||
$PONOStatus = '';
|
||||
$PONO = '';
|
||||
|
||||
$ServiceMaterialDescription='';
|
||||
$Reqon='';
|
||||
$Deliverydt='';
|
||||
$DeliverSchedule='';
|
||||
$MaxPoDate = '';
|
||||
$AvlAmount = 0;
|
||||
$Value="₹";
|
||||
$TotalCgst = 0.0;
|
||||
$TotalSgst = 0.0;
|
||||
$TotalIgst = 0.0;
|
||||
$TotalSummary = 0.0;
|
||||
$Totalotherallowance=0.0;
|
||||
$TotalBasicAmount = 0.0;
|
||||
$ServiceDescription = '';
|
||||
$PaymentOtherDescription='';
|
||||
$ServiceMaterialDescription='';
|
||||
$Reqon='';
|
||||
$Deliverydt='';
|
||||
$DeliverSchedule='';
|
||||
$MaxPoDate = '';
|
||||
$AvlAmount = 0;
|
||||
$Value="₹";
|
||||
|
||||
$StatusName='';
|
||||
$StatusName='';
|
||||
$ModeOfShipment='';
|
||||
$SupplierReference='';
|
||||
$SuppliersOfferNo='';
|
||||
$OtherReferences='';
|
||||
$Fincap='';
|
||||
$InsuranceOptions='';
|
||||
$InsuranceNo='';
|
||||
$ServiceTypeOptions='';
|
||||
$DescriptionOfPo = '';
|
||||
|
||||
if(!empty($INRSYMBOL))
|
||||
{
|
||||
|
||||
if(!empty($INRSYMBOL))
|
||||
{
|
||||
foreach($INRSYMBOL as $INRS)
|
||||
{
|
||||
$INRSYM=$INRS->FontCode2000;
|
||||
|
||||
foreach($INRSYMBOL as $INRS)
|
||||
{
|
||||
$INRSYM=$INRS->FontCode2000;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(!empty($MaxPODate))
|
||||
{
|
||||
foreach ($MaxPODate as $date)
|
||||
{
|
||||
$MaxPoDate = $date->PODate;
|
||||
|
||||
if(!empty($MaxPODate))
|
||||
{
|
||||
foreach ($MaxPODate as $date)
|
||||
{
|
||||
$MaxPoDate = $date->PODate;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($POMaster))
|
||||
{
|
||||
foreach ($POMaster as $Req)
|
||||
{
|
||||
|
||||
if(!empty($POMaster))
|
||||
{
|
||||
foreach ($POMaster as $Req)
|
||||
{
|
||||
|
||||
$SupId = $Req->SupplierID;
|
||||
$SupName = $Req->SupplierName;
|
||||
$Address = $Req->Address;
|
||||
$pdt = new DateTime($Req->PODate);
|
||||
$PODate = $pdt->format('d-m-Y');
|
||||
$DeliverOption = $Req->DeliveryOption;
|
||||
$DeliverSchedule = $Req->DeliverySchedule;
|
||||
// echo "*" . $Req->DeliveryDate . "*";
|
||||
$Ddt = new DateTime($Req->DeliveryDate);
|
||||
$Deliverydt = $Ddt->format('d-m-Y');
|
||||
// echo "-" . $Deliverydt . "-";
|
||||
$DeliveryAddress =$Req->DeliveryAddress;
|
||||
$PONOStatus = $Req->StatusCode;
|
||||
$PONO = $Req->PONO;
|
||||
$ServiceDescription = $Req->ServiceDescription;
|
||||
//Terms=$Req->PaymentTerms;
|
||||
$PaymentOtherDescription=$Req->PaymentOtherDescription;
|
||||
$WrkStatus=$Req->ServiceWorkStatus;
|
||||
$StatusName=$Req->StatusName;
|
||||
$RequesterName='';
|
||||
}
|
||||
}
|
||||
$SupId = $Req->SupplierID;
|
||||
$SupName = $Req->SupplierName;
|
||||
$Address = $Req->Address;
|
||||
$pdt = new DateTime($Req->PODate);
|
||||
$PODate = $pdt->format('d-m-Y');
|
||||
$DeliverOption = $Req->DeliveryOption;
|
||||
$DeliverSchedule = $Req->DeliverySchedule;
|
||||
// echo "*" . $Req->DeliveryDate . "*";
|
||||
$Ddt = new DateTime($Req->DeliveryDate);
|
||||
$Deliverydt = $Ddt->format('d-m-Y');
|
||||
// echo "-" . $Deliverydt . "-";
|
||||
$DeliveryAddress =$Req->DeliveryAddress;
|
||||
$PONOStatus = $Req->StatusCode;
|
||||
$PONO = $Req->PONO;
|
||||
$ServiceDescription = $Req->ServiceDescription;
|
||||
//Terms=$Req->PaymentTerms;
|
||||
$PaymentOtherDescription=$Req->PaymentOtherDescription;
|
||||
$WrkStatus=$Req->ServiceWorkStatus;
|
||||
$StatusName=$Req->StatusName;
|
||||
$RequesterName='';
|
||||
$ModeOfShipment=$Req->Mode_Of_Shipment;
|
||||
$SupplierReference=$Req->Supplier_Reference;
|
||||
$SuppliersOfferNo=$Req->Supplier_Offer_No;
|
||||
$OtherReferences=$Req->Other_Reference;
|
||||
$Fincap=$Req->Fincap;
|
||||
$InsuranceOptions=$Req->InsuranceStatus;
|
||||
$InsuranceNo=$Req->InsuranceNumber;
|
||||
$ServiceTypeOptions=$Req->POSubType;
|
||||
$DescriptionOfPo = $Req->Description_Of_Service;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!empty($RequistionDetails))
|
||||
@ -147,13 +164,42 @@ tinymce.init({
|
||||
menubar: false,
|
||||
statusbar: false,
|
||||
toolbar: false,
|
||||
|
||||
// plugins: "link image"
|
||||
});
|
||||
var DelOpt = '<?php echo $DeliverOption; ?>';
|
||||
var SchName = '<?php echo $DeliverSchedule; ?>';
|
||||
var others ='<?php echo $PaymentOtherDescription;?>';
|
||||
var insuranceOpt = '<?php echo $InsuranceOptions; ?>';
|
||||
var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
$(document).ready(function () {
|
||||
$('#RequistionNo').attr("style", "pointer-events: none;");
|
||||
$('#PODate').attr("style", "pointer-events: none;");
|
||||
$('#drpSupplier').attr("style", "pointer-events: none;");
|
||||
|
||||
$('#SupAddress').attr("style", "pointer-events: none;");
|
||||
$('#POType').attr("style", "pointer-events: none;");
|
||||
$('#DeliveryAddr').attr("style", "pointer-events: none;");
|
||||
|
||||
$('#workstatus').attr("style", "pointer-events: none;");
|
||||
|
||||
$('#addmodeofshipment').attr("style", "pointer-events: none;");
|
||||
$('#amendsupplierreference').attr("style", "pointer-events: none;");
|
||||
$('#amendsupplierofferno').attr("style", "pointer-events: none;");
|
||||
$('#amendotherreference').attr("style", "pointer-events: none;");
|
||||
$('#amendfincap').attr("style", "pointer-events: none;");
|
||||
$('#PoTypeOptions').attr("style", "pointer-events: none;");
|
||||
$('#insuranceNo').attr("style", "pointer-events: none;");
|
||||
|
||||
$('#insuranceStatus').attr("style", "pointer-events: none;");
|
||||
|
||||
|
||||
if(insuranceOpt=="1"){
|
||||
|
||||
}
|
||||
else{
|
||||
$('#insuranceTxtDiv').hide();
|
||||
}
|
||||
if(DelOpt=="0"){
|
||||
$('#Deliverydtdiv').show();
|
||||
$('#Schedulediv').hide();
|
||||
@ -810,7 +856,7 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'addmodeofshipment','value' => set_value('addmodeofshipment'),'id'=>'addmodeofshipment', 'class' => 'form-control');
|
||||
$data = array('name' => 'addmodeofshipment','value' => set_value('addmodeofshipment',$ModeOfShipment),'id'=>'addmodeofshipment', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -826,7 +872,7 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'amendsupplierreference','value' => set_value('amendsupplierreference'),'id'=>'amendsupplierreference', 'class' => 'form-control');
|
||||
$data = array('name' => 'amendsupplierreference','value' => set_value('amendsupplierreference',$SupplierReference),'id'=>'amendsupplierreference', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -842,7 +888,7 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'amendsupplierofferno','value' => set_value('amendsupplierofferno'),'id'=>'amendsupplierofferno', 'class' => 'form-control');
|
||||
$data = array('name' => 'amendsupplierofferno','value' => set_value('amendsupplierofferno',$SuppliersOfferNo),'id'=>'amendsupplierofferno', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -856,7 +902,7 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'amendotherreference','value' => set_value('amendotherreference'),'id'=>'amendotherreference', 'class' => 'form-control');
|
||||
$data = array('name' => 'amendotherreference','value' => set_value('amendotherreference',$OtherReferences),'id'=>'amendotherreference', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -866,12 +912,105 @@ $(document).ready(function () {
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'amendfincap','value' => set_value('amendfincap'),'id'=>'amendfincap', 'class' => 'form-control');
|
||||
$data = array('name' => 'amendfincap','value' => set_value('amendfincap',$Fincap),'id'=>'amendfincap', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--End new fields 1 sep-->
|
||||
<!--start new fields 1 sep-->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-12" style="padding: 0px;">
|
||||
|
||||
|
||||
<label>Service Type Options</label>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
|
||||
//$optionsWork = array("0"=>'Select Work Status');
|
||||
|
||||
|
||||
if(!empty($PoTypeOptions))
|
||||
{
|
||||
foreach ($PoTypeOptions as $POpt):
|
||||
|
||||
if($ServiceTypeOptions==$POpt->ConfigValue){
|
||||
$optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue;
|
||||
}
|
||||
endforeach;
|
||||
foreach ($PoTypeOptions as $POpt1):
|
||||
|
||||
if($ServiceTypeOptions!=$POpt1->ConfigValue){
|
||||
$optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue;
|
||||
}
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" style="padding:0px;">
|
||||
<div class="col-md-4" style="padding:0px;" >
|
||||
<div class="col-md-12">
|
||||
<label>Insurance Options</label>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
|
||||
if(!empty($insuranceStatus))
|
||||
{
|
||||
foreach ($insuranceStatus as $INS):
|
||||
if($InsuranceOptions==$INS['value']){
|
||||
$optionsInsurance[$INS['value']] = $INS['name'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
endforeach;
|
||||
foreach ($insuranceStatus as $INS1):
|
||||
if($InsuranceOptions!=$INS1['value']){
|
||||
$optionsInsurance[$INS1['value']] = $INS1['name'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('insuranceStatus', $optionsInsurance,set_value('insuranceStatus'),'id="insuranceStatus"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" id="insuranceTxtDiv" style="display:block;">
|
||||
<label>Insurance No<span class="badge" style="color:red;text-align:right;background-color: #ecf0f5 ;">*</span></label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!--End new fields 1 sep-->
|
||||
@ -1255,7 +1394,7 @@ $(document).ready(function () {
|
||||
<td align="left"><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->ReqNo ?></td>
|
||||
<td><?php echo $record->MaterialCode ?></td>
|
||||
<td><?php echo $record->MaterialName ?></td>
|
||||
<td><?php echo $record->ServiceMaterialDescription ?></td>
|
||||
<td align="right"><?php echo $record->Quantity ?></td>
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
|
||||
@ -1276,7 +1415,8 @@ $(document).ready(function () {
|
||||
<input type="hidden" name="<?php echo 'materialCode'.$index ?>" id="<?php echo 'materialCode'.$index ?>" value="<?php echo $record->MaterialCode ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'materialName'.$index ?>" id="<?php echo 'materialName'.$index ?>" value="<?php echo $record->MaterialName ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'uom'.$index ?>" id="<?php echo 'uom'.$index ?>" value="<?php echo $record->UOM ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'per'.$index ?>" id="<?php echo 'per'.$index ?>" value="<?php echo $record->Per ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'beforequantity'.$index ?>" id="<?php echo 'beforequantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'itemRate'.$index ?>" id="<?php echo 'itemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'beforeitemRate'.$index ?>" id="<?php echo 'beforeitemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
||||
@ -1395,7 +1535,7 @@ $(document).ready(function () {
|
||||
<label>Description Of Service</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'amenddescofpo','value' => set_value('amenddescofpo'),'id'=>'amenddescofpo', 'class' => 'form-control' ,'rows' => '3', 'cols' => '40' );
|
||||
$data = array('name' => 'amenddescofpo','value' => set_value('amenddescofpo',$DescriptionOfPo),'id'=>'amenddescofpo', 'class' => 'form-control' ,'rows' => '3', 'cols' => '40' );
|
||||
echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
@ -1491,9 +1631,11 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||
$('#EditdeptName').val($('#departmentName'+userid).val());
|
||||
$("#EditCostCenter").val($('#costCode'+userid).val());
|
||||
$('#EditAvlBudAmt').val(AvlBudAmt);
|
||||
$('#EdittxtSpcialInstruction').val($('#servicematerialdescription'+userid).val());
|
||||
|
||||
tinyMCE.get('EdittxtSpcialInstruction').setContent($('#servicematerialdescription'+userid).val());
|
||||
$('#EditItemName').val($('#materialName'+userid).val());
|
||||
$('#EditUOM').val($('#uom'+userid).val());
|
||||
$('#EditAmendPer').val($('#per'+userid).val());
|
||||
$('#EditQuantity').val($('#quantity'+userid).val());
|
||||
RequistQuantity = $('#quantity'+userid).val();
|
||||
$('#EditRate').val($('#itemRate'+userid).val());
|
||||
@ -1583,6 +1725,13 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||
var editMaterialCode = $("#EditMaterialCode").val();
|
||||
var editDescription = $("#EditItemName").val();
|
||||
var editUOM = $('#EditUOM').val();
|
||||
var editPer='';
|
||||
if($("#EditAmendPer").val().trim()==''){
|
||||
editPer = $("#EditUOM").val();
|
||||
}
|
||||
else{
|
||||
editPer = $("#EditAmendPer").val();
|
||||
}
|
||||
var editQuantity = $('#EditQuantity').val();
|
||||
var otherallowance=$('#otherallowance').val();
|
||||
//alert(otherallowance);
|
||||
@ -1612,7 +1761,7 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||
var cellval = tr.cells;
|
||||
|
||||
cellval[2].innerHTML = editMaterialCode;
|
||||
cellval[3].innerHTML = editDescription;
|
||||
cellval[3].innerHTML = materialspecialinstruction;
|
||||
cellval[4].innerHTML = editQuantity;
|
||||
cellval[5].innerHTML =editUOM;
|
||||
cellval[6].innerHTML =parseFloat(itemRate).toFixed(2);
|
||||
@ -1624,6 +1773,7 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||
$('#materialCode'+userid).val(editMaterialCode);
|
||||
$('#materialName'+userid).val(editDescription);
|
||||
$('#uom'+userid).val(editUOM);
|
||||
$('#per'+userid).val(editPer);
|
||||
$('#CostCode'+userid).val(CostCode);
|
||||
$('#quantity'+userid).val(editQuantity);
|
||||
$('#itemRate'+userid).val(itemRate);
|
||||
@ -1970,11 +2120,16 @@ function validateServiceTax()
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
else if(ExceedBudget($('#EditTotalOrderValue').val(),$('#EditAvlBudAmt').val()) == false)
|
||||
else if(ExceedBudget($('#txtEditBasicValue').val(),$('#EditAvlBudAmt').val()) == false)
|
||||
{
|
||||
$('#EditRate').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#EdittxtSpcialInstruction').val()==''){
|
||||
alert('Please Enter the Service Description');
|
||||
$('#EdittxtSpcialInstruction').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
@ -2005,7 +2160,7 @@ $('#txtStatus').val(stat);
|
||||
//$('#SpcialInstruction').val(splinstr);
|
||||
$('#txtDeliveryAddress').val(deladd);
|
||||
AvlBudAmt = '<?php echo number_format($AvlAmount+$TotalBasicAmount, 2, '.', '') ?>';
|
||||
var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val();
|
||||
var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val();
|
||||
|
||||
if(validate())
|
||||
{
|
||||
@ -2014,6 +2169,11 @@ var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val();
|
||||
|
||||
return false;
|
||||
}
|
||||
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
|
||||
alert('Please Enter Other Payment Details');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
@ -2023,6 +2183,7 @@ var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val();
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
@ -2117,4 +2278,4 @@ $("#PaymentTerms").change(function() {
|
||||
$('#otheroptiondiv').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user