|
|
# Generated by Django 3.2.16 on 2023-04-04 20:18
|
|
|
|
|
|
from django.conf import settings
|
|
|
from django.db import migrations, models
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
dependencies = [
|
|
|
('basic_info', '0002_initial'),
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
('goods_info', '0001_initial'),
|
|
|
('purchase_info', '0001_initial'),
|
|
|
]
|
|
|
|
|
|
operations = [
|
|
|
migrations.CreateModel(
|
|
|
name='PurchaseStorageModel',
|
|
|
fields=[
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
('delete_flag', models.CharField(default='0', help_text='是否启用', max_length=1, verbose_name='是否启用')),
|
|
|
('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间', verbose_name='创建时间')),
|
|
|
('update_time', models.DateTimeField(auto_now=True, help_text='更新时间', verbose_name='更新时间')),
|
|
|
('invoices_date', models.DateTimeField(verbose_name='单据日期')),
|
|
|
('number_code', models.CharField(max_length=28, verbose_name='单据编号,不让用户填写')),
|
|
|
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
|
|
|
('discount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=5, null=True, verbose_name='优惠率,最多精确到小数点后两位')),
|
|
|
('discount_money', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='优惠金额(付款优惠),最多精确到小数点后两位')),
|
|
|
('last_amount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=13, null=True, verbose_name='优惠后总金额,最多精确到小数点后两位')),
|
|
|
('other_money', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='其他费用,最多精确到小数点后两位')),
|
|
|
('this_payment', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='本次付款,最多精确到小数点后两位')),
|
|
|
('this_debt', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='本次欠款,最多精确到小数点后两位')),
|
|
|
('number_count', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='入库总数量,最多精确到小数点后两位')),
|
|
|
('status', models.CharField(default='0', max_length=1, verbose_name='状态,0:未审核,1:已审核,2:付款完成')),
|
|
|
('operator_user_name', models.CharField(blank=True, max_length=20, null=True, verbose_name='操作人员的真实姓名')),
|
|
|
('check_user_name', models.CharField(blank=True, max_length=20, null=True, verbose_name='操作人员的真实姓名')),
|
|
|
('supplier_name', models.CharField(blank=True, max_length=30, null=True, verbose_name='供应商名称')),
|
|
|
('attachment_list', models.CharField(blank=True, max_length=20, null=True, verbose_name='附件的id列表,字段的值为: 1,2,3,4')),
|
|
|
('is_other', models.CharField(default='0', max_length=1, verbose_name='是否是其他入库,0:采购入库,1:其他入库')),
|
|
|
('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.settlementaccountmodel', verbose_name='结算账户,审核之后不能改')),
|
|
|
('check_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='审核人员,不能修改')),
|
|
|
('operator_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operator_in_list', to=settings.AUTH_USER_MODEL, verbose_name='入库操作人员,不能修改')),
|
|
|
('purchase', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='purchase_info.purchasemodel', verbose_name='采购订单,审核之后不能改')),
|
|
|
('supplier', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.suppliermodel', verbose_name='供应商,审核之后不能改')),
|
|
|
],
|
|
|
options={
|
|
|
'verbose_name': '入库单表',
|
|
|
'verbose_name_plural': '入库单表',
|
|
|
'db_table': 't_purchase_storage',
|
|
|
'ordering': ['id'],
|
|
|
},
|
|
|
),
|
|
|
migrations.CreateModel(
|
|
|
name='PurchaseStorageItemModel',
|
|
|
fields=[
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
('delete_flag', models.CharField(default='0', help_text='是否启用', max_length=1, verbose_name='是否启用')),
|
|
|
('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间', verbose_name='创建时间')),
|
|
|
('update_time', models.DateTimeField(auto_now=True, help_text='更新时间', verbose_name='更新时间')),
|
|
|
('name', models.CharField(max_length=20, verbose_name='货品名称')),
|
|
|
('number_code', models.CharField(blank=True, max_length=28, null=True, verbose_name='货品的编号或者批号')),
|
|
|
('specification', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品规格')),
|
|
|
('model_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='型号')),
|
|
|
('color', models.CharField(blank=True, max_length=50, null=True, verbose_name='颜色')),
|
|
|
('units_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='单位名字')),
|
|
|
('category_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='货品类别名称')),
|
|
|
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
|
|
|
('purchase_count', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='入库数量,最多精确到小数点后两位')),
|
|
|
('purchase_price', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='采购单价,最多精确到小数点后两位')),
|
|
|
('purchase_money', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='采购金额,最多精确到小数点后两位')),
|
|
|
('warehouse_name', models.CharField(max_length=50, null=True, verbose_name='仓库名字')),
|
|
|
('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodscategorymodel')),
|
|
|
('goods', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodsmodel', verbose_name='货品')),
|
|
|
('purchase_storage', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='item_list', to='warehouse_info.purchasestoragemodel', verbose_name='采购入库单')),
|
|
|
('units', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.unitsmodel')),
|
|
|
('warehouse', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='basic_info.warehousemodel', verbose_name='入库的仓库')),
|
|
|
],
|
|
|
options={
|
|
|
'verbose_name': '入库单的项目表',
|
|
|
'verbose_name_plural': '入库单的项目表',
|
|
|
'db_table': 't_purchase_storage_items',
|
|
|
'ordering': ['id'],
|
|
|
},
|
|
|
),
|
|
|
]
|