fix: remove decimal points from margin percentage — whole numbers only
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -236,7 +236,7 @@ export class ProductMapping extends Component {
|
||||
formatMargin(cost, price) {
|
||||
const m = this.calcMargin(cost, price);
|
||||
if (m === null) return "—";
|
||||
return m.toFixed(1) + "%";
|
||||
return Math.round(m) + "%";
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@@ -653,7 +653,7 @@ export class ProductMapping extends Component {
|
||||
args: [[product.odoo_product_id], { list_price: rounded }],
|
||||
kwargs: {},
|
||||
});
|
||||
this.notification.add("Sale price set to $" + rounded.toFixed(2) + " (" + value.toFixed(1) + "% margin).", { type: "success" });
|
||||
this.notification.add("Sale price set to $" + rounded.toFixed(2) + " (" + Math.round(value) + "% margin).", { type: "success" });
|
||||
await this._loadMapped();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user