@posx/core 5.5.336 → 5.5.337

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -4075,6 +4075,10 @@ var InvoiceOperationService = class extends LineOperationService {
4075
4075
  for (const line of lines) {
4076
4076
  line.meta.total_index = totalIndex;
4077
4077
  line.meta.index = index;
4078
+ if (line.modifiers?.length && line.item.modifiers?.length) {
4079
+ const seqMap = new Map(line.item.modifiers.map((m) => [m.uid, m.sequence ?? 0]));
4080
+ line.modifiers.sort((a, b) => (seqMap.get(a.item_uid) ?? 0) - (seqMap.get(b.item_uid) ?? 0));
4081
+ }
4078
4082
  index++;
4079
4083
  }
4080
4084
  for (const printer of printers) for (const line of lines) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posx/core",
3
- "version": "5.5.336",
3
+ "version": "5.5.337",
4
4
  "description": "POSX core libraries",
5
5
  "main": "./build/index.js",
6
6
  "author": "Steven Lee",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posx/core",
3
- "version": "5.5.336",
3
+ "version": "5.5.337",
4
4
  "description": "POSX core libraries",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",