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: Fix and test cron job for Invoice Due Marking #6510
Conversation
Will update it asap.
…On Sun, 6 Oct 2019 at 8:42 PM, Areeb Jamal ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tests/all/integration/api/helpers/test_scheduled_jobs.py
<#6510 (comment)>
:
> + event_invoice_obj = EventInvoiceFactory()
+ event_obj = EventFactoryBasic()
+ event_obj.ends_at = datetime.date(2019, 7, 20)
+ event_invoice_obj.event = event_obj
+ save_to_db(event_obj)
+ save_to_db(event_invoice_obj)
Can be changed to a single line
event_invoice_obj = EventInvoiceFactory(event__ends_at=datetime.date(2019, 7, 20))
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6510?email_source=notifications&email_token=AGAHUW52KHCCOVWWSV25URDQNH56FA5CNFSM4I54FMA2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCHAL2SQ#pullrequestreview-297844042>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGAHUW64G4NUP5QH3CVSNUTQNH56FANCNFSM4I54FMAQ>
.
|
I don't think you read the answer in SO question, you can't use update after using join. Also, you can run the test locally before pushing, |
I'll be adding for another test case where it shouldn't be marked as due. |
e11df48
to
41bea62
Compare
8f0c3b8
to
054a822
Compare
a8d515c
to
37eb3f8
Compare
Seems like created_at check won't work this way. @mrsaicharan1 Can you tell me what does marking due means in terms of invoices? |
So the basic workflow here is that whenever an invoice is created, after 30 days from its creation, it would be marked as due [upcoming->due] |
Fixes #6494
Short description of what this resolves:
Fixed event invoice marking error and added integration test for the same.
Changes proposed in this pull request: