Two Companies, Different Invoice Sequence?

Hi all,

We are running two companies, our US one and Cambodia one, using one ERPNext install. We are using the hosted version, if that matters.

The problem we are having is that we need our invoice numbers to be sequential to each business. Right now, no matter what company generates the invoice, the system creates the next item number. This has caused us huge tax issues because we have to explain to prove to our auditors why we are missing invoices.

Thanks for any help!

1 Like

@jesseorndorff

Keep separate naming series for each company and while making sales invoice select the respective naming series.
You can achieve this with the small customizations, add custom field Default Naming Series with fieldtype data in the company. Create custom script for sales invoice and using add_fetch pull the series defined in the company to sales invoice. In each company set the naming series and system will auto pull the naming series in the sales invoice based on the company you have selected.

frappe.ui.form.on('Sales Invoice', {
	setup: function(frm) {
		frm.add_fetch('company', 'default_naming_series', 'naming_series');
	}
})
3 Likes

I want to do this with all the documents

1 Like