diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index e11c7b9a..7d808241 100644 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -170,7 +170,7 @@ class purchaseorder_model extends CI_Model function getRequistDetails($ReqNoList='') { $this->db->distinct(); - $this->db->select('ReqNo,ReqType,Status,Requestedby,mast.CreatedDate,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,mast.ReqDate'); + $this->db->select('ReqNo,ReqType,Status,Requestedby,mast.CreatedDate,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,mast.ReqDate,mast.CostCenterCode'); $this->db->from('T_Requestion_Master mast'); $this->db->join('T_Employee_Details emp', 'mast.Requestedby = emp.EmpID'); $this->db->join('T_DepartmentDetails Dept', 'emp.Departmentcode = Dept.DEPCode'); @@ -187,7 +187,7 @@ class purchaseorder_model extends CI_Model function getRequistDetailsForPO($ReqNoList='') { $this->db->distinct(); - $this->db->select('ReqNo,ReqType,Status,Requestedby,mast.CreatedDate,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,mast.ReqDate'); + $this->db->select('ReqNo,ReqType,Status,Requestedby,mast.CreatedDate,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,mast.ReqDate,mast.CostCenterCode'); $this->db->from('T_Requestion_Master mast'); $this->db->join('T_Employee_Details emp', 'mast.Requestedby = emp.EmpID'); $this->db->join('T_DepartmentDetails Dept', 'emp.Departmentcode = Dept.DEPCode'); @@ -474,7 +474,7 @@ class purchaseorder_model extends CI_Model function GetRevenuePurchaseOrderDetails($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST + AfterGST + AfterOtherTaxes + Insurance) - AfterDiscount ),2)as Taxamount ,TotalValue,Tax.*,CostCenterCode,Dept.DepartmentName + $subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST + AfterGST + AfterOtherTaxes + Insurance) - AfterDiscount ),2)as Taxamount ,TotalValue,Tax.*,Req.CostCenterCode,Dept.DepartmentName FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo