Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(invoices): improve receipt currency rendering #7293

Merged

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Oct 9, 2023

This commit fixes two bugs in receipt rendering:

  1. The subsidies now follow the deb/cred convention we have previously established (Closes Invoice Receipts show a negative sign (-) for negative values #6923).
  2. The currency is properly rendered for totals of billing services (found while fixing this issue).

In addition, I also found a typo in the French translation of the period limit text and fixed that here.

Closes #6923.

Screenshots of changes:
Screenshot 2023-10-09 at 3 20 12 PM
Screenshot 2023-10-09 at 3 25 54 PM

This commit fixes two bugs in receipt rendering:

1. The subsidies now follow the deb/cred convention we have previously
   established (Closes Third-Culture-Software#6923).
2. The currency is properly rendered for totals of billing services
   (found while fixing this issue).

In addition, I also found a typo in the French translation of the period
limit text and fixed that here.

Closes Third-Culture-Software#6923.
@jniles jniles requested review from jmcameron and mbayopanda October 9, 2023 20:34
Copy link
Collaborator

@jmcameron jmcameron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good. Code changes are good and the changes work.

@@ -114,7 +114,7 @@
<table style="width: 100%;" class="table-report">
<tr style="border:0px">
<td class="text-right" style="border:0px">
<b>-{{currency (sum subsidy 'value') metadata.enterprise.currency_id}}</b>
<b>{{debcred (multiply (sum subsidy 'value') -1) metadata.enterprise.currency_id}}</b>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jmcameron
Copy link
Collaborator

bors r+

bors bot added a commit that referenced this pull request Oct 12, 2023
7293: fix(invoices): improve receipt currency rendering r=jmcameron a=jniles

This commit fixes two bugs in receipt rendering:

1. The subsidies now follow the deb/cred convention we have previously established (Closes #6923).
2. The currency is properly rendered for totals of billing services (found while fixing this issue).

In addition, I also found a typo in the French translation of the period limit text and fixed that here.

Closes #6923.

Screenshots of changes:
<img width="915" alt="Screenshot 2023-10-09 at 3 20 12 PM" src="https://github.com/IMA-WorldHealth/bhima/assets/896472/6f99747d-918e-474e-a2ee-50b2fa256d57">
<img width="915" alt="Screenshot 2023-10-09 at 3 25 54 PM" src="https://github.com/IMA-WorldHealth/bhima/assets/896472/e517c424-d7d3-476c-b500-5b6701f739a0">


Co-authored-by: Jonathan Niles <jonathanwniles@gmail.com>
@bors
Copy link
Contributor

bors bot commented Oct 12, 2023

Build failed:

@jmcameron
Copy link
Collaborator

If at first you don't succeed...

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 12, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit e7f2771 into Third-Culture-Software:master Oct 12, 2023
@jniles jniles deleted the 6923-fix-negative-sign-on-subsidies branch October 12, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invoice Receipts show a negative sign (-) for negative values
2 participants