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: paid_amount when the group is mode of payment #36092

Merged

Conversation

HarryPaulo
Copy link
Contributor

@HarryPaulo HarryPaulo commented Jul 11, 2023

OBS: R$ is a currency

Problem: If i create a invoice with total amount of R$ 100, paying this with two mode of payments:
Cash / Money: R$ 80
Credit Card: R$ 20

Using the report POS Register, set the filter "group_by" based on payment method, column Paid Amount show R$ 100 for both mode of payments, this is wrong.

image

>> Now With the fix <<

Now whent we group based on payment method, the amount will be based on mode of payment Cash / Money: R$ 80 and Credit Card: R$ 20

image

If we have change, this amount will be discounted on CASH type.

Example 1: one sale with amount R$ 90.
image
image

Example 2:
This situation is not common, and is not allowed in many establishments, but it is the following, R$ 100 was sold, with payment of R$ 120 on the credit card, generating a change of R$ 20, the change will be made and deducted from the cash payment method.

image
image

As the amount came out of the drawer to give change, in this case it will be negative, deducting from the general balance of the payment in "Cash / Money"

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jul 11, 2023
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #36092 (2268f7d) into develop (7fb1e5b) will increase coverage by 0.48%.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #36092      +/-   ##
===========================================
+ Coverage    63.72%   64.20%   +0.48%     
===========================================
  Files          813      785      -28     
  Lines        60113    60704     +591     
===========================================
+ Hits         38307    38975     +668     
+ Misses       21806    21729      -77     
Impacted Files Coverage Δ
...pnext/accounts/report/pos_register/pos_register.py 0.00% <0.00%> (ø)

... and 172 files with indirect coverage changes

@stale
Copy link

stale bot commented Jul 27, 2023

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Jul 27, 2023
@HarryPaulo
Copy link
Contributor Author

waiting for reviewers

@stale stale bot removed the inactive label Jul 27, 2023
@deepeshgarg007 deepeshgarg007 merged commit fff83bc into frappe:develop Jul 27, 2023
15 of 16 checks passed
@deepeshgarg007 deepeshgarg007 added the backport version-14-hotfix backport to version 14 label Jul 27, 2023
deepeshgarg007 added a commit that referenced this pull request Jul 27, 2023
…-36092

fix: paid_amount when the group is mode of payment (backport #36092)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants