Show stock QU hint also for the energy field on the product edit page (closes #1682)

This commit is contained in:
Bernd Bestel 2021-11-13 16:45:55 +01:00
parent 2a2335c8f4
commit a6ffe8480a
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
4 changed files with 17 additions and 7 deletions

View File

@ -3,7 +3,7 @@
- Fixed that the "X products are already expired" count on the stock overview page was wrong
- Fixed that after product actions (consume/purchase/etc.) on the stock overview page the highlighting of the row was maybe wrong
- After product actions (consume/purchase/etc.) on the stock overview page on a sub product, now also the parent product (row) is refreshed
- It's now possible to accumulate min. stock amounts on parent product level (new option per product, means the sub product will never be "missing" then, only the parent product)
- It's now possible to accumulate min. stock amounts on parent product level (new option per product, means the sub product will never be missing then, only the parent product)
- On the purchase page there is now an option to select that the price is the total price (for the whole amount) - below the price field, defaults to "Unit price" (as it was until now), when set to "Total price", the entered price will be divided by the amount before posting
- "Average shelf life" on the product card now displays just "Unlimited" when the resulting value would be > 200 years (for products which never expire, as they have a best before date of 2999-12-31)

View File

@ -1411,7 +1411,7 @@ msgstr ""
msgid "Accumulate sub products min. stock amount"
msgstr ""
msgid "If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be \"missing\", only this product"
msgid "If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be missing, only this product"
msgstr ""
msgid "Are you sure to remove this conversion?"

View File

@ -187,6 +187,7 @@ $('.input-group-qu').on('change', function(e)
$("#tare_weight_qu_info").text($("#qu_id_stock option:selected").text());
$("#quick_consume_qu_info").text($("#qu_id_stock option:selected").text());
$("#energy_qu_info").text($("#qu_id_stock option:selected").text());
Grocy.FrontendHelpers.ValidateForm('product-form');
});

View File

@ -170,7 +170,7 @@
&nbsp;<i class="fas fa-question-circle text-muted"
data-toggle="tooltip"
data-trigger="hover click"
title="{{ $__t('If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be "missing", only this product') }}"></i>
title="{{ $__t('If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be missing, only this product') }}"></i>
</label>
</div>
</div>
@ -428,6 +428,7 @@
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $value,
'hint' => $__t('Per stock quantity unit'),
'contextInfoId' => 'energy_qu_info',
'isRequired' => false,
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
))
@ -485,12 +486,20 @@
id="default_print_stock_label"
name="default_print_stock_label">
<option value="0"
{{ $no_label }}>{{ $__t('No label') }}</option>
{{
$no_label
}}>{{ $__t('No label') }}</option>
<option value="1"
{{ $single_label }}>{{ $__t('Single label') }}</option>
{{
$single_label
}}>{{ $__t('Single label') }}</option>
<option value="2"
{{ $per_unit_label }}
{{ $disable_per_unit }}
{{
$per_unit_label
}}
{{
$disable_per_unit
}}
id="label-option-per-unit">{{ $__t('Label per unit') }}</option>
</select>
</div>