Skip to content

Commit

Permalink
Merge pull request #32 from GunpreetAhuja/dirty
Browse files Browse the repository at this point in the history
Suspense attributes added
  • Loading branch information
piyushparkash committed Jul 9, 2014
2 parents 2b3719e + 3dda3f0 commit 3e083a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/librehatti/catalog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class PurchaseOrder(models.Model):
delivery_address = models.ForeignKey('useraccounts.Address')
organisation = models.ForeignKey('useraccounts.AdminOrganisations')
date_time = models.DateTimeField(auto_now_add=True)
is_suspense = models.BooleanField(default=False)
choices = (('cash', 'Cash'), ('demand_draft', 'Demand Draft'), ('cheque', 'Cheque'))
mode_of_payment = models.CharField(max_length=25, default='cash', choices=choices)
def __unicode__(self):
return '%s' % (self.buyer_id) +' - ' '%s' % (self.date_time.strftime
('%b %d, %Y'))
Expand Down
11 changes: 9 additions & 2 deletions src/librehatti/suspense/models.py
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 3e083a1

Please sign in to comment.