|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Copyright (C) 2019-2022 Joe Zegarra. |
|
4
|
|
|
* |
|
5
|
|
|
* This library is free software; you can redistribute it and/or |
|
6
|
|
|
* modify it under the terms of the GNU Lesser General Public |
|
7
|
|
|
* License as published by the Free Software Foundation; either |
|
8
|
|
|
* version 3 of the License, or (at your option) any later version. |
|
9
|
|
|
* |
|
10
|
|
|
* This library is distributed in the hope that it will be useful, |
|
11
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13
|
|
|
* Lesser General Public License for more details. |
|
14
|
|
|
* |
|
15
|
|
|
* You should have received a copy of the GNU Lesser General Public |
|
16
|
|
|
* License along with this library; if not, write to the Free Software |
|
17
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18
|
|
|
* MA 02110-1301 USA |
|
19
|
|
|
*/ |
|
20
|
|
|
|
|
21
|
|
|
namespace FacturaScripts\Plugins\fsRepublicaDominicana\Model; |
|
22
|
|
|
|
|
23
|
|
|
use FacturaScripts\Core\Base\DataBase; |
|
|
|
|
|
|
24
|
|
|
use FacturaScripts\Core\Model\Base\JoinModel; |
|
|
|
|
|
|
25
|
|
|
|
|
26
|
|
|
class FiscalReports extends JoinModel |
|
27
|
|
|
{ |
|
28
|
|
|
public const MAIN_TABLE = 'facturascli'; |
|
29
|
|
|
public const CLIENTES_TABLE = 'clientes'; |
|
30
|
|
|
public const NCFTIPO_TABLE = 'rd_ncftipo'; |
|
31
|
|
|
public const NCFTIPOMOV_TABLE = 'rd_ncftipomovimiento'; |
|
32
|
|
|
public const NCFTIPOANUL_TABLE = 'rd_ncftipoanulacion'; |
|
33
|
|
|
public const NCFTIPOPAGO_TABLE = 'rd_ncftipopagos'; |
|
34
|
|
|
|
|
35
|
|
|
protected function getTables(): array |
|
36
|
|
|
{ |
|
37
|
|
|
return [ |
|
38
|
|
|
static::MAIN_TABLE, |
|
39
|
|
|
static::NCFTIPO_TABLE, |
|
40
|
|
|
static::NCFTIPOANUL_TABLE, |
|
41
|
|
|
static::NCFTIPOMOV_TABLE, |
|
42
|
|
|
static::NCFTIPOPAGO_TABLE, |
|
43
|
|
|
static::CLIENTES_TABLE |
|
44
|
|
|
]; |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
protected function getFields(): array |
|
48
|
|
|
{ |
|
49
|
|
|
return [ |
|
50
|
|
|
'fecha' => static::MAIN_TABLE.'.fecha', |
|
51
|
|
|
'codalmacen' => static::MAIN_TABLE.'.codalmacen', |
|
52
|
|
|
'cliente' => static::CLIENTES_TABLE.'.nombre', |
|
53
|
|
|
'cifnif' => static::CLIENTES_TABLE.'.cifnif', |
|
54
|
|
|
'ncf' => static::MAIN_TABLE.'.numero2', |
|
55
|
|
|
'ncfmodifica' => static::MAIN_TABLE.'.codigorect', |
|
56
|
|
|
'tipocomprobante' => static::MAIN_TABLE.'.tipocomprobante', |
|
57
|
|
|
'base_imponible' => static::MAIN_TABLE.'.total', |
|
58
|
|
|
'base_exenta' => static::MAIN_TABLE.'.total', |
|
59
|
|
|
'itbis' => static::MAIN_TABLE.'.totaliva', |
|
60
|
|
|
'estado' => static::MAIN_TABLE.'.idestado' |
|
61
|
|
|
]; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
protected function getSQLFrom(): string |
|
65
|
|
|
{ |
|
66
|
|
|
return static::MAIN_TABLE . '' |
|
67
|
|
|
. ' LEFT JOIN '. static::CLIENTES_TABLE . ' ON ' |
|
68
|
|
|
. static::MAIN_TABLE . '.codcliente = ' . static::CLIENTES_TABLE . '.codcliente' |
|
69
|
|
|
. ' LEFT JOIN '. static::NCFTIPO_TABLE . ' ON ' |
|
70
|
|
|
. static::MAIN_TABLE . '.tipocomprobante = ' . static::NCFTIPO_TABLE . '.tipocomprobante' |
|
71
|
|
|
. ' LEFT JOIN ' . static::NCFTIPOPAGO_TABLE . ' ON ' |
|
72
|
|
|
. static::MAIN_TABLE . '.ncftipopago = ' . static::NCFTIPOPAGO_TABLE . '.tipopago'; |
|
73
|
|
|
} |
|
74
|
|
|
} |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths