This is an automated email from the ASF dual-hosted git repository.

nmalin 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 b63360051c Fixed: service 'copyInvoice' Failed on invoice not in 
process (OFBIZ-13323)
b63360051c is described below

commit b63360051cff083396a539559617017ed4239297
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 {

Reply via email to