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