Subversion Repositories SmartDukaan

Rev

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

Rev 14659 Rev 14693
Line 496... Line 496...
496
        ''',)
496
        ''',)
497
    row = 0
497
    row = 0
498
    i=-1
498
    i=-1
499
    worksheet.write(row, inc(), 'User Id', boldStyle)
499
    worksheet.write(row, inc(), 'User Id', boldStyle)
500
    worksheet1.write(row, i, 'User Id', boldStyle)
500
    worksheet1.write(row, i, 'User Id', boldStyle)
501
    sh1.write(row, i, 'User Id', boldStyle)
-
 
502
    worksheet.write(row, inc(), 'User name', boldStyle)
501
    worksheet.write(row, inc(), 'User name', boldStyle)
503
    worksheet1.write(row, i, 'User name', boldStyle)
502
    worksheet1.write(row, i, 'User name', boldStyle)
504
    sh1.write(row, i, 'User name', boldStyle)
-
 
505
    worksheet.write(row, inc(), 'Order Id', boldStyle)
503
    worksheet.write(row, inc(), 'Order Id', boldStyle)
506
    worksheet1.write(row, i, 'Order Id', boldStyle)
504
    worksheet1.write(row, i, 'Order Id', boldStyle)
507
    sh1.write(row, i, 'Order Id', boldStyle)
-
 
508
    worksheet.write(row, inc(), 'Created On', boldStyle)
505
    worksheet.write(row, inc(), 'Created On', boldStyle)
509
    worksheet1.write(row, i, 'Created On', boldStyle)
506
    worksheet1.write(row, i, 'Created On', boldStyle)
510
    sh1.write(row, i, 'Created On', boldStyle)
-
 
511
    worksheet.write(row, inc(), 'Store Id', boldStyle)
507
    worksheet.write(row, inc(), 'Store Id', boldStyle)
512
    worksheet1.write(row, i, 'Store Id', boldStyle)
508
    worksheet1.write(row, i, 'Store Id', boldStyle)
513
    sh1.write(row, i, 'Store Id', boldStyle)
-
 
514
    worksheet.write(row, inc(), 'Merchant Order Id', boldStyle)
509
    worksheet.write(row, inc(), 'Merchant Order Id', boldStyle)
515
    worksheet1.write(row, i, 'Merchant Order Id', boldStyle)
510
    worksheet1.write(row, i, 'Merchant Order Id', boldStyle)
516
    sh1.write(row, i, 'Merchant Order Id', boldStyle)
-
 
517
    worksheet.write(row, inc(), 'Product title', boldStyle)
511
    worksheet.write(row, inc(), 'Product title', boldStyle)
518
    worksheet1.write(row, i, 'Product title', boldStyle)
512
    worksheet1.write(row, i, 'Product title', boldStyle)
519
    sh1.write(row, i, 'Product title', boldStyle)
-
 
520
    worksheet.write(row, inc(), 'Amount Paid', boldStyle)
513
    worksheet.write(row, inc(), 'Amount Paid', boldStyle)
521
    worksheet1.write(row, i, 'Amount Paid', boldStyle)
514
    worksheet1.write(row, i, 'Amount Paid', boldStyle)
522
    sh1.write(row, i, 'Amount Paid', boldStyle)
-
 
523
    worksheet.write(row, inc(), 'Cashback', boldStyle)
515
    worksheet.write(row, inc(), 'Cashback', boldStyle)
524
    worksheet1.write(row, i, 'Cashback', boldStyle)
516
    worksheet1.write(row, i, 'Cashback', boldStyle)
525
    sh1.write(row, i, 'Brand', boldStyle)
-
 
526
    worksheet.write(row, inc(), 'Order Status', boldStyle)
517
    worksheet.write(row, inc(), 'Order Status', boldStyle)
527
    worksheet1.write(row, i, 'Order Status', boldStyle)
518
    worksheet1.write(row, i, 'Order Status', boldStyle)
528
    sh1.write(row, i, 'Model', boldStyle)
-
 
529
    worksheet.write(row, inc(), 'Detailed Status', boldStyle)
519
    worksheet.write(row, inc(), 'Detailed Status', boldStyle)
530
    worksheet1.write(row, i, 'Detailed Status', boldStyle)
520
    worksheet1.write(row, i, 'Detailed Status', boldStyle)
531
    sh1.write(row, i, 'Category', boldStyle)
-
 
532
    worksheet.write(row, inc(), 'Cashback Status', boldStyle)
521
    worksheet.write(row, inc(), 'Cashback Status', boldStyle)
533
    worksheet1.write(row, i, 'Cashback Status', boldStyle)
522
    worksheet1.write(row, i, 'Cashback Status', boldStyle)
534
    worksheet.write(row, inc(), 'Reconciled', boldStyle)
523
    worksheet.write(row, inc(), 'Reconciled', boldStyle)
535
    worksheet1.write(row, i, 'Reconciled', boldStyle)
524
    worksheet1.write(row, i, 'Reconciled', boldStyle)
536
    worksheet.write(row, inc(), 'IP', boldStyle)
525
    worksheet.write(row, inc(), 'IP', boldStyle)
537
    worksheet1.write(row, i, 'IP', boldStyle)
526
    worksheet1.write(row, i, 'IP', boldStyle)
-
 
527
    i=-1
-
 
528
    sh1.write(row, inc(), 'User Id', boldStyle)
-
 
529
    sh1.write(row, inc(), 'User name', boldStyle)
-
 
530
    sh1.write(row, inc(), 'Order Id', boldStyle)
-
 
531
    sh1.write(row, inc(), 'Created On', boldStyle)
-
 
532
    sh1.write(row, inc(), 'Store Id', boldStyle)
-
 
533
    sh1.write(row, inc(), 'Merchant Order Id', boldStyle)
-
 
534
    sh1.write(row, inc(), 'Product title', boldStyle)
-
 
535
    sh1.write(row, inc(), 'Referrer', boldStyle)
-
 
536
    sh1.write(row, inc(), 'Amount Paid', boldStyle)
-
 
537
    sh1.write(row, inc(), 'Brand', boldStyle)
-
 
538
    sh1.write(row, inc(), 'Model', boldStyle)
-
 
539
    sh1.write(row, inc(), 'Category', boldStyle)
538
    
540
    
539
    row=0
541
    row=0
540
    row2=0
542
    row2=0
541
    row3=0
543
    row3=0
542
    db1 = client.Catalog
544
    db1 = client.Catalog
Line 553... Line 555...
553
                    sh1.write(row3, inc(), result[1])
555
                    sh1.write(row3, inc(), result[1])
554
                    sh1.write(row3, inc(), result[-4], datetime_format)
556
                    sh1.write(row3, inc(), result[-4], datetime_format)
555
                    sh1.write(row3, inc(), sourceMap.get(result[2]))
557
                    sh1.write(row3, inc(), sourceMap.get(result[2]))
556
                    sh1.write(row3, inc(), morder.get("merchantOrderId"))
558
                    sh1.write(row3, inc(), morder.get("merchantOrderId"))
557
                    sh1.write(row3, inc(), subOrder.get("productTitle"))
559
                    sh1.write(row3, inc(), subOrder.get("productTitle"))
-
 
560
                    sh1.write(row3, inc(), result[-1])
558
                    inc()
561
                    inc()
559
                    if int(subOrder.get("quantity")) > 0:
562
                    if int(subOrder.get("quantity")) > 0:
560
                        sh1.write(row3, i, int(subOrder.get("amountPaid"))/int(subOrder.get("quantity")))
563
                        sh1.write(row3, i, int(subOrder.get("amountPaid"))/int(subOrder.get("quantity")))
561
                    skuData = getSkuData(morder.get("storeId"), subOrder.get("productCode"))
564
                    skuData = getSkuData(morder.get("storeId"), subOrder.get("productCode"))
562
                    if morder.get("storeId") in (1,2,4,5):
565
                    if morder.get("storeId") in (1,2,4,5):
Line 635... Line 638...
635
    
638
    
636
    generateSnapDealReco()
639
    generateSnapDealReco()
637
    generateFlipkartReco()
640
    generateFlipkartReco()
638
    generateAmazonReco(XLS_A_FILENAME)
641
    generateAmazonReco(XLS_A_FILENAME)
639
    getUserOrders()
642
    getUserOrders()
640
    sendmail(["amit.gupta@shop2020.in","rajneesh.arora@saholic.com"], "", "Affiliate Reco", XLS_FILENAME, XLS_F_FILENAME, XLS_A_FILENAME)
643
    #sendmail(["amit.gupta@shop2020.in","rajneesh.arora@saholic.com"], "", "Affiliate Reco", XLS_FILENAME, XLS_F_FILENAME, XLS_A_FILENAME)
641
    sendmail(["amit.gupta@shop2020.in", "rajneesh.arora@saholic.com", "chaitnaya.vats@saholic.com", "manoj.kumar@saholic.com"], "", "All DTR Orders", XLS_O_FILENAME)
644
    #sendmail(["amit.gupta@shop2020.in", "rajneesh.arora@saholic.com", "chaitnaya.vats@saholic.com", "manoj.kumar@saholic.com"], "", "All DTR Orders", XLS_O_FILENAME)
642
 
645
 
643
if __name__ == '__main__':
646
if __name__ == '__main__':
644
    main()
647
    main()
645
    
648
    
646
649