# Invoice numbering

**URL:** <https://forum.bubble.io/t/invoice-numbering/21138>\
**Category:** Database\
**Created:** [December 1, 2017, 10:33am UTC](https://forum.bubble.io/t/invoice-numbering/21138 "2017-12-01T10:33:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wouter.de.heer](https://avatars.discourse-cdn.com/v4/letter/w/848f3c/32.png) [@wouter.de.heer](https://forum.bubble.io/u/wouter.de.heer)\
**Post date:** [December 1, 2017, 10:33am UTC](https://forum.bubble.io/t/invoice-numbering/21138/1 "2017-12-01T10:33:16Z")

</div>

Hi all,

I’m trying to add invoicing to my bubble app. The issue I’m dealing with right now is: Invoice numbering.

The naming convention for invoicing is: [year][number] where [year] should be extracted from invoice date and [number] should be a consecutive number (starting from a predefined number per year)

So for example  
2017: from 2017350 --\> 2017XXX  
2018: from 2018351 --\> 2018XXX

As invoice numbering should be sequential. It should also be possible to remove an invoice, so the numbering should be aware of the existing invoices…

Does anyone have an idea how to do this in bubble?

Thanks!

Wouter.

---

<div class="post-metadata">

**Author:** ![mguerrasio](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@mguerrasio](https://forum.bubble.io/u/mguerrasio)\
**Post date:** [December 1, 2017, 1:38pm UTC](https://forum.bubble.io/t/invoice-numbering/21138/2 "2017-12-01T13:38:07Z")

</div>

So just create a table for invoices, put a invoiceNumber field in the table and when you create a new invoice just make the new invoiceNumber be equal to the highest current invoice number + 1. In the workflow you can create the invoice without a name first, then modify the invoice in the next step to create the name from invoice date + new invoiceNumber.

Marc
