<?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 Garcia Gomez <carlos@facturascripts.com>
-->
<view>
    <columns>
        <column name="code" display="none" order="80">
            <widget type="text" fieldname="idvariante"/>
        </column>
        <column name="product" display="none" order="90">
            <widget type="text" fieldname="idproducto" onclick="EditProducto"/>
        </column>
        <column name="reference" order="100">
            <widget type="text" fieldname="referencia"/>
        </column>
        <column name="description" order="105">
            <widget type="textarea" fieldname="descripcion"/>
        </column>
        <column name="barcode" order="110">
            <widget type="text" fieldname="codbarras"/>
        </column>
        <column name="attribute-value-1" order="120">
            <widget type="select" fieldname="idatributovalor1">
                <values source="atributos_valores" fieldcode="id" fieldtitle="descripcion"/>
            </widget>
        </column>
        <column name="attribute-value-2" order="130">
            <widget type="select" fieldname="idatributovalor2">
                <values source="atributos_valores" fieldcode="id" fieldtitle="descripcion"/>
            </widget>
        </column>
        <column name="attribute-value-3" display="none" order="140">
            <widget type="select" fieldname="idatributovalor3">
                <values source="atributos_valores" fieldcode="id" fieldtitle="descripcion"/>
            </widget>
        </column>
        <column name="attribute-value-4" display="none" order="141">
            <widget type="select" fieldname="idatributovalor4">
                <values source="atributos_valores" fieldcode="id" fieldtitle="descripcion"/>
            </widget>
        </column>
        <column name="cost-price" display="none" order="150">
            <widget type="money" fieldname="coste"/>
        </column>
        <column name="margin" display="none" order="160">
            <widget type="percentage" fieldname="margen"/>
        </column>
        <column name="price" display="right" order="170">
            <widget type="money" fieldname="precio"/>
        </column>
        <column name="price-with-tax" display="right" order="180">
            <widget type="money" fieldname="precio_iva"/>
        </column>
        <column name="stock" display="right" order="190">
            <widget type="number" fieldname="stockfis"/>
        </column>
    </columns>
    <rows>
        <row type="status">
            <option color="warning" fieldname="stockfis" title="out-of-stock">lte:0</option>
            <option color="success" fieldname="stockfis" title="in-stock">gt:0</option>
        </row>
    </rows>
</view>