Spreadsheet
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user