Browse Source

Merge branch 'staging' of https://git.oslog.id/ordo/adw-backend into dev-ibnu

pull/3/head
ibnu 2 years ago
parent
commit
3742fbbd5d
  1. 2
      app/Helpers/MasterFunctionsHelper.php
  2. 2
      app/Http/Controllers/AssignMaterialController.php

2
app/Helpers/MasterFunctionsHelper.php

@ -71,6 +71,7 @@ class MasterFunctionsHelper {
// foreach ($gantt as $key => $value) { // foreach ($gantt as $key => $value) {
// Log::info('gantt '.$value.' index '.$key); // Log::info('gantt '.$value.' index '.$key);
// } // }
if (isset($gantt['calculation_type'])) {
if($gantt['calculation_type'] == 'simple') { if($gantt['calculation_type'] == 'simple') {
// to do // to do
return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt); return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt);
@ -79,6 +80,7 @@ class MasterFunctionsHelper {
} }
} }
} }
}
public function calculateProgressBasedOnReportMaterial($keyGantt) public function calculateProgressBasedOnReportMaterial($keyGantt)
{ {

2
app/Http/Controllers/AssignMaterialController.php

@ -42,7 +42,7 @@ class AssignMaterialController extends Controller
$data['budget'] = $checkStock->price; $data['budget'] = $checkStock->price;
$data['qty_planning'] = $this->sanitizeDecimal($data['qty_planning']); $data['qty_planning'] = $this->sanitizeDecimal($data['qty_planning']);
if ($planDate > $startDate) { if ($planDate >= $startDate) {
$result = AssignMaterial::create($data); $result = AssignMaterial::create($data);
return response()->json(['status'=>'success','message'=>'Data added!', 'code'=>200], 200); return response()->json(['status'=>'success','message'=>'Data added!', 'code'=>200], 200);
}else{ }else{

Loading…
Cancel
Save