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

Export Invoices to new currency #878

Open
maltfield opened this issue Oct 7, 2024 · 6 comments
Open

Export Invoices to new currency #878

maltfield opened this issue Oct 7, 2024 · 6 comments

Comments

@maltfield
Copy link

maltfield commented Oct 7, 2024

This ticket is a feature request to add a way for this plugin to export an invoice in a different currency.

Why?

My store is in USD, but I have some customers in the EU that like to pay with SEPA transfer.

Currently I'm downloading the invoice in this plugin, opening the PDF in Libreoffice Draw, and manually editing the values before sending the invoice to the customer. I would prefer if I could just have this plugin automatically update invoice (eg update the numerical line items, update the currency symbol, etc) of the invoice at the time I download it.

How?

Currently my workflow is:

  1. Download invoice from wordpress
  2. Open invoice PDF in LibreOffice Draw
  3. Get current mid-market rate for USD -> EUR https://www.xe.com/currencyconverter/convert/?From=USD&To=EUR
  4. Find & Replace all $ to
  5. Loop through every line item and multiply the numerical value in the PDF by the mid-market rate obtained in step [3], rounding to the nearest hundredth decimal value.
  6. Calculate the new total price, and update the Total field's numerical value.
  7. Update the invoice header to include our business bank account's IBAN number

Basically, I'd want ^ this process implemented in PHP, with the following constraints:

  1. Fetching the mid-market currency rates should be done by the client, not the server (to support hardened servers where firewalls and WP_HTTP_BLOCK_EXTERNAL block the server from initiating requests)
  2. Javascript shouldn't be required (eg use <noscript> to add an input where the user can enter the exchange rate)
@maltfield
Copy link
Author

maltfield commented Oct 7, 2024

Would the devs be open to a PR for this feature? If so, please point me to the relevant files & functions that you think would need to be edited, and do let me know if you have any ideas regarding UI or otherwise.

@maltfield
Copy link
Author

I'm also curious if it might make more sense to achieve this with a plugin that allows me to change the currency of an order:

@alexmigf
Copy link
Member

alexmigf commented Oct 8, 2024

Hi @maltfield

We are working on adding compatibility between our Professional extension and the Curcy multi-currency plugin. Could you please reach out to us via email so we can discuss this further?

@maltfield
Copy link
Author

@alexmigf I could email you, but wouldn't it be better to have the conversation publicly here on GitHub, so others can read it and join the discussion?

@alexmigf
Copy link
Member

@maltfield Thanks for your feedback! We're glad to see interest in multi-currency conversion. Currently, we’re planning to include this feature in the paid version of the plugin, as it wasn't part of our initial vision for the free version. However, we’ll discuss it internally and evaluate how we can enhance the free version in the future. Feel free to share any additional ideas here, as community input is always valuable!

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