Multi company and the invoices series

Hello;

As we know that each company will have separated Chart of Account.

But the problem that the naming serial for the invoices is not separated, and will cause to have discontinuity for the numbers when there is audit, this is not allowed.

The only way to overcome this is to create new instance for each company but in this case, it will mot be possible to see all companies from one login (session), and will not be able even to use duplicate feature.

So how to resolve this problem?
It is not acceptable to have SINV-00001 and then SINV-00020, the audit will ask where is 2 and 3 and 4 … etc, how did u reach for invoice SINV-00020 directly!!!

There should be a solution for this, otherwise it is not possible to use multi company and multi financial book.

Regards
Bilal

I did this before, I create custom field in company for all documents that needs separate naming series like Sales Order, Sales Invoice, Journal Entry ,etc…

And save the new naming series for all of them or each company

Then I have to create all of them in Naming for each company like this:

then create custom script for all document like this to select naming based on company :

2 Likes

You lost me here.

1 Like

@flexy2ky I am sorry, I forget to add one more image:

for example : here I have company called Demo Company so I will take the abbr and add it to naming series JV-DC, For anther company in the same instants called Sky Zone I will create JV-SZ and so on

erpnext support putting field value in naming series. So on Sales Invoice DocType, you just need to create a custom field (company_abbr) that fetch value from the abbr field in company doctype. For example, Company A will have abbr as CPA, Company B will have abbr as CPB.
https://erpnext.com/docs/user/manual/en/setting-up/settings/naming-series

The naming series will be company_abbr.SINV.#####. And the document ID will be
CPASINV.00001
CPASINV.00002
CPBSINV.00001
CPBSINV.00002

Hi Mohammed

Please guide just further, the custom fields created on the “company form”, what is there type, like ‘link’, ‘data’ or something else.

@Jalaj It should be “Data”

I used this method and it is by far the most reliable option. company initials are automatically appended to naming series and the numbering is unique to each company.

Thanks Mohammed.

Hi Mohammed,

Are you able to restrict user for specific series???

@Parag_Chatwani if you want to do that you have to create custom fields in User DocType and write the script to fetch the naming series from the user record

Hi Mohammed

Thanks for your kind support.
I have configured this Company Wise Naming Series for sales order.
but it went blank, sales order become blank.
Please help.

@Jalaj share your code please

Hi Mohammed

Please find the code.

frappe.ui.form.on(‘Sales Order’, {
setup: function(frm) {
// your code here
frm.add_fecth(“company”, “sales_order_naming_series”, “naming_series”);
}
})

@Jalaj Did you follow all steps I mention in my post (2-4) above?

Hi Mohammed

I think I had followed the steps.
Can you kindly explain how these steps, can create this kind of effect?
Please suggest do I need to re-do all this, with some specific sequence.
Once again, thanks a lot for your constant support.

Hi Mohammed

I have re-done all the steps in the sequence as you have suggested.
but still the form is blank.
Please suggest further.

Can you please share your mobile no. or call me on +91 98676 32366 if you can able to do and assist in the said matter would like to outsource the said work and discuss commercials.

Thanks

Parag Chatwani

Can we user Abbr for this?