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('exercise') }} - {% for company in fsc.empresa.all() %} {% for exercise in fsc.getAllExercises(company.idempresa) %} @@ -80,9 +80,9 @@
-
+
{{ trans('period') }} - {% for period, label in fsc.getPeriodsForComboBoxHtml() %} {% if period == fsc.period %} @@ -94,7 +94,7 @@
-
+
@@ -106,7 +106,7 @@

{{ trans('summary') }}

-
+

{{ trans('model-130-r') }}

{{ trans('model-130-desc') }}

@@ -114,46 +114,40 @@
-
+
{{ trans('tax-incomes') }}
-
- 01 -
- 01 +
-
+
{{ trans('tax-expenses') }}
-
- 02 -
- 02 +
-
+
{{ trans('net-total') }}
-
- 03 -
- + 03 +
-
+
{{ trans('pct-to-deduct') }}
@@ -162,54 +156,46 @@
-
+
{{ fsc.todeduct }}% {{ trans('after-deduct') }}
-
- 04 -
- 04 +
-
+
{{ trans('previous-model') }}
-
- 05 -
- 05 +
-
+
{{ trans('retentions') }}
-
- 06 -
- 06 +
-
+
{{ trans('result') }}
-
- 07 -
- 07 +

{{ trans('tax-negative-info') }}

{% if fsc.result > 0 %} - {% endif %} @@ -220,41 +206,41 @@ @@ -267,12 +253,12 @@ {{ trans('invoice') }} {{ trans('customer') }} - {{ trans('tax-base') }} - {{ trans('vat') }} - {{ trans('surcharge') }} - {{ trans('irpf') }} - {{ trans('total') }} - {{ trans('date') }} + {{ trans('tax-base') }} + {{ trans('vat') }} + {{ trans('surcharge') }} + {{ trans('irpf') }} + {{ trans('total') }} + {{ trans('date') }} @@ -292,12 +278,12 @@ {{ item.codigo }} {{ item.nombrecliente | raw }} - {{ money(item.neto) }} - {{ money(item.totaliva) }} - {{ money(item.totalrecargo) }} - {{ money(item.totalirpf) }} - {{ money(item.total) }} - {{ item.fecha }} + {{ money(item.neto) }} + {{ money(item.totaliva) }} + {{ money(item.totalrecargo) }} + {{ money(item.totalirpf) }} + {{ money(item.total) }} + {{ item.fecha }} {% else %} @@ -310,29 +296,29 @@ - {{ trans('totals') }} + {{ trans('totals') }} - {{ trans('tax-base') }} - {{ money(salesTotalNeto) }} + {{ trans('tax-base') }} + {{ money(salesTotalNeto) }} - {{ trans('vat') }} - {{ money(salesTotalTax) }} + {{ trans('vat') }} + {{ money(salesTotalTax) }} - {{ trans('surcharge') }} - {{ money(salesTotalSurcharge) }} + {{ trans('surcharge') }} + {{ money(salesTotalSurcharge) }} - {{ trans('irpf') }} - {{ money(salesTotalRetention) }} + {{ trans('irpf') }} + {{ money(salesTotalRetention) }} - {{ trans('total-amount') }} - {{ money(salesTotal) }} + {{ trans('total-amount') }} + {{ money(salesTotal) }} @@ -345,12 +331,12 @@ {{ trans('invoice') }} {{ trans('supplier') }} - {{ trans('tax-base') }} - {{ trans('vat') }} - {{ trans('surcharge') }} - {{ trans('irpf') }} - {{ trans('total') }} - {{ trans('date') }} + {{ trans('tax-base') }} + {{ trans('vat') }} + {{ trans('surcharge') }} + {{ trans('irpf') }} + {{ trans('total') }} + {{ trans('date') }} @@ -370,12 +356,12 @@ {{ item.codigo }} {{ item.nombre | raw }} - {{ money(item.neto) }} - {{ money(item.totaliva) }} - {{ money(item.totalrecargo) }} - {{ money(item.totalirpf) }} - {{ money(item.total) }} - {{ item.fecha }} + {{ money(item.neto) }} + {{ money(item.totaliva) }} + {{ money(item.totalrecargo) }} + {{ money(item.totalirpf) }} + {{ money(item.total) }} + {{ item.fecha }} {% else %} @@ -388,29 +374,29 @@ - {{ trans('totals') }} + {{ trans('totals') }} - {{ trans('tax-base') }} - {{ money(purchasesTotalNeto) }} + {{ trans('tax-base') }} + {{ money(purchasesTotalNeto) }} - {{ trans('vat') }} - {{ money(purchasesTotalTax) }} + {{ trans('vat') }} + {{ money(purchasesTotalTax) }} - {{ trans('surcharge') }} - {{ money(purchasesTotalSurcharge) }} + {{ trans('surcharge') }} + {{ money(purchasesTotalSurcharge) }} - {{ trans('irpf') }} - {{ money(purchasesTotalRetention) }} + {{ trans('irpf') }} + {{ money(purchasesTotalRetention) }} - {{ trans('total-amount') }} - {{ money(purchasesTotal) }} + {{ trans('total-amount') }} + {{ money(purchasesTotal) }} @@ -424,8 +410,8 @@ {{ trans('accounting-entry') }} {{ trans('subaccount') }} {{ trans('concept') }} - {{ trans('total') }} - {{ trans('date') }} + {{ trans('total') }} + {{ trans('date') }} @@ -438,8 +424,8 @@ {{ item.codsubcuenta }} {{ item.concepto | raw }} - {{ money(item.debe) }} - {{ item.fecha }} + {{ money(item.debe) }} + {{ item.fecha }} {% else %} @@ -452,13 +438,13 @@ - {{ trans('totals') }} + {{ trans('totals') }} - {{ trans('total-amount') }} - {{ money(accountingTotalNeto) }} + {{ trans('total-amount') }} + {{ money(accountingTotalNeto) }} @@ -480,13 +466,13 @@ {{ subaccount.codsubcuenta }} {{ subaccount.getSubcuenta().descripcion }} - +
{{ formToken() }}
@@ -503,11 +489,9 @@
-
- -
@@ -521,9 +505,7 @@