Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better PDF invoice name #743

Closed
digitall-it opened this issue Sep 5, 2019 · 6 comments · Fixed by #773
Closed

better PDF invoice name #743

digitall-it opened this issue Sep 5, 2019 · 6 comments · Fixed by #773
Assignees
Milestone

Comments

@digitall-it
Copy link

Is your feature request related to a problem? Please describe.
When downloading all the invoices for further processing, it is natural to order them by chronological order. Unfortunately, the invoice number is at the end of the file, after ID, which prevents it from sorting the PDFs in the file manager.

Describe the solution you'd like
I suggest to move the invoice internal ID after the invoice number.

Describe alternatives you've considered
No alternatives considered, apart from further renaming.

Additional context
Attached a screenshot of the downloaded files. I suggest moving the ID after the invoice number in the generated filename.

Schermata 2019-09-05 alle 22 51 17

@syjer syjer added this to the 2.0-M2 milestone Sep 6, 2019
@syjer
Copy link
Member

syjer commented Sep 6, 2019

hi @digitall-it , you are right, we will improve the naming so the resulting natural order is better.

@syjer syjer self-assigned this Sep 22, 2019
@syjer
Copy link
Member

syjer commented Sep 22, 2019

we have decided that the last part will be:

YYYY-MM-DD-InvoiceNumber where the date is the one written on the invoice and invoice number is a padded number (up to X characters). Thus the files will be ordered by invoice number.

Additionally, we will remove the uuid, which does not help

@digitall-it
Copy link
Author

thank you, so if the name of the invoice is "proforma-fattura", the event is called "charity-dinner" and the number is 37, what file name will I get? Because I think the "invoice-" part at the start should be also be dropped in favour of the invoice name. The suggested invoice would be called
proforma-fattura-charity-dinner-2019-09-16-00037.

@syjer
Copy link
Member

syjer commented Sep 23, 2019

@digitall-it , yep, removing the "invoice-" is a good idea. As you can only download invoices in the archive.

@syjer
Copy link
Member

syjer commented Sep 23, 2019

@digitall-it the "invoice number/name" (in you case "proforma-fattura-%d") is actually the part of the invoice number. It's not something that we can change.

The resulting name will be:

charity-dinner-2019-09-16-proforma-fattura-42

@syjer
Copy link
Member

syjer commented Sep 23, 2019

To ensure a little bit more the chronological order, I've added to the date also the time (hour, minutes, seconds).

The resulting name will be something like:

test-2019-09-23-164156-proforma-fattura-3.pdf

where:

  • test is the event name
  • proforma-fattura-3 is the invoice number with the format "proforma-fattura-%d"

I think it's a good compromise :)

syjer added a commit to syjer/alf.io that referenced this issue Sep 23, 2019
cbellone pushed a commit that referenced this issue Sep 26, 2019
* #743 change invoice name

* unify pdf name generation #734

* invoice nr generation: fallback in case the pattern is an empty string #734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants