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

fix: filter payments based on visible invoices #3102

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

brunomiguelpinto
Copy link
Contributor

@brunomiguelpinto brunomiguelpinto commented Jan 24, 2025

Context

This changes the scope for_organization in the Payment model, allowing payments only for visible invoices to be considered.

Description

only let the Invoices with statuses defined in Invoice::VISIBLE_STATUS.

@brunomiguelpinto brunomiguelpinto self-assigned this Jan 24, 2025
@brunomiguelpinto brunomiguelpinto added Invoice Related to Invoices Payment labels Jan 24, 2025
@brunomiguelpinto brunomiguelpinto changed the title fix: add visible scope on invoices fix: filter payments based on visible invoices and payment requests Jan 24, 2025
@brunomiguelpinto brunomiguelpinto changed the title fix: filter payments based on visible invoices and payment requests fix: filter payments based on visible invoices Jan 24, 2025
Copy link
Contributor

@julienbourdeau julienbourdeau left a comment

Choose a reason for hiding this comment

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

Can you share what issue this is fixing?

@brunomiguelpinto brunomiguelpinto merged commit 3881346 into main Jan 24, 2025
6 checks passed
@brunomiguelpinto brunomiguelpinto deleted the fix-filter-only-visible-invoices branch January 24, 2025 13:56
ivannovosad added a commit that referenced this pull request Jan 24, 2025
commit 385f811
Author: Ivan Novosad <ivan@getlago.com>
Date:   Thu Jan 23 17:21:04 2025 +0100

    feat(manual-payments): Add payment resolver, and filter by customer external_id

commit 00781e2
Author: Ivan Novosad <ivan@getlago.com>
Date:   Thu Jan 23 14:55:38 2025 +0100

    feat(manual-payments): Refactor payment model

commit 07af881
Author: Ivan Novosad <ivan@getlago.com>
Date:   Wed Jan 22 09:34:38 2025 +0100

    feat(manual-payments): Add more resolver specs

commit b4fee07
Author: Ivan Novosad <ivan@getlago.com>
Date:   Wed Jan 22 08:52:04 2025 +0100

    feat(manual-payments): Add premium integration types enum spec

commit ac22ef4
Author: Ivan Novosad <ivan@getlago.com>
Date:   Tue Jan 21 17:31:14 2025 +0100

    feat(manual-payments): Add positive_due_amount to invoices resolver

commit 7c2b00f
Author: Ivan Novosad <ivan@getlago.com>
Date:   Tue Jan 21 15:26:02 2025 +0100

    feat(manual-payments): Add customer to Payment object

commit 1087f64
Author: Ivan Novosad <ivan@getlago.com>
Date:   Mon Jan 20 17:36:59 2025 +0100

    feat(manual-payments): Add paymentProviderType to Payment object

commit ba5c623
Author: Ivan Novosad <ivan@getlago.com>
Date:   Mon Jan 20 11:14:37 2025 +0100

    feat(manual-payments): Fix rubocop warnings and specs

commit b890f28
Author: Miguel Pinto <darkymiguel@gmail.com>
Date:   Fri Jan 17 11:27:16 2025 +0000

    feat: merge pr

commit 65f0c61
Author: Ivan Novosad <ivan@getlago.com>
Date:   Fri Jan 3 11:45:57 2025 +0100

    feat(manual-payments): WIP - Add GQL enums, inputs and types

commit 8e9e11d
Author: Vincent Pochet <vincent@getlago.com>
Date:   Fri Jan 24 16:46:44 2025 +0100

    fix(payment): Ensure payment status is checkd as a string (#3104)

    ## Description

    This PR is related to #3088 it
    ensure that none of the payment `status`, `payable_payment_status` and
    related payables's `payment_status` are updated if an unknown status is
    received from a payment provider

commit ec8ef1f
Author: Anna Velentsevich <annvelents@gmail.com>
Date:   Fri Jan 24 16:15:29 2025 +0100

    Fix(rev-share): fix bugs found during QA (#3098)

    ## Context

    There were small issues found during the QA

    ## Description

    Fixed invoice numbering switching from customer-based to
    per-organization
    Do not allow edit customers via API if they are not editable

commit 4bbb63b
Author: Anna Velentsevich <annvelents@gmail.com>
Date:   Fri Jan 24 15:30:06 2025 +0100

    add rescue when failing to update charge filters and charges (#3103)

    ## Context

    When an organization have charges or charge filters with wrong
    properties, the migration fails and it's hard to indicate what exactly
    went wrong

    ## Description

    Added rescue to migration that fixes double properties for charges and
    charges filters

commit 3881346
Author: brunomiguelpinto <darkymiguel@gmail.com>
Date:   Fri Jan 24 13:56:37 2025 +0000

    fix: filter payments based on visible invoices (#3102)

    ## Context

    This changes the scope `for_organization` in the `Payment` model,
    allowing payments only for visible invoices to be considered.

    ## Description
    only let the Invoices with statuses defined in
    `Invoice::VISIBLE_STATUS`.

commit 035cea3
Author: Jérémy Denquin <jdenquin@users.noreply.github.com>
Date:   Fri Jan 24 12:14:33 2025 +0100

    fix(tasks): Fix signup task env var (#3101)
ivannovosad added a commit that referenced this pull request Jan 24, 2025
commit c51c077
Author: Ivan Novosad <ivan@getlago.com>
Date:   Thu Jan 9 14:15:28 2025 +0100

    feat(manual-payments): Add total paid and total due to pdf templates

commit 8e9e11d
Author: Vincent Pochet <vincent@getlago.com>
Date:   Fri Jan 24 16:46:44 2025 +0100

    fix(payment): Ensure payment status is checkd as a string (#3104)

    ## Description

    This PR is related to #3088 it
    ensure that none of the payment `status`, `payable_payment_status` and
    related payables's `payment_status` are updated if an unknown status is
    received from a payment provider

commit ec8ef1f
Author: Anna Velentsevich <annvelents@gmail.com>
Date:   Fri Jan 24 16:15:29 2025 +0100

    Fix(rev-share): fix bugs found during QA (#3098)

    ## Context

    There were small issues found during the QA

    ## Description

    Fixed invoice numbering switching from customer-based to
    per-organization
    Do not allow edit customers via API if they are not editable

commit 4bbb63b
Author: Anna Velentsevich <annvelents@gmail.com>
Date:   Fri Jan 24 15:30:06 2025 +0100

    add rescue when failing to update charge filters and charges (#3103)

    ## Context

    When an organization have charges or charge filters with wrong
    properties, the migration fails and it's hard to indicate what exactly
    went wrong

    ## Description

    Added rescue to migration that fixes double properties for charges and
    charges filters

commit 3881346
Author: brunomiguelpinto <darkymiguel@gmail.com>
Date:   Fri Jan 24 13:56:37 2025 +0000

    fix: filter payments based on visible invoices (#3102)

    ## Context

    This changes the scope `for_organization` in the `Payment` model,
    allowing payments only for visible invoices to be considered.

    ## Description
    only let the Invoices with statuses defined in
    `Invoice::VISIBLE_STATUS`.

commit 035cea3
Author: Jérémy Denquin <jdenquin@users.noreply.github.com>
Date:   Fri Jan 24 12:14:33 2025 +0100

    fix(tasks): Fix signup task env var (#3101)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Invoice Related to Invoices Payment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants