Subversion Repositories SmartDukaan

Rev

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

Rev 9609 Rev 9803
Line 49... Line 49...
49
    sheet.write(0, 9, "Payment Mode", heading_xf)
49
    sheet.write(0, 9, "Payment Mode", heading_xf)
50
    sheet.write(0, 10, "Credit Card No", heading_xf)
50
    sheet.write(0, 10, "Credit Card No", heading_xf)
51
    sheet.write(0, 11, "Expiry Month", heading_xf)
51
    sheet.write(0, 11, "Expiry Month", heading_xf)
52
    sheet.write(0, 12, "Expiry Year", heading_xf)
52
    sheet.write(0, 12, "Expiry Year", heading_xf)
53
    sheet.write(0, 13, "Name on Card", heading_xf)
53
    sheet.write(0, 13, "Name on Card", heading_xf)
54
    sheet.write(0, 14, "Card Level", heading_xf)
54
    sheet.write(0, 14, " Level", heading_xf)
55
    sheet.write(0, 15, "Issuer Bank", heading_xf)
55
    sheet.write(0, 15, "Issuer Bank", heading_xf)
56
    sheet.write(0, 16, "Card Brand", heading_xf)
56
    sheet.write(0, 16, "Card Brand", heading_xf)
57
    sheet.write(0, 17, "Address Line 1", heading_xf)
57
    sheet.write(0, 17, "Address Line 1", heading_xf)
58
    sheet.write(0, 18, "Address Line 2", heading_xf)
58
    sheet.write(0, 18, "Address Line 2", heading_xf)
59
    sheet.write(0, 19, "landmark", heading_xf)
59
    sheet.write(0, 19, "landmark", heading_xf)
60
    sheet.write(0, 20, "City", heading_xf)
60
    sheet.write(0, 20, "City", heading_xf)
61
    sheet.write(0, 21, "State", heading_xf)
61
    sheet.write(0, 21, "State", heading_xf)
62
    sheet.write(0, 22, "Pincode", heading_xf)
62
    sheet.write(0, 22, "Pincode", heading_xf)
63
    sheet.write(0, 23, "Primary Cust First Name", heading_xf)
63
    sheet.write(0, 23, "Primary Cust First Name ", heading_xf)
64
    sheet.write(0, 24, "Middle Name", heading_xf)
64
    sheet.write(0, 24, "Middle Name", heading_xf)
65
    sheet.write(0, 25, "Last Name", heading_xf)
65
    sheet.write(0, 25, "Last Name", heading_xf)
66
    sheet.write(0, 26, "DOB", heading_xf)
66
    sheet.write(0, 26, "DOB", heading_xf)
67
    sheet.write(0, 27, "Gender", heading_xf)
67
    sheet.write(0, 27, "Gender", heading_xf)
68
    sheet.write(0, 28, "email id", heading_xf)
68
    sheet.write(0, 28, "email id", heading_xf)
69
    sheet.write(0, 29, "mobile 1", heading_xf)
69
    sheet.write(0, 29, "mobile 1", heading_xf)
70
    sheet.write(0, 30, "mobile 2", heading_xf)
70
    sheet.write(0, 30, "mobile 2", heading_xf)
71
    sheet.write(0, 31, "OS", heading_xf)
71
    sheet.write(0, 31, "OS", heading_xf)
-
 
72
    sheet.write(0, 32, "PANNO", heading_xf)
-
 
73
    sheet.write(0, 33, "Relationship", heading_xf)
-
 
74
    sheet.write(0, 34, "Secondary Cust First Name", heading_xf)
-
 
75
    sheet.write(0, 35, "Middle Name", heading_xf)
-
 
76
    sheet.write(0, 36, "Last Name", heading_xf)
-
 
77
    sheet.write(0, 37, "DOB", heading_xf)
-
 
78
    sheet.write(0, 38, "Gender", heading_xf)
-
 
79
    sheet.write(0, 39, "email id", heading_xf)
-
 
80
    sheet.write(0, 40, "mobile 1", heading_xf)
-
 
81
    sheet.write(0, 41, "mobile 2", heading_xf)
-
 
82
    sheet.write(0, 42, "OS", heading_xf)
-
 
83
    sheet.write(0, 43, "PANNO", heading_xf)
-
 
84
    sheet.write(0, 44, "A/c No", heading_xf)
-
 
85
    sheet.write(0, 45, "A/c Type", heading_xf)
-
 
86
    sheet.write(0, 46, "A/c holder name", heading_xf)
-
 
87
    sheet.write(0, 47, "Branch name", heading_xf)
-
 
88
    sheet.write(0, 48, "MICR Code", heading_xf)
-
 
89
    sheet.write(0, 49, "IFSC Code", heading_xf)
-
 
90
    sheet.write(0, 50, "Cheque No", heading_xf)
-
 
91
    sheet.write(0, 51, "Cheque Date", heading_xf)
-
 
92
    sheet.write(0, 52, "Bank Name", heading_xf)
-
 
93
    sheet.write(0, 53, "Cheque Status", heading_xf)
-
 
94
    sheet.write(0, 54, "A/c No", heading_xf)
-
 
95
    sheet.write(0, 55, "A/c Type", heading_xf)
-
 
96
    sheet.write(0, 56, "A/c holder name", heading_xf)
-
 
97
    sheet.write(0, 57, "Branch name", heading_xf)
-
 
98
    sheet.write(0, 58, "MICR Code", heading_xf)
-
 
99
    sheet.write(0, 59, "IFSC Code", heading_xf)
-
 
100
    sheet.write(0, 60, "Cheque No.", heading_xf)
-
 
101
    sheet.write(0, 61, "Cheque Date", heading_xf)
-
 
102
    sheet.write(0, 62, "Bank Name", heading_xf)
-
 
103
    sheet.write(0, 63, "Cheque Status", heading_xf)
-
 
104
    sheet.write(0, 64, "ECS Start Date", heading_xf)
-
 
105
    sheet.write(0, 65, "ECS End Date", heading_xf)
72
    
106
    
73
    
107
    
74
    for dataInsurance in dataInsurances:
108
    for dataInsurance in dataInsurances:
75
        order = dataInsurance.order
109
        order = dataInsurance.order
76
        if order.status != OrderStatus.DELIVERY_SUCCESS:
110
        if order.status != OrderStatus.DELIVERY_SUCCESS:
Line 96... Line 130...
96
    
130
    
97
    session.commit()
131
    session.commit()
98
    
132
    
99
    today = date.today()
133
    today = date.today()
100
    datestr = str(today.day) + "-" + str(today.month) + "-" + str(today.year)
134
    datestr = str(today.day) + "-" + str(today.month) + "-" + str(today.year)
101
    filename = "/tmp/data-insurance-" + datestr + ".xls"
135
    filename = "/tmp/mobile-assist-" + datestr + ".xls"
102
    wbk.save(filename)
136
    wbk.save(filename)
-
 
137
    EmailAttachmentSender.mail("cnc.center@shop2020.in", "5h0p2o2o", ["retail-ops@oneassist.in", "abhay.chandak@oneassist.in"], "Mobile Assist data for date " + datestr, "Please find attached details for today.", [get_attachment_part(filename)], ["rajneesh.arora@saholic.com","rajveer.singh@saholic.com","kshitij.sood@saholic.com","pramit.singh@saholic.com"], [])
-
 
138
 
103
    
139
    
104
def returnOrders():
140
def returnOrders():
105
    todate = datetime.now()-timedelta(days = 2)
141
    todate = datetime.now()-timedelta(days = 2)
106
    orders = Order.query.filter(Order.dataProtectionInsurer > 0).filter(Order.received_return_timestamp >= todate).all()
142
    orders = Order.query.filter(Order.dataProtectionInsurer > 0).filter(Order.received_return_timestamp >= todate).all()
107
    if not orders:
143
    if not orders:
Line 140... Line 176...
140
        i+=1
176
        i+=1
141
        
177
        
142
    session.commit()
178
    session.commit()
143
    today = date.today()
179
    today = date.today()
144
    datestr = str(today.day) + "-" + str(today.month) + "-" + str(today.year)
180
    datestr = str(today.day) + "-" + str(today.month) + "-" + str(today.year)
145
    filename = "/tmp/data-insurance-return" + datestr + ".xls"
181
    filename = "/tmp/mobile-assist-return" + datestr + ".xls"
146
    wbk.save(filename)
182
    wbk.save(filename)
147
        
183
        
148
    
184
    
149
 
185
 
150
def main():
186
def main():