import po
This commit is contained in:
parent
fbde8c6950
commit
2d9a57a77e
@ -172,7 +172,7 @@ define('GROSS_DUTY', 'landingcha+highsesssalless+customcha+excisecha+exciseedc
|
||||
define('PURCHASE_RATE', 'txtbasicinrprice/txtCtablequantity');
|
||||
define('CUSTOMDUTY_EXP', 'txtgrossexp/txtCtablequantity');
|
||||
define('RMC_CAL', 'txtpurchaserate+txtcustomdutyexp');
|
||||
define('CALCULATE_TOTAL', 'txtrmc+basicamt');
|
||||
define('CALCULATE_TOTAL', '(txtrmc*quantity)+basicprice');
|
||||
|
||||
|
||||
|
||||
|
||||
@ -864,6 +864,10 @@ public function importpoprint($PONO)
|
||||
{
|
||||
$this->purchaseorder_model->DeletePOServiceTax($LineItemNo);
|
||||
}
|
||||
else If($POType == IMPORT)
|
||||
{
|
||||
$this->purchaseorder_model->DeletePOImportTax($LineItemNo);
|
||||
}
|
||||
$this->purchaseorder_model->DeletePOLineItem($LineItemNo , $ReqNo,$MaterialCode);
|
||||
echo "Successfully Deleted the Line item".$LineItemNo;
|
||||
|
||||
@ -1140,7 +1144,7 @@ public function importpoprint($PONO)
|
||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
|
||||
|
||||
}
|
||||
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
|
||||
$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);
|
||||
|
||||
@ -633,6 +633,19 @@ function GetCurrencytype()
|
||||
return $query->result_array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function LineItemExistsinImportTax($LineItemNo)
|
||||
{
|
||||
$this->db->select('LineItemNo');
|
||||
$this->db->from('T_Import_Tax');
|
||||
$this->db->where('LineItemNo ',$LineItemNo );
|
||||
$query = $this->db->get();
|
||||
|
||||
if ($query->num_rows > 0) {
|
||||
return $query->result_array();
|
||||
}
|
||||
}
|
||||
// To Update the PO Line Item
|
||||
function updatePOLineItem($PONO,$LineItemNo,$PODetails)
|
||||
{
|
||||
@ -664,6 +677,16 @@ function GetCurrencytype()
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function updateImportTax($LineItemNo,$PODetails)
|
||||
{
|
||||
$this->db->where('LineItemNo', $LineItemNo);
|
||||
$this->db->update('T_Import_Tax', $PODetails);
|
||||
|
||||
// print_r($this->db->last_query());
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function getLastInsertedPO()
|
||||
{
|
||||
|
||||
@ -2532,6 +2532,7 @@ function CalculateCtable()
|
||||
$('#RMCIncludingCustomers').val(Math.round(txtrmc));
|
||||
}
|
||||
quantity=parseFloat($('#Quantity').val());
|
||||
basicprice=parseFloat($('#txtBasicValue').val());
|
||||
total=<?php echo CALCULATE_TOTAL;?>;
|
||||
if(isNaN(total))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user