Minor bug fixes for payment update, internal product link and order billing interval

This commit is contained in:
Deon George 2023-05-13 22:19:22 +10:00
parent a195e4b55b
commit 12b63a506f
3 changed files with 5 additions and 4 deletions

View File

@ -114,12 +114,13 @@ class AdminController extends Controller
]); ]);
if (! $o->exists) { 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->site_id = config('site')->site_id;
$o->active = TRUE; $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) { foreach ($validation['invoices'] as $id => $amount) {
// See if we already have a payment item that we need to update // 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; }); $items = $o->items->filter(function($item) use ($id) { return $item->invoice_id == $id; });

View File

@ -108,7 +108,7 @@ class OrderController extends Controller
$so->ordered_by = Auth::id(); $so->ordered_by = Auth::id();
$so->active = FALSE; $so->active = FALSE;
$so->model = $order ? get_class($order) : NULL; $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) { if ($order && $order->order_info) {
$so->order_info = $order->order_info; $so->order_info = $order->order_info;

View File

@ -27,7 +27,7 @@
<tbody> <tbody>
<tr> <tr>
<th>Product</th> <th>Product</th>
<td class="text-center" colspan="2"><a href="{{ url('a/product/details',$c->supplied->id) }}">#{{ $c->supplied->id }}: {{ $c->supplied->name_long }}</a></td> <td class="text-center" colspan="2"><a href="{{ url('a/product/details',$c->id) }}">#{{ $c->supplied->id }}: {{ $c->supplied->name_long }}</a></td>
@if ($p->exists) @if ($p->exists)
<th>&nbsp;</th> <th>&nbsp;</th>
<td class="text-center" colspan="2">#{{ $p->supplied->id }}: {{ $p->supplied->name_long }}</td> <td class="text-center" colspan="2">#{{ $p->supplied->id }}: {{ $p->supplied->name_long }}</td>