Module: repository/fabscan/fabric

Methods

doesMirExistForBarcode(barcode) → {Boolean}

This method checks if an MIR is present for a barcode
Parameters:
Name Type Description
barcode String The barcode
Returns:
Type
Boolean

getBarcodeData(barcode) → {barcodeData}

Parameters:
Name Type Description
barcode String The barcode
Returns:
Type
barcodeData

getBarcodeDetailsForMir(barcodes) → {Array.<barcodeMirData>}

This method fetched the details of barcodes required to raise an MIR
Parameters:
Name Type Description
barcodes Array.<String> The list of barcodes
Returns:
Type
Array.<barcodeMirData>

getBarcodesWithoutMir(barcodes) → {Array.<String>}

This method gets the barcodes which do not have an MIR number from a list of barcodes passed
Parameters:
Name Type Description
barcodes Array.<String> The list of barcodes
Returns:
The list of barcodes which do not have an MIR number
Type
Array.<String>

getBuyerBasedonBarcode(barcode) → {Array.<buyerObject>}

This method to get buyer name based on barcode
Parameters:
Name Type Description
barcode Array.<String> The lbarcodes
Returns:
The buyer Name
Type
Array.<buyerObject>

insertBarcodeAtLocation(barcode, location) → {Number}

Parameters:
Name Type Description
barcode String The barcode
location String The location
Returns:
Type
Number

removeBarcodeFromLocation(barcode, location) → {Number}

Parameters:
Name Type Description
barcode String The barcode
location String The location
Returns:
Type
Number

updateBarcodesWithMirNumber(barcodes, mirNumber, location) → {Number}

This method updates the MIR number for barcodes in the DB
Parameters:
Name Type Description
barcodes Array.<String> The list of barcodes
mirNumber Number The MIR number
location String The location
Returns:
Type
Number

validateBarcode(barcode) → {Fabric}

Parameters:
Name Type Description
barcode String
Returns:
Type
Fabric

validateBarcodeAtLocation(barcode, location) → {Boolean}

Parameters:
Name Type Description
barcode String The barcode
location String The location
Returns:
Type
Boolean

validateBarcodeFabric(barcode) → {FabricBarcode}

Parameters:
Name Type Description
barcode String
Returns:
Type
FabricBarcode

validateFabricUniqueCode(barcode) → {fabricUniqueCode}

Parameters:
Name Type Description
barcode String
Returns:
Type
fabricUniqueCode

validateInvoiceNumber(invoiceNo) → {Fabric}

Parameters:
Name Type Description
invoiceNo String The invoice number
Returns:
Type
Fabric

validateSupplierBarcode(barcode) → {FabricBarcode}

This query is used to fetch the item details, oc details and fabric details based on the supplier barcode
Parameters:
Name Type Description
barcode String
Returns:
Type
FabricBarcode

Type Definitions

barcodeData

Type:
  • Object
Properties:
Name Type Description
barcodeData.custName String The customer name
barcodeData.styleNo String The style number
barcodeData.styleDesc String The style description
barcodeData.rollAvailable Number The leftover roll length

barcodeMirData

Type:
  • Object
Properties:
Name Type Description
barcodeMirData.poNumber String The PO Number
barcodeMirData.itemCode String The item code
barcodeMirData.rollLength String The roll length
barcodeMirData.barcodes Array.<String> The list of barcodes for the PO - item code combination

buyerObject

Type:
  • Object
Properties:
Name Type Description
buyerObject.buyerName String The customer name

receivedQuantityList

Type:
  • Object
Properties:
Name Type Description
receivedQuantityList.number String The receipt number (MIR number)
receivedQuantityList.date String The receipt date
receivedQuantityList.location String The receipt location
receivedQuantityList.quantity String The receipt quantity