I have another questions, bit 1st of all :
What version of SuiteCRM am I using ?
What OS ?
Windows 10 Pro 64bit
What PHP version ?
What are you trying to do ?
So, I’m struggling to find a clear way to set a pattern for quotes and invoices. For instance :
19FA (for invoices) + 000 + incremental number
19DE (for quote) + 000 + incremental number
I tried to change that in Admin > AOS and in Studio, but it’s no avail : none of the methods I looked for actually worked. I read as many topics as possible, I searched in documentation, but none solutions were useful.
Any help, pelase ?
I don’t think there is a way to define a pattern for invoice numbers like that in SuiteCRM.
You would have to do code customization, perhaps.
I can imagine a solution to be possible with Workflows and Calculated Fields, perhaps, but you’ll have to figure it out from the Documentation, I never tried it, sorry…
And thanks again for your answer.
Ok, I thought adding a pattern was something basic.
Right now, I’m not even able to change the initial number (i.e 00001 instead of 1). I reset database, tried both in studio and AOS, but it’s no avail : Suite always starts with 1…
For changing initial Number of Quotes/Invoices, you can modify the values of the config.php file in the config_override.php
The values are set in the following code
'version' => '5.3.3',
'renewalReminderPeriod' => '14',
'totalTax' => false,
'enableGroups' => true,
'initialNumber' => '1',
'initialNumber' => '1',
So what you can do is just change the initial numbers in config_override.php like following
$sugar_config['aos']['quotes']['initialNumber'] = '1000';
$sugar_config['aos']['invoices']['initialNumber'] = '3000';
For Having a Custom pattern, since you need an alphanumeric value, i would suggest that create a new field say “quote_number” and assign it the Number from Logic Hooks. So one number would be the primary incremental number while the other will be alphanumeric serial number. You can change the stepping/increments which you can see in the file modules/AOS_Quotes/AOS_Quotes.php save function
Thank you, the first tip helped a lot !!! :woohoo:
For the 1st part, I gave a test by setting the first incremental number in config_onverride.php to be 190001 and it worked !
Then, I wanted to see what would happen if I changed the incremental number to start with 20 (and not 19). To be more accurate, let’s imagine I created 11 quotes in 2019, so the last quote would be 190011. We’re now in 2020, so I want to change the incremental number to start at 200012 => I tried and it worked (yay ! :woohoo: )
Regarding the second part, thanks for the hint, but unfortunately, I’m not good enough to understand precisely what I have to do >_<
According to your message + researches I did on the documentation, it sounds like it requires many php files and code to add to get the result I want, andI don’t want to screw everything up because I’m too bad at it ^^’
So I think I’ll stay with what I’ve got from the first part. Thank you for your help !