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

Merged
merged 21 commits into from
Jan 7, 2025

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 37fc4f4 to a2ca810 Compare January 6, 2025 11:42
@brunomiguelpinto brunomiguelpinto merged commit 180665e into main Jan 7, 2025
6 checks passed
@brunomiguelpinto brunomiguelpinto deleted the feat-partial-payments-model branch January 7, 2025 09:55
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