File tree Expand file tree Collapse file tree 4 files changed +15
-12
lines changed
Expand file tree Collapse file tree 4 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 88"112";"EXIGIBLES";""
99"1121";"CLIENTES";"CLIENT"
1010"1122";"OTRAS CUENTAS POR COBRAR";""
11- "1123";"CREDITO TRIBUTARIO IVA";""
11+ "1123";"CREDITO TRIBUTARIO IVA";"IVASOP "
1212"1124";"CREDITO TRIBUTARIO RENTA AÑOS ANTERIORES";""
1313"1125";"CREDITO TRIBUTARIO RENTA AÑO CORRIENTE";""
1414"113";"REALIZABLES";""
7676"5";"COSTOS Y GASTOS";""
7777"51";"COSTOS OPERACIONALES";""
7878"511";"COSTOS";""
79- "5111";"COSTO DE VENTAS";""
79+ "5111";"COSTO DE VENTAS";"COMPRA "
8080"5112";"DESCUENTO EN COMPRAS";""
8181"5113";"DEVOLUCION EN COMPRAS";""
8282"5114";"RECARGO EN COMPRAS";""
188188"212143";"IVA Retenido por Emisoras de Tarjetas de Credito Bienes";""
189189"212144";"IVA por la Compra de Bienes";""
190190"212145";"IVA en Contratos de Construcción";""
191- "212146";"IVA en Ventas o por Pagar";""
191+ "212146";"IVA en Ventas o por Pagar";"IVAREP "
192192"212147";"Impuesto a la Renta por Pagar";""
193193"212201";"Aporte Personal IESS 9.35% por Pagar";""
194194"212202";"Aporte Patronal IESS 12.15% por Pagar";""
Original file line number Diff line number Diff line change 2020namespace FacturaScripts \Test \Core \Lib ;
2121
2222use FacturaScripts \Core \Base \DataBase ;
23+ use FacturaScripts \Core \DataSrc \Paises ;
2324use FacturaScripts \Core \Lib \Accounting \AccountingAccounts ;
2425use FacturaScripts \Core \Lib \Accounting \AccountingCreation ;
2526use FacturaScripts \Core \Model \Cuenta ;
@@ -62,10 +63,11 @@ public function testCreateCustomer(): void
6263 $ customersAccount = $ accounts ->getSpecialAccount (AccountingAccounts::SPECIAL_CUSTOMER_ACCOUNT );
6364 $ this ->assertTrue ($ customersAccount ->exists (), 'cant-get-customer-account ' );
6465
65- // obtenemos una nueva subcuenta para el cliente, 1001 veces,
66+ // obtenemos una nueva subcuenta para el cliente, 1001 veces (solo España) ,
6667 // para comprobar si en todos los casos se crea una nueva
6768 $ creator = new AccountingCreation ();
68- for ($ i = 0 ; $ i < 1000 ; $ i ++) {
69+ $ max = Paises::default ()->codpais === 'ESP ' ? 1000 : 10 ;
70+ for ($ i = 0 ; $ i < $ max ; $ i ++) {
6971 $ subaccount = $ creator ->createSubjectAccount ($ customer , $ customersAccount );
7072 $ this ->assertTrue ($ subaccount ->exists (), 'cant-create-customer-subaccount- ' . $ i );
7173
Original file line number Diff line number Diff line change 2525use FacturaScripts \Core \Where ;
2626use FacturaScripts \Dinamic \Model \Subcuenta ;
2727use FacturaScripts \Test \Traits \DefaultSettingsTrait ;
28+ use FacturaScripts \Test \Traits \LogErrorsTrait ;
2829use PHPUnit \Framework \TestCase ;
2930
3031final class LedgerTest extends TestCase
3132{
3233 use DefaultSettingsTrait;
34+ use LogErrorsTrait;
3335
3436 public static function setUpBeforeClass (): void
3537 {
@@ -89,4 +91,9 @@ private function getSampleSubaccount(Ejercicio $eje): ?string
8991
9092 return null ;
9193 }
94+
95+ protected function tearDown (): void
96+ {
97+ $ this ->logErrors ();
98+ }
9299}
Original file line number Diff line number Diff line change 11<?php
22/**
33 * This file is part of FacturaScripts
4- * Copyright (C) 2021-2023 Carlos Garcia Gomez <carlos@facturascripts.com>
4+ * Copyright (C) 2021-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
55 *
66 * This program is free software: you can redistribute it and/or modify
77 * it under the terms of the GNU Lesser General Public License as
@@ -49,12 +49,6 @@ protected static function installAccountingPlan(): void
4949 $ exercise ->save ();
5050 }
5151
52- // si el ejercicio no tiene 10 dígitos en las subcuentas, lo eliminamos
53- if ($ exercise ->longsubcuenta != 10 ) {
54- $ exercise ->delete ();
55- continue ;
56- }
57-
5852 $ where = [new DataBaseWhere ('codejercicio ' , $ exercise ->codejercicio )];
5953 if ($ cuenta ->count ($ where ) > 0 ) {
6054 // ya tiene plan contable
You can’t perform that action at this time.
0 commit comments