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 | 1 | <?php |
2 | 2 | |
3 | +use iEducar\Reports\Contracts\TeacherReportCard; | |
4 | + | |
3 | 5 | require_once 'Reports/Reports/ReportCardReport.php'; |
4 | 6 | require_once 'Reports/Reports/TeacherReportCardReport.php'; |
5 | 7 | |
... | ... | @@ -105,7 +107,7 @@ class ReportController extends ApiCoreController |
105 | 107 | protected function getBoletimProfessor() |
106 | 108 | { |
107 | 109 | if ($this->canGetBoletimProfessor()) { |
108 | - $boletimProfessorReport = new TeacherReportCardReport(); | |
110 | + $boletimProfessorReport = app(TeacherReportCard::class); | |
109 | 111 | |
110 | 112 | $boletimProfessorReport->addArg('ano', (int)$this->getRequest()->ano); |
111 | 113 | $boletimProfessorReport->addArg('instituicao', (int)$this->getRequest()->instituicao_id); |
... | ... | @@ -121,6 +123,9 @@ class ReportController extends ApiCoreController |
121 | 123 | $configuracoes = new clsPmieducarConfiguracoesGerais(); |
122 | 124 | $configuracoes = $configuracoes->detalhe(); |
123 | 125 | |
126 | + $modelo = $configuracoes['modelo_boletim_professor']; | |
127 | + | |
128 | + $boletimProfessorReport->addArg('modelo', $modelo); | |
124 | 129 | $boletimProfessorReport->addArg('linha', 0); |
125 | 130 | $boletimProfessorReport->addArg('SUBREPORT_DIR', config('legacy.report.source_path')); |
126 | 131 | ... | ... |