From f2c2752489cedaad74628764c9b4dbf417e92c32 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 9 Feb 2022 16:17:05 -0500 Subject: [PATCH] LP#1929749: use correct method to update LI prices Signed-off-by: Galen Charlton --- .../src/app/staff/acq/lineitem/lineitem-list.component.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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()); + }); } } -- 2.11.0