Subversion Repositories SmartDukaan

Rev

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

Rev 6666 Rev 6668
Line 2288... Line 2288...
2288
                __update_inventory_reservation(order)
2288
                __update_inventory_reservation(order)
2289
                order.statusDescription = "Order Cancelled on customer request"
2289
                order.statusDescription = "Order Cancelled on customer request"
2290
            elif order.previousStatus == OrderStatus.BILLED:
2290
            elif order.previousStatus == OrderStatus.BILLED:
2291
                __create_return_order(order)
2291
                __create_return_order(order)
2292
                order.statusDescription = "Order Cancelled on customer request"
2292
                order.statusDescription = "Order Cancelled on customer request"
-
 
2293
                order.received_return_timestamp = datetime.datetime.now()
2293
    else:
2294
    else:
2294
        status_transition = {OrderStatus.LOST_IN_TRANSIT : OrderStatus.LOST_IN_TRANSIT_REFUNDED,
2295
        status_transition = {OrderStatus.LOST_IN_TRANSIT : OrderStatus.LOST_IN_TRANSIT_REFUNDED,
2295
                     OrderStatus.RTO_RECEIVED_PRESTINE : OrderStatus.RTO_REFUNDED,
2296
                     OrderStatus.RTO_RECEIVED_PRESTINE : OrderStatus.RTO_REFUNDED,
2296
                     OrderStatus.RTO_RECEIVED_DAMAGED : OrderStatus.RTO_DAMAGED_REFUNDED,
2297
                     OrderStatus.RTO_RECEIVED_DAMAGED : OrderStatus.RTO_DAMAGED_REFUNDED,
2297
                     OrderStatus.RTO_LOST_IN_TRANSIT : OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED,
2298
                     OrderStatus.RTO_LOST_IN_TRANSIT : OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED,
Line 2346... Line 2347...
2346
                order.statusDescription = "Order Cancelled on customer request"
2347
                order.statusDescription = "Order Cancelled on customer request"
2347
            elif order.previousStatus == OrderStatus.BILLED:
2348
            elif order.previousStatus == OrderStatus.BILLED:
2348
                __create_return_order(order)
2349
                __create_return_order(order)
2349
                __create_refund(order)
2350
                __create_refund(order)
2350
                order.statusDescription = "Order Cancelled on customer request"
2351
                order.statusDescription = "Order Cancelled on customer request"
-
 
2352
                order.received_return_timestamp = datetime.datetime.now()
2351
        elif order.status == OrderStatus.PAYMENT_FLAGGED:
2353
        elif order.status == OrderStatus.PAYMENT_FLAGGED:
2352
            __update_inventory_reservation(order)
2354
            __update_inventory_reservation(order)
2353
            order.statusDescription = "Order Cancelled due to payment flagged"
2355
            order.statusDescription = "Order Cancelled due to payment flagged"
2354
 
2356
 
2355
    # For orders that are cancelled after being billed, we need to scan in the scanned out
2357
    # For orders that are cancelled after being billed, we need to scan in the scanned out