Subversion Repositories SmartDukaan

Rev

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

Rev 8307 Rev 8312
Line 3669... Line 3669...
3669
                    inventory = inventory - lineitem.quantity
3669
                    inventory = inventory - lineitem.quantity
3670
                except:
3670
                except:
3671
                    logging.info("Unable to accept the order")
3671
                    logging.info("Unable to accept the order")
3672
        else:
3672
        else:
3673
            order_outofstock(order.id)
3673
            order_outofstock(order.id)
3674
    return
3674
    return True
3675
 
3675
 
3676
def move_orders_to_correct_warehouse():
3676
def move_orders_to_correct_warehouse():
3677
    orders = Order.query.filter(Order.status.in_(tuple([OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.INVENTORY_LOW, OrderStatus.LOW_INV_PO_RAISED, OrderStatus.LOW_INV_REVERSAL_IN_PROCESS]))).order_by(Order.promised_shipping_time).all()
3677
    orders = Order.query.filter(Order.status.in_(tuple([OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.INVENTORY_LOW, OrderStatus.LOW_INV_PO_RAISED, OrderStatus.LOW_INV_REVERSAL_IN_PROCESS]))).order_by(Order.promised_shipping_time).all()
3678
    logistics_client = LogisticsClient().get_client()
3678
    logistics_client = LogisticsClient().get_client()
3679
    for order in orders:
3679
    for order in orders: