-
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
feat: Implementation of event invoice generation & calculation #6121
feat: Implementation of event invoice generation & calculation #6121
Conversation
b1ddf94
to
e0fc90c
Compare
e0fc90c
to
6db197f
Compare
Codecov Report
@@ Coverage Diff @@
## development #6121 +/- ##
===============================================
- Coverage 66.41% 66.32% -0.09%
===============================================
Files 286 286
Lines 14380 14408 +28
===============================================
+ Hits 9550 9556 +6
- Misses 4830 4852 +22
Continue to review full report at Codecov.
|
@uds5501 @shreyanshdwivedi Please have a look |
Implement completely, you have just added helpers |
I was waiting for the FE integration to be done so that I could test it
out. Is that okay?
…On Fri, 28 Jun 2019 at 9:39 PM, Areeb Jamal ***@***.***> wrote:
Implement completely, you have just added helpers
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6121?email_source=notifications&email_token=AGAHUW3IPRT7W2VQJWVKESLP4YZSTA5CNFSM4H4CUD72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY2P5IQ#issuecomment-506789538>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGAHUW5WMGPDZXB4LDHCTTDP4YZSTANCNFSM4H4CUD7Q>
.
|
@iamareebjamal Is it okay if I implement the invoice generation in a follow up PR? |
I don't recommend breaking up same feature into multiple PRs. 1 commit = 1 complete feature |
Alright will do it here itself
…On Sat, 29 Jun 2019 at 7:00 PM, Areeb Jamal ***@***.***> wrote:
I don't recommend breaking up same feature into multiple PRs. 1 commit = 1
complete feature
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6121?email_source=notifications&email_token=AGAHUW3GCERCLL4PPRWKZH3P45PY3A5CNFSM4H4CUD72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY3Y3GQ#issuecomment-506957210>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGAHUW65LCE2PUJFIA4FY23P45PY3ANCNFSM4H4CUD7Q>
.
|
52a532e
to
f722bf1
Compare
ticket_fee_object = db.session.query(TicketFee).filter_by(currency=currency).one() | ||
ticket_fee_percentage = ticket_fee_object.service_fee | ||
ticket_fee_maximum = ticket_fee_object.maximum_fee | ||
orders = Order.query.filter_by(event=event).all() |
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 'orders' is assigned to but never used
currency = event.payment_currency | ||
ticket_fee_object = db.session.query(TicketFee).filter_by(currency=currency).one() | ||
ticket_fee_percentage = ticket_fee_object.service_fee | ||
ticket_fee_maximum = ticket_fee_object.maximum_fee |
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 'ticket_fee_maximum' is assigned to but never used
for event in events: | ||
currency = event.payment_currency | ||
ticket_fee_object = db.session.query(TicketFee).filter_by(currency=currency).one() | ||
ticket_fee_percentage = ticket_fee_object.service_fee |
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 'ticket_fee_percentage' is assigned to but never used
ticket_fees = event.tickets_sold * ticket_fee_percentage | ||
if ticket_fees > ticket_fee_maximum: | ||
ticket_fees = ticket_fee_maximum | ||
net_revenue = gross_revenue - ticket_fees |
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 'net_revenue' is assigned to but never used
from app.models.ticket import Ticket | ||
from app.models.ticket_fee import get_fee | ||
from app.models.ticket_fee import TicketFees, get_fee |
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.
redefinition of unused 'TicketFees' from line 19
8d8f3b0
to
d2484cb
Compare
Solve codacy issues |
@@ -82,6 +82,7 @@ | |||
'ticket_attendee': 'attendees/tickets/pdf/{identifier}', | |||
'order': 'orders/invoices/pdf/{identifier}', | |||
'tickets_all': 'orders/tickets/pdf/{identifier}' | |||
'event_invoice': 'events/organizer/invoices/pdf/{identifier}' |
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.
SyntaxError: invalid syntax
from app.models.ticket import Ticket | ||
from app.models.ticket_fee import get_fee | ||
from app.models.ticket_fee import TicketFees, get_fee |
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.
redefinition of unused 'TicketFees' from line 22
fe72503
to
c1449c9
Compare
c1ab04c
to
7e8e4cf
Compare
7e8e4cf
to
c2e3af4
Compare
@iamareebjamal @shreyanshdwivedi @uds5501 Please have a look. If this is fine, will continue to implement further sub-issues linked to this. |
I think I need modify the query such that the ticket sales which are queried should Only be restricted to that particular month, for a monthly cycle |
c2e3af4
to
fc88657
Compare
7796e9f
to
3b1c24b
Compare
2dece3b
to
d999881
Compare
Implemented function for event invoice calculation Added net_revenue & gross_revenue added logic for pdf and saved to DB Scheduled job on 1st of every month Hound & codacy Changed to monthly revenue
d999881
to
ab066ac
Compare
@CosmicCoder96 @iamareebjamal @uds5501 @shreyanshdwivedi Please have a look as this is a requirement for #6145 to move forward. |
Fixes #abc, #xyz doesnt work in GitHub. Separate issues in separate lines |
…sia#6121) Implemented function for event invoice calculation Added net_revenue & gross_revenue added logic for pdf and saved to DB Scheduled job on 1st of every month Hound & codacy Changed to monthly revenue
Fixes #6120
Fixes #6124
Short description of what this resolves:
This implements a module for event invoice where the monthly gross amount & net amount are calculated and sent to every organizer on the 1st of every month.
Changes proposed in this pull request:
Checklist
development
branch.