add balance report

This commit is contained in:
Ricsi
2020-07-12 13:47:12 +02:00
parent 093c9c25e7
commit 31cdc79d47
4 changed files with 56 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
<?php
# REPORT DOWNLOAD
if ($this->is_id()) {
if (!file_exists("./balance-report/{$this->get_id()}.csv")) {
return;
}
header('Content-type: application/csv');
header("Content-disposition: attachment; filename=\"".$this->get_id().".csv\"");
ob_clean();
flush();
readfile("./balance-report/{$this->get_id()}.csv");
}
else {
# NEM LEHET
}
exit(1);
?>