Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

Quote Number Increment

Hello the community,
I’m new to the forum and English is not my native language, so would you excuse me for the errors in this message.
I have the following problem :
When I duplicate a quote the new quote number is incremented by 5. i.e. I duplicate a quote with the number 100, when I click on record, the new quote has the number 105. Is it a standard behavior ? Is there a way to avoid this ?
Thanks for your help
Vincent

Hi @vtallon
please look at this link maybe it’s helpful to you Change quote / invoice number - #4 by cherub-chum
Or you Can check out this video: Manage Immense Data in SuiteCRM using Unique ID Generator Plugin - YouTube

Just an untested assumption, but I guess that in the meantime (in between the creation of quote #100 and the creation of the copy), 4 other quotes were created by some other users. Could that be the case?

Hi @vijay1992,
Thanks for your answer. I already had a look at this conversation and had a look at the file AOS_Quotes.php and checked the save function.

The increment is 1 as shown in the following piece of code:

            if ($sugar_config['dbconfig']['db_type'] == 'mssql') {
                $this->number = $this->db->getOne("SELECT MAX(CAST(number as INT))+1 FROM aos_quotes");
            } else {
                $this->number = $this->db->getOne("SELECT MAX(CAST(number as UNSIGNED))+1 FROM aos_quotes");
            }

However the weird behaviour is still here.

I’m still investigating

Hi Diligent,

Thanks for the answer. Good try but I work on a develpment configuration and I’m the only one to do so…
Anyway, I’m still searching