<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2020-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 Carlos García Gómez  <carlos@facturascripts.com>
-->
<view>
    <columns>
        <column name="reference" order="100">
            <widget type="string" fieldname="referencia"/>
        </column>
        <column name="description" order="110">
            <widget type="textarea" fieldname="descripcion"/>
        </column>
        <column name="warehouse" order="120">
            <widget type="select" fieldname="codalmacen" onclick="EditAlmacen" required="true">
                <values source="almacenes" fieldcode="codalmacen" fieldtitle="nombre"/>
            </widget>
        </column>
        <column name="manufacturer" order="130">
            <widget type="autocomplete" fieldname="codfabricante" onclick="EditFabricante">
                <values source="fabricantes" fieldcode="codfabricante" fieldtitle="nombre"/>
            </widget>
        </column>
        <column name="family" order="140">
            <widget type="autocomplete" fieldname="codfamilia" onclick="EditFamilia">
                <values source="familias" fieldcode="codfamilia" fieldtitle="descripcion"/>
            </widget>
        </column>
        <column name="stock" display="right" order="150">
            <widget type="number" fieldname="stockfis"/>
        </column>
        <column name="purchased-quantity" display="right" order="160">
            <widget type="number" fieldname="cantidad"/>
        </column>
        <column name="unit-purchase-price" display="right" order="170">
            <widget type="money" fieldname="avgcoste" totals="false"/>
        </column>
        <column name="cost-price" display="right" order="180">
            <widget type="money" fieldname="coste" totals="false"/>
        </column>
        <column name="price" display="right" order="190">
            <widget type="money" fieldname="precio" totals="false"/>
        </column>
    </columns>
    <rows>
        <row type="status">
            <option color="warning" fieldname="descripcion" title="empty-ref-or-missing">null:</option>
        </row>
    </rows>
</view>