Subversion Repositories SmartDukaan

Rev

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

Rev 9268 Rev 9299
Line 202... Line 202...
202
        order.orderType = 0
202
        order.orderType = 0
203
    order.advanceAmount = t_order.advanceAmount
203
    order.advanceAmount = t_order.advanceAmount
204
    order.storeId = t_order.storeId
204
    order.storeId = t_order.storeId
205
    if t_order.productCondition:
205
    if t_order.productCondition:
206
        order.productCondition = t_order.productCondition
206
        order.productCondition = t_order.productCondition
-
 
207
    if t_order.dataProtectionInsurer:
-
 
208
        order.dataProtectionInsurer = t_order.dataProtectionInsurer
-
 
209
        order.dataProtectionAmount = t_order.dataProtectionAmount 
207
    return order
210
    return order
208
    
211
    
209
def create_transaction(t_transaction):
212
def create_transaction(t_transaction):
210
    t_orders = t_transaction.orders
213
    t_orders = t_transaction.orders
211
    if not t_orders:
214
    if not t_orders:
Line 2936... Line 2939...
2936
        oldDetail = InsuranceDetailForOrder.get_by(order_id = order.id)
2939
        oldDetail = InsuranceDetailForOrder.get_by(order_id = order.id)
2937
        newDetail.dob = oldDetail.dob
2940
        newDetail.dob = oldDetail.dob
2938
        newDetail.guardianName = oldDetail.guardianName
2941
        newDetail.guardianName = oldDetail.guardianName
2939
        newDetail.order = new_order
2942
        newDetail.order = new_order
2940
        
2943
        
-
 
2944
    if order.dataProtectionInsurer > 0:
-
 
2945
        new_order.dataProtectionInsurer = order.dataProtectionInsurer
-
 
2946
        new_order.dataProtectionAmount = order.dataProtectionAmount
-
 
2947
        
2941
    logistics_client = LogisticsClient().get_client()
2948
    logistics_client = LogisticsClient().get_client()
2942
    item_id = new_order.lineitems[0].item_id
2949
    item_id = new_order.lineitems[0].item_id
2943
    logistics_info = logistics_client.getLogisticsInfo(new_order.customer_pincode, item_id, is_cod, PickUpType.COURIER) #TODO: We should be able to pass another flag to suggest ignoring the inventory situation.
2950
    logistics_info = logistics_client.getLogisticsInfo(new_order.customer_pincode, item_id, is_cod, PickUpType.COURIER) #TODO: We should be able to pass another flag to suggest ignoring the inventory situation.
2944
    logistics_info.shippingTime = adjust_delivery_time(current_time, logistics_info.shippingTime)
2951
    logistics_info.shippingTime = adjust_delivery_time(current_time, logistics_info.shippingTime)
2945
    logistics_info.deliveryTime = adjust_delivery_time(current_time, logistics_info.deliveryTime)
2952
    logistics_info.deliveryTime = adjust_delivery_time(current_time, logistics_info.deliveryTime)