• Hi,

    Today I have discovered a strange behaviour using the following flow:

    – create invoice
    – remove invoice
    – change data displayed on invoice e.g. company invoice
    – generate invoice again

    Newly generated invoice will contain data from previously generated and removed invoice.
    The same happens for proforma invoices (and probably other types of documents available in the plugin).

    To be honest – I am not sure if it is bug or a feature, but in my opinion if you remove invoice, then postmeta related to the invoice/proforma settings should be also removed. Currently it is not removed and is used while generating new documents.

    It can be very hard to spot usage of old data, especially if you change e.g. only some numbers in company VAT ID or company address.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @dziudek,

    We store the shop and invoice settings within the order data indeed, as soon an invoice is generated, to keep the historical details safe, so they are not overridden when you update it in the future, e.g. if you move your business to a new address, or update your logo, old invoices should not be updated.

    That said, if you remove the PDF invoice document altogether, those details should be removed as well, so when creating a new document, the latest setting should be used. Those details are stored within the _wcpdf_invoice_settings meta key, but it should be removed when deleting the document, as mentioned previously.

    Could you please tell me how are you deleting the documents, so can try to understand better what is happening? Do not hesitate to use screenshots if necessary. See: Uploading Images to?www.ads-software.com

    Thread Starter Tomasz Dziuda

    (@dziudek)

    Hi @yordansoares

    I am removing the document using trash icon under “PDF document data” metabox.

    I can confirm that post meta related to invoice/proforma exists for orders where I have removed documents.

    Also few additional observations:

    • proforma settings exists for old orders where proforma has been never created – I suppose that it could be created when I have enabled proforma feature or is stored by default
    • regenerating documents works very randomly – sometimes it works directly, and sometimes I must to refresh order few times and click regenerate document 2-3 times to get updated data on the document. I have event checked if it is not related to our Cloudflare usage but no – Cf-cache-status is set for PDFs to DYNAMIC ??

    It would be great to solve these issues, because we had massive issues:

    1) We need to generate ~50 proforma invoices for very old orders and we get old data in every proforma (and there was no proforma invoice number and date) – I had to refresh every document few times

    2) When we want to refresh improperly generated invoices, we still get old data on the invoice due old postmeta

    Thank you for your help

    Thread Starter Tomasz Dziuda

    (@dziudek)

    Hi,

    Any news in this topic? ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.