What currency does Magento use in the database table `sales_flat_order` if we have several orders with different base currencies

magento.stackexchange https://magento.stackexchange.com/questions/117494

Question

For example I want to use base_grand_total. I know that this value is displayed in the base currency on paper.

I have the data at sales_flat_order:

base_cur.   global_cur. order_cur.  store_cur.  base_to_gl_rate base_to_ord_rate    store_to_base_rate  store_to_ord_rate
CZK         CZK         CZK         CZK         1.0000          1.0000              1.0000              1.0000
EUR         EUR         EUR         EUR         1.0000          0.0385              1.0000              0.0385
CZK         CZK         CZK         CZK         1.0000          1.0000              1.0000              1.0000
PLN         PLN         PLN         PLN         1.0000          0.1667              1.0000              0.1667

The Base Currency of Website is CZK.

In which currency magento keeps the base_grand_total values in this case? Order currencies?

EDIT. What currency is used if base and order currencies are different? For example, base currency CZK, order currency EUR.

Thank you!

Was it helpful?

Solution 2

File /app/code/core/Mage/Sales/Model/Quote.php contains comment:

/**
 * Currency logic
 *
 * global - currency which is set for default in backend
 * base - currency which is set for current website. all attributes that
 *      have 'base_' prefix saved in this currency
 * store - all the time it was currency of website and all attributes
 *      with 'base_' were saved in this currency. From now on it is
 *      deprecated and will be duplication of base currency code.
 * quote/order - currency which was selected by customer or configured by
 *      admin for current store. currency in which customer sees
 *      price thought all checkout.
 *
 * Rates:
 *      store_to_base & store_to_quote/store_to_order - are deprecated
 *      base_to_global & base_to_quote/base_to_order - must be used instead
 */

OTHER TIPS

normally the base_grant_total (and all other fields that begin with base_) are kept in the value you set for default currency in the backend in system->configuration.
The grant_total is kept in the currency used to place the order.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top