Items with records in the item link table cause a null
pointer exception in EjItem.SetQuantity()
This will have the side effect that the PLU code ofthe
item that caused the error (the one with the links) will
remain in the input line.
To replicate in the version .80 distribution, from config
1, enter 3 / 2 / and you'll get a latte (PLU 32) forthe
second item, and the links for PLU 3 (wine) don't appear.
Required actions:
1. "fix item links"
2. ensure that the input line is cleared - or possibly
redisplayed after an error.
Logged In: YES
user_id=972075
Further investigation reveals that the problem is in the
setQuantity function of EjItem.
When linking items the transItem record isn't created until
after the engage(0) function is called, but the setQuantity
function tries to put the quanity in the trans record straight
away.
Solution: remove the following line of code from
EjItem.setQuantity():
transItem().setQuantity(value);
and set the quantity later, in the engage method.
NOTE: the code is all messed up in the way it treats dividers.
try linking the French Bread to a bottle of wine, and you'll be
expected to cut the bottle inhalf too.
The solution to this is to multiply by the divider when the
parent calls setQuantity(). Then the child (linked to item)
should use it's own divider after that.