Fix error 500 when cancelling and ordering broadband

This commit is contained in:
Deon George
2022-04-04 20:29:45 +10:00
parent 9659621ba0
commit ebf08ea414
4 changed files with 8 additions and 9 deletions

View File

@@ -103,12 +103,12 @@ class OrderController extends Controller
// @todo Make this automatic
$so->site_id = config('site')->site_id;
$so->product_id = $request->input('product_id');
$so->product_id = $po->id;
$so->order_status = 'ORDER-SUBMIT';
$so->orderby_id = Auth::id();
$so->model = get_class($order);
$so->model = $order ? get_class($order) : NULL;
if ($order->order_info) {
if ($order && $order->order_info) {
$so->order_info = $order->order_info;
unset($order->order_info);