This commit is contained in:
2026-02-27 05:56:00 +01:00
parent 4eae444c93
commit cd2a82f61c
2 changed files with 101 additions and 39 deletions

View File

@@ -15,7 +15,7 @@ import datetime
import logging
import json
from trytond.exceptions import UserWarning, UserError
from trytond.modules.purchase_trade.numbers_to_words import number_to_words
from trytond.modules.purchase_trade.numbers_to_words import quantity_to_words, amount_to_currency_words
logger = logging.getLogger(__name__)
@@ -268,14 +268,14 @@ class Sale(metaclass=PoolMeta):
@property
def report_qt(self):
if self.lines:
return number_to_words(self.lines[0].quantity)
return quantity_to_words(self.lines[0].quantity)
else:
return ''
@property
def report_price(self):
if self.lines:
return number_to_words(self.lines[0].unit_price)
return amount_to_currency_words(self.lines[0].unit_price)
else:
return ''