Subversion Repositories SmartDukaan

Rev

Rev 4503 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4503 Rev 6380
Line 8... Line 8...
8
from elixir.options import using_options, using_table_options
8
from elixir.options import using_options, using_table_options
9
from elixir.relationships import ManyToOne
9
from elixir.relationships import ManyToOne
10
from shop2020.thriftpy.purchase.ttypes import Purchase as TPurchase
10
from shop2020.thriftpy.purchase.ttypes import Purchase as TPurchase
11
from shop2020.utils.Utils import to_java_date
11
from shop2020.utils.Utils import to_java_date
12
from sqlalchemy.types import Integer, String, Float, DateTime
12
from sqlalchemy.types import Integer, String, Float, DateTime
-
 
13
import datetime
13
 
14
 
14
class Purchase(Entity):
15
class Purchase(Entity):
15
    '''
16
    '''
16
    classdocs
17
    classdocs
17
    '''
18
    '''
Line 28... Line 29...
28
        Constructor
29
        Constructor
29
        '''
30
        '''
30
        self.purchaseOrder = purchaseOrder
31
        self.purchaseOrder = purchaseOrder
31
        self.invoiceNumber = invoiceNumber
32
        self.invoiceNumber = invoiceNumber
32
        self.freightCharges = freightCharges
33
        self.freightCharges = freightCharges
-
 
34
        self.receivedOn = datetime.datetime.now()
33
        
35
        
34
    def to_thrift_object(self):
36
    def to_thrift_object(self):
35
        t_purchase = TPurchase()
37
        t_purchase = TPurchase()
36
        t_purchase.id = self.id
38
        t_purchase.id = self.id
37
        t_purchase.poId = self.purchaseOrder.id
39
        t_purchase.poId = self.purchaseOrder.id