How to create invoice in a different currency - invoice

In Dolibarr, I have set the default currency to US Dollars. When I create a new invoice, the currency of the invoice will be in the default currency. Is there a way to change the currency for a single invoice? I want to create one invoice where the amounts are in Euros instead of US Dollars.
Dolibarr version: 15.0.3

Related

Drupal8 Currency Module, How to configure in my content type and views?

I installed the Currency module in my localhost, i really in need of the currency converter dynamically.
I store the currency value in USD on my field and shown as its in my view of table format.
For Customer, view of currency drop-down will be there, if the user selects the currency the value it need to be convert from USD to AUD, AUD to NZD etc., like this.
Kindly Provide me solution whether the currency converter gets the latest exchange rate and currency value.
Need for support
If you use Coorrency - Currency Converter module ,then this is the stratergy
if you use a free service then the rates are refreshed every 30
minutes.
if you use a Premium service then the rates are refreshed every 15 minutes.

Send "Total Vat Amount" with Invoice and Description from my database to Xero account

I am using "Invoice PUT method" to store invoice details from server to Xero account.
Is there any way to import "Total Vat Amount" with Invoice and Description?
Because some of my old invoice are not include Vat amount.
I have found a tag "TaxAmount". Is it same as Vat amount? If yes, then how can I use "TaxAmount" in Invoice PUT method.
Thanks.
Yes, VAT is equal to tax.
In Xero API, TotalTax is a read-only value thus cannot be used with PUT. However, you can use TaxAmount to insert the tax calculation.
Notes:
TaxAmount is normally used to insert your own tax calculation. If the TaxAmount is not used, Xero will automatically calculates its value from the default tax rate of the nominal/account code.
Xero calculates taxes for each line item(s). Thus if your invoice only a single line item, the TaxAmount = TotalTax

Currency of in-app billing transaction

I see that the response I get from Google Play after the user had purchased one of my in-app products contains the following information:
Description, ItemType, Json, Price, Sku, Title and Type
Price is a string that contains the currency and price. eg: "€1.17".
I would like to get the same price information in a more structured way and separately. Something like a three digit ISO code of the currency and the price in numeric format, without having to parse the string, which would have been ugly and unsafe.
Do you think that there is a way to do this?
Check price_amount_micros field.
Price in micro-units, where 1,000,000 micro-units equal one unit of
the currency. For example, if price is "€7.99", price_amount_micros is
"7990000".
More here: In-app Billing Reference

How to sum up different currencies in Rails app?

I am currently building a Ruby on Rails invoicing application that is multilingual and supports a range of currencies. In the dashboard view all invoices a user has produced are totalled.
Now it would be nice if a user could choose the currency for each invoice.
But how can those invoices be totalled if different currencies are used?
E.g. if these three invoices were created today:
Invoice No. 1: $1000.00
Invoice No. 2: $2000.00
Invoice No. 3: €1000.00
Total: $4333.60
----------------------
The dollar-euro exchange rate would have to be based on each invoice's date of course.
How can this be achieved in Rails and does it even make sense?
Thanks for any pointers.
The sum of of multiple invoices using different currencies is not a single number, it's a collection of numbers. If you have a 20 USD invoice, a 15 EUR invoice, and a 20 EUR invoice, the sum is "20 USD + 35 EUR".
At the time when a payment is made from a single account using a single base currency, then a conversion will be performed to determine how much will have to be paid in that currency to cover the total converted costs. Presumably, there will also be currency conversion fees added at that time.
It would be convenient if you change the currency to a single one, either euro or dollar right when the user makes an invoice. That is, you save the 'converted' value in your database. In this way you won't have to lookup for past day rates.
Eu_central_bank provides exchange rates.

Store Currency code along with price

I am storing a price in my database.
I figured I should store the currency as my application with need to support internationalisation.
I believe the correct way is to store the ISO 4217 currency code, such as USD for US$, AUD for AU$ and EUR for Euros ...
I have a price and a currency attribute in model... Am I doing it right?
How do convert the currency code to it Symbol version? is there a helper for this? do I need to create myself a corresponding hash?
Cheers,
Joel
You should have a look at the Money gem. Handles currency codes and has support for exchange rates and formatting.
https://github.com/RubyMoney/money

Resources