Browse Source

Merge pull request 'dev-wahyu' (#52) from dev-wahyu into staging

Reviewed-on: ordo/adw-backend#52
Reviewed-by: ibnu <ibnu@mail.com>
pull/3/head
ibnu 2 years ago
parent
commit
45e0780a46
  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) {
// Log::info('gantt '.$value.' index '.$key);
// }
if (isset($gantt['calculation_type'])) {
if($gantt['calculation_type'] == 'simple') {
// to do
return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt);
@ -79,6 +80,7 @@ class MasterFunctionsHelper {
}
}
}
}
public function calculateProgressBasedOnReportMaterial($keyGantt)
{

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