Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chris
repanier
Commits
247f05a4
Commit
247f05a4
authored
Mar 17, 2017
by
Patrick
Browse files
Use previous payment date of the permanence in case such date is known
parent
f18942ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
repanier/admin/permanence_done.py
View file @
247f05a4
...
...
@@ -265,9 +265,11 @@ class PermanenceDoneAdmin(TranslatableAdmin):
producer_invoice
.
save
(
update_fields
=
[
'calculated_invoiced_balance'
])
permanence_form
=
PermanenceInvoicedForm
(
payment_date
=
max_payment_date
)
if
permanence
.
payment_date
is
not
None
:
# In this case we have also, permanence.status > PERMANENCE_SEND
permanence_form
=
PermanenceInvoicedForm
(
payment_date
=
permanence
.
payment_date
)
else
:
permanence_form
=
PermanenceInvoicedForm
(
payment_date
=
max_payment_date
)
qs
=
ProducerInvoice
.
objects
.
filter
(
producer__to_be_paid
=
True
,
permanence_id
=
permanence
.
id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment