Fix: Product, Product Category, Product Permutation, Supplier, Supplier Purchase Order, and Manufacturing Purchase Order architecture update for getting and saving data.
This commit is contained in:
@@ -27,11 +27,7 @@
|
||||
<script src="{{ url_for('static', filename='js/store/home.js') }}"></script>
|
||||
|
||||
<script>
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_HOME }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
console.log('Hooking up home page...');
|
||||
hookupStorePageHome();
|
||||
// hookupStore(); // in _shared_store.html
|
||||
});
|
||||
{#
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_HOME }}";
|
||||
#}
|
||||
</script>
|
||||
@@ -30,6 +30,13 @@
|
||||
{{ product.form_delivery_option() }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<script>console.log('creating basket item for:');console.log('product id: {{ product.id_product }}');console.log('permutation id: {{ product.get_id_permutation() }}');console.log('quantity: {{ basket_item.quantity }}');</script>
|
||||
<script>
|
||||
if (_verbose) {
|
||||
console.log('creating basket item for:');
|
||||
console.log('product id: {{ product.id_product }}');
|
||||
console.log('permutation id: {{ product.get_id_permutation() }}');
|
||||
console.log('quantity: {{ basket_item.quantity }}');
|
||||
}
|
||||
</script>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
{% if is_blank_row %}
|
||||
<tr class="{{ model.FLAG_ROW_NEW }} {{ model.FLAG_MANUFACTURING_PURCHASE_ORDER }}" {{ model.ATTR_ID_MANUFACTURING_PURCHASE_ORDER }}>
|
||||
<td class="{{ model.FLAG_ORDER_ITEMS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}="">
|
||||
{% include 'components/store/_preview_order_items.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_CURRENCY }}" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}="">
|
||||
{% include 'components/store/_preview_DDL_currency.html' %}
|
||||
</td>
|
||||
@@ -30,15 +33,20 @@
|
||||
{{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}=""
|
||||
></div>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ORDER_ITEMS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}="">
|
||||
{% include 'components/store/_preview_order_items.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" checked {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_TRUE }}">
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr class="{{ model.FLAG_MANUFACTURING_PURCHASE_ORDER }}" {{ model.ATTR_ID_MANUFACTURING_PURCHASE_ORDER }}="{{ order.id_order }}">
|
||||
{% set order_items = order.items %}
|
||||
{% set json_str_items = model.jsonify(model.convert_list_objects_to_list_options(order_items)) %}
|
||||
<td class="{{ model.FLAG_ORDER_ITEMS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }}="{{ json_str_items }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ json_str_items }}">
|
||||
{#
|
||||
{% include 'components/store/_preview_manufacturing_purchase_order_items.html' %}
|
||||
#}
|
||||
{% include 'components/store/_preview_order_items.html' %}
|
||||
</td>
|
||||
{% set currency = order.currency %}
|
||||
<td class="{{ model.FLAG_CURRENCY }}" {{ model.ATTR_VALUE_CURRENT }}="{{ currency.id_currency }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ currency.id_currency }}">
|
||||
{% include 'components/store/_preview_DDL_currency.html' %}
|
||||
@@ -71,14 +79,6 @@
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ order.price_total_local_VAT_incl }}"
|
||||
></div>
|
||||
</td>
|
||||
{% set order_items = order.items %}
|
||||
{% set json_str_items = model.jsonify(model.convert_list_objects_to_list_options(order_items)) %}
|
||||
<td class="{{ model.FLAG_ORDER_ITEMS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }}="{{ json_str_items }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ json_str_items }}">
|
||||
{#
|
||||
{% include 'components/store/_preview_manufacturing_purchase_order_items.html' %}
|
||||
#}
|
||||
{% include 'components/store/_preview_order_items.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" {% if order.active %}checked{% endif %} {{ model.ATTR_VALUE_CURRENT }}="{{ order.active | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ order.active | lower }}">
|
||||
</td>
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
<td class="{{ model.FLAG_HAS_VARIATIONS }}">
|
||||
<input class="{{ model.FLAG_HAS_VARIATIONS }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_FALSE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_FALSE }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACCESS_LEVEL }}" {{ model.ATTR_ID_ACCESS_LEVEL }}="1" {{ model.FLAG_ACCESS_LEVEL_REQUIRED }}="View">
|
||||
<td class="{{ model.FLAG_ACCESS_LEVEL }}"
|
||||
{{ model.ATTR_ID_ACCESS_LEVEL }}="1" {{ model.FLAG_ACCESS_LEVEL_REQUIRED }}="View"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="1" {{ model.ATTR_VALUE_PREVIOUS }}="1"
|
||||
>
|
||||
<div class="{{ model.FLAG_ACCESS_LEVEL}}" {{ model.ATTR_ID_ACCESS_LEVEL }}="1">View</div>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
@@ -46,7 +49,10 @@
|
||||
<input class="{{ model.FLAG_HAS_VARIATIONS }}" type="checkbox" {% if product.has_variations %}checked{% endif %}
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ product.has_variations | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ product.has_variations | lower }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACCESS_LEVEL }}" {{ model.ATTR_ID_ACCESS_LEVEL }}="1" {{ model.FLAG_ACCESS_LEVEL_REQUIRED }}="{{ product.name_access_level_required }}">
|
||||
<td class="{{ model.FLAG_ACCESS_LEVEL }}"
|
||||
{{ model.ATTR_ID_ACCESS_LEVEL }}="{{ product.id_access_level_required }}" {{ model.FLAG_ACCESS_LEVEL_REQUIRED }}="{{ product.name_access_level_required }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ product.id_access_level_required }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ product.id_access_level_required }}"
|
||||
>
|
||||
<div class="{{ model.FLAG_ACCESS_LEVEL}}" {{ model.ATTR_ID_ACCESS_LEVEL }}="{{ product.id_access_level_required }}" {{ model.ATTR_VALUE_CURRENT }}="{{ product.id_access_level_required }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ product.id_access_level_required }}">{{ product.name_access_level_required }}</div>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
|
||||
@@ -52,9 +52,18 @@
|
||||
<td class="{{ model.FLAG_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
{% include 'components/store/_preview_DDL_product_permutation_interval_expiration_unsealed.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_LOCAL }}">
|
||||
<td class="{{ model.FLAG_COST_UNIT_LOCAL_VAT_EXCL }}">
|
||||
<!--
|
||||
<input class="{{ model.FLAG_COST_LOCAL }}" type="number" min="0" step="0.01"
|
||||
value="0" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
-->
|
||||
<div {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
0
|
||||
</div>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_UNIT_LOCAL_VAT_INCL }}">
|
||||
<div {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
0
|
||||
</div>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_CURRENCY_COST }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
{% include 'components/store/_preview_DDL_currency.html' %}
|
||||
@@ -140,8 +149,11 @@
|
||||
<td class="{{ model.FLAG_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}" {{ model.ATTR_VALUE_CURRENT }}="{{ value }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ value }}">
|
||||
{% include 'components/store/_preview_DDL_product_permutation_interval_expiration_unsealed.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_LOCAL }}">
|
||||
<input class="{{ model.FLAG_COST_LOCAL }}" type="number" min="0" value="{{ permutation.cost_local }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.cost_local }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.cost_local }}">
|
||||
<td class="{{ model.FLAG_COST_UNIT_LOCAL_VAT_EXCL }}">
|
||||
<input class="{{ model.FLAG_COST_UNIT_LOCAL_VAT_EXCL }}" type="number" min="0" value="{{ permutation.cost_local_VAT_excl }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.cost_local_VAT_excl }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.cost_local_VAT_excl }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_UNIT_LOCAL_VAT_INCL }}">
|
||||
<input class="{{ model.FLAG_COST_UNIT_LOCAL_VAT_INCL }}" type="number" min="0" value="{{ permutation.cost_local_VAT_incl }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.cost_local_VAT_incl }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.cost_local_VAT_incl }}">
|
||||
</td>
|
||||
|
||||
{% set currency = permutation.currency_cost %}
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
<td class="{{ model.FLAG_SUPPLIER }}" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}="">
|
||||
{% include 'components/store/_preview_DDL_supplier.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ORDER_ITEMS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}="">
|
||||
{% include 'components/store/_preview_order_items.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_CURRENCY }}" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}="">
|
||||
{% include 'components/store/_preview_DDL_currency.html' %}
|
||||
</td>
|
||||
@@ -19,9 +22,6 @@
|
||||
{{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}=""
|
||||
></div>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ORDER_ITEMS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}="">
|
||||
{% include 'components/store/_preview_order_items.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" checked {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_TRUE }}">
|
||||
</td>
|
||||
@@ -32,6 +32,11 @@
|
||||
<td class="{{ model.FLAG_SUPPLIER }}" {{ model.ATTR_VALUE_CURRENT }}="{{ supplier.id_supplier }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ supplier.id_supplier }}">
|
||||
{% include 'components/store/_preview_DDL_supplier.html' %}
|
||||
</td>
|
||||
{% set order_items = order.items %}
|
||||
{% set json_str_items = model.jsonify(model.convert_list_objects_to_list_options(order_items)) %}
|
||||
<td class="{{ model.FLAG_ORDER_ITEMS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }}="{{ json_str_items }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ json_str_items }}">
|
||||
{% include 'components/store/_preview_order_items.html' %}
|
||||
</td>
|
||||
{% set currency = order.currency %}
|
||||
<td class="{{ model.FLAG_CURRENCY }}" {{ model.ATTR_VALUE_CURRENT }}="{{ currency.id_currency }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ currency.id_currency }}">
|
||||
{% include 'components/store/_preview_DDL_currency.html' %}
|
||||
@@ -56,11 +61,6 @@
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ order.cost_total_local_VAT_incl }}"
|
||||
></div>
|
||||
</td>
|
||||
{% set order_items = order.items %}
|
||||
{% set json_str_items = model.jsonify(model.convert_list_objects_to_list_options(order_items)) %}
|
||||
<td class="{{ model.FLAG_ORDER_ITEMS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }}="{{ json_str_items }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ json_str_items }}">
|
||||
{% include 'components/store/_preview_order_items.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" checked {{ model.ATTR_VALUE_CURRENT }}="{{ order.active | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ order.active | lower }}">
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user