diff --git a/application/models/mrir_model.php b/application/models/mrir_model.php index 9925c583..b143c0b0 100755 --- a/application/models/mrir_model.php +++ b/application/models/mrir_model.php @@ -95,23 +95,24 @@ function ViewDistributionList() function view_mrir_Billing() { $this->db->distinct(); - $this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,IGRM.DeliveryChellanOrInvoiceNo,IGRM.DeliveryChellanDate,IGRM.VehicleNo,IGRM.CourierNo,TMD.StoreInchargeID,TMD.QualityInchargeID,TMD.PlantInchargeID,TMD.UpdateBY,POM.PODate,POM.POType,POM.ReleasedBy,ED.FirstName as UpdatedbyName,ED1.FirstName as ReleasedbyName,MM.MaterialCode,MM.MaterialName,MM.UOM,POL.Quantity,IGRD.QuantityAsPerInvoice,TMD.ActualQuantityReceived,TMD.QuantityAccepted,TMD.QuantityRejected,ST.StatusName,TMD.Remarks'); + $this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,IGRM.DeliveryChellanOrInvoiceNo,IGRM.DeliveryChellanDate,IGRM.VehicleNo,IGRM.CourierNo,TMD.StoreInchargeID,TMD.QualityInchargeID,TMD.PlantInchargeID,TMD.UpdateBY,POM.PODate,POM.POType,POM.ReleasedBy,ED.FirstName as UpdatedbyName,ED1.FirstName as ReleasedbyName,MM.MaterialCode,MM.MaterialName,MM.UOM,POL.Quantity,IGRD.QuantityAsPerInvoice,TMD.ActualQuantityReceived,TMD.QuantityAccepted,TMD.QuantityRejected,ST.StatusName,TMD.Remarks,AdvanceAmount'); $this->db->from ('T_MRIR_Master TMM'); $this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO=TMD.MRIRNO'); $this->db->join ('T_IGR_Master IGRM','TMM.IGRNO=IGRM.IGRNO'); $this->db->join ('T_IGR_Details IGRD','IGRM.IGRNO=IGRD.IGRNO'); $this->db->join ('T_PurchaseOrder_Master POM','POM.PONO=IGRM.PONO'); - $this->db->join ('T_PurchaseOrder_LineItem POL','POL.PONO=POM.PONO'); + $this->db->join ('T_PurchaseOrder_LineItem POL','POL.PONO=POM.PONO'); + $this->db->join('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left'); $this->db->join ('tbl_users user','user.userid=TMD.UpdateBY'); $this->db->join ('T_Employee_Details ED','ED.EmpID = user.EmpID'); $this->db->join ('tbl_users user1','user1.userid = POM.ReleasedBy'); $this->db->join ('T_Employee_Details ED1','ED1.EmpID = user1.EmpID'); - $this->db->join ('T_MaterialMaster MM','MM.MaterialCode = IGRD.MaterialCode and POL.MaterialCode = MM.MaterialCode'); - $this->db->join ('T_Status ST','ST.StatusCode = TMD.MRIRStatus'); - $this->db->where('TMM.MRIRStatus',MRIR_APPROVED); + $this->db->join ('T_MaterialMaster MM','MM.MaterialCode = IGRD.MaterialCode and POL.MaterialCode = MM.MaterialCode'); + $this->db->join ('T_Status ST','ST.StatusCode = TMD.MRIRStatus'); + $this->db->where('TMM.MRIRStatus',MRIR_APPROVED); $this->db->order_by('TMM.MRIRNO','asc'); $query = $this->db->get(); - // print_r($this->db->last_query()); + //print_r($this->db->last_query()); return $query->result(); } diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 8ff6d3f2..5830d2e0 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -43,10 +43,11 @@ class purchaseorder_model extends CI_Model function GetServicePOListforBilling() { $subQuery ='select POMast.PONO,supp.SupplierName,PODate,POMast.PaymentTerms,POMast.ServiceWorkStatusRemarks, - LineItem.*,mat.MaterialName,mat.UOM,emp.FirstName,emp.LastName,Tax.TotalValue,Cost.CostCenterName + LineItem.*,mat.MaterialName,mat.UOM,emp.FirstName,emp.LastName,Tax.TotalValue,Cost.CostCenterName,AdvanceAmount ,Dept.DepartmentName from T_PurchaseOrder_Master POMast join T_PurchaseOrder_LineItem LineItem on LineItem.PONO = POMast.PONO join T_Service_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo + left join T_PurchaseOrder_AdvanceRequest PUADV on POMast.PONO=PUADV.PONO join T_SupplierDetailsN supp on supp.SupplierID = POMast.SupplierID join T_MaterialMaster mat on mat.MaterialCode = LineItem.MaterialCode join T_Status Stat on Stat.StatusCode = POMast.Status diff --git a/application/views/mrircapitalpopdf.php b/application/views/mrircapitalpopdf.php new file mode 100755 index 00000000..f113b7b1 --- /dev/null +++ b/application/views/mrircapitalpopdf.php @@ -0,0 +1,356 @@ +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; + $Import_DispatchDetails=''; + } + else + { + $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); + $DeliveryDate = $dtDe->format('d-m-Y'); + $DeliverySchedule = ''; + $Import_DispatchDetails=$PO->Import_DispatchDetails; + } + + + $ServiceDescription =$PO->ServiceDescription; + $PaymentTerms = $PO->PaymentTerms; + $Placeoforigin=$PO->Import_PlaceofOrgin; + $ExchangeRate = $PO->ExchangeRate; + $CapitalRange = $PO->CapitalRange; + $AdvanceAmount=$PO->AdvanceAmount; + } +} + + + + if($AdvanceAmount>0) + { + $color="green"; + } + else + { + $color="black"; + } + + + + $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 :DISPATCH / SCHEDULE BY :PLACE OF ORIGIN:EXCHANGE RATE:
PO DATE :DELIVERY DATE/ SCHEDULE BY :
+ + + +

 

+ + + + + + + + + + + + + + + + + + +
Requistion NumberRequested ByRequested DepartmentCost Center  
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + +Quantity*$record->Rate; + ?> + + + + + + + + + + + + + + + +
#Item CodeItem NameQtyUOM

+ + +
Rate Per Unit in Rate Per Unit in Total Amount in Total Amount in
MaterialCode ; ?>MaterialName ; ?>Quantity ; ?>UOM ; ?>Rate),2, '.', '') ; ?>Quantity * $record->Rate),2, '.', '');?>
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Total Amount In Words

+ + Total Order Amount in Total Order Amount in
Advance Anount Paid:
Total Amount To Be Paid:
+

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');?>
+ + + + diff --git a/application/views/mririmportpopdf.php b/application/views/mririmportpopdf.php index aa382585..362e212a 100644 --- a/application/views/mririmportpopdf.php +++ b/application/views/mririmportpopdf.php @@ -137,7 +137,7 @@ ?>
 
-
PURCHASE ORDER - PO NO:
+
PURCHASE ORDER - PO NO:
@@ -279,12 +279,27 @@

 

- - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/application/views/mrirrevenuepopdf.php b/application/views/mrirrevenuepopdf.php index fa1beb82..928bbc9f 100755 --- a/application/views/mrirrevenuepopdf.php +++ b/application/views/mrirrevenuepopdf.php @@ -108,7 +108,7 @@ ?> -
PURCHASE ORDER - PO NO:
+
PURCHASE ORDER - PO NO:
Total Amount In Words

Total Amount In Advance Amount : Amount to Pay:
Total Amount In Words

Total Amount In
Advance Amount :
Amount to Pay:
@@ -253,7 +253,7 @@ - - - - + + + + + + + + + + + diff --git a/application/views/mrirservicepopdf.php b/application/views/mrirservicepopdf.php index b8789ff0..a6a2982a 100755 --- a/application/views/mrirservicepopdf.php +++ b/application/views/mrirservicepopdf.php @@ -110,7 +110,7 @@ ?> -
PURCHASE ORDER - PO NO:
+
PURCHASE ORDER - PO NO:
+

Total Amount In Words


@@ -273,12 +273,20 @@
Total Amount After Tax In INR Advance Amout In INR -Total Amount To Pay In INR- Total Amount After Tax In INR
Advance Amout In INR -
Total Amount To Pay In INR-
@@ -302,7 +302,7 @@ - + - - + + + + + + + + + + diff --git a/application/views/serviceporeport.php b/application/views/serviceporeport.php index 4e3e57e1..0bb1f532 100755 --- a/application/views/serviceporeport.php +++ b/application/views/serviceporeport.php @@ -1,9 +1,22 @@ + + + + +
@@ -14,6 +27,8 @@

Service Purchase Order Report

+The PONO Shown In Green Colour Are Paid Advance Amount +
+ @@ -342,13 +342,21 @@ -Total Amount After Tax In INR - Total Amount After Tax In INR - Advance Amout In INR -Total Amount In INR-
Advance Amout In INR -
Total Amount In INR-
@@ -47,13 +62,25 @@ foreach($Billing as $record) { $SNo =$SNo + 1; + + $Adv=$record->AdvanceAmount; + if($Adv>0) + { + $color="green"; + } + else + { + $color="baby blue"; + } //print_r($MRIRDetails); ?> - + + + diff --git a/application/views/viewmrirforbilling.php b/application/views/viewmrirforbilling.php index 6c84fc40..65978ba0 100755 --- a/application/views/viewmrirforbilling.php +++ b/application/views/viewmrirforbilling.php @@ -1,5 +1,10 @@ + +
@@ -18,6 +27,8 @@

Siddharth Industries - Billing For MRIR

+ + The PONO Shown In Green Colour Are Paid Advance Amount
@@ -27,16 +38,18 @@
+ + - + - + - + @@ -52,6 +65,15 @@ foreach($Billing as $d) { $Index= $Index+1; + $Adv=$d->AdvanceAmount; + if($Adv>0) + { + $color="green"; + } + else + { + $color="baby blue"; + } ?> @@ -59,11 +81,11 @@ - + - +
PONO?>PONO?> SupplierName?> MaterialCode?> MaterialName?>
IGR NOMRIR NOPONOPO TypePO Type Material Code Material Name UOMOrdered QtyOrdered Qty Received Quantity Accepted QuantityRejected QuantityRejected Quantity Status of MRIR Remarks Quality Incharge
IGRNO ?> MRIRNO ?> PONO ?> PONO ?> POType ?> MaterialCode ?> MaterialName ?>