From 45228ee1bb2cebe58ce7112f10a7259166c7d6d1 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Thu, 3 Aug 2017 17:28:57 +0530 Subject: [PATCH] mrir revenue pdf --- application/models/purchaseorder_model.php | 3 +- application/views/mrirrevenuepopdf.php | 306 ++++++++++++++------- 2 files changed, 206 insertions(+), 103 deletions(-) mode change 100755 => 100644 application/views/mrirrevenuepopdf.php diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 49db3c19..b22a49e0 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -677,7 +677,7 @@ function purchaseorderListing($forwhat='') function GetRevenuePurchaseOrderDetailsForPDF($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName, + $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Date(ReqMast.ReqDate) as ReqDate,Mat.MaterialCode,Mat.MaterialName, Mat.UOM,Quantity,Rate,(Quantity *Rate) as BasicValue , (AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST + AfterIGST + Insurance - AfterDiscount) as Taxamount,AdvanceAmount, @@ -690,6 +690,7 @@ function purchaseorderListing($forwhat='') join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms left join T_PurchaseOrder_AdvanceRequest PurAdv on POMaster.PONO=PurAdv.PONO + join T_Requestion_Master ReqMast on LineItem.ReqNo=ReqMast.ReqNo where LineItem.PONO =?'; $query = $this->db->query($subQuery,array($PONO)); diff --git a/application/views/mrirrevenuepopdf.php b/application/views/mrirrevenuepopdf.php old mode 100755 new mode 100644 index 928bbc9f..2e8d38bb --- a/application/views/mrirrevenuepopdf.php +++ b/application/views/mrirrevenuepopdf.php @@ -15,8 +15,9 @@ $PaymentDays=''; $PayableAT=''; $DeliverySchedule=''; + $ReqDate=''; $AdvanceAmount=0.00; - $color=''; + if(!empty($CompanyDetails)) { @@ -32,14 +33,14 @@ foreach ($POItem as $PO) { - $PONO = $PO->PONO; - $postatus= $PO->Status; - $SuplierName = $PO->SupplierName; - $SuplierAddress = $PO->Address; - $DeliveryAddress = $PO->DeliveryAddress; - $postatus= $PO->Status; - $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); - $Podt = $dt->format('d-m-Y'); + $PONO = $PO->PONO; + $postatus= $PO->Status; + $SuplierName = $PO->SupplierName; + $SuplierAddress = $PO->Address; + $DeliveryAddress = $PO->DeliveryAddress; + $postatus= $PO->Status; + $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); + $Podt = $dt->format('d-m-Y'); if($PO->DeliveryOption=='1'){ $DeliveryDate = ''; $DeliverySchedule = $PO->DeliverySchedule; @@ -58,18 +59,6 @@ } } - - - - if($AdvanceAmount>0) - { - $color="green"; - } - else - { - $color="black"; - } - $currencyName='INR'; $currencyCode =''; if(!empty($CurrencySymbol)) @@ -108,7 +97,7 @@ ?> -
PURCHASE ORDER - PO NO:
+
PURCHASE ORDER - PO NO:/R
@@ -132,21 +121,24 @@ - - + +
PO DATE :DELIVERY DATE / SCHEDULE BY :PO DATE :   DELIVERY DATE / SCHEDULE BY :   
+ +
- - - - - + + + + + + - - - - + + + + +
Requistion NumberRequested ByRequested DepartmentCost Center  
Requistion NumberRequistion DateRequested ByRequested DepartmentCost Center  

 

-

 

- + +
- - - - - - - + + + + + + + + + + + +BasicValue+$record->Taxamount; + ?> + + + + + + + + + + + + + + BasicValue; + $TotalTax = $TotalTax+$record->Taxamount; + $OrderValue = $SubTotalAmount + $TotalTax; + + } + + + + } + + ?> + + +
#Item NameUOMQtyRate In INRBasic Value In INR
#Item CodeItem  NameHSN CodeUOMQtyRate In INRBasic Value In INR
001MaterialName ; ?>000666UOM ; ?>Quantity ; ?>Rate ; ?>BasicValue, 2, '.', '') ;?>
+ + +

 

+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HSN Code

Discount In INR

SGST 

CGST  

IGST

Packaging In INR  Insurance In INR    Freight In INR  Total Amount In INR 
IN%AmtIN%AmtIN%AmtIN%AmtIN%AmtIN%Amt
0006665%255%255%255%255%25 5%25150
000666 20 30 50 60 500  500010000

 

+

Payment Terms: 

+

Special Instructions:

+

-

 

- @@ -255,51 +363,79 @@ - + + - + + - - - - + + - - + + + + - + + + + -
-

Total Amount In Words


+

Total Amount In Words 


Total Amount Before Tax In INR Total Amount Before Tax In INR   
Total Tax Amount In INR Total Tax Amount In INR   
Total Amount After Tax In INR Total Amount After Tax In INR   
Advance Amout In INR -Advance Paid   
Total Amount To Pay In INR- Balance amount needs to pay   
-

Payment Terms 

+

+ if(!empty($releasedetails)){ + + $releasedOn = ''; + foreach($releasedetails as $detail){ + $releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata')); + + + ?> + + + +

 

+
 Released By : FirstName;?>
+
 Released On : format('d-m-Y');?>
+ + + +
+

Certified that the particulars given above are true and correct

@@ -312,42 +448,8 @@
-

Special Instruction:

-

- +
- if(!empty($releasedetails)){ - - $releasedOn = ''; - foreach($releasedetails as $detail){ - $releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata')); - - - ?> - - - -

 

-
Released By : FirstName;?>
-
Released On : format('d-m-Y');?>
- - - - \ No newline at end of file + +
\ No newline at end of file