Added status ORDERED

This commit is contained in:
Deon George 2019-01-24 21:55:43 +11:00
parent d0fb3f643e
commit 73ff8ae980
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
3 changed files with 7 additions and 2 deletions

View File

@ -65,7 +65,9 @@ class Service extends Model
// Order Cancelled // Order Cancelled
'ORDER-CANCELLED' => [], 'ORDER-CANCELLED' => [],
// Order Sent to Supplier // Order Sent to Supplier
'ORDER-SENT' => ['update_reference'=>'ORDER-SENT'], 'ORDER-SENT' => ['update_reference'=>'ORDER-SENT','confirm'=>'ORDERED'],
// Order Confirmed by Supplier
'ORDERED' => ['update_reference'=>'ORDER-SENT'],
]; ];
/** /**
@ -245,7 +247,7 @@ class Service extends Model
if (! $this->order_status) if (! $this->order_status)
return $this->active ? 'Active' : 'Inactive'; return $this->active ? 'Active' : 'Inactive';
return $this->order_status=='ORDER-SENT' return in_array($this->order_status,['ORDER-SENT','ORDER-HOLD','ORDERED'])
? sprintf('%s: <span class="white-space: nowrap"><small><b>#%s</b></small></span>',$this->order_status,array_get($this->order_info,'order_reference','Unknown')) ? sprintf('%s: <span class="white-space: nowrap"><small><b>#%s</b></small></span>',$this->order_status,array_get($this->order_info,'order_reference','Unknown'))
: $this->order_status; : $this->order_status;
} }

View File

@ -29,6 +29,7 @@
@break @break
@case('ORDER-SENT') @case('ORDER-SENT')
@case('ORDERED')
@include('a.widgets.service.order.sent') @include('a.widgets.service.order.sent')
@break @break
@ -52,6 +53,7 @@
@break; @break;
@case('ORDER-SENT') @case('ORDER-SENT')
@case('ORDERED')
<button type="submit" class="btn btn-info btn-danger" name="action" value="update_reference">Update</button> <button type="submit" class="btn btn-info btn-danger" name="action" value="update_reference">Update</button>
@break; @break;

View File

@ -24,6 +24,7 @@
@case('ORDER-SUBMIT') @case('ORDER-SUBMIT')
@case('ORDER-SENT') @case('ORDER-SENT')
@case('ORDER-HOLD') @case('ORDER-HOLD')
@case('ORDERED')
@include('u.widgets.service.order.sent') @include('u.widgets.service.order.sent')
@break @break