<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2017-2026 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 Jose Antonio Cuello Principal  <yopli2000@gmail.com>
 * @author Carlos García Gómez  <carlos@facturascripts.com>
-->
<view>
    <columns>
        <group name="default" valign="bottom" numcolumns="12">
            <column name="name" display="none" order="0">
                <widget type="text" fieldname="name" readonly="true" required="true"/>
            </column>
            <column name="country" numcolumns="3" order="100">
                <widget type="select" fieldname="codpais" onclick="EditPais" required="true">
                    <values source="paises" fieldcode="codpais" fieldtitle="nombre"/>
                </widget>
            </column>
            <column name="company" numcolumns="3" order="110">
                <widget type="select" fieldname="idempresa" onclick="EditEmpresa" required="true">
                    <values source="empresas" fieldcode="idempresa" fieldtitle="nombrecorto"/>
                </widget>
            </column>
            <column name="warehouse" numcolumns="3" order="120">
                <widget type="select" fieldname="codalmacen" parent="idempresa" onclick="EditAlmacen" required="true">
                    <values source="almacenes" fieldcode="codalmacen" fieldtitle="nombre" fieldfilter="idempresa"/>
                </widget>
            </column>
            <column name="fiscal-id" titleurl="EditSettings?activetab=EditIdentificadorFiscal" numcolumns="3"
                    order="130">
                <widget type="select" fieldname="tipoidfiscal" icon="fa-regular fa-id-card" required="true">
                    <values source="idsfiscales" fieldcode="tipoidfiscal" fieldtitle="tipoidfiscal"/>
                </widget>
            </column>
            <column name="serie" numcolumns="3" order="140">
                <widget type="select" fieldname="codserie" onclick="EditSerie" required="true">
                    <values/>
                </widget>
            </column>
            <column name="rectifying-serie" numcolumns="3" order="150">
                <widget type="select" fieldname="codserierec" onclick="EditSerie" required="true">
                    <values/>
                </widget>
            </column>
            <column name="currency" numcolumns="3" order="160">
                <widget type="select" fieldname="coddivisa" onclick="EditDivisa" required="true">
                    <values source="divisas" fieldcode="coddivisa" fieldtitle="descripcion"/>
                </widget>
            </column>
            <column name="payment-method" numcolumns="3" order="170">
                <widget type="select" fieldname="codpago" parent="idempresa" onclick="EditFormaPago" required="true">
                    <values source="formaspago" fieldcode="codpago" fieldtitle="descripcion" fieldfilter="idempresa"/>
                </widget>
            </column>
            <column name="tax" titleurl="ListImpuesto" numcolumns="3" order="180">
                <widget type="select" fieldname="codimpuesto" onclick="EditImpuesto">
                    <values source="impuestos" fieldcode="codimpuesto" fieldtitle="descripcion"/>
                </widget>
            </column>
            <column name="retention" titleurl="ListImpuesto?activetab=ListRetencion" numcolumns="3" order="190">
                <widget type="select" fieldname="codretencion" onclick="EditRetencion">
                    <values source="retenciones" fieldcode="codretencion" fieldtitle="descripcion"/>
                </widget>
            </column>
            <column name="validate-iban" order="210">
                <widget type="checkbox" fieldname="validate_iban"/>
            </column>
            <column name="vat-regime" numcolumns="3" order="220">
                <widget type="select" fieldname="regimeniva"/>
            </column>
        </group>
        <group name="numericformat" title="numeric-formats" icon="fa-solid fa-info-circle" numcolumns="12">
            <column name="decimals" description="control-panel-decimal-warning" numcolumns="3" order="100">
                <widget type="select" fieldname="decimals" icon="fa-solid fa-calculator" required="true">
                    <values start="0" end="6" step="1"/>
                </widget>
            </column>
            <column name="decimal-separator" numcolumns="3" order="110">
                <widget type="select" fieldname="decimal_separator" icon="fa-solid fa-calculator" required="true">
                    <values title=",">,</values>
                    <values title=".">.</values>
                </widget>
            </column>
            <column name="thousands-separator" numcolumns="3" order="120">
                <widget type="select" fieldname="thousands_separator" icon="fa-solid fa-calculator" required="true">
                    <values title=",">,</values>
                    <values title=".">.</values>
                    <values title=" "> </values>
                    <values title="_">_</values>
                </widget>
            </column>
            <column name="currency-position" numcolumns="3" order="130">
                <widget type="select" fieldname="currency_position" icon="fa-solid fa-money-bill-alt" required="true">
                    <values title="$ 123">left</values>
                    <values title="123 $">right</values>
                </widget>
            </column>
        </group>
        <group name="products" title="products" icon="fa-solid fa-cubes" valign="bottom" numcolumns="12">
            <column name="cost-price-policy" numcolumns="3" order="100">
                <widget type="select" fieldname="costpricepolicy" translate="true">
                    <values title="last-purchase-price">last-price</values>
                    <values title="average-purchase-price">average-price</values>
                    <values title="actual-cost-price">actual-price</values>
                    <values title="high-purchase-price">high-price</values>
                </widget>
            </column>
            <column name="update-supplier-prices" numcolumns="3" order="110">
                <widget type="checkbox" fieldname="updatesupplierprices"/>
            </column>
            <column name="allow-sale-without-stock-n" numcolumns="6" order="120">
                <widget type="checkbox" fieldname="ventasinstock"/>
            </column>
        </group>
        <group name="documents" title="documents" icon="fa-solid fa-copy" valign="bottom" numcolumns="12">
            <column name="tax-calculation-method" numcolumns="3" order="100">
                <widget type="select" fieldname="taxcalculationmethod" translate="true" required="true">
                    <values title="classic-tax-method">classic</values>
                    <values title="price-adjusted-tax-method">price-adjusted</values>
                </widget>
            </column>
            <column name="view-column-net-subtotal" numcolumns="3" order="110">
                <widget type="select" fieldname="columnetosubtotal" translate="true" required="true">
                    <values title="subtotal">subtotal</values>
                    <values title="net">neto</values>
                </widget>
            </column>
            <column name="days-until-expiration" numcolumns="3" order="120">
                <widget type="number" fieldname="finofertadays" min="0" required="true"/>
            </column>
            <column name="level-cost-sales" numcolumns="3" order="130">
                <widget type="number" fieldname="levelcostsales" min="0" max="99" decimal="0" step="1" required="true"/>
            </column>
            <column name="level-benefit-sales" numcolumns="3" order="140">
                <widget type="number" fieldname="levelbenefitsales" min="0" max="99" decimal="0" step="1" required="true"/>
            </column>
        </group>
        <group name="advanced" title="advanced" icon="fa-solid fa-database" valign="bottom" numcolumns="12">
            <column name="url" numcolumns="3" order="100">
                <widget type="link" fieldname="site_url"/>
            </column>
            <column name="homepage" numcolumns="3" order="110">
                <widget type="select" fieldname="homepage" icon="fa-solid fa-home">
                    <values source="pages" fieldcode="name" fieldtitle="name"/>
                </widget>
            </column>
            <column name="login-image" numcolumns="3" order="120">
                <widget type="library" fieldname="idloginimage" icon="fa-solid fa-image" onclick="EditAttachedFile" accept=".gif,.jpg,.png"/>
            </column>
            <column name="table-size" numcolumns="3" order="130">
                <widget type="select" fieldname="tablesize" icon="fa-solid fa-table" required="true" translate="true">
                    <values title="big">big</values>
                    <values title="small">small</values>
                </widget>
            </column>
            <column name="item-limit" numcolumns="3" order="140">
                <widget type="number" fieldname="item_limit" min="10" max="250" icon="fa-solid fa-list" required="true"/>
            </column>
            <column name="default-role" titleurl="ListUser?activetab=ListRole" numcolumns="3" order="150">
                <widget type="select" fieldname="codrole" onclick="EditRole" required="true" icon="fa-solid fa-users">
                    <values source="roles" fieldcode="codrole" fieldtitle="descripcion"/>
                </widget>
            </column>
            <column name="days-log-retention" numcolumns="3" order="160">
                <widget type="number" fieldname="days_log_retention" min="1" max="250" icon="fa-solid fa-calendar" required="true"/>
            </column>
            <column name="enable-api" order="170">
                <widget type="checkbox" fieldname="enable_api"/>
            </column>
            <column name="enable-updates-beta" order="180">
                <widget type="checkbox" fieldname="enableupdatesbeta"/>
            </column>
        </group>
    </columns>
</view>