From 3dda3f09b00e79c3a8ee9a15b6daa80eb73737bc Mon Sep 17 00:00:00 2001 From: GunpreetAhuja Date: Wed, 9 Jul 2014 11:18:40 +0530 Subject: [PATCH] added SuspenseOrder table --- src/librehatti/suspense/models.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/librehatti/suspense/models.py b/src/librehatti/suspense/models.py index f76b8a1..6b51f94 100644 --- a/src/librehatti/suspense/models.py +++ b/src/librehatti/suspense/models.py @@ -1,8 +1,13 @@ from django.db import models +from librehatti.catalog.models import PurchaseOrder + + +class SuspenseOrder(models.Model): + purchase_order_id = models.ForeignKey(PurchaseOrder) + transportation = models.IntegerField() -# Create your models here. -class SuspenseClearance(models.Model): +class SuspenseClearance(models.Model): #suspense_id = models.ForeignKey('SuspenseOrder') work_charge =models.IntegerField(blank=True, null=True) labour_charge = models.IntegerField(blank=True, null=True) @@ -14,6 +19,7 @@ class SuspenseClearance(models.Model): Test_date = models.DateTimeField(auto_now_add=True) Clear_date = models.DateTimeField(auto_now_add=True) + class Department(models.Model): title = models.CharField(max_length=50) address = models.CharField(max_length=150) @@ -22,6 +28,7 @@ class Department(models.Model): def __unicode__(self): return self.title + class Staff(models.Model): department = models.ForeignKey(Department) code = models.CharField(max_length=5)