Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
* Use ACQ holdings analyzer to check holdings abandonment. Refs UIOR-1466, UIOR-1468.
* Migrate custom fields titles from mod-configuration to mod-settings. Refs UIOR-1501.
* Implement action to clear rollover adjustment in the PO Line form. Refs UIOR-1484.
* Display the actual estimated price on PO line edit screen with rollover adjustment. Refs UIOR-1502.

## [8.0.5](https://github.com/folio-org/ui-orders/tree/v8.0.5) (2025-06-30)
[Full Changelog](https://github.com/folio-org/ui-orders/compare/v8.0.4...v8.0.5)
Expand Down
10 changes: 8 additions & 2 deletions src/components/POLine/calculateEstimatedPrice.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { get } from 'lodash';
import get from 'lodash/get';
import isNumber from 'lodash/isNumber';

import { getMoneyMultiplier } from '@folio/stripes-acq-components';

Expand All @@ -23,7 +24,12 @@ const calculateEstimatedPrice = (formValues) => {
const discountAmount = isAmountDiscountType
? discount * multiplier
: Math.round(baseListPrice * discount * 100) / 10000;
const poLineEstimatedPrice = Math.round(baseListPrice + additionalCost - discountAmount) / multiplier;
const fyroAdjustmentAmount = isNumber(formValues?.cost?.fyroAdjustmentAmount)
? formValues.cost.fyroAdjustmentAmount * multiplier
: 0;
const poLineEstimatedPrice = Math.round(
baseListPrice + additionalCost - discountAmount + fyroAdjustmentAmount,
) / multiplier;

return poLineEstimatedPrice;
};
Expand Down
2 changes: 1 addition & 1 deletion translations/ui-orders/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"cost.discount": "Discount",
"cost.discountType": "Type",
"cost.estimatedPrice": "Estimated price",
"cost.info": "List unit price(s) x quantities ordered + additional cost - discount",
"cost.info": "List unit price(s) x quantities ordered + additional cost - discount + rollover adjustment",
"cost.listPrice": "Unit price",
"cost.listPriceOfPhysical": "Physical unit price",
"cost.quantity": "Quantity",
Expand Down
Loading