From 12b63a506f79884fab9c6a4efd5481fdd6e5aa28 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 13 May 2023 22:19:22 +1000 Subject: [PATCH] Minor bug fixes for payment update, internal product link and order billing interval --- app/Http/Controllers/AdminController.php | 5 +++-- app/Http/Controllers/OrderController.php | 2 +- .../theme/backend/adminlte/service/widget/internal.blade.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index 4982a74..0df36bc 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -114,12 +114,13 @@ class AdminController extends Controller ]); if (! $o->exists) { - $o->forceFill($request->only(['account_id','paid_at','checkout_id','checkout_id','total_amt','fees_amt','source_id','pending','notes','ip'])); $o->site_id = config('site')->site_id; $o->active = TRUE; - $o->save(); } + $o->forceFill($request->only(['account_id','paid_at','checkout_id','total_amt','fees_amt','source_id','pending','notes','ip'])); + $o->save(); + foreach ($validation['invoices'] as $id => $amount) { // See if we already have a payment item that we need to update $items = $o->items->filter(function($item) use ($id) { return $item->invoice_id == $id; }); diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 8c982f0..35cf7a8 100644 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -108,7 +108,7 @@ class OrderController extends Controller $so->ordered_by = Auth::id(); $so->active = FALSE; $so->model = $order ? get_class($order) : NULL; - $so->recur_schedule = $po->price_recur_default; + $so->recur_schedule = $po->billing_interval; if ($order && $order->order_info) { $so->order_info = $order->order_info; diff --git a/resources/views/theme/backend/adminlte/service/widget/internal.blade.php b/resources/views/theme/backend/adminlte/service/widget/internal.blade.php index 1a82ef3..04325cc 100644 --- a/resources/views/theme/backend/adminlte/service/widget/internal.blade.php +++ b/resources/views/theme/backend/adminlte/service/widget/internal.blade.php @@ -27,7 +27,7 @@ Product - #{{ $c->supplied->id }}: {{ $c->supplied->name_long }} + #{{ $c->supplied->id }}: {{ $c->supplied->name_long }} @if ($p->exists)   #{{ $p->supplied->id }}: {{ $p->supplied->name_long }}