Subversion Repositories SmartDukaan

Rev

Rev 1408 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1408 Rev 4090
Line 1... Line 1...
1
#!/usr/bin/python 
1
#!/usr/bin/python 
-
 
2
'''
-
 
3
Mails a report of orders which should have been delivered
-
 
4
but have been not. It is scheduled to run after the LogisticsReconciliation.
2
 
5
 
-
 
6
@author: Chandranshu
-
 
7
'''
3
import os
8
import os
4
import sys
9
import sys
5
import csv
10
import csv
6
 
11
 
7
if __name__ == '__main__' and __package__ is None:
12
if __name__ == '__main__' and __package__ is None:
Line 12... Line 17...
12
from shop2020.clients.TransactionClient import TransactionClient
17
from shop2020.clients.TransactionClient import TransactionClient
13
from shop2020.clients.LogisticsClient import LogisticsClient
18
from shop2020.clients.LogisticsClient import LogisticsClient
14
 
19
 
15
from_user = 'cnc.center@shop2020.in'
20
from_user = 'cnc.center@shop2020.in'
16
from_pwd = '5h0p2o2o'
21
from_pwd = '5h0p2o2o'
17
to = 'cnc.center@shop2020.in'
22
to = ['cnc.center@shop2020.in']
18
 
23
 
19
def get_undelivered_orders(providerId = -1, warehouseId = -1):
24
def get_undelivered_orders(providerId = -1, warehouseId = -1):
20
    txnClient = TransactionClient().get_client()
25
    txnClient = TransactionClient().get_client()
21
    undeliveredOrders = txnClient.getUndeliveredOrders(providerId, warehouseId)
26
    undeliveredOrders = txnClient.getUndeliveredOrders(providerId, warehouseId)
22
    return undeliveredOrders
27
    return undeliveredOrders