Open flathat opened 5 years ago
I'd prefer to just modify the cost in-line so it's scaled correctly but quantity
remains one.
The quantity
field can already hold 4 or more digits (insert IEEE 754 caveats here) but there may be weights & measures regulatory issues if those kind of values accidentally wind up on something customer facing. Claiming something weighs 1.2345 pounds when the store has no weighing equipment that precise is problematic.
I might be overly paranoid here about the impact of widening out quantity in these cases; my instinct is to keep changes narrower in general.
Version of CORE? 2.7.0, master
Issue with Office, Lane, or both? Origin on lane, result in Office
Is this [mostly] a bug report, feature request, or question? Some of each, depending on how you look at it.
When the
Parser
UPC->handleItem()
deals with variable weight items (items with price in the upc of a label, such as0020012300187
for a $1.87 item) and cannot assign a two-decimalquantity
that when multiplied bynormal_price
produces the price on the label it reverts to aquantity
of1
and acost
ofproducts.cost
. This, as alluded to in the comments, affects reports, such as margin reports, making them incorrect for the item involved and overall for totals that include that item. This actually happens quite frequently.I'm looking for a way to make accurate margin reports that include these items.
Reports would need the
normal_price
andcost
of the item at the time of the transaction in order to calculate a newquantity
andcost
for purposes of the report. I haven't found a very straightforward way to do that, although cost- and price-history could at least theoretically help. Other ideas?I have however found that if
quantity
can be recorded to four decimals instead of two it eliminates the problem of a price in the transaction (and on the receipt) that disagrees with the label price. I tested (code below) this on scale (label) prices between $0.10 and $30.00 and for each of those onnormal_price
s between $0.10 and $30.00, a total of 8,940,100 instances, and found these numbers of failures to match the label price:Might it be possible to make
quantity
a 4-decimal value, ascost
recently became 3-decimal?Test: