-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: Invoice emails errors fixed and integration test #6804
fix: Invoice emails errors fixed and integration test #6804
Conversation
aa9cef9
to
94453b7
Compare
caa165f
to
acc054e
Compare
acc054e
to
8d16743
Compare
76f9730
to
bed751b
Compare
bed751b
to
ccfec36
Compare
ccfec36
to
d539a83
Compare
test_order.amount = 100 | ||
test_order.event = test_event | ||
# ticket holder factory | ||
test_ticket_holder = AttendeeFactory() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'test_ticket_holder' is assigned to but never used
fix: fixed factory
d539a83
to
70e82a6
Compare
The event invoice is calculated as: |
0ad1b1b
to
e251230
Compare
Codecov Report
@@ Coverage Diff @@
## development #6804 +/- ##
============================================
Coverage 65.86% 65.86%
============================================
Files 307 307
Lines 15382 15382
============================================
Hits 10131 10131
Misses 5251 5251
Continue to review full report at Codecov.
|
6c5f556
to
0d2319a
Compare
ae0aba2
to
ccfda72
Compare
fb78f0d
to
f780044
Compare
f780044
to
6a29b66
Compare
if ticket_fees > ticket_fee_maximum: | ||
ticket_fees = ticket_fee_maximum | ||
net_revenue = gross_revenue - ticket_fees | ||
invoice_amount = gross_revenue * (ticket_fee_percentage / 100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering the Absorb Fees option as of now. Pass fees onto attendees can be implemented as well as a part of the upcoming features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diru1100 Hi, would be great if you could review the logic for this. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, Eventbrite seems to calculate it in the same way. The only difference is that they add a fixed rate to the calculated amount too. 2% + 0.79$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iamareebjamal I think this should be good to go.
cc0c5e6
to
3cf20c8
Compare
If the invoice calculation is fine here, we can go ahead with the test over here #6820 |
Do you want to add the test here itself? |
I’ve added the test for the scheduled task here.
…On Thu, 6 Feb 2020 at 12:42 PM, Areeb Jamal ***@***.***> wrote:
Do you want to add the test here itself?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6804?email_source=notifications&email_token=AGAHUWZJXE64STENRITISSDRBOZ43A5CNFSM4KOSTZE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK6FN2I#issuecomment-582768361>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGAHUW6ZWHM2AGHRI5VIRM3RBOZ43ANCNFSM4KOSTZEQ>
.
|
Fixes #6486
Short description of what this resolves:
The invoice emails which were supposed to be sent out every month would error out if a ticket fee wasn't sent in the admin section.
Changes proposed in this pull request: