An invoice number is a unique code assigned to each invoice, which you can accomplish by ensuring every invoice number has the same number of characters.
Generate a number for an invoice with leading zeros, such as:
- 00015
- 00301
- 12022
Here's how to get started:
- Snippet: https://www.xano.com/snippet/t1MmPPr-
- Loom walk-through: https://www.loom.com/share/457b4921448c45cb9670bab5e94a5eda
- Instructions: How to add a Snippet
It features:
- POST /invoice: add a new invoice, after checking if an invoice number is provided. If not, increment from the last invoice number by 1.
You can use this snippet to learn how to:
- Use a Conditional statement on an input
- Find the max value in a column using Query All Records
Feel free to add suggestions, requests, or questions in the comments!