Skip to content

Conversation

@Jules30
Copy link

@Jules30 Jules30 commented Nov 14, 2025

Move most of the business logic to Invoice Entity.

  • Added methods to invoice entity to handle Full and Partial payment and remove those logic from ProcessPayment method.
  • Created an extension type for enum InvoiceType to detect if the invoice type is supported.
  • Added these properties InvoiceHasPayments, InvoiceIsAlreadyFullyPaid and IsPaymentsGreaterThanThePartial to Invoice type to avoid verbose if conditions.

@Jules30 Jules30 changed the title Move most of the business logic to Invoice Entity. Refactor - Julius Bartolome Nov 14, 2025
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.

2 participants