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.
Keeping electronic copies of sales receipts
- burt
- Core Team
- Posts: 4551
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Keeping electronic copies of sales receipts
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:
Change To:
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.
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';
?>
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';
?>
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.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
14Steve14
- Senior Contributor
- Posts: 923
- Joined: Fri Oct 25, 2019 7:01 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 17 times
- Been thanked: 103 times
Re: Keeping electronic copies of sales receipts
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.