Added Order Hold/Release
This commit is contained in:
parent
73ff8ae980
commit
5a036cdc64
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user