<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2017-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 Artex Trading sa     <jcuello@artextrading.com>
-->
<view>
    <columns>
        <column name="code" display="none" order="100">
            <widget type="text" fieldname="idproducto"/>
        </column>
        <column name="reference" order="110">
            <widget type="text" fieldname="referencia"/>
        </column>
        <column name="description" order="120">
            <widget type="textarea" fieldname="descripcion"/>
        </column>
        <column name="observations" display="none" order="130">
            <widget type="textarea" fieldname="observaciones"/>
        </column>
        <column name="manufacturer" order="140">
            <widget type="autocomplete" fieldname="codfabricante">
                <values source="fabricantes" fieldcode="codfabricante" fieldtitle="nombre"/>
            </widget>
        </column>
        <column name="family" order="150">
            <widget type="autocomplete" fieldname="codfamilia">
                <values source="familias" fieldcode="codfamilia" fieldtitle="descripcion"/>
            </widget>
        </column>
        <column name="secompra" title="for-purchase" display="none" order="160">
            <widget type="checkbox" fieldname="secompra"/>
        </column>
        <column name="sevende" title="for-sale" display="none" order="170">
            <widget type="checkbox" fieldname="sevende"/>
        </column>
        <column name="publico" title="public" display="none" order="180">
            <widget type="checkbox" fieldname="publico"/>
        </column>
        <column name="bloqueado" title="blocked" display="none" order="190">
            <widget type="checkbox" fieldname="bloqueado"/>
        </column>
        <column name="ventasinstock" title="allow-sale-without-stock" display="none" order="200">
            <widget type="checkbox" fieldname="ventasinstock"/>
        </column>
        <column name="price" display="right" order="210">
            <widget type="money" fieldname="precio"/>
        </column>
        <column name="tax" display="none" order="220">
            <widget type="select" fieldname="codimpuesto">
                <values source="impuestos" fieldcode="codimpuesto" fieldtitle="descripcion"/>
            </widget>
        </column>
        <column name="price-with-tax" display="right" order="225">
            <widget type="money" fieldname="precio_iva"/>
        </column>
        <column name="stock" display="right" order="230">
            <widget type="number" fieldname="stockfis"/>
        </column>
        <column name="subaccount-purchases" display="none" order="240">
            <widget type="text" fieldname="codsubcuentacom"/>
        </column>
        <column name="subaccount-irpf" display="none" order="250">
            <widget type="text" fieldname="codsubcuentairpfcom"/>
        </column>
        <column name="subaccount-sales" display="none" order="260">
            <widget type="text" fieldname="codsubcuentaven"/>
        </column>
        <column name="creation-date" display="none" order="270">
            <widget type="text" fieldname="fechaalta"/>
        </column>
        <column name="update-time" display="none" order="280">
            <widget type="datetime" fieldname="actualizado"/>
        </column>
    </columns>
    <rows>
        <row type="status">
            <option color="danger" title="locked" fieldname="bloqueado">1</option>
            <option color="info" title="no-stock" fieldname="nostock">1</option>
            <option color="warning" title="out-of-stock" fieldname="stockfis">lte:0</option>
            <option color="success" title="in-stock" fieldname="stockfis">gt:0</option>
        </row>
    </rows>
</view>