I am creating a barcode that looks like this: A1234-01-56789
The A1234 is the ItemLookupCode, 01 represents the week of the year the barcode label was created (00 - 52), and 56789 is an identifier.
When the cashier scans the barcode, I would like to have a user hook intercept the string A1234-01-56789 and split it into 3 fields.
I want to use the first field as the ItemLookupCode to get the description and price of the item.
For the second field, I want to calculate whether to give a discount or not. Here's the formula:
if (current_week - barcode_week > 5) give discount.
For the third field, I want to store the contents into the TransactionEntry.Comment column. Or, in the serial number column of the line item. I basically want to store this identifier with the line item.
Is this possible? If so, how much effort is it?