feat: include settlement_type in buildCorrectionPayload and buildPayload functions
This commit is contained in:
@@ -163,6 +163,7 @@ export async function buildCorrectionPayload(
|
||||
total_amount: true,
|
||||
invoice_date: true,
|
||||
invoice_number: true,
|
||||
settlement_type: true,
|
||||
items: true,
|
||||
pos: {
|
||||
select: {
|
||||
@@ -266,6 +267,7 @@ export async function buildCorrectionPayload(
|
||||
tsp_provider: partner.tsp_provider!,
|
||||
invoice_template: invoice.pos.complex.business_activity.guild.invoice_template,
|
||||
invoice_date: new Date(),
|
||||
settlement_type: invoice.settlement_type,
|
||||
|
||||
customer_type: invoice.customer?.type
|
||||
? TspProviderCustomerType.KNOWN
|
||||
@@ -296,6 +298,7 @@ export async function buildPayload(
|
||||
total_amount: true,
|
||||
invoice_date: true,
|
||||
invoice_number: true,
|
||||
settlement_type: true,
|
||||
items: {
|
||||
select: {
|
||||
id: true,
|
||||
@@ -405,6 +408,7 @@ export async function buildPayload(
|
||||
fiscal_id: invoice.pos.complex.business_activity.fiscal_id,
|
||||
invoice_template: invoice.pos.complex.business_activity.guild.invoice_template,
|
||||
tsp_token: invoice.pos.complex.business_activity.partner_token,
|
||||
settlement_type: invoice.settlement_type,
|
||||
payments: invoice.payments.map(payment => ({
|
||||
amount: Number(payment.amount),
|
||||
payment_method: payment.payment_method,
|
||||
|
||||
Reference in New Issue
Block a user