Subversion Repositories SmartDukaan

Rev

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

Rev 14116 Rev 14416
Line 5... Line 5...
5
import email.encoders
5
import email.encoders
6
import smtplib
6
import smtplib
7
 
7
 
8
con = None
8
con = None
9
 
9
 
-
 
10
statusMap = {1:'Active',2:'EOL',3:'In Process',4:'Exclusive'}
-
 
11
 
10
class __SkuInfo:
12
class __SkuInfo:
11
    
13
    
12
    def __init__(self, _id, skuBundleId, category_id, mrp, available_price, source_id, rank, maxNlc, minNlc, schemeAmount, minDiscount, \
14
    def __init__(self, _id, skuBundleId, category_id, mrp, available_price, source_id, rank, maxNlc, minNlc, schemeAmount, minDiscount, \
13
                 maxDiscount, discountType, dp, nlcPoints, bestSellerPoints, totalPoints,in_stock,maxprice,showDeal, catalogBestSellerPoints):
15
                 maxDiscount, discountType, dp, nlcPoints, bestSellerPoints, totalPoints,in_stock,maxprice,showDeal, catalogBestSellerPoints):
14
        self._id = _id
16
        self._id = _id
Line 102... Line 104...
102
        else:
104
        else:
103
            category = 'Tablets'
105
            category = 'Tablets'
104
        sheet.write(it, 2, category)
106
        sheet.write(it, 2, category)
105
        sheet.write(it, 3, y[0]['brand'])
107
        sheet.write(it, 3, y[0]['brand'])
106
        sheet.write(it, 4, y[0]['product_name'])
108
        sheet.write(it, 4, y[0]['product_name'])
107
        if y[0]['status'] ==1:
-
 
108
            sheet.write(it, 5, 'Active')
109
        sheet.write(it, 5, statusMap.get(y[0]['status']))
109
        else:
-
 
110
            sheet.write(it, 5, 'EOL')
-
 
111
        if y[0]['in_stock'] ==1:
110
        if y[0]['in_stock'] ==1:
112
            sheet.write(it, 6, 'In Stock')
111
            sheet.write(it, 6, 'In Stock')
113
        else:
112
        else:
114
            sheet.write(it, 6, 'Out Of Stock')
113
            sheet.write(it, 6, 'Out Of Stock')
115
        sheet.write(it, 7, y[0]['source'])
114
        sheet.write(it, 7, y[0]['source'])