Commit 046eeb389ad3869da54bf9af006bbb03d9081023
Exists in
2.9
and in
2 other branches
Merge remote-tracking branch 'community/2.6' into community-patch-2021-07-21
Showing
2 changed files
with
14 additions
and
1 deletions
Show diff stats
ieducar/modules/Api/Views/ReportController.php
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | +use iEducar\Reports\Contracts\TeacherReportCard; | ||
4 | + | ||
3 | require_once 'Reports/Reports/ReportCardReport.php'; | 5 | require_once 'Reports/Reports/ReportCardReport.php'; |
4 | require_once 'Reports/Reports/TeacherReportCardReport.php'; | 6 | require_once 'Reports/Reports/TeacherReportCardReport.php'; |
5 | 7 | ||
@@ -105,7 +107,7 @@ class ReportController extends ApiCoreController | @@ -105,7 +107,7 @@ class ReportController extends ApiCoreController | ||
105 | protected function getBoletimProfessor() | 107 | protected function getBoletimProfessor() |
106 | { | 108 | { |
107 | if ($this->canGetBoletimProfessor()) { | 109 | if ($this->canGetBoletimProfessor()) { |
108 | - $boletimProfessorReport = new TeacherReportCardReport(); | 110 | + $boletimProfessorReport = app(TeacherReportCard::class); |
109 | 111 | ||
110 | $boletimProfessorReport->addArg('ano', (int)$this->getRequest()->ano); | 112 | $boletimProfessorReport->addArg('ano', (int)$this->getRequest()->ano); |
111 | $boletimProfessorReport->addArg('instituicao', (int)$this->getRequest()->instituicao_id); | 113 | $boletimProfessorReport->addArg('instituicao', (int)$this->getRequest()->instituicao_id); |
@@ -121,6 +123,9 @@ class ReportController extends ApiCoreController | @@ -121,6 +123,9 @@ class ReportController extends ApiCoreController | ||
121 | $configuracoes = new clsPmieducarConfiguracoesGerais(); | 123 | $configuracoes = new clsPmieducarConfiguracoesGerais(); |
122 | $configuracoes = $configuracoes->detalhe(); | 124 | $configuracoes = $configuracoes->detalhe(); |
123 | 125 | ||
126 | + $modelo = $configuracoes['modelo_boletim_professor']; | ||
127 | + | ||
128 | + $boletimProfessorReport->addArg('modelo', $modelo); | ||
124 | $boletimProfessorReport->addArg('linha', 0); | 129 | $boletimProfessorReport->addArg('linha', 0); |
125 | $boletimProfessorReport->addArg('SUBREPORT_DIR', config('legacy.report.source_path')); | 130 | $boletimProfessorReport->addArg('SUBREPORT_DIR', config('legacy.report.source_path')); |
126 | 131 |