diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php
index 3b1aa430..5a657732 100755
--- a/application/controllers/amendmentpurchaseorder.php
+++ b/application/controllers/amendmentpurchaseorder.php
@@ -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 . "
";
$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 "
CAD IS" . $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);
+ $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 . "
";
@@ -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.="
| Amended Rate : " . $preitemRate ." | Current Rate : " . $itemRate . " |
";
}
- if($PoRange==1){
+ if($PoRange==1){
+ if(($DiscountValue!=$preDiscountValue) && ($AfterDiscount!=$preAfterDiscount)){
+ $rowspanvalue+=2;
+ $CAD.="| Amended Discount : " . $preDiscountValue ." | Current Discount : " . $DiscountValue . " |
| Amended Discount value : " . $preAfterDiscount ." | Current Discount value: " . $AfterDiscount . " |
";
+ }
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;
}
-}
\ No newline at end of file
+}
diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php
index f3e0cacd..0b4ab1a4 100755
--- a/application/controllers/purchaseorder.php
+++ b/application/controllers/purchaseorder.php
@@ -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)
{
diff --git a/application/views/editCapitalAmendPO.php b/application/views/editCapitalAmendPO.php
index 85b70d87..a1db7fcd 100755
--- a/application/views/editCapitalAmendPO.php
+++ b/application/views/editCapitalAmendPO.php
@@ -1,5 +1,7 @@
"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
+ );
$requestedBy=$requestedBy[0]->FirstName;
// $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
// $CurrentDate = $dt->format('Y-m-d');
@@ -20,7 +22,7 @@
$TotalCGST = 0.0;
$TotalIGST = 0.0;
$Totalotherallowances = 0.0;
-
+ $TotalDiscountedAmt=0.0;
$TotalSummary = 0.0;
$TotalBasicAmount = 0.0;
@@ -60,8 +62,16 @@
$ExchangeDate='';
$ExchangeRateOn='';
$UpdatedOn;
- $CapitalRange='';
-$PoStatusName='';
+ $CapitalRange='';
+ $PoStatusName='';
+ $ModeOfShipment='';
+ $SupplierReference='';
+ $SuppliersOfferNo='';
+ $OtherReferences='';
+ $Fincap='';
+ $InsuranceOptions='';
+ $InsuranceNo='';
+ $ServiceTypeOptions='';
$INR='';
$INRSYM='';
@@ -138,6 +148,14 @@ if(!empty($POMaster))
else{
$ExitTotalOrderValue=$Req->TotalOrderValue;
}
+ $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;
}
}
@@ -183,12 +201,45 @@ if(!empty($AvlBudAmt))
toolbar: false
// plugins: "link image"
});
-
+ tinymce.init({
+ selector: "textarea#EditItemDescription",
+ menubar: false,
+ statusbar: false,
+ toolbar: false
+ });
+ var insuranceOpt = '';
var DelOpt = '';
var SchName = ;
var others ='';
var DelDt = '';
$(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;");
+$('#Exchangerateon').attr("style", "pointer-events: none;");
+$('#ExchangeRt').attr("style", "pointer-events: none;");
+$('#PlaceOforigin').attr("style", "pointer-events: none;");
+ if(insuranceOpt=="1"){
+
+}
+else{
+$('#insuranceTxtDiv').hide();
+}
if(DelOpt=="0"){
$('#Deliverydtdiv').show();
$('#Schedulediv').hide();
@@ -351,7 +402,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
foreach ($ReqList as $SID):
- $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqNo;
+ $options[$SID->ReqNo] = $SID->ReqNo;
endforeach;
}
@@ -570,7 +621,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'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);
?>
@@ -586,7 +637,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'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);
?>
@@ -602,7 +653,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'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);
?>
@@ -616,7 +667,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'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);
?>
@@ -626,7 +677,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'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);
?>
@@ -635,6 +686,99 @@ document.getElementById('dispatchinternational').style.display = 'block';
+
+
+
+
+
+
+
+
+
+
+ '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');
+
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
@@ -746,7 +890,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
$row=array("materialCode"=>$record->MaterialCode,"ReqNo"=>$record->ReqNo);
array_push($res_arr_values, $row);
?>
-
+
@@ -758,6 +902,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
+
@@ -811,6 +956,10 @@ document.getElementById('dispatchinternational').style.display = 'block';
+
+
+
+
@@ -830,6 +979,13 @@ document.getElementById('dispatchinternational').style.display = 'block';
+
+
+
+
+
+
+
@@ -839,6 +995,9 @@ document.getElementById('dispatchinternational').style.display = 'block';
+
+
+
@@ -861,7 +1020,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
$TotalCGST = $TotalCGST+$record->After_CGST;
$TotalIGST = $TotalIGST+$record->After_IGST;
$Totalotherallowances = $Totalotherallowances+$record->otherallowance;
-
+ $TotalDiscountedAmt = $record->Afterdiscountval;
$TotalSummary = $TotalSummary+$record->ServiceTaxamount;//tax
$TotalBasicAmount = $TotalBasicAmount+($record->Rate * $record->Quantity);//basic
//$ServiceDescription = $ServiceDescription;
@@ -889,15 +1048,13 @@ document.getElementById('dispatchinternational').style.display = 'block';
// $totorder=$totorder+$record->TotalOrderValue;
-
-
-
}
+
//echo $TotalSummary;
if($CapitalRange=='1'){
-
- $totalCapitalOrder = $totalCapitalOrder+$TotalBasicAmount;
+
+ $totalCapitalOrder = $totalCapitalOrder+$TotalBasicAmount-$TotalDiscountedAmt;
}
else if($CapitalRange=='0')
@@ -1034,7 +1191,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();');
+ $data = array('name' => 'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(3);');
echo form_input($data);
?>
@@ -1043,7 +1200,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'EditCPRate','value' => set_value('EditCPRate'),'id'=>'EditCPRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();' );
+ $data = array('name' => 'EditCPRate','value' => set_value('EditCPRate'),'id'=>'EditCPRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(3);' );
echo form_input($data);
?>
@@ -1068,6 +1225,49 @@ document.getElementById('dispatchinternational').style.display = 'block';
+
+
+
+
+
+ 'Select Discount Type');
+ //print_r( $options);
+
+ if(!empty($TaxType))
+ {
+ foreach ($TaxType as $SID):
+
+
+ $options[$SID->ConfigValue] = $SID->ConfigValue;
+
+ endforeach;
+ }
+
+ echo form_dropdown('EditDiscountType', $options,set_value('EditDiscountType'),'id="EditDiscountType"' ,'class="form-control"');
+
+ ?>
+
+
+
+
+
+ 'txtEditDiscount','value' => set_value('txtEditDiscount'),'id'=>'txtEditDiscount', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange();calculateDiscount(1);','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtEditAfterDiscount','value' => set_value('txtEditAfterDiscount'),'id'=>'txtEditAfterDiscount', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
CGST In %
@@ -1165,7 +1365,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
?>
-
+
@@ -1571,7 +1771,15 @@ document.getElementById('dispatchinternational').style.display = 'block';
+
+
+
+ 'EditItemDescription','value' => set_value('EditItemDescription'),'id'=>'EditItemDescription', 'class' => 'form-control' ,'rows' => '3', 'cols' => '40' );
+ echo form_textarea($data); ?>
+
+
@@ -2846,11 +3054,11 @@ $('#PurQuantity').val('');
$('#EditFrequency').val($('#frequency'+userid).val());
$('#EditCPUOM').val($('#uom'+userid).val());
-
+ $('#EditAmendPer').val($('#per'+userid).val());
$('#EditCPQuantity').val($('#quantity'+userid).val());
- $('#EditCPRate').val($('#rateInUs'+userid).val());
+ $('#EditCPRate').val(parseFloat($('#rateInUs'+userid).val()).toFixed(2));
- $('#EditCPTotalAmount').val($('#basicval'+userid).val());
+ $('#EditCPTotalAmount').val(parseFloat($('#basicval'+userid).val()).toFixed(2));
RequistQuantity = $('#quantity'+userid).val();
$('#EditCgst').val($('#CGST'+userid).val());
@@ -2897,10 +3105,24 @@ $('#PurQuantity').val('');
var EditUOM = $('#uom'+userid).val();
$('#RateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/'+EditUOM+')');
-$('#EditRateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/'+EditUOM+')');
-
-
-
+ $('#EditRateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/'+EditUOM+')');
+ $("#EditDiscountType").val($('#DisType'+userid).val());
+ $('#txtEditDiscount').val($('#DisVal'+userid).val());
+ $('#txtEditAfterDiscount').val($('#AfterDisVal'+userid).val());
+ tinyMCE.get('EditItemDescription').setContent($('#CapitalItemDescrition'+userid).val());
+ $('#AmendtxtFreight').val($('#FreightVal'+userid).val());
+ $('#AmendtxtAfterFreight').val($('#AfterFreightVal'+userid).val());
+ $('#AmendNOOfTrips').val($('#NoOfTrip'+userid).val());
+ $("#drpamendFreight").val($('#FreightType'+userid).val());
+
+ var FreightType =$('#FreightType'+userid).val();
+
+ if (FreightType == "PER TRIP"){
+ $('#AmendTripsValue').show();
+ }
+ else{
+ $('#AmendTripsValue').hide();
+ }
var Material = ;
$("#EditMaterialCode").empty();
@@ -2917,7 +3139,21 @@ $('#EditRateIn').html('Rate(in' + " "+DisplayCurrencySymbol + '/'+EditUOM+')');
}
});
}
-
+ $('#EditLandingCharge').attr("style", "pointer-events: none;");
+ $('#EditHighseas').attr("style", "pointer-events: none;");
+ $('#EditCustomduty').attr("style", "pointer-events: none;");
+ $('#EditExcisedutyTax').attr("style", "pointer-events: none;");
+ $('#EditExcisedutyEDcess').attr("style", "pointer-events: none;");
+ $('#EditExcisedutySHcess').attr("style", "pointer-events: none;");
+ $('#EditCustomEDcess').attr("style", "pointer-events: none;");
+ $('#EditCustomSHcess').attr("style", "pointer-events: none;");
+ $('#EditAdditionalExciseduty').attr("style", "pointer-events: none;");
+ $('#EditGrossdutypayable').attr("style", "pointer-events: none;");
+ $('#EditPurQuantity').attr("style", "pointer-events: none;");
+ $('#AmendtxtFreight').attr("style", "pointer-events: none;");
+ $('#AmendtxtAfterFreight').attr("style", "pointer-events: none;");
+ $('#AmendNOOfTrips').attr("style", "pointer-events: none;");
+ $('#drpamendFreight').attr("style", "pointer-events: none;");
});
@@ -3144,38 +3380,47 @@ EditRatechange();
var RatePerTon = parseFloat( $('#EditCPRate').val());
//var txtUnitPrice = parseFloat($('#Rate').val());
- //var txtExchangeRate='';
+ var txtExchangeRate='';
+ var BasicInINR='';
if(capitalType=='International'){
//alert('international');
txtExchangeRate = parseFloat( $('#EditExchangeRtModal').val());
var Tot = txtQuantity * RatePerTon;
+ BasicInINR=Tot * txtExchangeRate;
}
else{
// alert('Dometic');
var Tot = txtQuantity * RatePerTon;
+ if ($('#txtEditDiscount').val() != '' && $('#txtEditDiscount').val() != '0')
+ {
+ $('#txtEditAfterDiscount').val(updateDiscountValuesChange(parseFloat(Tot).toFixed(2),$("#EditDiscountType").val(),$('#txtEditDiscount').val()));
+ }
+
+ var discountedValue = parseFloat($('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()).toFixed(2);
txtExchangeRate = 1;
+ BasicInINR=Tot * txtExchangeRate - discountedValue;
}
- var BasicInINR=Tot * txtExchangeRate;
+
$('#EditCPTotalAmount').val(parseFloat(Tot).toFixed(2));
$('#EditAfterBasicPriceTax').val(Math.round(BasicInINR));
//ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val());
- if(ExceedBudget($('#EditCPTotalAmount').val(),$('#EditCapitalbudAmt').val())){
+ if(ExceedBudget($('#EditAfterBasicPriceTax').val(),$('#EditCapitalbudAmt').val())){
//Service Tax calculation
- $('#EditAfterCgst').val(calculateServiceCGST($('#EditCPTotalAmount').val(),$("#EditCgst").val()== '' ? "0.00" : $('#EditCgst').val()));
+ $('#EditAfterCgst').val(calculateServiceCGST($('#EditAfterBasicPriceTax').val(),$("#EditCgst").val()== '' ? "0.00" : $('#EditCgst').val()));
- $('#EditAfterSgst').val( calculateServiceSGST($('#EditCPTotalAmount').val(),$("#EditSgst").val()== '' ? "0.00" : $('#EditSgst').val()));
+ $('#EditAfterSgst').val( calculateServiceSGST($('#EditAfterBasicPriceTax').val(),$("#EditSgst").val()== '' ? "0.00" : $('#EditSgst').val()));
- $('#EditAfterIgst').val(calculateServiceIGST($('#EditCPTotalAmount').val(),$("#EditIgst").val()== '' ? "0.00" : $('#EditIgst').val()));
+ $('#EditAfterIgst').val(calculateServiceIGST($('#EditAfterBasicPriceTax').val(),$("#EditIgst").val()== '' ? "0.00" : $('#EditIgst').val()));
var tempEditservicetotalordervaue=(parseFloat($('#EditCPTotalAmount').val())+parseFloat($('#EditAfterCgst').val())+parseFloat($('#EditAfterSgst').val())+parseFloat($('#EditAfterIgst').val())+parseFloat($('#EditOtherAllowances').val()=='' ? "0.00" : $('#EditOtherAllowances').val()));
$('#Editservicetotalordervaue').val(parseFloat(tempEditservicetotalordervaue).toFixed(2));
@@ -3263,7 +3508,7 @@ EditRatechange();
- calculateTotalValue();
+ // calculateTotalValue();
// var res = ExceedBudget($('#TotalOrderValue').val(), $('#CapitalbudAmt').val());
//if(!res)
@@ -3309,7 +3554,7 @@ EditRatechange();
*/
$('.EditCapital').click(function(){
-
+ tinyMCE.triggerSave();
if( validateEditCapitalTax() && validateEditExceedLimit())
{
//alert('EDIT');
@@ -3325,6 +3570,13 @@ EditRatechange();
var materialCode =$('#EditMaterialCode').val();
var materialName = $("#EditCapitalItemName").val();
var uom = $("#EditCPUOM").val();
+ var editPer='';
+ if($("#EditAmendPer").val().trim()==''){
+ editPer = $("#EditCPUOM").val();
+ }
+ else{
+ editPer = $("#EditAmendPer").val();
+ }
var exchangeRate = $("#EditExchangeRtModal").val();
var quantity = $("#EditCPQuantity").val();
var convertRate = $("#EditCPRate").val();
@@ -3375,11 +3627,15 @@ EditRatechange();
var beforeAdditionalExciseDuty =$('#EditAdditionalExciseduty').val();
var PurQuantity = $('#EditPurQuantity').val();
var basicvalInINR=$('#EditAfterBasicPriceTax').val();
-
-
-
-
-
+ var DisType = $("#EditDiscountType").val();
+ var DisVal = $("#txtEditDiscount").val();
+ var AfterDisVal = $("#txtEditAfterDiscount").val();
+ var EditCapitalDescription = $("#EditItemDescription").val();
+ var FreightType = $("#drpamendFreight").val();
+ var FreightVal = $("#AmendtxtFreight").val();
+ var AfterFreightVal = $("#AmendtxtAfterFreight").val();
+ var NoOfTrip = $("#AmendNOOfTrips").val();
+ $('#CapitalItemDescrition'+userid).val(EditCapitalDescription);
$('#Reqnumber'+userid).val(Reqnumber);
$('#departmentName'+userid).val(departmentName);
$('#CPCostCode'+userid).val(costCode);
@@ -3388,6 +3644,7 @@ EditRatechange();
$('#materialCode'+userid).val(materialCode);
$('#materialName'+userid).val(materialName);
$('#uom'+userid).val(uom);
+ $('#per'+userid).val(editPer);
$('#quantity'+userid).val(quantity);
$('#rateInUs'+userid).val(itemRate);
@@ -3438,7 +3695,13 @@ EditRatechange();
$('#beforeAdditionalExciseDuty'+userid).val(beforeAdditionalExciseDuty);
$('#PurQuantity'+userid).val(PurQuantity);
$('#PerKgExpense'+userid).val(TotalOrderValuePerkg);
-
+ $('#DisType'+userid).val(DisType);
+ $('#FreightType'+userid).val(FreightType);
+ $('#FreightVal'+userid).val(FreightVal);
+ $('#NoOfTrip'+userid).val(NoOfTrip);
+ $('#AfterFreightVal'+userid).val(AfterFreightVal);
+ $('#DisVal'+userid).val(DisVal);
+ $('#AfterDisVal'+userid).val(AfterDisVal);
cellval[2].innerHTML = materialName;
//alert(materialName);
cellval[3].innerHTML = parseFloat(quantity).toFixed(2);
@@ -3599,13 +3862,13 @@ function validateEditCapitalTax()
var CapitalToatlOrder=0;
for (var i = 1; i < rows; i++) {
-
+ var discountedRateValue = $('#AfterDisVal'+i).val() == '' ? '0.00' : $('#AfterDisVal'+i).val();
var TotalOrderValueSummaryI = $('#totalservicevalue'+i).val() == '' ? '0.00' : $('#totalservicevalue'+i).val();//FOr Domestic total value
-
+ TotalOrderValueSummaryI=TotalOrderValueSummaryI-discountedRateValue;
var TotalCGSTTaxI = $('#afterCGST'+i).val() == '' ? '0.00' : $('#afterCGST'+i).val();
var TotalSGSTTaxI = $('#afterSGST'+i).val() == '' ? '0.00' : $('#afterSGST'+i).val();
var TotalIGSTTaxI = $('#afterIGST'+i).val() == '' ? '0.00' : $('#afterIGST'+i).val();
-
+
var TotalotherallowanceI = $('#otherallowance'+i).val() == '' ? '0.00' : $('#otherallowance'+i).val();
@@ -3623,7 +3886,7 @@ function validateEditCapitalTax()
var TotGrossexpenseI = $('#GrossExpensesDuetoCustom'+i).val() == '' ? '0.00' : $('#GrossExpensesDuetoCustom'+i).val();
var CapitalToatlOrderI = $('#basicval'+i).val() == '' ? '0.00' : $('#basicval'+i).val();//for International total value
-
+ CapitalToatlOrderI = CapitalToatlOrderI - discountedRateValue;
TotalCGSTTax = parseFloat(TotalCGSTTax) + parseFloat(TotalCGSTTaxI);
TotalSGSTTax = parseFloat(TotalSGSTTax) + parseFloat(TotalSGSTTaxI);
TotalIGSTTax = parseFloat(TotalIGSTTax) + parseFloat(TotalIGSTTaxI);
@@ -3748,6 +4011,538 @@ if (FreightType == "PER TRIP")
}
});
+$('#EditDiscountType').change(function() {
+ if($('#EditCPRate').val() != '')
+ {
+ selValue = $("#EditDiscountType").val();
+ $('#txtEditDiscount').val('');
+ $('#txtEditAfterDiscount').val('');
+ if (selValue == '')
+ {
+
+ $('#txtEditDiscount').attr('readonly', 'true');
+ $('#txtEditDiscount').val('0.00');
+ $('#txtEditAfterDiscount').val('0.00');
+
+ }
+ else
+ {
+ $('#txtEditDiscount').removeAttr( 'readonly','true' );
+ $('#txtEditDiscount').val('');
+ $('#txtEditAfterDiscount').val('');
+ }
+ }
+ else
+ {
+ alert('Please Select MaterialCode and Rate Field Value');
+ $('#EditDiscountType').val("0");
+ $('#EditCPRate').focus();
+ }
+ EditRatechange();
+
+});
+/*
+ * To calcuate the Discount */
+function calculateDiscount(isEdit)
+ {
+
+
+ if(isEdit == '0')
+ {
+
+ if($('#CPRate').val() == '')
+ {
+ alert('Please Enter the Rate value');
+ $('#CPRate').focus();
+ $('#txtDiscount').val('');
+ return false;
+ }
+ if($('#CPRate').val() != '')
+ {
+
+ var basicValue = parseFloat($('#CPTotalAmount').val());
+ var DiscountType =$("#DiscountType").val();
+
+ if(DiscountType == "0")
+ {
+ alert('Please Select the discount Type');
+ $('#txtDiscount').val('');
+ $("#DiscountType").focus();
+ }
+ else if ($('#txtDiscount').val() != '' && $('#txtDiscount').val() != '0')
+ {
+ var AfterDiscount = 0.0;
+ var Discountval = parseFloat($('#txtDiscount').val());
+ if(DiscountType == '')
+ {
+
+ AfterDiscount = ;
+
+ }
+ else if(DiscountType == '' )
+ {
+ AfterDiscount = "0.00";
+ }
+ else
+ {
+ AfterDiscount = ;
+ }
+ var discount = parseFloat(AfterDiscount).toFixed(2);
+ $('#txtAfterDiscount').val(discount);
+ }
+ else
+ {
+ $('#txtAfterDiscount').val("0.00");
+ }
+ Ratechange();
+ }
+
+
+ }
+ else
+ {
+
+
+ if($('#EditCPRate').val() != '')
+ {
+
+ var basicValue = parseFloat($('#EditCPTotalAmount').val());
+ var DiscountType =$("#EditDiscountType").val();
+
+ if(DiscountType == "0")
+ {
+ alert('Please Select the discount Type');
+ $('#txtEditDiscount').val('');
+ $("#EditDiscountType").focus();
+ }
+ else if ($('#txtEditDiscount').val() != '' && $('#txtEditDiscount').val() != '0')
+ {
+ var AfterDiscount = 0.0;
+ var Discountval = parseFloat($('#txtEditDiscount').val());
+ if(DiscountType == '')
+ {
+
+ AfterDiscount = ;
+
+ }
+ else if(DiscountType == '' )
+ {
+ AfterDiscount = "0.00";
+ }
+ else
+ {
+ AfterDiscount = ;
+ }
+ var discount = parseFloat(AfterDiscount).toFixed(2);
+ $('#txtEditAfterDiscount').val(discount);
+ }
+ else
+ {
+ $('#txtEditAfterDiscount').val("0.00");
+ }
+ EditRatechange();
+ }
+
+ }
+ }
+
+function updateDiscountValuesChange(totAmt,disType,disAmt){
+
+ var basicValue = totAmt;
+ var DiscountType =disType;
+
+
+ var AfterDiscount = 0.0;
+ var Discountval = parseFloat(disAmt);
+ if(DiscountType == '')
+ {
+
+ AfterDiscount = ;
+
+ }
+ else if(DiscountType == '' )
+ {
+ AfterDiscount = "0.00";
+ }
+ else
+ {
+ AfterDiscount = ;
+ }
+ var discount = parseFloat(AfterDiscount).toFixed(2);
+ return discount;
+ }
+
+function calculateFreight(isEdit)
+ {
+
+ if(isEdit == '0')
+ {
+
+ if($('#AfterBasicPriceTax').val() == '')
+ {
+ alert('Please Enter the Rate value');
+ $('#CPRate').focus();
+ $('#txtFreight').val('') ;
+ return false;
+ }
+ else
+ {
+ var basicValue = parseFloat($('#AfterBasicPriceTax').val());
+
+ var FreightType =$("#drpFreight").val();
+ if(FreightType == "0")
+ {
+ alert('Please select Freight Type');
+ $('#txtFreight').val('');
+ $("#drpFreight").focus();
+ }
+ else if( $('#txtFreight').val() != "0" && $('#txtFreight').val() != '')
+ {
+
+ var FreightValue = parseFloat($('#txtFreight').val());
+
+ var Quantity = parseFloat($('#CPQuantity').val());
+
+ var AfterFreight = 0.0;
+ if(FreightType == '')
+ {
+
+ AfterFreight = ;
+
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = 0.0;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ if($('#NOOfTrips').val()==''){
+ alert('Please Enter No of Trip');
+
+ $("#NOOfTrips").focus();
+ $('#txtFreight').val(0)
+ AfterFreight=0;
+ $('#txtAfterFreight').val("0.00");
+ return false;
+ }
+ else{
+ var noOftrip = $("#NOOfTrips").val();
+ AfterFreight = ;
+ AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2);
+ }
+
+
+ }
+ else {
+ AfterFreight = $("#txtFreight").val();
+ }
+ var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
+
+ $('#txtAfterFreight').val(AfterFreightval);
+ }
+ else
+ {
+ $('#txtAfterFreight').val("0.00");
+ }
+
+ }
+
+ }
+ else if(isEdit == '2'){
+
+ if($('#ViewAfterBasicPriceTax').val() == '')
+ {
+ alert('Please Enter the Rate value');
+ $('#ViewCPRate').focus();
+ $('#txtViewFreight').val('') ;
+ return false;
+ }
+
+ else
+ {
+ var basicValue = parseFloat($('#ViewAfterBasicPriceTax').val());
+ var FreightType =$("#drpViewFreight").val();
+ if(FreightType == "0")
+ {
+ alert('Please select Freight Type');
+ $('#txtViewFreight').val('');
+ $("#drpViewFreight").focus();
+ }
+ else if( $('#txtViewFreight').val() != "0" && $('#txtViewFreight').val() != '')
+ {
+ var FreightValue = parseFloat($('#txtViewFreight').val());
+
+ var Quantity = parseFloat($('#ViewCPQuantity').val());
+ //alert(FreightType);
+ var AfterFreight = 0.0;
+ if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = 0.0;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ if($('#ViewNOOfTrips').val()==''){
+ alert('Please Enter No of Trip');
+
+ $("#ViewNOOfTrips").focus();
+ $('#txtViewFreight').val(0)
+ AfterFreight=0;
+ $('#txtViewAfterFreight').val("0.00");
+ return false;
+ }
+ else{
+ var noOftrip = $("#ViewNOOfTrips").val();
+ AfterFreight = ;
+ AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2);
+ }
+ }
+ else {
+ AfterFreight = $("#txtViewFreight").val();
+ }
+ var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
+
+ $('#txtViewAfterFreight').val(AfterFreightval);
+ }
+ else
+ {
+ $('#txtViewAfterFreight').val("0.00");
+ }
+
+ }
+
+ }
+
+
+ else if(isEdit == '3'){
+
+
+ if($('#EditAfterBasicPriceTax').val() != '')
+ {
+ var basicValue = parseFloat($('#EditAfterBasicPriceTax').val());
+
+ var FreightType =$("#drpamendFreight").val();
+
+ if( $('#AmendtxtFreight').val() != "0" && $('#AmendtxtFreight').val() != '')
+ {
+
+ var FreightValue = parseFloat($('#AmendtxtFreight').val());
+
+ var Quantity = parseFloat($('#EditCPQuantity').val());
+
+ var AfterFreight = 0.0;
+ if(FreightType == '')
+ {
+
+ AfterFreight = ;
+
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = 0.0;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ if($('#AmendNOOfTrips').val()==''){
+ alert('Please Enter No of Trip');
+
+ $("#AmendNOOfTrips").focus();
+ $('#AmendtxtFreight').val(0)
+ AfterFreight=0;
+ $('#AmendtxtAfterFreight').val("0.00");
+ return false;
+ }
+ else{
+ var noOftrip = $("#AmendNOOfTrips").val();
+ AfterFreight = ;
+ AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2);
+ }
+
+
+ }
+ else {
+ AfterFreight = $("#AmendtxtFreight").val();
+ }
+ var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
+
+ $('#AmendtxtAfterFreight').val(AfterFreightval);
+ }
+ else
+ {
+ $('#AmendtxtAfterFreight').val("0.00");
+ }
+
+ }
+
+ }
+ else if(isEdit == '4'){
+
+
+ if($('#EditAfterBasicPriceTax').val() != '')
+ {
+ var basicValue = parseFloat($('#EditAfterBasicPriceTax').val());
+ var FreightType =$("#drpEditFreight").val();
+
+ if( $('#txtEditFreight').val() != "0" && $('#txtEditFreight').val() != '')
+ {
+ var FreightValue = parseFloat($('#txtEditFreight').val());
+
+ var Quantity = parseFloat($('#EditCPQuantity').val());
+ //alert(FreightType);
+ var AfterFreight = 0.0;
+ if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = 0.0;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ if($('#EditNOOfTrips').val()==''){
+ alert('Please Enter No of Trip');
+
+ $("#EditNOOfTrips").focus();
+ $('#txtEditFreight').val(0)
+ AfterFreight=0;
+ $('#txtEditAfterFreight').val("0.00");
+ return false;
+ }
+ else{
+ var noOftrip = $("#EditNOOfTrips").val();
+ AfterFreight = ;
+ AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2);
+ }
+ }
+ else {
+ AfterFreight = $("#txtEditFreight").val();
+ }
+ var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
+
+ $('#txtEditAfterFreight').val(AfterFreightval);
+ }
+ else
+ {
+ $('#txtEditAfterFreight').val("0.00");
+ }
+
+ }
+
+ }
+ else
+ {
+ if($('#EditAfterBasicPriceTax').val() == '')
+ {
+ alert('Please Enter the Rate value');
+ $('#EditCPRate').focus();
+ $('#txtEditFreight').val('') ;
+ return false;
+ }
+
+ else
+ {
+ var basicValue = parseFloat($('#EditAfterBasicPriceTax').val());
+ var FreightType =$("#drpEditFreight").val();
+ if(FreightType == "0")
+ {
+ alert('Please select Freight Type');
+ $('#txtEditFreight').val('');
+ $("#drpEditFreight").focus();
+ }
+ else if( $('#txtEditFreight').val() != "0" && $('#txtEditFreight').val() != '')
+ {
+ var FreightValue = parseFloat($('#txtEditFreight').val());
+
+ var Quantity = parseFloat($('#EditCPQuantity').val());
+ //alert(FreightType);
+ var AfterFreight = 0.0;
+ if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = 0.0;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ AfterFreight = ;
+ }
+ else if(FreightType == '')
+ {
+ if($('#EditNOOfTrips').val()==''){
+ alert('Please Enter No of Trip');
+
+ $("#EditNOOfTrips").focus();
+ $('#txtEditFreight').val(0)
+ AfterFreight=0;
+ $('#txtEditAfterFreight').val("0.00");
+ return false;
+ }
+ else{
+ var noOftrip = $("#EditNOOfTrips").val();
+ AfterFreight = ;
+ AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2);
+ }
+ }
+ else {
+ AfterFreight = $("#txtEditFreight").val();
+ }
+ var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
+
+ $('#txtEditAfterFreight').val(AfterFreightval);
+ }
+ else
+ {
+ $('#txtEditAfterFreight').val("0.00");
+ }
+
+ }
+
+
+ }
+ }
+
diff --git a/application/views/editCapitalPo.php b/application/views/editCapitalPo.php
index 7ecd7290..88ea3539 100644
--- a/application/views/editCapitalPo.php
+++ b/application/views/editCapitalPo.php
@@ -1,6887 +1,6888 @@
- "NO","value"=>"0"),array("name"=>"YES","value"=>"1")
- );
- $requestedBy=$requestedBy[0]->FirstName;
- $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
- $CurrentDate = $dt->format('d-m-Y');
- $res_arr_values = array();
- $DeliverOption='';
- $SupId = '';
- $SupName = '';
- $Address = '';
- $PODate = '';
- $TotalCgst='';
- $TotalSgst='';
- $TotalIgst='';
- $DeliveryAddress ='';
- $POStatus = '';
- $PONO = '';
- $TotalCgst = 0;
- $TotalSgst = 0.0;
- $TotalIgst = 0.0;
- $OtherAmt = 0.0;
-
- $TotalSummary = 0.0;
- $TotalBasicAmount = 0.0;
- $ServiceDescription = '';
- $Import_DispatchDetails='';
- $Import_PlaceofOrgin='';
- $CapitalRange='';
-
- $Deliverydt='';
- $DeliverSchedule='';
- $PONOStatus='';
- $MaxPoDate = '';
- $AvlAmount = 0;
- $currentCurrencyType='';
- $exchangeRate = $ExchangeRate;
- $ConfigValue='';
-
- $TotalLanding=0;
- $tothighseas=0;
- $totcustom=0;
- $totexciseduty=0;
- $totexcisedutyED=0;
- $totexciseSH=0;
- $totcustomED=0;
- $totcustomSH=0;
- $totaddtnlexcise=0;
- $totgrossduty=0;
- $totavlmodvat=0;
- $totgrossexpense=0;
- $totordervalue=0;
- $ExchangeRate=0;
- $totorder=0;
- $ExchangeRate='';
- $PaymentTerms='';
- $PaymentDays='';
- $PayableAT='';
- $ExchangeDate='';
- $ExchangeRateOn='';
- $UpdatedOn;
- $CapitalRange='';
- $PoStatusName='';
- $otherPayment='';
- $INR='';
- $INRSYM='';
- $ExitTotalOrderValue=0;
-
- $ExitExchangeRate='';
-
- $ModeOfShipment='';
- $SupplierReference='';
- $SuppliersOfferNo='';
- $OtherReferences='';
- $Fincap='';
- $InsuranceOptions='';
- $InsuranceNo='';
- $ServiceTypeOptions='';
-if(!empty($INRSYMBOL))
-{
- foreach ($INRSYMBOL as $INR)
- {
- $INRSYM=$INR->Currency_Code;
- $INR=$INR->FontCode2000;
- }
-}
-
-//echo $INR;
-
-if(!empty($MaxPODate))
-{
- foreach ($MaxPODate as $date)
- {
- $MaxPoDate = $date->PODate;
-
- }
-}
-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;
- $Ddt = new DateTime($Req->DeliveryDate);
- $Deliverydt = $Ddt->format('d-m-Y');
-
- $DeliveryAddress =$Req->DeliveryAddress;
- $PONOStatus = $Req->StatusCode;
- $POStatus = $Req->StatusCode;
- $PoStatusName=$Req->StatusName;
- $PONO = $Req->PONO;
- $ServiceDescription = $Req->ServiceDescription;
-
- $Exchangedt = new DateTime($Req->ExchangeRateCalculatedon);
- $ExchangeRateOn=$Exchangedt->format('d-m-Y');
-
-
- $PaymentTerms=$Req->PaymentTerms;
- $otherPayment = $Req->PaymentOtherDescription;
- $Updateddt = new DateTime($Req->UpdatedOn);
- $UpdatedOn=$Updateddt->format('d-m-Y');
-
- $CapitalRange=$Req->CapitalRange;
- $Import_DispatchDetails=$Req->Import_DispatchDetails;
- $Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
- $CapitalRange=$Req->CapitalRange;
-
- if($CapitalRange=='0'){
- $ExitExchangeRate=$Req->ExchangeRate;
- $ExitTotalOrderValue=number_format($Req->TotalOrderValue*$ExitExchangeRate, 2, '.', '');
- }
- else{
- $ExitTotalOrderValue=$Req->TotalOrderValue;
- }
-
- $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;
-
- }
-
-}
-
-
-
-if(!empty($AvlBudAmt))
-{
-
- $AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
-
-
-}
-
-?>
-
-
-
-
-
-
-
-
-
-
-
- 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO');
-
- $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO');
-
-
-
- echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
-
-
-
-
-
-
-
-
Siddharth Industries - Edit Capital Purchase Order-
-
-
-
-
-
-
-
-
-
- 'Selected Requisition Numbers');
- if(!empty($ReqList))
- {
-
- foreach ($ReqList as $SID):
-
- $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqNo;
-
- endforeach;
- }
- echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"');
-
- ?>
-
-
-
-
-
-
-
- CurrencyCode;
- $options1[$CurrencyDetail[0]->Currency_Code] = $CurrencyDetail[0]->Currency_Code.' '.' - '.' '.$CurrencyDetail[0]->Country_and_Currency;
-
- foreach ($Currency as $Cur):
- if($CurrencyDetail[0]->Currency_Code!=$Cur->Currency_Code){
- $options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency;
-
- }
-
- endforeach;
- }
-
- echo form_dropdown('currencytype', $options1,set_value('currencytype',$currentCurrencyType),'id="currencytype"','class="form-control select2"' , 'required="true"');
-
- ?>
-
-
-
-
-
-
-
-
-
-
-
- SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
-
- endforeach;
- }
-
- echo form_dropdown('drpSupplier', $options2,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
-
- ?>
-
-
-
-
-
- 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
-
-
-
-
-
- 'POType','value' => set_value('POType',CAPITAL),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
-
-
-
Select Delivery By
-
-
- "DateRange", "id"=>"Date", "value"=>"2", 'checked'=>('2' == $DeliverOption) ? TRUE : FALSE)); ?>
-
-
-
- "DateRange", "id"=>"DeliverycheckDate", "value"=>"0", 'checked'=>('0' == $DeliverOption) ? TRUE : FALSE)); ?>
-
-
- 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
-
-
-
-
-
-
-
-
- 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
- 'Deliverydate','value' => set_value('Deliverydate',$CurrentDate),'id'=>'Deliverydate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true');
- // echo form_input($data);
-
- $data = array('name' => 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
-
-
-
-
-
- 'Exchangerateon','value' => set_value('Exchangerateon',$ExchangeRateOn),'id'=>'Exchangerateon', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
- 'ExchangeRt','value' => set_value('ExchangeRt',$exchangeRate),'id'=>'ExchangeRt', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
- 'PlaceOforigin','value' => set_value('PlaceOforigin'),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
- // echo form_input($data);
- $data = array('name' => 'PlaceOforigin','value' => set_value('PlaceOforigin',$Import_PlaceofOrgin),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'editmodeofshipment','value' => set_value('editmodeofshipment',$ModeOfShipment),'id'=>'editmodeofshipment', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
- 'editsupplierreference','value' => set_value('editsupplierreference',$SupplierReference),'id'=>'editsupplierreference', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
- 'editsupplierofferno','value' => set_value('editsupplierofferno',$SuppliersOfferNo),'id'=>'editsupplierofferno', 'class' => 'form-control');
- echo form_input($data);
-
- ?>
-
-
-
-
-
-
-
-
-
-
- 'editotherreference','value' => set_value('editotherreference',$OtherReferences),'id'=>'editotherreference', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'editfincap','value' => set_value('editfincap',$Fincap),'id'=>'editfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- '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');
-
-
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
- PaymentTerms)
- {
- $options6[$rl->PaymentID] = $rl->PaymentTerms;
- }
-
- endforeach;
-
-
- if(!empty($Payment))
- {
- foreach ($Payment as $rl2):
-
- if($PaymentTerms!=$rl2->PaymentTerms)
- {
- $options6[$rl2->PaymentID] = $rl2->PaymentTerms;
- }
-
- endforeach;
- }
-
- echo form_dropdown('PaymentMethod', $options6,set_value('PaymentMethod',$PaymentTerms),'id="PaymentMethod"' ,'required="true"' ,'class="form-control select2"');
-
- ?>
-
-
-
-
-
-
-
- 'Otherpayment','Otherpayment' => set_value('Otherpayment'),'id'=>'Otherpayment', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | SNo |
- Requisition No |
- Item Code |
- Item Description |
- Quantity |
- UOM |
- Rate |
- Basic Amount |
- Tax Amount |
- Total Order Amount |
- Actual Quantity |
- Received Quantity |
- Pending Quantity |
- Action |
-
-
-
-
-
-
- |
- ReqNo ?> |
- MaterialCode?> |
- MaterialName?> |
- Quantity ?> |
- UOM ?> |
- Rate ?> |
- Rate * $record->Quantity, 2, '.', '') ?> |
-
- ServiceTaxamount;?> |
-
- |
-
- Rate * $record->Quantity, 2, '.', '') ?> |
- Quantity ?> |
- ReceivedQuantity ?> |
- Quantity - $record->ReceivedQuantity, 2, '.', ''); ?> |
- $record->MaterialCode,"ReqNo"=>$record->ReqNo);
- array_push($res_arr_values, $row);
- ?>
-
-
-
-
-" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | |
-
-
After_CGST;
- $TotalSgst = $TotalSgst + $record->After_SGST;
- $TotalIgst = $TotalIgst + $record->After_IGST;
- $OtherAmt = $OtherAmt + $record->otherallowance;
- $TotalSummary = $TotalSummary+$record->ServiceTaxamount;
- $TotalDiscountedAmt = $record->Afterdiscountval;
- }
- $TotalBasicAmount = $TotalBasicAmount+$record->BasicValue;
- $ServiceDescription = $ServiceDescription;
- if($CapitalRange=='0'){
- $TotalLanding = $TotalLanding + $record->AfterLandingCharge;
- $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge;
- $totcustom = $totcustom + $record->AfterCustomDuty;
- $totexciseduty = $totexciseduty + $record->AfterExciseDuty;
- $totexcisedutyED = $totexcisedutyED + $record->AfterExciseDutyEdCess;
- $totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess;
- $totcustomED = $totcustomED +$record->AfterCustomEdCess;
-
- $totcustomSH = $totcustomSH + $record->AfterCustomSHCess;
- $totaddtnlexcise= $totaddtnlexcise + $record->AfterAddlExciseDuty;
- $totgrossduty = $totgrossduty + $record->Grossdutypayable;
- $totavlmodvat = $totavlmodvat +$record->AvailableModvat;
-
-
- $totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty;
- $ExchangeRate=$record->ExchangeRate;
-
- }
-
-
- // $totorder=$totorder+$record->TotalOrderValue;
- $totalCapitalOrder = $totalCapitalOrder+$record->Rate * $record->Quantity-$TotalDiscountedAmt;
-
-
-
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'txtTotCgst','value' => set_value('txtTotCgst', number_format($TotalCgst, 2, '.', '')),'id'=>'txtTotCgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotSgst','value' => set_value('txtTotSgst',number_format($TotalSgst, 2, '.', '') ),'id'=>'txtTotSgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
- 'txtTotIgst','value' => set_value('txtTotIgst',number_format($TotalIgst, 2, '.', '')),'id'=>'txtTotIgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- 'TotalOtherAllowances','value' => set_value('TotalOtherAllowances',number_format($OtherAmt, 2, '.', '')),'id'=>'TotalOtherAllowances', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
- 'txttotallanding','value' => set_value('txttotallanding',number_format($TotalLanding, 2, '.', '')),'id'=>'txttotallanding', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txttotalhighseas','value' => set_value('txttotalhighseas',number_format($tothighseas, 2, '.', '')),'id'=>'txttotalhighseas', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txttotalcustom','value' => set_value('txttotalcustom',number_format($totcustom, 2, '.', '')),'id'=>'txttotalcustom', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txttotalexcise','value' => set_value('txttotalexcise',number_format($totexciseduty, 2, '.', '')),'id'=>'txttotalexcise', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txttotalexciseED','value' => set_value('txttotalexciseED',number_format($totexcisedutyED, 2, '.', '')),'id'=>'txttotalexciseED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'txttotalexciseSH','value' => set_value('txttotalexciseSH',number_format($totexciseSH, 2, '.', '')),'id'=>'txttotalexciseSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txttotalcustomED','value' => set_value('txttotalcustomED',number_format($totcustomED, 2, '.', '')),'id'=>'txttotalcustomED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txttotalcustomSH','value' => set_value('txttotalcustomSH',number_format($totcustomSH, 2, '.', '')),'id'=>'txttotalcustomSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txttotalAdditionalExciseduty','value' => set_value('txttotalAdditionalExciseduty',number_format($totaddtnlexcise, 2, '.', '')),'id'=>'txttotalAdditionalExciseduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'txttotalgrossduty','value' => set_value('txttotalgrossduty',number_format($totgrossduty, 2, '.', '')),'id'=>'txttotalgrossduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txttotalavlmodvat','value' => set_value('txttotalavlmodvat',number_format($totavlmodvat, 2, '.', '')),'id'=>'txttotalavlmodvat', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'txttotalgrossexpense','value' => set_value('txttotalgrossexpense',number_format($totgrossexpense, 2, '.', '')),'id'=>'txttotalgrossexpense', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
- 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder',number_format($totalCapitalOrder, 2, '.', '')),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
- echo form_input($data);
- ?>
-
-
-
-
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
- echo form_textarea($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ "NO","value"=>"0"),array("name"=>"YES","value"=>"1")
+ );
+ $requestedBy=$requestedBy[0]->FirstName;
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+ $CurrentDate = $dt->format('d-m-Y');
+ $res_arr_values = array();
+ $DeliverOption='';
+ $SupId = '';
+ $SupName = '';
+ $Address = '';
+ $PODate = '';
+ $TotalCgst='';
+ $TotalSgst='';
+ $TotalIgst='';
+ $DeliveryAddress ='';
+ $POStatus = '';
+ $PONO = '';
+ $TotalCgst = 0;
+ $TotalSgst = 0.0;
+ $TotalIgst = 0.0;
+ $OtherAmt = 0.0;
+
+ $TotalSummary = 0.0;
+ $TotalBasicAmount = 0.0;
+ $ServiceDescription = '';
+ $Import_DispatchDetails='';
+ $Import_PlaceofOrgin='';
+ $CapitalRange='';
+
+ $Deliverydt='';
+ $DeliverSchedule='';
+ $PONOStatus='';
+ $MaxPoDate = '';
+ $AvlAmount = 0;
+ $currentCurrencyType='';
+ $exchangeRate = $ExchangeRate;
+ $ConfigValue='';
+
+ $TotalLanding=0;
+ $tothighseas=0;
+ $totcustom=0;
+ $totexciseduty=0;
+ $totexcisedutyED=0;
+ $totexciseSH=0;
+ $totcustomED=0;
+ $totcustomSH=0;
+ $totaddtnlexcise=0;
+ $totgrossduty=0;
+ $totavlmodvat=0;
+ $totgrossexpense=0;
+ $totordervalue=0;
+ $ExchangeRate=0;
+ $totorder=0;
+ $ExchangeRate='';
+ $PaymentTerms='';
+ $PaymentDays='';
+ $PayableAT='';
+ $ExchangeDate='';
+ $ExchangeRateOn='';
+ $UpdatedOn;
+ $CapitalRange='';
+ $PoStatusName='';
+ $otherPayment='';
+ $INR='';
+ $INRSYM='';
+ $ExitTotalOrderValue=0;
+
+ $ExitExchangeRate='';
+
+ $ModeOfShipment='';
+ $SupplierReference='';
+ $SuppliersOfferNo='';
+ $OtherReferences='';
+ $Fincap='';
+ $InsuranceOptions='';
+ $InsuranceNo='';
+ $ServiceTypeOptions='';
+if(!empty($INRSYMBOL))
+{
+ foreach ($INRSYMBOL as $INR)
+ {
+ $INRSYM=$INR->Currency_Code;
+ $INR=$INR->FontCode2000;
+ }
+}
+
+//echo $INR;
+
+if(!empty($MaxPODate))
+{
+ foreach ($MaxPODate as $date)
+ {
+ $MaxPoDate = $date->PODate;
+
+ }
+}
+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;
+ $Ddt = new DateTime($Req->DeliveryDate);
+ $Deliverydt = $Ddt->format('d-m-Y');
+
+ $DeliveryAddress =$Req->DeliveryAddress;
+ $PONOStatus = $Req->StatusCode;
+ $POStatus = $Req->StatusCode;
+ $PoStatusName=$Req->StatusName;
+ $PONO = $Req->PONO;
+ $ServiceDescription = $Req->ServiceDescription;
+
+ $Exchangedt = new DateTime($Req->ExchangeRateCalculatedon);
+ $ExchangeRateOn=$Exchangedt->format('d-m-Y');
+
+
+ $PaymentTerms=$Req->PaymentTerms;
+ $otherPayment = $Req->PaymentOtherDescription;
+ $Updateddt = new DateTime($Req->UpdatedOn);
+ $UpdatedOn=$Updateddt->format('d-m-Y');
+
+ $CapitalRange=$Req->CapitalRange;
+ $Import_DispatchDetails=$Req->Import_DispatchDetails;
+ $Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
+ $CapitalRange=$Req->CapitalRange;
+
+ if($CapitalRange=='0'){
+ $ExitExchangeRate=$Req->ExchangeRate;
+ $ExitTotalOrderValue=number_format($Req->TotalOrderValue*$ExitExchangeRate, 2, '.', '');
+ }
+ else{
+ $ExitTotalOrderValue=$Req->TotalOrderValue;
+ }
+
+ $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;
+
+ }
+
+}
+
+
+
+if(!empty($AvlBudAmt))
+{
+
+ $AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
+
+
+}
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+ 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO');
+
+ $attributes = array('class' => 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'CapitalPO');
+
+
+
+ echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
+
+
+
+
+
+
+
+
Siddharth Industries - Edit Capital Purchase Order-
+
+
+
+
+
+
+
+
+
+ 'Selected Requisition Numbers');
+ if(!empty($ReqList))
+ {
+
+ foreach ($ReqList as $SID):
+
+ $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqNo;
+
+ endforeach;
+ }
+ echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"');
+
+ ?>
+
+
+
+
+
+
+
+ CurrencyCode;
+ $options1[$CurrencyDetail[0]->Currency_Code] = $CurrencyDetail[0]->Currency_Code.' '.' - '.' '.$CurrencyDetail[0]->Country_and_Currency;
+
+ foreach ($Currency as $Cur):
+ if($CurrencyDetail[0]->Currency_Code!=$Cur->Currency_Code){
+ $options1[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency;
+
+ }
+
+ endforeach;
+ }
+
+ echo form_dropdown('currencytype', $options1,set_value('currencytype',$currentCurrencyType),'id="currencytype"','class="form-control select2"' , 'required="true"');
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('drpSupplier', $options2,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+ 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+ 'POType','value' => set_value('POType',CAPITAL),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
Select Delivery By
+
+
+ "DateRange", "id"=>"Date", "value"=>"2", 'checked'=>('2' == $DeliverOption) ? TRUE : FALSE)); ?>
+
+
+
+ "DateRange", "id"=>"DeliverycheckDate", "value"=>"0", 'checked'=>('0' == $DeliverOption) ? TRUE : FALSE)); ?>
+
+
+ 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
+
+
+
+
+
+
+
+
+ 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'Deliverydate','value' => set_value('Deliverydate',$CurrentDate),'id'=>'Deliverydate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true');
+ // echo form_input($data);
+
+ $data = array('name' => 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+ 'Exchangerateon','value' => set_value('Exchangerateon',$ExchangeRateOn),'id'=>'Exchangerateon', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ 'ExchangeRt','value' => set_value('ExchangeRt',$exchangeRate),'id'=>'ExchangeRt', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+ 'PlaceOforigin','value' => set_value('PlaceOforigin'),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
+ // echo form_input($data);
+ $data = array('name' => 'PlaceOforigin','value' => set_value('PlaceOforigin',$Import_PlaceofOrgin),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'editmodeofshipment','value' => set_value('editmodeofshipment',$ModeOfShipment),'id'=>'editmodeofshipment', 'class' => 'form-control');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 'editsupplierreference','value' => set_value('editsupplierreference',$SupplierReference),'id'=>'editsupplierreference', 'class' => 'form-control');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 'editsupplierofferno','value' => set_value('editsupplierofferno',$SuppliersOfferNo),'id'=>'editsupplierofferno', 'class' => 'form-control');
+ echo form_input($data);
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+ 'editotherreference','value' => set_value('editotherreference',$OtherReferences),'id'=>'editotherreference', 'class' => 'form-control');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'editfincap','value' => set_value('editfincap',$Fincap),'id'=>'editfincap', 'class' => 'form-control');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ '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');
+
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ PaymentTerms)
+ {
+ $options6[$rl->PaymentID] = $rl->PaymentTerms;
+ }
+
+ endforeach;
+
+
+ if(!empty($Payment))
+ {
+ foreach ($Payment as $rl2):
+
+ if($PaymentTerms!=$rl2->PaymentTerms)
+ {
+ $options6[$rl2->PaymentID] = $rl2->PaymentTerms;
+ }
+
+ endforeach;
+ }
+
+ echo form_dropdown('PaymentMethod', $options6,set_value('PaymentMethod',$PaymentTerms),'id="PaymentMethod"' ,'required="true"' ,'class="form-control select2"');
+
+ ?>
+
+
+
+
+
+
+
+ 'Otherpayment','Otherpayment' => set_value('Otherpayment'),'id'=>'Otherpayment', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | SNo |
+ Requisition No |
+ Item Code |
+ Item Description |
+ Quantity |
+ UOM |
+ Rate |
+ Basic Amount |
+ Tax Amount |
+ Total Order Amount |
+ Actual Quantity |
+ Received Quantity |
+ Pending Quantity |
+ Action |
+
+
+
+
+
+
+ |
+ ReqNo ?> |
+ MaterialCode?> |
+ MaterialName?> |
+ Quantity ?> |
+ UOM ?> |
+ Rate ?> |
+ Rate * $record->Quantity, 2, '.', '') ?> |
+
+ ServiceTaxamount;?> |
+
+ |
+
+ Rate * $record->Quantity, 2, '.', '') ?> |
+ Quantity ?> |
+ ReceivedQuantity ?> |
+ Quantity - $record->ReceivedQuantity, 2, '.', ''); ?> |
+ $record->MaterialCode,"ReqNo"=>$record->ReqNo);
+ array_push($res_arr_values, $row);
+ ?>
+
+
+
+
+" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | |
+
+
After_CGST;
+ $TotalSgst = $TotalSgst + $record->After_SGST;
+ $TotalIgst = $TotalIgst + $record->After_IGST;
+ $OtherAmt = $OtherAmt + $record->otherallowance;
+ $TotalSummary = $TotalSummary+$record->ServiceTaxamount;
+ $TotalDiscountedAmt = $record->Afterdiscountval;
+ }
+ $TotalBasicAmount = $TotalBasicAmount+$record->BasicValue;
+ $ServiceDescription = $ServiceDescription;
+ if($CapitalRange=='0'){
+ $TotalLanding = $TotalLanding + $record->AfterLandingCharge;
+ $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge;
+ $totcustom = $totcustom + $record->AfterCustomDuty;
+ $totexciseduty = $totexciseduty + $record->AfterExciseDuty;
+ $totexcisedutyED = $totexcisedutyED + $record->AfterExciseDutyEdCess;
+ $totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess;
+ $totcustomED = $totcustomED +$record->AfterCustomEdCess;
+
+ $totcustomSH = $totcustomSH + $record->AfterCustomSHCess;
+ $totaddtnlexcise= $totaddtnlexcise + $record->AfterAddlExciseDuty;
+ $totgrossduty = $totgrossduty + $record->Grossdutypayable;
+ $totavlmodvat = $totavlmodvat +$record->AvailableModvat;
+
+
+ $totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty;
+ $ExchangeRate=$record->ExchangeRate;
+
+ }
+
+
+ // $totorder=$totorder+$record->TotalOrderValue;
+ $totalCapitalOrder = $totalCapitalOrder+$record->Rate * $record->Quantity-$TotalDiscountedAmt;
+
+
+
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotCgst','value' => set_value('txtTotCgst', number_format($TotalCgst, 2, '.', '')),'id'=>'txtTotCgst', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotSgst','value' => set_value('txtTotSgst',number_format($TotalSgst, 2, '.', '') ),'id'=>'txtTotSgst', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotIgst','value' => set_value('txtTotIgst',number_format($TotalIgst, 2, '.', '')),'id'=>'txtTotIgst', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'TotalOtherAllowances','value' => set_value('TotalOtherAllowances',number_format($OtherAmt, 2, '.', '')),'id'=>'TotalOtherAllowances', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ 'txttotallanding','value' => set_value('txttotallanding',number_format($TotalLanding, 2, '.', '')),'id'=>'txttotallanding', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txttotalhighseas','value' => set_value('txttotalhighseas',number_format($tothighseas, 2, '.', '')),'id'=>'txttotalhighseas', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txttotalcustom','value' => set_value('txttotalcustom',number_format($totcustom, 2, '.', '')),'id'=>'txttotalcustom', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txttotalexcise','value' => set_value('txttotalexcise',number_format($totexciseduty, 2, '.', '')),'id'=>'txttotalexcise', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txttotalexciseED','value' => set_value('txttotalexciseED',number_format($totexcisedutyED, 2, '.', '')),'id'=>'txttotalexciseED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txttotalexciseSH','value' => set_value('txttotalexciseSH',number_format($totexciseSH, 2, '.', '')),'id'=>'txttotalexciseSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txttotalcustomED','value' => set_value('txttotalcustomED',number_format($totcustomED, 2, '.', '')),'id'=>'txttotalcustomED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txttotalcustomSH','value' => set_value('txttotalcustomSH',number_format($totcustomSH, 2, '.', '')),'id'=>'txttotalcustomSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txttotalAdditionalExciseduty','value' => set_value('txttotalAdditionalExciseduty',number_format($totaddtnlexcise, 2, '.', '')),'id'=>'txttotalAdditionalExciseduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txttotalgrossduty','value' => set_value('txttotalgrossduty',number_format($totgrossduty, 2, '.', '')),'id'=>'txttotalgrossduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txttotalavlmodvat','value' => set_value('txttotalavlmodvat',number_format($totavlmodvat, 2, '.', '')),'id'=>'txttotalavlmodvat', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txttotalgrossexpense','value' => set_value('txttotalgrossexpense',number_format($totgrossexpense, 2, '.', '')),'id'=>'txttotalgrossexpense', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+ 'CapitalToatlOrder','value' => set_value('CapitalToatlOrder',number_format($totalCapitalOrder, 2, '.', '')),'id'=>'CapitalToatlOrder', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '10', 'cols' => '40' );
+ echo form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/editServiceAmendPO.php b/application/views/editServiceAmendPO.php
index 67996f28..96a2f76f 100755
--- a/application/views/editServiceAmendPO.php
+++ b/application/views/editServiceAmendPO.php
@@ -1,82 +1,99 @@
"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 = '';
var SchName = '';
var others ='';
+ var insuranceOpt = '';
var DelDt = '';
$(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 () {
'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);
?>
@@ -826,7 +872,7 @@ $(document).ready(function () {
'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);
?>
@@ -842,7 +888,7 @@ $(document).ready(function () {
'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);
?>
@@ -856,7 +902,7 @@ $(document).ready(function () {
'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);
?>
@@ -866,12 +912,105 @@ $(document).ready(function () {
'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);
?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ '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');
+
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
@@ -1255,7 +1394,7 @@ $(document).ready(function () {
|
ReqNo ?> |
MaterialCode ?> |
-
MaterialName ?> |
+
ServiceMaterialDescription ?> |
Quantity ?> |
UOM ?> |
@@ -1276,7 +1415,8 @@ $(document).ready(function () {
-
+
+
@@ -1395,7 +1535,7 @@ $(document).ready(function () {
'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);
?>
@@ -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 = '';
-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();
}
});
-
\ No newline at end of file
+