dashboard weight updates

This commit is contained in:
Raman Marikanti 2025-12-16 16:38:25 +05:30
parent 3eadd05d1c
commit 76aa09f108
1 changed files with 2 additions and 1 deletions

View File

@ -118,6 +118,7 @@ export class ConsumptionDashboard extends Component {
} }
// Default to first 2 characters of product code // Default to first 2 characters of product code
if (row.product_code && row.product_code.length >= 2) { if (row.product_code && row.product_code.length >= 2) {
debugger;
return row.product_code.substring(0, 2).toUpperCase(); return row.product_code.substring(0, 2).toUpperCase();
} }
// Fallback if no product code // Fallback if no product code
@ -125,7 +126,7 @@ export class ConsumptionDashboard extends Component {
} }
processConsumptionData() { processConsumptionData() {
const po_rows = this.state.rows.filter(i => i.value > 0); const po_rows = this.state.rows.filter(i => i.value > 0 && i.quantity > 0);
const neg_rows = this.state.rows.filter(i => i.value < 0); const neg_rows = this.state.rows.filter(i => i.value < 0);
// Group negative rows by reference and product prefix // Group negative rows by reference and product prefix