feat: add pre/post-tax price linkage, hide barcode, and tablet adapt
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
@ -34,6 +34,7 @@ class StockBuy(db.Model):
|
||||
|
||||
# 财务与商务
|
||||
unit_price = db.Column(db.Numeric(19, 4), default=0) # 现意为:不含税单价
|
||||
post_tax_unit_price = db.Column(db.Numeric(19, 4), default=0) # 税后单价
|
||||
total_price = db.Column(db.Numeric(19, 4), default=0) # 总价
|
||||
# [新增] 税率
|
||||
tax_rate = db.Column(db.Numeric(5, 2), default=0)
|
||||
@ -98,6 +99,7 @@ class StockBuy(db.Model):
|
||||
'qty_available': float(self.available_quantity or 0),
|
||||
|
||||
'unit_price': float(self.unit_price or 0),
|
||||
'post_tax_unit_price': float(self.post_tax_unit_price or 0),
|
||||
'total_price': float(self.total_price or 0),
|
||||
# [新增] 税率
|
||||
'tax_rate': float(self.tax_rate or 0),
|
||||
@ -116,4 +118,4 @@ class StockBuy(db.Model):
|
||||
|
||||
'global_print_id': self.global_print_id,
|
||||
'global_print_id_str': f"{self.global_print_id:010d}" if self.global_print_id else ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user