import po pdf
This commit is contained in:
parent
0939a51e40
commit
ef99e3b95d
@ -1035,7 +1035,7 @@ public function importpoprint($PONO)
|
||||
$this->load->library('dompdf_gen');
|
||||
|
||||
// Convert to PDF
|
||||
$this->dompdf->set_paper(array(0, 0, 841.89, 1190.55), 'landscape');
|
||||
//$this->dompdf->set_paper(array(0, 0, 841.89, 1190.55), 'landscape');
|
||||
$this->dompdf->load_html($php);
|
||||
$this->dompdf->render();
|
||||
$data['Attachment'] = FALSE;
|
||||
|
||||
@ -554,9 +554,10 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '')
|
||||
{
|
||||
|
||||
$subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,
|
||||
Mat.UOM,Quantity,Rate,ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount ,
|
||||
Mat.UOM,Quantity,ReqMas.Requestedby,Rate,ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount ,
|
||||
ProductPrice,Tax.*,CostCenterCode , POMaster.*,sup.SupplierName,sup.Address
|
||||
FROM T_PurchaseOrder_LineItem LineItem
|
||||
join T_Requestion_Master ReqMas on ReqMas.ReqNo=LineItem.ReqNo
|
||||
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
|
||||
@ -582,6 +583,23 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '')
|
||||
}
|
||||
|
||||
|
||||
function GerRequesterName($Requester='')
|
||||
{
|
||||
$subQuery='SELECT EmpID,FirstName from T_Employee_Details where EmpID=?';
|
||||
|
||||
$query=$this->db->query($subQuery,array($Requester));
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
function GerCurrencyCodeName($Currencycode='')
|
||||
{
|
||||
$subQuery='SELECT Currency_Code,FontCode2000 from T_Currency_Details where Currency_Code=?';
|
||||
$query=$this->db->query($subQuery,array($Currencycode));
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
function GetPOStatus($Status='')
|
||||
{
|
||||
$subQuery='SELECT StatusName from T_Status where StatusCode=?';
|
||||
|
||||
@ -40,13 +40,36 @@
|
||||
$DeliveryDate = $dtDe->format('d-m-Y');
|
||||
$ServiceDescription =$PO->ServiceDescription;
|
||||
$CostCenterCode=$PO->CostCenterCode;
|
||||
$ReqBy=$PO->Requestedby;
|
||||
//$ReqBy=$PO->Requestedby;
|
||||
$PaymentTerms=$PO->PaymentTerms;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!empty($Requestername))
|
||||
|
||||
{
|
||||
foreach ($Requestername as $Reqname)
|
||||
{
|
||||
$ReqBy=$Reqname->FirstName;
|
||||
}
|
||||
}
|
||||
|
||||
$CurrencyCode='';
|
||||
$CurrencyName='';
|
||||
|
||||
if(!empty($Currencytype))
|
||||
{
|
||||
foreach ($Currencytype as $CURRE)
|
||||
{
|
||||
$CurrencyCode=$CURRE->Currency_Code;
|
||||
$CurrencyName=$CURRE->FontCode2000;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<style>
|
||||
@page { margin: 310px 50px 30px 50px; }
|
||||
@ -93,9 +116,9 @@
|
||||
<th>#</th>
|
||||
<th>Item and Description</th>
|
||||
<th>Qty</th>
|
||||
<th>Rate per unit</th>
|
||||
<th>Basic Price</th>
|
||||
<th>Total Amount</th>
|
||||
<th>Rate per unit in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
||||
<th>Basic Price in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
||||
<th>Total Amount in <?php echo "$CurrencyCode ($CurrencyName)"?></th>
|
||||
<!--<th>Landing Charge</th>
|
||||
<th>High Seas Sales charge</th>
|
||||
<th>Custom duty (A) </th>
|
||||
@ -155,7 +178,7 @@
|
||||
<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->TotalOrderValue; ?></td>
|
||||
<td align="right"><?php echo $record->BasicPriceInMTon; ?></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>
|
||||
@ -193,7 +216,7 @@
|
||||
$CustomDutyExpensesPerKG = $CustomDutyExpensesPerKG+$record->CustomDutyExpensesPerKG ;
|
||||
$RMCIncludingCustomersPerKG = $RMCIncludingCustomersPerKG+$record->RMCIncludingCustomersPerKG ;
|
||||
$AfterExciseDutySHCess= $AfterExciseDutySHCess+$record->AfterExciseDutySHCess ;
|
||||
$TotalOrderValue = $TotalOrderValue+$record->TotalOrderValue;
|
||||
$TotalOrderValue = $TotalOrderValue+$record->BasicPriceInMTon;
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,7 +305,7 @@
|
||||
|
||||
--><tr>
|
||||
<td align="right"><p><b>Total Order Amount </b></p></td>
|
||||
<td align="right"><?php echo number_format($TotalOrderValue,2);?></td>
|
||||
<td align="right"><?php echo "$CurrencyCode ($CurrencyName)" number_format($TotalOrderValue,2);?></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user