Topic: Invoice Number has already being user - when multiple users...

When different users from different locations are trying to create at exactly the same time an invoice, one succeeds and the rest of them get the message that the invoice number has already being used. So we need to go to FORMS setup to change the reference invoice number to be able to proceed. What do we need to do ?

Best Regards,
Chris

Re: Invoice Number has already being user - when multiple users...

I agree with you that the current way FA is dealing with reference number is weird and doesn't work really well.
(my answer is a bit long, but there is a practical solution at the end ;-))

In most countries, invoice number have to be sequencial, so the tax man can spot "missing" invoices more easily.
FA used auto id from the database and that works fine. However, that doesn't give much freedom to the user which prefers a sexier invoice number.

This is why we have also a reference number, it's a free form field use to reference the invoice. The only constraint is it, has to be unique.
In theory you enter whatever you want, like using the current month and add the sequencial number within the month or anything else.
In practice, it doesn't work because you quickly endup with the problem you have, how do I know what is the reference number or if 2 peoples are entering an invoice at the same time what stop them to use the same ?
FA provides us with last reference number to solve this, however it only works if your reference number is a number but doesn't if you are trying to follow a pattern.
Morever, it even doesn't work with number, because we have the bug you just described. Trying to fix this bug will be equivalent to have an incremental number in the database, which already what the invoice number is.
The question is, if we are forced to use sequencial reference number (and there is no real choice in FA) what not then just using the invoice id ? That would will work, avoid the bug above and don't get people confused between invoice id and invoice ref.

What would be really nice in FA would be
1 - to have an option to use the invoice id as a reference number.
2 - Or have a way to specify reference number pattern so you could do things similar to a printf and use date, user etc ... This solution should be able to use emulate option 1.

In the mean time , what you can do is, if all your users are in the office, have them speaking to each other to avoid this problem
or use a physical reference number generator (to do FA jobs") :  buy a couple of raffle book, give one to each user and ask them to use the number of the ticket as reference number. If they are not in the same city are buying themselves the raffle book, to be sure to avoid "collision" as them to add the city initial to the reference number.

/Elax

Re: Invoice Number has already being user - when multiple users...

Thanks Elax. Your answer was exactly what i was looking for.

Re: Invoice Number has already being user - when multiple users...

i have the same problem, and i was thinking to hack FA and try to generate a random number

Re: Invoice Number has already being user - when multiple users...

I agree. I just don't understand with reference in FA. So I just hide it and generate my own formatted number.

Re: Invoice Number has already being user - when multiple users...

reference number is necessary for most companies, specially larger and multiple locations companies. unfortunately it need more fine tuning.
if you are operating FA from multiple locations it can me a bit frustrating specially for new sales people. ( it happen to me a few times)
you see, if the salesperson is at home or at the customer place using a tablet and try to enter a sales order, well you just get stack; call the office or try again...

but fear not, I have a solution smile actually two solutions

first one is a simple one and use what FA already have, user id.
each user have a uniq id (or I think they do, I did not check the database structure yet) but that can be entered in front of the reference number. that should be unique and it can not be duplicated unless two persons are using the same username to login.
this also identify how entered the order in the system, for future references...

the second option is more complex and it require database altering. but this also give the user/company more flexibility in customizing orders. under user profile or the admin can set this up for each user, you get to choose how the reference number should start...
this also can help companies operating from diferent cities/states because you can use NY1234 for New York branch or GA1234 for Georgia branch

as for me, I think I'll use the first option as a quiq fix but eventually I'll change to the second option

7 (edited by mfaa98 03/24/2014 04:34:44 am)

Re: Invoice Number has already being user - when multiple users...

the current way FA is dealing with reference number is weird and doesn't work really well

How exactly is FA dealing with reference number? My guess is FA gets the next reference number when creating invoice form. hence we can't post invoice if somebody else already post the invoice using the same reference number.

I have two proposed solution (programmatically)

First:
when processing/saving document,
1. FA check the reference number if it is already used or not.
2. if not, then commit to database. if already used, FA tells user that the reference number is already used and ask if he/she will change the reference number manually or let FA chooses the next reference number based on the database.
3. if user choose to change manually, then return to step 1, else FA set the next reference number automatically.

Or second:
- add checkbox in invoice/order/delivery form whether user want to create ref number manually or automatically. if user chooses automatically, the reference number input is disabled.
- add reference number information beside invoice/order/delivery number when succeeded so user can take a note for it.