From: Galen Charlton Date: Wed, 9 Feb 2022 21:17:05 +0000 (-0500) Subject: LP#1929749: use correct method to update LI prices X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f2c2752489cedaad74628764c9b4dbf417e92c32;p=working%2FEvergreen.git LP#1929749: use correct method to update LI prices Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.ts index 7b5e170536..d6bab06925 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.ts @@ -679,16 +679,17 @@ export class LineitemListComponent implements OnInit { } liPriceChange(li: IdlObject) { - const price = li.estimated_unit_price(); if (this.liPriceIsValid(li)) { - li.estimated_unit_price(Number(price).toFixed(2)); - + const price = Number(li.estimated_unit_price()).toFixed(2); this.net.request( 'open-ils.acq', - 'open-ils.acq.lineitem.update', - this.auth.token(), li - ).subscribe(resp => - this.liService.activateStateChange.emit(li.id())); + 'open-ils.acq.lineitem.price.set', + this.auth.token(), li.id(), price + ).subscribe(resp => { + // update local copy + li.estimated_unit_price(price); + this.liService.activateStateChange.emit(li.id()); + }); } }