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:
@ -138,6 +138,7 @@ class BuyInboundService:
|
||||
|
||||
# 价格信息
|
||||
unit_price=u_price,
|
||||
post_tax_unit_price=float(data.get('post_tax_unit_price') or 0),
|
||||
tax_rate=tax_rate, # [新增]
|
||||
total_price=in_qty * u_price,
|
||||
currency=data.get('currency', 'CNY'),
|
||||
@ -184,6 +185,8 @@ class BuyInboundService:
|
||||
|
||||
# [新增] 更新税率
|
||||
if 'tax_rate' in data: stock.tax_rate = float(data['tax_rate'])
|
||||
# 更新税后单价
|
||||
if 'post_tax_unit_price' in data: stock.post_tax_unit_price = float(data['post_tax_unit_price'])
|
||||
|
||||
if 'in_quantity' in data:
|
||||
diff = float(data['in_quantity']) - float(stock.in_quantity)
|
||||
@ -322,4 +325,4 @@ class BuyInboundService:
|
||||
@staticmethod
|
||||
def get_history_locations(base_id):
|
||||
return [r[0] for r in
|
||||
db.session.query(StockBuy.warehouse_location).filter(StockBuy.base_id == base_id).distinct().all()]
|
||||
db.session.query(StockBuy.warehouse_location).filter(StockBuy.base_id == base_id).distinct().all()]
|
||||
|
||||
Reference in New Issue
Block a user