Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-1434 General Ledger
  3. OFBIZ-1487

Create a service to clone an existing accounting transaction and its entries (AcctgTrans and AcctgTransEntry), with an optional parameter to revert the original transaction

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • None
    • accounting
    • None

    Description

      Create a service to clone an existing accounting transaction and its entries (AcctgTrans and AcctgTransEntry), with an optional parameter to revert the original transaction.

      Proposed service name: "copyAcctgTransAndEntries"
      IN parameters: fromAcctgTransId (mandatory), revert (optional)
      OUT parameters: acctgTransId

      The service simply clones the AcctgTrans record into a new identical one (if possible, use the createAcctgTrans service) with the exception of the following fields:
      transactionDate: do not set, so that it will be automatically set to now
      isPosted: set to N
      postedDate: do not set
      scheduledPostedDate: do not set
      createdByUserLogin: do not set
      lastModifiedByUserLogin: do not set

      and also clones all the AcctgTransEntry (if possible, use the createAcctgTransEntry service), with the exception of the following fields:
      reconcileStatusId: do not set

      For each entry, if the parameters.revert field is set to "Y", flip the debitCreditFlag from C to D and vice versa.

      Add two new links to the "Edit Accounting Transaction" screen: "duplicate accounting transaction" and "revert accounting transaction" that both call the above service (the latter calls the service with revert=Y).

      Attachments

        1. JiraIssue@1487.patch
          10 kB
          SACHIN CHOURASIYA
        2. JiraIssue@1487.patch
          7 kB
          pranaypa

        Activity

          People

            toashishvijay Ashish Vijaywargiya
            jacopoc Jacopo Cappellato
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: