@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | 'idempresa' => static::MAIN_TABLE.'.idempresa', |
40 | 40 | 'codalmacen' => static::MAIN_TABLE.'.codalmacen', |
41 | 41 | 'ncf' => static::MAIN_TABLE.'.numero2', |
42 | - 'tipoanulacion' => 'CASE WHEN ' . |
|
43 | - static::ESTADOSDOC_TABLE . '.nombre = \'Anulada\' AND ' . |
|
44 | - static::MAIN_TABLE.'.ncftipoanulacion is null ' . |
|
45 | - 'THEN CONCAT(\'05\',\' - \',\'Corrección de la Información\') ELSE ' . |
|
46 | - 'concat(' . static::MAIN_TABLE.'.ncftipoanulacion, \' - \', ' . |
|
42 | + 'tipoanulacion' => 'CASE WHEN '. |
|
43 | + static::ESTADOSDOC_TABLE.'.nombre = \'Anulada\' AND '. |
|
44 | + static::MAIN_TABLE.'.ncftipoanulacion is null '. |
|
45 | + 'THEN CONCAT(\'05\',\' - \',\'Corrección de la Información\') ELSE '. |
|
46 | + 'concat('.static::MAIN_TABLE.'.ncftipoanulacion, \' - \', '. |
|
47 | 47 | static::NCFCANCELTYPE_TABLE.'.descripcion) END', |
48 | 48 | 'fecha' => $dateFormat.'('.static::MAIN_TABLE.'.fecha,\''.$dateFormatString.'\')', |
49 | - 'estado' => 'CASE WHEN ' . static::ESTADOSDOC_TABLE . |
|
49 | + 'estado' => 'CASE WHEN '.static::ESTADOSDOC_TABLE. |
|
50 | 50 | '.nombre = \'Emitida\' THEN \'Activo\' ELSE \'Anulado\' END', |
51 | 51 | ]; |
52 | 52 | return $data; |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | protected function getSQLFrom(): string |
60 | 60 | { |
61 | 61 | return static::MAIN_TABLE |
62 | - . ' JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
63 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado AND '.static::ESTADOSDOC_TABLE.'.nombre = \'Anulada\')' |
|
64 | - . ' LEFT JOIN ' . static::NCFCANCELTYPE_TABLE . ' ON (' |
|
65 | - . static::MAIN_TABLE . '.ncftipoanulacion = ' . static::NCFCANCELTYPE_TABLE . '.codigo)'; |
|
62 | + . ' JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
63 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado AND '.static::ESTADOSDOC_TABLE.'.nombre = \'Anulada\')' |
|
64 | + . ' LEFT JOIN '.static::NCFCANCELTYPE_TABLE.' ON (' |
|
65 | + . static::MAIN_TABLE.'.ncftipoanulacion = '.static::NCFCANCELTYPE_TABLE.'.codigo)'; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |