Subversion Repositories SmartDukaan

Rev

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

Rev 22123 Rev 22393
Line 11... Line 11...
11
from shop2020.clients.PurchaseClient import PurchaseClient
11
from shop2020.clients.PurchaseClient import PurchaseClient
12
from shop2020.clients.TransactionClient import TransactionClient
12
from shop2020.clients.TransactionClient import TransactionClient
13
from shop2020.clients.UserClient import UserClient
13
from shop2020.clients.UserClient import UserClient
14
from shop2020.model.v1.catalog.impl import DataService
14
from shop2020.model.v1.catalog.impl import DataService
15
from shop2020.model.v1.catalog.impl.DataService import CentralGstMaster, \
15
from shop2020.model.v1.catalog.impl.DataService import CentralGstMaster, \
16
    StateGstMaster, Category, CategoryHsnCodes
16
    StateGstMaster, Category, CategoryHsnCodes, Tag_Listing
17
from shop2020.thriftpy.model.v1.order.ttypes import TransactionStatus
17
from shop2020.thriftpy.model.v1.order.ttypes import TransactionStatus
18
from sqlalchemy import desc, asc
18
from sqlalchemy import desc, asc
19
from sqlalchemy.orm import aliased
19
from sqlalchemy.orm import aliased
20
from sqlalchemy.sql.expression import or_, distinct, func, and_, exists
20
from sqlalchemy.sql.expression import or_, distinct, func, and_, exists
21
from sqlalchemy.sql.functions import now
21
from sqlalchemy.sql.functions import now
Line 42... Line 42...
42
    childCategories = []
42
    childCategories = []
43
    
43
    
44
 
44
 
45
def addHsnCodes():
45
def addHsnCodes():
46
    gstTuple = [
46
    gstTuple = [
47
                (10027, 'Power Bank', '85076000', 28),
47
                (10026, 'Bluetooth Speaker', '8519', 28),
-
 
48
                (10090, 'Card Reader', '8471', 18)  
-
 
49
                #,
48
                (10030, 'USB Cables', '85444220', 28),
50
                #(10030, 'USB Cables', '85444220', 28),
49
                (10024, 'Ear Buds', '85183000', 18),
51
                #(10024, 'Ear Buds', '85183000', 18),
50
                (12101, 'Fitness Band', '90318000', 18)
52
                #(12101, 'Fitness Band', '90318000', 18)
51
            ]
53
            ]
52
    
54
    
53
    
55
    
54
    
56
    
55
    for (categoryId, description, hsnCode, rate)  in gstTuple:
57
    for (categoryId, description, hsnCode, rate)  in gstTuple:
Line 98... Line 100...
98
 
100
 
99
#uc = UserClient().get_client()
101
#uc = UserClient().get_client()
100
#print uc.getCounterByUserId(120398953)
102
#print uc.getCounterByUserId(120398953)
101
 
103
 
102
def main():
104
def main():
103
    pass
105
    #pass
-
 
106
    print "initialising"
104
    DataService.initialize('catalog', 'localhost', False)
107
    DataService.initialize('catalog', '173.255.254.24', False)
-
 
108
    print "initiailised"
105
    addHsnCodes()
109
    addHsnCodes()
-
 
110
    
-
 
111
    #DataService.initialize('catalog', 'localhost', False)
106
    #getCategories()
112
    #session.query(Tag_Listing).all()
107
 
113
 
108
#tc = TransactionClient().get_client()
114
#tc = TransactionClient().get_client()
109
#tc.changeTransactionStatus(699979, TransactionStatus.COD_IN_PROCESS, "COD in Process", 0, 0, 1)
115
#tc.changeTransactionStatus(699979, TransactionStatus.COD_IN_PROCESS, "COD in Process", 0, 0, 1)
110
#tc.verifyOrderForTransaction(699983)
116
#tc.verifyOrderForTransaction(699983)
111
#tc.acceptOrder(748108)
117
#tc.acceptOrder(748108)
Line 238... Line 244...
238
 
244
 
239
 
245
 
240
                                        
246
                                        
241
                                        
247
                                        
242
if __name__ == "__main__":
248
if __name__ == "__main__":
-
 
249
    print "in main"
243
    main()
250
    main()
244
    
251
    
245
 
252
 
246
 
253
 
247
 
254