Fixed purchase success message when FEATURE_FLAG_STOCK_PRICE_TRACKING is disabled (fixes #1214)

This commit is contained in:
Bernd Bestel
2020-12-23 14:37:02 +01:00
parent 97b95803b8
commit 904848d09a
2 changed files with 2 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
- Improved the prerequisites checker (added missing required PHP extension `ctype`) (thanks @Forceu) - Improved the prerequisites checker (added missing required PHP extension `ctype`) (thanks @Forceu)
- Fixed that browser camera barcode scanning did not work on the product edit page - Fixed that browser camera barcode scanning did not work on the product edit page
- Fixed that the new product option "Never show on stock overview" was unintentionally set by default for new products - Fixed that the new product option "Never show on stock overview" was unintentionally set by default for new products
- Fixed that the success message on purchase displayed not amount when `FEATURE_FLAG_STOCK_PRICE_TRACKING` was disabled
- Fixed a problem (database migration fail) when using SQLite >= 3.8.3 < 3.9.0 - Fixed a problem (database migration fail) when using SQLite >= 3.8.3 < 3.9.0
- _Just as a side note: PHP 7.2 with SQLite 3.8.3 was the currently in README mentioned minimum runtime requirement, any future release will only be tested against PHP 7.4 with SQLite 3.27.2 - supporting those ancient runtime stuff is too time consuming..._ - _Just as a side note: PHP 7.2 with SQLite 3.8.3 was the currently in README mentioned minimum runtime requirement, any future release will only be tested against PHP 7.4 with SQLite 3.27.2 - supporting those ancient runtime stuff is too time consuming..._

View File

@@ -99,7 +99,7 @@ $('#save-purchase-button').on('click', function(e)
); );
} }
var amountMessage = amount; var amountMessage = jsonForm.display_amount;
if (BoolVal(productDetails.product.enable_tare_weight_handling)) if (BoolVal(productDetails.product.enable_tare_weight_handling))
{ {
amountMessage = parseFloat(jsonForm.amount) - parseFloat(productDetails.stock_amount) - parseFloat(productDetails.product.tare_weight); amountMessage = parseFloat(jsonForm.amount) - parseFloat(productDetails.stock_amount) - parseFloat(productDetails.product.tare_weight);