Subversion Repositories SmartDukaan

Rev

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

Rev 5029 Rev 5054
Line 23... Line 23...
23
# KEY NAMES
23
# KEY NAMES
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', 'ashutosh.saxena@shop2020.in']
28
'chaitnaya.vats@shop2020.in', 'pankaj.kankar@shop2020.in', 'pankaj.jain@spiceglobal.com', 'ashutosh.saxena@shop2020.in', 'anupam.singh@shop2020.in']
29
SENDER = "cnc.center@shop2020.in"
29
SENDER = "cnc.center@shop2020.in"
30
PASSWORD = "5h0p2o2o"
30
PASSWORD = "5h0p2o2o"
31
SUBJECT = "Product Report"
31
SUBJECT = "Product Report"
32
SMTP_SERVER = "smtp.gmail.com"
32
SMTP_SERVER = "smtp.gmail.com"
33
SMTP_PORT = 587    
33
SMTP_PORT = 587    
Line 46... Line 46...
46
                          from sales s 
46
                          from sales s 
47
                          join item i on (i.id = s.item_id) 
47
                          join item i on (i.id = s.item_id) 
48
                          join datedim d on (d.date_id = s.date_id)
48
                          join datedim d on (d.date_id = s.date_id)
49
                          join orderstatus os on (s.status = os.status) 
49
                          join orderstatus os on (s.status = os.status) 
50
                          where d.monthnumber in (month(now()), month(now())-1)
50
                          where d.monthnumber in (month(now()), month(now())-1)
-
 
51
                          and d.year in (year(now()))
51
                          and os.statusGroup in ('In process', 'Delivered', 'Cancelled', 'Return in process', 'Reshipped', 'Refunded')
52
                          and os.statusGroup in ('In process', 'Delivered', 'Cancelled', 'Return in process', 'Reshipped', 'Refunded')
52
                          and os.statusSubGroup != 'Cod verification failed'
53
                          and os.statusSubGroup != 'Cod verification failed'
53
                          group by i.parent_category, i.category, i.brand, IFNULL(i.model_name, ''), 
54
                          group by i.parent_category, i.category, i.brand, IFNULL(i.model_name, ''), 
54
                                   IFNULL(i.model_number, ''), i.color, d.monthname, d.monthnumber, d.dayofmonth
55
                                   IFNULL(i.model_number, ''), i.color, d.monthname, d.monthnumber, d.dayofmonth
55
                '''
56
                '''