Skip to content

Commit

Permalink
Removed import statements
Browse files Browse the repository at this point in the history
THis may be required in future
  • Loading branch information
rkjain2006 committed Mar 28, 2015
1 parent 6338d44 commit 80e847c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 48 deletions.
21 changes: 0 additions & 21 deletions es/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# ES Module: Enterprise Structure model with Client | Business partners | Parties place orders | Sale Areas | Sale Tax | Employee
#-------------------------------------------------------------------------------------------------------------------------

#from fi.models import Code

# Employee model
class Emp(models.Model):
Expand Down Expand Up @@ -122,26 +121,6 @@ def __str__(self):
return '%s %s ' % (self.rep_id , self.fdate)

#Tax classification based on Sales Area/ Purchase type/ SAles type/ and form type
class Salecode(models.Model):
fgarea_id=models.ForeignKey(Fgarea)
PURTYPE_CHOICES=(('LP','Local Purchase'),('CP','Central Purchase'))
purtype=models.CharField(max_length=2,default='LP',choices=PURTYPE_CHOICES)
SALETYPE_CHOICES=(('LST','Local Sale'),('CST','Central Sale'))
saletype=models.CharField(max_length=5,default='LP',choices=SALETYPE_CHOICES)
A_FORM_CHOICES=(('C','C Form'),('ST-35','ST-35'),('F','F') )
a_form=models.CharField(max_length=10,default='C',choices=A_FORM_CHOICES)
salecode=models.ForeignKey('fi.Code')
taxrate=models.DecimalField(max_digits=10, decimal_places=2)
narration=models.CharField(max_length=100)
fdate=models.DateField('effective from')
tdate=models.DateField()

def __str__(self):
return '%s %s ' % (self.saletype , self.a_form)

class Meta:
unique_together = (('fgarea_id','purtype','saletype','a_form', ),)

class Saletax(models.Model):
fgarea_id=models.ForeignKey(Fgarea)
PURTYPE_CHOICES=(('LP','Local Purchase'),('CP','Central Purchase'))
Expand Down
3 changes: 1 addition & 2 deletions fi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def test(self):
class Meta:
verbose_name = "Account Head"

#from sd.models import Vno
#from mm.models import Pur

# All financial transactions in ledger
class Led(models.Model):
doctype=models.CharField(max_length=2)
Expand Down
9 changes: 1 addition & 8 deletions mm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
class Book(models.Model):
name = models.CharField(max_length=200)

#from fi.models import Code
# Supplier master
class Sup(models.Model):
code=models.OneToOneField('fi.Code',primary_key=True)
Expand All @@ -23,8 +22,6 @@ class Sup(models.Model):
def __str__(self):
return '%s' % (self.code)

#from es.models import Rmarea
#from pp.models import Rmrecipe
# Product group master [ Each item indicate one product line]
class Pgroup(models.Model):
groupname = models.CharField(max_length=60)
Expand Down Expand Up @@ -94,7 +91,6 @@ class Pbatch(models.Model):
expiery=models.DateField('expiery date')

# Finished goods store items.
#from sd.models import Vno
class Psr(models.Model):
vno_id=models.IntegerField() #ForeignKey(Vno,blank=True,null=True)
pack_id=models.ForeignKey(Packing)
Expand All @@ -105,7 +101,7 @@ class Psr(models.Model):

def __str__(self):
return ' '
#------------------------------------------------------------------------------------------------

# Units - to be extended with additional fields
class Unit(models.Model):
name=models.CharField(max_length=10,unique=True)
Expand Down Expand Up @@ -140,7 +136,6 @@ class Rgroup(models.Model):
def __str__(self):
return self.groupname

#from es.models import Rmarea
# List of actual usable materials baed on which formulation recipe if created.
class Rcode(models.Model):
rgroup_id=models.ForeignKey(Rgroup)
Expand Down Expand Up @@ -225,8 +220,6 @@ def _bal(self):
#quality data shall flow from existing system

# Material inventory transaction register- all incoming and outgoing
#from pp.models import Fstype
#from es.models import Rmarea
class Rsr(models.Model):
fstype_id=models.ForeignKey('pp.Fstype',null=True,blank=True)
tab_tp=models.CharField(max_length=1,blank=True,null=True)
Expand Down
27 changes: 10 additions & 17 deletions pp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import datetime
from django.db.models import Avg, Max, Min, Count,Sum
from django.shortcuts import render_to_response

#------------------------------------------------------------------------------------------------
# PP Module: Production planning model contains Sales Order | Formulation | Production Batch
#-------------------------------------------------------------------------------------------------

#from mm.models import Pgroup
# Raw material recipe master
class Rmrecipemaster(models.Model):
pgroup_id=models.ForeignKey('mm.Pgroup')
Expand All @@ -19,7 +19,6 @@ class Rmrecipemaster(models.Model):
def __str__(self):
return '%s %s %s %s' % (self.pgroup_id,self.fdate,'to',self.tdate)

#from mm.models import Packing
# Packing material recipe master
class Pmrecipemaster(models.Model):
packing_id=models.ForeignKey('mm.Packing')
Expand All @@ -29,13 +28,12 @@ class Pmrecipemaster(models.Model):
def __str__(self):
return '%s %s %s %s' % (self.packing_id,self.fdate,'to',self.tdate)

#from mm.models import Rcode
# Raw material used as : sometimes rcodes names are used differently in recipe [say sodium chloride called as (Salt as binder)
class Rcodeas(models.Model):
rcode=models.ForeignKey('mm.Rcode')
name=models.CharField(max_length=40)

#from mm.models import Rcode,Unit

# Version of RM recipe
class Rmrecipe(models.Model):
rmrecipemaster_id=models.ForeignKey(Rmrecipemaster)
Expand All @@ -54,7 +52,7 @@ class Rmrecipe(models.Model):
def cal(self,qty):
return round(self.fraction*qty*(100+self.overage)/100,self.roff)

#from mm.models import Rcode

# Version of PM recipe
class Pmrecipe(models.Model):
pmrecipemaster_id=models.ForeignKey(Pmrecipemaster)
Expand All @@ -67,7 +65,7 @@ class Pmrecipe(models.Model):
def required(self,qty):
return qty*self.fraction*(100+self.overage)/100

#from es.models import Rmarea

# Sale is done through some known transporters- so a master.
class Ptransport(models.Model):
name=models.CharField(max_length=40)
Expand All @@ -76,7 +74,7 @@ class Ptransport(models.Model):
def __str__(self):
return self.name

#from es.models import Rmarea

# List of key persons whose sale order we are processing. They can place orders online.
class Contacts(models.Model): # loan licensing
name=models.CharField(max_length=40)
Expand All @@ -88,10 +86,9 @@ class Contacts(models.Model): # loan licensing
def __str__(self):
return '%s %s ' % (self.name, self.rmarea_id)

#from es.models import Rmarea
from django.contrib.auth.models import User

# Sale orders master
from django.contrib.auth.models import User
class Pordermaster(models.Model):
rmarea_id=models.ForeignKey('es.Rmarea')
orno=models.CharField(max_length=40,null=True,verbose_name="Customer Order No")
Expand All @@ -108,8 +105,6 @@ class Meta:
verbose_name="Production Order"
unique_together=("rmarea_id","date")

#from mm.models import Packing

# Sale orders details
class Porder(models.Model):
pordermaster_id=models.ForeignKey(Pordermaster)
Expand All @@ -134,8 +129,6 @@ def test(self):
def __str__(self):
return '%s %s %s' % (self.pordermaster_id,self.packing_id, self.test())

#from es.models import Rmarea

# May be used later
class Mplanmaster(models.Model):
rmarea_id=models.ForeignKey('es.Rmarea')
Expand All @@ -154,7 +147,7 @@ class Phase(models.Model):
srno=models.IntegerField()
phase=models.CharField(max_length=20)

#from mm.models import Pgroup

# Batch planned
class Mbatch(models.Model):
fsno= models.CharField(max_length=10)
Expand Down Expand Up @@ -229,7 +222,7 @@ class MbatchPo(models.Model):
def __str__(self):
return '%s %s' % (self.porder_id,self.quantity)

#from mm.models import Packing

# Packing details of each batch planned
class Distt(models.Model):
mbatch_id=models.ForeignKey(Mbatch)
Expand Down Expand Up @@ -269,11 +262,11 @@ def pmfs_issue(self,mode="I"): # mode is issue or return flow sheet.
class Meta:
Isnew=True

# Each batch can have several output set- one such set may have X qty of product produced.
# TV stands for transfer vouche- Each batch can have several output set- one such set may have X qty of product produced.
class Tvmaster(models.Model):
date=models.DateField(null=True)

# Details of ne TVmaster.
# Details of one TVmaster.
class Tv(models.Model):
tvmaster_id=models.ForeignKey(Tvmaster)
distt_id=models.ForeignKey(Distt)
Expand Down

0 comments on commit 80e847c

Please sign in to comment.