diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index d206b163..30387810 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -607,9 +607,9 @@ function purchaseorderListing($forwhat='') function GetServicePurchaseOrderDetailsForPrint($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName,Mat.UOM, + $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Mat.HSNCODE, 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,AdvanceAmount FROM + ,TotalValue,CGST,SGST,IGST,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,POMaster.PaymentOtherDescription,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 @@ -1391,7 +1391,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode //get pdf po requistion details - function GetPdfRequistionDetails($PONO){ + function GetPdfRequistionDetails($PONO){ $this->db->select('LineItem.ReqNo'); $this->db->from('T_PurchaseOrder_LineItem LineItem'); $this->db->where('LineItem.PONO',$PONO); @@ -1405,7 +1405,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode } else{ $ReqNo = $res->ReqNo; - $this->db->select('ReqMast.ReqNo,ReqMast.CostCenterCode,re.FirstName,Dept.DEPCode,Dept.DepartmentName'); + $this->db->select('ReqMast.ReqNo,ReqMast.CostCenterCode,ReqMast.ReqDate,ReqMast.Schedule_Type,ReqMast.NumberOfService,ReqMast.Service_Period,re.FirstName,Dept.DEPCode,Dept.DepartmentName'); $this->db->from('T_Requestion_Master ReqMast'); $this->db->join('T_Employee_Details re','re.EmpID=ReqMast.Requestedby'); $this->db->join('T_DepartmentDetails Dept', 're.Departmentcode = Dept.DEPCode'); @@ -1415,6 +1415,18 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode $Details['RequestedName']= $Reqresult->result()[0]->FirstName; $Details['RequestedDept']= $Reqresult->result()[0]->DepartmentName; $Details['CostCenterCode']= $Reqresult->result()[0]->CostCenterCode; + $date = new DateTime($Reqresult->result()[0]->ReqDate,new DateTimeZone('Asia/Kolkata')); + $retDate = $date->format('d-m-Y'); + $Details['ReqDate']= $retDate; + $ScheduleType = $Reqresult->result()[0]->Schedule_Type; + if($ScheduleType!='Recurring'){ + $Details['Frequency']= $Reqresult->result()[0]->Schedule_Type; + + } + else{ + $Details['Frequency']= $Reqresult->result()[0]->Service_Period.' - '.$Reqresult->result()[0]->NumberOfService; + } + $ResultArray[]=$Details; } @@ -1423,7 +1435,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode $RequistionDetails = $ResultArray; return $RequistionDetails; } - function GetLineItemReceivedQty($ParentPO,$MaterialCode) + function GetLineItemReceivedQty($ParentPO,$MaterialCode) { $this->db->select('ReceivedQuantity'); $this->db->from('T_PurchaseOrder_LineItem'); diff --git a/application/views/servicepopdf.php b/application/views/servicepopdf.php index dbbb3d99..157b59f8 100755 --- a/application/views/servicepopdf.php +++ b/application/views/servicepopdf.php @@ -67,7 +67,12 @@ $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); $DeliveryDate = $dtDe->format('d-m-Y'); $ServiceDescription =$PO->ServiceDescription; + if($PO->PaymentID!='PT08'){ $PaymentTerms = $PO->PaymentTerms; + } + else{ + $PaymentTerms = $PO->PaymentTerms . ' ( '.$PO->PaymentOtherDescription.' ) '; + } } @@ -85,10 +90,10 @@
|
- - - |
-||
|
- Vendor Address : - |
-
- Delivery To : - - |
-|
| PO DATE : | -DELIVERY DATE / SCHEDULE BY : | -|
|
+ + + |
+ ||
|
+ Vendor Address : + |
+
+ Delivery To : + + |
+ |
| PO DATE : | +DELIVERY DATE / SCHEDULE BY : | +|
| Requistion Number | +Requistion Number | +Frequency | +Requistion Date | -Requested By | +Requested By | -Requested Department | +Requested Department | -Cost Center Code | +Cost Center Code | -
| - | - | - | - |
- - -
| # | - -Item Code | - -Service Description | - -UOM | - -Qty | - -Rate In INR | - -Basic Value In INR | - -CGST In INR | - -SGST In INR | - -IGST In INR | - -Other Allow In INR | - -Total Amount In INR | - -
| - | MaterialCode ; ?> | -ServiceMaterialDescription ; ?> | -UOM ; ?> | -Quantity ; ?> | - -Rate, 2, '.', ''); ?> | -NumberOfService==0 || $record->NumberOfService==''){ - echo number_format($record->BasicValue, 2, '.', ''); - $TotalAmount = $record->BasicValue + $record->Taxamount + $record->otherallowance; - $SubTotalAmount = $SubTotalAmount + $record->BasicValue + $record->otherallowance; - } - else{ - echo number_format($record->BasicValue * $record->NumberOfService, 2, '.', ''); - $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 - | - - - -|
|
-
-
-
- Payment Terms - - - - - - - - - |
-
-
-
-
-
-
-
- Certified that the particulars given above are true and correct - - - -- - - - - - - - Authorized Signatory - - |
-
-
Scope Of Work:
- - - - + + + ++ +
| HSN |
+ CGST |
+ SGST |
+ IGST |
+ Tax Amt In INR |
+ Other Allow In INR |
+ Total Amount In INR | + +|||
| IN% | +Amt | +IN% | +Amt | +IN% | +Amt | +||||
| HSNCODE ; ?> | +CGST ; ?> | +After_CGST, 2, '.', ''); ?> | +SGST ; ?> | +After_SGST, 2, '.', ''); ?> | +IGST ; ?> | +After_IGST, 2, '.', ''); ?> | +Taxamount, 2, '.', ''); ?> | +otherallowance, 2, '.', ''); ?> | +NumberOfService==0 || $record->NumberOfService==''){
+ echo number_format($record->BasicValue + $record1->Taxamount + $record1->otherallowance, 2, '.', '');
+
+ }
+ else{
+ echo number_format($record->BasicValue * $record->NumberOfService + $record1->Taxamount + $record1->otherallowance, 2, '.', '');
- $releasedOn = '';
- foreach($releasedetails as $detail){
- $releasedOn= new DateTime($detail->ReleasedOn, new DateTimeZone('Asia/Kolkata'));
-
-
- ?>
-
-
-
- - - Released By : FirstName;?>
- Released On : format('d-m-Y');?>
- |
+
- + +
Payment Terms:
+ + +Scope Of Work As Per Annexure:
+ + + + + + + +|
+
+
+
+ Total Amount In Words + + + + |
+
+
+
+ Total Amount Before Tax In INR | + ++ + |
| Total Tax Amount In INR | ++ + + | |
| Total Amount After Tax In INR | + ++ + | |
|
+ + ReleasedOn, new DateTimeZone('Asia/Kolkata')); + + + ?> + + Released By : FirstName;?>
+ Released On : format('d-m-Y');?>
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ Certified that the particulars given above are true and correct + + + ++ + + + + + + + Authorized Signatory + + |
+
+ |