Subversion Repositories SmartDukaan

Rev

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

Rev 4386 Rev 4391
Line 1... Line 1...
1
from shop2020.thriftpy.logistics.ttypes import Provider as TProvider, AwbUpdate as TAwbUpdate, \
1
from shop2020.thriftpy.logistics.ttypes import Provider as TProvider, AwbUpdate as TAwbUpdate, \
2
        ProviderDetails as TProviderDetails, Awb as TAwb
2
        ProviderDetails as TProviderDetails
3
from shop2020.utils.Utils import to_java_date
3
from shop2020.utils.Utils import to_java_date
4
 
4
 
5
 
5
 
6
def to_t_provider(provider):
6
def to_t_provider(provider):
7
    t_provider = TProvider()
7
    t_provider = TProvider()
Line 24... Line 24...
24
    t_update.providerName = update.awb.provider.name
24
    t_update.providerName = update.awb.provider.name
25
    t_update.description  = update.description + " - " + update.comments
25
    t_update.description  = update.description + " - " + update.comments
26
    t_update.location     = update.location
26
    t_update.location     = update.location
27
    t_update.entryDate    = to_java_date(update.entry_date)
27
    t_update.entryDate    = to_java_date(update.entry_date)
28
    return t_update
28
    return t_update
29
 
-
 
30
def to_t_awb(awb):
-
 
31
    t_awb = TAwb()
-
 
32
    t_awb.id = awb.id
-
 
33
    t_awb.awbNumber = awb.awb_number
-
 
34
    t_awb.providerId = awb.provider.id
-
 
35
    t_awb.deliveryType = awb.type
-
 
36
    return t_awb
-
 
37
29