diff --git a/Controller/Modelo130.php b/Controller/Modelo130.php index b4eb761..42c7b6b 100644 --- a/Controller/Modelo130.php +++ b/Controller/Modelo130.php @@ -130,7 +130,7 @@ public function getAllExercises(?int $idempresa): array public function getExercise(?string $codejercicio): Ejercicio { $exercise = new Ejercicio(); - $exercise->loadFromCode($this->codejercicio); + $exercise->load($this->codejercicio); return $exercise; } @@ -234,7 +234,7 @@ protected function deleteDeductibleSubaccount(): bool } $subaccount130 = new Subcuenta130(); - if (false === $subaccount130->loadFromCode($this->request->request->get('id'))) { + if (false === $subaccount130->load($this->request->request->get('id'))) { Tools::log()->error('record-not-found'); return false; } @@ -414,7 +414,7 @@ protected function createAccountingEntry() // Buscamos si la forma de pago tiene una subcuenta de cara a asignarla o dejar el valor por defecto en la partida $paymentMethod = new FormaPago(); - if ($paymentMethod->loadFromCode($paymentMethodId)) { + if ($paymentMethod->load($paymentMethodId)) { $bankAccount = $paymentMethod->getBankAccount(); } diff --git a/Model/Subcuenta130.php b/Model/Subcuenta130.php index 5b3c12f..1f031a8 100644 --- a/Model/Subcuenta130.php +++ b/Model/Subcuenta130.php @@ -20,8 +20,8 @@ namespace FacturaScripts\Plugins\Modelo130\Model; use FacturaScripts\Core\Base\DataBase\DataBaseWhere; -use FacturaScripts\Core\Model\Base\ModelClass; -use FacturaScripts\Core\Model\Base\ModelTrait; +use FacturaScripts\Core\Template\ModelClass; +use FacturaScripts\Core\Template\ModelTrait; use FacturaScripts\Core\Session; use FacturaScripts\Core\Tools; use FacturaScripts\Dinamic\Model\Subcuenta; @@ -55,7 +55,7 @@ public function getSubcuenta(): Subcuenta { $subcuenta = new Subcuenta(); $where = [new DataBaseWhere('codsubcuenta', $this->codsubcuenta)]; - $subcuenta->loadFromCode('', $where); + $subcuenta->loadWhere($where); return $subcuenta; } @@ -71,7 +71,7 @@ public static function tableName(): string public function test(): bool { - if (empty($this->primaryColumnValue())) { + if (empty($this->id())) { $this->creation_date = Tools::dateTime(); $this->last_nick = null; $this->last_update = null; diff --git a/View/Modelo130.html.twig b/View/Modelo130.html.twig index 589df33..b2cd552 100644 --- a/View/Modelo130.html.twig +++ b/View/Modelo130.html.twig @@ -60,9 +60,9 @@
{{ trans('model-130-r') }}
{{ trans('model-130-desc') }}
{{ trans('tax-negative-info') }}
{% if fsc.result > 0 %} -