Support -1 for "Default due days after freezing" (closes #846)

This commit is contained in:
Bernd Bestel
2020-12-19 17:32:47 +01:00
parent 362b3f8508
commit 250b308d5d
3 changed files with 12 additions and 4 deletions

View File

@@ -376,14 +376,14 @@
'label' => 'Default due days after freezing',
'min' => -1,
'value' => $value,
'hint' => $__t('On moving this product to a freezer location (so when freezing it), the due date will be replaced by today + this amount of days')
'hint' => $__t('On moving this product to a freezer location (so when freezing it), the due date will be replaced by today + this amount of days') . ' (' . $__t('-1 means that this product will be never overdue') . ')'
))
@php if($mode == 'edit') { $value = $product->default_best_before_days_after_thawing; } else { $value = 0; } @endphp
@include('components.numberpicker', array(
'id' => 'default_best_before_days_after_thawing',
'label' => 'Default due days after thawing',
'min' => -1,
'min' => 0,
'value' => $value,
'hint' => $__t('On moving this product from a freezer location (so when thawing it), the due date will be replaced by today + this amount of days')
))