show vendor name

This commit is contained in:
Yisroel Baum 2024-09-30 11:22:23 +03:00
parent b5223ca8cb
commit c4996cf8d2
2 changed files with 4 additions and 1 deletions

View file

@ -12,6 +12,9 @@ class Vendor(db.Model):
def get_line_items(self):
return db.session.execute(select(LineItem).where(LineItem.vendor_id==self.id)).all()
def __repr__(self) -> str:
return f'{self.name}'
class BudgetCategory(db.Model):
__tablename__ = 'budget_category'

View file

@ -65,7 +65,7 @@
<th scope="row">{{li[0].parent_line_item_id}}</th>
<th scope="row">{{li[0].amount}}</th>
<th scope="row">{{li[0].currency_type}}</th>
<th scope="row">{{li[0].vendor_id}}</th>
<th scope="row">{{li[0].get_vendor()[0]}}</th>
<th scope="row">{{li[0].date}}</th>
<th scope="row">{{li[0].confirmation_code}}</th>
<th scope="row">{{li[0].note}}</th>