import po
This commit is contained in:
parent
7eea4ad883
commit
22fefce12e
@ -282,14 +282,28 @@ class purchaseorder extends BaseController
|
||||
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
// print_r($data);
|
||||
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
|
||||
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
|
||||
//print_r($data);
|
||||
//$data['ExchangeRate']=$data['POItem'] ->ExchangeRate;
|
||||
//$data['ExchangeRate']=$this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
|
||||
//$data['ExchangeRate']=$data['POItem']->ExchangeRate;
|
||||
|
||||
// print_r($data['POItem']);
|
||||
|
||||
foreach($data['POItem'] as $Rate)
|
||||
{
|
||||
|
||||
// print_r($Rate->ExchangeRate);
|
||||
$exRate=$Rate->ExchangeRate;
|
||||
|
||||
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
|
||||
|
||||
|
||||
}
|
||||
$data['ExchangeRate']=$exRate;
|
||||
|
||||
$data['Currency']=$this->purchaseorder_model->GetCurrencytype();
|
||||
//print_r($data);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
|
||||
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
|
||||
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
@ -886,7 +900,7 @@ public function importpoprint($PONO)
|
||||
|
||||
|
||||
|
||||
function addNewImportPurchaseOrder()
|
||||
function addNewImportPurchaseOrder()
|
||||
{//echo ("ggh");
|
||||
|
||||
$POdt =$this->input->post('PODate');
|
||||
@ -897,6 +911,16 @@ public function importpoprint($PONO)
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$POType = $this->input->post('POType');
|
||||
$PoRange = $this->input->post('txtPoRange');
|
||||
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
||||
$TotalOrder = $this->input->post('txtToatlOrder');
|
||||
@ -913,17 +937,9 @@ public function importpoprint($PONO)
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
//echo($SupplierID);
|
||||
|
||||
|
||||
//echo($dt);
|
||||
//echo($Deliverydt);
|
||||
//echo($POType);
|
||||
//echo($PoRange);
|
||||
//echo($TotalOrder);
|
||||
//echo($POStatus);
|
||||
//echo($SupplierID);
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt );
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption );
|
||||
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
|
||||
@ -984,6 +1000,7 @@ public function importpoprint($PONO)
|
||||
$QuantityKG = $this->input->post('PurQuantity'.$i);
|
||||
|
||||
$currencytypeID = $this->input->post('currencytype');
|
||||
$Totalvalueitem=$this->input->post('TotalExp'.$i);
|
||||
|
||||
//echo $BasicPriceinmton;
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
@ -1019,16 +1036,13 @@ public function importpoprint($PONO)
|
||||
if(trim($POType) == IMPORT )
|
||||
{
|
||||
// echo 'Success';
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'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,'CurrencyType'=>$currencytypeID);
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'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,'CurrencyType'=>$currencytypeID,'TotalValue'=>$Totalvalueitem);
|
||||
//print_r($ImportTaxList);
|
||||
//die();
|
||||
|
||||
|
||||
//TaxID, LineItemNo, CurrencyType, ExchangeRate, BasicPriceInMTon, ProductPrice, LandingCharge, AfterLandingCharge, HighSeasSalesCharge, AfterHighSeasSalesCharge, CustomDuty, AfterCustomDuty, ExciseDuty, AfterExciseDuty, ExciseDutyEdCess, AfterExciseDutyEdCess, ExciseDutyS&HCess, AfterExciseDutyS&HCess, CustomEdCess, CustomS&HCess, AddlExciseDuty, AfterAddlExciseDuty, Grossdutypayable, AvailableModvat, Grossexpensesduetocustomduty, purchaseratePerKG, CustomDutyExpensesPerKG, RMCIncludingCustomersPerKG, QuantityKG, CreatedDate, CreatedBy, UpdateBY, UpdatedOn
|
||||
//die();
|
||||
|
||||
$ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList);
|
||||
//echo 'Revenue tax Success';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1047,8 +1061,18 @@ public function importpoprint($PONO)
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$POType = $this->input->post('POType');
|
||||
$PoRange = $this->input->post('txtPoRange');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
|
||||
//$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
||||
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
||||
$TotalOrder = $this->input->post('txtTotalOrder');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
|
||||
@ -1061,7 +1085,7 @@ public function importpoprint($PONO)
|
||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||
// PO Master
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt );
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption );
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
@ -1117,6 +1141,7 @@ public function importpoprint($PONO)
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$ExciseDutySH = $this->input->post('ExcisedutySH'.$i);
|
||||
$Totalvalueitem=$this->input->post('TotalExp'.$i);
|
||||
$LineItemNo = '';
|
||||
|
||||
$currencytypeID = $this->input->post('currencytype');
|
||||
@ -1157,14 +1182,14 @@ public function importpoprint($PONO)
|
||||
$isExists = $this->purchaseorder_model->LineItemExistsinImportTax($LineItemNo);
|
||||
if(count($isExists) == 0)
|
||||
{
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'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,'CurrencyType'=>$currencytypeID);
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'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,'CurrencyType'=>$currencytypeID,'TotalValue'=>$Totalvalueitem);
|
||||
|
||||
$ImportList = $this->purchaseorder_model->addImportTax($RevenueTaxList);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'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,'CurrencyType'=>$currencytypeID);
|
||||
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'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,'CurrencyType'=>$currencytypeID,'TotalValue'=>$Totalvalueitem);
|
||||
|
||||
$this->purchaseorder_model->updateImportTax($LineItemNo,$RevenueTaxList);
|
||||
|
||||
@ -1177,6 +1202,7 @@ public function importpoprint($PONO)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* All Function following This command for FINANCE TEAM PO APPROVAL SCREEN*/
|
||||
function poapproval(){
|
||||
$q="A";
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
$AvlAmount = 0;
|
||||
$ReqType ='';
|
||||
|
||||
//echo $ExchangeRate;
|
||||
|
||||
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('Y-m-d');
|
||||
@ -21,6 +24,7 @@ if(!empty($AvlBudAmt))
|
||||
$AvlAmount = $AvlBudAmt;
|
||||
|
||||
}
|
||||
//echo $AvlAmount;
|
||||
|
||||
$CompanyAddress = '';
|
||||
if(!empty($CompanyDetails))
|
||||
@ -60,8 +64,7 @@ $totgrossexpense='';
|
||||
$totordervalue='';
|
||||
$ExchangeRate='';
|
||||
$totorder='';
|
||||
//$ExchangeRate=$record->ExchangeRate;
|
||||
|
||||
//$ExchangeRate
|
||||
|
||||
|
||||
if(!empty($POMaster))
|
||||
@ -82,7 +85,7 @@ if(!empty($POMaster))
|
||||
$POStatus = $Req->StatusCode;
|
||||
$PONO = $Req->PONO;
|
||||
$ServiceDescription = $Req->ServiceDescription;
|
||||
//$ExchangeRate=$Req->ExchangeRate;
|
||||
// $ExchangeRate=$Req->ExchangeRate;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -253,7 +256,9 @@ if(!empty($POMaster))
|
||||
Exchange Rate :
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'ExchangeRate','value' => set_value('ExchangeRate'),'id'=>'ExchangeRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()');
|
||||
|
||||
|
||||
$data = array('name' => 'ExchangeRate','value' => set_value('ExchangeRate',$ExchangeRate),'id'=>'ExchangeRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()');
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
@ -1534,6 +1539,8 @@ if(!empty($POMaster))
|
||||
|
||||
<input type="hidden" name="<?php echo 'BasicINRValue'.$index ?>" id="<?php echo 'BasicINRValue'.$index ?>" value="<?php echo $record->BasicINRValue; ?>" />
|
||||
|
||||
<input type="hidden" name="<?php echo 'TotalValue'.$index ?>" id="<?php echo 'TotalValue'.$index ?>" value="<?php echo $record->TotalValue; ?>" />
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
@ -1775,11 +1782,20 @@ var NilType = '<?php echo NILTYPE;?>';
|
||||
Mat: []
|
||||
};
|
||||
|
||||
$('#ExchangeRate').val(<?php echo $ExchangeRate;?>);
|
||||
$('#AvlBudAmt').val(<?php echo $AvlAmount; ?>);
|
||||
|
||||
var txtexchangerate=parseFloat($('#ExchangeRate').val());
|
||||
$('#EditExchangeRt').val(txtexchangerate);
|
||||
var txtbasics=parseFloat($('#EditimBasicPrice').val());
|
||||
//alert(txtexchangerate);
|
||||
var txtbasics=parseFloat($('#BasicPriceInMTon').val());
|
||||
//alert(txtexchangerate);
|
||||
//alert(txtbasics);
|
||||
var basicpriceinus=parseFloat($('#BasicPriceinUS').val());
|
||||
var txtbasic=txtexchangerate*basicpriceinus;
|
||||
//alert(txtbasic);
|
||||
$('#EditINRBasicvalue').val(txtbasic);
|
||||
|
||||
|
||||
|
||||
$('#drpSupplier').change(function() {
|
||||
|
||||
@ -1936,8 +1952,8 @@ $("#txtBasicValue").val('');
|
||||
function USRate()
|
||||
{
|
||||
|
||||
if($('#imBasicPrice').val() != '' && $('#ExchangeRate').val() != '')
|
||||
{
|
||||
//if($('#imBasicPrice').val() != '' && $('#ExchangeRate').val() != '')
|
||||
//{
|
||||
var txtbasics=parseFloat($('#imBasicPrice').val());
|
||||
var txtexchangerate=parseFloat($('#ExchangeRate').val());
|
||||
$('#ExchangeRt').val(txtexchangerate);
|
||||
@ -1958,7 +1974,7 @@ function USRate()
|
||||
$('#EditINRBasicvalue').val(txtINRvalue);
|
||||
|
||||
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@ -2915,6 +2931,7 @@ $('.AddImport').click(function()
|
||||
addHidden(theForm,"RMCIncludingCustomers"+temp,RMCIncluderate);
|
||||
addHidden(theForm,"AvilableModvat"+temp,Avlmodvat);
|
||||
addHidden(theForm,"TotalExp"+temp,totalexp);
|
||||
addHidden(theForm,"TotalitemExp"+temp,TotalValue);
|
||||
// alert(JSON.stringify(totalexp));
|
||||
|
||||
|
||||
@ -3080,6 +3097,7 @@ $("#editimportpomodel").on("shown.bs.modal", function(e) {
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
//alert(userid);
|
||||
//alert('inadd');
|
||||
|
||||
var tr= document.getElementById(userid);
|
||||
//alert(tr);
|
||||
var cellval = tr.cells;
|
||||
@ -3126,10 +3144,10 @@ $("#editimportpomodel").on("shown.bs.modal", function(e) {
|
||||
$('#Editpurchaserate').val($("#purchaseratePerKG"+userid).val());
|
||||
$('#EditCustomDutyExpenses').val($("#CustomDutyExpensesPerKG"+userid).val());
|
||||
$('#EditRMCIncludingCustomers').val($("#RMCIncludingCustomersPerKG"+userid).val());
|
||||
$('#EditAfterBasicPriceTax').val($("#AfterBasicPriceTax"+userid).val());
|
||||
$('#EditAfterBasicPriceTax').val($("#BasicINRValue"+userid).val());
|
||||
$('#EditAvailableModvat').val($("#AvailableModvat"+userid).val());
|
||||
$('#EditTotalExp').val($("#TotalExp"+userid).val());
|
||||
//$('#EditINRBasicvalue').val($("#BasicINRValue"+userid).val());
|
||||
$('#EditTotalExp').val($("#TotalValue"+userid).val());
|
||||
$('#EditINRBasicvalue').val($("#BasicINRValue"+userid).val());
|
||||
|
||||
$('#EditTotalOrderValue').val(cellval[8].innerHTML);
|
||||
$("#EditMaterialCode").empty();
|
||||
@ -3529,7 +3547,7 @@ if(validate())
|
||||
|
||||
//data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeQletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextExchangerate"+ExcLandingCharge="+hangerate+"Status="+TextStatus,
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>purchaseorder/addNewImportPurchaseOrder",
|
||||
url:"<?php echo base_url() ?>purchaseorder/EditRevenuePurchaseOrder",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
|
||||
@ -1819,7 +1819,8 @@ $('#TotalExp').val('');
|
||||
//var result=(txtlanding*txtbasicprice/100);
|
||||
var result= <?php echo LOADING_CHARGE;?>;
|
||||
|
||||
$('#AfterLandingCharge').val(parseFloat(Math.round(result)));
|
||||
//$('#AfterLandingCharge').val(parseFloat(Math.round(result)));
|
||||
$('#AfterLandingCharge').val(parseFloat(result).toFixed(2));
|
||||
CalculateHighseassalescharge();
|
||||
|
||||
//alert();
|
||||
@ -1891,7 +1892,7 @@ function EditCalculateHighseassalescharge()
|
||||
$('#EditAfterHighseas').val('');
|
||||
}
|
||||
else{
|
||||
$('#EditAfterHighseas').val(parseFloat(Math.round(txthighsess)));
|
||||
$('#EditAfterHighseas').val(parseFloat(txthighsess).toFixed(2));
|
||||
}
|
||||
EditCalculateCustomduty();
|
||||
}
|
||||
@ -1916,7 +1917,7 @@ function EditCalculateHighseassalescharge()
|
||||
$('#AfterCustomduty').val('');
|
||||
}
|
||||
else{
|
||||
$('#AfterCustomduty').val(parseFloat(Math.round(txtcustomduty)));
|
||||
$('#AfterCustomduty').val(parseFloat(txtcustomduty).toFixed(2));
|
||||
}
|
||||
CalculateExciseDuty() ;
|
||||
|
||||
@ -1942,7 +1943,7 @@ function EditCalculateCustomduty()
|
||||
$('#EditAfterCustomduty').val('');
|
||||
}
|
||||
else{
|
||||
$('#EditAfterCustomduty').val(parseFloat(Math.round(txtcustomduty)));
|
||||
$('#EditAfterCustomduty').val(parseFloat(txtcustomduty).toFixed(2));
|
||||
}
|
||||
EditCalculateExciseDuty() ;
|
||||
|
||||
@ -1974,7 +1975,7 @@ function CalculateExciseDuty()
|
||||
}
|
||||
//var totalexcise=txtcustomduty+Exciseduty;
|
||||
else{
|
||||
$('#AfterExcisedutyTax').val(parseFloat(Math.round(totalexcise)));
|
||||
$('#AfterExcisedutyTax').val(parseFloat(totalexcise).toFixed(2));
|
||||
}
|
||||
CalculateExciseED1();
|
||||
}
|
||||
@ -2006,7 +2007,7 @@ function EditCalculateExciseDuty()
|
||||
else
|
||||
{
|
||||
//var totalexcise=txtcustomduty+Exciseduty;
|
||||
$('#EditAfterExcisedutyTax').val(parseFloat(Math.round(totalexcise)));
|
||||
$('#EditAfterExcisedutyTax').val(parseFloat(totalexcise).toFixed(2));
|
||||
}
|
||||
EditCalculateExciseED1();
|
||||
}
|
||||
@ -2027,7 +2028,7 @@ function CalculateExciseED1()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#AfterExcisedutyEDcess').val(parseFloat(Math.round(txtexcisetot)));
|
||||
$('#AfterExcisedutyEDcess').val(parseFloat(txtexcisetot).toFixed(2));
|
||||
}
|
||||
|
||||
CalculateexciseSHcess();
|
||||
@ -2050,7 +2051,7 @@ function EditCalculateExciseED1()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditAfterExcisedutyEDcess').val(parseFloat(Math.round(txtexcisetot)));
|
||||
$('#EditAfterExcisedutyEDcess').val(parseFloat(txtexcisetot).toFixed(2));
|
||||
}
|
||||
EditCalculateexciseSHcess();
|
||||
|
||||
@ -2072,7 +2073,7 @@ function CalculateexciseSHcess()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#AfterExcisedutySHcess').val(parseFloat(Math.round(exciseshcesstot)));
|
||||
$('#AfterExcisedutySHcess').val(parseFloat(exciseshcesstot).toFixed(2));
|
||||
//$('#AfterExcisedutySHcess').val('');
|
||||
}
|
||||
CalculateCustomEdcess();
|
||||
@ -2097,7 +2098,7 @@ function CalculateexciseSHcess()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditAfterExcisedutySHcess').val(parseFloat(Math.round(exciseshcesstot)));
|
||||
$('#EditAfterExcisedutySHcess').val(parseFloat(exciseshcesstot).toFixed(2));
|
||||
}
|
||||
EditCalculateCustomEdcess();
|
||||
|
||||
@ -2138,7 +2139,7 @@ function CalculateexciseSHcess()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#AfterCustomEDcess').val(parseFloat(Math.round(txtcustomedsess)));
|
||||
$('#AfterCustomEDcess').val(parseFloat(txtcustomedsess).toFixed(2));
|
||||
}
|
||||
CalculateCustomSHcess();
|
||||
|
||||
@ -2175,7 +2176,7 @@ function EditCalculateCustomEdcess()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditAfterCustomEDcess').val(parseFloat(Math.round(txtcustomedsess)));
|
||||
$('#EditAfterCustomEDcess').val(parseFloat(txtcustomedsess).toFixed(2));
|
||||
}
|
||||
EditCalculateCustomSHcess();
|
||||
|
||||
@ -2216,7 +2217,7 @@ function EditCalculateCustomEdcess()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#AfterCustomSHcess').val(parseFloat(Math.round(totresult)));
|
||||
$('#AfterCustomSHcess').val(parseFloat(totresult).toFixed(2));
|
||||
}
|
||||
CalculateaddlExciseDuty();
|
||||
|
||||
@ -2255,7 +2256,7 @@ function EditCalculateCustomEdcess()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditAfterCustomSHcess').val(parseFloat(Math.round(totresult)));
|
||||
$('#EditAfterCustomSHcess').val(parseFloat(totresult).toFixed(2));
|
||||
}
|
||||
EditCalculateaddlExciseDuty();
|
||||
|
||||
@ -2298,7 +2299,7 @@ function CalculateaddlExciseDuty()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#AfterAdditionalExciseduty').val(parseFloat(Math.round(txtaddtnexciseduty)));
|
||||
$('#AfterAdditionalExciseduty').val(parseFloat(txtaddtnexciseduty).toFixed(2));
|
||||
}
|
||||
//var txtgrossduty=landingcha+highsesssalless+customcha+excisecha+exciseedcha+exciseshcha+customed+customsh+txtaddtnexciseduty;
|
||||
|
||||
@ -2308,7 +2309,7 @@ function CalculateaddlExciseDuty()
|
||||
$('#Grossdutypayable').val('');
|
||||
}
|
||||
else{
|
||||
$('#Grossdutypayable').val(parseFloat(Math.round(txtgrossduty)));
|
||||
$('#Grossdutypayable').val(parseFloat(txtgrossduty).toFixed());
|
||||
}
|
||||
CalculateAvlModvat();
|
||||
|
||||
@ -2353,7 +2354,7 @@ function EditCalculateaddlExciseDuty()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditAfterAdditionalExciseduty').val(Math.round(txtaddtnexciseduty));
|
||||
$('#EditAfterAdditionalExciseduty').val(txtaddtnexciseduty).toFixed(2);
|
||||
}
|
||||
//var txtgrossduty=landingcha+highsesssalless+customcha+excisecha+exciseedcha+exciseshcha+customed+customsh+txtaddtnexciseduty;
|
||||
|
||||
@ -2364,7 +2365,7 @@ function EditCalculateaddlExciseDuty()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditGrossdutypayable').val(parseFloat(Math.round(txtgrossduty)));
|
||||
$('#EditGrossdutypayable').val(parseFloat(txtgrossduty).toFixed(2));
|
||||
}
|
||||
EditCalculateAvlModvat();
|
||||
|
||||
@ -2392,7 +2393,7 @@ function CalculateAvlModvat()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#AvailableModvat').val(parseFloat(Math.round(totavlmodvat)));
|
||||
$('#AvailableModvat').val(parseFloat(totavlmodvat).toFixed(2));
|
||||
}
|
||||
CalculateGrossExpense();
|
||||
|
||||
@ -2423,7 +2424,7 @@ function EditCalculateAvlModvat()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditAvailableModvat').val(parseFloat(Math.round(totavlmodvat)));
|
||||
$('#EditAvailableModvat').val(parseFloat(totavlmodvat).toFixed(2));
|
||||
}
|
||||
EditCalculateGrossExpense();
|
||||
}
|
||||
@ -2448,7 +2449,7 @@ function CalculateGrossExpense()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#Grossexpenses').val(parseFloat(Math.round(grossexp)));
|
||||
$('#Grossexpenses').val(parseFloat(grossexp).toFixed(2));
|
||||
}
|
||||
CalculateCtable();
|
||||
|
||||
@ -2475,7 +2476,7 @@ function EditCalculateGrossExpense()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditGrossexpenses').val(parseFloat(Math.round(grossexp)));
|
||||
$('#EditGrossexpenses').val(parseFloat(grossexp).toFixed(2));
|
||||
}
|
||||
EditCalculateCtable()
|
||||
|
||||
@ -2485,7 +2486,6 @@ function CalculateCtable()
|
||||
{
|
||||
//alert();
|
||||
//purchaserate
|
||||
|
||||
var txtCtablequantity=0;
|
||||
var txtbasicinrprice=0;
|
||||
var txtpurchaserate=0;
|
||||
@ -2508,8 +2508,7 @@ function CalculateCtable()
|
||||
{
|
||||
$('#purchaserate').val(txtpurchaserate);
|
||||
}
|
||||
//CustomDutyExpenses
|
||||
//RMCIncludingCustomers
|
||||
|
||||
txtgrossexp=parseFloat($('#Grossexpenses').val());
|
||||
//txtcustomdutyexp=txtgrossexp/txtCtablequantity;
|
||||
txtcustomdutyexp=<?php echo CUSTOMDUTY_EXP;?>;
|
||||
@ -2519,7 +2518,7 @@ function CalculateCtable()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#CustomDutyExpenses').val(Math.round(txtcustomdutyexp));
|
||||
$('#CustomDutyExpenses').val((txtcustomdutyexp).toFixed(2));
|
||||
}
|
||||
//txtrmc=txtpurchaserate+txtcustomdutyexp;
|
||||
txtrmc=<?php echo RMC_CAL;?>;
|
||||
@ -2529,7 +2528,7 @@ function CalculateCtable()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#RMCIncludingCustomers').val(Math.round(txtrmc));
|
||||
$('#RMCIncludingCustomers').val((txtrmc).toFixed(2));
|
||||
}
|
||||
quantity=parseFloat($('#Quantity').val());
|
||||
basicprice=parseFloat($('#txtBasicValue').val());
|
||||
@ -2540,25 +2539,9 @@ function CalculateCtable()
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#TotalExp').val(Math.round(total));
|
||||
$('#TotalExp').val((total).toFixed(2));
|
||||
}
|
||||
|
||||
//$('#AfterHighseas').val('');
|
||||
//$('#AfterCustomduty').val('');
|
||||
///$('#AfterExcisedutyTax').val('');
|
||||
//$('#AfterExcisedutyEDcess').val('');
|
||||
//$('#AfterExcisedutySHcess').val('');
|
||||
//$('#AfterCustomEDcess').val('');
|
||||
//$('#AfterCustomSHcess').val('');
|
||||
//$('#AfterAdditionalExciseduty').val('');
|
||||
//$('#Grossdutypayable').val('');
|
||||
//$('#AvailableModvat').val('');
|
||||
//$('#Grossexpenses').val('');
|
||||
//$('#purchaserate').val('');
|
||||
//$('#CustomDutyExpenses').val('');
|
||||
//$('#RMCIncludingCustomers').val('');
|
||||
//$('#TotalExp').val('');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -2622,8 +2605,9 @@ $('.AddImport').click(function()
|
||||
var totalexp=parseFloat($("#TotalExp").val());
|
||||
var Exchangerate=parseFloat($("#ExchangeRt").val());
|
||||
var Basicpriceinus=parseFloat($("#imBasicPrice").val());
|
||||
var taxexp=taxamt*quantity;
|
||||
|
||||
//alert(JSON.stringify(totalexp));
|
||||
//alert(taxexp);
|
||||
|
||||
// index = parseInt(index)+1;
|
||||
// alert('in');
|
||||
@ -2684,7 +2668,7 @@ $('.AddImport').click(function()
|
||||
index = parseInt(index)+1;
|
||||
//alert('in');
|
||||
var template = jQuery("#ImportList").html();
|
||||
$('#ImportAppend').append(_.template(template,{index:temp,ReqNo:Reqnumber,ItemName:materialName,Quantity:quantity,UOM:uom,Rate:itemRate,BasicAmount:BasicAmt,Taxvalue:taxamt,TotalValue:totalexp}));
|
||||
$('#ImportAppend').append(_.template(template,{index:temp,ReqNo:Reqnumber,ItemName:materialName,Quantity:quantity,UOM:uom,Rate:itemRate,BasicAmount:BasicAmt,Taxvalue:taxexp,TotalValue:totalexp}));
|
||||
//alert(JSON.strigify(BasicAmt));
|
||||
|
||||
|
||||
@ -3319,11 +3303,24 @@ TotalOrderValue=parseFloat(TotalOrderValue)-parseFloat()
|
||||
$('#txttotalgrossexpense').val(parseFloat(TotalGrossExpense).toFixed(2));
|
||||
$('#txtToatlOrder').val(parseFloat(TotalOrderValue).toFixed(2));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$('#Scheduleby').change(function(){
|
||||
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
|
||||
});
|
||||
$('#Deliverydt').change(function(){
|
||||
|
||||
$('#Scheduleby').val('');
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Save(status)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user