OFBiz
  1. OFBiz
  2. OFBIZ-4848

Create return invoice from invoice

    Details

    • Type: New Feature New Feature
    • Status: Patch Available
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: SVN trunk
    • Fix Version/s: None
    • Component/s: accounting
    • Labels:
      None

      Description

      If a credit note is needed on a existing invoice, I add a but on invoice menu to generate it by copyInvoice service.

      I improve getInvoice service to ordered invoiceItem by their sequence and when duplicate invoice items check if the parentInvoiceId is the same that duplicate invoice to propagate on new invoice.

      1. OFBIZ-4848.patch
        9 kB
        Nicolas Malin

        Activity

        Hide
        Nicolas Malin added a comment -

        To test, search a sales or purchase invoice with a status differant than in process. When you are on summary page, click on button "Copy To Invoice Return"

        Show
        Nicolas Malin added a comment - To test, search a sales or purchase invoice with a status differant than in process. When you are on summary page, click on button "Copy To Invoice Return"
        Hide
        Robert Gan added a comment -

        Hey Nicolas, thank you for your patch. I still have not read your patch, so I want to ask before installing

        When you click on "copy to Invoice" return. Does it makes a complete copy? Or can I adjust Product positions / amounts etc. before creating the Credit note?

        greetings,

        Robert

        Show
        Robert Gan added a comment - Hey Nicolas, thank you for your patch. I still have not read your patch, so I want to ask before installing When you click on "copy to Invoice" return. Does it makes a complete copy? Or can I adjust Product positions / amounts etc. before creating the Credit note? greetings, Robert
        Hide
        Pierre Smits added a comment -

        I have looked at the patch, and it seems that the title in the menu item is not included in the applicable UILabels..xml file.

        It is about 'AccountingCopyInvoiceToReturnInvoice'.

        Show
        Pierre Smits added a comment - I have looked at the patch, and it seems that the title in the menu item is not included in the applicable UILabels..xml file. It is about 'AccountingCopyInvoiceToReturnInvoice'.
        Hide
        Pierre Smits added a comment -

        I have taken the time to assess this issue and its patch, and I have come to the conclusion that I would not want this patch (as it is) in any of my implemented solutions, nor would I advice other implementers to implement it.

        For the record I have tested this in a new 13.07 checkout against demo sales invoice 8009.

        While the title of the issue and the description could answer the question 'why?' it seems to me that the use case has not been thought thru that well in relation to functions currently available. Nor does it seem that other requirements (that may be out there) have been taken into consideration. At least it is not mentioned.

        The patch does what it is intended, namely take the details on an invoice and create a credit note of it. But it takes all, like payment date and applied details, but also the original details regarding VAT and other taxations. Details like these should not copied, but recalculated in stead. Payment of the credit note is likely to happen after the credit note is created, and VAT and other taxations may have been changed between data of invoice and date of credit note.

        Thinking of it, the patch may well work in a situation where a purchase or sale not to/from stock but to expense, service and subscription) has taken place and the organisation doens'nt want its employees (users) to go through the motions of creating a return order and such.
        But I would advice the community to not implement this patch in any development branch.

        Regards,

        Show
        Pierre Smits added a comment - I have taken the time to assess this issue and its patch, and I have come to the conclusion that I would not want this patch (as it is) in any of my implemented solutions, nor would I advice other implementers to implement it. For the record I have tested this in a new 13.07 checkout against demo sales invoice 8009. While the title of the issue and the description could answer the question 'why?' it seems to me that the use case has not been thought thru that well in relation to functions currently available. Nor does it seem that other requirements (that may be out there) have been taken into consideration. At least it is not mentioned. The patch does what it is intended, namely take the details on an invoice and create a credit note of it. But it takes all, like payment date and applied details, but also the original details regarding VAT and other taxations. Details like these should not copied, but recalculated in stead. Payment of the credit note is likely to happen after the credit note is created, and VAT and other taxations may have been changed between data of invoice and date of credit note. Thinking of it, the patch may well work in a situation where a purchase or sale not to/from stock but to expense, service and subscription) has taken place and the organisation doens'nt want its employees (users) to go through the motions of creating a return order and such. But I would advice the community to not implement this patch in any development branch. Regards,
        Hide
        Nicolas Malin added a comment -

        Hi Robert,

        This patch it's really easier, just call copyInvoice service and change the invoice type to create a quick refund so check this service to ensure what it does.

        Pierre thanks for your review, this patch haven't a large business cover. It's just quick help to create credit Note realized for a small customer and I shared it.
        We works on a better implementation for an other projet with association between the invoice refunded and the credit note but this
        issue haven't the purpose to replace a stock return process, it's only works for agreement between financial employees (internal and supplier/cutomers)

        Nicolas

        Show
        Nicolas Malin added a comment - Hi Robert, This patch it's really easier, just call copyInvoice service and change the invoice type to create a quick refund so check this service to ensure what it does. Pierre thanks for your review, this patch haven't a large business cover. It's just quick help to create credit Note realized for a small customer and I shared it. We works on a better implementation for an other projet with association between the invoice refunded and the credit note but this issue haven't the purpose to replace a stock return process, it's only works for agreement between financial employees (internal and supplier/cutomers) Nicolas

          People

          • Assignee:
            Unassigned
            Reporter:
            Nicolas Malin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development