feat: a Tiny order can sell UV as the client's one SKU per 10 cm
All checks were successful
Build and deploy / Validate source (push) Successful in 15s
Build and deploy / Integration suite on a real stack (push) Successful in 3m26s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m7s

Dropstar sells UV only as DTFIMP.UV.010CM, per 10 cm. TINY_SKU10_<MODE>
names such a SKU: 2,30 m goes to Tiny as 23 of it at the price the customer
paid, with a rest that does not divide on a line of its own so the order
adds up to the cent. "Testar conexão" and tiny_probe conferir check it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-05 15:27:45 -03:00
parent 43d9a3c637
commit 172544b173
7 changed files with 92 additions and 7 deletions

View File

@@ -67,7 +67,12 @@ def formas_envio(orders, termo, out):
def conferir(orders, out):
ok = True
for mode, setting in tiny.PRODUCT_SETTINGS.items():
prefix = tiny.sku_prefix(mode)
prefix, step = tiny.sku_prefix(mode), tiny.step_sku(mode)
if step:
result = tiny.configured_skus(orders, mode)
ok &= result == 'ok'
out(f'{tiny.STEP_SETTINGS[mode]} ({tiny.PRODUCTS[mode]}): {result} ({step} a cada 10 cm)')
continue
if prefix:
result = tiny.configured_skus(orders, mode)
ok &= result == 'ok'