Topic: Error selecting wrong customer branch when browser javascript is off
There maybe some reasons that cause user browser javascript turned of then branch and customer can be wrong selected then process wrong data to database.
This check need to be added to function can_process() in sales_order_entry.php, customer_payments.php, credit_note_entry.php
if(!branch_in_foreign_table(get_post('customer_id'), get_post('branch_id'), 'cust_branch')) {
display_error(_("The selected branch is not a branch of the selected customer."));
set_focus('branch_id');
return false;
}
Note: in customer_payments.php 'branch_id' should be 'BranchID'
This error does not usually occurs but it would be critical when it does.