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:
49
business/migrations/0015_payment_receipt_bank_and_markup.py
Normal file
49
business/migrations/0015_payment_receipt_bank_and_markup.py
Normal 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='附言'),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
35
business/migrations/0016_payment_receipt_discount.py
Normal file
35
business/migrations/0016_payment_receipt_discount.py
Normal 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='折扣金额',
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user