Hi all,

I'm still working to solve this problem on my own. I used the var_dump() to investigate why the code above was not working and discovered that the obvious reasons why it did not work.

The $_POST array contained branch_id as an integer and the dimension_id was also an integer but with a different value from the branch_id. Invariably, there won't be a match.

My proposed solution is to compare the branch and dimension names (strings) within database instead of the id(s) by introducing hidden fields for the names within the form and matching them together.

My question is how do i make hidden fields within the direct invoice form in FA. I am previously used to html tags, it seems FA makes use of a different convention i am yet to fully understand. So pls i really need help on this.

Secondly, what other scripts will require modification for the solution to work?

Thanks.

2

(3 replies, posted in Accounts Receivable)

Thanks Joe.
Sorry to bother you with something you had answered a lot of times. I would take a cue from that next time.

Thanks once again.

3

(3 replies, posted in Accounts Receivable)

Hi all,

How can i stop the invoice quantity field from rounding up figure? e.g if we enter 1.5 in quantity, FA rounds it up to 2.

Is there a setting to change this? and if not what can be done?

Thanks

Hi tm,

I see what you are trying to point out now. I actually tried that earlier and it did not work. I just copied your code and it still did not work.

I appreciate your help this far, but can you help me fix this for good pls?

Thanks

Hi tm,

I'm not really an expert in this stuff called php. I would appreciate if someone just corrected this code for me. Thanks. Want to ensure the branch chosen is the same with the dimension.

Hi,

Thanks for your reply. I have tried what you suggested but have not gotten a breakthrough yet. here is the piece of code i added, i'm not sure if i did the right thing;

}
    $match = get_post ('dimension_id');
    $match = preg_replace ('/^\d+\s+/', ' ', $match);
    if (get_post('branch_id') != $match)
    {
        display_error(_("The Branch does not match the Dimension chosen."));
        set_focus ('dimension_id');
        return false;
    }

please can someone check to see what i am not getting right with sample please. Thanks

Hi,

We want to ensure in our direct invoice entry that the customer branch and dimension selected by the users match. This is very crucial for our set up as we do not want users posting wrongly.

Here is the code i have included in the sale_order_entry.php file.

if (get_post ('branch_id') != get_post('dimension_id'))
{
           display_error(_("The branch does not match the dimension chosen."));
           set_focus ('dimension_id');
           return false;
}

The problem is that the dimension field options contains the IDs of the dimensions themselves. e.g. 1 Brisbane, 2 London etc. while the branches are Brisbane, London etc.

So every time an entry is made, the error "The branch does not match the dimension chosen." appears because of the number IDs that appear with the dimensions. i have tried the substr() but have not had luck.


Please i need help in ensuring that these two fields match and the effective way to do that is to warn the user before the invoice is posted.

Help is urgently needed. Thanks.

8

(1 replies, posted in Accounts Receivable)

Hi,

I would like to know how i can go about validating fields from our invoice for example.

We want a situation where users must select the same branch, price lists and dimension. We want FA to be able to warn the user if 1. they fail to pick any of these fields and 2. to ensure that the fields picked match.

Any ideas on how to go about this please?

9

(2 replies, posted in Setup)

Sorry, found the solution.

After creation of the company preloaded with the sample data, you can restore with en_US-new.sql in the sql folder on the server. the restoration is done via the Set Up screen via Backup/restore.

Just upload the en_Us-new.sql file and restore and it's done!

10

(2 replies, posted in Setup)

Hi,

I am trying to set up a new company but i found out that each time i set up a new company, the company is preloaded with sample transactions, customers, items, customers etc.

How can i set up a new company with the chart of accounts available but without sample customers, suppliers, items and transactions?

Thanks.