# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-29 10:50
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('businesses', '0001_initial'),
        ('sales', '0022_auto_20171228_2212'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='sale',
            options={'ordering': ['-timestamp']},
        ),
        migrations.RemoveField(
            model_name='sale',
            name='amount_balance',
        ),
        migrations.AddField(
            model_name='sale',
            name='business',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sales', to='businesses.Business'),
        ),
        migrations.AddField(
            model_name='sale',
            name='default_rate',
            field=models.BooleanField(default=True, verbose_name='Use fixed rate'),
        ),
        migrations.AddField(
            model_name='sale',
            name='timestamp',
            field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='sale',
            name='units',
            field=models.IntegerField(default=1),
        ),
        migrations.AlterField(
            model_name='sale',
            name='amount_paid',
            field=models.IntegerField(verbose_name='Amount Paid'),
        ),
        migrations.AlterField(
            model_name='sale',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='created_sales', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='sale',
            name='customer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchases', to='customers.Customer'),
        ),
        migrations.AlterField(
            model_name='sale',
            name='date_modified',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AlterField(
            model_name='sale',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sales', to='products.Product'),
        ),
    ]
