diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index 5a410d8..b9b43a6 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -27,7 +27,7 @@ class AdminController extends Controller if ($request->post()) { $request->validate([ 'account_id' => 'required|exists:accounts,id', - 'charge_date' => 'required|date', + 'charge_at' => 'required|date', 'service_id' => 'required|exists:services,id', 'quantity' => 'required|numeric|not_in:0', 'amount' => 'required|numeric|min:0.01', @@ -43,7 +43,7 @@ class AdminController extends Controller $o->active = TRUE; } - $o->forceFill($request->only(['account_id','charge_date','service_id','quantity','amount','sweep_type','type','taxable','description'])); + $o->forceFill($request->only(['account_id','charge_at','service_id','quantity','amount','sweep_type','type','taxable','description'])); $o->save(); return redirect()->back() diff --git a/app/Models/Charge.php b/app/Models/Charge.php index 5ad4311..e09a8b5 100644 --- a/app/Models/Charge.php +++ b/app/Models/Charge.php @@ -25,7 +25,7 @@ class Charge extends Model protected $dates = [ 'start_at', 'stop_at', - 'charged_at', // @todo Dont remember what this attribute is for + 'charge_at', // The date the charge applies - since it can be different to created_at ]; public const sweep = [ diff --git a/resources/views/theme/backend/adminlte/a/charge/addedit.blade.php b/resources/views/theme/backend/adminlte/a/charge/addedit.blade.php index c821319..cae4574 100644 --- a/resources/views/theme/backend/adminlte/a/charge/addedit.blade.php +++ b/resources/views/theme/backend/adminlte/a/charge/addedit.blade.php @@ -32,21 +32,21 @@