Barcode service
The barcode service looks at a barcode that has already been scanned into the system and tries to parse it and find what kind of barcode was scanned and what the POS should do with that barcode.
Configurations
There are multiple types of barcodes available but in order for the POS to be able to recognize them and parse them they need to be configured in the Site Manager.
Main functionality
There are two different ProcessBarcode functions that take in different parameters and are used in different parts of the system. These functions look at the information in the barcode that was scanned and parse it and create a BarCode object with the information that the POS needs so that it can process the information in the barcode correctly and/or call the correct operation that is associated with the barcode that was scanned.
Name | Description |
---|---|
ProcessBarcode (IConnectionManager, ISaleLineItem, ScanInfo, BarCode, string)
|
Processes the actual barcode by calling ProcessBarcode(ScanInfo) and then adds any and all information that is in the barcode to the sale line item that was sent in as a parameter. The information added to the sale line item could be for example quantity (weight) or price. To see all options for what can be configured to be in a barcode see the online help for Barcode mask segments |
ProcessBarcode(IConnectionManager, ScanInfo) |
This function actually looks at the barcode and figures out what type of barcode this is and if applicable finds which mask was used to create it (if any) and then parses the information according to the mask setup. Please see online help for Barcode configurations to see what types of barcodes are available. Some of these barcode types are not actually supported or processed by the LS One POS without customization. See section below on customizing barcode scanning for more information |
POS Operations
Some operations in the POS directly call the barcode service. Here below is a list of all the operations and which functions they call
Name | Description |
---|---|
Item sale | Calls ProcessBarcode (ISaleLineItem parameter, ScanInfo, BarCode, string) |
Customer account deposit | A customer barcode can be scanned so the dialog calls ProcessBarcode(ScanInfo) to retrieve the customer ID from the barcode |
Pay customer account | A customer barcode can be scanned so the dialog calls ProcessBarcode(ScanInfo) to retrieve the customer ID from the barcode |
Price check | An item barcode can be scanned so the dialog calls ProcessBarcode(ScanInfo) to retrieve the item ID from the barcode |
Barcode scan into POS | Any type of barcode can be scanned directly into the POS (without selecting an operation first) as long as the barcode and barcode masks associated with that barcode have been configured. Once the POS has decided what type of barcode was scanned the corresponding operation is run i.e. customer barcode is scanned and the customer is added to the transaction |
Development pack
To find this service in the development pack go to DevPack\Source\Core\Common_services
Customization
The barcode service is one of very few services in the POS where a process has been built into the service so that a customization of the barcode scanning can be done more easily for the partners.
In function ProcessBarcode(ScanInfo) the first line is a call to a function called PartnerProcessBarcode. This function is in the BarcodeService.Partner.cs file and we recommend that when barcode scanning needs to be customized that the comments for all the functions and commented code in the BarcodeService.Partner.cs file is read carefully as it should explain fully what can and cannot be done.
In the PartnerProcessBarcode function four types of barcodes can be seen in the commented code and none of those types of barcodes are handled directly by the POS so they can be used in any way by any customization.
If PartnerProcessBarcode returns a null then the Barcode service will assume that nothing was done and will continue to try and process the barcode but if a BarCode object was returned with information on it then the Barcode service will accept that information as is and will return it to the POS for further processing.