diff --git a/packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.ts b/packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.ts index b8e77c1b9c..774a9c18fc 100644 --- a/packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/order-editor/order-editor.component.ts @@ -260,10 +260,13 @@ export class OrderEditorComponent const adjustedLine = this.modifyOrderInput.adjustOrderLines?.find(l => l.orderLineId === lineId); if (adjustedLine) { return adjustedLine.quantity; - } else { - const line = this.orderSnapshot.lines.find(l => l.id === lineId); - return line ? line.quantity : 0; } + const addedLine = this.modifyOrderInput.addItems?.find(l => this.getIdForAddedItem(l) === lineId); + if (addedLine) { + return addedLine.quantity ?? 1; + } + const line = this.orderSnapshot.lines.find(l => l.id === lineId); + return line ? line.quantity : 1; } updateLineQuantity(line: OrderDetailFragment['lines'][number] | AddedLine, quantity: string) {