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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user