Page 1 of 1

Keeping electronic copies of sales receipts

Posted: Sun Oct 13, 2024 11:14 am
by 14Steve14
Does anyone know of an easy way to create and store electronic copies of every sales receipt that the website creates?

We currently keep paper copies of all of our sales receipts as we are VAT registered and need to keep a copy for 6 years. We are trying to decide whether it would be better to keep electronic copies. It would certainly save paper and save space, and not to mention the fire risk of stored paper. We have upwards of 500 orders a month so its a huge pile of paper.

We can currently access the sale receipt from the website database but was thinking along the line of a separate system that saves to a secure hard drive somewhere else, but on our own computers.

We do use @burt batch actions system so this may be an option.

Would love to hear other peoples thoughts.

Re: Keeping electronic copies of sales receipts

Posted: Sun Oct 13, 2024 12:30 pm
by burt
Save as PDF ?

Tick whichever orders in the OID column.
Click "invoices".
Ctrl + P on the next page

One of the options in the printing window should be "Save as PDF".

If that is suitable, try this extended change in /admin/ext/batcher/batch_invoice.php;

Find:

Code: Select all

  <div class="breakhere"></div>

  <?php
}

  require 'includes/template_bottom.php';
  require 'includes/application_bottom.php';
?>
Change To:

Code: Select all

  <div class="breakhere"></div>

  <?php
}
?>

<script>
var original_title = document.title; 
window.addEventListener("beforeprint", (event) => { 
  document.title = '<?= $_GET['invoices'] ?>'; 
}); 
window.addEventListener("afterprint", (event) => { 
  document.title = original_title; 
});
</script>
  
<?php
  require 'includes/template_bottom.php';
  require 'includes/application_bottom.php';
?>
This change will save the PDF as the Invoice Numbers. EG if you print off invoices 45,46,47
the saved PDF should be called "45,46,47.pdf" which might be slightly easier to search for a given Order ID in the future if you have to search your saved PDFs.

Re: Keeping electronic copies of sales receipts

Posted: Sun Oct 13, 2024 3:16 pm
by 14Steve14
Thanks Gary. That code worked. I will speak to my accountant some time next week to see if that is an acceptable way of saving the invoice copies. She may complain as some days we have 50 or 60 invoices, but I suppose all we have to do is save them in smaller batches. Beer money sent.