Invoice Number Generator

Options
brian
brian Administrator

ADMIN

edited December 2022 in ✂️ Snippets

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:

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!