# Generated by Django 2.2 on 2019-05-29 07:15

import datetime
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('supplier', '0001_initial'),
        ('tax_rate', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Purchase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('referance_no', models.CharField(blank=True, max_length=50, null=True)),
                ('date', models.DateField(default=datetime.date.today)),
                ('purchase_status', models.CharField(blank=True, choices=[('', 'Please Select'), ('Received', 'Received'), ('Pending', 'Pending'), ('Ordered', 'Ordered')], max_length=20, null=True)),
                ('location', models.CharField(blank=True, max_length=30, null=True)),
                ('document', models.FileField(blank=True, null=True, upload_to='document/')),
                ('net_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True)),
                ('discount_type', models.CharField(blank=True, choices=[('', 'Please Select'), ('none', 'None'), ('fixed', 'Fixed Amount'), ('%', 'Percentage (%)')], max_length=20, null=True)),
                ('discount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True)),
                ('discount_amount', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True)),
                ('tax_details', models.CharField(blank=True, max_length=200, null=True)),
                ('tax_total', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=12, null=True)),
                ('shipping_details', models.TextField(blank=True, null=True)),
                ('shipping_charges', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=12, null=True)),
                ('additional', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
                ('total_purchase_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True)),
                ('supplier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='supplier.Supplier')),
                ('tax', models.ManyToManyField(blank=True, to='tax_rate.Tax_Rate')),
            ],
            options={
                'db_table': 'purchase',
            },
        ),
        migrations.CreateModel(
            name='PurchasePayment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('payment_date_time', models.DateTimeField(auto_now=True)),
                ('paid_amount', models.DecimalField(decimal_places=2, max_digits=15)),
                ('payemnt_method', models.CharField(blank=True, choices=[('', 'Please Select'), ('cash', 'Cash'), ('cheque', 'Cheque'), ('bank', 'Bank Transfer'), ('card', 'Card'), ('other', 'Other')], max_length=50, null=True)),
                ('card_no', models.CharField(blank=True, max_length=30, null=True)),
                ('card_holder_name', models.CharField(blank=True, max_length=50, null=True)),
                ('card_transaction_no', models.CharField(blank=True, max_length=50, null=True)),
                ('cad_type', models.CharField(blank=True, choices=[('', 'Please Select'), ('creditCard', 'Credit Card'), ('debitCard', 'Debit Card'), ('masterCard', 'Master Card'), ('VisaCard', 'Visa Card')], max_length=20, null=True)),
                ('card_month', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('card_year', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('cvv', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('cheque_no', models.CharField(blank=True, max_length=50, null=True)),
                ('bank_account', models.CharField(blank=True, max_length=50, null=True)),
                ('payment_note', models.TextField(blank=True, null=True)),
                ('due_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=15, null=True)),
                ('payment_status', models.CharField(blank=True, max_length=15, null=True)),
                ('purchase', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='purchase.Purchase')),
            ],
            options={
                'db_table': 'purchase_payment',
            },
        ),
    ]
