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

Add option to cache copy of invoice when generated

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 5.1.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

      To handle these instances, there should be a company setting to save a cached copy of the invoice to disk (Disabled by default). Once saved, all future requests to generate invoices will instead return the cached copy (if the company setting is enabled) if it exists. If a cached copy does not exist, it should be generated and cached to disk. Any future changes to the invoice would not affect the cached copy.

      In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

      We may need to also prevent an invoice from being updated once it's cached. Perhaps this would be a second setting? "Do not allow invoices to be modified after they are created.", but we would probably need a way to allow certain people to override this.

      As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

      This task should not apply to draft and proforma invoice types.

      UPDATE 12/11/20

      It has been suggested that we store the data only, rather than archiving a physical copy of the PDF which would be larger. We could store the invoices to disk in JSON format only – all of the data, and still generate the invoice PDF's on the fly, but rather than populating the invoice with data from the database, we populate from the invoice's JSON file if it exists. However, some indicate that it's not acceptable for the invoice template/design to change, others expect it to change. So there could be an option to store JSON only, or JSON + PDF.

        Issue Links

          Activity

          cody Cody Phillips (Inactive) created issue -
          admin Paul Phillips made changes -
          Field Original Value New Value
          Fix Version/s 3.3.0 [ 10100 ]
          Fix Version/s 3.2.0 [ 10002 ]
          admin Paul Phillips made changes -
          Security Private [ 10000 ]
          cody Cody Phillips (Inactive) made changes -
          Link This issue relates to CORE-497 [ CORE-497 ]
          cody Cody Phillips (Inactive) made changes -
          Description Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk. Once saved, all future requests to generate the invoice will instead return the cached copy (if the company setting is enabled). Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.
          Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk. Once saved, all future requests to generate the invoice will instead return the cached copy (if the company setting is enabled). Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*
          admin Paul Phillips made changes -
          Fix Version/s 3.4.0 [ 10400 ]
          Fix Version/s 3.3.0 [ 10100 ]
          admin Paul Phillips made changes -
          Fix Version/s 3.5.0 [ 10401 ]
          Fix Version/s 3.4.0-b1 [ 10400 ]
          admin Paul Phillips made changes -
          Fix Version/s 3.5.0-b2 [ 10701 ]
          Fix Version/s 3.5.0-b1 [ 10401 ]
          admin Paul Phillips made changes -
          Fix Version/s 4.0.0 [ 10603 ]
          Fix Version/s 3.5.0-b2 [ 10701 ]
          cody Cody Phillips (Inactive) made changes -
          Fix Version/s 4.0.0 [ 10603 ]
          admin Paul Phillips made changes -
          Fix Version/s Short Term [ 10800 ]
          admin Paul Phillips made changes -
          Assignee Cody Phillips [ cody ]
          admin Paul Phillips made changes -
          Reporter Cody Phillips [ cody ] Paul Phillips [ admin ]
          admin Paul Phillips made changes -
          Description Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk. Once saved, all future requests to generate the invoice will instead return the cached copy (if the company setting is enabled). Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*
          Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk (Disabled by default). Once saved, all future requests to generate invoices will instead return the cached copy (if the company setting is enabled) if it exists. If a cached copy does not exist, it should be generated and cached to disk. Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*
          admin Paul Phillips made changes -
          Rank Ranked higher
          admin Paul Phillips made changes -
          Rank Ranked lower
          admin Paul Phillips made changes -
          Description Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk (Disabled by default). Once saved, all future requests to generate invoices will instead return the cached copy (if the company setting is enabled) if it exists. If a cached copy does not exist, it should be generated and cached to disk. Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*
          Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk (Disabled by default). Once saved, all future requests to generate invoices will instead return the cached copy (if the company setting is enabled) if it exists. If a cached copy does not exist, it should be generated and cached to disk. Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          We may need to also prevent an invoice from being updated once it's cached. Perhaps this would be a second setting? "Do not allow invoices to be modified after they are created.", but we would probably need a way to allow certain people to override this.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*
          jonathan Jonathan Reissmueller made changes -
          Rank Ranked higher
          admin Paul Phillips made changes -
          Description Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk (Disabled by default). Once saved, all future requests to generate invoices will instead return the cached copy (if the company setting is enabled) if it exists. If a cached copy does not exist, it should be generated and cached to disk. Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          We may need to also prevent an invoice from being updated once it's cached. Perhaps this would be a second setting? "Do not allow invoices to be modified after they are created.", but we would probably need a way to allow certain people to override this.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*
          Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk (Disabled by default). Once saved, all future requests to generate invoices will instead return the cached copy (if the company setting is enabled) if it exists. If a cached copy does not exist, it should be generated and cached to disk. Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          We may need to also prevent an invoice from being updated once it's cached. Perhaps this would be a second setting? "Do not allow invoices to be modified after they are created.", but we would probably need a way to allow certain people to override this.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*

          {color:#59afe1}*UPDATE 12/11/20*

          It has been suggested that we store the data only, rather than archiving a physical copy of the PDF which would be larger. We could store the invoices to disk in JSON format only -- all of the data, and still generate the invoice PDF's on the fly, but rather than populating the invoice with data from the database, we populate from the invoice's JSON file if it exists.{color}
          admin Paul Phillips made changes -
          Description Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk (Disabled by default). Once saved, all future requests to generate invoices will instead return the cached copy (if the company setting is enabled) if it exists. If a cached copy does not exist, it should be generated and cached to disk. Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          We may need to also prevent an invoice from being updated once it's cached. Perhaps this would be a second setting? "Do not allow invoices to be modified after they are created.", but we would probably need a way to allow certain people to override this.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*

          {color:#59afe1}*UPDATE 12/11/20*

          It has been suggested that we store the data only, rather than archiving a physical copy of the PDF which would be larger. We could store the invoices to disk in JSON format only -- all of the data, and still generate the invoice PDF's on the fly, but rather than populating the invoice with data from the database, we populate from the invoice's JSON file if it exists.{color}
          Currently invoice copies (PDFs, for example) are generated on the fly. This allows any changes made to the invoice to be reflected when the invoice is next viewed. However, some localities require that the invoice not change at all after being generated.

          To handle these instances, there should be a company setting to save a cached copy of the invoice to disk (Disabled by default). Once saved, all future requests to generate invoices will instead return the cached copy (if the company setting is enabled) if it exists. If a cached copy does not exist, it should be generated and cached to disk. Any future changes to the invoice would not affect the cached copy.

          In the rare event that a cached copy must be updated, there should be a "Recache" checkbox on the edit invoice page that allows the cached copy to be overwritten when saved. This option should only appear if the save cached copies company setting is enabled.

          We may need to also prevent an invoice from being updated once it's cached. Perhaps this would be a second setting? "Do not allow invoices to be modified after they are created.", but we would probably need a way to allow certain people to override this.

          As a sanity check, perhaps we should raise an error if an invoice is attempted to be edited without checking the "recache" option.

          *This task should not apply to draft and proforma invoice types.*

          {color:#59afe1}*UPDATE 12/11/20*

          It has been suggested that we store the data only, rather than archiving a physical copy of the PDF which would be larger. We could store the invoices to disk in JSON format only -- all of the data, and still generate the invoice PDF's on the fly, but rather than populating the invoice with data from the database, we populate from the invoice's JSON file if it exists. However, some indicate that it's not acceptable for the invoice template/design to change, others expect it to change. So there could be an option to store JSON only, or JSON + PDF.{color}
          jonathan Jonathan Reissmueller made changes -
          Fix Version/s 5.1.0-b1 [ 11703 ]
          Fix Version/s Short Term [ 10800 ]
          jonathan Jonathan Reissmueller made changes -
          Rank Ranked higher
          jonathan Jonathan Reissmueller made changes -
          Story Points 8
          jonathan Jonathan Reissmueller made changes -
          Rank Ranked higher
          jonathan Jonathan Reissmueller made changes -
          Sprint 5.1.0 Sprint 1 [ 125 ]
          jonathan Jonathan Reissmueller made changes -
          Rank Ranked higher
          abdy Abdy Franco made changes -
          Assignee Abdy Franco [ abdy ]
          abdy Abdy Franco made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          abdy Abdy Franco made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 1 hour, 15 minutes [ 4500 ]
          Worklog Id 14675 [ 14675 ]
          abdy Abdy Franco made changes -
          Time Spent 1 hour, 15 minutes [ 4500 ] 1 day, 1 hour, 8 minutes [ 32880 ]
          Worklog Id 14676 [ 14676 ]
          abdy Abdy Franco made changes -
          Time Spent 1 day, 1 hour, 8 minutes [ 32880 ] 2 days, 1 hour, 5 minutes [ 61500 ]
          Worklog Id 14677 [ 14677 ]
          abdy Abdy Franco made changes -
          Time Spent 2 days, 1 hour, 5 minutes [ 61500 ] 3 days, 1 hour, 5 minutes [ 90300 ]
          Worklog Id 14678 [ 14678 ]
          abdy Abdy Franco made changes -
          Time Spent 3 days, 1 hour, 5 minutes [ 90300 ] 3 days, 7 hours, 26 minutes [ 113160 ]
          Worklog Id 14680 [ 14680 ]
          abdy Abdy Franco made changes -
          Status In Progress [ 3 ] In Review [ 5 ]
          Resolution Fixed [ 1 ]
          abdy Abdy Franco made changes -
          Time Spent 3 days, 7 hours, 26 minutes [ 113160 ] 3 days, 7 hours, 50 minutes [ 114600 ]
          Worklog Id 14690 [ 14690 ]
          jonathan Jonathan Reissmueller made changes -
          Sprint 5.0.1 Sprint 1 [ 125 ] 5.1.0 Sprint 1 [ 129 ]
          jonathan Jonathan Reissmueller made changes -
          Rank Ranked lower
          jonathan Jonathan Reissmueller made changes -
          Rank Ranked higher
          abdy Abdy Franco made changes -
          Time Spent 3 days, 7 hours, 50 minutes [ 114600 ] 4 days, 2 minutes [ 115320 ]
          Worklog Id 14719 [ 14719 ]
          abdy Abdy Franco made changes -
          Time Spent 4 days, 2 minutes [ 115320 ] 4 days, 36 minutes [ 117360 ]
          Worklog Id 14722 [ 14722 ]
          abdy Abdy Franco made changes -
          Time Spent 4 days, 36 minutes [ 117360 ] 4 days, 41 minutes [ 117660 ]
          Worklog Id 14732 [ 14732 ]
          jonathan Jonathan Reissmueller made changes -
          Status In Review [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              abdy Abdy Franco
              Reporter:
              admin Paul Phillips
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Jun/21

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 41 minutes
                4d 41m

                  Agile