@@ -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.'.numeroncf', |
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 | /** |
@@ -92,10 +92,10 @@ |
||
92 | 92 | protected function getSQLFrom(): string |
93 | 93 | { |
94 | 94 | return static::MAIN_TABLE |
95 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
96 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
97 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
98 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado AND ' |
|
95 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
96 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
97 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
98 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado AND ' |
|
99 | 99 | . static::ESTADOSDOC_TABLE.'.nombre != \'Anulada\')'; |
100 | 100 | } |
101 | 101 |
@@ -81,10 +81,10 @@ |
||
81 | 81 | /** |
82 | 82 | * @inheritDoc |
83 | 83 | */ |
84 | - public function show(Response &$response) |
|
84 | + public function show(Response & $response) |
|
85 | 85 | { |
86 | 86 | $response->headers->set('Content-Type', 'text/text; charset=utf-8'); |
87 | - $response->headers->set('Content-Disposition', 'attachment;filename=' . $this->getFileName() . '.TXT'); |
|
87 | + $response->headers->set('Content-Disposition', 'attachment;filename='.$this->getFileName().'.TXT'); |
|
88 | 88 | $response->setContent($this->getDoc()); |
89 | 89 | } |
90 | 90 | } |
91 | 91 | \ No newline at end of file |
@@ -74,18 +74,18 @@ discard block |
||
74 | 74 | protected function getGroupFields(): string |
75 | 75 | { |
76 | 76 | //return parent::getGroupFields(); // TODO: Change the autogenerated stub |
77 | - return static::MAIN_TABLE.'.idfactura, ' . |
|
78 | - static::MAIN_TABLE.'.idempresa, ' . |
|
79 | - static::MAIN_TABLE.'.codalmacen, ' . |
|
80 | - static::MAIN_TABLE.'.cifnif, ' . |
|
81 | - static::MAIN_TABLE.'.ncftipomovimiento, ' . |
|
82 | - static::MAIN_TABLE.'.numeroncf, ' . |
|
83 | - static::SECONDARY_TABLE_ALIAS.'.numeroncf, ' . |
|
84 | - static::MAIN_TABLE.'.fecha, ' . |
|
85 | - static::RECIBOSPROV_TABLE.'.fechapago, ' . |
|
86 | - static::ESTADOSDOC_TABLE.'.nombre, ' . |
|
87 | - static::MAIN_TABLE.'.neto, ' . |
|
88 | - static::MAIN_TABLE.'.totaliva' . |
|
77 | + return static::MAIN_TABLE.'.idfactura, '. |
|
78 | + static::MAIN_TABLE.'.idempresa, '. |
|
79 | + static::MAIN_TABLE.'.codalmacen, '. |
|
80 | + static::MAIN_TABLE.'.cifnif, '. |
|
81 | + static::MAIN_TABLE.'.ncftipomovimiento, '. |
|
82 | + static::MAIN_TABLE.'.numeroncf, '. |
|
83 | + static::SECONDARY_TABLE_ALIAS.'.numeroncf, '. |
|
84 | + static::MAIN_TABLE.'.fecha, '. |
|
85 | + static::RECIBOSPROV_TABLE.'.fechapago, '. |
|
86 | + static::ESTADOSDOC_TABLE.'.nombre, '. |
|
87 | + static::MAIN_TABLE.'.neto, '. |
|
88 | + static::MAIN_TABLE.'.totaliva'. |
|
89 | 89 | ' '; |
90 | 90 | } |
91 | 91 | |
@@ -96,16 +96,16 @@ discard block |
||
96 | 96 | protected function getSQLFrom(): string |
97 | 97 | { |
98 | 98 | return static::MAIN_TABLE |
99 | - . ' LEFT JOIN '. static::SECONDARY_TABLE . ' ON (' |
|
100 | - . static::MAIN_TABLE . '.idfacturarect = ' . static::SECONDARY_TABLE_ALIAS . '.idfactura)' |
|
101 | - . ' LEFT JOIN '. static::RECIBOSPROV_TABLE . ' ON (' |
|
102 | - . static::MAIN_TABLE . '.idfactura = ' . static::RECIBOSPROV_TABLE . '.idfactura)' |
|
103 | - . ' LEFT JOIN '. static::LINES_TABLE . ' ON (' |
|
104 | - . static::MAIN_TABLE . '.idfactura = ' . static::LINES_TABLE . '.idfactura)' |
|
105 | - . ' LEFT JOIN '. static::PRODS_TABLE . ' ON (' |
|
106 | - . static::LINES_TABLE . '.referencia = ' . static::PRODS_TABLE . '.referencia)' |
|
107 | - . ' LEFT JOIN ' . static::ESTADOSDOC_TABLE . ' ON (' |
|
108 | - . static::MAIN_TABLE . '.idestado = ' . static::ESTADOSDOC_TABLE . '.idestado)'; |
|
99 | + . ' LEFT JOIN '.static::SECONDARY_TABLE.' ON (' |
|
100 | + . static::MAIN_TABLE.'.idfacturarect = '.static::SECONDARY_TABLE_ALIAS.'.idfactura)' |
|
101 | + . ' LEFT JOIN '.static::RECIBOSPROV_TABLE.' ON (' |
|
102 | + . static::MAIN_TABLE.'.idfactura = '.static::RECIBOSPROV_TABLE.'.idfactura)' |
|
103 | + . ' LEFT JOIN '.static::LINES_TABLE.' ON (' |
|
104 | + . static::MAIN_TABLE.'.idfactura = '.static::LINES_TABLE.'.idfactura)' |
|
105 | + . ' LEFT JOIN '.static::PRODS_TABLE.' ON (' |
|
106 | + . static::LINES_TABLE.'.referencia = '.static::PRODS_TABLE.'.referencia)' |
|
107 | + . ' LEFT JOIN '.static::ESTADOSDOC_TABLE.' ON (' |
|
108 | + . static::MAIN_TABLE.'.idestado = '.static::ESTADOSDOC_TABLE.'.idestado)'; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | |
29 | 29 | public function createViews(): Closure |
30 | 30 | { |
31 | - return function () { |
|
32 | - AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js'); |
|
33 | - AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js'); |
|
34 | - AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/BusquedaRNCDGII.js'); |
|
31 | + return function() { |
|
32 | + AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonModals.js'); |
|
33 | + AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js'); |
|
34 | + AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/BusquedaRNCDGII.js'); |
|
35 | 35 | $ncfTipoPago = new NCFTipoPago(); |
36 | 36 | $ncfTiposPago = $ncfTipoPago->findAllByTipopago('02'); |
37 | 37 | $customValuesNTP = []; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function execPreviousAction() |
50 | 50 | { |
51 | - return function ($action) { |
|
51 | + return function($action) { |
|
52 | 52 | switch ($action) { |
53 | 53 | case 'busca_rnc': |
54 | 54 | $this->setTemplate(false); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $fileName = 'MyFiles/DGII_F_'.$reportCode.'_'.$this->empresa->cifnif.'_'.$year.'_'.$month.'.TXT'; |
117 | 117 | $commonFunctions->exportTXT($reportCode, $fileName, $this->empresa->cifnif, $year, $month, $whereReport); |
118 | 118 | $this->response->headers->set('Content-type', 'text/plain'); |
119 | - $this->response->headers->set('Content-Disposition', 'attachment;filename=' . $fileName); |
|
119 | + $this->response->headers->set('Content-Disposition', 'attachment;filename='.$fileName); |
|
120 | 120 | $this->response->setContent( |
121 | 121 | file_get_contents( |
122 | 122 | \FS_FOLDER |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $periodStartDate = \date('Y-m-01'); |
224 | 224 | $periodEndDate = \date('Y-m-d'); |
225 | 225 | PeriodTools::applyPeriod('last-month', $periodStartDate, $periodEndDate); |
226 | - if (in_array($this->request->request->get('filterfecha'), ['',null], true) === false) { |
|
226 | + if (in_array($this->request->request->get('filterfecha'), ['', null], true) === false) { |
|
227 | 227 | PeriodTools::applyPeriod($this->request->request->get('filterfecha'), $periodStartDate, $periodEndDate); |
228 | 228 | } else { |
229 | 229 | $periodStartDate = $this->request->request->get('filterstartfecha') ?? $periodStartDate; |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | public function saveBefore(): Closure |
55 | 55 | { |
56 | - return function () { |
|
56 | + return function() { |
|
57 | 57 | $ArrayTipoNCFCompras = ['11', '12', '16', '17']; |
58 | 58 | $ncfrango = new NCFRango(); |
59 | 59 | $proveedor = new Proveedor(); |
@@ -139,7 +139,7 @@ |
||
139 | 139 | if (!$verificacion) { |
140 | 140 | echo json_encode(['success' => true], JSON_THROW_ON_ERROR); |
141 | 141 | } else { |
142 | - $message = "Factura: " . $verificacion[0]->idfactura . " Fecha: " . $verificacion[0]->fecha; |
|
142 | + $message = "Factura: ".$verificacion[0]->idfactura." Fecha: ".$verificacion[0]->fecha; |
|
143 | 143 | echo json_encode(['error' => true, 'message' => $message], JSON_THROW_ON_ERROR); |
144 | 144 | } |
145 | 145 | } |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | class CalculatorMod implements CalculatorModInterface |
27 | 27 | { |
28 | 28 | |
29 | - public function apply(BusinessDocument &$doc, array &$lines): bool |
|
29 | + public function apply(BusinessDocument & $doc, array &$lines): bool |
|
30 | 30 | { |
31 | 31 | //TODO: Implement apply() method. |
32 | 32 | return true; |
33 | 33 | } |
34 | 34 | |
35 | - public function calculate(BusinessDocument &$doc, array &$lines): bool |
|
35 | + public function calculate(BusinessDocument & $doc, array &$lines): bool |
|
36 | 36 | { |
37 | 37 | // calculamos el total de impuestos |
38 | 38 | // $totalTaxes = 0.0; |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | return true; |
45 | 45 | } |
46 | 46 | |
47 | - public function calculateLine(BusinessDocument $doc, BusinessDocumentLine &$line): bool |
|
47 | + public function calculateLine(BusinessDocument $doc, BusinessDocumentLine & $line): bool |
|
48 | 48 | { |
49 | 49 | // TODO: Implement calculateLine() method. |
50 | 50 | return true; |
51 | 51 | } |
52 | 52 | |
53 | - public function clear(BusinessDocument &$doc, array &$lines): bool |
|
53 | + public function clear(BusinessDocument & $doc, array &$lines): bool |
|
54 | 54 | { |
55 | 55 | // TODO: Implement clear() method. |
56 | 56 | return true; |