fix: keep topical stock non-depleting in planner flows (#359)

* fix: keep topical stock non-depleting in planner and reports

* test: stabilize e2e selectors for updated medication semantics

* fix(backend): add missing planner translation keys
This commit is contained in:
Daniel Volz
2026-02-28 23:36:52 +01:00
committed by GitHub
parent 8efd99d738
commit 9e8a6315e7
19 changed files with 807 additions and 130 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export function splitCurrentBlisterStock(
*/
export function getBlisterStockFromMedication(med: Medication): BlisterStockSplit {
const total =
med.packageType === "bottle"
med.packageType === "bottle" || med.packageType === "tube" || med.packageType === "liquid_container"
? med.looseTablets + (med.stockAdjustment ?? 0)
: med.packCount * med.blistersPerPack * med.pillsPerBlister + med.looseTablets + (med.stockAdjustment ?? 0);