Spreadsheet

This commit is contained in:
2018-07-29 21:26:49 +02:00
parent 30535f7048
commit b86c3fc4b9
26 changed files with 1286 additions and 432 deletions
@@ -59,26 +59,22 @@ class ReportsController extends MY_Controller {
$this->json( $result );
}
public function getInvoiceOverview( $year )
public function getInvoiceOverview( $year = FALSE )
{
$sql = Qinvoiceoverview::fire( $year );
$invoices = new Invoices( $year );
$query = $this->db->query( $sql );
$invoiceReport = $invoices->getInvoiceReport();
$result = $query->result();
$this->json( $invoiceReport );
}
foreach ( $result as $project )
{
$sql = QinvoiceMonthOverview::fire( $project->id, $year );
public function createInvoicesSpreadsheet( $year = FALSE )
{
$invoices = new Invoices( $year );
$query = $this->db->query( $sql );
$invoiceReport = $invoices->getInvoiceReport();
$months = $query->result();
$project->months = $months;
}
$this->json( $result );
new InvoiceSpreadsheet($invoiceReport);
}
public function saveCurrentFinnacialYear( $projectID )