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:
parent
4c6a57b0f1
commit
e6007efc41
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue