Warenwirtschaft: AP-46 — INCI-Liste nach Einsatzkonzentration sortiert

Die INCI-Liste (Hersteller-Rezeptur) in der Produktionsmaske wird jetzt nach
Anteil % absteigend sortiert dargestellt (null-Anteile zuletzt). Reine
Anzeige-Sortierung einer Kopie — die Chargen-Zuordnung unten bleibt in
Phasen-/pos-Reihenfolge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-08-28 08:38:59 +00:00
parent 4c6a57b0f1
commit e6007efc41

View file

@ -165,7 +165,13 @@
var qty = parseInt($('#quantity').val(), 10) || 1;
var totalPercent = 0;
var totalGrams = 0;
recipeIngredients.forEach(function (ing) {
// AP-46: INCI-Liste nach Einsatzkonzentration (Anteil %) absteigend,
// null-Anteile zuletzt. Nur die Anzeige — die Chargen-Zuordnung unten
// bleibt in Phasen-/pos-Reihenfolge.
var inciSorted = recipeIngredients.slice().sort(function (a, b) {
return (b.gram || 0) - (a.gram || 0);
});
inciSorted.forEach(function (ing) {
var grams = ing.gram != null ? ing.gram * recipeGramScale * (ing.factor || 1) * qty : null;
if (ing.gram != null) {
totalPercent += ing.gram;