Subversion Repositories SmartDukaan

Rev

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

Rev 16109 Rev 16110
Line 107... Line 107...
107
        jsonSubOrdersMap = {}
107
        jsonSubOrdersMap = {}
108
        count = 1
108
        count = 1
109
        
109
        
110
        for val in orderObj['0']['items'].values():
110
        for val in orderObj['0']['items'].values():
111
            newCount = 0
111
            newCount = 0
-
 
112
            counts = []
112
            for key in jsonSubOrdersMap.keys():
113
            for key in jsonSubOrdersMap.keys():
113
                splitKey = key.split('-')
114
                splitKey = key.split('-')
114
                if str(val['child']) == splitKey[0]:
115
                if str(val['child']) == splitKey[0]:
115
                    newCount = int(splitKey[1])
116
                    counts.append(int(splitKey[1]))
116
                    break
117
                    
-
 
118
            if len(counts) >0:
-
 
119
                newCount = max(counts)
117
            count = newCount +1
120
            count = newCount +1
118
            jsonSubOrdersMap[str(val['child'])+'-'+str(count)] = val
121
            jsonSubOrdersMap[str(val['child'])+'-'+str(count)] = val
119
            if newCount>0:
-
 
120
                count = 1
122
            
121
            
123
            
122
        print jsonSubOrdersMap.items()
124
        print jsonSubOrdersMap.items()
123
            
125
            
124
        count = 1
126
        count = 1
125
        for orderTr in orderTable:
127
        for orderTr in orderTable: