<commit_before>{% extends 'admin/base.twig' %}

{% block content %}
	{% include 'cudi/admin/stock/partials/navigation.twig' %}

	{% include 'admin/partials/flashMessenger.twig' %}
	<div class="flashmessage success_message full_width order_removed_success hide">
		<div class="title">Success</div>
		<div class="content">
			<p>The order was successfully removed!</p>
		</div>
	</div>
	<div class="flashmessage error_message full_width order_removed_error hide">
		<div class="title">Error</div>
		<div class="content">
			<p>An error occurred while trying to delete an order.</p>
		</div>
	</div>

	{% include 'cudi/admin/stock/order/partials/suppliers.twig' %}

	<div id="controller_action">
		<h1>Order</h1>
		<p>Supplier: <b>{{ order.getSupplier().getName() }}</b></p>
		<p>Date: <b>{% if order.getDateOrdered() %}{{ order.getDateOrdered().format('Y-m-d H:i:s')}}{% else %}(new){% endif %}</b></p>
		<br />

		<table class="manage">

			<tr>
				<th>Article</th>
				<th width="80px">Amount</th>
				<th width="70px">Actions</th>
			</tr>

			{% for item in order.getItems() %}
				<tr class="item item-{{ item.getId() }}">
					<td>{{ item.getArticle().getMainArticle().getTitle() }}</td>
					<td>{{ item.getNumber() }}</td>
					<td class="actions">
						{% if not order.isPlaced() and hasAccess('admin_stock_order', 'delete') %}
		        			<a href="#" class="delete" data-id="{{ item.getId() }}" data-title="{{ item.getArticle().getMainArticle().getTitle() }}" data-number="{{ item.getNumber() }}">Delete</a>
						{% endif %}
					</td>
				</tr>
			{% endfor %}
		</table>
	</div>

	<aside>
		{% if not order.isOrdered() %}
		    {% if hasAccess('admin_stock_order', 'place') %}
    			<div class="sidebox">
    		        <div class="title">Place Order</div>
    		        <div class="content">
    		            <p>
    		                <i>Please hit the link below to place this order!</i>
    		            </p>
    		            <p>
    		                <a href="{{ url('admin_stock_order', {"action": "place", "id": order.getId()}) }}">&rarr; Place Order</a>
    		            </p>
    		        </div>
    		    </div>
    		{% endif %}
    		{% if hasAccess('admin_stock_order', 'add') %}<commit_msg>Again small bugfix<commit_after>{% extends 'admin/base.twig' %}

{% block content %}
	{% include 'cudi/admin/stock/partials/navigation.twig' %}

	{% include 'admin/partials/flashMessenger.twig' %}
	<div class="flashmessage success_message full_width order_removed_success hide">
		<div class="title">Success</div>
		<div class="content">
			<p>The order was successfully removed!</p>
		</div>
	</div>
	<div class="flashmessage error_message full_width order_removed_error hide">
		<div class="title">Error</div>
		<div class="content">
			<p>An error occurred while trying to delete an order.</p>
		</div>
	</div>

	{% include 'cudi/admin/stock/order/partials/suppliers.twig' %}

	<div id="controller_action">
		<h1>Order</h1>
		<p>Supplier: <b>{{ order.getSupplier().getName() }}</b></p>
		<p>Date: <b>{% if order.getDateOrdered() %}{{ order.getDateOrdered().format('Y-m-d H:i:s')}}{% else %}(new){% endif %}</b></p>
		<br />

		<table class="manage">

			<tr>
				<th>Article</th>
				<th width="80px">Amount</th>
				<th width="70px">Actions</th>
			</tr>

			{% for item in order.getItems() %}
				<tr class="item item-{{ item.getId() }}">
					<td>{{ item.getArticle().getMainArticle().getTitle() }}</td>
					<td>{{ item.getNumber() }}</td>
					<td class="actions">
						{% if not order.isOrdered() and hasAccess('admin_stock_order', 'delete') %}
		        			<a href="#" class="delete" data-id="{{ item.getId() }}" data-title="{{ item.getArticle().getMainArticle().getTitle() }}" data-number="{{ item.getNumber() }}">Delete</a>
						{% endif %}
					</td>
				</tr>
			{% endfor %}
		</table>
	</div>

	<aside>
		{% if not order.isOrdered() %}
		    {% if hasAccess('admin_stock_order', 'place') %}
    			<div class="sidebox">
    		        <div class="title">Place Order</div>
    		        <div class="content">
    		            <p>
    		                <i>Please hit the link below to place this order!</i>
    		            </p>
    		            <p>
    		                <a href="{{ url('admin_stock_order', {"action": "place", "id": order.getId()}) }}">&rarr; Place Order</a>
    		            </p>
    		        </div>
    		    </div>
    		{% endif %}
    		{% if hasAccess('admin_stock_order', 'add') %}
{'fraction_non_alphanumeric': 0.20863309352517986, 'fraction_numerical': 0.002697841726618705, 'mean_word_length': 2.825451418744626, 'pattern_counts': {'":': 4, '<': 131, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4265307', 'n_tokens_mistral': 1795, 'n_tokens_neox': 1539, 'n_words': 316}