I agree we should change the name; maybe:
unapplyPaymentFromInvoice
could be enough because:
1) it is implicit that if there are accounting transactions they
should be reversed (the logic to reverse them could be even moved to
another service attached to the above service with an eca)
2) we may want to unapply a payment from a non cancelled invoice, the
service should allow this (and the invoice should be moved from the
Paid to the Ready status)
Jacopo
On Jul 8, 2009, at 11:06 AM, Sumit Pandit wrote:
> Hello Devs,
>
> Recently service - "cancelInvoice" is being committed in trunk
> (r790926), I have a doubt for service name, from name it appears
> that it will cancel an Invoice, but originally it reverse
> transaction entries and remove applied payment of an already
> Canceled Invoice.
> This service called through an "eca" from service
> "setInvoiceStatus", where it set the invoice status to canceled.
> So I would suggest its name -
> "reverseAcctgTransAndPaymentApplForCanceledInvoice".
>
> If community is agree(no objection or better name) on this name then
> I will submit a patch for new name. I will upload the patch tomorrow
> at same jira issue - (OFBIZ-2695).
>
> Thanks And Regards
> Sumit Pandit
>