modules/AOS_Invoices/AOS_Invoices.php

I need to change the way that the invoice number is generated.
It is currently using the max number +1 from the table independent on if it is a deleted row or not and this does not fit my requirements 100%.

I have copied the file to : custom/modules/AOS_Invoices/AOS_Invoices.php and made the changes there but the changes are not picked up. I did the “Quick repair and rebuild” but it is still not working.

Am I missing somethingP?

Not all files are directly customizable through that mechanism.

I think your solution lies here:

include/modules.php:438:$beanFiles['AOS_Invoices'] = 'modules/AOS_Invoices/AOS_Invoices.php';

Add the “custom/” in there and rebuild. This won’t be upgrade-safe, check this is still in place after each upgrade. But it’s a very easy fix to reapply.

If you care enough to try and make this upgrade-safe, I am not sure how to do it, but it might be possible to do in

custom/application/Ext/include

You’ll have to find some example out there on the Internet.

Thanks for the information.
That is working fine yes, I will investigate a bit in how to make this upgrade safe and will post my feedback here.

1 Like