WIP: Fix invoice_next_at date on service update for broadband - must do the others, and create a service validator

This commit is contained in:
Deon George
2022-09-07 15:15:02 +10:00
parent 3cae12b256
commit 5b4aa5c73e
2 changed files with 9 additions and 5 deletions

View File

@@ -405,7 +405,7 @@ class ServiceController extends Controller
->withInput();
}
$o->type->forceFill(Arr::except($x,['start_at']));
$o->type->forceFill($validator->validated());
} elseif ($request->post($o->product->category)) {
$o->type->forceFill($request->post($o->product->category));
@@ -413,6 +413,10 @@ class ServiceController extends Controller
$o->type->save();
// @todo create a validator for service
if ($request->post('invoice_next_at'))
$o->invoice_next_at = $request->invoice_next_at;
// Also update our service start_at date.
if ($request->post('start_at'))
$o->start_at = $request->start_at;