capital new calculation

This commit is contained in:
venbatechnologies@gmail.com 2017-10-14 18:40:59 +05:30
parent f7f5190a85
commit 032015e716
6 changed files with 2880 additions and 1331 deletions

View File

@ -270,6 +270,40 @@ define('CLEARINGQTY', '(clearing/qty)');
define('NETTPERUOM', '(basicres+clear+customdutyexp)');
/*Capital Calculation*/
define('Capital_Landing_Charge1', 'basicPrice*(landCharge/100)');
define('Capital_Highseas_Charge1', '((highSeas/100) * (basicPrice+afterLandingCharge))');
define('Capital_Customduty_Charge1', '((Customduty/100) *accessible)');
define('Capital_Excise_Charge1', '((Excise/100) * (basicPrice+afterLandingCharge+afterHighseas+afterCustomduty))');
define('Capital_ExciseEDcess_Charge1', '(ExciseEDcessCharge/100) * ExciseDuty');
define('Capital_ExciseSHcess_Charge1', '(ExciseSHcessCharge/100) * ExciseDuty');
define('Capital_CustomEDcess_Charge1', '((CustomEDcess* AfterCustomduty)/100)');
define('Capital_CustomSHcess_Charge1', '((CustomSHcess/100) * AfterCustomduty)');
define('Capital_AdditionalExciseduty_Charge1', '((AdditionalExciseduty/100) * (basicPrices+afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterCustomEDcess+AfterCustomSHcess))');
define('Capital_Grossdutypayable_Charge1', '(AfterAdditionalExciseduty+afterLandingCharge+AfterHighseas+AfterCustomduty+AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterCustomEDcess+AfterCustomSHcess)');
define('Capital_ModvatCharge_Charge1', '(AfterExcisedutyTax+AfterExcisedutyEDcess+AfterExcisedutySHcess+AfterAdditionalExciseduty)');
define('Capital_Grossexpenses_Charge1', '(Grossdutypayable-AvailableModvat)');
define('Capital_purchaserate_Charge1', '(AfterBasicPriceTax/PurQuantity)');
define('Capital_CustomDutyExpenses_Charge1', '(Grossexpenses/PurQuantity)');
define('Capital_RMCIncludingCustomers_Charge1', '(purchaserate+CustomDutyExpenses)');
/* End of file constants.php */

View File

@ -1899,7 +1899,7 @@ function addNewImportPurchaseOrder()
$AssessableValue=$this->input->post('AssessableValue'.$i);
echo $AssessableValue;
//echo $AssessableValue;
$Subtotal=$this->input->post('SubTotal'.$i);
$Igst=$this->input->post('IGST'.$i);
$AfterIgst=$this->input->post('AfterIGST'.$i);
@ -2219,19 +2219,11 @@ function addNewImportPurchaseOrder()
$Productprice = $this->input->post('basicvalInINR'.$i);
$LandingCharge = $this->input->post('beforeLanding'.$i);
$AfterLandingCharge = $this->input->post('landingCharge'.$i);
$HighSeas = $this->input->post('beforeHighSeasSalesCharge'.$i);
$AfterHighSeas = $this->input->post('HighSeasSalesCharge'.$i);
$CustomDuty = $this->input->post('beforeCustomDuty'.$i);
$AfterCustomDuty = $this->input->post('CustomDuty'.$i);
$ExciseDuty = $this->input->post('beforeExciseDuty'.$i);
$AfterExciseDuty = $this->input->post('ExciseDuty'.$i);
$ExciseDutyEd = $this->input->post('beforeExciseDutyEDCess'.$i);
$AfterExciseDutyEd = $this->input->post('ExciseDutyEDCess'.$i);
$ExciseDutySH = $this->input->post('beforeExciseDutySHCess'.$i);
$AfterExciseDutySH = $this->input->post('ExciseDutySHCess'.$i);
$CustomEd= $this->input->post('beforeCustomEDCess'.$i);
$AfterCustomEd= $this->input->post('CustomEDCess'.$i);
@ -2239,15 +2231,11 @@ function addNewImportPurchaseOrder()
$CustomSH = $this->input->post('beforeCustomSHCess'.$i);
$AfterCustomSH = $this->input->post('CustomSHCess'.$i);
$AddAdtional = $this->input->post('beforeAdditionalExciseDuty'.$i);
$AfterAddAdtional = $this->input->post('AdditionalExciseDuty'.$i);
$Grossdutypayable = $this->input->post('GrossDutyPayable'.$i);
$AvailableModvat = $this->input->post('AvailableModvat'.$i);
$Grossexpensesduetocustomduty = $this->input->post('GrossExpensesDuetoCustom'.$i);
$purchaseratePerKG = $this->input->post('purchaseRate'.$i);
$CustomDutyExpensesPerKG = $this->input->post('CustomDutyExpenses'.$i);
$RMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomers'.$i);
$QuantityKG = $this->input->post('PurQuantity'.$i);
$FreightType = $this->input->post('FreightType'.$i);
$FreightValue = $this->input->post('FreightVal'.$i);
@ -2276,6 +2264,16 @@ function addNewImportPurchaseOrder()
$Freightrateloc=$this->input->post('FreightRateloc'.$i);
$FreightAmountloc=$this->input->post('AfterFreightRateloc'.$i);
$AssessableValue=$this->input->post('AfterAssessable'.$i);
$SubTotal=$this->input->post('Subtotal'.$i);
$IGST=$this->input->post('IgstInt'.$i);
$AfterIGST=$this->input->post('AfterIgstInt'.$i);
$DutyImpact=$this->input->post('Dutyimpact'.$i);
$NetValue=$this->input->post('Nett'.$i);
$ClearingCharge=$this->input->post('ClearingCharges'.$i);
$CustomDutyExpensesPerKG =$this->input->post('CustomDutyExpenses'.$i);
@ -2327,7 +2325,10 @@ function addNewImportPurchaseOrder()
if($CapitalRange=='0')
{
$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);
$ImportTaxList = array('LineItemNo'=>$LineItemNo,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'Grossdutypayable'=>$Grossdutypayable,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem,'FreightType'=>$FreightType,'NoOfTrip'=>$NOOfTrip,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'AssessableValue'=>$AssessableValue,'SubTotal'=>$SubTotal,'IGST'=>$IGST,'AfterIGST'=>$AfterIGST,'DutyImpact'=>$DutyImpact,'NetValue'=>$NetValue,'ClearingCharge'=>$ClearingCharge,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG);
@ -2466,19 +2467,12 @@ function addNewImportPurchaseOrder()
$Productprice = $this->input->post('basicvalInINR'.$i);
$LandingCharge = $this->input->post('beforeLanding'.$i);
$AfterLandingCharge = $this->input->post('landingCharge'.$i);
$HighSeas = $this->input->post('beforeHighSeasSalesCharge'.$i);
$AfterHighSeas = $this->input->post('HighSeasSalesCharge'.$i);
$CustomDuty = $this->input->post('beforeCustomDuty'.$i);
$AfterCustomDuty = $this->input->post('CustomDuty'.$i);
$ExciseDuty = $this->input->post('beforeExciseDuty'.$i);
$AfterExciseDuty = $this->input->post('ExciseDuty'.$i);
$ExciseDutyEd = $this->input->post('beforeExciseDutyEDCess'.$i);
$AfterExciseDutyEd = $this->input->post('ExciseDutyEDCess'.$i);
$ExciseDutySH = $this->input->post('beforeExciseDutySHCess'.$i);
$AfterExciseDutySH = $this->input->post('ExciseDutySHCess'.$i);
$CustomEd= $this->input->post('beforeCustomEDCess'.$i);
$AfterCustomEd= $this->input->post('CustomEDCess'.$i);
@ -2486,17 +2480,23 @@ function addNewImportPurchaseOrder()
$CustomSH = $this->input->post('beforeCustomSHCess'.$i);
$AfterCustomSH = $this->input->post('CustomSHCess'.$i);
$AddAdtional = $this->input->post('beforeAdditionalExciseDuty'.$i);
$AfterAddAdtional = $this->input->post('AdditionalExciseDuty'.$i);
$Grossdutypayable = $this->input->post('GrossDutyPayable'.$i);
$AvailableModvat = $this->input->post('AvailableModvat'.$i);
$Grossexpensesduetocustomduty = $this->input->post('GrossExpensesDuetoCustom'.$i);
$purchaseratePerKG = $this->input->post('purchaseRate'.$i);
$CustomDutyExpensesPerKG = $this->input->post('CustomDutyExpenses'.$i);
$RMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomers'.$i);
$QuantityKG = $this->input->post('PurQuantity'.$i);
$AssessableValue = $this->input->post('AssessableValue'.$i);
$SubTotal = $this->input->post('SubTotal'.$i);
$IGST = $this->input->post('IGSTInt'.$i);
$AfterIGST = $this->input->post('AfterIGSTInt'.$i);
$DutyImpact = $this->input->post('DutyImpact'.$i);
$NetValue = $this->input->post('NetValue'.$i);
$ClearingCharge = $this->input->post('ClearingCharge'.$i);
$Totalvalueitem=$this->input->post('PerKgExpense'.$i);
@ -2590,7 +2590,9 @@ function addNewImportPurchaseOrder()
}
if($capitalType=='0')
{
$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);
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'Grossdutypayable'=>$Grossdutypayable,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem,'FreightType'=>$FreightType,'NoOfTrip'=>$NOOfTrip,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'AssessableValue'=>$AssessableValue,'SubTotal'=>$SubTotal,'IGST'=>$IGST,
'AfterIGST'=>$AfterIGST,'DutyImpact'=>$DutyImpact,'NetValue'=>$NetValue,'ClearingCharge'=>$ClearingCharge);
$ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList);
}
@ -2615,7 +2617,8 @@ function addNewImportPurchaseOrder()
}
if($capitalType=='0')
{
$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);
$ImportTaxList = array('LineItemNo'=>$LineItemNo,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'Grossdutypayable'=>$Grossdutypayable,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem,'FreightType'=>$FreightType,'NoOfTrip'=>$NOOfTrip,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'AssessableValue'=>$AssessableValue,'SubTotal'=>$SubTotal,'IGST'=>$IGST,
'AfterIGST'=>$AfterIGST,'DutyImpact'=>$DutyImpact,'NetValue'=>$NetValue,'ClearingCharge'=>$ClearingCharge);
$ImportList= $this->purchaseorder_model->updateImportTax($LineItemNo,$ImportTaxList);

View File

@ -1342,7 +1342,7 @@ function getCapitalPurchaseOrderDetails($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,
Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,Tax.*,
ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount,LandingCharge,HighSeasSalesCharge,CustomDuty,ExciseDuty,ExciseDutyEdCess,CustomEdCess,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,AfterLandingCharge,AfterHighSeasSalesCharge,AfterCustomDuty,AfterExciseDuty,AfterExciseDutyEdCess,AddlExciseDuty,AfterAddlExciseDuty,Grossdutypayable,AvailableModvat,Grossexpensesduetocustomduty,purchaseratePerKG,CustomDutyExpensesPerKG,RMCIncludingCustomersPerKG,QuantityKG,BasicPriceInMTon,ProductPrice,CustomSHCess,AfterCustomSHCess,AfterExciseDutySHCess,ExciseDutySHCess,AfterCustomEdCess,ROUND((POMast.ExchangeRate*BasicPriceInMTon*Quantity),2) as BasicINRValue,Tax.TotalValue as ImportTotalValue,Tax.FreightType,Tax.NoOfTrip,Tax.FreightValue,Tax.AfterFreightValue,POMast.CurrencyType,
Req.CostCenterCode,Dept.DepartmentName FROM T_PurchaseOrder_LineItem LineItem

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1525,8 +1525,8 @@ echo form_textarea($data);
<input type="hidden" name="<?php echo 'QuantityKG'.$index ?>" id="<?php echo 'QuantityKG'.$index ?>" value="<?php echo $record->QuantityKG; ?>" />
<input type="hidden" name="<?php echo 'beforeQuantityKG'.$index ?>" id="<?php echo 'beforeQuantityKG'.$index ?>" value="<?php echo $record->QuantityKG; ?>" />
<!-- <input type="hidden" name="<?php echo 'QuantityKG'.$index ?>" id="<?php echo 'QuantityKG'.$index ?>" value="<?php echo $record->QuantityKG; ?>" />
<input type="hidden" name="<?php echo 'beforeQuantityKG'.$index ?>" id="<?php echo 'beforeQuantityKG'.$index ?>" value="<?php echo $record->QuantityKG; ?>" /> -->