diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php
index e7562d41..41c3c5eb 100755
--- a/application/controllers/amendmentpurchaseorder.php
+++ b/application/controllers/amendmentpurchaseorder.php
@@ -642,7 +642,7 @@ function UpdateAmendServicePurchaseOrder()
function EditAmendImportPO()
{
-
+ $MAD='';
$PONO =$this->input->post('txtPONO');
//echo $PONO;
@@ -664,7 +664,7 @@ function UpdateAmendServicePurchaseOrder()
$ExchangeRateCalculatedon=$this->input->post('Exchangerateon');
$CurrencyType=$this->input->post('currencytype');
$DeliveryOption = $this->input->post('DateRange');
-
+
$DeliverySchedule='';
$Dispatch='';
@@ -681,6 +681,9 @@ function UpdateAmendServicePurchaseOrder()
$DeliverySchedule = '';
}
+
+
+
// if($DeliveryOption==1){
// $Deliverydt = '';
@@ -693,7 +696,9 @@ function UpdateAmendServicePurchaseOrder()
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
- $TotalOrder = $this->input->post('txtTotalorderValue');
+ // $TotalOrder = $this->input->post('txtTotalorderValue');
+ $TotalOrder = $this->input->post('txtToatlOrder');
+ //$beforeTotalOrder=$this->input->post()
//echo "Total Order:".$TotalOrder;
$POStatus = $this->input->post('txtStatus');
@@ -707,13 +712,32 @@ function UpdateAmendServicePurchaseOrder()
$updateddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentTerms');
- $Payableat=$this->input->post('PayableAT');
+ $beforePaymentTerms=$this->input->post('beforePaymentterms');
+
+ //echo $beforePaymentTerms;
+ //die();
+ if($PaymentTerms!=$beforePaymentTerms)
+ {
+ $MAD=$MAD."Amended Payment Terms:". $beforePaymentTerms ."";
+ }
+ //$Payableat=$this->input->post('PayableAT');
$Palaceoforigin=$this->input->post('PlaceOforigin');
+ $beforePalaceoforigin=$this->input->post('beforePlaceOforigin');
+ if($Palaceoforigin!=$beforePalaceoforigin)
+ {
+ $MAD=$MAD."Amended Place of Origin:". $beforePalaceoforigin ."";
+ }
+ //echo $MAD;
+ //die();
+
+
+
//echo $RowCount;
// PO Master
// PO Master
- $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'POType'=>$POType,'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'Import_PlaceofOrgin'=>$Palaceoforigin);
-
+ $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'POType'=>$POType,'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'Import_PlaceofOrgin'=>$Palaceoforigin,'AmendedDetails'=>$MAD);
+ //print_r($POMaster);
+ //die();
// $POList = array('SupplierID'=>$Supp,lierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin);
@@ -742,9 +766,17 @@ function UpdateAmendServicePurchaseOrder()
//echo "Before Loop";
for ($i = 1; $i <= $RowCount; $i++)
{
- //echo "Inside Loop";
+ // echo "Inside Loop";
+ // die();
+ $CAD='';
$MaterialCode = $this->input->post('materialCode'.$i);
- $Quantity = $this->input->post('quantity'.$i);
+ $Quantity = $this->input->post('quantity'.$i);
+ $beforeQuantity=$this->input->post('beforequantity'.$i);
+ if(($Quantity-$beforeQuantity)!=0)
+ {
+ $CAD="Amended Quantity :".$beforeQuantity ."";
+ }
+
$Reqnumber = $this->input->post('Reqnumber'.$i);
$itemRate = $this->input->post('itemRate'.$i);
@@ -752,36 +784,146 @@ function UpdateAmendServicePurchaseOrder()
$BasicPriceinmton = $this->input->post('BasicPriceInMTon'.$i);
$Productprice = $this->input->post('ProductPrice'.$i);
$LandingCharge = $this->input->post('LandingCharge'.$i);
+ $beforeLandingCharge = $this->input->post('beforeLandingCharge'.$i);
+ if(($LandingCharge-$beforeLandingCharge)!=0)
+ {
+ $CAD=$CAD."Amended Landing :".$beforeLandingCharge ."";
+ }
+ // echo $LandingCharge;
+ // echo $beforeLandingCharge;
+ // die();
+
$AfterLandingCharge = $this->input->post('AfterLandingCharge'.$i);
$HighSeas = $this->input->post('HighSeasSalesCharge'.$i);
+ $beforeHighSeas=$this->input->post('beforeHighSeasSalesCharge'.$i);
+ if(($HighSeas-$beforeHighSeas)!=0)
+ {
+ $CAD=$CAD."Amended Highsesas :".$beforeHighSeas ."";
+ }
$AfterHighSeas = $this->input->post('AfterHighSeasSalesCharge'.$i);
$CustomDuty = $this->input->post('CustomDuty'.$i);
+
+ $beforeCustomDuty=$this->input->post('beforeCustomDuty'.$i);
+ if(($CustomDuty-$beforeCustomDuty)!=0)
+ {
+ $CAD=$CAD."Amended CustomDuty :".$beforeCustomDuty ."";
+ }
+
+
$AfterCustomDuty = $this->input->post('AfterCustomDuty'.$i);
$ExciseDuty = $this->input->post('ExciseDuty'.$i);
+ $beforeExciseDuty=$this->input->post('beforeExciseDuty'.$i);
+ if(($ExciseDuty-$beforeExciseDuty)!=0)
+ {
+ $CAD=$CAD."Amended ExciseDuty :".$beforeExciseDuty ."";
+ }
+
+
$AfterExciseDuty = $this->input->post('AfterExciseDuty'.$i);
+
$ExciseDutyEd = $this->input->post('ExciseDutyEdCess'.$i);
+ $beforeExciseDutyEd=$this->input->post('beforeExciseDutyEdCess'.$i);
+ if($ExciseDutyEd-$beforeExciseDutyEd)
+ {
+ $CAD=$CAD."Amended ExciseDutyEd :".$beforeExciseDutyEd ."";
+ }
+
+
$AfterExciseDutyEd = $this->input->post('AfterExciseDutyEdCess'.$i);
$ExciseDutySH = $this->input->post('ExciseDutySHCess'.$i);
+ $beforeExciseDutySH=$this->input->post('beforeExciseDutySHCess'.$i);
+ if($ExciseDutySH-$beforeExciseDutySH)
+ {
+ $CAD=$CAD."Amended ExciseDutySH :".$beforeExciseDutySH ."";
+ }
+
+
$AfterExciseDutySH = $this->input->post('AfterExciseDutySHCess'.$i);
$CustomEd= $this->input->post('CustomEdCess'.$i);
+ $beforeCustomEd=$this->input->post('beforeCustomEdCess'.$i);
+ if($CustomEd-$beforeCustomEd)
+ {
+ $CAD=$CAD."Amended CustomEd :".$beforeCustomEd ."";
+ }
+
+
$AfterCustomEd= $this->input->post('AfterCustomEdCess'.$i);
$CustomSH = $this->input->post('CustomSHCess'.$i);
+ $beforeCustomSH=$this->input->post('beforeCustomSHCess'.$i);
+ if($CustomSH-$beforeCustomSH)
+ {
+ $CAD=$CAD."Amended CustomSH :".$beforeCustomSH ."";
+ }
+
$AfterCustomSH = $this->input->post('AfterCustomSHCess'.$i);
$AddAdtional = $this->input->post('AddlExciseDuty'.$i);
+ $beforeAddAdtional=$this->input->post('beforeAddlExciseDuty'.$i);
+ if($AddAdtional-$beforeAddAdtional)
+ {
+ $CAD=$CAD."Amended Additional Excise duty :".$beforeAddAdtional ."";
+ }
+
$AfterAddAdtional = $this->input->post('AfterAddlExciseDuty'.$i);
$Grossdutypayable = $this->input->post('Grossdutypayable'.$i);
+ $beforeGrossdutypayable = $this->input->post('beforeGrossdutypayable'.$i);
+ // if($Grossdutypayable-$beforeGrossdutypayable)
+ // {
+ // $CAD="Amended Grossdutypayable:".$beforeGrossdutypayable ."";
+ // }
+
+
$AvailableModvat = $this->input->post('AvailableModvat'.$i);
+ $beforeAvailableModvat = $this->input->post('beforeAvailableModvat'.$i);
+ // if($AvailableModvat-$beforeAvailableModvat)
+ // {
+ // $CAD="Amended Available Modvat:".$beforeAvailableModvat ."";
+ // }
+
+
$Grossexpensesduetocustomduty = $this->input->post('Grossexpensesduetocustomduty'.$i);
+ $beforeGrossexpensesduetocustomduty = $this->input->post('Grossexpensesduetocustomduty'.$i);
+ //if($Grossexpensesduetocustomduty-$beforeGrossexpensesduetocustomduty)
+ // {
+ // $CAD="Amended GrosssExpense:".$beforeGrossexpensesduetocustomduty ."";
+ // }
+
+
$purchaseratePerKG = $this->input->post('purchaseratePerKG'.$i);
+ $beforepurchaseratePerKG = $this->input->post('beforepurchaseratePerKG'.$i);
+ // if($purchaseratePerKG-$beforepurchaseratePerKG)
+ // {
+ // $CAD="Amended Purchsae Rate/UOM:".$beforepurchaseratePerKG ."";
+ // }
+
+
+
$CustomDutyExpensesPerKG = $this->input->post('CustomDutyExpensesPerKG'.$i);
+ $beforeCustomDutyExpensesPerKG = $this->input->post('beforeCustomDutyExpensesPerKG'.$i);
+
+ //if($CustomDutyExpensesPerKG-$beforeCustomDutyExpensesPerKG)
+ // {
+ // $CAD="Amended CustomDutyExpense/UOM".$beforeCustomDutyExpensesPerKG ."";
+ // }
+
+
+
+
$RMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomersPerKG'.$i);
+ $beforeRMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomersPerKG'.$i);
+ // if($RMCIncludingCustomersPerKG-$beforeRMCIncludingCustomersPerKG )
+ // {
+ // $CAD="Amended RMC Including Customs".$beforeRMCIncludingCustomersPerKG ."";
+ // }
+
+
+
$QuantityKG = $this->input->post('QuantityKG'.$i);
@@ -794,7 +936,7 @@ function UpdateAmendServicePurchaseOrder()
$LineItemNo = '';
- $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter);
+ $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);
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
diff --git a/application/views/editImportAmendPO.php b/application/views/editImportAmendPO.php
index 2d6259dc..1ce1955d 100755
--- a/application/views/editImportAmendPO.php
+++ b/application/views/editImportAmendPO.php
@@ -467,6 +467,8 @@ body {
+
+
@@ -500,10 +502,28 @@ body {
// 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);
-
+ echo form_input($data);
+
+
+
?>
+
+
+
+
+
@@ -1147,74 +1167,239 @@ body {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -1248,7 +1433,7 @@ body {
$totavlmodvat=$totavlmodvat+$record->AvailableModvat;
$totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty;
$ExchangeRate=$record->ExchangeRate;
- $totorder=$totorder+$record->BasicPriceInMTon;
+ $totorder=$totorder+$record->TotalOrderValue;
//alert($totorder);
@@ -1381,9 +1566,9 @@ body {
- Total Order Value : 'txtToatlOrder','value' => set_value('txtToatlOrder',$totorder),'id'=>'txtToatlOrder', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true');
- // echo form_input($data);
+ echo form_input($data);
?>
@@ -1406,7 +1591,13 @@ body {
-
+
+
+
+
+
+
@@ -1444,12 +1635,15 @@ body {
echo form_input($data);
?>
+
+
-
-
+
+
+
@@ -1720,7 +1914,7 @@ function USRate()
}
function EditRatechange()
-{
+{//alert('in');
var txteditQuantity=parseFloat($('#EditQuantity').val());
var txteditUnitPrice=parseFloat($('#EditRate').val());
var editTot=txteditQuantity*txteditUnitPrice
@@ -2788,7 +2982,7 @@ $('#editimportpomodel').on("shown.bs.modal", function(e) {
$('.EditImport').click(function(){
//alert('inside edit');
- var CostCode = $("#EditCostCenter").val();
+ var CostCode = $("#EditCostCenter").val();
var AvilBudget = $('#EditAvlBudAmt').val();
var editMaterialCode = $("#EditMaterialCode").val();
var edititemname = $("#EditItemName").val();
@@ -2796,7 +2990,8 @@ $('.EditImport').click(function(){
var editQuantity = $('#EditQuantity').val();
var itemRate = $("#EditRate").val();
var BasicValue=$("#EdittxtBasicValue").val();
-
+ var BasicUSPrice=$("#EditimBasicPrice").val();
+ //var BasicValue=$("#EdittxtBasicValue").val();
var BasicPrice=$("#EditBasicPriceTax").val();
var AfterBasicPrice=$("#EditAfterBasicPriceTax").val();
var Landingcharge=$("#EditLandingCharge").val();
@@ -2815,7 +3010,7 @@ $('.EditImport').click(function(){
var AfterCustomED=$("#EditAfterCustomEDcess").val();
var CustomSH=$("#EditCustomSHcess").val();
var AfterCustomSH=$("#EditAfterCustomSHcess").val();
- var AdditionalExciseduty=$("#EditAdditionalExciseduty").val();
+ var AdditionalExciseduty=$("#EditAdditionalExciseduty ").val();
var AfterAdditionalExciseduty=$("#EditAfterAdditionalExciseduty").val();
var GrossDuty=$("#EditGrossdutypayable").val();
var AvailaleModvat=$("#EditAvailableModvat").val();
@@ -2824,8 +3019,11 @@ $('.EditImport').click(function(){
var Quantity=$("#EditPurQuantity").val();
var CustomDutyExpense=$("#EditCustomDutyExpenses").val();
var RMC=$("#EditRMCIncludingCustomers").val();
- var TotalExp=$('#EditTotalExp').val();
-
+ var TotalExp=$('#EdittxtBasicValue').val();
+//alert(itemRate);
+
+//console.log(editQuantity);
+
var tr= document.getElementById(userid);
var cellval = tr.cells;
@@ -2836,45 +3034,50 @@ $('.EditImport').click(function(){
cellval[6].innerHTML =BasicValue;
$('#materialCode'+userid).val(editMaterialCode);
- $('#AvilBudget'+userid).val(AvilBudget);
$('#materialName'+userid).val(edititemname);
$('#uom'+userid).val(editUOM);
$('#quantity'+userid).val(editQuantity);
$('#itemRate'+userid).val(itemRate);
- $('#ProductPrice'+userid).val(BasicValue);
+ $('#BasicAmt'+userid).val(BasicValue);
+ $('#BasicPriceInMTon'+userid).val(BasicUSPrice);
$('#BasicPriceTax'+userid).val(BasicPrice);
$('#AfterBasicPriceTax'+userid).val(AfterBasicPrice);
$('#LandingCharge'+userid).val(Landingcharge);
$('#AfterLandingCharge'+userid).val(AfterLanding);
- $('#Highseass'+userid).val(Highseass);
- $('#AfterHighseass'+userid).val(AfterHighseas);
- $('#Customduty'+userid).val(CustomDuty);
- $('#AfterCustomduty'+userid).val(AfterCustomDuty);
- $('#ExcisedutyTax'+userid).val(ExciseDuty);
- $('#AfterExcisedutyTax'+userid).val(AfterExciseDuty);
- $('#ExcisedutyED'+userid).val(ExciseEd);
- $('#AfterExcisedutyED'+userid).val(AfterExciseEd);
- $('#ExcisedutySH'+userid).val(ExciseDutySH);
- $('#AfterExcisedutySH'+userid).val(AfterExciseDutySH);
- $('#CustomEDcess'+userid).val(CustomED);
- $('#AfterCustomEDcess'+userid).val(AfterCustomED);
- $('#CustomSHcess'+userid).val(CustomSH);
- $('#AfterCustomSHcess'+userid).val(AfterCustomSH);
+ $('#HighSeasSalesCharge'+userid).val(Highseass);
+ $('#AfterHighSeasSalesCharge'+userid).val(AfterHighseas);
+ $('#CustomDuty'+userid).val(CustomDuty);
+ $('#AfterCustomDuty'+userid).val(AfterCustomDuty);
+ $('#ExciseDuty'+userid).val(ExciseDuty);
+ $('#AfterExciseDuty'+userid).val(AfterExciseDuty);
+ $('#ExciseDutyEdCess'+userid).val(ExciseEd);
+ $('#AfterExciseDutyEdCess'+userid).val(AfterExciseEd);
+ $('#ExciseDutySHCess'+userid).val(ExciseDutySH);
+ $('#AfterExciseDutySHCess'+userid).val(AfterExciseDutySH);
+ $('#CustomEdCess'+userid).val(CustomED);
+ $('#AfterCustomEdCess'+userid).val(AfterCustomED);
+ $('#CustomSHCess'+userid).val(CustomSH);
+ $('#AfterCustomSHCess'+userid).val(AfterCustomSH);
$('#AddlExciseDuty'+userid).val(AdditionalExciseduty);
$('#AfterAddlExciseDuty'+userid).val(AfterAdditionalExciseduty);
$('#Grossdutypayable'+userid).val(GrossDuty);
- $('#Grossexpenses'+userid).val(GrossExpense);
- $('#purchaserate'+userid).val(PurchaseRate);
- $('#PurQuantity'+userid).val(Quantity);
- $('#CustomDutyExpenses'+userid).val(CustomDutyExpense);
- $('#RMCIncludingCustomers'+userid).val(RMC);
- $('#TotalExp'+userid).val(TotalExp);
+ $('#Grossexpensesduetocustomduty'+userid).val(GrossExpense);
+ $('#purchaseratePerKG'+userid).val(PurchaseRate);
+ $('#QuantityKG'+userid).val(Quantity);
+ $('#CustomDutyExpensesPerKG'+userid).val(CustomDutyExpense);
+ $('#RMCIncludingCustomersPerKG'+userid).val(RMC);
+ $('#TotalValue'+userid).val(TotalExp);
+ $('#AvailableModvat'+userid).val(AvailaleModvat);
+ //var a=parseFloat($('#HighSeasSalesCharge'+userid).val());
+ //console.log(a);
populateValueMainFormForEditImportTax();
} );
+
+
function populateValueMainFormForEditImportTax()
{
var rows =document.getElementById('ImportTax').rows.length;
@@ -2890,7 +3093,8 @@ function populateValueMainFormForEditImportTax()
var TotalGrossDuty=0;
var TotalAvlmodvat=0;
var TotalGrossExpense=0;
- var totvalue = 0;
+ var Totalvalue=0;
+ var TotalOrdervalue=0;
var i = 0;
var TotalRMC=0;
do{
@@ -2900,11 +3104,9 @@ function populateValueMainFormForEditImportTax()
{
cells = tr.getElementsByTagName('td');
var rowid = cells[0].innerHTML;
- var qty = $('#quantity'+userid).val();
- var rate = $('#itemRate'+userid).val();
- var total = parseFloat(qty) * parseFloat(rate);
-
+
var AfterLandingCharge= $('#AfterLandingCharge'+rowid).val() == '' ? '0.00' : $('#AfterLandingCharge'+rowid).val();
+//console.log(AfterLandingCharge);
var AfterHighseas=$('#AfterHighSeasSalesCharge'+rowid).val()==''?'0.00':$('#AfterHighSeasSalesCharge'+rowid).val();
var AfterCustomduty=$('#AfterCustomDuty'+rowid).val()==''?'0.00':$('#AfterCustomDuty'+rowid).val();
var AfterExcisedutyTax=$('#AfterExciseDuty'+rowid).val()==''?'0.00':$('#AfterExciseDuty'+rowid).val();
@@ -2913,12 +3115,26 @@ var AfterExciseDutySH=$('#AfterExciseDutySHCess'+rowid).val()==''?'0.00':$('#Aft
var AfterAdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
var AfterCustomEDcess=$('#AfterCustomEdCess'+rowid).val()==''?'0.00':$('#AfterCustomEdCess'+rowid).val();
var AfterCustomSHcess=$('#AfterCustomSHCess'+rowid).val()==''?'0.00':$('#AfterCustomSHCess'+rowid).val();
-var AdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
+//var AdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
var Grossdutypayable=$('#Grossdutypayable'+rowid).val()==''?'0.00':$('#Grossdutypayable'+rowid).val();
var AvailableModvat=$('#AvailableModvat'+rowid).val()==''?'0.00':$('#AvailableModvat'+rowid).val();
var Grossexpenses=$('#Grossexpensesduetocustomduty'+rowid).val()==''?'0.00':$('#Grossexpensesduetocustomduty'+rowid).val();
-var RMC=$('#RMCIncludingCustomersPerKG'+rowid).val()==''?'0.00':$('#RMCIncludingCustomersPerKG'+rowid).val();
+var Totalvalue=$('#TotalValue'+rowid).val()==''?'0.00':$('#TotalValue'+rowid).val();
+//var RMC=$('#RMCIncludingCustomers'+rowid).val()==''?'0.00':$('#RMCIncludingCustomers'+rowid).val();
+//console.log(Totalvalue);
+// console.log(AfterHighseas);
+// console.log(AfterCustomduty);
+ //console.log(AfterExcisedutyTax);
+// console.log(AfterExcisedutyEDcess);
+// console.log(AfterExciseDutySH);
+// console.log(AfterAdditionalExciseduty);
+// console.log(AfterCustomEDcess);
+// console.log(AfterCustomSHcess);
+ //console.log(AfterAdditionalExciseduty);
+// console.log(Grossdutypayable);
+// console.log(AvailableModvat);
+// console.log(Grossexpenses);
TotalLanding = parseFloat(TotalLanding) + parseFloat(AfterLandingCharge);
TotalHighseas = parseFloat(TotalHighseas) + parseFloat(AfterHighseas);
TotalCustom = parseFloat(TotalCustom) + parseFloat(AfterCustomduty);
@@ -2927,14 +3143,16 @@ TotalExciseED = parseFloat(TotalExciseED ) + parseFloat(AfterExcisedutyEDcess);
TotalExciseSH = parseFloat(TotalExciseSH) + parseFloat(AfterExciseDutySH);
TotalCustomED = parseFloat(TotalCustomED) + parseFloat(AfterCustomEDcess);
TotalCustomSH = parseFloat(TotalCustomSH ) + parseFloat(AfterCustomSHcess);
-TotalAdditionalExcise = parseFloat(TotalAdditionalExcise ) + parseFloat(AdditionalExciseduty);
+TotalAdditionalExcise = parseFloat(TotalAdditionalExcise ) + parseFloat(AfterAdditionalExciseduty);
TotalGrossDuty = parseFloat(TotalGrossDuty) + parseFloat(Grossdutypayable);
TotalAvlmodvat = parseFloat(TotalAvlmodvat ) + parseFloat(AvailableModvat);
TotalGrossExpense = parseFloat(TotalGrossExpense ) + parseFloat(Grossexpenses);
-//TotalRMC=parseFloat(TotalRMC)+parseFloat(RMC);
- totvalue = parseFloat(totvalue) + parseFloat(total);
+TotalOrdervalue=parseFloat(TotalOrdervalue)+parseFloat(Totalvalue);
+
+//TotalRMC=parseFloat(TotalRMC)+parseFloat(RMC);
+
+//console.log(Totalvalue);
-
}
@@ -2952,11 +3170,113 @@ TotalGrossExpense = parseFloat(TotalGrossExpense ) + parseFloat(Grossexpenses);
$('#txttotalgrossduty').val(parseFloat(TotalGrossDuty).toFixed(2));
$('#txttotalavlmodvat').val(parseFloat(TotalAvlmodvat).toFixed(2));
$('#txttotalgrossexpense').val(parseFloat(TotalGrossExpense).toFixed(2));
+ $('#txtToatlOrder').val(parseFloat(TotalOrdervalue).toFixed(2));
+//var a=parseFloat($('#txttotallanding').val());
+//console.log(a);
+
+
+ //$('#txttotallanding').val(parseFloat(TotalLanding).toFixed(2));
+}
+
+// function populateValueMainFormForEditImportTax()
+// {
+// var rows =document.getElementById('ImportTax').rows.length;
+// var TotalLanding=0;
+// var TotalHighseas=0;
+// var TotalCustom=0;
+// var TotalExcise=0;
+// var TotalExciseED=0;
+// var TotalExciseSH=0;
+// var TotalCustomED=0;
+// var TotalCustomSH=0;
+// var TotalAdditionalExcise=0;
+// var TotalGrossDuty=0;
+// var TotalAvlmodvat=0;
+// var TotalGrossExpense=0;
+// var totvalue = 0;
+// var i = 0;
+// var TotalRMC=0;
+// do{
+// i += 1;
+// var tr= document.getElementById(i);
+// if(tr != null)
+// {
+// cells = tr.getElementsByTagName('td');
+// var rowid = cells[0].innerHTML;
+// var qty = $('#quantity'+userid).val();
+// var rate = $('#itemRate'+userid).val();
+// var total = parseFloat(qty) * parseFloat(rate);
+
+// // var AfterLandingCharge= $('#AfterLandingCharge'+rowid).val() == '' ? '0.00' : $('#AfterLandingCharge'+rowid).val();
+// // var AfterHighseas=$('#AfterHighSeasSalesCharge'+rowid).val()==''?'0.00':$('#AfterHighSeasSalesCharge'+rowid).val();
+// // var AfterCustomduty=$('#AfterCustomDuty'+rowid).val()==''?'0.00':$('#AfterCustomDuty'+rowid).val();
+// // var AfterExcisedutyTax=$('#AfterExciseDuty'+rowid).val()==''?'0.00':$('#AfterExciseDuty'+rowid).val();
+// // var AfterExcisedutyEDcess=$('#AfterExciseDutyEdCess'+rowid).val()==''?'0.00':$('#AfterExciseDutyEdCess'+rowid).val();
+// // var AfterExciseDutySH=$('#AfterExciseDutySHCess'+rowid).val()==''?'0.00':$('#AfterExciseDutySHCess'+rowid).val();
+// // var AfterAdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
+// // var AfterCustomEDcess=$('#AfterCustomEdCess'+rowid).val()==''?'0.00':$('#AfterCustomEdCess'+rowid).val();
+// // var AfterCustomSHcess=$('#AfterCustomSHCess'+rowid).val()==''?'0.00':$('#AfterCustomSHCess'+rowid).val();
+// // var AdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
+// // var Grossdutypayable=$('#Grossdutypayable'+rowid).val()==''?'0.00':$('#Grossdutypayable'+rowid).val();
+// // var AvailableModvat=$('#AvailableModvat'+rowid).val()==''?'0.00':$('#AvailableModvat'+rowid).val();
+// // var Grossexpenses=$('#Grossexpensesduetocustomduty'+rowid).val()==''?'0.00':$('#Grossexpensesduetocustomduty'+rowid).val();
+// // var RMC=$('#RMCIncludingCustomersPerKG'+rowid).val()==''?'0.00':$('#RMCIncludingCustomersPerKG'+rowid).val();
+// var AfterLandingCharge= $('#AfterLandingCharge'+rowid).val() == '' ? '0.00' : $('#AfterLandingCharge'+rowid).val();
+// //console.log(AfterLandingCharge);
+// var AfterHighseas=$('#AfterHighSeasSalesCharge'+rowid).val()==''?'0.00':$('#AfterHighSeasSalesCharge'+rowid).val();
+// var AfterCustomduty=$('#AfterCustomDuty'+rowid).val()==''?'0.00':$('#AfterCustomDuty'+rowid).val();
+// var AfterExcisedutyTax=$('#AfterExciseDuty'+rowid).val()==''?'0.00':$('#AfterExciseDuty'+rowid).val();
+// var AfterExcisedutyEDcess=$('#AfterExciseDutyEdCess'+rowid).val()==''?'0.00':$('#AfterExciseDutyEdCess'+rowid).val();
+// var AfterExciseDutySH=$('#AfterExciseDutySHCess'+rowid).val()==''?'0.00':$('#AfterExciseDutySHCess'+rowid).val();
+// var AfterAdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
+// var AfterCustomEDcess=$('#AfterCustomEdCess'+rowid).val()==''?'0.00':$('#AfterCustomEdCess'+rowid).val();
+// var AfterCustomSHcess=$('#AfterCustomSHCess'+rowid).val()==''?'0.00':$('#AfterCustomSHCess'+rowid).val();
+// //var AdditionalExciseduty=$('#AfterAddlExciseDuty'+rowid).val()==''?'0.00':$('#AfterAddlExciseDuty'+rowid).val();
+// var Grossdutypayable=$('#Grossdutypayable'+rowid).val()==''?'0.00':$('#Grossdutypayable'+rowid).val();
+// var AvailableModvat=$('#AvailableModvat'+rowid).val()==''?'0.00':$('#AvailableModvat'+rowid).val();
+// var Grossexpenses=$('#Grossexpensesduetocustomduty'+rowid).val()==''?'0.00':$('#Grossexpensesduetocustomduty'+rowid).val();
+
+
+
+// TotalLanding = parseFloat(TotalLanding) + parseFloat(AfterLandingCharge);
+// TotalHighseas = parseFloat(TotalHighseas) + parseFloat(AfterHighseas);
+// TotalCustom = parseFloat(TotalCustom) + parseFloat(AfterCustomduty);
+// TotalExcise = parseFloat(TotalExcise) + parseFloat(AfterExcisedutyTax);
+// TotalExciseED = parseFloat(TotalExciseED ) + parseFloat(AfterExcisedutyEDcess);
+// TotalExciseSH = parseFloat(TotalExciseSH) + parseFloat(AfterExciseDutySH);
+// TotalCustomED = parseFloat(TotalCustomED) + parseFloat(AfterCustomEDcess);
+// TotalCustomSH = parseFloat(TotalCustomSH ) + parseFloat(AfterCustomSHcess);
+// TotalAdditionalExcise = parseFloat(TotalAdditionalExcise ) + parseFloat(AdditionalExciseduty);
+// TotalGrossDuty = parseFloat(TotalGrossDuty) + parseFloat(Grossdutypayable);
+// TotalAvlmodvat = parseFloat(TotalAvlmodvat ) + parseFloat(AvailableModvat);
+// TotalGrossExpense = parseFloat(TotalGrossExpense ) + parseFloat(Grossexpenses);
+// //TotalRMC=parseFloat(TotalRMC)+parseFloat(RMC);
+// totvalue = parseFloat(totvalue) + parseFloat(total);
+
+
+// }
+
+
+// }while (i < rows);
+
+// $('#txttotallanding').val(parseFloat(TotalLanding).toFixed(2));
+// $('#txttotalhighseas').val(parseFloat(TotalHighseas).toFixed(2));
+// $('#txttotalcustom').val(parseFloat(TotalCustom).toFixed(2));
+// $('#txttotalexcise').val(parseFloat(TotalExcise).toFixed(2));
+// $('#txttotalexciseED').val(parseFloat(TotalExciseED).toFixed(2));
+// $('#txttotalexciseSH').val(parseFloat(TotalExciseSH).toFixed(2));
+// $('#txttotalcustomED').val(parseFloat(TotalCustomED).toFixed(2));
+// $('#txttotalcustomSH').val(parseFloat(TotalCustomSH).toFixed(2));
+// $('#txttotalAdditionalExciseduty').val(parseFloat(TotalAdditionalExcise).toFixed(2));
+// $('#txttotalgrossduty').val(parseFloat(TotalGrossDuty).toFixed(2));
+// $('#txttotalavlmodvat').val(parseFloat(TotalAvlmodvat).toFixed(2));
+// $('#txttotalgrossexpense').val(parseFloat(TotalGrossExpense).toFixed(2));
- $('#txtTotalorderValue').val(parseFloat(totvalue).toFixed(2));
+// // $('#txtTotalorderValue').val(parseFloat(totvalue).toFixed(2));
+// $('#txtToatlOrder').val(parseFloat(totvalue).toFixed(2));
-}
+// }