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. 14
      app/Helpers/MasterFunctionsHelper.php
  2. 2
      app/Http/Controllers/AssignMaterialController.php

14
app/Helpers/MasterFunctionsHelper.php

@ -71,12 +71,14 @@ class MasterFunctionsHelper {
// foreach ($gantt as $key => $value) {
// Log::info('gantt '.$value.' index '.$key);
// }
if($gantt['calculation_type'] == 'simple') {
// to do
return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt);
} else {
return MasterFunctionsHelper::calculateProgressBasedOnReportMaterial($gantt);
}
if (isset($gantt['calculation_type'])) {
if($gantt['calculation_type'] == 'simple') {
// to do
return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt);
} else {
return MasterFunctionsHelper::calculateProgressBasedOnReportMaterial($gantt);
}
}
}
}

2
app/Http/Controllers/AssignMaterialController.php

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

Loading…
Cancel
Save