mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
feat[BE]: add address field to CustomerRelationDTO and refactor payment report functions for improved clarity and structure
This commit is contained in:
@@ -19,7 +19,6 @@ import (
|
||||
expenseRepo "gitlab.com/mbugroup/lti-api.git/internal/modules/expenses/repositories"
|
||||
marketingRepo "gitlab.com/mbugroup/lti-api.git/internal/modules/marketing/repositories"
|
||||
areaDTO "gitlab.com/mbugroup/lti-api.git/internal/modules/master/areas/dto"
|
||||
customerDTO "gitlab.com/mbugroup/lti-api.git/internal/modules/master/customers/dto"
|
||||
customerRepo "gitlab.com/mbugroup/lti-api.git/internal/modules/master/customers/repositories"
|
||||
supplierDTO "gitlab.com/mbugroup/lti-api.git/internal/modules/master/suppliers/dto"
|
||||
warehouseDTO "gitlab.com/mbugroup/lti-api.git/internal/modules/master/warehouses/dto"
|
||||
@@ -473,14 +472,9 @@ func (s *repportService) processCustomerPayment(ctx context.Context, customerID
|
||||
rows = filteredRows
|
||||
}
|
||||
|
||||
summary := dto.CalculateCustomerPaymentSummary(rows, initialBalance)
|
||||
summary := dto.ToCustomerPaymentReportSummary(rows, initialBalance)
|
||||
|
||||
return dto.CustomerPaymentReportItem{
|
||||
Customer: customerDTO.ToCustomerRelationDTO(*customer),
|
||||
InitialBalance: initialBalance,
|
||||
Rows: rows,
|
||||
Summary: summary,
|
||||
}, nil
|
||||
return dto.ToCustomerPaymentReportItem(*customer, initialBalance, rows, summary), nil
|
||||
}
|
||||
|
||||
func (s *repportService) determineSalesStatusAndPaymentDate(transactions []repportRepo.CustomerPaymentTransaction, currentIndex int, previousBalance, currentBalance float64) (string, *time.Time) {
|
||||
|
||||
Reference in New Issue
Block a user