Geetings all, I'm very interested in fixing Bug 302609 and related bugs. http://bugzilla.gnome.org/show_bug.cgi?id=302609
On this matter, Derek says: """ It's a LOT more difficult than you expect. Right now the invoice system does not handle multiple currencies. Any particular invoice can be in any currency you want, but all accounts touched by that invoice (including A/R, expenses, etc) MUST be in the same currency. The system does not actually enforce this, but your results will be wrong if you violate this requirement. I have no expectation that this will get fixed anytime soon. If you want to create an invoice in USD then you need a USD A/R and a USD Income account. """ My proposal to fix this is: When posting invoices/bills/vouchers, insist and enforce that the A/P / A/R account must match the currency of the vendor/customer/employee . On payments, if the transfer account is in a different currency from the A/P / A/R account, follow the prompt with a "Transfer funds" dialog (the one you see when creating transactions between two accounts with different currencies from the register) to specify the exchange rate on the day of the transaction. When bills/invoices/vouchers are posted, build a list of all the entry accounts (e.g. income and expense) that do not match the vendor currency, and prompt with a "Transfer funds" dialog for each of these non matching currencies. It would also be nice to add quote fetching to the "Transfer funds" dialog as well. In all cases, both the amount and value attribute for each split would get set with appropriate values. My assumption here is that the amount you enter in each bill entry line is in the currency of the vendor, regardless of the currency/commodiy of the income/expense account selected. I believe that is a sane default, but that in some cases there could be bills/invoices with lines expressed in multiple currencies, and a total and account balance in the vendor/customer currency. To allow for that case, I would add a checkbox column for bill/invoice entry lines. (and perhaps give us the option to hide it on a per vendor/customer basis or globally, as screen real estate is getting tight on those invoice entry columns.) The checkbox could be checked by default, and mean "amount is in vendor currency", checkbox could be not checked by default, and mean "amount is in account currency" Here are some example transactions to help those who like to think in terms of examples: 1 CAD = 2 USD (just joking) Accounts Assets:GST Receivable ( in CAD) (goods and services tax in Canada, which is refundable at the end of the year if it was for business purposes and if you're a business also collecting GST) Expenses:Pharmaceuticals (in CAD) Expenses:Super Pharmaceuticals (in CAD) Liabilities:Accounts Payable USD (in USD) Liabilities:Credit Card (in CAD) Vendor Happy Pharmaceutical Company Currency: USD I receive a bill from the pharmaceutical company that says: 1 box of super happy @ $2.5 1 box of feeling great @ $2.5 GST = 0.30 CAD total = 2.5 + 2.5 + 0.60 ( 2*0.30) = 5.6 USD So, I create a new bill, and put in the following lines: Entry 1 description: good drugs, account: Expenses:Pharmaceuticals, quantity: 1, unit price: 2.5, amount is in vendor currency: checked-off Entry 2 description: nice drugs, account: Expenses:Super Pharmaceuticals, quantity: 1, unit price: 2.5, amount is in vendor currency: checked-off Entry 3 description: sales tax, account: Assets:GST Receivable, quantity 1, unit price: 0.3, amount is in vendor currency: not checked-off I post the bill. I choose to post to Liabilities:Accounts Payable USD. I receive a "Transfer funds" prompt: Amount: 5.00 Debit account - Currency: CAD (Canadian Dollar) Credit account - Currency: USD (US Dollar) Currency transfer - Exchange rate: 2, 1 USD = 0.5 CAD or Debit Amount: 2.5, 1 CAD = 2.00 USD I the user enter in the exchange rate or debit amount at the bottom and I click Ok. I receive a second prompt: I receive a "Transfer funds" prompt: Amount: 0.3 Debit account - Currency: CAD (Canadian Dollar) Credit account - Currency: USD (US Dollar) Currency transfer - Exchange rate: 0.5, 1 CAD = 2 USD or Credit Amount: 0.6, 1 USD = 0.5 CAD I, the user enter in the exchange rate or credit amount at the bottom and I click Ok. When I view the splits from Accounts Payable USD: account debit credit Expenses:Pharmaceuticals 2.5 Expenses:Super Pharmaceuticals 2.5 Assets:GST Receivable 0.6 Liabilities:Accounts Payable USD 5.6 When I view the splits from any of the Canadian accounts account debit credit Expenses:Pharmaceuticals 1.25 Expenses:Super Pharmaceuticals 1.25 Assets:GST Receivable 0.30 Liabilities:Accounts Payable USD 2.80 Payment is very similar. I go to process payment, specify 5.6 as the amount, choose Liabilities:Credit Card as the transfer account, click Okay. There is a transfer funds prompt, Amount: 5.60 Debit account - Currency: USD (US Dollar) Credit account - Currency: CAD (Canadian Dollar) Currency transfer - Exchange rate: 1.9, 1 USD = 0.52 CAD or Credit Amount: 2.91, 1 CAD = 1.9 USD I, the user enter in the exchange rate used by my credit card company by typing something in under exchange rate or credit amount And here is the prospective from A/P account debit credit Liabilities:Accounts Payable USD 5.6 Liabilities:Credit Card 5.6 and the perspective from of the canadian credit card account account debit credit Liabilities:Accounts Payable USD 2.91 Liabilities:Credit Card 2.91 I'm willing to try implementing this, but I'd like feedback first. Also, do note that my choice of implementation will make the make multi currency support in the vendor/customer/employee and recievable/payable againg reports redundant, as A/P, A/R business transactions will always hit these accounts in their own currency. Mark Jenkins cc fellow ParITistas cc Jamie cc Jeff _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel