diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js index 4cb6e205..81b419ed 100644 --- a/public/viewjs/stockoverview.js +++ b/public/viewjs/stockoverview.js @@ -252,7 +252,7 @@ function RefreshProductRow(productId) $('#product-' + productId + '-qu-name').text(__n(result.stock_amount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural)); $('#product-' + productId + '-amount').text(result.stock_amount); $('#product-' + productId + '-consume-all-button').attr('data-consume-amount', result.stock_amount); - + $('#product-' + productId + '-factor-purchase-amount').text(__t('( %s', result.stock_factor_purchase_amount)); $('#product-' + productId + '-next-best-before-date').text(result.next_best_before_date); $('#product-' + productId + '-next-best-before-date-timeago').attr('datetime', result.next_best_before_date); diff --git a/views/stockoverview.blade.php b/views/stockoverview.blade.php index f479c670..a1e5077e 100644 --- a/views/stockoverview.blade.php +++ b/views/stockoverview.blade.php @@ -209,6 +209,9 @@ {{ $currentStockEntry->amount }} {{ $__n($currentStockEntry->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name_plural) }} @if($currentStockEntry->amount_opened > 0){{ $__t('%s opened', $currentStockEntry->amount_opened) }}@endif + @if($currentStockEntry->amount != $currentStockEntry->factor_purchase_amount) + ({{ $currentStockEntry->factor_purchase_amount }} {{ $__n($currentStockEntry->factor_purchase_amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_purchase)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_purchase)->name_plural) }}) + @endif @if($currentStockEntry->is_aggregated_amount == 1) {{ $currentStockEntry->amount_aggregated }} {{ $__n($currentStockEntry->amount_aggregated, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name_plural) }}