diff --git a/application/config/routes.php b/application/config/routes.php index cf9d9df0..9b186471 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -244,6 +244,12 @@ $route['Report_cumulative_raw'] = "report/rawi_cumulative"; $route['Report_consolidate_category'] = "report/rawi_consolidate"; $route['Report_pending_purchase'] = "report/pending_purchase"; +$route['Report_Material_inward_Register'] ="user/getMaterialInwardRegister"; + + + + + $route['Empperform']="report/per"; // Company Information @@ -271,5 +277,21 @@ $route['addNewdepartment'] = "department/addNewdepartment"; $route['editOlddepartment'] = "department/viewdepartment"; $route['editOlddepartment/(:num)'] = "department/viewdepartment/$1"; $route['editdepartment'] = "department/editdepartment"; + + + + + + + + + + + + + + /* End of file routes.php */ -/* Location: ./application/config/routes.php */ \ No newline at end of file +/* Location: ./application/config/routes.php */ + + diff --git a/application/controllers/user.php b/application/controllers/user.php index 4a06c932..b52b30ce 100755 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -1309,6 +1309,45 @@ function Adduserdepartment() $this->loadViews("404", $this->global, NULL, NULL); } + + + + + + + +/////////////* this function used to Material Inward Register report controller parts*////////////////////// + + + + + function getMaterialInwardRegister() + { + + $ab=$this->input->post('financialyear'); + $fa=substr($ab,0,-5); + $aa=substr($ab,5,5); + $m=$this->input->post('month'); + + + $data['getMaterialInwardRegister']=$this->user_model->getMaterialInwardRegister($fa,$aa,$m); + + $data['finyear']=$this->user_model->finyear(); + + $this->global['pageTitle'] = 'Resico : MaterialInwardRegister'; + + $this->loadViews("Report_Material_inward_Register", $this->global,$data,NULL); + } + + + + + + + + + + } ?> \ No newline at end of file diff --git a/application/models/requistion_model.php b/application/models/requistion_model.php index ebeb8029..219d9da0 100644 --- a/application/models/requistion_model.php +++ b/application/models/requistion_model.php @@ -176,7 +176,7 @@ ifnull(Po.Quantity,0) as POQTY,sta.StatusName { $this->db->select('MaterialCode, MaterialName,UOM'); $this->db->from('T_MaterialMaster'); - //$this->db->where('MaterialType',$ReqType ); + $this->db->where('IsActive',1); $query = $this->db->get(); if($NotArray == '') diff --git a/application/models/user_model.php b/application/models/user_model.php index 6bd3b275..9dbc246d 100644 --- a/application/models/user_model.php +++ b/application/models/user_model.php @@ -212,6 +212,87 @@ class User_model extends CI_Model $query = $this->db->get(); return $query->result(); } + + + + +/* this function used to Material Inward Register report Model parts*/ + +function getMaterialInwardRegister($fa,$aa,$m) +{ + +$sql="select poli.Quantity,poli.ReceivedQuantity,poli.AmendmentQuantity,poli.Per, +igrm.DeliveryChellanOrInvoiceNo,igrm.DeliveryChellanDate,igrm.VehicleNo,igrm.IGRStatus,igrm.CreatedDate,mm.MaterialCode, +mm.MaterialName,sd.SupplierID,sd.SupplierName,sd.Address + +from T_PurchaseOrder_LineItem as poli +join T_PurchaseOrder_Master as pom on pom.PONO =poli.PONO +join T_IGR_Master as igrm on igrm.PONO = poli.PONO +join T_IGR_Details as igrd on igrd.IGRNO = igrm.IGRNO +join T_MaterialMaster as mm on mm.MaterialCode = poli.MaterialCode +join T_SupplierDetailsN as sd on sd.SupplierID =pom.SupplierID + +where igrm.IGRStatus ='ST027'"; + + + + + + if ($fa and $aa != ''){ + + $sql.=" and (igrm.CreatedDate >= '".$fa."-04-01' and igrm.CreatedDate <= '".$aa."-03-31')"; + + } + if ($m!= ''){ + + $sql.="and monthname(igrm.CreatedDate) = '".$m."'"; + + } + + + $sql.="order by igrm.CreatedDate"; + + + $query = $this->db->query($sql); + return $query->result(); + +} + + + function finyear(){ + + + $sql="SELECT + CASE WHEN MONTH(CreatedDate)>=4 THEN + concat(YEAR(CreatedDate), '-',YEAR(CreatedDate)+1) + ELSE concat(YEAR(CreatedDate)-1,'-', YEAR(CreatedDate)) END AS financial_year + FROM T_IGR_Details + +GROUP BY financial_year"; + + $query = $this->db->query($sql); + return $query->result(); + + + + } + + + + + + + + + + + + + + + + + } \ No newline at end of file diff --git a/application/views/Report_Material_inward_Register.php b/application/views/Report_Material_inward_Register.php new file mode 100644 index 00000000..392f4a99 --- /dev/null +++ b/application/views/Report_Material_inward_Register.php @@ -0,0 +1,333 @@ + + + +
+ + +

+
+ +
+ +
+
+

Report - Material-Inward-Register

+ input->post('financialyear')){ + + $ab=$this->input->post('financialyear'); + + echo '('.$ab.')'; + + echo ' '; + + } + + if($this->input->post('month')){ + + $m=$this->input->post('month'); + + echo '('.$m.')'; + + echo ' '; + + } + + + + ?>

+
+ + +
+ +
+ +
+ + + +
+ +
+ +
+
+
+ +
+ +
+
+ + + + +
+ + +
+
+
+ + + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.NODateCustomerNameDescriptionUomInvoice QuantityReceived QuantityShortage QuantityExcess QuantityInvoice Delivery Challan Noinvoice Delivery Challan DateVehicle NoTime Inward
CreatedDate)); + echo $CreatedDate; + ?> + SupplierName;?>MaterialName;?>Per;?>Quantity;?>ReceivedQuantity;?>Quantity); + $ReceivedQuantity= round($gmir->ReceivedQuantity); + $Shortage=$Quantity - $ReceivedQuantity; + + + echo $Shortage; ?>AmendmentQuantity;?>DeliveryChellanOrInvoiceNo;?>DeliveryChellanDate;?>VehicleNo;?>DeliveryChellanDate)); + echo $time; + ?> +
+ +
+
+
+ +
+ +
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/addRawMaterial.php b/application/views/addRawMaterial.php index bde8c77b..bb514b54 100644 --- a/application/views/addRawMaterial.php +++ b/application/views/addRawMaterial.php @@ -155,7 +155,7 @@
- +
diff --git a/application/views/editRawmaterial.php b/application/views/editRawmaterial.php index 1e95026f..7df878cc 100644 --- a/application/views/editRawmaterial.php +++ b/application/views/editRawmaterial.php @@ -161,7 +161,7 @@ if(!empty($materialDetails))
- +
diff --git a/application/views/reportslink.php b/application/views/reportslink.php index 5d934023..691bff6f 100644 --- a/application/views/reportslink.php +++ b/application/views/reportslink.php @@ -53,6 +53,7 @@ Cumulative Report-Inward

Cumulative Report - Category Wise-Inward

Consolidate Report - Category Wise-Inward

+ Report - Material-Inward-Register