<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2017-2023 Carlos Garcia Gomez <carlos@facturascripts.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Fco. Antonio Moreno Pérez <famphuelva@gmail.com>
 * @author Carlos García Gómez       <carlos@facturascripts.com>
-->
<view>
    <columns>
        <group name="main" numcolumns="12">
            <column name="reference" numcolumns="3" order="100">
                <widget type="text" fieldname="referencia" maxlength="30" icon="fa-solid fa-hashtag" readonly="dinamic"/>
            </column>
            <column name="manufacturer" titleurl="ListFabricante" order="110">
                <widget type="select" fieldname="codfabricante" onclick="EditFabricante">
                    <values source="fabricantes" fieldcode="codfabricante" fieldtitle="nombre"/>
                </widget>
            </column>
            <column name="family" titleurl="ListFamilia" order="120">
                <widget type="select" fieldname="codfamilia" onclick="EditFamilia">
                    <values source="familias" fieldcode="codfamilia" fieldtitle="descripcion"/>
                </widget>
            </column>
            <column name="tax" titleurl="ListImpuesto" order="130">
                <widget type="select" fieldname="codimpuesto" onclick="EditImpuesto">
                    <values source="impuestos" fieldcode="codimpuesto" fieldtitle="descripcion"/>
                </widget>
            </column>
            <column name="vat-exception" order="140">
                <widget type="select" fieldname="excepcioniva">
                    <values/>
                </widget>
            </column>
        </group>
        <group name="description" numcolumns="12">
            <column name="description" numcolumns="12" order="100">
                <widget type="textarea" fieldname="descripcion" required="true"/>
            </column>
            <column name="observations" numcolumns="12" order="110">
                <widget type="textarea" fieldname="observaciones"/>
            </column>
        </group>
        <group name="options" numcolumns="12" valign="bottom">
            <column name="nostock" title="no-stock" order="110">
                <widget type="checkbox" fieldname="nostock"/>
            </column>
            <column name="secompra" title="for-purchase" order="120">
                <widget type="checkbox" fieldname="secompra"/>
            </column>
            <column name="sevende" title="for-sale" order="130">
                <widget type="checkbox" fieldname="sevende"/>
            </column>
            <column name="ventasinstock" title="allow-sale-without-stock" order="140">
                <widget type="checkbox" fieldname="ventasinstock"/>
            </column>
            <column name="bloqueado" title="blocked" order="150">
                <widget type="checkbox" fieldname="bloqueado"/>
            </column>
            <column name="publico" title="public" numcolumns="1" order="160">
                <widget type="checkbox" fieldname="publico"/>
            </column>
        </group>
        <group name="advanced" numcolumns="12">
            <column name="stock" numcolumns="2" order="90">
                <widget type="number" fieldname="stockfis" readonly="true"/>
            </column>
            <column name="type" numcolumns="2" order="100">
                <widget type="select" fieldname="tipo">
                    <values/>
                </widget>
            </column>
            <column name="creation-date" numcolumns="2" order="200">
                <widget type="date" fieldname="fechaalta" readonly="true"/>
            </column>
            <column name="last-update" numcolumns="2" order="210">
                <widget type="datetime" fieldname="actualizado" readonly="true"/>
            </column>
        </group>
        <group name="accounting" title="accounting" numcolumns="12">
            <column name="codsubcuentacom" title="subaccount-purchases" titleurl="ListCuenta" description="optional"
                    numcolumns="2" order="100">
                <widget type="subcuenta" fieldname="codsubcuentacom"/>
            </column>
            <column name="codsubcuentaven" title="subaccount-sales" titleurl="ListCuenta" description="optional"
                    numcolumns="2" order="110">
                <widget type="subcuenta" fieldname="codsubcuentaven"/>
            </column>
            <column name="codsubcuentairpfcom" title="subaccount-irpf" titleurl="ListCuenta" description="optional"
                    display="none" numcolumns="2" order="120">
                <widget type="subcuenta" fieldname="codsubcuentairpfcom"/>
            </column>
        </group>
    </columns>
</view>