Created
April 27, 2017 06:38
-
-
Save nord/98876951d9c77218a25e9e919f8afccd to your computer and use it in GitHub Desktop.
Create invoices in EUR. Used by Sufio for Shopify (sufio.com/shopify). http://sufio.com/articles/shopify/create-invoices-from-orders/multiple-currencies/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Create invoices in EUR. Used by Sufio for Shopify (sufio.com/shopify). --> | |
<input type="hidden" name="attributes[Invoice Currency]" value="" /> | |
<input type="hidden" name="attributes[Invoice Currency Rate]" value="" /> | |
<script src="//cdn.shopify.com/s/javascripts/currencies.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
var currency_code = 'EUR'; // Invoice Currency Code | |
var currency_rate = 1/Currency.rates[currency_code]; | |
$('input[name="attributes[Invoice Currency]"]').val(currency_code); | |
$('input[name="attributes[Invoice Currency Rate]"]').val(currency_rate); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment