We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10fcfb4 commit 4ab4a66Copy full SHA for 4ab4a66
src/lib/utils/stocklistUtils.ts
@@ -30,7 +30,8 @@ export async function inventoryValue(prisma: ExtendedPrisma) {
30
continue;
31
} else {
32
const bottleWeight = item.bottleEmptyWeight!;
33
- const liquidWeight = item.quantityAvailable! - bottleWeight;
+ const liquidWeight =
34
+ item.quantityAvailable! - item.nrBottles! * bottleWeight;
35
const bottlePrice = item.price / 100;
36
const fullBottleLiquidWeight = item.bottleFullWeight! - bottleWeight;
37
value += (liquidWeight / fullBottleLiquidWeight) * bottlePrice;
0 commit comments