Quellcode durchsuchen

[Administration] Documents : erreur JS pricesArray

feature/souke
Guillaume Bourgeois vor 10 Monaten
Ursprung
Commit
2edf638122
1 geänderte Dateien mit 11 neuen und 9 gelöschten Zeilen
  1. +11
    -9
      backend/web/js/vuejs/document-form.js

+ 11
- 9
backend/web/js/vuejs/document-form.js Datei anzeigen

@@ -249,17 +249,19 @@ var app = new Vue({
var pricesArray = product.prices;
var unitCoefficient = product.unit_coefficient;

if (theQuantity) {
theQuantity = theQuantity / unitCoefficient;
}
if(pricesArray && unitCoefficient) {
if (theQuantity) {
theQuantity = theQuantity / unitCoefficient;
}

for (var i = 0; i < pricesArray.length; i++) {
if(pricesArray[i]) {
var price = pricesArray[i].price;
var fromQuantity = pricesArray[i].from_quantity;
for (var i = 0; i < pricesArray.length; i++) {
if(pricesArray[i]) {
var price = pricesArray[i].price;
var fromQuantity = pricesArray[i].from_quantity;

if (price < thePrice && fromQuantity <= theQuantity) {
thePrice = price;
if (price < thePrice && fromQuantity <= theQuantity) {
thePrice = price;
}
}
}
}

Laden…
Abbrechen
Speichern