IMA-WorldHealth / bhima-1.X

A hospital information system for developing countries.
GNU General Public License v2.0
10 stars 14 forks source link

Ensure exchange rates and transaction amounts are processed correctly. #693

Open sfount opened 9 years ago

sfount commented 9 years ago

Influenced by #692

This is not the highest priority because the exchange rate has always been 920/930 for the past 2 years. However it is essential that BHIMA handles core financial transactions correctly.

Currently both the auxiliary cash box and I believe a number of reports translate USD to FC using today's exchange rate - this is not my understanding of how the process works.

Please correct me if I'm wrong.

  1. Sale is processed on day x, the charge is $100, 92,000FC
  2. Patient pays on day y (y!=x), even if the patient wishes to pay in FC the charge should be no more or less than the transaction charged at point of sale.
  3. The difference in the exchange rate from day x to day y represents money gained and lost on transaction

This specific issue can actually be resolved by just providing the date of transaction to the auxiliary cash box. However the principle of ensuring that the accounting from point of sale to payment, payment of cash, trial balance and committing to the general ledger is correct.

Let me know if my understanding of the hypothetical transaction is incorrect.

jniles commented 9 years ago

@sfount, the answer (after discussing with Mr. Wayne) is that this is an enterprise decision. Who absorbs the gain or loss on exchange?

Scenario 1 The patient absorbs the gain or loss on exchange. This means that the bill is $100 from the enterprise's perspective -- it does not matter what the FC price is. When the patient comes to pay, if the rate is now 930 FC : 1 USD, the patient must pay 930.000 FC for his/her bill. If the exchange rate drops to 1 FC : 1 USD, the patient must pay 100 FC for his/her bill.

Scenario 2 The enterprise absorbs the gain or loss on exchange. This means that the bill is generated at $100, and issued to the patient at 920.000 FC, according to that days exchange rate. The exchange rate rises to 930 FC : 1USD, the patient still only is charged 920.000 FC and the enterprise rolls up the loses into a gain or loss on exchange account. If the rate drops to 1 FC : 1 USD, the patient still owes 920.000 FC and the enterprise rolls up the extra revenue into the gain or loss on exchange account.

As the bhima dev team, we have two options: we either support both scenarios or we pick one. Considering out clientele are largely poorer and uneducated, scenario 1 is a bad idea. No one will understand the financial process, patients will feel ripped off, and it will be overly complicated to explain to administrators. Therefore, if we support one, I recommend we pick scenario 2 which is exactly what you describe in this issue.

We could try and support both with a configuration, but I would schedule that for bhima version 2 when we start scaling up to multiple hospitals. For the moment, let's stick to the current scenario 2.

sfount commented 9 years ago

Thanks for confirming that!

I agree that scenario 2 is the only option for our context. The easiest (naive) way I can think about it is:

I also agree that it is not worth supporting option 1 for the near future, I can only imagine this ever working in a synchronous world where payments are requested, made and processed at the same time.