diff --git a/app/Controllers/Rawmaterialdetails.php b/app/Controllers/Rawmaterialdetails.php index 68eee19a..0d3ebff8 100755 --- a/app/Controllers/Rawmaterialdetails.php +++ b/app/Controllers/Rawmaterialdetails.php @@ -288,6 +288,7 @@ class Rawmaterialdetails extends BaseController $data['cfUOM'] = $this->rawmaterialdetails_model->getConversionfactorUOM(); $data['assetcode'] = $this->rawmaterialdetails_model->getAssetcode(); $data['avg_price'] = $this->rawmaterialdetails_model->getMaterialAvg($RawMaterialID); + $data['materialRateHistory'] = $this->rawmaterialdetails_model->getMaterialRateHistory($RawMaterialID); //print_r($data['avg_price']);die(); $this->global['pageTitle'] = 'Edit Material Master'; diff --git a/app/Models/Rawmaterialdetails_model.php b/app/Models/Rawmaterialdetails_model.php index db3a4132..22b261bb 100755 --- a/app/Models/Rawmaterialdetails_model.php +++ b/app/Models/Rawmaterialdetails_model.php @@ -445,5 +445,24 @@ where (CurrentStock+OpeningStock)db->table('t_material_rate_history tmrh') + ->select(' + tmrh.new_value, + tmrh.old_value, + tmrh.updated_at, + te.FirstName AS name + ') + ->join('tbl_users tu', 'tu.userId = tmrh.updated_by', 'left') + ->join('t_employee_details te', 'te.EmpID = tu.EmpID', 'left') + ->where('tmrh.MaterialCode', $RawMaterialID) + ->orderBy('tmrh.updated_at', 'desc') + ->get() + ->getResultArray(); + + return $result; + } + + } diff --git a/app/Views/editRawmaterial.php b/app/Views/editRawmaterial.php index c85dda52..e29874fd 100755 --- a/app/Views/editRawmaterial.php +++ b/app/Views/editRawmaterial.php @@ -168,17 +168,15 @@ if ($total <= $reorder) {
- /> - - - -
- +
+
+ + +
+
@@ -304,6 +302,61 @@ if ($total <= $reorder) {
+ +
+

Material Rate History

+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rate New ValueRate Old ValueRate Updated ByRate Updated Date Rate Updated Time
+
+ + + + diff --git a/app/Views/rawmaterialListing.php b/app/Views/rawmaterialListing.php index 98d66678..ba993072 100755 --- a/app/Views/rawmaterialListing.php +++ b/app/Views/rawmaterialListing.php @@ -94,9 +94,10 @@ - +