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)
def net_total_admin(self, obj): return utils.format_currency(obj.net_total)
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 ""
def amount_total_admin(self, obj): return utils.format_currency(obj.amount_total)