Пример #1
0
 def cost_price_of_last_purchase(self):
     item = self.purchaseitems_set.order_by('-purchase_order__date').first()
     if item:
         # return locale.currency((item.amount / item.quantity), grouping=True)
         return format_currency((item.amount / item.quantity))
     else:
         return format_currency(self.cost_price)
Пример #2
0
 def net_total_admin(self, obj):
     return utils.format_currency(obj.net_total)
Пример #3
0
 def amount_admin(self):
     # if self._net_total:
     if self.net_total:
         # return utils.format_currency(self._net_total)
         return utils.format_currency(self.net_total)
     return ""
Пример #4
0
 def amount_total_admin(self, obj):
     return utils.format_currency(obj.amount_total)