A number format is a specific pattern or structure used to create the unique identification number assigned to bills or invoices. It typically includes letters, numbers, and symbols arranged in a specific order to create a recognizable and meaningful identifier for each bill or invoice. You can use these number formats for bill counters for efficient record-keeping, tracking, and retrieval of financial documents. You can edit the Number format field in Mews Operations when creating or editing bill counters.
In this article you can learn about:
Mews uses the C# String.Format function to set up structured number formats for bill or invoice counters. Mews uses the string formatting technique in C# programming language to craft custom text. It assigns patterns to placeholders and replaces them with specific values.
This means a Number format field in Mews that looks like:
-
2023{0:000}
displays in the invoice title as:
-
2023000
This makes the data display much more efficient and flexible.
The formatting process:
- Mews uses "2023" as a prefix.
- The {0} placeholder informs Mews to add the number value after the prefix.
- The three zeros specify that Mews needs to make the number value three digits long.
- The first value added to the result is 0. The second result is "2023001". Note: The bill counter starts counting from the initial number that you set in the Start value field of the counter settings. If you set your Start value as "999", the result is "2023999" for this example.
The example string format 2023{0:000} includes the following elements:
- "2023": The prefix, which is the constant part of the string, appears as it is in the final number format. Note: The prefix can also include text.
- "{0}": The placeholder, informs Mews where to place the actual number of the bill. Note: You set the number from where you want the bill counter to start counting in the Start value field in the bill counter settings.
- ":000": The formatting, which informs Mews the number of digits that need to be in the number after the prefix. You can add as many zeros as you need to set the desired length. Note: The above example makes the number three digits long by adding more zeros in the beginning if necessary.
Once you have set your number format, the Value increases incrementally as you issue new invoices. However, the prefix and formatting stay the same. For example:
- 2023000, 2023001, 2023002, 2023003, …
To configure the Number format field, you need the {0} placeholder, as it informs the system where to place the actual bill number.
Note: If you enter text or numbers into the Number format field and don’t include the correct C# String.Format function, Mews starts the counter from Value.
To configure the Number format field for a counter:
- In Mews Operations, go to the main menu
> Settings > Property > Finance.
- Click on Counters. The Counters screen consists of the following four sections:
- Bill counters
- Proforma counters
- Preview counters
- System generated counters
-
Select the desired section you want to create or edit a counter for.
- To create a new counter, click on the + Add button.
- To edit a counter, click the three
dots icon alongside the counter.
-
Under Number format, enter your string formatting.
-
Complete the remaining fields. Note: You can learn more about the counter settings overview and a detailed explanation of the fields here.
-
Click Create to add a new counter or Save to save the edits.
Here are some recommended examples of common number formats in Mews and their appearance in the invoice title:
| Input in Number format field | Display in invoice title | Sequential numbering result |
|
{0:0} |
0 |
1, 2, 3, 4, ... |
|
{0:00000} |
00000 |
00001, 00002, 00003, 00004, ... |
|
2023{0:0000} |
20230000 |
20230001, 20230002, 20230003, 20230004, ... |
|
RK {0:0000} |
RK 0000 |
RK 0001, RK 0002, RK 0003, RK 0004 … |
|
2023 {0:0000} |
2023 0000 |
2023 0001, 2023 0002, 2023 0003, 2023 0004 … |
|
2023-{0:0000} |
2023-0000 |
2023-0001, 2023-0002, 2023-0003, 2023-0004 … |
|
{0} Thank you for your visit |
0 Thank you for your visit |
1 Thank you for your visit, 2 Thank you for your visit, 3 Thank you for your visit, 4 Thank you for your visit ... |
Note: The following number format is valid but incorrect:
-
Proforma{0:0000}
as it results in the following bill titles:
- Bill Proforma 0001
- Bill preview Proforma 0001
- Proforma invoice Proforma 0001
Here are some incorrect examples of number formats in Mews and their appearance in the invoice title:
|
Input in Number format field |
Display in invoice title |
Sequential numbering result |
|
2023 |
0 |
1, 2, 3, 4, ... |
|
2023(0:0000) |
0 |
1, 2, 3, 4, ... |
|
2023{0;000} |
0 |
1, 2, 3, 4, ... |
You can learn more about setting bill and invoice numbering with counters here.