Skip to content

Commit 70e1fe9

Browse files
authored
Merge pull request #21 from Artextrading/master
Añadir campo excluir347 a Cliente y Proveedor
2 parents 70d57c0 + d1dbc2f commit 70e1fe9

12 files changed

Lines changed: 309 additions & 4 deletions

Extension/Model/Cliente.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* This file is part of FacturaScripts
4+
* Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as
8+
* published by the Free Software Foundation, either version 3 of the
9+
* License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace FacturaScripts\Plugins\Modelo347\Extension\Model;
20+
21+
use Closure;
22+
23+
/**
24+
* Auxiliar class for special actions into the customer.
25+
* - Set excluir347 initial value.
26+
*
27+
* @author Jose Antonio Cuello Principal <yopli2000@gmail.com>
28+
*
29+
* @property bool excluir347
30+
*/
31+
class Cliente
32+
{
33+
public function clear(): Closure
34+
{
35+
return function () {
36+
$this->excluir347 = false;
37+
};
38+
}
39+
}

Extension/Model/FacturaCliente.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
/**
3+
* This file is part of FacturaScripts
4+
* Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as
8+
* published by the Free Software Foundation, either version 3 of the
9+
* License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace FacturaScripts\Plugins\Modelo347\Extension\Model;
20+
21+
use Closure;
22+
23+
/**
24+
* Auxiliar class for special actions into the business document.
25+
* - setSubject: Set Modelo347 attributes values from the subject of the document.
26+
*
27+
* @author Jose Antonio Cuello Principal <yopli2000@gmail.com>
28+
*
29+
* @property bool excluir347
30+
*/
31+
class FacturaCliente
32+
{
33+
public function clear(): Closure
34+
{
35+
return function () {
36+
$this->excluir347 = false;
37+
};
38+
}
39+
40+
public function setSubject(): Closure
41+
{
42+
return function ($subject) {
43+
if (property_exists($subject, 'excluir347')) {
44+
$this->excluir347 = $subject->excluir347;
45+
}
46+
};
47+
}
48+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
/**
3+
* This file is part of FacturaScripts
4+
* Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as
8+
* published by the Free Software Foundation, either version 3 of the
9+
* License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace FacturaScripts\Plugins\Modelo347\Extension\Model;
20+
21+
use Closure;
22+
23+
/**
24+
* Auxiliar class for special actions into the business document.
25+
* - setSubject: Set Modelo347 attributes values from the subject of the document.
26+
*
27+
* @author Jose Antonio Cuello Principal <yopli2000@gmail.com>
28+
*
29+
* @property bool excluir347
30+
*/
31+
class FacturaProveedor
32+
{
33+
public function clear(): Closure
34+
{
35+
return function () {
36+
$this->excluir347 = false;
37+
};
38+
}
39+
40+
public function setSubject(): Closure
41+
{
42+
return function ($subject) {
43+
if (property_exists($subject, 'excluir347')) {
44+
$this->excluir347 = $subject->excluir347;
45+
}
46+
};
47+
}
48+
}

Extension/Model/Proveedor.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* This file is part of FacturaScripts
4+
* Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as
8+
* published by the Free Software Foundation, either version 3 of the
9+
* License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace FacturaScripts\Plugins\Modelo347\Extension\Model;
20+
21+
use Closure;
22+
23+
/**
24+
* Auxiliar class for special actions into the supplier.
25+
* - Set excluir347 initial value.
26+
*
27+
* @author Jose Antonio Cuello Principal <yopli2000@gmail.com>
28+
*
29+
* @property bool excluir347
30+
*/
31+
class Proveedor
32+
{
33+
public function clear(): Closure
34+
{
35+
return function () {
36+
$this->excluir347 = false;
37+
};
38+
}
39+
}

Extension/Table/clientes.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
This file is part of Modelo347 plugin for FacturaScripts
4+
Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
5+
6+
This program is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU Lesser General Public License as
8+
published by the Free Software Foundation, either version 3 of the
9+
License, or (at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public License
17+
along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
Document : clientes.xml
20+
Author : Jose Antonio Cuello <yopli2000@gmail.com>
21+
22+
Description:
23+
Add fields to basic structure of clientes table.
24+
- excluir347: indicates if the document should be excluded from 347.
25+
-->
26+
<table>
27+
<column>
28+
<name>excluir347</name>
29+
<type>boolean</type>
30+
<default>false</default>
31+
</column>
32+
</table>

Extension/Table/facturascli.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
This file is part of Modelo347 plugin for FacturaScripts
4-
Copyright (C) 2020-2023 Carlos Garcia Gomez <carlos@facturascripts.com>
4+
Copyright (C) 2017-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

Extension/Table/facturasprov.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
This file is part of Modelo347 plugin for FacturaScripts
4-
Copyright (C) 2020-2023 Carlos Garcia Gomez <carlos@facturascripts.com>
4+
Copyright (C) 2017-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

Extension/Table/proveedores.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
This file is part of Modelo347 plugin for FacturaScripts
4+
Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
5+
6+
This program is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU Lesser General Public License as
8+
published by the Free Software Foundation, either version 3 of the
9+
License, or (at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public License
17+
along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
Document : proveedores.xml
20+
Author : Dainier Rojas Jimenez <danredjim@gmail.com>
21+
Description:
22+
Add fields to basic structure of proveedores table.
23+
- excluir347: indicates if the document should be excluded from 347.
24+
-->
25+
<table>
26+
<column>
27+
<name>excluir347</name>
28+
<type>boolean</type>
29+
<default>false</default>
30+
</column>
31+
</table>

Extension/XMLView/EditCliente.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
* This file is part of FacturaScripts
4+
* Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as
8+
* published by the Free Software Foundation, either version 3 of the
9+
* License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*
19+
* @author Dainier Rojas Jiménez <danredjim.com>
20+
-->
21+
<view>
22+
<columns>
23+
<group name="comercial" title="commercial-terms" numcolumns="12">
24+
<column name="exclude-347" order="205" numcolumns="2">
25+
<widget type="select" fieldname="excluir347" translate="true" required="true">
26+
<values title="no">0</values>
27+
<values title="yes">1</values>
28+
</widget>
29+
</column>
30+
</group>
31+
</columns>
32+
</view>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
* This file is part of FacturaScripts
4+
* Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Lesser General Public License as
8+
* published by the Free Software Foundation, either version 3 of the
9+
* License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*
19+
* @author Dainier Rojas Jiménez <danredjim.com>
20+
-->
21+
<view>
22+
<columns>
23+
<group name="comercial" title="commercial-terms" numcolumns="12">
24+
<column name="exclude-347" order="205" numcolumns="2">
25+
<widget type="select" fieldname="excluir347" translate="true" required="true">
26+
<values title="no">0</values>
27+
<values title="yes">1</values>
28+
</widget>
29+
</column>
30+
</group>
31+
</columns>
32+
</view>

0 commit comments

Comments
 (0)