We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59b8f79 commit c3949beCopy full SHA for c3949be
1 file changed
src/backend/src/services/boms.services.ts
@@ -670,8 +670,8 @@ export default class BillOfMaterialsService {
670
}
671
672
// recalculate subtotal on edits
673
- const finalPrice = price !== undefined ? price : (material.price ?? undefined);
674
- const finalQuantity = quantity !== undefined ? quantity : (material.quantity ?? undefined);
+ const finalPrice = price ?? material.price ?? undefined;
+ const finalQuantity = quantity ?? material.quantity ?? undefined;
675
const computedSubtotal =
676
finalPrice !== undefined && finalQuantity !== undefined ? Math.round(finalPrice * Number(finalQuantity)) : undefined;
677
0 commit comments