<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2017-2022 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 Raul Jimenez         <raul.jimenez@nazcanetworks.com>
 * @author Carlos García Gómez  <carlos@facturascripts.com>
-->
<view>
    <columns>
        <column name="id" display="none" order="100">
            <widget type="text" fieldname="idlinea"/>
        </column>
        <column name="code" order="110">
            <widget type="autocomplete" fieldname="idfactura" onclick="EditFacturaProveedor">
                <values source="facturasprov" fieldcode="idfactura" fieldtitle="codigo"/>
            </widget>
        </column>
        <column name="product" order="120">
            <widget type="autocomplete" fieldname="idproducto" onclick="EditProducto">
                <values source="productos" fieldcode="idproducto" fieldtitle="referencia"/>
            </widget>
        </column>
        <column name="reference" order="130">
            <widget type="text" fieldname="referencia"/>
        </column>
        <column name="description" order="140">
            <widget type="textarea" fieldname="descripcion"/>
        </column>
        <column name="quantity" display="right" order="150">
            <widget type="number" fieldname="cantidad"/>
        </column>
        <column name="quantity-served" display="none" order="160">
            <widget type="number" fieldname="servido"/>
        </column>
        <column name="price" display="right" order="170">
            <widget type="money" fieldname="pvpunitario"/>
        </column>
        <column name="dto" display="right" order="180">
            <widget type="percentage" fieldname="dtopor"/>
        </column>
        <column name="dto-2" display="none" order="190">
            <widget type="percentage" fieldname="dtopor2"/>
        </column>
        <column name="amount-without-discount" display="none" order="200">
            <widget type="money" fieldname="pvpsindto"/>
        </column>
        <column name="net" display="right" order="210">
            <widget type="money" fieldname="pvptotal">
                <option color="danger">lt:0</option>
            </widget>
        </column>
        <column name="tax" display="right" order="220">
            <widget type="percentage" fieldname="iva"/>
        </column>
        <column name="surcharge" display="none" order="230">
            <widget type="percentage" fieldname="recargo"/>
        </column>
        <column name="irpf" display="none" order="240">
            <widget type="percentage" fieldname="irpf"/>
        </column>
        <column name="supplied" display="none" order="250">
            <widget type="checkbox" fieldname="suplido"/>
        </column>
    </columns>
    <rows>
        <row type="status">
            <option color="warning" fieldname="actualizastock" title="book">-2</option>
            <option color="danger" fieldname="actualizastock" title="subtract">-1</option>
            <option color="success" fieldname="actualizastock" title="add">1</option>
            <option color="info" fieldname="actualizastock" title="foresee">2</option>
        </row>
    </rows>
</view>
