This is an automated email from the ASF dual-hosted git repository.
arunpati pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new cf421fdeb5 Fixed: Passed setIfEmpty True on updating Invoice header
and Invoice item so that user can empty the non PK fields if need.
(OFBIZ-OFBIZ-13359) (#1535)
cf421fdeb5 is described below
commit cf421fdeb53b4e887d83ac1ae7b2833aca8f1c86
Author: Arun Patidar <[email protected]>
AuthorDate: Fri Jul 31 17:42:00 2026 +0530
Fixed: Passed setIfEmpty True on updating Invoice header and Invoice item
so that user can empty the non PK fields if need. (OFBIZ-OFBIZ-13359) (#1535)
Fixed: Passed setIfEmpty True on updating Invoice header and Invoice
item so that user can empty the non PK fields if need.
(OFBIZ-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 30aa21468f..4698768ed7 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) {