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

Mulysa custom invoice paid by transaction #551

Merged

Conversation

sbeach92
Copy link
Contributor

@sbeach92 sbeach92 commented Feb 1, 2025

Custom invoice payment logic has been carried out with its own function which will only move selected service paid_to date froward.

This PR change Custominvoice to use standard payment logic

Fixes issue of child subscriptions not get paid: #270

@sbeach92 sbeach92 force-pushed the mulysa-custom-invoice-paid_by-transaction branch from 68696d6 to c7eeb1b Compare February 2, 2025 14:35
@tswfi
Copy link
Member

tswfi commented Feb 3, 2025

@vranki I'd like to get your comments on this (its initially your code)

@tswfi
Copy link
Member

tswfi commented Feb 8, 2025

@sbeach92 could you rebase this and check the failing tests?

@sbeach92 sbeach92 force-pushed the mulysa-custom-invoice-paid_by-transaction branch from 63657c3 to 283be4b Compare February 10, 2025 20:22
@sbeach92 sbeach92 closed this Feb 10, 2025
@sbeach92 sbeach92 force-pushed the mulysa-custom-invoice-paid_by-transaction branch from 283be4b to a9a9c0e Compare February 10, 2025 21:37
@sbeach92 sbeach92 reopened this Feb 10, 2025
@tswfi
Copy link
Member

tswfi commented Feb 11, 2025

sorry, can you do another rebase. I fixed the CI run in #564

sbeach92 and others added 5 commits February 11, 2025 18:53
…ction

Custom invoice payment is carried by modified _service_paid_by_transaction
function. Funcion has add_days input variable.

Fixes issue: TampereHacklab#270

Signed-off-by: Erkki Hietaranta <[email protected]>
Child subscription paid to date is calculated
from days added to Parrent subscription so that multpile custominvoices
wont break basic idea of child payments.

Days that single payment adds are substracted from
days to add to Parent subscription. This is "virtual" payment
date. Single payment days of child subscription is added to
virtual payment date.

Child service is paid by calling funcion again. So now if child
service has childs, they get paid.

Prevent parent service to substract paid_to days

Signed-off-by: Erkki Hietaranta <[email protected]>
Added testcases for servicepayments in monthly recurring way.
Added testcases for custominvoice payments.
Added comments for childservice calultaion
Co-authored-by: Tatu Wikman <[email protected]>
Signed-off-by: Erkki Hietaranta <[email protected]>
@sbeach92 sbeach92 force-pushed the mulysa-custom-invoice-paid_by-transaction branch from cccfe96 to 11389ea Compare February 11, 2025 16:56
Run of ./manage.py makemessages -l fi --no-obsolete, to update translation files, even only rownumbers has change.

Signed-off-by: Erkki Hietaranta <[email protected]>
Copy link
Member

@tswfi tswfi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@tswfi tswfi merged commit f6679d2 into TampereHacklab:master Feb 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants