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

Feature request: Set the filename for the invoice #7

Open
Joshfindit opened this issue Jan 18, 2022 · 1 comment
Open

Feature request: Set the filename for the invoice #7

Joshfindit opened this issue Jan 18, 2022 · 1 comment

Comments

@Joshfindit
Copy link

The current format is nicely informative, but we would like to change it by adding:

  • The string "Aliexpress" to the beginning
  • The invoice amount in the currency is was charged
  • The currency type itself

Example:

Aliexpress-invoice-2021-11-05-1554-644########289.$25USD.pdf

We'd be open to any sort of templating format such as passing the JS template string directly in to `background.js'

`Aliexpress-invoice-${getFilenameComponent(date)}-${getFilenameComponent(number)}.$${order.cost}${order.currency}.pdf`
@Joshfindit Joshfindit changed the title Possible to set the filename for the invoice? Feature request: Set the filename for the invoice Jan 18, 2022
@Johennes
Copy link
Owner

Thanks for reporting this @Joshfindit. That's an interesting idea and shouldn't be too hard to implement. I also like the template idea. To make editing a little easier maybe we could agree on a set of format specifiers such as

%i  Invoice number
%d  Invoice Date
%a  Total amount (in charged currency)
%s  Charged currency code
...

That way for your case the template would be

Aliexpress-invoice-%d-%n-%a-%s.pdf

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants