freight in capital
This commit is contained in:
parent
90514a494e
commit
65b0c1ec55
@ -1032,6 +1032,28 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
||||
$NOOfTrip = $this->input->post('NoOfTrip'.$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;
|
||||
|
||||
if($Quantity != $preQuantity)
|
||||
@ -1070,6 +1092,39 @@ function UpdateAmendServicePurchaseOrder()
|
||||
$rowspanvalue++;
|
||||
$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)
|
||||
{
|
||||
@ -1097,10 +1152,10 @@ function UpdateAmendServicePurchaseOrder()
|
||||
|
||||
if(trim($POType) == CAPITAL )
|
||||
{
|
||||
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);
|
||||
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,'FreightType'=>$FreightTypeloc,'NoOfTrip'=>$FreightNoofTriploc,'FreightValue'=>$Freightrateloc,'AfterFreightValue'=>$FreightAmountloc);
|
||||
|
||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
} //echo "Service";
|
||||
else if($capitalType=='0'){ //print_r($ServiceTax);
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem,'FreightType'=>$FreightType,'NoOfTrip'=>$NOOfTrip,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue);
|
||||
@ -1115,6 +1170,8 @@ function UpdateAmendServicePurchaseOrder()
|
||||
|
||||
echo 'Purchase Order'.$PONO.'Amended Successfully! New PO Number Is: '.$NewPO ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function EditAmendImportPO()
|
||||
{
|
||||
|
||||
@ -2304,6 +2304,15 @@ function addNewImportPurchaseOrder()
|
||||
$DiscountValue = $this->input->post('DisVal'.$i);
|
||||
$AfterDiscount = $this->input->post('AfterDisVal'.$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;
|
||||
|
||||
$CapitalItemDescription = $this->input->post('CapitalItemDescrition'.$i);
|
||||
@ -2340,7 +2349,11 @@ function addNewImportPurchaseOrder()
|
||||
{
|
||||
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);
|
||||
|
||||
@ -2364,6 +2377,7 @@ function addNewImportPurchaseOrder()
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*Edit Capital po*/
|
||||
function EditCapitalPurchaseOrder()
|
||||
{
|
||||
@ -2548,6 +2562,28 @@ function addNewImportPurchaseOrder()
|
||||
$FreightValue = $this->input->post('FreightVal'.$i);
|
||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$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";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
@ -2582,7 +2618,7 @@ function addNewImportPurchaseOrder()
|
||||
{
|
||||
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);
|
||||
}
|
||||
@ -2607,7 +2643,7 @@ function addNewImportPurchaseOrder()
|
||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$LineItemNo,$POLineItemList);
|
||||
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);
|
||||
}
|
||||
@ -2627,6 +2663,7 @@ function addNewImportPurchaseOrder()
|
||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
|
||||
}
|
||||
|
||||
|
||||
/* capital po print/pdf*/
|
||||
|
||||
public function CapitalPoPrint($PONO)
|
||||
|
||||
@ -1402,13 +1402,13 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
// get domestic capital po list
|
||||
|
||||
|
||||
function getDomesticCapitalPurchaseOrderDetails($PONO = '')
|
||||
function getDomesticCapitalPurchaseOrderDetails($PONO = '')
|
||||
{
|
||||
|
||||
$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
|
||||
,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
|
||||
join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO
|
||||
|
||||
@ -91,6 +91,19 @@ if(!empty($INRSYMBOL))
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
|
||||
|
||||
#packagingcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#editpackagingcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="<?php echo base_url() ?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
@ -716,6 +729,80 @@ function vaildateBeforeOpenModal()
|
||||
|
||||
</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 align="right">
|
||||
@ -945,6 +1032,64 @@ function vaildateBeforeOpenModal()
|
||||
?>
|
||||
</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 class="col-md-12">
|
||||
<div class="col-md-6" align="right">
|
||||
@ -1647,6 +1792,65 @@ function vaildateBeforeOpenModal()
|
||||
</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-6" align="right">
|
||||
|
||||
@ -2225,6 +2429,18 @@ function vaildateBeforeOpenModal()
|
||||
?>
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
@ -2831,25 +3047,32 @@ EditRatechange();
|
||||
}
|
||||
var discountedValue = parseFloat($('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val()).toFixed(2);
|
||||
|
||||
|
||||
|
||||
var Freight=parseFloat($('#txtAfterFreightloc').val() == '' ? '0.00' : $('#txtAfterFreightloc').val()).toFixed(2);
|
||||
|
||||
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));
|
||||
$('#AfterBasicPriceTax').val(parseFloat(BasicInINR).toFixed(2));
|
||||
// var a=$('#AfterBasicPriceTax').val();
|
||||
// console.log(a);
|
||||
|
||||
//ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val());
|
||||
|
||||
if(ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val())){
|
||||
//Service Tax calculation
|
||||
|
||||
$('#AfterCgst').val(calculateCgstTax($('#AfterBasicPriceTax').val(),$("#Cgst").val()== '' ? "0.00" : $('#Cgst').val()));
|
||||
$('#AfterSgst').val(calculateSgstTax($('#AfterBasicPriceTax').val(),$("#Sgst").val()== '' ? "0.00" : $('#Sgst').val()));
|
||||
$('#AfterIgst').val(calculateIgstTax($('#AfterBasicPriceTax').val(),$("#Igst").val()== '' ? "0.00" : $('#Igst').val()));
|
||||
$('#AfterCgst').val(calculateCgstTax(CPtotal,$("#Cgst").val()== '' ? "0.00" : $('#Cgst').val()));
|
||||
$('#AfterSgst').val(calculateSgstTax(CPtotal,$("#Sgst").val()== '' ? "0.00" : $('#Sgst').val()));
|
||||
$('#AfterIgst').val(calculateIgstTax(CPtotal,$("#Igst").val()== '' ? "0.00" : $('#Igst').val()));
|
||||
|
||||
if($('#LandingCharge').val()!='' && $('#AfterBasicPriceTax').val()!=''){
|
||||
$('#AfterLandingCharge').val(calculateLandingCharge($('#LandingCharge').val(),$('#AfterBasicPriceTax').val()));
|
||||
@ -3390,6 +3613,22 @@ var purchaseRate = $('#purchaserate').val();
|
||||
var FreightVal = $("#txtFreight").val();
|
||||
var AfterFreightVal = $("#txtAfterFreight").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);
|
||||
|
||||
|
||||
@ -3398,6 +3637,10 @@ var purchaseRate = $('#purchaserate').val();
|
||||
var TotalTaxValue = calculateTaxValue();
|
||||
var basicvalInINR=$('#AfterBasicPriceTax').val();
|
||||
var CapitalDescription =$('#ItemDescription').val();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#MaterialCode option[value='+materialCode+']').remove();
|
||||
|
||||
@ -3476,6 +3719,8 @@ var purchaseRate = $('#purchaserate').val();
|
||||
addHidden(theForm,"Igst"+temp,Igst);
|
||||
addHidden(theForm,"AfterIgst"+temp,AfterIgst);
|
||||
addHidden(theForm,"OtherAmt"+temp,OtherAmt);
|
||||
|
||||
|
||||
addHidden(theForm,"FreightType"+temp,FreightType);
|
||||
addHidden(theForm,"FreightVal"+temp,FreightVal);
|
||||
addHidden(theForm,"AfterFreightVal"+temp,AfterFreightVal);
|
||||
@ -3486,6 +3731,14 @@ var purchaseRate = $('#purchaserate').val();
|
||||
addHidden(theForm,"DisVal"+temp,DisVal);
|
||||
addHidden(theForm,"AfterDisVal"+temp,AfterDisVal);
|
||||
$('#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();
|
||||
@ -3666,6 +3919,11 @@ var purchaseRate = $('#purchaserate').val();
|
||||
var purchaseRate = $('#purchaserate').val() == '' ? '0.00' : $('#purchaserate').val();
|
||||
var CustomDutyExpenses = $('#CustomDutyExpenses').val() == '' ? '0.00' : $('#CustomDutyExpenses').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 = (parseFloat(AfterCgst)+parseFloat(AfterSgst)+parseFloat(AfterIgst)).toFixed(2);
|
||||
|
||||
@ -3676,6 +3934,10 @@ var purchaseRate = $('#purchaserate').val();
|
||||
var TotSgst = $('#txtTotSgst').val() == '' ? '0.00' : $('#txtTotSgst').val();
|
||||
var TotalIgst = $('#txtTotIgst').val() == '' ? '0.00' : $('#txtTotIgst').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 TotHighseas = $('#txttotalhighseas').val() == '' ? '0.00' : $('#txttotalhighseas').val();
|
||||
@ -3698,6 +3960,14 @@ var purchaseRate = $('#purchaserate').val();
|
||||
$('#txtTotIgst').val((parseFloat(TotalIgst) + parseFloat(AfterIgst)).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) );
|
||||
$('#txttotalhighseas').val((parseFloat(TotHighseas) + parseFloat(HighSeasSalesCharge)).toFixed(2) );
|
||||
$('#txttotalcustom').val((parseFloat(TotCustom) + parseFloat(CustomDuty)).toFixed(2) );
|
||||
@ -3786,6 +4056,12 @@ $('#PurQuantity').val('');
|
||||
$("#DiscountType").val('0');
|
||||
$("#txtDiscount").val('');
|
||||
$("#txtAfterDiscount").val('');
|
||||
|
||||
$("#drpFreightloc").val('0');
|
||||
$("#NOOfTripsloc").val('');
|
||||
$("#txtFreightloc").val('');
|
||||
$("#txtAfterFreightloc").val('');
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -4111,6 +4387,26 @@ function DeleteRow(rowid)
|
||||
$('#txtEditAfterFreight').val($('#AfterFreightVal'+userid).val());
|
||||
$('#EditNOOfTrips').val($('#NoOfTrip'+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();
|
||||
|
||||
@ -4389,11 +4685,14 @@ function clearAfterAddLineItemAdd(){
|
||||
$('#txtEditAfterDiscount').val(updateDiscountValuesChange(parseFloat(Tot).toFixed(2),$("#EditDiscountType").val(),$('#txtEditDiscount').val()));
|
||||
}
|
||||
var discountedValue = parseFloat($('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val()).toFixed(2);
|
||||
|
||||
var Freight=parseFloat($('#txtAfterFreightlocedit').val() == '' ? '0.00' : $('#txtAfterFreightlocedit').val()).toFixed(2);
|
||||
|
||||
txtExchangeRate=1;
|
||||
var BasicInINR=Tot * txtExchangeRate - discountedValue;
|
||||
}
|
||||
|
||||
var editCPtotal=parseFloat(BasicInINR)+parseFloat(Freight);
|
||||
|
||||
$('#EditCPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
||||
$('#EditAfterBasicPriceTax').val(Math.round(BasicInINR));
|
||||
//ExceedBudget($('#CPTotalAmount').val(),$('#CapitalbudAmt').val());
|
||||
@ -4402,9 +4701,9 @@ function clearAfterAddLineItemAdd(){
|
||||
//Service Tax calculation
|
||||
|
||||
|
||||
$('#EditAfterCgst').val(calculateCgstTax($('#EditAfterBasicPriceTax').val(),$("#EditCgst").val()== '' ? "0.00" : $('#EditCgst').val()));
|
||||
$('#EditAfterSgst').val(calculateSgstTax($('#EditAfterBasicPriceTax').val(),$("#EditSgst").val()== '' ? "0.00" : $('#EditSgst').val()));
|
||||
$('#EditAfterIgst').val(calculateIgstTax($('#EditAfterBasicPriceTax').val(),$("#Editigst").val()== '' ? "0.00" : $('#EditIgst').val()));
|
||||
$('#EditAfterCgst').val(calculateCgstTax(editCPtotal,$("#EditCgst").val()== '' ? "0.00" : $('#EditCgst').val()));
|
||||
$('#EditAfterSgst').val(calculateSgstTax(editCPtotal,$("#EditSgst").val()== '' ? "0.00" : $('#EditSgst').val()));
|
||||
$('#EditAfterIgst').val(calculateIgstTax(editCPtotal,$("#Editigst").val()== '' ? "0.00" : $('#EditIgst').val()));
|
||||
|
||||
// This is for import basic price
|
||||
|
||||
@ -4622,6 +4921,15 @@ function clearAfterAddLineItemAdd(){
|
||||
|
||||
var basicvalInINR=$('#EditAfterBasicPriceTax').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 DisVal = $("#txtEditDiscount").val();
|
||||
@ -4700,6 +5008,12 @@ function clearAfterAddLineItemAdd(){
|
||||
$('#AfterFreightVal'+userid).val(AfterFreightVal);
|
||||
$('#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[3].innerHTML = materialName;
|
||||
|
||||
@ -4904,6 +5218,7 @@ function validateEditCapitalTax()
|
||||
var TotFreight =0;
|
||||
var TotDiscount=0;
|
||||
var TotBasicAmt =0;
|
||||
var TotaFreight =0;
|
||||
for (var i = 1; i < rows; i++) {
|
||||
|
||||
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 TotalIgstI = $('#AfterIgst'+i).val() == '' ? '0.00' : $('#AfterIgst'+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 TotLandingI = $('#landingCharge'+i).val() == '' ? '0.00' : $('#landingCharge'+i).val();
|
||||
var TotHighseasI = $('#HighSeasSalesCharge'+i).val() == '' ? '0.00' : $('#HighSeasSalesCharge'+i).val();
|
||||
@ -4931,22 +5250,25 @@ function validateEditCapitalTax()
|
||||
var CapitalToatlOrderI = $('#basicval'+i).val() == '' ? '0.00' : $('#basicval'+i).val();
|
||||
CapitalToatlOrderI = CapitalToatlOrderI - discountedRateValue;
|
||||
var TotBasicAmtI=parseFloat(CapitalToatlOrderI) + parseFloat(discountedRateValue);
|
||||
TotCgst = parseFloat(TotCgst) + parseFloat(TotalCgstI);
|
||||
TotCgst = parseFloat(TotCgst) + parseFloat(TotalCgstI);
|
||||
TotSgst = parseFloat(TotSgst) + parseFloat(TotalSgstI);
|
||||
TotIgst = parseFloat(TotIgst) + parseFloat(TotalIgstI);
|
||||
TotOther = parseFloat(TotOther) + parseFloat(TotOtherI);
|
||||
TotaFreight=parseFloat(TotaFreight)+parseFloat(TotalFreight);
|
||||
|
||||
// console.log(TotaFreight);
|
||||
|
||||
TotLanding = parseFloat(TotLanding) + parseFloat(TotLandingI);
|
||||
TotHighseas = parseFloat(TotHighseas) + parseFloat(TotHighseasI);
|
||||
TotHighseas = parseFloat(TotHighseas) + parseFloat(TotHighseasI);
|
||||
TotCustom = parseFloat(TotCustom) + parseFloat(TotCustomI);
|
||||
TotExcise = parseFloat(TotExcise) + parseFloat(TotExciseI);
|
||||
TotExciseED = parseFloat(TotExciseED) + parseFloat(TotExciseEDI);
|
||||
TotExciseSH = parseFloat(TotExciseSH) + parseFloat(TotExciseSHI);
|
||||
TotCustomED = parseFloat(TotCustomED) + parseFloat(TotCustomEDI);
|
||||
TotCustomSH = parseFloat(TotCustomSH) + parseFloat(TotCustomSHI);
|
||||
TotAdditionalExciseduty = parseFloat(TotAdditionalExciseduty) + parseFloat(TotAdditionalExcisedutyI);
|
||||
TotGrossduty = parseFloat(TotGrossduty) + parseFloat(TotGrossdutyI);
|
||||
TotAvlmodvat = parseFloat(TotAvlmodvat) + parseFloat(TotAvlmodvatI);
|
||||
TotCustomSH = parseFloat(TotCustomSH) + parseFloat(TotCustomSHI);
|
||||
TotAdditionalExciseduty = parseFloat(TotAdditionalExciseduty) + parseFloat(TotAdditionalExcisedutyI);
|
||||
TotGrossduty = parseFloat(TotGrossduty) + parseFloat(TotGrossdutyI);
|
||||
TotAvlmodvat = parseFloat(TotAvlmodvat) + parseFloat(TotAvlmodvatI);
|
||||
|
||||
TotGrossexpense = parseFloat(TotGrossexpense) + parseFloat(TotGrossexpenseI);
|
||||
TotalOrderValueSummary = parseFloat(TotalOrderValueSummary) + parseFloat(TotalOrderValueSummaryI);
|
||||
@ -4961,6 +5283,7 @@ function validateEditCapitalTax()
|
||||
$('#txtTotSgst').val(parseFloat(TotSgst).toFixed(2) );
|
||||
$('#txtTotIgst').val(parseFloat(TotIgst).toFixed(2) );
|
||||
$('#TotalOtherAllowances').val(parseFloat(TotOther).toFixed(2) );
|
||||
$('#TotalFreight').val(parseFloat(TotaFreight).toFixed(2) );
|
||||
|
||||
$('#txttotallanding').val((parseFloat(TotLanding) ).toFixed(2) );
|
||||
$('#txttotalhighseas').val((parseFloat(TotHighseas) ).toFixed(2) );
|
||||
@ -5068,7 +5391,14 @@ function SetCapitalPo()
|
||||
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 ServiceTaxValue = 0.0;
|
||||
|
||||
@ -5733,6 +6063,342 @@ function updateDiscountValuesChange(totAmt,disType,disAmt){
|
||||
var discount = parseFloat(AfterDiscount).toFixed(2);
|
||||
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>
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,8 @@
|
||||
$TotalIGST = 0.0;
|
||||
$Totalotherallowances = 0.0;
|
||||
$TotalDiscountedAmt=0.0;
|
||||
|
||||
$TotalFreightvalue=0.0;
|
||||
|
||||
$TotalSummary = 0.0;
|
||||
$TotalBasicAmount = 0.0;
|
||||
@ -216,6 +218,13 @@ else {
|
||||
.content-wrapper {
|
||||
min-height:600px ! important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#editpackagingcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
</style>
|
||||
<script src="<?php echo base_url() ?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
@ -862,6 +871,42 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
</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 align="right">
|
||||
<!-- <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 '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'){?>
|
||||
<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" />
|
||||
@ -1052,6 +1127,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
$TotalSummary = $TotalSummary+$record->ServiceTaxamount;//tax
|
||||
//echo 'TAx' . $TotalSummary;
|
||||
$TotalBasicAmount = $TotalBasicAmount+((($record->Rate * $record->Quantity)+($TotalSummary)+($Totalotherallowances))-(($TotalDiscountedAmt)));//basic
|
||||
|
||||
$TotalFreightvalue=$TotalFreightvalue+$record->Afvalue;
|
||||
//echo 'ALL' . $TotalBasicAmount;
|
||||
//$ServiceDescription = $ServiceDescription;
|
||||
}
|
||||
@ -1297,8 +1374,70 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
echo form_input($data);
|
||||
?>
|
||||
</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 class="col-md-6" align="right">
|
||||
|
||||
CGST In %
|
||||
@ -1396,6 +1535,10 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12" id="EDITCAPdiv4" style="padding:0px;display:block;"><!--EDITCAPdiv4 -->
|
||||
<div class="col-md-5 col-md-offset-4" align="right">
|
||||
<label>Total Order Value In INR</label>
|
||||
@ -1883,6 +2026,22 @@ document.getElementById('dispatchinternational').style.display = 'block';
|
||||
?>
|
||||
|
||||
</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" >
|
||||
<label>Total Order Value e<?php echo "($INR)"?> </label>
|
||||
<input type="hidden" name="preServiceTotalorderValue" value="<?php echo $totalCapitalOrder?>">
|
||||
@ -2975,7 +3134,32 @@ $('#PurQuantity').val('');
|
||||
$('#EditOtherAllowances').val($('#otherallowance'+userid).val());
|
||||
$('#Editservicetotalordervaue').val($('#totalservicevalue'+userid).val());
|
||||
|
||||
$('#EditAfterBasicPriceTax').val($('#basicvalInINR'+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());
|
||||
$('#EditAfterLandingCharge').val($('#landingCharge'+userid).val());
|
||||
$('#EditAfterHighseas').val($('#HighSeasSalesCharge'+userid).val());
|
||||
$('#EditAfterCustomduty').val($('#CustomDuty'+userid).val());
|
||||
@ -3312,7 +3496,11 @@ EditRatechange();
|
||||
|
||||
}
|
||||
|
||||
|
||||
var Freight=parseFloat($('#txtAfterFreightlocedit').val() == '' ? '0.00' : $('#txtAfterFreightlocedit').val()).toFixed(2);
|
||||
|
||||
|
||||
|
||||
var editCPtotal=parseFloat(BasicInINR)+parseFloat(Freight);
|
||||
|
||||
|
||||
$('#EditCPTotalAmount').val(parseFloat(Tot).toFixed(2));
|
||||
@ -3324,13 +3512,13 @@ EditRatechange();
|
||||
//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());
|
||||
$('#Editservicetotalordervaue').val(parseFloat(tempEditservicetotalordervaue).toFixed(2));
|
||||
@ -3500,6 +3688,17 @@ EditRatechange();
|
||||
var AfterSGST = $("#EditAfterSgst").val();
|
||||
var AfterIGST = $("#EditAfterIgst").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 = $("#EditCPTotalAmount").val();
|
||||
@ -3573,6 +3772,16 @@ EditRatechange();
|
||||
$('#totalservicevalue'+userid).val(totalservicevalue);
|
||||
$('#ServiceMaterialDescription'+userid).val(servicedescription);
|
||||
|
||||
|
||||
$('#Ftype'+userid).val(FreightTypeloc);
|
||||
$('#NoTrip'+userid).val(Nooftriploc);
|
||||
$('#Fvalue'+userid).val(FreightRateloc);
|
||||
$('#Afvalue'+userid).val(FreightRateAmountloc);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#landingCharge'+userid).val(landingCharge);
|
||||
$('#HighSeasSalesCharge'+userid).val(HighSeasSalesCharge);
|
||||
$('#CustomDuty'+userid).val(CustomDuty);
|
||||
@ -3774,6 +3983,8 @@ function validateEditCapitalTax()
|
||||
var Totalfrieght = 0;
|
||||
//alert('INITIAL'+ Totalfrieght);
|
||||
|
||||
var TotaFreight =0;
|
||||
|
||||
var TotGrossexpense = 0;
|
||||
|
||||
var CapitalToatlOrder=0;
|
||||
@ -3786,6 +3997,10 @@ function validateEditCapitalTax()
|
||||
var TotalCGSTTaxI = $('#afterCGST'+i).val() == '' ? '0.00' : $('#afterCGST'+i).val();
|
||||
var TotalSGSTTaxI = $('#afterSGST'+i).val() == '' ? '0.00' : $('#afterSGST'+i).val();
|
||||
var TotalIGSTTaxI = $('#afterIGST'+i).val() == '' ? '0.00' : $('#afterIGST'+i).val();
|
||||
|
||||
|
||||
|
||||
var TotalFreight = $('#Afvalue'+i).val() == '' ? '0.00' : $('#Afvalue'+i).val();
|
||||
//var tr= document.getElementById(serviceTax);
|
||||
//var cellval = tr.cells;
|
||||
qty = $('#quantity'+i).val();
|
||||
@ -3815,6 +4030,8 @@ function validateEditCapitalTax()
|
||||
TotalSGSTTax = parseFloat(TotalSGSTTax) + parseFloat(TotalSGSTTaxI);
|
||||
TotalIGSTTax = parseFloat(TotalIGSTTax) + parseFloat(TotalIGSTTaxI);
|
||||
TotalDiscount = parseFloat(TotalDiscount) + parseFloat(discountedRateValue);
|
||||
|
||||
TotaFreight=parseFloat(TotaFreight)+parseFloat(TotalFreight);
|
||||
//alert('After Add' + TotalDiscount);
|
||||
Totalotherallowance = parseFloat(Totalotherallowance) + parseFloat(TotalotherallowanceI);
|
||||
Totalfrieght = Totalfrieght + totoalfrieghti;
|
||||
@ -3844,6 +4061,8 @@ function validateEditCapitalTax()
|
||||
$('#txtTotIgst').val((parseFloat(TotalIGSTTax)).toFixed(2) );
|
||||
$('#TotalOtherAllowances').val((parseFloat(Totalotherallowance) ).toFixed(2) );
|
||||
$('#txtTotalDiscount').val((parseFloat(TotalDiscount)).toFixed(2) );
|
||||
|
||||
$('#TotalFreight').val(parseFloat(TotaFreight).toFixed(2) );
|
||||
$('#txttotalfrieght').val((parseFloat(Totalfrieght)).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>
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user