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,
text_row(_("Deliver To:"), 'deliver_to', $order->deliver_to, 50, 60,
_('Additional identifier for delivery e.g. name of receiving person'));
- textarea_row(_("Address:"), 'delivery_address', $order->delivery_address, 35, 5,
+ textarea_row(_("Address:"), 'delivery_address', $order->delivery_address, 35, 5, 255,
_('Delivery address. Default is address of customer branch'));
table_section(2);