{#
    /**
     * This file is part of FacturaScripts
     * Copyright (C) 2017-2019 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/.
     */
#}
{% extends "Master/GridView.html.twig" %}

{% set showBalanceGraphic = fsc.showBalanceGraphic() %}

{% block gridcard %}
    {# Grid data panel #}
    <div class="col-{% if showBalanceGraphic %}9{% else %}12{% endif %} mr-2">
        <div class="card shadow">
            <div class="card-header">
                <span><small id="account-description"></small></span>
                <span class="float-right"><small><strong>{{ i18n.trans('unbalance') }}:&nbsp;<span id="unbalance">0.00</span></strong></small></span>
            </div>
            <div class="card-body p-0">
                <div id="document-lines"></div>
            </div>
        </div>
    </div>
    {% if showBalanceGraphic %}
    {# Graphic panel #}
    <script src="node_modules/chart.js/dist/Chart.min.js"></script>
    <div class="col">
        <div class="card shadow h-100">
            <div class="card-header">
                <small><strong>{{ i18n.trans('account-balance') }}:&nbsp;<span id="account-balance">0.00</span></strong></small>
            </div>
            {# Graphic Subaccount Balance panel #}
            <div class="card-body p-0">
                <canvas id="detail-balance" class="w-100"></canvas>
            </div>
        </div>
    </div>
    {% endif %}
{% endblock %}
