1 (edited by oswall 04/30/2012 10:18:38 pm)

Topic: How to disable "Reference" for invoice

Regards,
I use FA 2.3.8 with ubuntu linux server, and 3 PCs in network lan.
I have a problem with the "Reference" number created by FA.
When two or more users on different PCs trying to create an invoice, FA creates the same reference number for all.
As FA indicates the "reference" number is being used by another.
I activated the invoice number in config.php instead of the reference.
But the number of reference remains a problem.
You can disable the reference number of FA?.

Oswall

Re: How to disable "Reference" for invoice

There should be a check for this when saving. We will look closer into this.

Unfortunately you cannot disable the reference.

/Joe

3 (edited by oswall 05/02/2012 02:30:46 pm)

Re: How to disable "Reference" for invoice

You can disable the uniqueness of the "reference"?.
Thus, no checks whether the reference number being used by another.
We use the invoice number, do not use the reference number.

Thanks
Oswall

Re: How to disable "Reference" for invoice

I note that FA assigns the reference number immediately upon entering the direct invoice screen.
I think it must allocate (create) just before the bill persist and have a free number.

Oswall

Re: How to disable "Reference" for invoice

Yes you are right. The check on reference should be inside a transaction. This has now been fixed in the HG repository and will be included in the next minor release.

/Joe

Re: How to disable "Reference" for invoice

In the file sales_order_entry.php, if I comment the following code, solve the immediate problem.
But I wonder if you might have problems elsewhere in FA, if I do this.
The code is commented:
         if ($ Refs-> is_valid ($ _POST ['ref'])) {
display_error (_ ("You must enter a reference."));
set_focus ('ref');
return false;
}
       
    if ($ _SESSION ['Items'] -> trans_no == 0 &&! is_new_reference ($ _POST ['ref']
    $ _SESSION ['Items'] -> trans_type)) {
    display_error (_ ("The Entered reference is already in use."));
set_focus ('ref');
    return false;
    } Elseif ($ _SESSION ['Items'] -> get_items_total () <0) {
display_error ("Invoice total amount can not be less than zero.");
return false;
}

Thanks
Oswall

Re: How to disable "Reference" for invoice

This doesn't solve the problem with double references. We have fixed this in next minor release. The test has to be inside a begin transaction - commit transaction for all the transactions.

/joe

Re: How to disable "Reference" for invoice

Thanks Joe for your reply.
Please tell me when you can solve.
I use 2.3.8 FA

Oswall

Re: How to disable "Reference" for invoice

It will come in release 2.3.11 that is about to be released shortly.

/Joe

Re: How to disable "Reference" for invoice

Hi I am using 2.3.14 but still I am having same problem "The entered reference is already in use."

How to resolve this problem..............

I am using 3 users for sales at the same time

Re: How to disable "Reference" for invoice

Another of the users took the reference number that was on screen. Increase the reference either when creating the documents or in Setup tab, Forms setup.

/Joe

Re: How to disable "Reference" for invoice

Thanks joe,
I think it should auto check ref no before posting and change that according to the current status. just like tran_no .

Pls reply this post also I need this urgently because I new to this I an going to apply this as soon as possible but these are my mandatory requirement please help me. Tell me any code and where I need to put that.

https://frontaccounting.com/punbb/viewtopic.php?id=3793

Re: How to disable "Reference" for invoice

Hello again,

We are working on this. Will be back asap.

/Joe

Re: How to disable "Reference" for invoice

We have now solved this problem by presenting the increased number when getting the error 'Reference already in use'.
The reference field is updated with this next number and the document is ready for save again.

We have chosen this method, so users can get a feed back if he wants to continue.

I know we could just update the number automatically with a warning, but we found the chosen method better. It is just a matter of re-saving the document.

Please download, rename the file sales_order_entry.php1 to sales_order_entry.php and replace the file in /sales/sales_order_entry.php.

The HG repository is also updated.

/Joe

Post's attachments

sales_order_entry.php1 25.7 kb, 16 downloads since 2013-01-24 

You don't have the permssions to download the attachments of this post.

Re: How to disable "Reference" for invoice

Thanks Joe, your HG commit 3160 does the job.

Re: How to disable "Reference" for invoice

Thanks Joe, Its working  perfectly