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

feat: Add payment type and reference #3003

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

brunomiguelpinto
Copy link
Contributor

@brunomiguelpinto brunomiguelpinto commented Dec 24, 2024

Context

This PR lays the groundwork for implementing manual/partial payment functionality in our system. It introduces necessary changes to the payments and invoices tables to enable the tracking and management of these new payment types and statuses.

Description

Migration: Add payment_type and reference columns to payments

  • Added a new payment_type column as an ENUM with values provider and manual.
  • Added a reference column to store additional metadata for payments.
  • Backfilled existing records, defaulting payment_type to provider.
  • Set payment_type to NOT NULL with a default value of provider.

Migration: Add total_paid_amount_cents column to invoices

  • Added a total_paid_amount_cents column to track the cumulative amount paid toward an invoice.
  • Backfilled existing records with a default value of 0.
  • Set total_paid_amount_cents to NOT NULL with a default value of 0.

@brunomiguelpinto brunomiguelpinto self-assigned this Dec 24, 2024
@brunomiguelpinto brunomiguelpinto changed the title feat(partial-payments): Add payment type and reference feat(manul-payments): Add payment type and reference Dec 24, 2024
@brunomiguelpinto brunomiguelpinto changed the title feat(manul-payments): Add payment type and reference feat: Add payment type and reference Dec 24, 2024
@brunomiguelpinto brunomiguelpinto marked this pull request as draft December 26, 2024 12:39
@brunomiguelpinto brunomiguelpinto marked this pull request as ready for review December 27, 2024 11:59
@brunomiguelpinto brunomiguelpinto force-pushed the feat-partial-payments-model branch from d20a4bd to ce68d51 Compare December 30, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants