mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-19 15:52:06 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
/** @odoo-module **/
|
||||
// Copyright (C) 2023 - Today: GRAP (http://www.grap.coop)
|
||||
// @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
|
||||
// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
import PosComponent from "point_of_sale.PosComponent";
|
||||
import Registries from "point_of_sale.Registries";
|
||||
|
||||
export class OrderSummaryMargin extends PosComponent {
|
||||
getOrderMargin() {
|
||||
const self = this;
|
||||
const order = self.env.pos.get_order();
|
||||
if (!order.get_orderlines().length) {
|
||||
return false;
|
||||
}
|
||||
const margin = self.env.pos.format_currency(order.get_margin());
|
||||
const margin_rate = order.get_margin_rate_str();
|
||||
|
||||
return {margin, margin_rate};
|
||||
}
|
||||
}
|
||||
|
||||
OrderSummaryMargin.template = "OrderSummaryMargin";
|
||||
|
||||
Registries.Component.add(OrderSummaryMargin);
|
||||
Loading…
Add table
Add a link
Reference in a new issue