fix: OWL template error — Number() not available in template context

Use a formatPrice() method on the component instead of calling Number()
directly in the OWL template. Fixes TypeError: ctx.Number is not a function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-03-31 22:39:50 -04:00
parent cec499e9e9
commit 80b7d3d620
2 changed files with 13 additions and 8 deletions

View File

@@ -187,6 +187,17 @@ export class ProductMapping extends Component {
}
}
// -------------------------------------------------------------------------
// Helpers
// -------------------------------------------------------------------------
formatPrice(val) {
if (val === null || val === undefined || val === false) return "—";
const n = parseFloat(val);
if (isNaN(n)) return "—";
return "$" + n.toFixed(2);
}
// -------------------------------------------------------------------------
// Tab handlers
// -------------------------------------------------------------------------