Subversion Repositories SmartDukaan

Rev

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

Rev 12231 Rev 12232
Line 196... Line 196...
196
        insuranceDetail.order = order
196
        insuranceDetail.order = order
197
    if t_order.freebieItemId:
197
    if t_order.freebieItemId:
198
        order.freebieItemId = t_order.freebieItemId
198
        order.freebieItemId = t_order.freebieItemId
199
    if OrderSource.MOBILESITE == t_order.source or OrderSource.WEBSITE == t_order.source:
199
    if OrderSource.MOBILESITE == t_order.source or OrderSource.WEBSITE == t_order.source:
200
        order.source =  OrderSource.WEBSITE
200
        order.source =  OrderSource.WEBSITE
201
        attribute = Attribute()
-
 
202
        attribute.orderId = t_order.id
-
 
203
        attribute.name = "OrderSource"
-
 
204
        if OrderSource.MOBILESITE == t_order.source:
-
 
205
            attribute.value = "Mobile"
-
 
206
        else:
-
 
207
            attribute.value = "Desktop"
-
 
208
        session.merge(attribute)
-
 
209
    else:
201
    else:
210
        order.source = t_order.source
202
        order.source = t_order.source
211
    #Change this temporary
203
    #Change this temporary
212
    if t_order.orderType is None or t_order.orderType ==OrderType.B2C:
204
    if t_order.orderType is None or t_order.orderType ==OrderType.B2C:
213
        order.orderType = 0
205
        order.orderType = 0
Line 278... Line 270...
278
            else:
270
            else:
279
                litem.added_on = datetime.datetime.now()
271
                litem.added_on = datetime.datetime.now()
280
            """
272
            """
281
            litem.order = order
273
            litem.order = order
282
    session.commit()
274
    session.commit()
-
 
275
    for order in transaction.orders:
-
 
276
        if OrderSource.MOBILESITE == order.source or OrderSource.WEBSITE == order.source:
-
 
277
            order.source =  OrderSource.WEBSITE
-
 
278
            attribute = Attribute()
-
 
279
            attribute.orderId = order.id
-
 
280
            attribute.name = "OrderSource"
-
 
281
            if OrderSource.MOBILESITE == order.source:
-
 
282
                attribute.value = "Mobile"
283
    
283
            else:
-
 
284
                attribute.value = "Desktop"
-
 
285
            session.commit()
284
    # EMI charges can not be charged by merchant as per RBI guidelines. 
286
    # EMI charges can not be charged by merchant as per RBI guidelines. 
285
    #Now we do not have any other charges, So commenting it out.
287
    #Now we do not have any other charges, So commenting it out.
286
    #generateOtherCharges(transaction, t_transaction.emiSchemeId, totalAmount)
288
    #generateOtherCharges(transaction, t_transaction.emiSchemeId, totalAmount)
287
    
289
    
288
    return transaction.id
290
    return transaction.id