prandible / cf7-sevdesk

Automation for SevDesk Users. Send your Contact Form 7 input to SevDesk
0 stars 0 forks source link

Add Invoice No. #2

Closed PaulAnderie closed 5 years ago

PaulAnderie commented 5 years ago

We need to create in the draft an invoice number according to the last invoice. So when the last invoice has the number 14 we need to put in the number 15 and so on.

PaulAnderie commented 5 years ago

Hey @cezarys thanks a lot. I've just checked the invoice number and can we include a Prefix? If you check the latest invoice it's RE-1000 and it would be great if we can use this structure. Bildschirmfoto 2019-04-05 um 09 51 13

cezarys commented 5 years ago

@PaulAnderie - I think yes, I can do this

PaulAnderie commented 5 years ago

@cezarys it's getting a bit complexer. Can we make the syntax like

RE-YYYY-incremental no.

for example RE-2019-1452 and the next would be RE-2019-1453. If it's 2020 the number we will continue with increasing the last 4 digits by 1.

Is that something we can build?

WhatsApp Image 2019-04-05 at 10 21 49

cezarys commented 5 years ago

@PaulAnderie done! Have a look:

https://my.sevdesk.de/#/fi/edit/type/RE/id/6699380

PaulAnderie commented 5 years ago

ok looks great and will it turn 2020 next year? The last 4 digits will stay and increase with +1 in 2020. Pls confirm that, really quick and I can close this issue @cezarys

cezarys commented 5 years ago

yes I confirm, 2nd segment is always current year, so will turn into 2020, and last segment will increment, no matter if it was this eyar or last year