# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-09 09:23
from __future__ import unicode_literals

from decimal import Decimal
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='PurchaseOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('po_num', models.CharField(blank=True, max_length=255)),
                ('po_date', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('po_value', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('contractor', models.CharField(blank=True, max_length=255)),
                ('budget', models.CharField(blank=True, max_length=255)),
                ('capex_commitment_value', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('capex_expenditure_value', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('opex_value', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('revenue_value', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('task_num', models.CharField(blank=True, max_length=255)),
                ('renew_status', models.CharField(blank=True, max_length=255)),
                ('renew_po_no', models.CharField(blank=True, max_length=255)),
                ('po_status', models.CharField(blank=True, max_length=255)),
                ('po_remarks', models.TextField(blank=True)),
                ('po_type', models.CharField(blank=True, max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='PurchaseOrderLine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('line_num', models.CharField(blank=True, max_length=255)),
                ('line_duration', models.IntegerField(default=0)),
                ('line_value', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('line_rate', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('line_status', models.CharField(blank=True, max_length=255)),
                ('line_actuals', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('capex_percent', models.IntegerField(default=0)),
                ('opex_percent', models.IntegerField(default=0)),
                ('revenue_percent', models.IntegerField(default=0)),
                ('po_num', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='main.PurchaseOrder')),
            ],
        ),
        migrations.CreateModel(
            name='PurchaseOrderLineDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('po_os_ref', models.CharField(blank=True, max_length=255)),
                ('po_position', models.CharField(blank=True, max_length=255)),
                ('po_level', models.CharField(blank=True, max_length=255)),
                ('po_rate', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('po_revise_rate', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=20)),
                ('division', models.CharField(blank=True, max_length=255)),
                ('section', models.CharField(blank=True, max_length=255)),
                ('sub_section', models.CharField(blank=True, max_length=255)),
                ('director_name', models.CharField(blank=True, max_length=255)),
                ('frozen_status', models.CharField(blank=True, max_length=255)),
                ('approval_ref_num', models.CharField(blank=True, max_length=255)),
                ('approval_reason', models.TextField(blank=True)),
                ('kpi_2016', models.CharField(blank=True, max_length=255)),
                ('capex_percent', models.IntegerField(default=0)),
                ('opex_percent', models.IntegerField(default=0)),
                ('revenue_percent', models.IntegerField(default=0)),
                ('po_line', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='main.PurchaseOrderLine')),
            ],
        ),
    ]
