npm.io
1.0.9 • Published 2 years ago

invoice-id-extractor

Licence
MIT
Version
1.0.9
Deps
15
Size
277 kB
Vulns
3
Weekly
21

invoice-id-extractor

Extractor which identifies user's invoice ID, given any format of parsed files and delivery information (name, phone number, zipcode)
다양한 형태의 파일에서 고객의 송장번호를 인식 및 추출하는 모듈

Installing

Using npm:

$ npm install invoice-id-extractor

Using yarn:

$ yarn add invoice-id-extractor

Methods

getOrderIdToInvoiceNumberDictionary(orders: Order[], parsedFile: string[][],)

Given a parameter of orders and parsedFile, returns a dictionary with the orderID as its key and corresponding invoice number as its value.
Order

{
  orderId: string,
  orderSetId: string,
  receiverName: string,
  receiverPhoneNumber: string,
  deliveryAddress: string,
  deliveryAddressDetail: string,
  deliveryAddressPostcode: string,
  itemName: string
}

return type

{
    [orderId: string]:
    {
      matchSuccess: boolean
      failReason?: string
      invoiceNumber?: string
    }
}