From: Joe Hunt Date: Tue, 2 Feb 2010 01:09:35 +0000 (+0000) Subject: Bug in direct invoice when cash sales and no cash account defined in sales pos. X-Git-Tag: 2.3-final~1000 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=f48f7c67ee23c35ab0c40a66779ec60450202c94;p=fa-stable.git Bug in direct invoice when cash sales and no cash account defined in sales pos. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a00ca66a..6b6315c2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +02-Feb-2010 Joe Hunt +# Bug in direct invoice when cash sales and no cash account defined in sales pos. +$ /sales/sales_order_entry.php + 01-Feb-2010 Janusz Dobrowolski # Fixed error display hidden during ajax call in some situations $ /includes/errors.inc diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index 5d0ea722..690b16e8 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -335,6 +335,7 @@ function can_process() { return false; } + if (strlen($_POST['delivery_address']) <= 1) { display_error( _("You should enter the street address in the box provided. Orders cannot be accepted without a valid street address.")); set_focus('delivery_address'); @@ -367,6 +368,14 @@ function can_process() { return false; } } + else + { + if (!db_has_cash_accounts()) + { + display_error(_("You need to define a cash account for your Sales Point.")); + return false; + } + } if (!$Refs->is_valid($_POST['ref'])) { display_error(_("You must enter a reference.")); set_focus('ref');