diff --git a/app/Http/Controllers/ServiceController.php b/app/Http/Controllers/ServiceController.php index 427cd8a..647a73e 100644 --- a/app/Http/Controllers/ServiceController.php +++ b/app/Http/Controllers/ServiceController.php @@ -421,6 +421,12 @@ class ServiceController extends Controller if ($request->post('recur_schedule')) $o->recur_schedule = $request->recur_schedule; + $o->suspend_billing = ($request->suspend_billing == 'on'); + $o->external_billing = ($request->external_billing == 'on'); + // @todo Cant have both price and price_override - show an exception. (price_override shows a discount, whereas price shows the price) + $o->price = $request->price ?: NULL; + $o->price_override = $request->price_override ?: NULL; + // Also update our service start_at date. // @todo We may want to make start_at/stop_at dynamic values calculated by the type records if ($request->post('start_at')) diff --git a/app/Models/Service.php b/app/Models/Service.php index e774248..8eb9f84 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -1190,7 +1190,7 @@ class Service extends Model implements IDs */ public function isBilled(): bool { - return ! ($this->external_billing || $this->suspend_billing || ($this->price == 0)); + return ! ($this->external_billing || $this->suspend_billing || ($this->price === 0)); } /** diff --git a/resources/views/theme/backend/adminlte/service/widget/broadband/update.blade.php b/resources/views/theme/backend/adminlte/service/widget/broadband/update.blade.php index 06868d4..f9c3940 100644 --- a/resources/views/theme/backend/adminlte/service/widget/broadband/update.blade.php +++ b/resources/views/theme/backend/adminlte/service/widget/broadband/update.blade.php @@ -54,6 +54,7 @@