File size: 2,873 Bytes
2e53f8d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from django.db import models


# Create your models here.


class FabricBatch(models.Model):
    GRN = models.CharField(max_length=100, unique=True)
    supplierName = models.CharField(max_length=100, null=True, blank=True)
    buyer = models.CharField(max_length=100, null=True, blank=True)
    quantity = models.CharField(max_length=100, null=True, blank=True)
    fabricDescription = models.CharField(max_length=500, null=True, blank=True)
    itemDescription = models.CharField(max_length=500, null=True, blank=True)
    fabricForm = models.CharField(max_length=100, null=True, blank=True)
    POWidth = models.FloatField(null=True, blank=True)
    POUOM = models.CharField(max_length=100, null=True, blank=True)
    PointsUOM = models.CharField(max_length=100, null=True, blank=True)
    Tolarence = models.IntegerField(null=True, blank=True)
    color = models.CharField(max_length=100, null=True, blank=True)
    supplier =  models.CharField(max_length=100, null=True, blank=True)
    item =  models.CharField(max_length=100, null=True, blank=True)
    PCH =  models.CharField(max_length=100, null=True, blank=True)
    invoice = models.IntegerField(null=True, blank=True)
    fabricOdour =  models.CharField(max_length=100, null=True, blank=True)
    PO = models.IntegerField( null=True, blank=True)
    basicUOM =  models.CharField(max_length=100, null=True, blank=True)
    Warehouse = models.IntegerField(null=True, blank=True)
    convFactor =  models.IntegerField(null=True, blank=True)
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    def __str__(self):
        return self.GRN


class FabriRoll(models.Model):
    name = models.CharField(max_length=100, unique=True)
    GRN = models.ForeignKey(FabricBatch, on_delete=models.CASCADE, null=True, blank=True)
    rLength = models.FloatField(null=True, blank=True)
    aLength = models.FloatField(null=True, blank=True)
    minWidth = models.FloatField(null=True, blank=True)
    maxWidth = models.FloatField(null=True, blank=True)
    CS = models.CharField(max_length=20, null=True, blank=True)
    LWV = models.CharField(max_length=20, null=True, blank=True)
    EPI = models.FloatField(null=True, blank=True)
    PPI = models.FloatField(null=True, blank=True)
    CutPcs = models.FloatField(null=True, blank=True)
    sWarp = models.FloatField(null=True, blank=True)
    sWeft = models.FloatField(null=True, blank=True)
    GSM = models.FloatField(null=True, blank=True)
    SL = models.FloatField(null=True, blank=True)
    SG = models.FloatField(null=True, blank=True)
    Bowing = models.FloatField(null=True, blank=True)
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    def __str__(self):
        return self.name