1 (edited by notrinos 11/30/2020 02:38:19 pm)

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.

Phuong

Re: Error selecting wrong customer branch when browser javascript is off

We have not experience such an error before. And never seen anything wrong in branch id mistakes.  Probably it might cause if the database has issue with branch id

Subscription service based on FA
HRM CRM POS batch Themes

Re: Error selecting wrong customer branch when browser javascript is off

The said branch_id is actually commented out, possibly a remnant of an old version.