155 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			155 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {% extends "base.html" %}
 | |
| 
 | |
| {% block content %}
 | |
| <h2>Inventareintrag {{ item.item_id }}</h2>
 | |
| 
 | |
| <fieldset>
 | |
|   <legend>Inventareintrag {{ item.item_id }}</legend>
 | |
|   <table>
 | |
|     <tr>
 | |
|       <th class="--align-left">ID</th>
 | |
|       <td>{{ item.item_id }}</td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Barcode</th>
 | |
|       <td><code>{{ item.item_barcode }}</code></td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Name</th>
 | |
|       <td>{{ item.name }}</td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Einkaufspreis (Netto)</th>
 | |
|       <td>{{ format_currency(item.unit_price) }}</td>
 | |
|     </tr>
 | |
|     <tr> <th class="--align-left">Kaufdatum</th>
 | |
|       <td>{{ format_date(item.bought) }}</td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Gruppe</th>
 | |
|       <td>{{ item.group_name }} ({{ item.item_group }})</td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Inventar</th>
 | |
|       <td>{{ item.units_left }}</td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Korrekturen</th>
 | |
|       <td>{{ item.correction_delta }}</td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Eingekauft</th>
 | |
|       <td>{{ item.sales_units }}</td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Raum</th>
 | |
|       <td>{{ item.location_name }} ({{ item.location }})</td>
 | |
|     </tr>
 | |
|     <tr>
 | |
|       <th class="--align-left">Aktiv?</th>
 | |
|       <td>{{ format_bool(item.available) }}</td>
 | |
|     </tr>
 | |
|   </table>
 | |
| </fieldset>
 | |
| 
 | |
| <fieldset>
 | |
|   <legend>Aktionen</legend>
 | |
|   
 | |
|   <form method="POST" action="/inventory/correction">
 | |
|     <input name="item_id" type="hidden" value="{{ item.item_id }}">
 | |
|     <input name="correction_comment" type="hidden" value="Verlust">
 | |
|     <input name="correction_delta" type="hidden" value="{{ -item.units_left }}">
 | |
|     <button{% if item.units_left == 0 %} disabled{% endif %}>Inventar zu 0 korrigieren</button>
 | |
|   </form>
 | |
|   
 | |
|   <form method="POST" action="/inventory/correction">
 | |
|     <input name="item_id" type="hidden" value="{{ item.item_id }}">
 | |
|     <input name="correction_comment" type="text" value="" placeholder="Kommentar">
 | |
|     <input name="correction_delta" type="number" value="" placeholder="Delta">
 | |
|     <button>Inventar korrigieren</button>
 | |
|   </form>
 | |
| 
 | |
|   <form method="POST" action="/inventory/item/{{ item.item_id }}/deactivate">
 | |
|     <button{% if item.units_left != 0 %} disabled{% endif %}>Inventar- und Snackeintrag deaktivieren</button>
 | |
|   </form>
 | |
| </fieldset>
 | |
| 
 | |
| <fieldset>
 | |
|   <legend>Snackeinträge für {{ item.item_id }}</legend>
 | |
| 
 | |
|   <table>
 | |
|     <tr>
 | |
|       <th>ID</th>
 | |
|       <th>Barcode</th>
 | |
|       <th>Name</th>
 | |
|       <th>Verkaufspreis (Brutto)</th>
 | |
|       <th>Eintragedatum</th>
 | |
|       <th>Steuersatz</th>
 | |
|       <th>Raum</th>
 | |
|       <th>Aktiv?</th>
 | |
|     </tr>
 | |
|     {% for snack in snacks %}
 | |
|     <tr>
 | |
|       <td>{{ snack.snack_id }}</td>
 | |
|       <td><code>{{ snack.snack_barcode }}</code></td>
 | |
|       <td>{{ snack.snack_name }}</td>
 | |
|       <td class="--align-right">{{ format_currency(snack.snack_price) }}</td>
 | |
|       <td>{{ format_date(snack.snack_timestamp) }}</td>
 | |
|       <td>{{ snack.description }} ({{ snack.tax_group_id }})</td>
 | |
|       <td>{{ snack.location_name }} ({{ snack.location_id }})</td>
 | |
|       <td>{{ format_bool(snack.snack_available) }}</td>
 | |
|     </tr>
 | |
|     {% endfor %}
 | |
|   </table>
 | |
| </fieldset>
 | |
| 
 | |
| <fieldset>
 | |
|   <legend>Inventareinträge mit Barcode <code>{{ item.item_barcode }}</code> in {{ item.location_name }}</legend>
 | |
| 
 | |
|   <table>
 | |
|     <tr>
 | |
|       <th>ID</th>
 | |
|       <th>Barcode</th>
 | |
|       <th>Name</th>
 | |
|       <th>Einkaufspreis (Netto)</th>
 | |
|       <th>Kaufdatum</th>
 | |
|       <th>Gruppe</th>
 | |
|       <th>Eingekauft</th>
 | |
|       <th>Korrekturen</th>
 | |
|       <th>Inventar</th>
 | |
|       <th title="Aktive Snackeinträge">AS</th>
 | |
|       <th>Aktiv?</th>
 | |
|     </tr>
 | |
|     {% for other_item in same_barcode_items %}
 | |
|     <tr>
 | |
|       <td><a href="/inventory/item/{{ other_item.item_id }}">{{ other_item.item_id }}</a></td>
 | |
|       <td><code>{{ other_item.item_barcode }}</code></td>
 | |
|       <td>{{ other_item.name }}</td>
 | |
|       <td class="--align-right">{{ format_currency(item.unit_price) }}</td>
 | |
|       <td>{{ format_date(item.bought) }}</td>
 | |
|       <td>{{ other_item.group_name }} ({{ other_item.item_group }})</td>
 | |
|       <td class="--align-right">{{ other_item.sales_units }}</td>
 | |
|       <td class="--align-right">{% if other_item.correction_delta > 0 %}+{% endif %}{{ other_item.correction_delta }}</td>
 | |
|       <td class="--align-right">{{ other_item.units_left }}</td>
 | |
|       <td class="--centered">
 | |
|         {% if other_item.active_mappings != 0 %}
 | |
|           {{ other_item.active_mappings_array | join(", ") }}
 | |
|         {% else %}
 | |
|           -
 | |
|         {% endif %}
 | |
|       </td>
 | |
|       <td class="--centered">{{ format_bool(other_item.available) }}</td>
 | |
|       <td>
 | |
| 	<form method="POST" action="/inventory/transfer">
 | |
|           <input type="hidden" name="from_item_id" value="{{ item.item_id }}">
 | |
|           <input type="hidden" name="to_item_id" value="{{ other_item.item_id }}">
 | |
| 	  <input type="hidden" name="amount" value="{{ item.units_left }}">
 | |
| 	  <button{% if not other_item.available or other_item.item_id == item.item_id %} disabled{% endif %}>{{ item.units_left }} Artikel umbuchen</button>
 | |
| 	</form>
 | |
|       </td>
 | |
|     </tr>
 | |
|     {% endfor %}
 | |
|   </table>
 | |
| </fieldset>
 | |
| {% endblock %}
 | 
