show vendor name
This commit is contained in:
parent
b5223ca8cb
commit
c4996cf8d2
2 changed files with 4 additions and 1 deletions
|
|
@ -12,6 +12,9 @@ class Vendor(db.Model):
|
||||||
|
|
||||||
def get_line_items(self):
|
def get_line_items(self):
|
||||||
return db.session.execute(select(LineItem).where(LineItem.vendor_id==self.id)).all()
|
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):
|
class BudgetCategory(db.Model):
|
||||||
__tablename__ = 'budget_category'
|
__tablename__ = 'budget_category'
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
<th scope="row">{{li[0].parent_line_item_id}}</th>
|
<th scope="row">{{li[0].parent_line_item_id}}</th>
|
||||||
<th scope="row">{{li[0].amount}}</th>
|
<th scope="row">{{li[0].amount}}</th>
|
||||||
<th scope="row">{{li[0].currency_type}}</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].date}}</th>
|
||||||
<th scope="row">{{li[0].confirmation_code}}</th>
|
<th scope="row">{{li[0].confirmation_code}}</th>
|
||||||
<th scope="row">{{li[0].note}}</th>
|
<th scope="row">{{li[0].note}}</th>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue