<?xml version="1.0" encoding="UTF-8"?>
<!--
 * This file is part of FacturaScripts
 * Copyright (C) 2017-2025 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 PC REDNET S.L.       <luismi@pcrednet.com>
-->
<view>
    <columns>
        <column name="reference" order="100">
            <widget type="text" fieldname="referencia"/>
        </column>
        <column name="description" order="105">
            <widget type="textarea" fieldname="descripcion"/>
        </column>
        <column name="warehouse" order="110">
            <widget type="select" fieldname="codalmacen">
                <values source="almacenes" fieldcode="codalmacen" fieldtitle="nombre"/>
            </widget>
        </column>
        <column name="location" order="115">
            <widget type="text" fieldname="ubicacion"/>
        </column>
        <column name="quantity" display="right" order="120">
            <widget type="number" fieldname="cantidad"/>
        </column>
        <column name="stockmin" display="right" order="130">
            <widget type="number" fieldname="stockmin"/>
        </column>
        <column name="stockmax" display="right" order="140">
            <widget type="number" fieldname="stockmax"/>
        </column>
        <column name="reserved" display="right" order="150">
            <widget type="number" fieldname="reservada"/>
        </column>
        <column name="pending-reception" display="right" order="160">
            <widget type="number" fieldname="pterecibir"/>
        </column>
        <column name="available" display="right" order="170">
            <widget type="number" fieldname="disponible"/>
        </column>
    </columns>
    <rows>
        <row type="status">
            <option color="danger" fieldname="disponible" title="out-of-stock">lt:field:stockmin</option>
            <option color="warning" fieldname="disponible" title="minimum-stock-reached">field:stockmin</option>
            <option color="success" fieldname="disponible" title="in-stock">gt:field:stockmin</option>
        </row>
    </rows>
</view>
