1
0
forked from erp-dev/erp

feat: add discount_amount to payment_order and receipt_order, and change total_amount logic

This commit is contained in:
2025-12-04 09:36:59 +08:00
parent 0b8146d972
commit d8eb66821e
19 changed files with 1144 additions and 398 deletions

View File

@@ -0,0 +1,49 @@
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('basic_info', '0016_merchantsetting_type'),
('business', '0014_alter_balancechangerecord_source_type_and_more'),
]
operations = [
migrations.AddField(
model_name='paymentorder',
name='bank_account',
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='payment_orders',
to='basic_info.bankaccount',
verbose_name='银行账户',
),
),
migrations.AddField(
model_name='paymentorder',
name='markup',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='附言'),
),
migrations.AddField(
model_name='receiptorder',
name='bank_account',
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name='receipt_orders',
to='basic_info.bankaccount',
verbose_name='银行账户',
),
),
migrations.AddField(
model_name='receiptorder',
name='markup',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='附言'),
),
]

View File

@@ -0,0 +1,35 @@
from decimal import Decimal
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('business', '0015_payment_receipt_bank_and_markup'),
]
operations = [
migrations.AddField(
model_name='paymentorder',
name='discount_amount',
field=models.DecimalField(
decimal_places=2,
default=Decimal('0'),
max_digits=15,
verbose_name='折扣金额',
),
),
migrations.AddField(
model_name='receiptorder',
name='discount_amount',
field=models.DecimalField(
decimal_places=2,
default=Decimal('0'),
max_digits=15,
verbose_name='折扣金额',
),
),
]