This is an automated email from the ASF dual-hosted git repository.
nmalin 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 6a078d5cf8 Fixed: service 'copyInvoice' Failed on invoice not in
process (OFBIZ-13323)
6a078d5cf8 is described below
commit 6a078d5cf820069333c4d10cacf0595b7161e6f3
Author: Nicolas Malin <[email protected]>
AuthorDate: Tue Dec 2 10:26:29 2025 +0100
Fixed: service 'copyInvoice' Failed on invoice not in process (OFBIZ-13323)
When you call the service 'copyInvoice' on invoice in status
'INVOICE_APPROVED', invoice items copy failed for the reason that the invoice
created haven't a good status
To fix it, just put the status 'INVOICE_IN_PROCESS' on the invoice created.
---
.../org/apache/ofbiz/accounting/invoice/InvoiceServicesScript.groovy | 1 +
1 file changed, 1 insertion(+)
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 620d0fc5f6..13925d6dd0 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
@@ -203,6 +203,7 @@ Map copyInvoice() {
List<GenericValue> invoiceItems = serviceResult.invoiceItems
invoice.invoiceTypeId = parameters.invoiceTypeId ?: invoice.invoiceTypeId
serviceResult = run service: 'createInvoice', with: [*:
invoice.getAllFields(),
+ statusId:
'INVOICE_IN_PROCESS',
invoiceId: null]
String newInvoiceId = serviceResult.invoiceId
invoiceItems.each {