feat: add settlement_type to SalesInvoice model and related DTOs

- Added settlement_type field to SalesInvoice model with ENUM values (CASH, CREDIT, MIXED).
- Updated SalesInvoice aggregate types, input types, and where filters to include settlement_type.
- Modified StatisticsService to calculate credit amounts based on settlement_type.
- Enhanced TspProviderOriginalSendPayloadDto to include settlement_type.
- Updated NamaProvider DTOs and utility functions to handle new settlement_type logic.
- Created migration to add settlement_type column to sales_invoices table and backfill existing records.
This commit is contained in:
2026-05-24 19:40:04 +03:30
parent b53b7d3ed3
commit ea6f1bfdd0
17 changed files with 340 additions and 268 deletions
+9
View File
@@ -249,6 +249,15 @@ export const ConsumerType = {
export type ConsumerType = (typeof ConsumerType)[keyof typeof ConsumerType]
export const InvoiceSettlementType = {
CASH: 'CASH',
CREDIT: 'CREDIT',
MIXED: 'MIXED'
} as const
export type InvoiceSettlementType = (typeof InvoiceSettlementType)[keyof typeof InvoiceSettlementType]
export const TspProviderType = {
NAMA: 'NAMA',
SUN: 'SUN'