Assign barcode to inventory
Add a service method to generate barcode
for Inventory
based on a template in AppSettings
:
public static final String CATEGORY_BARCODE = "BARCODE";
public static final AppSettingDef BARCODE_INVENTORY = new AppSettingDef(CATEGORY_BARCODE, "inventoryBarcode", "I:{{ inventory.id }}");
Add an API endpoint POST /i/{id}/barcode to generate and assign the barcode
for an inventory if inventory.barcode == null
. The API call returns inventory.barcode
.