Subversion Repositories SmartDukaan

Rev

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

Rev 3414 Rev 3415
Line 955... Line 955...
955
            raise TransactionServiceException(114, "This order can't be refunded")
955
            raise TransactionServiceException(114, "This order can't be refunded")
956
    
956
    
957
        if order.status < OrderStatus.BILLED:
957
        if order.status < OrderStatus.BILLED:
958
            __update_inventory_reservation(order)
958
            __update_inventory_reservation(order)
959
            order.statusDescription = "Order Cancelled"
959
            order.statusDescription = "Order Cancelled"
960
        elif order.status < OrderStatus.BILLED:
960
        elif order.status == OrderStatus.BILLED:
961
            __create_return_order(order)
961
            __create_return_order(order)
962
            order.statusDescription = "Order Cancelled"
962
            order.statusDescription = "Order Cancelled"
963
        elif order.status in [OrderStatus.SALES_RET_RECEIVED, OrderStatus.DOA_CERT_INVALID, OrderStatus.DOA_CERT_VALID] :
963
        elif order.status in [OrderStatus.SALES_RET_RECEIVED, OrderStatus.DOA_CERT_INVALID, OrderStatus.DOA_CERT_VALID] :
964
            __create_return_order(order)
964
            __create_return_order(order)
965
            __create_refund(order)
965
            __create_refund(order)