Added Order Hold/Release

This commit is contained in:
Deon George 2019-01-24 22:03:43 +11:00
parent 73ff8ae980
commit 5a036cdc64
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
3 changed files with 10 additions and 1 deletions

View File

@ -49,6 +49,11 @@ class AdminHomeController extends Controller
$o->nextStatus($action);
break;
case 'hold':
case 'release':
$o->nextStatus($action);
break;
case 'update_reference':
$o->order_info = array_merge($o->order_info ? $o->order_info : [],['order_reference'=>$request->input('notes')]);
$o->save();

View File

@ -59,7 +59,7 @@ class Service extends Model
// Order Submitted
'ORDER-SUBMIT' => ['approve'=>'ORDER-SENT','hold'=>'ORDER-HOLD','reject'=>'ORDER-REJECTED','cancel'=>'ORDER-CANCELLED'],
// Order On Hold (Reason)
'ORDER-HOLD' => [],
'ORDER-HOLD' => ['release'=>'ORDER-SUBMIT','update_reference'=>'ORDER-SENT'],
// Order Rejected (Reason)
'ORDER-REJECTED' => [],
// Order Cancelled

View File

@ -28,6 +28,7 @@
@include('a.widgets.service.order.submit')
@break
@case('ORDER-HOLD')
@case('ORDER-SENT')
@case('ORDERED')
@include('a.widgets.service.order.sent')
@ -49,9 +50,12 @@
@switch($o->order_status)
@case('ORDER-SUBMIT')
<button type="submit" class="btn btn-info btn-danger" name="action" value="reject">Reject</button>
<button type="submit" class="btn btn-info btn-danger" name="action" value="hold">Hold</button>
<button type="submit" class="btn btn-info btn-warning" name="action" value="approve">Approve</button>
@break;
@case('ORDER-HOLD')
<button type="submit" class="btn btn-info btn-warning" name="action" value="release">Release</button>
@case('ORDER-SENT')
@case('ORDERED')
<button type="submit" class="btn btn-info btn-danger" name="action" value="update_reference">Update</button>