Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1287

Prevent Pro Forma and Draft invoices from reusing numbers

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.3.0-b1
    • Fix Version/s: Short Term
    • Component/s: None
    • Labels:
      None

      Description

      Pro forma and draft invoices are temporary invoices. Therefore the current scheme of calculating the next invoice number based on the invoice format can result in re-use of numbers no longer in use by those formats.

      This occurs because when a pro forma or draft invoice is converted to a regular invoice its id_format and id_value is modified to meet the invoice format configured in settings. When this happens to the highest id_value invoice of that particular type, this essentially reduces the current highest id_value for an invoice of that type.

      For example:

      Add Draft => DRAFT-

      {num} => DRAFT-1
      Add Draft => DRAFT-{num}

      => DRAFT-2
      Convert DRAFT-2 to invoice => INVOICE-

      {NUM}

      => INVOICE-1000
      Add Draft => DRAFT-

      {num}

      => DRAFT-2

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              cody Cody Phillips (Inactive)
              Reporter:
              cody Cody Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: