<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2019-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 Carlos García Gómez          <carlos@facturascripts.com>
 * @author Cristo M. Estévez Hernández  <cristom.estevez@gmail.com>
-->
<view>
    <columns>
        <group name="data" numcolumns="12">
            <column name="id" display="none" order="100">
                <widget type="text" fieldname="idsecuencia" readonly="dinamic"/>
            </column>
            <column name="doc-type" order="110">
                <widget type="select" fieldname="tipodoc" translate="true" required="true">
                    <values title="customer-estimation">PresupuestoCliente</values>
                    <values title="customer-order">PedidoCliente</values>
                    <values title="customer-delivery-note">AlbaranCliente</values>
                    <values title="customer-invoice">FacturaCliente</values>
                    <values title="supplier-estimation">PresupuestoProveedor</values>
                    <values title="supplier-order">PedidoProveedor</values>
                    <values title="supplier-delivery-note">AlbaranProveedor</values>
                    <values title="supplier-invoice">FacturaProveedor</values>
                </widget>
            </column>
            <column name="company" titleurl="ListEmpresa" order="120">
                <widget type="select" fieldname="idempresa" icon="fa-solid fa-building" onclick="EditEmpresa" required="true">
                    <values source="empresas" fieldcode="idempresa" fieldtitle="nombrecorto"/>
                </widget>
            </column>
            <column name="exercise" titleurl="ListEjercicio" order="130">
                <widget type="select" fieldname="codejercicio" parent="idempresa" onclick="EditEjercicio">
                    <values source="ejercicios" fieldcode="codejercicio" fieldtitle="nombre" fieldfilter="idempresa"/>
                </widget>
            </column>
            <column name="serie" titleurl="ListSerie" order="140">
                <widget type="select" fieldname="codserie" onclick="EditSerie" required="true">
                    <values source="series" fieldcode="codserie" fieldtitle="descripcion"/>
                </widget>
            </column>
        </group>
        <group name="number" valign="bottom" numcolumns="12">
            <column name="number" numcolumns="2" order="100">
                <widget type="number" fieldname="numero" decimal="0" min="1" required="true"/>
            </column>
            <column name="number-length" numcolumns="2" order="110">
                <widget type="number" fieldname="longnumero" decimal="0" min="1" required="true"/>
            </column>
            <column name="initial-number" numcolumns="2" order="120">
                <widget type="number" fieldname="inicio" decimal="0" min="1" required="true"/>
            </column>
            <column name="use-gaps" numcolumns="2" order="130">
                <widget type="checkbox" fieldname="usarhuecos"/>
            </column>
            <column name="pattern" order="140">
                <widget type="text" fieldname="patron" maxlength="50" required="true"/>
            </column>
        </group>
    </columns>
</view>
