import edit import new calculation

This commit is contained in:
venbatechnologies@gmail.com 2017-10-12 09:54:39 +05:30
parent 71b51bb358
commit c6a44cfa50
4 changed files with 1366 additions and 2270 deletions

View File

@ -241,5 +241,36 @@ define('SERVICETAX_IGST', '((Igst/100
/*New import Calculation*/
define('LOADING_CHARGE1', '(txtlanding*txtbasicprice/100)');
define('HIGHSEAS_SALES1', '(totalhighsess*highsesspercentage/100)');
define('CUSTOM_DUTY1', '(accessible*txtcustompercentage)/100');
define('EXCISE_DUTY1', '(txtexcisesum*txtpercentage)/100');
define('EXCISE_ED1', '(txtexcise*txtexcisepercentage)/100');
define('EXCISE_SH1', '(excisetxt*exciseshcess)/100');
define('CUSTOM_ED1', '(txtcustomduty1*txtedcesspercentage)/100');
define('CUSTOM_SH1', '(customch*txtshpercentage)/100');
define('ADDTNL_EXCISEDUTY1', '(totaddtnlexcise*addtnpercentage)/100');
define('GROSS_EXP1', '(txtgrossdutypayable-txtmodvat)');
define('AVL_MODVAT1', 'txtexciseduty1+txtexciseedcess+txtexciseshcess+txtaddtnlexcise');
define('GROSS_DUTY1', 'custom+customsh+customed+afterigst');
define('PURCHASE_RATE1', '(dutyimpact)/quantity');
define('CUSTOMDUTY_EXP1', 'txtgrossexp/quantity');
define('RMC_CAL1', 'txtpurchaserate+txtcustomdutyexp');
define('CALCULATE_TOTAL1', '(txtrmc*quantity)+basicprice');
define('IGST', '(tot*igstpercentage)/100');
define('SUBTOTAL', '(assessble+custom+customsh+customed)');
define('ASSESSBLE', '(result+txtbasicprice)');
define('DUTYIMPACT', '(totduty-igst)');
define('MATBYQTY', '(basicqtyval)/qty');
define('CLEARINGQTY', '(clearing/qty)');
define('NETTPERUOM', '(basicres+clear+customdutyexp)');
/* End of file constants.php */
/* Location: ./application/config/constants.php */

View File

@ -1512,14 +1512,10 @@ function addNewImportPurchaseOrder()
$PODate = $this->getDateformat($POdt);
$SupplierID = $this->input->post('drpSupplier');
$DeliveryAddr = $this->input->post('DeliveryAddr');
//$dt = $this->input->post('Deliverydt');
//$Deliverydt = $this->getDateformat($dt);
$POType = $this->input->post('POType');
$PoRange = $this->input->post('txtPoRange');
//$Dispatchinstruction=$this->post('Dispatch');
//echo $Dispatchinstruction;
//die();
//$Schedule=$this->post('Scheduleby');
$DeliveryOption = $this->input->post('DateRange');
//echo $DeliveryOption;
@ -1538,26 +1534,11 @@ function addNewImportPurchaseOrder()
$Dispatch = $this->input->post('Dispatch');
$DeliverySchedule = '';
}
// $PaymentDate=$this->input->post('Payment');
// if($PaymentDate==1)
// {
// $PaymentDays='After';
// }
// else
// {
// $PaymentDays='Before';
// }
//echo $PaymentDays;
//die();
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
$TotalOrder = $this->input->post('txtToatlOrder');
$POStatus = $this->input->post('textStatus');
//echo "$POStatus";
//die();
$CreateBy = $this->session->userdata ( 'userId' );
$RowCount = $this->input->post('txtRowCount');
@ -1634,35 +1615,15 @@ function addNewImportPurchaseOrder()
$Productprice = $this->input->post('BasicAmt'.$i);
$LandingCharge = $this->input->post('LandingChargee'.$i);
$AfterLandingCharge = $this->input->post('AfterLandingChargee'.$i);
$HighSeas = $this->input->post('Highseass'.$i);
$AfterHighSeas = $this->input->post('AfterHighseass'.$i);
$CustomDuty = $this->input->post('Customduty'.$i);
$AfterCustomDuty = $this->input->post('AfterCustomduty'.$i);
$ExciseDuty = $this->input->post('ExcisedutyTax'.$i);
$AfterExciseDuty = $this->input->post('AfterExcisedutyTax'.$i);
$ExciseDutyEd = $this->input->post('ExcisedutyED'.$i);
$AfterExciseDutyEd = $this->input->post('AfterExcisedutyED'.$i);
$ExciseDutySH = $this->input->post('ExcisedutySH'.$i);
$AfterExciseDutySH = $this->input->post('AfterExcisedutySH'.$i);
$CustomEd= $this->input->post('CustomEDcess'.$i);
$AfterCustomEd= $this->input->post('AfterCustomEDcess'.$i);
$CustomSH = $this->input->post('CustomSHcess'.$i);
$AfterCustomSH = $this->input->post('AfterCustomSHcess'.$i);
$AddAdtional = $this->input->post('AdditionalExciseduty'.$i);
$AfterAddAdtional = $this->input->post('AfterAdditionalExciseduty'.$i);
$Grossdutypayable = $this->input->post('Grossdutypayable'.$i);
$AvailableModvat = $this->input->post('AvilableModvat'.$i);
$Grossexpensesduetocustomduty = $this->input->post('Grossexpenses'.$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);
//$currencytypeID = $this->input->post('currencytype');
@ -1671,6 +1632,14 @@ function addNewImportPurchaseOrder()
//echo $BasicPriceinmton;
$CostCenter = $this->input->post('costCode'.$i);
$AssessableValue=$this->input->post('AfterAssessable'.$i);
$Subtotal=$this->input->post('Subtotal'.$i);
$Igst=$this->input->post('Igst'.$i);
$AfterIgst=$this->input->post('AfterIgst'.$i);
$Dutyimpact=$this->input->post('Dutyimpact'.$i);
$Clearingcharge=$this->input->post('ClearingCharges'.$i);
$Nettvalue=$this->input->post('Nett'.$i);
$FreightType=$this->input->post('FreightType'.$i);
@ -1724,9 +1693,10 @@ function addNewImportPurchaseOrder()
if(trim($POType) == IMPORT )
{
// echo 'Success';
$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'=>$Freightrate,'AfterFreightValue'=>$Freightamount);
$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'=>$Freightrate,'AfterFreightValue'=>$Freightamount,'AssessableValue'=>$AssessableValue,'SubTotal'=>$Subtotal,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'DutyImpact'=>$Dutyimpact,'ClearingCharge'=>$Clearingcharge,'NetValue'=>$Nettvalue);
//print_r($ImportTaxList);
//die();
//die();$Nettvalue
$ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList);
@ -1783,24 +1753,6 @@ function addNewImportPurchaseOrder()
$DeliverySchedule = '';
}
// if($DeliveryOption==1){
// $Deliverydt = '';
// $DeliverySchedule = $this->input->post('Scheduleby');
// }
// else{
// $Deliverydt = $this->getDateformat($dt);
// $DeliverySchedule = '';
// }
// $PaymentDate=$this->input->post('Payment');
// if($PaymentDate==1)
// {
// $PaymentDays='After';
// }
// else
// {
// $PaymentDays='Before';
// }
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
//$TotalOrder = $this->input->post('txtToatlOrder');
@ -1903,7 +1855,7 @@ function addNewImportPurchaseOrder()
$AfterExciseDutySH = $this->input->post('AfterExciseDutySHCess'.$i);
$CustomEd= $this->input->post('CustomEdCess'.$i);
$AfterCustomEd= $this->input->post('AfterCustomEdCess'.$i);
$AfterCustomEd= $this->input->post('AfterCustomEdCess1'.$i);
$CustomSH = $this->input->post('CustomSHCess'.$i);
$AfterCustomSH = $this->input->post('AfterCustomSHCess'.$i);
@ -1942,6 +1894,18 @@ function addNewImportPurchaseOrder()
$FreightRate=$this->input->post('FreightValue'.$i);
$FreightAmount=$this->input->post('AfterFreightValue'.$i);
$AssessableValue=$this->input->post('AssessableValue'.$i);
$Subtotal=$this->input->post('SubTotal'.$i);
$Igst=$this->input->post('IGST'.$i);
$AfterIgst=$this->input->post('AfterIGST'.$i);
$Dutyimpact=$this->input->post('DutyImpact'.$i);
$Clearingcharge=$this->input->post('ClearingCharge'.$i);
$Nettvalue=$this->input->post('NetValue'.$i);
//echo $FreightAmount;
@ -2004,7 +1968,8 @@ function addNewImportPurchaseOrder()
// print_r(count($isExists));
//echo $isExists;
//die();
$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,'UpdatedOn'=>$updateddt,'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'=>$Nosoftrip,'FreightValue'=>$FreightRate,'AfterFreightValue'=>$FreightAmount);
$ImportTaxList = array('LineItemNo'=>$LineItemNo,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'CreatedBy'=>$CreateBy,'UpdatedOn'=>$updateddt,'Grossdutypayable'=>$Grossdutypayable,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem,'FreightType'=>$FreightType,'NoOfTrip'=>$Nosoftrip,'FreightValue'=>$FreightRate,'AfterFreightValue'=>$FreightAmount,'AssessableValue'=>$AssessableValue,'SubTotal'=>$Subtotal,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'DutyImpact'=>$Dutyimpact,'ClearingCharge'=>$Clearingcharge,'NetValue'=>$Nettvalue);
//print_r($ImportTaxList);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff