else
{
$row = get_customer_to_order($_POST['customer_id']);
- if ($row['dissallow_invoices'] == 1)
+ if ($row && $row['dissallow_invoices'] == 1)
$customer_error = _("The selected customer account is currently on hold. Please contact the credit control personnel to discuss.");
}
}
}
$item_info = get_item_edit_info($_POST['stock_id']);
- $units = $item_info["units"];
- $dec = $item_info['decimals'];
+ $units = ''; $dec = 2;
+ if ($item_info) {
+ $units = $item_info["units"];
+ $dec = $item_info['decimals'];
+ }
$_POST['qty'] = number_format2(1, $dec);
$price = get_kit_price($_POST['stock_id'],
$order->customer_currency, $order->sales_type,