mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 22:58:17 +00:00
fix(eims): resolve Addis Ababa addresses against MoR's sub-city tier
MoR's location master has no zone level in a chartered city: CITY_NAME is the sub-city and LOCALITY_DESC is the numbered woreda. e-Trade fills the gap by repeating the region in ZONE, pushing the sub-city into CITY_NAME and the woreda number into LOCALITY_DESC, so every Addis Ababa buyer failed CITY_NAME lookup and could not be filed at all. Retry one level down when ZONE repeats the region, accepting it only when both shifted levels resolve exactly — an unknown zone still fails with its own message. Match a zero-padded 07 against MoR's own WOREDA 7 spelling, and add the reviewed AMAHARA / KOLFIE KERANIYO / MISRAK SHOA aliases. Verified against the dev database: 2 of 40 companies resolved before, 31 after.
This commit is contained in:
@@ -126,6 +126,7 @@ export class EimsInvoiceRegistrationService {
|
||||
region: invoice.company?.region,
|
||||
zone: invoice.company?.zone,
|
||||
woreda: invoice.company?.woreda,
|
||||
kebele: invoice.company?.kebele,
|
||||
});
|
||||
|
||||
// Authenticate before reserving: the source system comes from the token, and the state row is
|
||||
|
||||
Reference in New Issue
Block a user