953 B
953 B
Billing quote / order sync: postcode -> zone
Rule
- Whether a country needs a zone is decided by
bms_product_country(rows withzone_code). - If the product+country has zones: request must include
destPostcode. - Zone is resolved at runtime:
destPostcode->prc_zone_detail+prc_zone->zone_code, then matchbms_product_country. - Billing tables store postcode only, not zone columns:
prc_quote.dest_postcodeprc_order_bill.dest_postcode(already existed)
SQL
Run: bms-back/sql/price/billing_postcode_alter.sql
API fields
- Request:
destPostcodeon/api/tms/price/quoteand/api/tms/price/bill(and console/price/billing/quote). - Response may include
zoneId/zoneCode/zoneNamefor display only (not persisted on bill/quote tables).
Errors (i18n)
price.quote.postcodeRequiredprice.quote.postcodeZoneNotFoundprice.quote.zonePriceNotHitprice.quote.priceNotHit