Making the code fill itself in
You add a vendor — and invent a code for them. You add an item — and invent one again. Six months later everybody's codes look different, two managers have entered the same counterparty under different numbers, and for the third one the system answers «This code is already registered in the system».
There is no need to invent anything. Leave the «Code» field empty and save the record — the system will put in the next free number itself — provided there is a numbering rule for this record (below). No rule — saving stops at the «Code» field, and the hint says where to add one: «Enter a unique contact code, or add a code range for its type and category in «Serial Number Range for Contacts» to have codes generated». A new SaaS company already has a general rule for item codes: the first new item gets 00000004 (the three starter items hold 00000001–00000003).
What it looks like
A vendor. A new contact card, the «Vendor» type ticked, the code left empty. After saving, the card holds V011 — the V prefix and the next number of the vendor series.
An item in the «ЗЧ» (spare parts) group. The code is empty, the group is picked. After saving — ЗЧ1004.
An item with no group. This works too: the system takes the general rule and issues 000028 — a number padded with zeros to six digits.
In all three cases only one thing is required of you: do not touch the «Code» field.
Where the number comes from
The rules are set up in advance, once, and simply work from then on:
| What is numbered | Where the rule lives | What tells the series apart |
|---|---|---|
| Contacts — customers, vendors, contact persons | Serial Number Range for Contacts | contact type and its category |
| Items and services | Serial Number Range for Items | item group |
| Serial numbers of item units | Serial No. Range | one shared range |
| Document numbers — invoices, receipts, payments | Number series | document register and period |
A rule is a line with a «from:to» range, a prefix, a suffix and a number of leading zeros. The system takes the next free number after the «Last number» in the range (skipping taken ones), pads it with zeros, glues the prefix on — and writes the used one into the «Last number» column.
The line is looked up from the most specific to the most general: for a contact, first «this type and this category», then «this type», then the general line with no types and categories. For an item — first the line of its group, then the line with an empty group. If no line is found at all, no code is issued and saving stops at the mandatory «Code» field — which is precisely what «we enter codes by hand» means.
What «vendor code» means
It is the code in the card of a contact with the «Vendor» type ticked — that same V011. Purchase orders, goods receipts, invoices from them and payments to them all refer to the vendor by it. There is no separate «vendor code» apart from the contact code: there is one card, and the roles — customer, vendor, contact person — are ticked inside it. That is why vendors get a series of their own: so that the code alone tells you who you are dealing with.
The part number under which the item is listed at the vendor is a different thing: the item card has an «Alt. code» field for it, a second code of the same card. It has no series of its own and is typed in by hand.
Typical situations
No code was filled in, the system demands one by hand. There is neither a specific nor a general line for this contact type (or this item group). Add a line to the matching setting.
«This code is already registered in the system». That code is already taken by another card. Leave the field empty — the system skips taken numbers by itself and takes the first free one.
The code came from the wrong series. The series is chosen by the type and category of the contact (or by the item group), not by who is entering the record. Check those fields on the card.
Numbering has to start over. Change the «Last number» in the rule's line. Taken codes will be skipped anyway.
You want to rename the code of an old card. Better not to: the code is the key documents refer to, and on a card that has already been in use it must not be changed. Create a new one and close the old one, see Why a record will not delete.
A document number is not filled in. That is different numbering — Number series: one series per register, with a «from — to» range and, if needed, a period of validity. Without a series, documents are numbered sequentially from one.