freight in capital
This commit is contained in:
parent
90514a494e
commit
65b0c1ec55
@ -1032,6 +1032,28 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
||||||
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
|
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
|
||||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||||
|
|
||||||
|
|
||||||
|
$FreightTypeloc=$this->input->post('Ftype'.$i);
|
||||||
|
$FreightNoofTriploc=$this->input->post('NoTrip'.$i);
|
||||||
|
$Freightrateloc=$this->input->post('Fvalue'.$i);
|
||||||
|
$FreightAmountloc=$this->input->post('Afvalue'.$i);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$beforeFreightTypeloc=$this->input->post('beforeFtype'.$i);
|
||||||
|
$beforeFreightNoofTriploc=$this->input->post('beforeNoTrip'.$i);
|
||||||
|
$beforeFreightrateloc=$this->input->post('beforeFvalue'.$i);
|
||||||
|
$beforeFreightAmountloc=$this->input->post('beforeAfvalue'.$i);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$rowspanvalue=0;
|
$rowspanvalue=0;
|
||||||
|
|
||||||
if($Quantity != $preQuantity)
|
if($Quantity != $preQuantity)
|
||||||
@ -1070,6 +1092,39 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
$rowspanvalue++;
|
$rowspanvalue++;
|
||||||
$CAD.="<tr><td>Amended OtherAllowances : " . $preotherallowance ."</td><td>Current OtherAllowances : " . $otherallowance . "</td></tr>";
|
$CAD.="<tr><td>Amended OtherAllowances : " . $preotherallowance ."</td><td>Current OtherAllowances : " . $otherallowance . "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($FreightTypeloc != $beforeFreightTypeloc)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
$CAD.="<tr><td>Amended Freight Type : " . $beforeFreightTypeloc ."</td><td>Current Qty : " . $FreightTypeloc . "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if($FreightNoofTriploc != $beforeFreightNoofTriploc)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
$CAD.="<tr><td>Amended Freight Nooftrips : " . $beforeFreightNoofTriploc ."</td><td>Current Freight Nooftrips: " . $FreightNoofTriploc . "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if($Freightrateloc != $beforeFreightrateloc)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
$CAD.="<tr><td>Amended Freight Rate : " . $beforeFreightrateloc ."</td><td>Current Freight Rate: " . $Freightrateloc . "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($FreightAmountloc != $beforeFreightAmountloc)
|
||||||
|
{
|
||||||
|
$rowspanvalue++;
|
||||||
|
$CAD.="<tr><td>Amended Freight Amount : " .$beforeFreightAmountloc ."</td><td>Current Freight Amount: " . $FreightAmountloc . "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if($rowspanvalue>0)
|
if($rowspanvalue>0)
|
||||||
{
|
{
|
||||||
@ -1098,7 +1153,7 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
if(trim($POType) == CAPITAL )
|
if(trim($POType) == CAPITAL )
|
||||||
{
|
{
|
||||||
if($capitalType=='1'){
|
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);
|
$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,'FreightType'=>$FreightTypeloc,'NoOfTrip'=>$FreightNoofTriploc,'FreightValue'=>$Freightrateloc,'AfterFreightValue'=>$FreightAmountloc);
|
||||||
|
|
||||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||||
} //echo "Service";
|
} //echo "Service";
|
||||||
@ -1116,6 +1171,8 @@ function UpdateAmendServicePurchaseOrder()
|
|||||||
echo 'Purchase Order'.$PONO.'Amended Successfully! New PO Number Is: '.$NewPO ;
|
echo 'Purchase Order'.$PONO.'Amended Successfully! New PO Number Is: '.$NewPO ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function EditAmendImportPO()
|
function EditAmendImportPO()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -2304,6 +2304,15 @@ function addNewImportPurchaseOrder()
|
|||||||
$DiscountValue = $this->input->post('DisVal'.$i);
|
$DiscountValue = $this->input->post('DisVal'.$i);
|
||||||
$AfterDiscount = $this->input->post('AfterDisVal'.$i);
|
$AfterDiscount = $this->input->post('AfterDisVal'.$i);
|
||||||
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
||||||
|
|
||||||
|
$FreightTypeloc=$this->input->post('FreightTypeloc'.$i);
|
||||||
|
$FreightNoofTriploc=$this->input->post('NoofTriploc'.$i);
|
||||||
|
$Freightrateloc=$this->input->post('FreightRateloc'.$i);
|
||||||
|
$FreightAmountloc=$this->input->post('AfterFreightRateloc'.$i);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$TaxtotalOrderValue = $itemRate*$Quantity+$OtherAmt+$AfterCgst+$AfterSgst+$AfterIgst-$AfterDiscount;
|
$TaxtotalOrderValue = $itemRate*$Quantity+$OtherAmt+$AfterCgst+$AfterSgst+$AfterIgst-$AfterDiscount;
|
||||||
|
|
||||||
$CapitalItemDescription = $this->input->post('CapitalItemDescrition'.$i);
|
$CapitalItemDescription = $this->input->post('CapitalItemDescrition'.$i);
|
||||||
@ -2340,7 +2349,11 @@ function addNewImportPurchaseOrder()
|
|||||||
{
|
{
|
||||||
if($CapitalRange=='1')
|
if($CapitalRange=='1')
|
||||||
{
|
{
|
||||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'otherallowance'=>$OtherAmt,'TotalValue'=>$TaxtotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'discount'=>$DiscountType,'discountval'=>$DiscountValue,'Afterdiscountval'=>$AfterDiscount);
|
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'otherallowance'=>$OtherAmt,'TotalValue'=>$TaxtotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'discount'=>$DiscountType,'discountval'=>$DiscountValue,'Afterdiscountval'=>$AfterDiscount,'FreightType'=>$FreightTypeloc,'NoOfTrip'=>$FreightNoofTriploc,'FreightValue'=>$Freightrateloc,'AfterFreightValue'=>$FreightAmountloc);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||||
|
|
||||||
@ -2364,6 +2377,7 @@ function addNewImportPurchaseOrder()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*Edit Capital po*/
|
/*Edit Capital po*/
|
||||||
function EditCapitalPurchaseOrder()
|
function EditCapitalPurchaseOrder()
|
||||||
{
|
{
|
||||||
@ -2548,6 +2562,28 @@ function addNewImportPurchaseOrder()
|
|||||||
$FreightValue = $this->input->post('FreightVal'.$i);
|
$FreightValue = $this->input->post('FreightVal'.$i);
|
||||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
||||||
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
|
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$FreightTypeloc=$this->input->post('Ftype'.$i);
|
||||||
|
$FreightNoofTriploc=$this->input->post('NoTrip'.$i);
|
||||||
|
$Freightrateloc=$this->input->post('Fvalue'.$i);
|
||||||
|
$FreightAmountloc=$this->input->post('Afvalue'.$i);
|
||||||
|
|
||||||
|
// echo $FreightTypeloc;
|
||||||
|
// echo 'n';
|
||||||
|
// echo $FreightNoofTriploc;
|
||||||
|
// echo 'n';
|
||||||
|
// echo $Freightrateloc;
|
||||||
|
// echo 'n';
|
||||||
|
// echo $FreightAmountloc;
|
||||||
|
|
||||||
|
// die();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$SkipInsert = "False";
|
$SkipInsert = "False";
|
||||||
if( count($comma_separated) > 0)
|
if( count($comma_separated) > 0)
|
||||||
{
|
{
|
||||||
@ -2582,7 +2618,7 @@ function addNewImportPurchaseOrder()
|
|||||||
{
|
{
|
||||||
if($capitalType=='1')
|
if($capitalType=='1')
|
||||||
{
|
{
|
||||||
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'otherallowance'=>$OtherAmt,'TotalValue'=>$TaxtotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'discount'=>$DiscountType,'discountval'=>$DiscountValue,'Afterdiscountval'=>$AfterDiscount);
|
$ServiceTaxList = array('LineItemNo'=>$LineItemNo,'FreightType'=>$FreightTypeloc,'NoOfTrip'=>$FreightNoofTriploc,'FreightValue'=>$Freightrateloc,'AfterFreightValue'=>$FreightAmountloc ,'CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'otherallowance'=>$OtherAmt,'TotalValue'=>$TaxtotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'discount'=>$DiscountType,'discountval'=>$DiscountValue,'Afterdiscountval'=>$AfterDiscount);
|
||||||
|
|
||||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||||
}
|
}
|
||||||
@ -2607,7 +2643,7 @@ function addNewImportPurchaseOrder()
|
|||||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$LineItemNo,$POLineItemList);
|
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$LineItemNo,$POLineItemList);
|
||||||
if($capitalType=='1')
|
if($capitalType=='1')
|
||||||
{
|
{
|
||||||
$ServiceTaxList = array('CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'otherallowance'=>$OtherAmt,'TotalValue'=>$TaxtotalOrderValue, 'UpdateBY'=>$CreateBy,'UpdatedOn'=>$createddt,'discount'=>$DiscountType,'discountval'=>$DiscountValue,'Afterdiscountval'=>$AfterDiscount);
|
$ServiceTaxList = array('CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'otherallowance'=>$OtherAmt,'TotalValue'=>$TaxtotalOrderValue, 'UpdateBY'=>$CreateBy,'UpdatedOn'=>$createddt,'discount'=>$DiscountType,'discountval'=>$DiscountValue,'Afterdiscountval'=>$AfterDiscount,'FreightType'=>$FreightTypeloc,'NoOfTrip'=>$FreightNoofTriploc,'FreightValue'=>$Freightrateloc,'AfterFreightValue'=>$FreightAmountloc);
|
||||||
|
|
||||||
$ServiceTax = $this->purchaseorder_model->updateServiceTax($LineItemNo,$ServiceTaxList);
|
$ServiceTax = $this->purchaseorder_model->updateServiceTax($LineItemNo,$ServiceTaxList);
|
||||||
}
|
}
|
||||||
@ -2627,6 +2663,7 @@ function addNewImportPurchaseOrder()
|
|||||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
|
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* capital po print/pdf*/
|
/* capital po print/pdf*/
|
||||||
|
|
||||||
public function CapitalPoPrint($PONO)
|
public function CapitalPoPrint($PONO)
|
||||||
|
|||||||
@ -1408,7 +1408,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
|||||||
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.Per,LineItem.ServiceMaterialDescription,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency,
|
$subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.Per,LineItem.ServiceMaterialDescription,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency,
|
||||||
Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,ROUND((ServiceTax.After_CGST + ServiceTax.After_SGST + ServiceTax.After_IGST),2) as ServiceTaxamount
|
Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,ROUND((ServiceTax.After_CGST + ServiceTax.After_SGST + ServiceTax.After_IGST),2) as ServiceTaxamount
|
||||||
,ServiceTax.TotalValue,ServiceTax.CGST,ServiceTax.After_CGST,ServiceTax.SGST,ServiceTax.After_SGST,ServiceTax.IGST,ServiceTax.After_IGST,ServiceTax.otherallowance,ServiceTax.discount,ServiceTax.discountval,ServiceTax.Afterdiscountval,
|
,ServiceTax.TotalValue,ServiceTax.CGST,ServiceTax.After_CGST,ServiceTax.SGST,ServiceTax.After_SGST,ServiceTax.IGST,ServiceTax.After_IGST,ServiceTax.otherallowance,ServiceTax.discount,ServiceTax.discountval,ServiceTax.Afterdiscountval,
|
||||||
POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,ROUND((POMast.TotalOrderValue),2) as BasicINRValue,POMast.CurrencyType,
|
POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,ROUND((POMast.TotalOrderValue),2) as BasicINRValue,POMast.CurrencyType,FreightType as Ftype,NoOfTrip as NoTrip,FreightValue as Fvalue,AfterFreightValue as Afvalue,
|
||||||
|
|
||||||
Req.CostCenterCode,Dept.DepartmentName FROM T_PurchaseOrder_LineItem LineItem
|
Req.CostCenterCode,Dept.DepartmentName FROM T_PurchaseOrder_LineItem LineItem
|
||||||
join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO
|
join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO
|
||||||
|
|||||||
@ -91,6 +91,19 @@ if(!empty($INRSYMBOL))
|
|||||||
margin-top:200px;
|
margin-top:200px;
|
||||||
z-index: 1080 !important;
|
z-index: 1080 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#packagingcalmodel {
|
||||||
|
margin-top:200px;
|
||||||
|
z-index: 1080 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#editpackagingcalmodel {
|
||||||
|
margin-top:200px;
|
||||||
|
z-index: 1080 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="<?php echo base_url() ?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
<script src="<?php echo base_url() ?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||||
@ -717,6 +730,80 @@ function vaildateBeforeOpenModal()
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Modal for Packing Calculation -->
|
||||||
|
<div id="packagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Freight Calculation On</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<div class="radio">
|
||||||
|
<label><input type="radio" name="optPackaging" checked="checked" value='0' id="optPackaging"> Basic Amount</label>
|
||||||
|
</div>
|
||||||
|
<div class="radio">
|
||||||
|
<label><input type="radio" name="optPackaging" id="optPackaging" value='1' > After Discount Amount</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
|
||||||
|
<a class="btn btn-primary" ID="PackagingOption" onclick="calculateFreightlocaddper();" style="margin-top: -24px;"> <span class="bold">Ok</span></a>
|
||||||
|
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Modal for Packing Calculation -->
|
||||||
|
<div id="editpackagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Freight Calculation On</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<div class="radio">
|
||||||
|
<label><input type="radio" name="editoptPackaging" checked="checked" value='0' id="editoptPackaging"> Basic Amount</label>
|
||||||
|
</div>
|
||||||
|
<div class="radio">
|
||||||
|
<label><input type="radio" name="editoptPackaging" id="editoptPackaging" value='1' > After Discount Amount</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
|
||||||
|
<a class="btn btn-primary" ID="editPackagingOption" onclick="calculateFreightloceditper();" style="margin-top: -24px;"> <span class="bold">Ok</span></a>
|
||||||
|
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a> -->
|
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a> -->
|
||||||
@ -945,6 +1032,64 @@ function vaildateBeforeOpenModal()
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12" style="padding:0px;">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Freight Type </label>
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
$options = array("0"=>'Select Freight Type');
|
||||||
|
//print_r( $options);
|
||||||
|
|
||||||
|
if(!empty($FreightType))
|
||||||
|
{
|
||||||
|
foreach ($FreightType as $SID):
|
||||||
|
|
||||||
|
|
||||||
|
$options[$SID->ConfigValue] = $SID->ConfigValue;
|
||||||
|
|
||||||
|
endforeach;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo form_dropdown('drpFreightloc', $options,set_value('drpFreightloc'),'id="drpFreightloc"' ,'class="form-control "');
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" id="TripsValueloc" style="display:none;">
|
||||||
|
<label>NO Of Trips</label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'NOOfTripsloc','value' => set_value('NOOfTripsloc'),'id'=>'NOOfTripsloc', 'class' => 'form-control num','onchange'=>'calculateFreightlocaddper(0);' );
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Freight Rate </label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'txtFreightloc','value' => set_value('txtFreightloc'),'id'=>'txtFreightloc', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreightlocaddper();');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3" style="padding-left: 0px;">
|
||||||
|
<label>Freight Amt In <?php echo $INR;?></label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'txtAfterFreightloc','value' => set_value('txtAfterFreightloc'),'id'=>'txtAfterFreightloc', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
@ -1647,6 +1792,65 @@ function vaildateBeforeOpenModal()
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12" style="padding:0px;">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Freight Type </label>
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
$options = array("0"=>'Select Freight Type');
|
||||||
|
//print_r( $options);
|
||||||
|
|
||||||
|
if(!empty($FreightType))
|
||||||
|
{
|
||||||
|
foreach ($FreightType as $SID):
|
||||||
|
|
||||||
|
|
||||||
|
$options[$SID->ConfigValue] = $SID->ConfigValue;
|
||||||
|
|
||||||
|
endforeach;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo form_dropdown('drpFreighteditloc', $options,set_value('drpFreighteditloc'),'id="drpFreighteditloc"' ,'class="form-control "');
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" id="TripsValuelocedit" style="display:none;">
|
||||||
|
<label>NO Of Trips</label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'NOOfTripslocedit','value' => set_value('NOOfTripslocedit'),'id'=>'NOOfTripslocedit', 'class' => 'form-control num','onchange'=>'calculateFreightlocaddper(0);' );
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Freight Rate </label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'txtFreightlocedit','value' => set_value('txtFreightlocedit'),'id'=>'txtFreightlocedit', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreightloceditper();');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3" style="padding-left: 0px;">
|
||||||
|
<label>Freight Amt In <?php echo $INR;?></label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'txtAfterFreightlocedit','value' => set_value('txtAfterFreightlocedit'),'id'=>'txtAfterFreightlocedit', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
@ -2225,6 +2429,18 @@ function vaildateBeforeOpenModal()
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Total Freight <?php echo "($INR)"?> </label>
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'TotalFreight','value' => set_value('TotalFreight'),'id'=>'TotalFreight', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -2832,24 +3048,31 @@ EditRatechange();
|
|||||||
var discountedValue = parseFloat($('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()).toFixed(2);
|
var discountedValue = parseFloat($('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()).toFixed(2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var Freight=parseFloat($('#txtAfterFreightloc').val() == '' ? '0.00' : $('#txtAfterFreightloc').val()).toFixed(2);
|
||||||
|
|
||||||
txtExchangeRate = 1;
|
txtExchangeRate = 1;
|
||||||
BasicInINR=Tot * txtExchangeRate - discountedValue;
|
BasicInINR=(Tot * txtExchangeRate - discountedValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var CPtotal=parseFloat(BasicInINR)+parseFloat(Freight);
|
||||||
|
|
||||||
|
//console.log(CPtotal);
|
||||||
|
|
||||||
|
|
||||||
$('#CPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
$('#CPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
||||||
$('#AfterBasicPriceTax').val(parseFloat(BasicInINR).toFixed(2));
|
$('#AfterBasicPriceTax').val(parseFloat(BasicInINR).toFixed(2));
|
||||||
|
// var a=$('#AfterBasicPriceTax').val();
|
||||||
|
// console.log(a);
|
||||||
|
|
||||||
//ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val());
|
//ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val());
|
||||||
|
|
||||||
if(ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val())){
|
if(ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val())){
|
||||||
//Service Tax calculation
|
//Service Tax calculation
|
||||||
|
|
||||||
$('#AfterCgst').val(calculateCgstTax($('#AfterBasicPriceTax').val(),$("#Cgst").val()== '' ? "0.00" : $('#Cgst').val()));
|
$('#AfterCgst').val(calculateCgstTax(CPtotal,$("#Cgst").val()== '' ? "0.00" : $('#Cgst').val()));
|
||||||
$('#AfterSgst').val(calculateSgstTax($('#AfterBasicPriceTax').val(),$("#Sgst").val()== '' ? "0.00" : $('#Sgst').val()));
|
$('#AfterSgst').val(calculateSgstTax(CPtotal,$("#Sgst").val()== '' ? "0.00" : $('#Sgst').val()));
|
||||||
$('#AfterIgst').val(calculateIgstTax($('#AfterBasicPriceTax').val(),$("#Igst").val()== '' ? "0.00" : $('#Igst').val()));
|
$('#AfterIgst').val(calculateIgstTax(CPtotal,$("#Igst").val()== '' ? "0.00" : $('#Igst').val()));
|
||||||
|
|
||||||
if($('#LandingCharge').val()!='' && $('#AfterBasicPriceTax').val()!=''){
|
if($('#LandingCharge').val()!='' && $('#AfterBasicPriceTax').val()!=''){
|
||||||
$('#AfterLandingCharge').val(calculateLandingCharge($('#LandingCharge').val(),$('#AfterBasicPriceTax').val()));
|
$('#AfterLandingCharge').val(calculateLandingCharge($('#LandingCharge').val(),$('#AfterBasicPriceTax').val()));
|
||||||
@ -3390,6 +3613,22 @@ var purchaseRate = $('#purchaserate').val();
|
|||||||
var FreightVal = $("#txtFreight").val();
|
var FreightVal = $("#txtFreight").val();
|
||||||
var AfterFreightVal = $("#txtAfterFreight").val();
|
var AfterFreightVal = $("#txtAfterFreight").val();
|
||||||
var NoOfTrip = $("#NOOfTrips").val();
|
var NoOfTrip = $("#NOOfTrips").val();
|
||||||
|
|
||||||
|
|
||||||
|
var FreightTypeloc=$('#drpFreightloc').val();
|
||||||
|
var Nooftriploc=$('#NOOfTripsloc').val();
|
||||||
|
|
||||||
|
|
||||||
|
var Freightrateloc=$('#txtFreightloc').val();
|
||||||
|
var AfterFreightAmountloc=$('#txtAfterFreightloc').val();
|
||||||
|
|
||||||
|
|
||||||
|
// console.log(FreightTypeloc);
|
||||||
|
// console.log(Nooftriploc);
|
||||||
|
// console.log(Freightrateloc);
|
||||||
|
// console.log(AfterFreightAmountloc);
|
||||||
|
|
||||||
|
|
||||||
var Total = (parseFloat(basicval)+parseFloat(AfterCgst)+parseFloat(AfterSgst)+parseFloat(AfterIgst)+parseFloat(OtherAmt)-parseFloat(AfterDisVal)).toFixed(2);
|
var Total = (parseFloat(basicval)+parseFloat(AfterCgst)+parseFloat(AfterSgst)+parseFloat(AfterIgst)+parseFloat(OtherAmt)-parseFloat(AfterDisVal)).toFixed(2);
|
||||||
|
|
||||||
|
|
||||||
@ -3399,6 +3638,10 @@ var purchaseRate = $('#purchaserate').val();
|
|||||||
var basicvalInINR=$('#AfterBasicPriceTax').val();
|
var basicvalInINR=$('#AfterBasicPriceTax').val();
|
||||||
var CapitalDescription =$('#ItemDescription').val();
|
var CapitalDescription =$('#ItemDescription').val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#MaterialCode option[value='+materialCode+']').remove();
|
$('#MaterialCode option[value='+materialCode+']').remove();
|
||||||
|
|
||||||
SelectedMaterialCode[CollIndex] = materialCode;
|
SelectedMaterialCode[CollIndex] = materialCode;
|
||||||
@ -3476,6 +3719,8 @@ var purchaseRate = $('#purchaserate').val();
|
|||||||
addHidden(theForm,"Igst"+temp,Igst);
|
addHidden(theForm,"Igst"+temp,Igst);
|
||||||
addHidden(theForm,"AfterIgst"+temp,AfterIgst);
|
addHidden(theForm,"AfterIgst"+temp,AfterIgst);
|
||||||
addHidden(theForm,"OtherAmt"+temp,OtherAmt);
|
addHidden(theForm,"OtherAmt"+temp,OtherAmt);
|
||||||
|
|
||||||
|
|
||||||
addHidden(theForm,"FreightType"+temp,FreightType);
|
addHidden(theForm,"FreightType"+temp,FreightType);
|
||||||
addHidden(theForm,"FreightVal"+temp,FreightVal);
|
addHidden(theForm,"FreightVal"+temp,FreightVal);
|
||||||
addHidden(theForm,"AfterFreightVal"+temp,AfterFreightVal);
|
addHidden(theForm,"AfterFreightVal"+temp,AfterFreightVal);
|
||||||
@ -3487,6 +3732,14 @@ var purchaseRate = $('#purchaserate').val();
|
|||||||
addHidden(theForm,"AfterDisVal"+temp,AfterDisVal);
|
addHidden(theForm,"AfterDisVal"+temp,AfterDisVal);
|
||||||
$('#txtRowCount').val(temp);
|
$('#txtRowCount').val(temp);
|
||||||
|
|
||||||
|
addHidden(theForm,"FreightTypeloc"+temp,FreightTypeloc);
|
||||||
|
addHidden(theForm,"NoofTriploc"+temp,Nooftriploc);
|
||||||
|
addHidden(theForm,"FreightRateloc"+temp,Freightrateloc);
|
||||||
|
addHidden(theForm,"AfterFreightRateloc"+temp,AfterFreightAmountloc);
|
||||||
|
|
||||||
|
// var a=parseFloat($('#NoofTriploc'+temp).val());
|
||||||
|
// console.log(Nooftriploc);
|
||||||
|
|
||||||
|
|
||||||
clearCapitalModalFields();
|
clearCapitalModalFields();
|
||||||
}
|
}
|
||||||
@ -3666,6 +3919,11 @@ var purchaseRate = $('#purchaserate').val();
|
|||||||
var purchaseRate = $('#purchaserate').val() == '' ? '0.00' : $('#purchaserate').val();
|
var purchaseRate = $('#purchaserate').val() == '' ? '0.00' : $('#purchaserate').val();
|
||||||
var CustomDutyExpenses = $('#CustomDutyExpenses').val() == '' ? '0.00' : $('#CustomDutyExpenses').val();
|
var CustomDutyExpenses = $('#CustomDutyExpenses').val() == '' ? '0.00' : $('#CustomDutyExpenses').val();
|
||||||
var RMCIncludingCustomers = $('#RMCIncludingCustomers').val() == '' ? '0.00' : $('#RMCIncludingCustomers').val();
|
var RMCIncludingCustomers = $('#RMCIncludingCustomers').val() == '' ? '0.00' : $('#RMCIncludingCustomers').val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var AfterFreight = $('#txtAfterFreightloc').val() == '' ? '0.00' : $('#txtAfterFreightloc').val();
|
||||||
// var totvalue = $('#txtTotalOrderValue').val() == '' ? '0.00' : $('#txtTotalOrderValue').val();
|
// var totvalue = $('#txtTotalOrderValue').val() == '' ? '0.00' : $('#txtTotalOrderValue').val();
|
||||||
var totvalue = (parseFloat(AfterCgst)+parseFloat(AfterSgst)+parseFloat(AfterIgst)).toFixed(2);
|
var totvalue = (parseFloat(AfterCgst)+parseFloat(AfterSgst)+parseFloat(AfterIgst)).toFixed(2);
|
||||||
|
|
||||||
@ -3677,6 +3935,10 @@ var purchaseRate = $('#purchaserate').val();
|
|||||||
var TotalIgst = $('#txtTotIgst').val() == '' ? '0.00' : $('#txtTotIgst').val();
|
var TotalIgst = $('#txtTotIgst').val() == '' ? '0.00' : $('#txtTotIgst').val();
|
||||||
var TotalAllowance = $('#TotalOtherAllowances').val() == '' ? '0.00' : $('#TotalOtherAllowances').val();
|
var TotalAllowance = $('#TotalOtherAllowances').val() == '' ? '0.00' : $('#TotalOtherAllowances').val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var totfreight=$('#TotalFreight').val() == '' ? '0.00' : $('#TotalFreight').val();
|
||||||
|
|
||||||
var TotLanding = $('#txttotallanding').val() == '' ? '0.00' : $('#txttotallanding').val();
|
var TotLanding = $('#txttotallanding').val() == '' ? '0.00' : $('#txttotallanding').val();
|
||||||
var TotHighseas = $('#txttotalhighseas').val() == '' ? '0.00' : $('#txttotalhighseas').val();
|
var TotHighseas = $('#txttotalhighseas').val() == '' ? '0.00' : $('#txttotalhighseas').val();
|
||||||
var TotCustom = $('#txttotalcustom').val() == '' ? '0.00' : $('#txttotalcustom').val();
|
var TotCustom = $('#txttotalcustom').val() == '' ? '0.00' : $('#txttotalcustom').val();
|
||||||
@ -3698,6 +3960,14 @@ var purchaseRate = $('#purchaserate').val();
|
|||||||
$('#txtTotIgst').val((parseFloat(TotalIgst) + parseFloat(AfterIgst)).toFixed(2) );
|
$('#txtTotIgst').val((parseFloat(TotalIgst) + parseFloat(AfterIgst)).toFixed(2) );
|
||||||
$('#TotalOtherAllowances').val((parseFloat(TotalAllowance) + parseFloat(OtherAmt)).toFixed(2) );
|
$('#TotalOtherAllowances').val((parseFloat(TotalAllowance) + parseFloat(OtherAmt)).toFixed(2) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#TotalFreight').val((parseFloat(totfreight) + parseFloat(AfterFreight)).toFixed(2) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#txttotallanding').val((parseFloat(TotLanding) + parseFloat(landingCharge)).toFixed(2) );
|
$('#txttotallanding').val((parseFloat(TotLanding) + parseFloat(landingCharge)).toFixed(2) );
|
||||||
$('#txttotalhighseas').val((parseFloat(TotHighseas) + parseFloat(HighSeasSalesCharge)).toFixed(2) );
|
$('#txttotalhighseas').val((parseFloat(TotHighseas) + parseFloat(HighSeasSalesCharge)).toFixed(2) );
|
||||||
$('#txttotalcustom').val((parseFloat(TotCustom) + parseFloat(CustomDuty)).toFixed(2) );
|
$('#txttotalcustom').val((parseFloat(TotCustom) + parseFloat(CustomDuty)).toFixed(2) );
|
||||||
@ -3787,6 +4057,12 @@ $('#PurQuantity').val('');
|
|||||||
$("#txtDiscount").val('');
|
$("#txtDiscount").val('');
|
||||||
$("#txtAfterDiscount").val('');
|
$("#txtAfterDiscount").val('');
|
||||||
|
|
||||||
|
$("#drpFreightloc").val('0');
|
||||||
|
$("#NOOfTripsloc").val('');
|
||||||
|
$("#txtFreightloc").val('');
|
||||||
|
$("#txtAfterFreightloc").val('');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function addHidden(theForm, key, value) {
|
function addHidden(theForm, key, value) {
|
||||||
@ -4112,6 +4388,26 @@ function DeleteRow(rowid)
|
|||||||
$('#EditNOOfTrips').val($('#NoOfTrip'+userid).val());
|
$('#EditNOOfTrips').val($('#NoOfTrip'+userid).val());
|
||||||
$("#drpEditFreight").val($('#FreightType'+userid).val());
|
$("#drpEditFreight").val($('#FreightType'+userid).val());
|
||||||
|
|
||||||
|
|
||||||
|
$("#drpFreighteditloc").val($('#FreightTypeloc'+userid).val());
|
||||||
|
$("#NOOfTripslocedit").val($('#NoofTriploc'+userid).val());
|
||||||
|
$("#txtFreightlocedit").val($('#FreightRateloc'+userid).val());
|
||||||
|
$("#txtAfterFreightlocedit").val($('#AfterFreightRateloc'+userid).val());
|
||||||
|
|
||||||
|
|
||||||
|
var FreightTypeloc=$('#FreightTypeloc'+userid).val();
|
||||||
|
|
||||||
|
if (FreightTypeloc == '<?php echo PERTRIP;?>')
|
||||||
|
{
|
||||||
|
$('#TripsValuelocedit').show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#TripsValuelocedit').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var FreightType =$('#FreightType'+userid).val();
|
var FreightType =$('#FreightType'+userid).val();
|
||||||
|
|
||||||
if (FreightType == "PER TRIP"){
|
if (FreightType == "PER TRIP"){
|
||||||
@ -4390,9 +4686,12 @@ function clearAfterAddLineItemAdd(){
|
|||||||
}
|
}
|
||||||
var discountedValue = parseFloat($('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()).toFixed(2);
|
var discountedValue = parseFloat($('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()).toFixed(2);
|
||||||
|
|
||||||
|
var Freight=parseFloat($('#txtAfterFreightlocedit').val() == '' ? '0.00' : $('#txtAfterFreightlocedit').val()).toFixed(2);
|
||||||
|
|
||||||
txtExchangeRate=1;
|
txtExchangeRate=1;
|
||||||
var BasicInINR=Tot * txtExchangeRate - discountedValue;
|
var BasicInINR=Tot * txtExchangeRate - discountedValue;
|
||||||
}
|
}
|
||||||
|
var editCPtotal=parseFloat(BasicInINR)+parseFloat(Freight);
|
||||||
|
|
||||||
$('#EditCPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
$('#EditCPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
||||||
$('#EditAfterBasicPriceTax').val(Math.round(BasicInINR));
|
$('#EditAfterBasicPriceTax').val(Math.round(BasicInINR));
|
||||||
@ -4402,9 +4701,9 @@ function clearAfterAddLineItemAdd(){
|
|||||||
//Service Tax calculation
|
//Service Tax calculation
|
||||||
|
|
||||||
|
|
||||||
$('#EditAfterCgst').val(calculateCgstTax($('#EditAfterBasicPriceTax').val(),$("#EditCgst").val()== '' ? "0.00" : $('#EditCgst').val()));
|
$('#EditAfterCgst').val(calculateCgstTax(editCPtotal,$("#EditCgst").val()== '' ? "0.00" : $('#EditCgst').val()));
|
||||||
$('#EditAfterSgst').val(calculateSgstTax($('#EditAfterBasicPriceTax').val(),$("#EditSgst").val()== '' ? "0.00" : $('#EditSgst').val()));
|
$('#EditAfterSgst').val(calculateSgstTax(editCPtotal,$("#EditSgst").val()== '' ? "0.00" : $('#EditSgst').val()));
|
||||||
$('#EditAfterIgst').val(calculateIgstTax($('#EditAfterBasicPriceTax').val(),$("#Editigst").val()== '' ? "0.00" : $('#EditIgst').val()));
|
$('#EditAfterIgst').val(calculateIgstTax(editCPtotal,$("#Editigst").val()== '' ? "0.00" : $('#EditIgst').val()));
|
||||||
|
|
||||||
// This is for import basic price
|
// This is for import basic price
|
||||||
|
|
||||||
@ -4623,6 +4922,15 @@ function clearAfterAddLineItemAdd(){
|
|||||||
var basicvalInINR=$('#EditAfterBasicPriceTax').val();
|
var basicvalInINR=$('#EditAfterBasicPriceTax').val();
|
||||||
var EditCapitalDescription = $("#EditItemDescription").val();
|
var EditCapitalDescription = $("#EditItemDescription").val();
|
||||||
|
|
||||||
|
var FreightTypeloc=$('#drpFreighteditloc').val();
|
||||||
|
var FreightRateloc=$('#txtFreightlocedit').val();
|
||||||
|
var FreightRateAmountloc=$('#txtAfterFreightlocedit').val();
|
||||||
|
var Nooftriploc=$('#NOOfTripslocedit').val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var DisType = $("#EditDiscountType").val();
|
var DisType = $("#EditDiscountType").val();
|
||||||
var DisVal = $("#txtEditDiscount").val();
|
var DisVal = $("#txtEditDiscount").val();
|
||||||
var AfterDisVal = $("#txtEditAfterDiscount").val();
|
var AfterDisVal = $("#txtEditAfterDiscount").val();
|
||||||
@ -4700,6 +5008,12 @@ function clearAfterAddLineItemAdd(){
|
|||||||
$('#AfterFreightVal'+userid).val(AfterFreightVal);
|
$('#AfterFreightVal'+userid).val(AfterFreightVal);
|
||||||
$('#CapitalItemDescrition'+userid).val(EditCapitalDescription);
|
$('#CapitalItemDescrition'+userid).val(EditCapitalDescription);
|
||||||
|
|
||||||
|
|
||||||
|
$('#FreightTypeloc'+userid).val(FreightTypeloc);
|
||||||
|
$('#NoofTriploc'+userid).val(Nooftriploc);
|
||||||
|
$('#FreightRateloc'+userid).val(FreightRateloc);
|
||||||
|
$('#AfterFreightRateloc'+userid).val(FreightRateAmountloc);
|
||||||
|
|
||||||
cellval[2].innerHTML = materialCode;
|
cellval[2].innerHTML = materialCode;
|
||||||
cellval[3].innerHTML = materialName;
|
cellval[3].innerHTML = materialName;
|
||||||
|
|
||||||
@ -4904,6 +5218,7 @@ function validateEditCapitalTax()
|
|||||||
var TotFreight =0;
|
var TotFreight =0;
|
||||||
var TotDiscount=0;
|
var TotDiscount=0;
|
||||||
var TotBasicAmt =0;
|
var TotBasicAmt =0;
|
||||||
|
var TotaFreight =0;
|
||||||
for (var i = 1; i < rows; i++) {
|
for (var i = 1; i < rows; i++) {
|
||||||
|
|
||||||
var TotalOrderValueSummaryI = $('#ServiceTotalOrderValue'+i).val() == '' ? '0.00' : $('#ServiceTotalOrderValue'+i).val();
|
var TotalOrderValueSummaryI = $('#ServiceTotalOrderValue'+i).val() == '' ? '0.00' : $('#ServiceTotalOrderValue'+i).val();
|
||||||
@ -4912,6 +5227,10 @@ function validateEditCapitalTax()
|
|||||||
var TotalSgstI = $('#AfterSgst'+i).val() == '' ? '0.00' : $('#AfterSgst'+i).val();
|
var TotalSgstI = $('#AfterSgst'+i).val() == '' ? '0.00' : $('#AfterSgst'+i).val();
|
||||||
var TotalIgstI = $('#AfterIgst'+i).val() == '' ? '0.00' : $('#AfterIgst'+i).val();
|
var TotalIgstI = $('#AfterIgst'+i).val() == '' ? '0.00' : $('#AfterIgst'+i).val();
|
||||||
var TotOtherI = $('#OtherAmt'+i).val() == '' ? '0.00' : $('#OtherAmt'+i).val();
|
var TotOtherI = $('#OtherAmt'+i).val() == '' ? '0.00' : $('#OtherAmt'+i).val();
|
||||||
|
|
||||||
|
var TotalFreight = $('#AfterFreightRateloc'+i).val() == '' ? '0.00' : $('#AfterFreightRateloc'+i).val();
|
||||||
|
//console.log(TotalFreight);
|
||||||
|
|
||||||
var discountedRateValue = $('#AfterDisVal'+i).val() == '' ? '0.00' : $('#AfterDisVal'+i).val();
|
var discountedRateValue = $('#AfterDisVal'+i).val() == '' ? '0.00' : $('#AfterDisVal'+i).val();
|
||||||
var TotLandingI = $('#landingCharge'+i).val() == '' ? '0.00' : $('#landingCharge'+i).val();
|
var TotLandingI = $('#landingCharge'+i).val() == '' ? '0.00' : $('#landingCharge'+i).val();
|
||||||
var TotHighseasI = $('#HighSeasSalesCharge'+i).val() == '' ? '0.00' : $('#HighSeasSalesCharge'+i).val();
|
var TotHighseasI = $('#HighSeasSalesCharge'+i).val() == '' ? '0.00' : $('#HighSeasSalesCharge'+i).val();
|
||||||
@ -4935,6 +5254,9 @@ function validateEditCapitalTax()
|
|||||||
TotSgst = parseFloat(TotSgst) + parseFloat(TotalSgstI);
|
TotSgst = parseFloat(TotSgst) + parseFloat(TotalSgstI);
|
||||||
TotIgst = parseFloat(TotIgst) + parseFloat(TotalIgstI);
|
TotIgst = parseFloat(TotIgst) + parseFloat(TotalIgstI);
|
||||||
TotOther = parseFloat(TotOther) + parseFloat(TotOtherI);
|
TotOther = parseFloat(TotOther) + parseFloat(TotOtherI);
|
||||||
|
TotaFreight=parseFloat(TotaFreight)+parseFloat(TotalFreight);
|
||||||
|
|
||||||
|
// console.log(TotaFreight);
|
||||||
|
|
||||||
TotLanding = parseFloat(TotLanding) + parseFloat(TotLandingI);
|
TotLanding = parseFloat(TotLanding) + parseFloat(TotLandingI);
|
||||||
TotHighseas = parseFloat(TotHighseas) + parseFloat(TotHighseasI);
|
TotHighseas = parseFloat(TotHighseas) + parseFloat(TotHighseasI);
|
||||||
@ -4961,6 +5283,7 @@ function validateEditCapitalTax()
|
|||||||
$('#txtTotSgst').val(parseFloat(TotSgst).toFixed(2) );
|
$('#txtTotSgst').val(parseFloat(TotSgst).toFixed(2) );
|
||||||
$('#txtTotIgst').val(parseFloat(TotIgst).toFixed(2) );
|
$('#txtTotIgst').val(parseFloat(TotIgst).toFixed(2) );
|
||||||
$('#TotalOtherAllowances').val(parseFloat(TotOther).toFixed(2) );
|
$('#TotalOtherAllowances').val(parseFloat(TotOther).toFixed(2) );
|
||||||
|
$('#TotalFreight').val(parseFloat(TotaFreight).toFixed(2) );
|
||||||
|
|
||||||
$('#txttotallanding').val((parseFloat(TotLanding) ).toFixed(2) );
|
$('#txttotallanding').val((parseFloat(TotLanding) ).toFixed(2) );
|
||||||
$('#txttotalhighseas').val((parseFloat(TotHighseas) ).toFixed(2) );
|
$('#txttotalhighseas').val((parseFloat(TotHighseas) ).toFixed(2) );
|
||||||
@ -5068,7 +5391,14 @@ function SetCapitalPo()
|
|||||||
function calculateCgstTax(varBasicValue,Cgst)
|
function calculateCgstTax(varBasicValue,Cgst)
|
||||||
{
|
{
|
||||||
|
|
||||||
var basicValue = parseFloat(varBasicValue);
|
var basicValue1 = parseFloat(varBasicValue);
|
||||||
|
|
||||||
|
var Freight=parseFloat($('#txtAfterFreightloc').val() == '' ? '0.00' : $('#txtAfterFreightloc').val()).toFixed(2);
|
||||||
|
|
||||||
|
var basicValue=basicValue1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var Cgst = parseFloat(Cgst);
|
var Cgst = parseFloat(Cgst);
|
||||||
var ServiceTaxValue = 0.0;
|
var ServiceTaxValue = 0.0;
|
||||||
|
|
||||||
@ -5733,6 +6063,342 @@ function updateDiscountValuesChange(totAmt,disType,disAmt){
|
|||||||
var discount = parseFloat(AfterDiscount).toFixed(2);
|
var discount = parseFloat(AfterDiscount).toFixed(2);
|
||||||
return discount;
|
return discount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#drpFreightloc').change(function()
|
||||||
|
{
|
||||||
|
var FreightType =$("#drpFreightloc").val();
|
||||||
|
|
||||||
|
if (FreightType == "PER TRIP")
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#TripsValueloc').show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
$('#TripsValueloc').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
|
||||||
|
{
|
||||||
|
selValue = $("#drpFreightloc").val() ;
|
||||||
|
|
||||||
|
|
||||||
|
$('#txtFreightloc').val('');
|
||||||
|
$('#txtAfterFreight').val('');
|
||||||
|
var PackagingCalculation='';
|
||||||
|
|
||||||
|
if (selValue == '<?php echo NILTYPE;?>')
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtFreightloc').attr('readonly', 'true');
|
||||||
|
$('#txtFreightloc').val('0.00');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(selValue == '<?php echo PERCENTAGE;?>')
|
||||||
|
{
|
||||||
|
var PackagingCalculation = '';
|
||||||
|
$('#packagingcalmodel').modal('show');
|
||||||
|
//PackagingCalculation = $("input:radio[name='optPackaging']:checked").val();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#txtFreightloc').removeAttr( 'readonly','true' );
|
||||||
|
$('#txtFreightloc').val('');
|
||||||
|
|
||||||
|
calculateFreightlocaddper()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert('Please Select MaterialCode and Rate Field Value');
|
||||||
|
$('#drpFreightloc').val("0");
|
||||||
|
$('#Rate').focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function calculateFreightlocaddper()
|
||||||
|
{
|
||||||
|
|
||||||
|
var Calculation = document.querySelector('input[name = "optPackaging"]:checked').value;
|
||||||
|
var FreightType =$("#drpFreightloc").val();
|
||||||
|
$('#packagingcalmodel').modal('hide');
|
||||||
|
|
||||||
|
|
||||||
|
if(FreightType=='<?php echo PERCENTAGE;?>')
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtAfterFreightloc').val('');
|
||||||
|
if(Calculation==0)
|
||||||
|
{
|
||||||
|
var basicValue = $('#CPTotalAmount').val() == '' ? '0.00' : $('#CPTotalAmount').val();
|
||||||
|
var FreightValue = $('#txtFreightloc').val() == '' ? '0.00' : $('#txtFreightloc').val();
|
||||||
|
var AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightloc').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(Calculation==1)
|
||||||
|
{
|
||||||
|
|
||||||
|
var basicinrValue=$('#CPTotalAmount').val() == '' ? '0.00' : $('#CPTotalAmount').val();
|
||||||
|
var discount=$('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val();
|
||||||
|
var basicValue=basicinrValue-discount;
|
||||||
|
var FreightValue = $('#txtFreightloc').val() == '' ? '0.00' : $('#txtFreightloc').val();
|
||||||
|
var AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightloc').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo NILTYPE;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightloc').val('');
|
||||||
|
AfterFreight = 0.00;
|
||||||
|
$('#txtFreightloc').val('');
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightloc').val(txtAfterFreightloc);
|
||||||
|
document.getElementById("txtAfterFreightloc").readOnly = true;
|
||||||
|
document.getElementById("txtFreightloc").readOnly = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo LUMPSUM;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightloc').val('');
|
||||||
|
var FreightValue = $('#txtFreightloc').val() == '' ? '0.00' : $('#txtFreightloc').val();
|
||||||
|
AfterFreight = <?php echo FREIGHT_LUMPSUM;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightloc').val(txtAfterFreightloc);
|
||||||
|
document.getElementById("txtAfterFreightloc").readOnly = true;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo PERUOM;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightloc').val('');
|
||||||
|
var FreightValue = $('#txtFreightloc').val() == '' ? '0.00' : $('#txtFreightloc').val();
|
||||||
|
var Quantity= $('#CPQuantity').val() == '' ? '0.00' : $('#CPQuantity').val();
|
||||||
|
AfterFreight = <?php echo FREIGHT_PERUOM;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightloc').val(txtAfterFreightloc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightloc').val('');
|
||||||
|
var FreightValue = $('#txtFreightloc').val() == '' ? '0.00' : $('#txtFreightloc').val();
|
||||||
|
var noOftrip = $('#NOOfTripsloc').val() == '' ? '0.00' : $('#NOOfTripsloc').val();
|
||||||
|
|
||||||
|
AfterFreight = <?php echo FREIGHT_PERTRIP;?>;
|
||||||
|
|
||||||
|
AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2);
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightloc').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtAfterFreightloc').val('');
|
||||||
|
var FreightValue = $('#txtFreightloc').val() == '' ? '0.00' : $('#txtFreightloc').val();
|
||||||
|
var txtAfterFreightloc= parseFloat(FreightValue).toFixed(2);
|
||||||
|
$('#txtAfterFreightloc').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#drpFreighteditloc').change(function()
|
||||||
|
{
|
||||||
|
var FreightType =$("#drpFreighteditloc").val();
|
||||||
|
|
||||||
|
if (FreightType == "PER TRIP")
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#TripsValuelocedit').show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
$('#TripsValuelocedit').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($('#EditCPRate').val() != '' && $('#EditMaterialCode').val() != "0" )
|
||||||
|
{
|
||||||
|
selValue = $("#drpFreighteditloc").val() ;
|
||||||
|
|
||||||
|
|
||||||
|
$('#txtFreightlocedit').val('');
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var PackagingCalculation='';
|
||||||
|
|
||||||
|
if (selValue == '<?php echo NILTYPE;?>')
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtFreightlocedit').attr('readonly', 'true');
|
||||||
|
$('#txtFreightlocedit').val('0.00');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(selValue == '<?php echo PERCENTAGE;?>')
|
||||||
|
{
|
||||||
|
var PackagingCalculation = '';
|
||||||
|
$('#editpackagingcalmodel').modal('show');
|
||||||
|
//PackagingCalculation = $("input:radio[name='optPackaging']:checked").val();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// $('#txtFreightlocedit').removeAttr( 'readonly','true' );
|
||||||
|
$('#txtFreightlocedit').val('');
|
||||||
|
|
||||||
|
calculateFreightloceditper()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert('Please Select MaterialCode and Rate Field Value');
|
||||||
|
$('#drpFreighteditloc').val("0");
|
||||||
|
$('#Rate').focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function calculateFreightloceditper()
|
||||||
|
{
|
||||||
|
|
||||||
|
var Calculation = document.querySelector('input[name = "editoptPackaging"]:checked').value;
|
||||||
|
var FreightType =$("#drpFreighteditloc").val();
|
||||||
|
$('#editpackagingcalmodel').modal('hide');
|
||||||
|
|
||||||
|
|
||||||
|
if(FreightType=='<?php echo PERCENTAGE;?>')
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
if(Calculation==0)
|
||||||
|
{
|
||||||
|
var basicValue = $('#EditCPTotalAmount').val() == '' ? '0.00' : $('#EditCPTotalAmount').val();
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(Calculation==1)
|
||||||
|
{
|
||||||
|
|
||||||
|
var basicinrValue=$('#EditCPTotalAmount').val() == '' ? '0.00' : $('#EditCPTotalAmount').val();
|
||||||
|
var discount=$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val();
|
||||||
|
var basicValue=basicinrValue-discount;
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo NILTYPE;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
AfterFreight = 0.00;
|
||||||
|
$('#txtFreightlocedit').val('');
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
document.getElementById("txtAfterFreightlocedit").readOnly = true;
|
||||||
|
document.getElementById("txtFreightlocedit").readOnly = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo LUMPSUM;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
AfterFreight = <?php echo FREIGHT_LUMPSUM;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
document.getElementById("txtAfterFreightlocedit").readOnly = true;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo PERUOM;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var Quantity= $('#EditCPQuantity').val() == '' ? '0.00' : $('#EditCPQuantity').val();
|
||||||
|
AfterFreight = <?php echo FREIGHT_PERUOM;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var noOftrip = $('#NOOfTripslocedit').val() == '' ? '0.00' : $('#NOOfTripslocedit').val();
|
||||||
|
|
||||||
|
AfterFreight = <?php echo FREIGHT_PERTRIP;?>;
|
||||||
|
|
||||||
|
AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2);
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var txtAfterFreightloc= parseFloat(FreightValue).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
EditRatechange();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,8 @@
|
|||||||
$Totalotherallowances = 0.0;
|
$Totalotherallowances = 0.0;
|
||||||
$TotalDiscountedAmt=0.0;
|
$TotalDiscountedAmt=0.0;
|
||||||
|
|
||||||
|
$TotalFreightvalue=0.0;
|
||||||
|
|
||||||
$TotalSummary = 0.0;
|
$TotalSummary = 0.0;
|
||||||
$TotalBasicAmount = 0.0;
|
$TotalBasicAmount = 0.0;
|
||||||
$scopeofwork = '';
|
$scopeofwork = '';
|
||||||
@ -216,6 +218,13 @@ else {
|
|||||||
.content-wrapper {
|
.content-wrapper {
|
||||||
min-height:600px ! important;
|
min-height:600px ! important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#editpackagingcalmodel {
|
||||||
|
margin-top:200px;
|
||||||
|
z-index: 1080 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="<?php echo base_url() ?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
<script src="<?php echo base_url() ?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -862,6 +871,42 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="editpackagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Freight Calculation On</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<div class="radio">
|
||||||
|
<label><input type="radio" name="editoptPackaging" checked="checked" value='0' id="editoptPackaging"> Basic Amount</label>
|
||||||
|
</div>
|
||||||
|
<div class="radio">
|
||||||
|
<label><input type="radio" name="editoptPackaging" id="editoptPackaging" value='1' > After Discount Amount</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
|
||||||
|
<a class="btn btn-primary" ID="editPackagingOption" onclick="calculateFreightloceditper();" style="margin-top: -24px;"> <span class="bold">Ok</span></a>
|
||||||
|
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div align="right">
|
<div align="right">
|
||||||
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a> -->
|
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a> -->
|
||||||
@ -1010,6 +1055,36 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
|||||||
<input align="right" type="hidden" name="<?php echo 'beforeDisVal'.$index ?>" id="<?php echo 'beforeDisVal'.$index ?>" value="<?php echo $record->discountval ; ?>" />
|
<input align="right" type="hidden" name="<?php echo 'beforeDisVal'.$index ?>" id="<?php echo 'beforeDisVal'.$index ?>" value="<?php echo $record->discountval ; ?>" />
|
||||||
<input align="right" type="hidden" name="<?php echo 'beforeAfterDisVal'.$index ?>" id="<?php echo 'beforeAfterDisVal'.$index ?>" value="<?php echo $record->Afterdiscountval ; ?>" />
|
<input align="right" type="hidden" name="<?php echo 'beforeAfterDisVal'.$index ?>" id="<?php echo 'beforeAfterDisVal'.$index ?>" value="<?php echo $record->Afterdiscountval ; ?>" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<input type="hidden" name="<?php echo 'Ftype'.$index ?>" id="<?php echo 'Ftype'.$index ?>" value="<?php echo $record->Ftype; ?>" />
|
||||||
|
|
||||||
|
<input type="hidden" name="<?php echo 'beforeFtype'.$index ?>" id="<?php echo 'beforeFtype'.$index ?>" value="<?php echo $record->Ftype; ?>" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<input type="hidden" name="<?php echo 'NoTrip'.$index ?>" id="<?php echo 'NoTrip'.$index ?>" value="<?php echo $record->NoTrip; ?>" />
|
||||||
|
|
||||||
|
<input type="hidden" name="<?php echo 'beforeNoTrip'.$index ?>" id="<?php echo 'beforeNoTrip'.$index ?>" value="<?php echo $record->NoTrip; ?>" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<input type="hidden" name="<?php echo 'Fvalue'.$index ?>" id="<?php echo 'Fvalue'.$index ?>" value="<?php echo $record->Fvalue; ?>" />
|
||||||
|
|
||||||
|
<input type="hidden" name="<?php echo 'beforeFvalue'.$index ?>" id="<?php echo 'beforeFvalue'.$index ?>" value="<?php echo $record->Fvalue; ?>" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<input type="hidden" name="<?php echo 'Afvalue'.$index ?>" id="<?php echo 'Afvalue'.$index ?>" value="<?php echo $record->Afvalue; ?>" />
|
||||||
|
|
||||||
|
<input type="hidden" name="<?php echo 'beforeAfvalue'.$index ?>" id="<?php echo 'beforeAfvalue'.$index ?>" value="<?php echo $record->Afvalue; ?>" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php }else if($CapitalRange=='0'){?>
|
<?php }else if($CapitalRange=='0'){?>
|
||||||
<input type="hidden" name="<?php echo 'SGST'.$index ?>" id="<?php echo 'SGST'.$index ?>" value="0.0" />
|
<input type="hidden" name="<?php echo 'SGST'.$index ?>" id="<?php echo 'SGST'.$index ?>" value="0.0" />
|
||||||
<input type="hidden" name="<?php echo 'afterSGST'.$index ?>" id="<?php echo 'afterSGST'.$index ?>" value="0.0" />
|
<input type="hidden" name="<?php echo 'afterSGST'.$index ?>" id="<?php echo 'afterSGST'.$index ?>" value="0.0" />
|
||||||
@ -1052,6 +1127,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
|||||||
$TotalSummary = $TotalSummary+$record->ServiceTaxamount;//tax
|
$TotalSummary = $TotalSummary+$record->ServiceTaxamount;//tax
|
||||||
//echo 'TAx' . $TotalSummary;
|
//echo 'TAx' . $TotalSummary;
|
||||||
$TotalBasicAmount = $TotalBasicAmount+((($record->Rate * $record->Quantity)+($TotalSummary)+($Totalotherallowances))-(($TotalDiscountedAmt)));//basic
|
$TotalBasicAmount = $TotalBasicAmount+((($record->Rate * $record->Quantity)+($TotalSummary)+($Totalotherallowances))-(($TotalDiscountedAmt)));//basic
|
||||||
|
|
||||||
|
$TotalFreightvalue=$TotalFreightvalue+$record->Afvalue;
|
||||||
//echo 'ALL' . $TotalBasicAmount;
|
//echo 'ALL' . $TotalBasicAmount;
|
||||||
//$ServiceDescription = $ServiceDescription;
|
//$ServiceDescription = $ServiceDescription;
|
||||||
}
|
}
|
||||||
@ -1298,6 +1375,68 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12" style="padding:0px;">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Freight Type </label>
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
$options = array("0"=>'Select Freight Type');
|
||||||
|
//print_r( $options);
|
||||||
|
|
||||||
|
if(!empty($FreightType))
|
||||||
|
{
|
||||||
|
foreach ($FreightType as $SID):
|
||||||
|
|
||||||
|
|
||||||
|
$options[$SID->ConfigValue] = $SID->ConfigValue;
|
||||||
|
|
||||||
|
endforeach;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo form_dropdown('drpFreighteditloc', $options,set_value('drpFreighteditloc'),'id="drpFreighteditloc"' ,'class="form-control "');
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3" id="TripsValuelocedit" style="display:none;">
|
||||||
|
<label>NO Of Trips</label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'NOOfTripslocedit','value' => set_value('NOOfTripslocedit'),'id'=>'NOOfTripslocedit', 'class' => 'form-control num','onchange'=>'calculateFreightloceditper();' );
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Freight Rate </label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'txtFreightlocedit','value' => set_value('txtFreightlocedit'),'id'=>'txtFreightlocedit', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'calculateFreightloceditper();');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3" style="padding-left: 0px;">
|
||||||
|
<label>Freight Amt In <?php echo $INR;?></label>
|
||||||
|
<div class="form-group">
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'txtAfterFreightlocedit','value' => set_value('txtAfterFreightlocedit'),'id'=>'txtAfterFreightlocedit', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
@ -1396,6 +1535,10 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12" id="EDITCAPdiv4" style="padding:0px;display:block;"><!--EDITCAPdiv4 -->
|
<div class="col-md-12" id="EDITCAPdiv4" style="padding:0px;display:block;"><!--EDITCAPdiv4 -->
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-5 col-md-offset-4" align="right">
|
||||||
<label>Total Order Value In INR</label>
|
<label>Total Order Value In INR</label>
|
||||||
@ -1883,6 +2026,22 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label>Total Freight <?php echo "($INR)"?> </label>
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'TotalFreight','value' => set_value('TotalFreight',number_format($TotalFreightvalue,2,'.','')),'id'=>'TotalFreight', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3" >
|
<div class="col-md-3" >
|
||||||
<label>Total Order Value e<?php echo "($INR)"?> </label>
|
<label>Total Order Value e<?php echo "($INR)"?> </label>
|
||||||
<input type="hidden" name="preServiceTotalorderValue" value="<?php echo $totalCapitalOrder?>">
|
<input type="hidden" name="preServiceTotalorderValue" value="<?php echo $totalCapitalOrder?>">
|
||||||
@ -2975,6 +3134,31 @@ $('#PurQuantity').val('');
|
|||||||
$('#EditOtherAllowances').val($('#otherallowance'+userid).val());
|
$('#EditOtherAllowances').val($('#otherallowance'+userid).val());
|
||||||
$('#Editservicetotalordervaue').val($('#totalservicevalue'+userid).val());
|
$('#Editservicetotalordervaue').val($('#totalservicevalue'+userid).val());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#drpFreighteditloc').val($('#Ftype'+userid).val());
|
||||||
|
$('#NOOfTripslocedit').val($('#NoTrip'+userid).val());
|
||||||
|
$('#txtFreightlocedit').val($('#Fvalue'+userid).val());
|
||||||
|
$('#txtAfterFreightlocedit').val($('#Afvalue'+userid).val());
|
||||||
|
|
||||||
|
var FreightType = $('#drpFreighteditloc').val();
|
||||||
|
|
||||||
|
|
||||||
|
if (FreightType == "PER TRIP")
|
||||||
|
{
|
||||||
|
///salert();
|
||||||
|
$('#TripsValuelocedit').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#TripsValuelocedit').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#EditAfterBasicPriceTax').val($('#basicvalInINR'+userid).val());
|
$('#EditAfterBasicPriceTax').val($('#basicvalInINR'+userid).val());
|
||||||
$('#EditAfterLandingCharge').val($('#landingCharge'+userid).val());
|
$('#EditAfterLandingCharge').val($('#landingCharge'+userid).val());
|
||||||
$('#EditAfterHighseas').val($('#HighSeasSalesCharge'+userid).val());
|
$('#EditAfterHighseas').val($('#HighSeasSalesCharge'+userid).val());
|
||||||
@ -3312,9 +3496,13 @@ EditRatechange();
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var Freight=parseFloat($('#txtAfterFreightlocedit').val() == '' ? '0.00' : $('#txtAfterFreightlocedit').val()).toFixed(2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var editCPtotal=parseFloat(BasicInINR)+parseFloat(Freight);
|
||||||
|
|
||||||
|
|
||||||
$('#EditCPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
$('#EditCPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
||||||
$('#EditAfterBasicPriceTax').val(Math.round(BasicInINR));
|
$('#EditAfterBasicPriceTax').val(Math.round(BasicInINR));
|
||||||
|
|
||||||
@ -3324,13 +3512,13 @@ EditRatechange();
|
|||||||
//Service Tax calculation
|
//Service Tax calculation
|
||||||
|
|
||||||
|
|
||||||
$('#EditAfterCgst').val(calculateServiceCGST($('#EditAfterBasicPriceTax').val(),$("#EditCgst").val()== '' ? "0.00" : $('#EditCgst').val()));
|
$('#EditAfterCgst').val(calculateServiceCGST(editCPtotal,$("#EditCgst").val()== '' ? "0.00" : $('#EditCgst').val()));
|
||||||
|
|
||||||
$('#EditAfterSgst').val( calculateServiceSGST($('#EditAfterBasicPriceTax').val(),$("#EditSgst").val()== '' ? "0.00" : $('#EditSgst').val()));
|
$('#EditAfterSgst').val( calculateServiceSGST(editCPtotal,$("#EditSgst").val()== '' ? "0.00" : $('#EditSgst').val()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#EditAfterIgst').val(calculateServiceIGST($('#EditAfterBasicPriceTax').val(),$("#EditIgst").val()== '' ? "0.00" : $('#EditIgst').val()));
|
$('#EditAfterIgst').val(calculateServiceIGST(editCPtotal,$("#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())) - parseFloat($('#txtEditAfterDiscount').val()=='' ? "0.00" : $('#txtEditAfterDiscount').val());
|
var tempEditservicetotalordervaue=(parseFloat($('#EditCPTotalAmount').val())+parseFloat($('#EditAfterCgst').val())+parseFloat($('#EditAfterSgst').val())+parseFloat($('#EditAfterIgst').val())+parseFloat($('#EditOtherAllowances').val()=='' ? "0.00" : $('#EditOtherAllowances').val())) - parseFloat($('#txtEditAfterDiscount').val()=='' ? "0.00" : $('#txtEditAfterDiscount').val());
|
||||||
$('#Editservicetotalordervaue').val(parseFloat(tempEditservicetotalordervaue).toFixed(2));
|
$('#Editservicetotalordervaue').val(parseFloat(tempEditservicetotalordervaue).toFixed(2));
|
||||||
@ -3501,6 +3689,17 @@ EditRatechange();
|
|||||||
var AfterIGST = $("#EditAfterIgst").val();
|
var AfterIGST = $("#EditAfterIgst").val();
|
||||||
var otherallowance = $("#EditOtherAllowances").val();
|
var otherallowance = $("#EditOtherAllowances").val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var FreightTypeloc=$('#drpFreighteditloc').val();
|
||||||
|
var FreightRateloc=$('#txtFreightlocedit').val();
|
||||||
|
var FreightRateAmountloc=$('#txtAfterFreightlocedit').val();
|
||||||
|
var Nooftriploc=$('#NOOfTripslocedit').val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var totalservicevalue = $("#Editservicetotalordervaue").val();
|
var totalservicevalue = $("#Editservicetotalordervaue").val();
|
||||||
//var totalservicevalue = $("#EditCPTotalAmount").val();
|
//var totalservicevalue = $("#EditCPTotalAmount").val();
|
||||||
var Totaltaxamount = (parseFloat(AfterCGST)+parseFloat(AfterSGST)+parseFloat(AfterIGST)+parseFloat(otherallowance));
|
var Totaltaxamount = (parseFloat(AfterCGST)+parseFloat(AfterSGST)+parseFloat(AfterIGST)+parseFloat(otherallowance));
|
||||||
@ -3573,6 +3772,16 @@ EditRatechange();
|
|||||||
$('#totalservicevalue'+userid).val(totalservicevalue);
|
$('#totalservicevalue'+userid).val(totalservicevalue);
|
||||||
$('#ServiceMaterialDescription'+userid).val(servicedescription);
|
$('#ServiceMaterialDescription'+userid).val(servicedescription);
|
||||||
|
|
||||||
|
|
||||||
|
$('#Ftype'+userid).val(FreightTypeloc);
|
||||||
|
$('#NoTrip'+userid).val(Nooftriploc);
|
||||||
|
$('#Fvalue'+userid).val(FreightRateloc);
|
||||||
|
$('#Afvalue'+userid).val(FreightRateAmountloc);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#landingCharge'+userid).val(landingCharge);
|
$('#landingCharge'+userid).val(landingCharge);
|
||||||
$('#HighSeasSalesCharge'+userid).val(HighSeasSalesCharge);
|
$('#HighSeasSalesCharge'+userid).val(HighSeasSalesCharge);
|
||||||
$('#CustomDuty'+userid).val(CustomDuty);
|
$('#CustomDuty'+userid).val(CustomDuty);
|
||||||
@ -3774,6 +3983,8 @@ function validateEditCapitalTax()
|
|||||||
var Totalfrieght = 0;
|
var Totalfrieght = 0;
|
||||||
//alert('INITIAL'+ Totalfrieght);
|
//alert('INITIAL'+ Totalfrieght);
|
||||||
|
|
||||||
|
var TotaFreight =0;
|
||||||
|
|
||||||
var TotGrossexpense = 0;
|
var TotGrossexpense = 0;
|
||||||
|
|
||||||
var CapitalToatlOrder=0;
|
var CapitalToatlOrder=0;
|
||||||
@ -3786,6 +3997,10 @@ function validateEditCapitalTax()
|
|||||||
var TotalCGSTTaxI = $('#afterCGST'+i).val() == '' ? '0.00' : $('#afterCGST'+i).val();
|
var TotalCGSTTaxI = $('#afterCGST'+i).val() == '' ? '0.00' : $('#afterCGST'+i).val();
|
||||||
var TotalSGSTTaxI = $('#afterSGST'+i).val() == '' ? '0.00' : $('#afterSGST'+i).val();
|
var TotalSGSTTaxI = $('#afterSGST'+i).val() == '' ? '0.00' : $('#afterSGST'+i).val();
|
||||||
var TotalIGSTTaxI = $('#afterIGST'+i).val() == '' ? '0.00' : $('#afterIGST'+i).val();
|
var TotalIGSTTaxI = $('#afterIGST'+i).val() == '' ? '0.00' : $('#afterIGST'+i).val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var TotalFreight = $('#Afvalue'+i).val() == '' ? '0.00' : $('#Afvalue'+i).val();
|
||||||
//var tr= document.getElementById(serviceTax);
|
//var tr= document.getElementById(serviceTax);
|
||||||
//var cellval = tr.cells;
|
//var cellval = tr.cells;
|
||||||
qty = $('#quantity'+i).val();
|
qty = $('#quantity'+i).val();
|
||||||
@ -3815,6 +4030,8 @@ function validateEditCapitalTax()
|
|||||||
TotalSGSTTax = parseFloat(TotalSGSTTax) + parseFloat(TotalSGSTTaxI);
|
TotalSGSTTax = parseFloat(TotalSGSTTax) + parseFloat(TotalSGSTTaxI);
|
||||||
TotalIGSTTax = parseFloat(TotalIGSTTax) + parseFloat(TotalIGSTTaxI);
|
TotalIGSTTax = parseFloat(TotalIGSTTax) + parseFloat(TotalIGSTTaxI);
|
||||||
TotalDiscount = parseFloat(TotalDiscount) + parseFloat(discountedRateValue);
|
TotalDiscount = parseFloat(TotalDiscount) + parseFloat(discountedRateValue);
|
||||||
|
|
||||||
|
TotaFreight=parseFloat(TotaFreight)+parseFloat(TotalFreight);
|
||||||
//alert('After Add' + TotalDiscount);
|
//alert('After Add' + TotalDiscount);
|
||||||
Totalotherallowance = parseFloat(Totalotherallowance) + parseFloat(TotalotherallowanceI);
|
Totalotherallowance = parseFloat(Totalotherallowance) + parseFloat(TotalotherallowanceI);
|
||||||
Totalfrieght = Totalfrieght + totoalfrieghti;
|
Totalfrieght = Totalfrieght + totoalfrieghti;
|
||||||
@ -3844,6 +4061,8 @@ function validateEditCapitalTax()
|
|||||||
$('#txtTotIgst').val((parseFloat(TotalIGSTTax)).toFixed(2) );
|
$('#txtTotIgst').val((parseFloat(TotalIGSTTax)).toFixed(2) );
|
||||||
$('#TotalOtherAllowances').val((parseFloat(Totalotherallowance) ).toFixed(2) );
|
$('#TotalOtherAllowances').val((parseFloat(Totalotherallowance) ).toFixed(2) );
|
||||||
$('#txtTotalDiscount').val((parseFloat(TotalDiscount)).toFixed(2) );
|
$('#txtTotalDiscount').val((parseFloat(TotalDiscount)).toFixed(2) );
|
||||||
|
|
||||||
|
$('#TotalFreight').val(parseFloat(TotaFreight).toFixed(2) );
|
||||||
$('#txttotalfrieght').val((parseFloat(Totalfrieght)).toFixed(2) );
|
$('#txttotalfrieght').val((parseFloat(Totalfrieght)).toFixed(2) );
|
||||||
|
|
||||||
$('#txttotallanding').val((parseFloat(TotLanding) ).toFixed(2) );
|
$('#txttotallanding').val((parseFloat(TotLanding) ).toFixed(2) );
|
||||||
@ -4473,6 +4692,176 @@ function calculateFreight(isEdit)
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#drpFreighteditloc').change(function()
|
||||||
|
{
|
||||||
|
var FreightType =$("#drpFreighteditloc").val();
|
||||||
|
|
||||||
|
if (FreightType == '<?php echo PERTRIP;?>')
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#TripsValuelocedit').show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
$('#TripsValuelocedit').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($('#EditCPRate').val() != '' && $('#EditMaterialCode').val() != "0" )
|
||||||
|
{
|
||||||
|
selValue = $("#drpFreighteditloc").val() ;
|
||||||
|
|
||||||
|
|
||||||
|
$('#txtFreightlocedit').val('');
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var PackagingCalculation='';
|
||||||
|
|
||||||
|
if (selValue == '<?php echo NILTYPE;?>')
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtFreightlocedit').attr('readonly', 'true');
|
||||||
|
$('#txtFreightlocedit').val('0.00');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(selValue == '<?php echo PERCENTAGE;?>')
|
||||||
|
{
|
||||||
|
var PackagingCalculation = '';
|
||||||
|
$('#editpackagingcalmodel').modal('show');
|
||||||
|
//PackagingCalculation = $("input:radio[name='optPackaging']:checked").val();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// $('#txtFreightlocedit').removeAttr( 'readonly','true' );
|
||||||
|
$('#txtFreightlocedit').val('');
|
||||||
|
|
||||||
|
calculateFreightloceditper()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert('Please Select MaterialCode and Rate Field Value');
|
||||||
|
$('#drpFreighteditloc').val("0");
|
||||||
|
$('#Rate').focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function calculateFreightloceditper()
|
||||||
|
{
|
||||||
|
|
||||||
|
var Calculation = document.querySelector('input[name = "editoptPackaging"]:checked').value;
|
||||||
|
var FreightType =$("#drpFreighteditloc").val();
|
||||||
|
$('#editpackagingcalmodel').modal('hide');
|
||||||
|
|
||||||
|
|
||||||
|
if(FreightType=='<?php echo PERCENTAGE;?>')
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
if(Calculation==0)
|
||||||
|
{
|
||||||
|
var basicValue = $('#EditCPTotalAmount').val() == '' ? '0.00' : $('#EditCPTotalAmount').val();
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(Calculation==1)
|
||||||
|
{
|
||||||
|
|
||||||
|
var basicinrValue=$('#EditCPTotalAmount').val() == '' ? '0.00' : $('#EditCPTotalAmount').val();
|
||||||
|
var discount=$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val();
|
||||||
|
var basicValue=basicinrValue-discount;
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var AfterFreight = <?php echo FREIGHT_PERCENTAGE;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo NILTYPE;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
AfterFreight = 0.00;
|
||||||
|
$('#txtFreightlocedit').val('');
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
document.getElementById("txtAfterFreightlocedit").readOnly = true;
|
||||||
|
document.getElementById("txtFreightlocedit").readOnly = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo LUMPSUM;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
AfterFreight = <?php echo FREIGHT_LUMPSUM;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
document.getElementById("txtAfterFreightlocedit").readOnly = true;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo PERUOM;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var Quantity= $('#EditCPQuantity').val() == '' ? '0.00' : $('#EditCPQuantity').val();
|
||||||
|
AfterFreight = <?php echo FREIGHT_PERUOM;?>;
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if(FreightType == '<?php echo PERTRIP;?>')
|
||||||
|
{
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var noOftrip = $('#NOOfTripslocedit').val() == '' ? '0.00' : $('#NOOfTripslocedit').val();
|
||||||
|
|
||||||
|
AfterFreight = <?php echo FREIGHT_PERTRIP;?>;
|
||||||
|
|
||||||
|
AfterFreight = parseFloat(AfterFreight * noOftrip).toFixed(2);
|
||||||
|
var txtAfterFreightloc= parseFloat(AfterFreight).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#txtAfterFreightlocedit').val('');
|
||||||
|
var FreightValue = $('#txtFreightlocedit').val() == '' ? '0.00' : $('#txtFreightlocedit').val();
|
||||||
|
var txtAfterFreightloc= parseFloat(FreightValue).toFixed(2);
|
||||||
|
$('#txtAfterFreightlocedit').val(txtAfterFreightloc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
EditRatechange();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user