Subversion Repositories SmartDukaan

Rev

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

Rev 17150 Rev 17151
Line 209... Line 209...
209
                alldata = "'"+data[0]+"'"
209
                alldata = "'"+data[0]+"'"
210
            tbody.append(rowtemplate_brand.format(data[0],data[1],data[2],data[3]))
210
            tbody.append(rowtemplate_brand.format(data[0],data[1],data[2],data[3]))
211
        
211
        
212
        print alldata
212
        print alldata
213
        cur.execute('''select sum(amount_paid) amount,count(*) quantity,count(distinct order_id) from allorder 
213
        cur.execute('''select sum(amount_paid) amount,count(*) quantity,count(distinct order_id) from allorder 
214
                    where created_on >= CURDATE() -  interval 1 day and o.created_on < CURDATE() and brand not in("+alldata+")
214
                    where created_on >= CURDATE() -  interval 1 day and created_on < CURDATE() and brand not in("+alldata+")
215
                    ''')
215
                    ''')
216
        row_other = cur.fetchall()
216
        row_other = cur.fetchall()
217
        print row_other
217
        print row_other
218
        for data in row_other:
218
        for data in row_other:
219
            sheet1.write(row,0,'Other')
219
            sheet1.write(row,0,'Other')