<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2019-2024 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>
-->
<view>
    <columns>
        <group name="main" numcolumns="12">
            <column name="id" display="none" order="100">
                <widget type="text" fieldname="idrecibo"/>
            </column>
            <column name="supplier" order="110">
                <widget type="autocomplete" fieldname="codproveedor" onclick="EditProveedor" required="true"
                        readonly="dinamic">
                    <values source="proveedores" fieldcode="codproveedor" fieldtitle="nombre"/>
                </widget>
            </column>
            <column name="invoice" order="120">
                <widget type="autocomplete" fieldname="idfactura" onclick="EditFacturaProveedor" readonly="dinamic">
                    <values source="facturasprov" fieldcode="idfactura" fieldtitle="codigo"/>
                </widget>
            </column>
            <column name="number" order="130">
                <widget type="number" fieldname="numero" icon="fa-solid fa-hashtag" readonly="dinamic"/>
            </column>
            <column name="date" order="140">
                <widget type="date" fieldname="fecha"/>
            </column>
            <column name="expiration" order="150">
                <widget type="date" fieldname="vencimiento"/>
            </column>
            <column name="user" display="none" order="160">
                <widget type="select" fieldname="nick" readonly="true">
                    <values source="users" fieldcode="nick" fieldtitle="nick"/>
                </widget>
            </column>
            <column name="company" order="170">
                <widget type="select" fieldname="idempresa" onclick="EditEmpresa" readonly="dinamic" required="true">
                    <values source="empresas" fieldcode="idempresa" fieldtitle="nombrecorto"/>
                </widget>
            </column>
        </group>
        <group name="payment" valign="bottom" numcolumns="12">
            <column name="amount" order="100">
                <widget type="money" fieldname="importe"/>
            </column>
            <column name="currency" order="110">
                <widget type="select" fieldname="coddivisa" onclick="EditDivisa" required="true" readonly="dinamic">
                    <values source="divisas" fieldcode="coddivisa" fieldtitle="descripcion"/>
                </widget>
            </column>
            <column name="payment" title="method-payment" order="120">
                <widget type="select" fieldname="codpago" parent="idempresa" onclick="EditFormaPago" required="true">
                    <values source="formaspago" fieldcode="codpago" fieldtitle="descripcion" fieldfilter="idempresa"/>
                </widget>
            </column>
            <column name="paid" order="130">
                <widget type="checkbox" fieldname="pagado"/>
            </column>
            <column name="payment-date" order="140">
                <widget type="date" fieldname="fechapago" readonly="dinamic"/>
            </column>
            <column name="observations" numcolumns="12" order="150">
                <widget type="textarea" fieldname="observaciones"/>
            </column>
        </group>
    </columns>
</view>