mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Fixed location_id handling when FEATURE_FLAG_STOCK_LOCATION_TRACKING is disabled (fixes #532)
This commit is contained in:
parent
170c7627fd
commit
b8c6ac6905
5
changelog/56_UNRELEASED_2020-xx-xx.md
Normal file
5
changelog/56_UNRELEASED_2020-xx-xx.md
Normal file
@ -0,0 +1,5 @@
|
||||
### Stock fixes
|
||||
- Fixed purchase/consume/inventory problems when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was set to `false`
|
||||
|
||||
### Shopping list fixes
|
||||
- Optimized the new compact view (there was a little too much white space at the sides of the page)
|
@ -20,10 +20,6 @@
|
||||
{
|
||||
jsonData.location_id = $("#location_id").val();
|
||||
}
|
||||
else
|
||||
{
|
||||
jsonData.location_id = 1;
|
||||
}
|
||||
|
||||
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_RECIPES && Grocy.Components.RecipePicker.GetValue().toString().length > 0)
|
||||
{
|
||||
|
@ -21,10 +21,7 @@
|
||||
{
|
||||
jsonData.location_id = Grocy.Components.LocationPicker.GetValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
jsonData.location_id = 1;
|
||||
}
|
||||
|
||||
jsonData.price = price;
|
||||
|
||||
var bookingResponse = null;
|
||||
|
@ -34,10 +34,6 @@
|
||||
{
|
||||
jsonData.location_id = Grocy.Components.LocationPicker.GetValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
jsonData.location_id = 1;
|
||||
}
|
||||
|
||||
Grocy.Api.Post('stock/products/' + jsonForm.product_id + '/add', jsonData,
|
||||
function(result)
|
||||
|
@ -57,8 +57,6 @@
|
||||
</select>
|
||||
<div class="invalid-feedback">{{ $__t('A location is required') }}</div>
|
||||
</div>
|
||||
@else
|
||||
<input type="hidden" name="location_id" id="location_id" value="1">
|
||||
@endif
|
||||
|
||||
<div class="form-group">
|
||||
|
@ -75,8 +75,6 @@
|
||||
'locations' => $locations,
|
||||
'hint' => $__t('This will apply to added products')
|
||||
))
|
||||
@else
|
||||
<input type="hidden" name="location_id" id="location_id" value="1">
|
||||
@endif
|
||||
|
||||
<button id="save-inventory-button" class="btn btn-success">{{ $__t('OK') }}</button>
|
||||
|
@ -91,11 +91,9 @@
|
||||
'locations' => $locations,
|
||||
'isRequired' => false
|
||||
))
|
||||
@else
|
||||
<input type="hidden" name="location_id" id="location_id" value="1">
|
||||
@endif
|
||||
|
||||
<button id="save-purchase-button" class="btn btn-success">{{ $__t('OK') }}</button>
|
||||
<button id="save-purchase-button" class="btn btn-success d-block">{{ $__t('OK') }}</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user