Class Units
java.lang.Object
org.bgerp.plugin.inventoru.model.Units
Units of measure of positions, as 1C and files write them.
A position keeps the unit 1C stores it in (one per nomenclature in 1C: its balances are only ever
in that unit). The same unit arrives written in many ways — «шт», «шт.», «штука», «pcs» — so it is
compared in a normalized form; an unknown spelling is compared as written, lower-cased.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisFractional(BigDecimal quantity) Whether the quantity has a fractional part.static booleanWhether the unit counts whole things.static Stringstatic booleanWhether two spellings name the same unit; an empty one says nothing and matches any.
-
Method Details
-
normalize
-
same
-
isPiece
Whether the unit counts whole things. -
isFractional
Whether the quantity has a fractional part.
-