diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 4f1cef6c..3492014a 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1012,7 +1012,7 @@ public function mrirrevenuepoprint($PONO) //$this->load->view('includes/pdfheader'); // Load the pdf page with multiviews - $this->load->View("revenuepopdf", $data); + $this->load->View("mrirrevenuepopdf", $data); // Add header to pdf //$this->load->view('includes/pdffooter'); @@ -1031,7 +1031,6 @@ public function mrirrevenuepoprint($PONO) } - public function servicepoprint($PONO) { @@ -1121,7 +1120,7 @@ public function mrirservicepoprint($PONO) $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); - $this->load->View("servicepopdf", $data); + $this->load->View("mrirservicepopdf", $data); // Add header to pdf //$this->load->view('includes/pdffooter'); @@ -1267,7 +1266,7 @@ public function mririmportpoprint($PONO) $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); $data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetailsForPDF($PONO); $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - //print_r( $data['releasedetails']); + //print_r( $data['POItem']); foreach ($data['POItem'] as $Reqdby) { $Requester=$Reqdby->Requestedby; @@ -1363,11 +1362,10 @@ public function mririmportpoprint($PONO) $this->dompdf->load_html($php); $this->dompdf->render(); $data['Attachment'] = FALSE; - ///$this->dompdf->stream("ImportPOReport.pdf",$data,$php); + $this->dompdf->stream("ImportPOReport.pdf",$data,$php); } - /** * This function used to load the Delete the Requistion Items */ diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 6256f6e4..e686b661 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -603,7 +603,7 @@ function purchaseorderListing($forwhat='') $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName,Mat.UOM, LineItem.Quantity,LineItem.Rate,(LineItem.Quantity *LineItem.Rate) as BasicValue ,(After_CGST + After_SGST + After_IGST) as Taxamount - ,TotalValue,After_CGST,After_SGST,After_IGST,otherallowance,LineItem.CostCenterCode,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription,ReqMat.NumberOfService,ReqMat.Service_Period,ReqMat.Schedule_Type,Payment.PaymentID,Payment.PaymentTerms FROM + ,TotalValue,After_CGST,After_SGST,After_IGST,otherallowance,LineItem.CostCenterCode,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription,ReqMat.NumberOfService,ReqMat.Service_Period,ReqMat.Schedule_Type,Payment.PaymentID,Payment.PaymentTerms,AdvanceAmount FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_Service_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo @@ -611,6 +611,7 @@ function purchaseorderListing($forwhat='') join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID join T_Requestion_Master ReqMat on ReqMat.ReqNo = LineItem.ReqNo join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms + left join T_PurchaseOrder_AdvanceRequest PurAdv on POMaster.PONO=PurAdv.PONO where LineItem.PONO =?'; $query = $this->db->query($subQuery,array($PONO)); @@ -673,7 +674,7 @@ function purchaseorderListing($forwhat='') $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName, Mat.UOM,Quantity,Rate,(Quantity *Rate) as BasicValue , (AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST + - AfterIGST + Insurance - AfterDiscount) as Taxamount, + AfterIGST + Insurance - AfterDiscount) as Taxamount,AdvanceAmount, TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentID,Payment.PaymentTerms FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode @@ -681,7 +682,8 @@ function purchaseorderListing($forwhat='') join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID - join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms + join T_PaymentTerms Payment on Payment.PaymentID = POMaster.PaymentTerms + left join T_PurchaseOrder_AdvanceRequest PurAdv on POMaster.PONO=PurAdv.PONO where LineItem.PONO =?'; $query = $this->db->query($subQuery,array($PONO)); @@ -730,7 +732,7 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '') $subQuery='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName,Import_DispatchDetails, Mat.UOM,Quantity,ReqMas.Requestedby,Rate,ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount , -ProductPrice,Tax.*,LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.Address,LineItem.AmendedDetails as LineAmend +ProductPrice,Tax.*,LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.Address,LineItem.AmendedDetails as LineAmend,AdvanceAmount FROM T_PurchaseOrder_LineItem LineItem join T_Requestion_Master ReqMas on ReqMas.ReqNo=LineItem.ReqNo join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode diff --git a/application/views/mririmportpopdf.php b/application/views/mririmportpopdf.php old mode 100755 new mode 100644 index 680b3536..5ec01b4b --- a/application/views/mririmportpopdf.php +++ b/application/views/mririmportpopdf.php @@ -18,7 +18,7 @@ $PayableAT=''; $Placeoforigin=''; $Import_DispatchDetails=''; - $AdvanceAmount=''; + $AdvanceAmount=0.00; $index=0; @@ -60,6 +60,7 @@ // $PaymentDays=$PO->PaymentDays; // $PayableAT=$PO->PayableAT; $DeliverySchedule=$PO->DeliverySchedule; + } } @@ -271,7 +272,8 @@ Total Amount In Words

Total Amount In - Advance Amount : + Advance Amount : + Amount to Pay: @@ -279,7 +281,7 @@

Payment Terms

- +

Certified that the particulars given above are true and correct

 

diff --git a/application/views/mrirrevenuepopdf.php b/application/views/mrirrevenuepopdf.php new file mode 100755 index 00000000..491c11ea --- /dev/null +++ b/application/views/mrirrevenuepopdf.php @@ -0,0 +1,331 @@ +CompanyName; + $CompanyAddress = $CO->Address; + + } + } + if(!empty($POItem)) + { + + 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'); + if($PO->DeliveryOption=='1'){ + $DeliveryDate = ''; + $DeliverySchedule = $PO->DeliverySchedule; + } + else{ + $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); + $DeliveryDate = $dtDe->format('d-m-Y'); + $DeliverySchedule = ''; + } + + + $ServiceDescription =$PO->ServiceDescription; + $PaymentTerms = $PO->PaymentTerms; + $AdvanceAmount=$PO->AdvanceAmount; + + + } +} + $currencyName='INR'; + $currencyCode =''; + if(!empty($CurrencySymbol)) + { + foreach ($CurrencySymbol as $Curr) + { + + $currencyCode = $Curr->FontCode2000; + //$currencyName = $currencyName; + + + } + + } + + + ?> + + +
+
+ DRAFT
'; + + } + + ?> +
+ +
PURCHASE ORDER - PO NO:
+ + + + + + + + + + + + + + + + + + +
+

+

+
+

Vendor Address :

+


+
+

Delivery To :

+

+
PO DATE :DELIVERY DATE / SCHEDULE BY :
+ + + + + + + + + + + + + + + + + + + + +
Requistion NumberRequested ByRequested DepartmentCost Center  
+

 

+

 

+ + + + + + + + + + + + + + + + + + +BasicValue+$record->Taxamount; + ?> + + + + + + + + + + + + + + + + + + + + + BasicValue; + $TotalTax = $TotalTax+$record->Taxamount; + $OrderValue = $SubTotalAmount + $TotalTax; + + } + + + + } + + ?> + + +
#Item NameUOMQtyRate In INRBasic Value In INRDiscount In INRSGST In INRCGST In INRIGST In INRPackaging In INRInsurance In INRFreight In INRTotal Amount In INR
MaterialName ; ?>UOM ; ?>Quantity ; ?>Rate ; ?>BasicValue;?>AfterDiscount;?>AfterSGST ; ?>AfterCGST ; ?>AfterIGST ; ?>AfterPackagingValue;?>AfterFreightValue;?>Insurance;?>
+

 

+ + + + + +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

Total Amount In Words


+ +

+ +
Total Amount Before Tax In INR
Total Tax Amount In INR
Total Amount After Tax In INR Advance Amout In INR -Total Amount To Pay In INR-
+ +

Payment Terms 

+ +

+ +
+ +

Certified that the particulars given above are true and correct

+ +

+ +

 

+ +

Authorized Signatory

+
+

Special Instruction:

+

+ReleasedOn, new DateTimeZone('Asia/Kolkata')); + + + ?> + + + +

 

+
Released By : FirstName;?>
+
Released On : format('d-m-Y');?>
+ + + + \ No newline at end of file diff --git a/application/views/mrirservicepopdf.php b/application/views/mrirservicepopdf.php new file mode 100755 index 00000000..f07726b2 --- /dev/null +++ b/application/views/mrirservicepopdf.php @@ -0,0 +1,436 @@ +CompanyName; + $CompanyAddress = $CO->Address; + + } + } + + $currencyName='INR'; + $currencyCode =''; + if(!empty($CurrencySymbol)) + { + foreach ($CurrencySymbol as $Curr) + { + + $currencyCode = $Curr->FontCode2000; + //$currencyName = $currencyName; + + + } + + } + + + + + if(!empty($POItem)) + { + + foreach ($POItem as $PO) + { + + $PONO = $PO->PONO; + $postatus= $PO->Status; + $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; + $PaymentTerms = $PO->PaymentTerms; + $AdvanceAmount=$PO->AdvanceAmount; + + + } +} + + + ?> + + + + +
+
+ DRAFT
'; + + } + + ?> +
+ +
PURCHASE ORDER - PO NO:
+ + + + + + + + + + + + + + + + + + +
+

+

+
+

Vendor Address :

+


+
+

Delivery To :

+

+
PO DATE :DELIVERY DATE / SCHEDULE BY :
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Requistion NumberRequested ByRequested DepartmentCost Center  
+ +

 

+ +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + After_SGST; + $Cgst =$Cgst + $record->After_CGST; + $Igst = $Igst + $record->After_IGST; + + + } + + $TotalTax =$TotalTax+ $Sgst + $Cgst+$Igst; + $OrderValue = $OrderValue + $SubTotalAmount + $TotalTax; + } + + ?> + + + +
#Item NameService DescriptionUOMQtyRate In INRBasic Value In INRCGST In INRSGST In INRIGST In INROther Allow In INRTotal Amount In INR
MaterialName ; ?>ServiceMaterialDescription ; ?>UOM ; ?>Quantity ; ?>Rate ; ?>NumberOfService==0 || $record->NumberOfService==''){ + echo $record->BasicValue; + $TotalAmount = $record->BasicValue + $record->Taxamount + $record->otherallowance; + $SubTotalAmount = $SubTotalAmount + $record->BasicValue + $record->otherallowance; + } + else{ + echo $record->BasicValue * $record->NumberOfService; + $TotalAmount = $record->BasicValue * $record->NumberOfService + $record->Taxamount + $record->otherallowance; + $SubTotalAmount = $SubTotalAmount + $record->BasicValue * $record->NumberOfService + $record->otherallowance; + } + ?>After_SGST ; ?>After_CGST ; ?>After_IGST ; ?>otherallowance ; ?>
+ +

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +

Total Amount In Words


+ + + +

+ + + +
Total Amount Before Tax In INR -
Total Tax Amount In INR -
Total Amount After Tax In INR - Advance Amout In INR -Total Amount In INR-
+ + + +

Payment Terms 

+ + + + +

+ + + +
+ + + +

Certified that the particulars given above are true and correct

+ + + +

+ + + +

 

+ + + +

Authorized Signatory

+ +
+ +

Scope Of Work:

+ +

+ + ReleasedOn, new DateTimeZone('Asia/Kolkata')); + + + ?> + + + +

 

+
Released By : FirstName;?>
+
Released On : format('d-m-Y');?>
+ + + + + + + \ No newline at end of file diff --git a/application/views/viewmrirforbilling.php b/application/views/viewmrirforbilling.php index 530f3efb..6c84fc40 100755 --- a/application/views/viewmrirforbilling.php +++ b/application/views/viewmrirforbilling.php @@ -12,12 +12,13 @@
-
-

-
Siddharth Industries - Billing For MRIR
-

-
+

+
+
+

Siddharth Industries - Billing For MRIR

+
+
@@ -62,17 +63,17 @@ - PONO ?> - POType ?> - MaterialCode ?> - MaterialName ?> - UOM ?> - Quantity ?> - QuantityAsPerInvoice ?> - QuantityAccepted ?> - QuantityRejected ?> - StatusName ?> - Remarks ?> + PONO ?> + POType ?> + MaterialCode ?> + MaterialName ?> + UOM ?> + Quantity ?> + QuantityAsPerInvoice ?> + QuantityAccepted ?> + QuantityRejected ?> + StatusName ?> + Remarks ?> QualityInchargeID ?> StoreInchargeID ?> @@ -83,7 +84,7 @@
-
--> +
-
- + + +