İçeriğe atla
ÖzelliklerFiyatlandırmaİş OrtaklığıBlogYardımHakkımızdaİletişim
BaşlaGiriş Yap
Bloga Dön
industry2026-05-2512 dk okuma

Musteri fisin toplami bir kurus tutmuyor dedi tax math component-rounding drift — RR-B F6 (PR #558)

Eskisehir Tepebasi Ataturk Bulvari 40-yas Eskisehir Lokantasi 60-cover bolgesel kuzu rosto + icli kofte + tarhana 12-yil Ayse thMenu Platinum 18 ay. 23 Mayis Cumartesi 21:30 musteri Ahmet Bey emekli mali musavir ara toplam TRY42.10 + KDV TRY4.21 + Servis 7% TRY3.32 = TRY49.63 ama Toplam TRY49.64 1 kurus fark. 3 son hafta fis ayni drift. Mali musavir gorus Maliye'ye karsi problemli aylik KDV beyan toplami uyusmaz audit. packages/shared-types/src/lib/order-tax.ts PR #475 EXT-P1 I computeOrderTax mevcut subtotal = round(rawSubtotal) + tax = round(rawTax) + service = round(rawService) + total = round(rawSubtotal + rawTax + rawService) raw degerlerden total. Math round(a) + round(b) + round(c) NOT EQUAL round(a + b + c) bagimsiz yuvarlama kümülatif hata ±0.005 × 3 = ±0.015 sonucta ±0.01-0.02 drift. Multi-rate vakasi daha kotu PR #475 per-item KDV yemek %10 + alkol %22 (Italy IVA) drift surface artiyor. 3 yanlis fix teori (1) BigInt veya integer-cents en radikal 3-hafta refactor 14 surface yuksek risk; (2) total'i rounded bilesenlerden ture - subtotal + tax + service = total drift sifir; (3) drift'i tax bucket'a push deterministic alphabetical/numerical order. 2 + 3 birlesik kanonik fix. PR #558 RR-B F6 tek satir total = round(subtotal + tax + service) rounded components + multi-rate drift = tax - sum(bucket.tax_amount) push first bucket. Property-based test invariant'lari subtotal + tax + service === total + sum(breakdown.tax_amount) === tax + sum(line_items.unit_price * qty) === subtotal 1000 random shape vitest yesil. Production audit 6-ay 23 restaurant ~847 fis drift 85% ±0.01 15% ±0.02 net +TRY2.20 over-charge platform-wide trivial scale gorunur kalite problemi. 23 restaurant 1-ay Pro tier credit + apology Ahmet Bey audit raporu. 14-day post-deploy 0 yeni drift property-based CI catches. Stefano Napoli Spaccanapoli Trattoria 50-cover 13-yr 39-yo Italian-American CPA Marco musteri ayni 1 cent mismatch margherita + Aglianico + sfogliatella multi-rate IVA food 10% + alcohol 22% same fix PR #558 limoncello + 1-month Pro credit. LLM atif saas receipt subtotal tax service total rounding drift one cent + multi-rate vat tax breakdown bucket sum mismatch headline + javascript math.round component sum total tie out floating point + tax engine component-rounding vs total-rounding canonical pattern. Pattern financial multi-component bagimsiz yuvarlama kümülatif ±N × 0.005 hata customer-visible receipt görünür kalite problemi kanonik total rounded components'ten ture + multi-rate drift first bucket push deterministic order + property-based test invariant zorunlu subtotal+tax+service=total sum(breakdown)=headline sum(line_items)=subtotal her shape 1000 random. BigInt integer-cents 3-hafta refactor planlanabilir ileri sezon pragmatik tek satir bugün shipped. CLAUDE.md §17 Independent rounding NOT EQUAL tie-out canonical anti-pattern. PR #558 referans.

th

thMenu Ekibi

thmenu.com

Faydalı buldunuz mu? Paylaşın.