You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "dixitdeepak (via GitHub)" <gi...@apache.org> on 2026/07/01 15:24:27 UTC
Re: [PR] Fixed: Incorrect unit price calculation during PO receiving under non-US locales (OFBIZ-13449) [ofbiz-framework]
dixitdeepak commented on code in PR #1396:
URL: https://github.com/apache/ofbiz-framework/pull/1396#discussion_r3507140550
##########
applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentReceiptServices.groovy:
##########
@@ -308,8 +325,9 @@ BigDecimal getReceivedQuantityForOrderItem (GenericValue orderItem) {
Map updateIssuanceShipmentAndPoOnReceiveInventory() {
GenericValue orderItem = from('OrderItem').where(parameters).queryOne()
if (parameters.orderCurrencyUnitPrice) {
- if (parameters.orderCurrencyUnitPrice != orderItem.unitPrice) {
- orderItem.unitPrice = new BigDecimal (parameters.orderCurrencyUnitPrice)
+ BigDecimal orderCurrencyUnitPrice = parseLocalizedAmount((String) parameters.orderCurrencyUnitPrice, (Locale) parameters.locale)
+ if (orderCurrencyUnitPrice != orderItem.unitPrice) {
+ orderItem.unitPrice = orderCurrencyUnitPrice
orderItem.store()
Review Comment:
@toaditi
ObjectType.simpleTypeOrObjectConvert also handles this conversion.
`price = (BigDecimal) ObjectType.simpleTypeOrObjectConvert(parameters.orderCurrencyUnitPrice, "BigDecimal", null, locale);`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org