<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2017-2020 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 Artex Trading sa     <jcuello@artextrading.com>
-->
<view>
    <columns>
        <column name="code" order="100">
            <widget type="text" fieldname="codcliente" onclick="EditCliente"/>
        </column>
        <column name="name" order="110">
            <widget type="text" fieldname="nombre"/>
        </column>
        <column name="business-name" display="none" order="120">
            <widget type="text" fieldname="razonsocial"/>
        </column>
        <column name="fiscal-id" display="none" order="130">
            <widget type="text" fieldname="tipoidfiscal"/>
        </column>
        <column name="fiscal-number" order="140">
            <widget type="text" fieldname="cifnif"/>
        </column>
        <column name="email" order="150">
            <widget type="text" fieldname="email"/>
        </column>
        <column name="phone" order="160">
            <widget type="text" fieldname="telefono1"/>
        </column>
        <column name="phone2" display="none" order="170">
            <widget type="text" fieldname="telefono2"/>
        </column>
        <column name="rate" display="none" order="175">
            <widget type="select" fieldname="codtarifa" onclick="EditTarifa">
                <values source="tarifas" fieldcode="codtarifa" fieldtitle="nombre"/>
            </widget>
        </column>
        <column name="group" order="180">
            <widget type="select" fieldname="codgrupo" onclick="EditGrupoClientes">
                <values source="gruposclientes" fieldcode="codgrupo" fieldtitle="nombre"/>
            </widget>
        </column>
        <column name="observations" order="190">
            <widget type="textarea" fieldname="observaciones"/>
        </column>
        <column name="current-risk" display="none" order="200">
            <widget type="money" fieldname="riesgoalcanzado"/>
        </column>
        <column name="max-risk" display="none" order="210">
            <widget type="money" fieldname="riesgomax"/>
        </column>
        <column name="subaccount" display="none" order="220">
            <widget type="text" fieldname="codsubcuenta"/>
        </column>
        <column name="vat-regime" display="none" order="230">
            <widget type="text" fieldname="regimeniva"/>
        </column>
        <column name="retention" display="none" order="240">
            <widget type="select" fieldname="codretencion" onclick="EditRetencion">
                <values source="retenciones" fieldcode="codretencion" fieldtitle="descripcion"/>
            </widget>
        </column>
        <column name="blocked" display="none" order="250">
            <widget type="checkbox" fieldname="debaja"/>
        </column>
        <column name="creation-date" display="none" order="260">
            <widget type="text" fieldname="fechaalta"/>
        </column>
        <column name="block-date" display="none" order="270">
            <widget type="text" fieldname="fechabaja"/>
        </column>
    </columns>
    <modals>
        <group name="setcustomerrate" title="add" icon="fa-solid fa-folder-plus">
            <column name="setcustomerrate" title="customer" order="100">
                <widget type="autocomplete" fieldname="setcustomerrate" required="true">
                    <values source="clientes" fieldcode="codcliente" fieldtitle="nombre"/>
                </widget>
            </column>
        </group>
    </modals>
    <rows>
        <row type="status">
            <option color="danger" title="suspended" fieldname="debaja">1</option>
            <option color="warning" title="risky-customer" fieldname="riesgomax">gt:0</option>
        </row>
    </rows>
</view>
