定价规则新增 tax_rate(税率百分比)和 tax_inclusive(含税方式)字段, 报价引擎自动计算含税/不含税双价格,审批详情页利润计算过程展示税说明和明细行税额。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26 lines
660 B
Python
26 lines
660 B
Python
"""add tax_rate and tax_inclusive to product_pricing_rule"""
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = "20260530_0001"
|
|
down_revision = "20260527_0001"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"product_pricing_rule",
|
|
sa.Column("tax_rate", sa.Numeric(5, 2), nullable=False, server_default="0"),
|
|
)
|
|
op.add_column(
|
|
"product_pricing_rule",
|
|
sa.Column("tax_inclusive", sa.Integer(), nullable=False, server_default="0"),
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("product_pricing_rule", "tax_inclusive")
|
|
op.drop_column("product_pricing_rule", "tax_rate")
|