Little adjustments and changelog for #788

This commit is contained in:
Bernd Bestel 2020-04-24 17:51:48 +02:00
parent f076b0d0c6
commit 9e824e1845
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
4 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,5 @@
### Stock improvements/fixes
- When creating a quantity unit conversion it's now possible to automatically create the inverse conversion (thanks @kriddles)
- Optimized/clarified what the total/unit price is on the purchase page (thanks @kriddles)
- On the purchase page the amount field is now displayed above/before the best before date for better `TAB` handling (thanks @kriddles)
- Changed that when `FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING` is disabled, products now get internally a best before of "never expires" (aka `2999-12-31`) instead of today (thanks @kriddles)

View File

@ -1798,3 +1798,6 @@ msgstr ""
msgid "means %1$s per %2$s"
msgstr ""
msgid "Create inverse QU conversion"
msgstr ""

View File

@ -152,7 +152,7 @@ $('.input-group-qu').on('change', function(e)
if (Grocy.EditMode === 'create')
{
$('#qu-conversion-inverse-info').text(__t('This means the inverse of 1 %1$s is the same as %2$s %3$s will also be created', $("#to_qu_id option:selected").text(), (1 / factor).toString(), __n((1 / factor).toString(), $("#from_qu_id option:selected").text(), $("#from_qu_id option:selected").data("plural-form"))));
$('#qu-conversion-inverse-info').text('(' + __t('This means 1 %1$s is the same as %2$s %3$s', $("#to_qu_id option:selected").text(), (1 / factor).toString(), __n((1 / factor).toString(), $("#from_qu_id option:selected").text(), $("#from_qu_id option:selected").data("plural-form"))) + ')');
$('#qu-conversion-inverse-info').removeClass('d-none');
}
}

View File

@ -72,9 +72,9 @@
<div class="checkbox @if($mode == 'edit') d-none @endif">
<label for="create_inverse">
<input type="checkbox" id="create_inverse" name="create_inverse:skip" checked> {{ $__t('Create Inverse QU Conversion') }}
<input type="checkbox" id="create_inverse" name="create_inverse:skip" checked> {{ $__t('Create inverse QU conversion') }}
<span id="qu-conversion-inverse-info" class="form-text text-info d-none"></span>
</label>
<p id="qu-conversion-inverse-info" class="form-text text-info d-none"></p>
</div>
@include('components.userfieldsform', array(