Skip to content

Commit 41daf03

Browse files
committed
Cambiado new where() por Where::eq()
1 parent 26a7d1e commit 41daf03

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

Controller/EditAsientoPredefinido.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,17 @@ protected function loadData($viewName, $view)
132132

133133
switch ($viewName) {
134134
case 'EditAsientoPredefinidoLinea':
135-
$where = [new Where('idasientopre', $id)];
135+
$where = [Where::eq('idasientopre', $id)];
136136
$view->loadData('', $where, ['orden' => 'ASC', 'idasientopre' => 'ASC']);
137137
break;
138138

139139
case 'EditAsientoPredefinidoVariable':
140-
$where = [new Where('idasientopre', $id)];
140+
$where = [Where::eq('idasientopre', $id)];
141141
$view->loadData('', $where, ['idasientopre' => 'ASC', 'codigo' => 'ASC']);
142142
break;
143143

144144
case 'ListAsiento':
145-
$where = [new Where('idasientopre', $id)];
145+
$where = [Where::eq('idasientopre', $id)];
146146
$view->loadData('', $where);
147147
break;
148148

@@ -153,3 +153,4 @@ protected function loadData($viewName, $view)
153153
}
154154
}
155155

156+

Lib/AsientoPredefinidoGenerator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ protected static function subcuentaReplace(string $codsubcuenta, array $variable
216216
$subcuenta->codejercicio = $codejercicio; // necesario para transformCodsubcuenta()
217217
$valorFinal = $subcuenta->transformCodsubcuenta($valor);
218218
$where = [
219-
new Where('codejercicio', $codejercicio),
220-
new Where('codsubcuenta', $valorFinal) // transforma el punto en ceros
219+
Where::eq('codejercicio', $codejercicio),
220+
Where::eq('codsubcuenta', $valorFinal) // transforma el punto en ceros
221221
];
222222
if (false === $subcuenta->loadFromCode('', $where)) {
223223
Tools::log()->warning('subaccount-not-found', ['%subAccountCode%' => $valorFinal]);
@@ -226,3 +226,4 @@ protected static function subcuentaReplace(string $codsubcuenta, array $variable
226226
}
227227
}
228228

229+

Model/AsientoPredefinido.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function generate(array $form): Asiento
5757
public function getLines(): array
5858
{
5959
$line = new AsientoPredefinidoLinea();
60-
$where = [new Where("idasientopre", $this->id)];
60+
$where = [Where::eq("idasientopre", $this->id)];
6161
return $line->all($where);
6262
}
6363

@@ -69,7 +69,7 @@ public function getLines(): array
6969
public function getVariables(): array
7070
{
7171
$variable = new AsientoPredefinidoVariable();
72-
$where = [new Where("idasientopre", $this->id)];
72+
$where = [Where::eq("idasientopre", $this->id)];
7373
return $variable->all($where);
7474
}
7575

@@ -97,3 +97,4 @@ public function url(string $type = 'auto', string $list = 'ListAsiento?activetab
9797
}
9898
}
9999

100+

0 commit comments

Comments
 (0)