133 lines
7.7 KiB
HTML
133 lines
7.7 KiB
HTML
{% extends 'layouts/layout.html' %}
|
|
|
|
{% block page_body %}
|
|
<!--
|
|
<script>console.log("test 1");</script>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/sections/store.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/pages/store/stock_items.css') }}">
|
|
-->
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/store_stock_items.bundle.css') }}">
|
|
|
|
<!-- HTML content -->
|
|
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store_stock_item.filter_stock_item') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
|
{{ model.form_filters.hidden_tag() }}
|
|
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
|
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
|
{{ model.form_filters.id_category.label }}
|
|
{{ model.form_filters.id_category() }}
|
|
{% for error in model.form_filters.id_category.errors %}
|
|
<p class="error">{{ error }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
|
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
|
{{ model.form_filters.id_product.label }}
|
|
{{ model.form_filters.id_product() }}
|
|
{% for error in model.form_filters.id_product.errors %}
|
|
<p class="error">{{ error }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
|
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
|
{{ model.form_filters.is_out_of_stock.label }}
|
|
{{ model.form_filters.is_out_of_stock() }}
|
|
{% for error in model.form_filters.is_out_of_stock.errors %}
|
|
<p class="error">{{ error }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
|
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
|
{{ model.form_filters.quantity_min.label }}
|
|
{{ model.form_filters.quantity_min() }}
|
|
{% for error in model.form_filters.quantity_min.errors %}
|
|
<p class="error">{{ error }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
|
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
|
{{ model.form_filters.quantity_max.label }}
|
|
{{ model.form_filters.quantity_max() }}
|
|
{% for error in model.form_filters.quantity_max.errors %}
|
|
<p class="error">{{ error }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% set block_id = 'buttons_table_default' %}
|
|
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
|
</form>
|
|
<table id="{{ model.ID_TABLE_MAIN }}" class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }}">
|
|
<thead>
|
|
<tr>
|
|
<th class="{{ model.FLAG_PRODUCT_CATEGORY }}">Category</th>
|
|
<th class="{{ model.FLAG_PRODUCT }}">Product</th>
|
|
<th class="{{ model.FLAG_PRODUCT_VARIATIONS }} {{ model.FLAG_COLLAPSED }}">Variations</th>
|
|
<th class="{{ model.FLAG_CURRENCY_COST }}">Currency</th>
|
|
<th class="{{ model.FLAG_COST_UNIT_LOCAL_VAT_EXCL }}">Cost Local (VAT excl.)</th>
|
|
<th class="{{ model.FLAG_COST_UNIT_LOCAL_VAT_INCL }}">Cost Local (VAT incl.)</th>
|
|
<th class="{{ model.FLAG_DATE_PURCHASED}}">Date Purchased</th>
|
|
<th class="{{ model.FLAG_DATE_RECEIVED }}">Date Received</th>
|
|
<th class="{{ model.FLAG_STORAGE_LOCATION }}">Storage Location</th>
|
|
<th class="{{ model.FLAG_IS_SEALED }}">Is Sealed</th>
|
|
<th class="{{ model.FLAG_DATE_UNSEALED }}">Date Unsealed</th>
|
|
<th class="{{ model.FLAG_DATE_EXPIRATION }}">Date Expiration</th>
|
|
<th class="{{ model.FLAG_IS_CONSUMED }}">Is Consumed</th>
|
|
<th class="{{ model.FLAG_DATE_CONSUMED }}">Date Consumed</th>
|
|
<th class="{{ model.FLAG_ACTIVE }}">
|
|
{% set block_id = 'button_add' %}
|
|
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% set date_time_now = model.format_date(datetime.now()) %}
|
|
{% set is_blank_row = False %}
|
|
{% for category in model.category_list.categories %}
|
|
{% for product in category.products %}
|
|
{% for permutation in product.permutations %}
|
|
{% for stock_item in permutation.stock_items %}
|
|
{% include 'components/store/_row_stock_item.html' %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
{% set is_blank_row = True %}
|
|
{% include 'components/store/_row_stock_item.html' %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% include 'components/common/temporary/_overlay_confirm.html' %}
|
|
{% include 'components/common/temporary/_overlay_error.html' %}
|
|
|
|
<!-- Include JavaScript -->
|
|
<script src="{{ url_for('routes_store.scripts_section_store') }}"></script>
|
|
|
|
<script>
|
|
// pass arguments from model to JS
|
|
{#
|
|
var dictListsProducts = {{ model.category_list.get_product_option_lists_by_category() | tojson | safe }};
|
|
var listCategories = {{ model.category_list.to_category_option_list() | tojson | safe }};
|
|
{{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list.categories) | tojson | safe }};
|
|
var listProducts = {{ model.category_list.to_product_option_list() | tojson | safe }};
|
|
#}
|
|
|
|
var currencies = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.currencies) | tojson | safe }};
|
|
var plants = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.plants) | tojson | safe }};
|
|
var products = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.get_list_products()) | tojson | safe }};
|
|
var productCategories = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.categories) | tojson | safe }};
|
|
var productVariations = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.variations) | tojson | safe }};
|
|
var productVariationTypes = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.variation_types) | tojson | safe }};
|
|
var storageLocations = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.storage_locations) | tojson | safe }};
|
|
{#
|
|
var unitMeasurements = {{ units_measurement_dict | tojson | safe }};
|
|
var unitMeasurementsTime = {{ units_measurement_time_dict | tojson | safe }};
|
|
#}
|
|
var unitMeasurements = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.units_measurement) | tojson | safe }};
|
|
var unitMeasurementsTime = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.units_measurement_time) | tojson | safe }};
|
|
var _rowBlankProductVariation = null;
|
|
</script>
|
|
{% endblock %} |