From: Bill Erickson Date: Wed, 2 Feb 2022 21:55:44 +0000 (-0500) Subject: LP1952931 Receiving... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0eae537cd17ccb4181eb259520123cba85f55d60;p=working%2FEvergreen.git LP1952931 Receiving... Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html b/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html index 993a605879..a7dc22bedb 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.html @@ -112,7 +112,7 @@ across different vendors to match a container code.
-
+
Receiving Items (Dry Run)
@@ -120,10 +120,25 @@ across different vendors to match a container code.
  • -
  • - {{li.lids.length}} item(s) received for line item - #{{li.id}}. + +
  • +
    Lineitem
    +
    Notified
    +
    Received
    +
  • + +
  • + +
    {{liWantedCount(li.id)}}
    +
    + {{li.lids.length}}
  • @@ -140,11 +155,11 @@ across different vendors to match a container code. - - + + diff --git a/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts index 916c714e29..2562066c48 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/asn/receive.component.ts @@ -150,9 +150,8 @@ export class AsnReceiveComponent implements OnInit { .reduce((pv, cv) => pv + (cv || 0)); } - receiveAllItems(dryRun?: boolean) { + receiveAllItems() { this.receiving = true; - this.dryRun = dryRun; this.receiveResponse = { progress: 0, @@ -165,7 +164,7 @@ export class AsnReceiveComponent implements OnInit { this.progress.update({value: 0, max: this.affectedItemsCount()})); let method = 'open-ils.acq.shipment_notification.receive_items'; - if (dryRun) { method += '.dry_run'; } + if (this.dryRun) { method += '.dry_run'; } this.net.request('open-ils.acq', method, this.auth.token(), this.container.id()) @@ -186,5 +185,11 @@ export class AsnReceiveComponent implements OnInit { this.receiving = false; this.findContainer(); } + + liWantedCount(liId: number): number { + const entry = this.entries.filter(e => e.lineitem().id())[0]; + if (entry) { return entry.item_count(); } + return 0; + } }