[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:
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user