- {{ order.quantity + order.quantitypreordered }} x €
+ {{ (order.quantity + order.quantitypreordered) }} x €
{{ order.price ? order.price : 0 }}
@@ -102,8 +103,8 @@
>€
{{
(
- order.price * order.quantity +
- order.price * order.quantitypreordered
+ (order.price * order.quantity) +
+ (order.price * order.quantitypreordered)
).toFixed(2)
}}) rec.value === unit)
- return unitrec ? (short ? unitrec.short : unitrec.label) : ''
+ getUnitsMeasure(unit: number, short: boolean, weight: number | undefined) {
+ let unitrec = shared_consts.Units_Of_Measure_ListBox.find((rec: any) => rec.value === unit)
+ let mystr = ''
+ if (unitrec && unitrec.value === shared_consts.UNITS_OF_MEASURE.CHILI && weight && weight < 1) {
+ unitrec = shared_consts.Units_Of_Measure_ListBox.find((rec: any) => rec.value === shared_consts.UNITS_OF_MEASURE.GRAMMI)
+ }
+ if (unitrec && unitrec.value === shared_consts.UNITS_OF_MEASURE.LITRI && weight && weight < 1) {
+ unitrec = shared_consts.Units_Of_Measure_ListBox.find((rec: any) => rec.value === shared_consts.UNITS_OF_MEASURE.MILLILITRI)
+ }
+ mystr = unitrec ? (short ? unitrec.short : unitrec.label) : ''
+ return mystr
+ },
+
+ getWeightByUnit(unit: number, short: boolean, weight: number|undefined) {
+ let unitrec = shared_consts.Units_Of_Measure_ListBox.find((rec: any) => rec.value === unit)
+ if (unitrec && unitrec.value === shared_consts.UNITS_OF_MEASURE.CHILI && weight && weight < 1) {
+ return weight * 1000
+ }
+ if (unitrec && unitrec.value === shared_consts.UNITS_OF_MEASURE.LITRI && weight && weight < 1) {
+ return weight * 1000
+ }
+ return weight
},
getWeightTotalByOrder(order: IOrder) {