feat: Boleto with its bank account and Ajuste Fino by SKU in Tiny (Marcus, 12/11)

A faturado montador order's installments carry the bank account set in
TINY_BOLETO_ACCOUNT as their meioPagamento (Tiny v3 parcelas[]), so Tiny
does not pick another account. The Ajuste Fino line resolves the product
from its code (TINY_SKU_TREATMENT, default DTFIMP.AJF.UN) unless a numeric
TINY_PRODUCT_TREATMENT is set; the connection check verifies it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-12 10:52:46 -03:00
parent 5ca6792221
commit 973cd87b36
6 changed files with 129 additions and 34 deletions

View File

@@ -107,6 +107,10 @@ x-app-environment: &app-environment
TINY_PRODUCT_UV_FOLHA: ${TINY_PRODUCT_UV_FOLHA:-}
TINY_PRODUCT_UV_AVULSA: ${TINY_PRODUCT_UV_AVULSA:-}
TINY_PRODUCT_TREATMENT: ${TINY_PRODUCT_TREATMENT:-}
# Ajuste Fino and Redesenho, per art, as the client's SKUs. The numeric
# TINY_PRODUCT_TREATMENT above, when set, still replaces the treatment SKU.
TINY_SKU_TREATMENT: ${TINY_SKU_TREATMENT:-}
TINY_SKU_REDESIGN: ${TINY_SKU_REDESIGN:-}
TINY_SKU_TEXTIL_FOLHA: ${TINY_SKU_TEXTIL_FOLHA:-}
TINY_SKU_TEXTIL_AVULSA: ${TINY_SKU_TEXTIL_AVULSA:-}
TINY_SKU_UV_FOLHA: ${TINY_SKU_UV_FOLHA:-}
@@ -127,6 +131,9 @@ x-app-environment: &app-environment
# The Tiny forma de recebimento id of "Boleto", for invoiced montador Venda
# orders (front 7a.3). Empty: the order goes without one and its note says so.
TINY_RECEIPT_BOLETO: ${TINY_RECEIPT_BOLETO:-}
# The bank account every boleto installment names ("NEXSTAR COBRANÇA"), so
# Tiny does not pick its preferred one. Empty: no account is sent.
TINY_BOLETO_ACCOUNT: ${TINY_BOLETO_ACCOUNT:-}
# Sets "Aprovada" on paid orders and "Pronto para envio" on finished pickup
# orders, which the client's Tiny -> n8n notices send to customers. Turn on
# only together with TINY_ADAPTER=tiny and after n8n stops sending the