add,edit,pdf of import po

This commit is contained in:
venbatechnologies@gmail.com 2017-06-17 15:57:19 +05:30
parent 0ec18d2521
commit fbde8c6950
5 changed files with 7417 additions and 3427 deletions

View File

@ -151,6 +151,7 @@ class purchaseorder extends BaseController
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
$data['Currency']=$this->purchaseorder_model->GetCurrencytype();
$ViewName = '';
if($ReqType == REVENUE)
@ -188,6 +189,12 @@ class purchaseorder extends BaseController
$this ->revenuepoprint($PONO);
}
else if($ReqType == IMPORT)
{
$this ->importpoprint($PONO);
}
}
function CreaterevenuePOPrint()
@ -262,6 +269,28 @@ class purchaseorder extends BaseController
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
}
else if($ReqType == IMPORT)
{
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
if(count($AvlBudget)>0)
{
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
}
// print_r($data);
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
//print_r($data);
//$data['ExchangeRate']=$data['POItem'] ->ExchangeRate;
//$data['ExchangeRate']=$this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
$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);
}
}
@ -773,6 +802,39 @@ class purchaseorder extends BaseController
$this->dompdf->stream("ServicePOReport.pdf",$data,$php);
}
public function importpoprint($PONO)
{
// $this->load->view('includes/pdfheader');
// Load the pdf page with multiviews
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetailsForPDF($PONO);
$this->load->View("importpopdf", $data);
// Add header to pdf
//$this->load->view('includes/pdffooter');
// Get output html
$php = $this->output->get_output();
// Load library
$this->load->library('dompdf_gen');
// Convert to PDF
$this->dompdf->load_html($php);
$this->dompdf->render();
$data['Attachment'] = FALSE;
$this->dompdf->stream("ImportPOReport.pdf",$data,$php);
}
/**
* This function used to load the Delete the Requistion Items
*/
@ -810,7 +872,7 @@ class purchaseorder extends BaseController
function addNewImportPurchaseOrder()
function addNewImportPurchaseOrder()
{//echo ("ggh");
$POdt =$this->input->post('PODate');
@ -825,6 +887,8 @@ class purchaseorder extends BaseController
$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');
@ -846,7 +910,8 @@ class purchaseorder extends BaseController
//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 );
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
$PONO = '';
@ -871,18 +936,42 @@ class purchaseorder extends BaseController
$Exchangerate = $this->input->post('Exchangerate'.$i);
$BasicPriceinmton = $this->input->post('BasicPriceinUS'.$i);
$Productprice = $this->input->post('BasicAmt'.$i);
$LandingCharge = $this->input->post('AfterLandingChargee'.$i);
$HighSeas = $this->input->post('AfterHighseass'.$i);
$CustomDuty = $this->input->post('AfterCustomduty'.$i);
$ExciseDuty = $this->input->post('AfterExcisedutyTax'.$i);
$ExciseDutyEd = $this->input->post('AfterExcisedutyED'.$i);
$ExciseDutySH = $this->input->post('AfterExcisedutySH'.$i);
$CustomEd= $this->input->post('AfterCustomEDcess'.$i);
$CustomSH = $this->input->post('AfterCustomSHcess'.$i);
$AddAdtional = $this->input->post('AfterAdditionalExciseduty'.$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);
echo $BasicPriceinmton;
$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');
//echo $BasicPriceinmton;
$CostCenter = $this->input->post('costCode'.$i);
$SkipInsert = "False";
@ -916,7 +1005,13 @@ class purchaseorder extends BaseController
if(trim($POType) == IMPORT )
{
// echo 'Success';
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'ExciseDuty'=>$ExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd, 'ExciseDutyS&HCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomS&HCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
$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);
//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';
@ -969,23 +1064,48 @@ class purchaseorder extends BaseController
$Reqnumber = $this->input->post('Reqnumber'.$i);
$itemRate = $this->input->post('itemRate'.$i);
$Exchangerate = $this->input->post('ExchangeRate'.$i);
$BasicPriceinmton = $this->input->post('imBasicPrice'.$i);
$Productprice = $this->input->post('BasicValue'.$i);
$LandingCharge = $this->input->post('txttotallanding'.$i);
$HighSeas = $this->input->post('txttotalhighseas'.$i);
$CustomDuty = $this->input->post('txttotalcustom'.$i);
$ExciseDuty = $this->input->post('txttotalexcise'.$i);
$ExciseDutyEd = $this->input->post('txttotalexciseED'.$i);
$ExciseDutySH = $this->input->post('txttotalexciseSH'.$i);
$CustomEd= $this->input->post('txttotalcustomED'.$i);
$CustomSH = $this->input->post('txttotalcustomSH'.$i);
$AddAdtional = $this->input->post('txttotalAdditionalExciseduty'.$i);
$Exchangerate = $this->input->post('Exchangerate'.$i);
$BasicPriceinmton = $this->input->post('BasicPriceinUS'.$i);
$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);
$POLineItemNo = $this->input->post('LineItemNo'.$i);
$CostCenter = $this->input->post('costCode'.$i);
$ExciseDutySH = $this->input->post('ExcisedutySH'.$i);
$LineItemNo = '';
$currencytypeID = $this->input->post('currencytype');
$SkipInsert = "False";
if( count($comma_separated) > 0)
{
@ -1023,14 +1143,14 @@ class purchaseorder extends BaseController
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
if(count($isExists) == 0)
{
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'ExciseDuty'=>$ExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd, 'ExciseDutyS&HCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomS&HCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
$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);
$ImportList = $this->purchaseorder_model->addImportTax($RevenueTaxList);
}
else
{
$ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'ExciseDuty'=>$ExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd, 'ExciseDutyS&HCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomS&HCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
$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);
$this->purchaseorder_model->updateImportTax($LineItemNo,$RevenueTaxList);
@ -1042,7 +1162,6 @@ class purchaseorder extends BaseController
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
}
}
?>

View File

@ -528,6 +528,71 @@ class purchaseorder_model extends CI_Model
}
function GetImportPurchaseOrderDetailsForPDF($PONO = '')
{
$subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,
Mat.UOM,Quantity,Rate,ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount ,
ProductPrice,Tax.*,CostCenterCode , POMaster.*,sup.SupplierName,sup.Address
FROM T_PurchaseOrder_LineItem LineItem
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
join T_Import_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO
join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID
where LineItem.PONO =?';
$query = $this->db->query($subQuery,array($PONO));
return $query->result();
}
function GetImportPurchaseOrderDetails($PONO = '')
{
$subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,
Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue ,
ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount,LandingCharge,HighSeasSalesCharge,CustomDuty,ExciseDuty,ExciseDutyEdCess,CustomEdCess,ExchangeRate,AfterLandingCharge,AfterHighSeasSalesCharge,AfterCustomDuty,AfterExciseDuty,AfterExciseDutyEdCess,AddlExciseDuty,AfterAddlExciseDuty,Grossdutypayable,AvailableModvat,Grossexpensesduetocustomduty,purchaseratePerKG,CustomDutyExpensesPerKG,RMCIncludingCustomersPerKG,QuantityKG,BasicPriceInMTon,ProductPrice,CustomSHCess,AfterCustomSHCess,AfterExciseDutySHCess,ExciseDutySHCess,AfterCustomEdCess,ROUND((Quantity *Rate)+(RMCIncludingCustomersPerKG*Quantity),2)as TotalOrderValue,ROUND((ExchangeRate*BasicPriceInMTon),2) as BasicINRValue,
Req.CostCenterCode,Dept.DepartmentName FROM T_PurchaseOrder_LineItem LineItem
join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode
join T_Import_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo
join T_Requestion_Master Req on Req.ReqNo = LineItem.ReqNo
join T_Employee_Details emp on Req.Requestedby = emp.EmpID
join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode where LineItem.PONO =?';
//print_r($subQuery);
$query = $this->db->query($subQuery,array($PONO));
return $query->result();
}
function GetCurrencytype()
{
$subQuery = 'select CurrencyCode,CurrencyName from T_Currency_Details';
$query = $this->db->query($subQuery);
return $query->result();
}
// To Update the PO
function updatePOMaster($PONO,$PODetails)
{
@ -790,6 +855,14 @@ class purchaseorder_model extends CI_Model
return TRUE;
}
function DeletePOImportTax( $LineItem='')
{
$this->db->where('LineItemNo', $LineItem);
$this->db->delete('T_Import_Tax');
return TRUE;
}
}

File diff suppressed because it is too large Load Diff

6789
application/views/importpo.php Executable file → Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,47 @@
<?php
$PONO = '';
$CompanyAddress = '';
$CompanyName = '';
$SuplierName = '';
$SuplierAddress = '';
$DeliveryAddress = '';
$Podt = '';
$DeliveryDate ='';
$ServiceDescription = '';
if(!empty($CompanyDetails))
{
foreach ($CompanyDetails as $CO)
{
$CompanyName = $CO->CompanyName;
$CompanyAddress = $CO->Address;
}
}
if(!empty($POItem))
{
foreach ($POItem as $PO)
{
$PONO = $PO->PONO;
$SuplierName = $PO->SupplierName;
$SuplierAddress = $PO->Address;
$DeliveryAddress = $PO->DeliveryAddress;
$dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata'));
$Podt = $dt->format('d-m-Y');
$dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $dtDe->format('d-m-Y');
$ServiceDescription =$PO->ServiceDescription;
}
}
?>
<div><center>
<h2>IMPORT PURCHASE ORDER</h2>
@ -36,7 +80,39 @@
<th>Gross expenses due to custom duty</th>
<th>Total Amount(INR)</th>
</tr>
<tr>
<?php
if(!empty($POItem))
{
$BasicValue=0;
$ProductPrice = 0;
$AfterLandingCharge= 0;
$AfterHighSeasSalesCharge= 0;
$AfterCustomDuty = 0;
$AfterCustomEdCess = 0;
$AfterCustomSHCess = 0;
$AfterExciseDuty = 0;
$AfterExciseDutyEdCess = 0;
$ExciseDutySHCess = 0;
$AfterAddlExciseDuty = 0;
$Grossdutypayable = 0;
$AvailableModvat = 0;
$Grossexpensesduetocustomduty = 0;
$purchaseratePerKG=0;
$CustomDutyExpensesPerKG=0;
$RMCIncludingCustomersPerKG=0;
$AfterExciseDutySHCess=0;
$TotalOrderValue=0;
foreach($POItem as $record)
{
$index = $index + 1;
?>
<!--<tr>
<td>1</td>
<td>Resin - (A grade)</td>
<td align="right">100</td>
@ -73,34 +149,146 @@
<td align="right">7000</td>
<td align="right">2000</td>
<td align="right">12,38,000</td>
</tr>
</table>
</tr>-->
<tr>
<td><?php echo $index ; ?></td>
<td><?php echo $record->MaterialName ; ?></td>
<td align="right"><?php echo $record->Quantity ; ?></td>
<td align="right"><?php echo $record->Rate ; ?></td>
<td align="right"><?php $BasicValue=($record->Quantity*$record->Rate);
echo number_format($BasicValue,2) ; ?></td>
<td align="right"><?php echo $record->AfterLandingCharge; ?></td>
<td align="right"><?php echo $record->AfterHighSeasSalesCharge ; ?></td>
<td align="right"><?php echo $record->AfterCustomDuty ; ?></td>
<td align="right"><?php echo $record->AfterExciseDuty ; ?></td>
<td align="right"><?php echo $record->AfterExciseDutyEdCess ; ?></td>
<td align="right"><?php echo $record->AfterCustomEdCess ; ?></td>
<td align="right"><?php echo $record->AfterAddlExciseDuty ; ?></td>
<td align="right"><?php echo $record->Grossdutypayable ; ?></td>
<td align="right"><?php echo $record->AvailableModvat ; ?></td>
<td align="right"><?php echo $record->Grossexpensesduetocustomduty ; ?></td>
<td align="right"><?php echo $record->purchaseratePerKG ; ?></td>
<td align="right"><?php echo $record->CustomDutyExpensesPerKG ; ?></td>
<td align="right"><?php echo $record->RMCIncludingCustomersPerKG ; ?></td>
<td align="right"><?php echo $record->AfterCustomSHCess ; ?></td>
<td align="right"><?php echo $record->AfterExciseDutySHCess ; ?></td>
<td align="right"><?php echo $record->QuantityKG ; ?></td>
<td align="right"><?php echo $record->TotalOrderValue; ?></td>
</tr>
<?php
$AfterLandingCharge= $AfterLandingCharge+$record->AfterLandingCharge;
$AfterHighSeasSalesCharge=$AfterHighSeasSalesCharge+$record->AfterHighSeasSalesCharge ;
$AfterCustomDuty = $AfterCustomDuty+$record->AfterCustomDuty ;
$AfterCustomEdCess = $AfterCustomEdCess+$record->AfterCustomEdCess ;
$AfterCustomSHCess = $AfterCustomSHCess+$record->AfterCustomSHCess ;
$AfterExciseDuty = $AfterExciseDuty+$record->AfterExciseDuty ;
$AfterExciseDutyEdCess = $AfterExciseDutyEdCess+$record->AfterExciseDutyEdCess ;
$AfterAddlExciseDuty = $AfterAddlExciseDuty+$record->AfterAddlExciseDuty ;
$Grossdutypayable = $Grossdutypayable+$record->Grossdutypayable ;
$AvailableModvat = $AvailableModvat+$record->AvailableModvat ;
$Grossexpensesduetocustomduty = $Grossexpensesduetocustomduty+$record->Grossexpensesduetocustomduty ;
$purchaseratePerKG = $purchaseratePerKG+$record->purchaseratePerKG ;
$CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ;
$RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ;
$AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ;
$TotalOrderValue = $TotalOrderValue+$record->TotalOrderValue;
}
}
?>
</table>
<div align="right">
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td align="center"><p>Landing Charge (Rs):5500</p></td>
<td align="center"><p>High Seas Sales charge (Rs):11000</p></td>
<td align="center"><p>Custom duty (Rs):14300</p></td>
<td align="center"><p>Custom duty- Edu.cess (Rs):14300</p></td>
<td align="right">Landing charge :</td>
<td align="right"><?php echo number_format($AfterLandingCharge,2);?></td>
<br/>
</tr>
<tr>
<td align="center"><p>Custom duty-Sec & Hig Edu cess (Rs) :7700</p></td>
<td align="center"><p>Excise duty (Rs) :2200</p></td>
<td align="center"><p>Excise duty- Edu.cess (Rs):1300 </p></td>
<td align="center"><p>Excise duty-Sec & Hig Edu cess (Rs):14300</p></td>
<td align="right">High seas sales charge:</td>
<td align="right"><?php echo number_format($AfterHighSeasSalesCharge,2);?></td>
<br/>
</tr>
<tr>
<td align="center"><p>Additional Excise duty (Rs) :7700</p></td>
<td align="center"><p>Gross duty payable (Rs) :2200</p></td>
<td align="center"><p>Available Modvat -set-off on import (Rs):1300 </p></td>
<td align="center"><p>Gross expenses due to custom duty (Rs):14300</p></td>
<td align="right">Custom duty : </td>
<td align="right"><?php echo number_format($AfterCustomDuty,2);?></td>
</tr>
<tr>
<td align="right">Excise duty :</td>
<td align="right"><?php echo number_format($AfterExciseDuty,2);?></td>
</tr>
<tr>
<td align="right">Excise duty ED_cess : </td>
<td align="right"><?php echo number_format($AfterExciseDutyEdCess,2);?></td>
</tr>
<tr>
<td align="right">Excise duty S & H cess :</td>
<td align="right"><?php echo number_format($AfterExciseDutySHCess,2);?></td>
</tr>
<tr>
<td align="right">Custom ED_cess : </td>
<td align="right"><?php echo number_format($AfterCustomEdCess,2);?></td>
</tr>
<tr>
<td align="right">Custom S & H cess :</td>
<td align="right"><?php echo number_format($AfterCustomSHCess,2);?></td>
</tr>
<tr>
<td align="right">Additional Excise duty :</td>
<td align="right"><?php echo number_format($AfterAddlExciseDuty,2);?></td>
</tr>
<tr>
<td align="right">Gross duty payable :</td>
<td align="right"><?php echo number_format($Grossdutypayable,2);?></td>
</tr>
<tr>
<td align="right">Available Modvat set-off on import :</td>
<td align="right"><?php echo number_format($AvailableModvat,2);?></td>
</tr>
<tr>
<td align="right">Gross expenses due to custom duty :</td>
<td align="right"><?php echo number_format($Grossexpensesduetocustomduty ,2);?></td>
</tr>
<tr>
<td align="right">Purchase Rate :</td>
<td align="right"><?php echo number_format($purchaseratePerKG,2);?></td>
</tr>
<tr>
<td align="right">Custom Duty Expenses :</td>
<td align="right"><?php echo number_format($CustomDutyExpensesPerKG,2);?></td>
</tr>
<tr>
<td align="right">RMC Including Customers :</td>
<td align="right"><?php echo number_format($RMCIncludingCustomersPerKG ,2);?></td>
</tr>
<tr>
<td align="right"><p><b>Total Order Amount :</b></p></td>
<td align="right"><?php echo number_format($TotalOrderValue,2);?></td>
</tr>
</table>
<br>
<br>
<div align="right">
<hr/>
<p>Sub Total (INR):13,61,800</p>
<hr/>
</div>