You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "mridulpathak (via GitHub)" <gi...@apache.org> on 2026/09/11 18:14:27 UTC
[PR] Fixed: Mini-lang to Groovy regressions in InvoiceServicesScript (OFBIZ-13575) [ofbiz-framework]
mridulpathak opened a new pull request, #1969:
URL: https://github.com/apache/ofbiz-framework/pull/1969
### Description of changes
Fixes several regressions introduced during the migration of `InvoiceServices.xml` to Groovy in OFBIZ-13085:
1. **`getInvoicesFilterByAssocType`**: Invert filter condition (`!invoiceIds.contains(...)`) so only invoices without the specified association are returned, restoring commission run behavior.
2. **`addTaxOnInvoice`**: Align parallel input lists for `calcTax` by only adding amounts and quantities when `productId` is present, preventing misalignment when invoices include non-product line items.
3. **`updateInvoiceItem`**: Guard `calculateProductPrice` to only run when `productId` exists, and enforce mandatory amount check on all item updates.
4. **`autoGenerateInvoiceFromExistingInvoice`**: Use map subscript access `switchType[it.invoiceTypeId]` instead of invocation syntax, and ensure `recurrenceInfoId: null` is cleared on all generated invoices.
5. **`copyInvoice`**: Handle `getInvoice` failure gracefully without throwing NPE, reset `invoiceDate` to `nowTimestamp`, and clear `paidDate` on the newly created invoice.
6. **`createInvoiceFromOrder`**: Return error service result if `orderHeader` is not found instead of throwing NPE on `order.orderId`.
7. **`getInvoiceRunningTotal`**: Use safe navigation when accessing `partyAccountingPreference?.baseCurrencyUomId`.
8. **`getNextInvoiceId` & `invoiceSequenceRestart`**: Explicitly declare local variables (`String errorMsg`, `Timestamp curYearFiscalStartDate`) to prevent leaking into the script binding.
### JIRA
https://issues.apache.org/jira/browse/OFBIZ-13575
--
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
Re: [PR] Fixed: Mini-lang to Groovy regressions in InvoiceServicesScript (OFBIZ-13575) [ofbiz-framework]
Posted by "mridulpathak (via GitHub)" <gi...@apache.org>.
mridulpathak merged PR #1969:
URL: https://github.com/apache/ofbiz-framework/pull/1969
--
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