Subversion Repositories SmartDukaan

Rev

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

Rev 14874 Rev 14881
Line 596... Line 596...
596
                    if skuData is not None:
596
                    if skuData is not None:
597
                        sh1.write(row3, inc(), skuData.get("skuBundleId"))
597
                        sh1.write(row3, inc(), skuData.get("skuBundleId"))
598
                        sh1.write(row3, inc(), skuData.get("brand"))
598
                        sh1.write(row3, inc(), skuData.get("brand"))
599
                        sh1.write(row3, inc(), skuData.get("model_name"))
599
                        sh1.write(row3, inc(), skuData.get("model_name"))
600
                        sh1.write(row3, inc(), skuData.get("category"))
600
                        sh1.write(row3, inc(), skuData.get("category"))
-
 
601
                    #removed filter as requested by Rajneesh
601
                    if subOrder.get("cashBackStatus") == Store.CB_APPROVED or subOrder.get("cashBackStatus") == Store.CB_PENDING:
602
                    #if subOrder.get("cashBackStatus") == Store.CB_APPROVED or subOrder.get("cashBackStatus") == Store.CB_PENDING:
-
 
603
                    row +=1
-
 
604
                    i=-1
-
 
605
                    worksheet.write(row, inc(), result[0])
-
 
606
                    worksheet.write(row, inc(), result[-3])
-
 
607
                    worksheet.write(row, inc(), result[1])
-
 
608
                    worksheet.write(row, inc(), result[-4], datetime_format)
-
 
609
                    worksheet.write(row, inc(), result[2])
-
 
610
                    worksheet.write(row, inc(), morder.get("merchantOrderId"))
-
 
611
                    worksheet.write(row, inc(), subOrder.get("productTitle"))
-
 
612
                    worksheet.write(row, inc(), subOrder.get("amountPaid"))
-
 
613
                    worksheet.write(row, inc(), subOrder.get("cashBackAmount"))
-
 
614
                    worksheet.write(row, inc(), subOrder.get("status"))
-
 
615
                    worksheet.write(row, inc(), subOrder.get("detailedStatus"))
-
 
616
                    worksheet.write(row, inc(), subOrder.get("cashBackStatus"))
-
 
617
                    worksheet.write(row, inc(), False if morder.get("reconciled") is None else True)
-
 
618
                    if morder.get("reconciled") and morder.get("storeId")==3:
-
 
619
                        try:
-
 
620
                            worksheet.write(row, inc(), db.snapdealOrderAffiliateInfo.find_one({"adId":morder.get("adId"), "reconciled":True}).get("ip"))
-
 
621
                        except:
-
 
622
                            print "Could not find", morder.get("adId"), "that is reconcired for order", morder.get("orderId")
-
 
623
                    if result[-2] >= 10:
602
                        row +=1
624
                        row2 +=1 
603
                        i=-1
625
                        i=-1
604
                        worksheet.write(row, inc(), result[0])
626
                        worksheet1.write(row2, inc(), result[0])
605
                        worksheet.write(row, inc(), result[-3])
627
                        worksheet1.write(row2, inc(), result[-3])
606
                        worksheet.write(row, inc(), result[1])
628
                        worksheet1.write(row2, inc(), result[1])
607
                        worksheet.write(row, inc(), result[-4], datetime_format)
629
                        worksheet1.write(row2, inc(), result[-4], datetime_format)
608
                        worksheet.write(row, inc(), result[2])
630
                        worksheet1.write(row2, inc(), result[2])
609
                        worksheet.write(row, inc(), morder.get("merchantOrderId"))
631
                        worksheet1.write(row2, inc(), morder.get("merchantOrderId"))
610
                        worksheet.write(row, inc(), subOrder.get("productTitle"))
632
                        worksheet1.write(row2, inc(), subOrder.get("productTitle"))
611
                        worksheet.write(row, inc(), subOrder.get("amountPaid"))
633
                        worksheet1.write(row2, inc(), subOrder.get("amountPaid"))
612
                        worksheet.write(row, inc(), subOrder.get("cashBackAmount"))
634
                        worksheet1.write(row2, inc(), subOrder.get("cashBackAmount"))
613
                        worksheet.write(row, inc(), subOrder.get("status"))
635
                        worksheet1.write(row2, inc(), subOrder.get("status"))
614
                        worksheet.write(row, inc(), subOrder.get("detailedStatus"))
636
                        worksheet1.write(row2, inc(), subOrder.get("detailedStatus"))
615
                        worksheet.write(row, inc(), subOrder.get("cashBackStatus"))
637
                        worksheet1.write(row2, inc(), subOrder.get("cashBackStatus"))
616
                        worksheet.write(row, inc(), False if morder.get("reconciled") is None else True)
638
                        worksheet1.write(row2, inc(), False if morder.get("reconciled") is None else True)
617
                        if morder.get("reconciled") and morder.get("storeId")==3:
639
                        if morder.get("reconciled") and morder.get("storeId")==3:
618
                            try:
640
                            try:
619
                                worksheet.write(row, inc(), db.snapdealOrderAffiliateInfo.find_one({"adId":morder.get("adId"), "reconciled":True}).get("ip"))
641
                                worksheet1.write(row2, inc(), db.snapdealOrderAffiliateInfo.find_one({"adId":morder.get("adId"), "reconciled":True}).get("ip"))
620
                            except:
642
                            except:
621
                                print "Could not find", morder.get("adId"), "that is reconcired for order", morder.get("orderId")
643
                                print "Could not find", morder.get("adId"), "that is reconcired for order", morder.get("orderId")
622
                        if result[-2] >= 10:
-
 
623
                            row2 +=1 
-
 
624
                            i=-1
-
 
625
                            worksheet1.write(row2, inc(), result[0])
-
 
626
                            worksheet1.write(row2, inc(), result[-3])
-
 
627
                            worksheet1.write(row2, inc(), result[1])
-
 
628
                            worksheet1.write(row2, inc(), result[-4], datetime_format)
-
 
629
                            worksheet1.write(row2, inc(), result[2])
-
 
630
                            worksheet1.write(row2, inc(), morder.get("merchantOrderId"))
-
 
631
                            worksheet1.write(row2, inc(), subOrder.get("productTitle"))
-
 
632
                            worksheet1.write(row2, inc(), subOrder.get("amountPaid"))
-
 
633
                            worksheet1.write(row2, inc(), subOrder.get("cashBackAmount"))
-
 
634
                            worksheet1.write(row2, inc(), subOrder.get("status"))
-
 
635
                            worksheet1.write(row2, inc(), subOrder.get("detailedStatus"))
-
 
636
                            worksheet1.write(row2, inc(), subOrder.get("cashBackStatus"))
-
 
637
                            worksheet1.write(row2, inc(), False if morder.get("reconciled") is None else True)
-
 
638
                            if morder.get("reconciled") and morder.get("storeId")==3:
-
 
639
                                try:
-
 
640
                                    worksheet1.write(row2, inc(), db.snapdealOrderAffiliateInfo.find_one({"adId":morder.get("adId"), "reconciled":True}).get("ip"))
-
 
641
                                except:
-
 
642
                                    print "Could not find", morder.get("adId"), "that is reconcired for order", morder.get("orderId")
-
 
643
                    
644
                    
644
                                    
645
                                    
645
    wb.save(XLS_FILENAME)
646
    wb.save(XLS_FILENAME)
646
    workbook.save(XLS_O_FILENAME)
647
    workbook.save(XLS_O_FILENAME)
647
    
648