Subversion Repositories SmartDukaan

Rev

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

Rev 16111 Rev 16112
Line 113... Line 113...
113
        for val in orderObj['0']['items'].values():
113
        for val in orderObj['0']['items'].values():
114
            newCount = 0
114
            newCount = 0
115
            counts = []
115
            counts = []
116
            for key in jsonSubOrdersMap.keys():
116
            for key in jsonSubOrdersMap.keys():
117
                splitKey = key.split('-')
117
                splitKey = key.split('-')
-
 
118
                if orderObj['0']['is_parent_order'] == 'N':
-
 
119
                    if str(val['order_id']) == splitKey[0]:
-
 
120
                        counts.append(int(splitKey[1]))
-
 
121
                else:
118
                if str(val['child']) == splitKey[0]:
122
                    if str(val['child']) == splitKey[0]:
119
                    counts.append(int(splitKey[1]))
123
                        counts.append(int(splitKey[1]))
120
                    
124
                    
121
            if len(counts) >0:
125
            if len(counts) >0:
122
                newCount = max(counts)
126
                newCount = max(counts)
123
            count = newCount +1
127
            count = newCount +1
-
 
128
            if orderObj['0']['is_parent_order'] == 'N':
-
 
129
                jsonSubOrdersMap[str(val['order_id'])+'-'+str(count)] = val
-
 
130
            else:
124
            jsonSubOrdersMap[str(val['child'])+'-'+str(count)] = val
131
                jsonSubOrdersMap[str(val['child'])+'-'+str(count)] = val
125
            
132
            
126
            
133
            
127
        print jsonSubOrdersMap.items()
134
        print jsonSubOrdersMap.items()
128
            
135
            
129
        count = 1
136
        count = 1