This is an automated email from the ASF dual-hosted git repository.
arunpati pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 2b4b619201 Fixed: PAssed setIfEmpty True on updating Invoice header
and Invoice … (#1536)
2b4b619201 is described below
commit 2b4b619201db015d7a90e8d1c15a1b12d626b7c6
Author: Arun Patidar <[email protected]>
AuthorDate: Fri Jul 31 18:06:27 2026 +0530
Fixed: PAssed setIfEmpty True on updating Invoice header and Invoice …
(#1536)
Fixed: Passed setIfEmpty True on updating Invoice header and Invoice
item so that user can empty the non PK fields if need.
(OFBIZ-13359)
Thanks: Gaudin Pierre for reporting issue and providing patch. Thanks
Jacques for reviewing patch and providing suggestions.
---
.../org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy
b/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy
index 297bcab465..f575cddb4b 100644
---
a/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy
+++
b/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy
@@ -180,7 +180,7 @@ Map updateInvoice() {
// only save if something has changed, do not update status here
// update all non status and key fields
GenericValue lookedInvoice = invoice.clone()
- invoice.setNonPKFields([*: parameters, statustId: 'INVOICE_IN_PROCESS'],
false)
+ invoice.setNonPKFields([*: parameters, statustId: 'INVOICE_IN_PROCESS'],
true)
if (lookedInvoice != invoice) {
invoice.store()
}
@@ -376,7 +376,7 @@ Map updateInvoiceItem() {
return error(label('AccountingUiLabels',
'AccountingInvoiceItemNotFound', parameters))
}
GenericValue lookedInvoiceItem = invoiceItem.clone()
- invoiceItem.setNonPKFields(parameters, false)
+ invoiceItem.setNonPKFields(parameters, true)
// check if the productNumber is updated, when yes retrieve product
description and price
if (lookedInvoiceItem.productId != invoiceItem.productId) {