Subversion Repositories SmartDukaan

Rev

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

Rev 4332 Rev 4335
Line 553... Line 553...
553
    try:
553
    try:
554
        current_inventory_snapshot = query.one()
554
        current_inventory_snapshot = query.one()
555
        current_inventory_snapshot.reserved = current_inventory_snapshot.reserved - quantity
555
        current_inventory_snapshot.reserved = current_inventory_snapshot.reserved - quantity
556
        ##FIXME In case of our own warehouse reduce availability also
556
        ##FIXME In case of our own warehouse reduce availability also
557
        if warehouse_id == 7:
557
        if warehouse_id == 7:
558
            current_inventory_snapshot.availability = current_inventory_snapshot.availability - quantity
558
            current_inventory_snapshot.availibility = current_inventory_snapshot.availibility - quantity
559
        session.commit()
559
        session.commit()
560
        check_risky_item(item)
560
        check_risky_item(item)
561
        return True
561
        return True
562
    except:
562
    except:
563
        print "Unexpected error:", sys.exc_info()[0]
563
        print "Unexpected error:", sys.exc_info()[0]