Subversion Repositories SmartDukaan

Rev

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

Rev 11385 Rev 11795
Line 9... Line 9...
9
'''
9
'''
10
from optparse import OptionParser
10
from optparse import OptionParser
11
from shop2020.clients.InventoryClient import InventoryClient
11
from shop2020.clients.InventoryClient import InventoryClient
12
from shop2020.clients.LogisticsClient import LogisticsClient
12
from shop2020.clients.LogisticsClient import LogisticsClient
13
from shop2020.clients.TransactionClient import TransactionClient
13
from shop2020.clients.TransactionClient import TransactionClient
14
from shop2020.thriftpy.model.v1.order.ttypes import Order, DelayReason
14
from shop2020.thriftpy.model.v1.order.ttypes import Order, DelayReason, OrderStatus
15
from shop2020.utils.EmailAttachmentSender import get_attachment_part, mail_html
15
from shop2020.utils.EmailAttachmentSender import get_attachment_part, mail_html
16
from shop2020.utils.Utils import to_py_date, to_java_date
16
from shop2020.utils.Utils import to_py_date, to_java_date
17
import datetime
17
import datetime
18
import xlwt
18
import xlwt
19
 
19
 
Line 95... Line 95...
95
    source[4] = 'HOMESHOP18'
95
    source[4] = 'HOMESHOP18'
96
    source[5] = 'NAAPTOL'
96
    source[5] = 'NAAPTOL'
97
    source[6] = 'EBAY'
97
    source[6] = 'EBAY'
98
    source[7] = 'SNAPDEAL'
98
    source[7] = 'SNAPDEAL'
99
    source[8] = 'FLIPKART'
99
    source[8] = 'FLIPKART'
100
    source[9] = 'UNKNOWN'
100
    source[9] = 'MOBILESITE'
101
    source[10] = 'UNKNOWN'
101
    source[10] = 'UNKNOWN'
102
    
102
    
103
    i = 1
103
    i = 1
104
    for order in slipped_orders:
104
    for order in slipped_orders:
105
        #if order.source ==6:
105
        if order.source ==8 and order.status == OrderStatus.BILLED:
106
            #continue
106
            continue            
107
        html +="<tr>"
107
        html +="<tr>"
108
        sheet.write(i, 0, order.id)
108
        sheet.write(i, 0, order.id)
109
        html +="<td>" + str(order.id) + "</td>" 
109
        html +="<td>" + str(order.id) + "</td>" 
110
        sheet.write(i, 1, source[order.source])
110
        sheet.write(i, 1, source[order.source])
111
        html +="<td>" + str(source[order.source]) + "</td>"
111
        html +="<td>" + str(source[order.source]) + "</td>"