Skip to content

Commit 71ab38a

Browse files
author
Carlos Garcia
committed
Refactor dotAccountingAction to use Where class and improve variable naming; update translations in JSON files
1 parent cd79560 commit 71ab38a

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

Core/Controller/EditSubcuenta.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use FacturaScripts\Core\Lib\ExtendedController\BaseView;
2424
use FacturaScripts\Core\Lib\ExtendedController\EditController;
2525
use FacturaScripts\Core\Tools;
26+
use FacturaScripts\Core\Where;
2627
use FacturaScripts\Dinamic\Lib\Accounting\Ledger;
2728
use FacturaScripts\Dinamic\Model\CodeModel;
2829
use FacturaScripts\Dinamic\Model\Cuenta;
@@ -60,6 +61,7 @@ public function getPageData(): array
6061
protected function createViews()
6162
{
6263
parent::createViews();
64+
6365
$this->setTabsPosition('bottom');
6466

6567
// establecemos el límite de registros a 9999, para el select de cuentas
@@ -245,13 +247,13 @@ protected function prepareSubcuenta(BaseView $view): void
245247
*/
246248
private function dotAccountingAction(bool $value): bool
247249
{
248-
$ids = $this->request->request->getArray('code');
250+
$ids = $this->request->request->getArray('codes');
249251
if (empty($ids)) {
250252
Tools::log()->warning('no-selected-item');
251-
return false;
253+
return true;
252254
}
253255

254-
$where = [new DataBaseWhere('idpartida', implode(',', $ids), 'IN')];
256+
$where = [Where::in('idpartida', $ids)];
255257
foreach (Partida::all($where) as $row) {
256258
$row->setDottedStatus($value);
257259
}

Core/Lib/ExtendedController/PanelController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function privateCore(&$response, $user, $permissions)
113113
}
114114

115115
/**
116-
* Sets the tabs position, by default is set to 'left', also supported 'bottom', 'top' and 'left-bottom.
116+
* Sets the tabs position, by default is set to 'left', also supported 'bottom', 'top' and 'left-bottom'.
117117
*
118118
* @param string $position
119119
*/

Core/Translation/cs_CZ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@
631631
"export-bill": "Factura de exportación",
632632
"extra-file": "Archivo extra",
633633
"failed": "Selhalo",
634-
"fails": "Fallos",
634+
"fails": "Chyby",
635635
"families": "Familias",
636636
"family": "Familia",
637637
"family-code": "Código de la família",

Core/Translation/de_DE.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@
631631
"export-bill": "Exportationsrechnung",
632632
"extra-file": "Extra Datei",
633633
"failed": "Fehlgeschlagen",
634-
"fails": "Fallos",
634+
"fails": "Fehler",
635635
"families": "Familien",
636636
"family": "Familie",
637637
"family-code": "Familiencode",
@@ -1126,7 +1126,7 @@
11261126
"opened": "Geöffnet",
11271127
"opening-acounting-completed": "Buchhaltungseröffnung abgeschlossen",
11281128
"opening-operation": "Öffnung",
1129-
"operating-system": "Sistema Operativo",
1129+
"operating-system": "Betriebssystem",
11301130
"operation": "Operation",
11311131
"operation-export": "Betrieb Export",
11321132
"operator": "Bediener",

Core/Translation/pt_BR.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@
584584
"es-tax-exception-e5": "Espanha: exceção pelo artigo 25 da Lei do IVA",
585585
"es-tax-exception-e6": "E",
586586
"es-tax-exception-location-rules": "es-tax-exception-location-rules",
587-
"es-tax-exception-passive-subject": "exceção de imposto - sujeito passivo",
587+
"es-tax-exception-passive-subject": "Exceção fiscal - sujeito passivo",
588588
"es-tax-regime-agrarian": "R",
589589
"es-tax-regime-cash-criteria": "Criterio de caixa",
590590
"es-tax-regime-especial-agp": "Regime especial da agricultura, pecuária e pesca",

0 commit comments

Comments
 (0)