Allow accumulating min. stock amounts on parent product level (closes #384)

This commit is contained in:
Bernd Bestel
2019-09-26 10:36:49 +02:00
parent 75f8ecfad2
commit 828ab8eba0
4 changed files with 150 additions and 1 deletions

View File

@@ -94,9 +94,20 @@
'label' => 'Minimum stock amount',
'min' => 0,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0')
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'additionalGroupCssClasses' => 'mb-1'
))
<div class="form-group">
<div class="form-check">
<input type="hidden" name="cumulate_min_stock_amount_of_subproducts" value="0">
<input @if($mode == 'edit' && $product->cumulate_min_stock_amount_of_subproducts == 1) checked @endif class="form-check-input" type="checkbox" id="cumulate_min_stock_amount_of_subproducts" name="cumulate_min_stock_amount_of_subproducts" value="1">
<label class="form-check-label" for="cumulate_min_stock_amount_of_subproducts">{{ $__t('Accumulate sub products min. stock amount') }}
<span class="text-muted small">{{ $__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') }}</span>
</label>
</div>
</div>
@php if($mode == 'edit') { $value = $product->default_best_before_days; } else { $value = 0; } @endphp
@include('components.numberpicker', array(
'id' => 'default_best_before_days',