| Line 24... |
Line 24... |
| 24 |
MONTHNAME = 'monthname'
|
24 |
MONTHNAME = 'monthname'
|
| 25 |
DATES = 'dates'
|
25 |
DATES = 'dates'
|
| 26 |
|
26 |
|
| 27 |
MAILTO = ['rajneesharora@spiceretail.co.in', 'yukti.jain@spiceretail.co.in', 'sandeep.sachdeva@shop2020.in', \
|
27 |
MAILTO = ['rajneesharora@spiceretail.co.in', 'yukti.jain@spiceretail.co.in', 'sandeep.sachdeva@shop2020.in', \
|
| 28 |
'chaitnaya.vats@shop2020.in', 'pankaj.kankar@shop2020.in', 'pankaj.jain@spiceglobal.com', ]
|
28 |
'chaitnaya.vats@shop2020.in', 'pankaj.kankar@shop2020.in', 'pankaj.jain@spiceglobal.com', ]
|
| 29 |
|
- |
|
| 30 |
|
- |
|
| 31 |
SENDER = "cnc.center@shop2020.in"
|
29 |
SENDER = "cnc.center@shop2020.in"
|
| 32 |
PASSWORD = "5h0p2o2o"
|
30 |
PASSWORD = "5h0p2o2o"
|
| 33 |
SUBJECT = "Product Report"
|
31 |
SUBJECT = "Product Report"
|
| 34 |
SMTP_SERVER = "smtp.gmail.com"
|
32 |
SMTP_SERVER = "smtp.gmail.com"
|
| 35 |
SMTP_PORT = 587
|
33 |
SMTP_PORT = 587
|
| Line 48... |
Line 46... |
| 48 |
from sales s
|
46 |
from sales s
|
| 49 |
join item i on (i.id = s.item_id)
|
47 |
join item i on (i.id = s.item_id)
|
| 50 |
join datedim d on (d.date_id = s.date_id)
|
48 |
join datedim d on (d.date_id = s.date_id)
|
| 51 |
join orderstatus os on (s.status = os.status)
|
49 |
join orderstatus os on (s.status = os.status)
|
| 52 |
where d.monthnumber in (month(now()), month(now())-1)
|
50 |
where d.monthnumber in (month(now()), month(now())-1)
|
| 53 |
and os.isValid = 'Valid'
|
51 |
and os.statusGroup in ('In process', 'Delivered', 'Cancelled', 'Return in process', 'Reshipped', 'Refunded')
|
| 54 |
and os.description != 'Refunded'
|
52 |
and os.statusSubGroup != 'Cod verification failed'
|
| 55 |
group by i.parent_category, i.category, i.brand, IFNULL(i.model_name, ''),
|
53 |
group by i.parent_category, i.category, i.brand, IFNULL(i.model_name, ''),
|
| 56 |
IFNULL(i.model_number, ''), i.color, d.monthname, d.monthnumber, d.dayofmonth
|
54 |
IFNULL(i.model_number, ''), i.color, d.monthname, d.monthnumber, d.dayofmonth
|
| 57 |
'''
|
55 |
'''
|
| 58 |
conn = getDbConnection()
|
56 |
conn = getDbConnection()
|
| 59 |
monthdatesmap = {}
|
57 |
monthdatesmap = {}
|