[FIX] pos_loyalty: better labeling ewallet in partner screen

Since this balance column is used for different things (e.g. total due),
adding a label allows to properly differentiate what is what.

closes odoo/odoo#105139

X-original-commit: 4aeeceea50ca41ce3ad18950632744bee9ce1a6e
Related: odoo/enterprise#33696
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
This commit is contained in:
Jacky (trj)
2022-11-08 10:39:59 +01:00
parent e83168db2e
commit e8da98a3ee
@@ -8,6 +8,9 @@ odoo.define('pos_loyalty.PartnerLine', function (require) {
class extends PartnerLine {
_getLoyaltyPointsRepr(loyaltyCard) {
const program = this.env.pos.program_by_id[loyaltyCard.program_id];
if (program.program_type === 'ewallet') {
return `${program.name}: ${this.env.pos.format_currency(loyaltyCard.balance)}`;
}
const balanceRepr = this.env.pos.format_pr(loyaltyCard.balance, 0.01);
if (program.portal_visible) {
return `${balanceRepr} ${program.portal_point_name}`;