ソースを参照

[ADD] Widget cuenas a cobrar y a pagar

Rodney Elpidio Enciso Arias 7 年 前
コミット
8dbe2156bb

+ 6 - 0
data/charts_data.xml

@@ -43,5 +43,11 @@
         <record model="chart.list" id="chart_ChartIngresoEgreso">
             <field name="name">ChartIngresoEgreso</field>
         </record>
+        <record model="chart.list" id="chart_WidgetAccountReceivable">
+            <field name="name">WidgetAccountReceivable</field>
+        </record>
+        <record model="chart.list" id="chart_WidgetAccountToPay">
+            <field name="name">WidgetAccountToPay</field>
+        </record>
     </data>
 </openerp>

+ 6 - 6
static/src/css/dashboard.css

@@ -29,23 +29,23 @@
     color: #4caf50;
 }
 
-/*Gastos*/
+/*Orange*/
 
-.grid-stack-item-content.reporting-dashboard.expense {
+.grid-stack-item-content.reporting-dashboard.orange {
     color: #ef6c00;
     border-bottom: 3px solid #ef6c00;
 }
-.grid-stack-item-content.reporting-dashboard.expense > .widget-content > a {
+.grid-stack-item-content.reporting-dashboard.orange > .widget-content > a {
     color: #ef6c00;
 }
 
-/*Balance*/
+/*teal*/
 
-.grid-stack-item-content.reporting-dashboard.balance {
+.grid-stack-item-content.reporting-dashboard.teal {
     color:#009688;
     border-bottom: 3px solid #009688;
 }
-.grid-stack-item-content.reporting-dashboard.balance > .widget-content > a {
+.grid-stack-item-content.reporting-dashboard.teal > .widget-content > a {
     color: #009688;
 }
 

+ 44 - 22
static/src/js/dashboard.js

@@ -76,28 +76,6 @@ function dashboard_reporting_widget (instance, widget) {
                             self.grid.addWidget(wWidgetBalance.$el, 0, 0, wWidgetBalance.size.width,  wWidgetBalance.size.height, true);
                         }
 
-                        // *************************** Caja Efectivo
-                        var chart =  _.flatten(_.filter(ChartList,function (inv) {
-                            return inv.name == 'WidgetCash';
-                        }));
-                        if(chart.length > 0){
-                            var wWidgetCash = new widgets.WidgetCashWidget(self);
-                            wWidgetCash.renderElement();
-                            wWidgetCash.start();
-                            self.grid.addWidget(wWidgetCash.$el, 0, 0, wWidgetCash.size.width,  wWidgetCash.size.height, true);
-                        }
-
-                        // *************************** Caja Banco
-                        var chart =  _.flatten(_.filter(ChartList,function (inv) {
-                            return inv.name == 'WidgetBank';
-                        }));
-                        if(chart.length > 0){
-                            var wWidgetBank = new widgets.WidgetBankWidget(self);
-                            wWidgetBank.renderElement();
-                            wWidgetBank.start();
-                            self.grid.addWidget(wWidgetBank.$el, 0, 0, wWidgetBank.size.width,  wWidgetBank.size.height, true);
-                        }
-
                         // *************************** Ingreso Egreso
                         var chart =  _.flatten(_.filter(ChartList,function (inv) {
                             return inv.name == 'ChartIngresoEgreso';
@@ -174,6 +152,50 @@ function dashboard_reporting_widget (instance, widget) {
                             wChartPurchaseExpense.start();
                             self.grid.addWidget(wChartPurchaseExpense.$el, 0, 0, wChartPurchaseExpense.size.width,  wChartPurchaseExpense.size.height, true);
                         }
+
+                        // *************************** Caja Efectivo
+                        var chart =  _.flatten(_.filter(ChartList,function (inv) {
+                            return inv.name == 'WidgetCash';
+                        }));
+                        if(chart.length > 0){
+                            var wWidgetCash = new widgets.WidgetCashWidget(self);
+                            wWidgetCash.renderElement();
+                            wWidgetCash.start();
+                            self.grid.addWidget(wWidgetCash.$el, 0, 0, wWidgetCash.size.width,  wWidgetCash.size.height, true);
+                        }
+
+                        // *************************** Caja Banco
+                        var chart =  _.flatten(_.filter(ChartList,function (inv) {
+                            return inv.name == 'WidgetBank';
+                        }));
+                        if(chart.length > 0){
+                            var wWidgetBank = new widgets.WidgetBankWidget(self);
+                            wWidgetBank.renderElement();
+                            wWidgetBank.start();
+                            self.grid.addWidget(wWidgetBank.$el, 0, 0, wWidgetBank.size.width,  wWidgetBank.size.height, true);
+                        }
+
+                        // *************************** Cuentas a cobrar
+                        var chart =  _.flatten(_.filter(ChartList,function (inv) {
+                            return inv.name == 'WidgetAccountReceivable';
+                        }));
+                        if(chart.length > 0){
+                            var wWidgetAccountReceivable = new widgets.WidgetAccountReceivableWidget(self);
+                            wWidgetAccountReceivable.renderElement();
+                            wWidgetAccountReceivable.start();
+                            self.grid.addWidget(wWidgetAccountReceivable.$el, 0, 0, wWidgetAccountReceivable.size.width,  wWidgetAccountReceivable.size.height, true);
+                        }
+
+                        // *************************** Cuentas a pagar
+                        var chart =  _.flatten(_.filter(ChartList,function (inv) {
+                            return inv.name == 'WidgetAccountToPay';
+                        }));
+                        if(chart.length > 0){
+                            var wWidgetAccountToPay = new widgets.WidgetAccountToPayWidget(self);
+                            wWidgetAccountToPay.renderElement();
+                            wWidgetAccountToPay.start();
+                            self.grid.addWidget(wWidgetAccountToPay.$el, 0, 0, wWidgetAccountToPay.size.width,  wWidgetAccountToPay.size.height, true);
+                        }
                     });
                 });
             });

+ 2 - 0
static/src/js/main.js

@@ -25,6 +25,8 @@ openerp.eiru_reporting_dashboard = function (instance) {
         widget_balance(dashboard);
         widget_cash(dashboard);
         widget_bank(dashboard);
+        widget_account_receivable(dashboard);
+        widget_account_to_pay(dashboard);
     }catch(e){
         // error
     }

+ 21 - 0
static/src/js/widgets/chart_ingreso_egreso.js

@@ -263,7 +263,28 @@ function chart_ingreso_egreso (widget) {
                     title: {
                         display: true,
                     },
+                    tooltips: {
+                        mode: 'index',
+                        callbacks: {
+                            // Use the footer callback to display the sum of the items showing in the tooltip
+                            footer: function(tooltipItems, data) {
+                                var sum = 0;
+                                tooltipItems.forEach(function(tooltipItem) {
+                                    if(sum == 0){
+                                        sum = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];    
+                                    }else{
+                                        sum = sum - data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];
+                                    }
+                                    
+                                });
+                                return 'Balance  ' + accounting.formatNumber(sum,0,".",",");
+                            },
+                        },
+                        intersect: false,
+                        footerFontStyle: 'normal'
+                    },
                     hover: {
+                        // mode: 'nearest',
                         mode: 'nearest',
                         intersect: true
                     },

+ 190 - 0
static/src/js/widgets/widget_account_receivable.js

@@ -0,0 +1,190 @@
+function widget_account_receivable(widget) {
+    "use strict";
+
+    var model = openerp;
+
+    widget.WidgetAccountReceivableWidget = widget.Base.extend({
+        template: 'WidgetAccountReceivable',
+
+        events: {
+            'click .today': 'showToday',
+            'click .thisWeek': 'showThisWeek',
+            'click .expire': 'showExpire',
+        },
+
+        init: function (parent) {
+            this._super(parent, {
+                width: 3,
+                height: 2
+            });
+        },
+
+        start: function () {
+            var self = this;
+            self.fetchInitial();
+        },
+
+        fetchInitial: function(){
+            var self = this;
+            self.$el.find('#morosidad').block({
+                message: null,
+                overlayCSS: {
+                    backgroundColor: '#FAFAFA'
+                }
+            });
+            self.$el.find('.widget-content.widget-loading').css('display','flex');
+
+            self.fetchAccountMoveLine().then(function (AccountMoveLine) {
+                return AccountMoveLine;
+            }).then(function (AccountMoveLine) {
+                self.AccountMoveLine = _.filter(AccountMoveLine, function(item) {
+                    return item.amount_residual  > 0
+                });
+                return self.fetchAccountInvoice();
+            }).then(function(AccountInvoice) {
+                self.AccountInvoice = AccountInvoice;
+                return self.fetchResCompany();
+            }).then(function(ResCompany) {
+                self.ResCompany = ResCompany;
+                return self.fetchResCurrecy();
+            }).then(function(ResCurrecy) {
+                self.ResCurrecy = ResCurrecy;
+                return self.showExpire();
+            });
+        },
+
+        fetchAccountMoveLine: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id', 'partner_id', 'amount_residual', 'credit', 'debit', 'date_maturity', 'invoice','ref', 'invoice', 'amount_residual_currency', 'currency_id'];
+            var domain = [['credit', '<=', 0],['date_maturity', '!=', false]];
+            var AccountMoveLine = new model.web.Model('account.move.line');
+            AccountMoveLine.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        fetchAccountInvoice: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var ref = _.map(self.AccountMoveLine, function(map) {
+                return map.invoice[0];
+            });
+            var fields = ['id', 'currency_id', 'number', 'currency_id'];
+            var domain = [['id', 'in', ref]];
+            var AccountInvoice = new model.web.Model('account.invoice');
+            AccountInvoice.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+
+            return defer;
+        },
+
+        fetchResCompany: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name', 'currency_id'];
+            var domain = [['id', '=', 1]];
+            var ResCompany = new model.web.Model('res.company');
+            ResCompany.query(fields).filter(domain).all().then(function (results) {
+                defer.resolve(results);
+            });
+
+            return defer;
+        },
+
+        fetchResCurrecy : function(){
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name', 'symbol', 'rate_silent', 'base', 'decimal_separator', 'decimal_places', 'thousands_separator', 'symbol_position'];
+            var domain = [['active', '=', true]];
+            var ResCurrecy = new model.web.Model('res.currency');
+            ResCurrecy.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        getResCurrency: function (id) {
+            var self = this;
+            return _.filter(self.ResCurrecy,function (item) {
+                return item.id === id;
+            })
+        },
+
+        getTodayAccountMoveLive:function() {
+            var self = this;
+            var date = moment().format('YYYY-MM-DD');
+            return _.flatten(_.filter(self.AccountMoveLine,function (inv) {
+                return moment(inv.date_maturity).format('YYYY-MM-DD') === date;
+            }));
+        },
+
+        getThisWeekAccountMoveLive:function() {
+            var self = this;
+            var week = moment().week();
+            return _.flatten(_.filter(self.AccountMoveLine,function (inv) {
+                return moment(inv.date_maturity).week() === week & moment(inv.date_maturity).format('YYYY')=== moment().format('YYYY');
+            }));
+        },
+
+        getExpireAccountMoveLive:function() {
+            var self = this;
+            return _.flatten(_.filter(self.AccountMoveLine,function (inv) {
+                return moment(inv.date_maturity).format('YYYY-MM-DD') < moment().format('YYYY-MM-DD');
+            }));
+        },
+
+        showToday: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var MoveLine = self.getTodayAccountMoveLive();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(MoveLine.length > 0){
+                amount = _.reduce(_.map(MoveLine, function (map) {
+                    return map.amount_residual;
+                }), function (memo, num) {
+                    return memo + num;
+                });
+            }
+            self.$el.find('.widget-content.widget-loading').css('display','none');
+            self.$el.find('.widget-content').find('a').text(accounting.formatMoney(amount, CurrencyBase.symbol, CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator))
+        },
+
+        showThisWeek: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var MoveLine = self.getThisWeekAccountMoveLive();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(MoveLine.length > 0){
+                amount = _.reduce(_.map(MoveLine, function (map) {
+                    return map.amount_residual;
+                }), function (memo, num) {
+                    return memo + num;
+                });
+            }
+            self.$el.find('.widget-content.widget-loading').css('display','none');
+            self.$el.find('.widget-content').find('a').text(accounting.formatMoney(amount, CurrencyBase.symbol, CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator))
+        },
+
+        showExpire: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var MoveLine = self.getExpireAccountMoveLive();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(MoveLine.length > 0){
+                amount = _.reduce(_.map(MoveLine, function (map) {
+                    return map.amount_residual;
+                }), function (memo, num) {
+                    return memo + num;
+                });
+            }
+            self.$el.find('.widget-content.widget-loading').css('display','none');
+            self.$el.find('.widget-content').find('a').text(accounting.formatMoney(amount, CurrencyBase.symbol, CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator))
+        },
+    });
+}

+ 190 - 0
static/src/js/widgets/widget_account_to_pay.js

@@ -0,0 +1,190 @@
+function widget_account_to_pay(widget) {
+    "use strict";
+
+    var model = openerp;
+
+    widget.WidgetAccountToPayWidget = widget.Base.extend({
+        template: 'WidgetAccountToPay',
+
+        events: {
+            'click .today': 'showToday',
+            'click .thisWeek': 'showThisWeek',
+            'click .expire': 'showExpire',
+        },
+
+        init: function (parent) {
+            this._super(parent, {
+                width: 3,
+                height: 2
+            });
+        },
+
+        start: function () {
+            var self = this;
+            self.fetchInitial();
+        },
+
+        fetchInitial: function(){
+            var self = this;
+            self.$el.find('#morosidad').block({
+                message: null,
+                overlayCSS: {
+                    backgroundColor: '#FAFAFA'
+                }
+            });
+            self.$el.find('.widget-content.widget-loading').css('display','flex');
+
+            self.fetchAccountMoveLine().then(function (AccountMoveLine) {
+                return AccountMoveLine;
+            }).then(function (AccountMoveLine) {
+                self.AccountMoveLine = _.filter(AccountMoveLine, function(item) {
+                    return item.amount_residual  > 0
+                });
+                return self.fetchAccountInvoice();
+            }).then(function(AccountInvoice) {
+                self.AccountInvoice = AccountInvoice;
+                return self.fetchResCompany();
+            }).then(function(ResCompany) {
+                self.ResCompany = ResCompany;
+                return self.fetchResCurrecy();
+            }).then(function(ResCurrecy) {
+                self.ResCurrecy = ResCurrecy;
+                return self.showExpire();
+            });
+        },
+
+        fetchAccountMoveLine: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id', 'partner_id', 'amount_residual', 'credit', 'debit', 'date_maturity', 'invoice','ref', 'invoice', 'amount_residual_currency', 'currency_id'];
+            var domain = [['debit', '<=', 0],['date_maturity', '!=', false]];
+            var AccountMoveLine = new model.web.Model('account.move.line');
+            AccountMoveLine.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        fetchAccountInvoice: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var ref = _.map(self.AccountMoveLine, function(map) {
+                return map.invoice[0];
+            });
+            var fields = ['id', 'currency_id', 'number', 'currency_id'];
+            var domain = [['id', 'in', ref]];
+            var AccountInvoice = new model.web.Model('account.invoice');
+            AccountInvoice.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+
+            return defer;
+        },
+
+        fetchResCompany: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name', 'currency_id'];
+            var domain = [['id', '=', 1]];
+            var ResCompany = new model.web.Model('res.company');
+            ResCompany.query(fields).filter(domain).all().then(function (results) {
+                defer.resolve(results);
+            });
+
+            return defer;
+        },
+
+        fetchResCurrecy : function(){
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name', 'symbol', 'rate_silent', 'base', 'decimal_separator', 'decimal_places', 'thousands_separator', 'symbol_position'];
+            var domain = [['active', '=', true]];
+            var ResCurrecy = new model.web.Model('res.currency');
+            ResCurrecy.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        getResCurrency: function (id) {
+            var self = this;
+            return _.filter(self.ResCurrecy,function (item) {
+                return item.id === id;
+            })
+        },
+
+        getTodayAccountMoveLive:function() {
+            var self = this;
+            var date = moment().format('YYYY-MM-DD');
+            return _.flatten(_.filter(self.AccountMoveLine,function (inv) {
+                return moment(inv.date_maturity).format('YYYY-MM-DD') === date;
+            }));
+        },
+
+        getThisWeekAccountMoveLive:function() {
+            var self = this;
+            var week = moment().week();
+            return _.flatten(_.filter(self.AccountMoveLine,function (inv) {
+                return moment(inv.date_maturity).week() === week & moment(inv.date_maturity).format('YYYY')=== moment().format('YYYY');
+            }));
+        },
+
+        getExpireAccountMoveLive:function() {
+            var self = this;
+            return _.flatten(_.filter(self.AccountMoveLine,function (inv) {
+                return moment(inv.date_maturity).format('YYYY-MM-DD') < moment().format('YYYY-MM-DD');
+            }));
+        },
+
+        showToday: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var MoveLine = self.getTodayAccountMoveLive();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(MoveLine.length > 0){
+                amount = _.reduce(_.map(MoveLine, function (map) {
+                    return map.amount_residual;
+                }), function (memo, num) {
+                    return memo + num;
+                });
+            }
+            self.$el.find('.widget-content.widget-loading').css('display','none');
+            self.$el.find('.widget-content').find('a').text(accounting.formatMoney(amount, CurrencyBase.symbol, CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator))
+        },
+
+        showThisWeek: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var MoveLine = self.getThisWeekAccountMoveLive();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(MoveLine.length > 0){
+                amount = _.reduce(_.map(MoveLine, function (map) {
+                    return map.amount_residual;
+                }), function (memo, num) {
+                    return memo + num;
+                });
+            }
+            self.$el.find('.widget-content.widget-loading').css('display','none');
+            self.$el.find('.widget-content').find('a').text(accounting.formatMoney(amount, CurrencyBase.symbol, CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator))
+        },
+
+        showExpire: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var MoveLine = self.getExpireAccountMoveLive();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(MoveLine.length > 0){
+                amount = _.reduce(_.map(MoveLine, function (map) {
+                    return map.amount_residual;
+                }), function (memo, num) {
+                    return memo + num;
+                });
+            }
+            self.$el.find('.widget-content.widget-loading').css('display','none');
+            self.$el.find('.widget-content').find('a').text(accounting.formatMoney(amount, CurrencyBase.symbol, CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator))
+        },
+    });
+}

+ 38 - 0
static/src/xml/widgets/widget_account_receivable.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template xml:space="preserve">
+    <t t-name="WidgetAccountReceivable">
+        <div>
+            <div class="grid-stack-item-content reporting-dashboard">
+                <h2 class="widget-title">
+                    <div class="row">
+                        <div class="col-xs-6">
+                           <i class="fa fa-money" aria-hidden="true"> </i>
+                            A Cobrar
+                        </div>
+                        <div class="col-xs-6">
+                            <div class="col-xs-6 col-xs-offset-9">
+                                <div class="btn-group btn-group-xs">
+                                    <a type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+                                    <span class="caret"></span>
+                                    <span class="sr-only">Toggle Dropdown</span>
+                                    </a>
+                                    <ul class="dropdown-menu dropdown-menu-right">
+                                        <li><a class="today">Hoy</a></li>
+                                        <li><a class="thisWeek">Esta Semana</a></li>
+                                        <li><a class="expire">Vencidos</a></li>
+                                    </ul>
+                                </div>
+                            </div>  
+                        </div>
+                    </div>
+                </h2>
+                <div class="widget-content">
+                    <a></a>
+                </div>
+                <div class="widget-content widget-loading">
+                    <i class='fa fa-cog fa-spin fa-3x fa-fw'></i>
+                </div>
+            </div>
+        </div>
+    </t>
+</template>

+ 38 - 0
static/src/xml/widgets/widget_account_to_pay.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template xml:space="preserve">
+    <t t-name="WidgetAccountToPay">
+        <div>
+            <div class="grid-stack-item-content reporting-dashboard orange">
+                <h2 class="widget-title">
+                    <div class="row">
+                        <div class="col-xs-6">
+                           <i class="fa fa-money" aria-hidden="true"> </i>
+                            A Pagar
+                        </div>
+                        <div class="col-xs-6">
+                            <div class="col-xs-6 col-xs-offset-9">
+                                <div class="btn-group btn-group-xs">
+                                    <a type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+                                    <span class="caret"></span>
+                                    <span class="sr-only">Toggle Dropdown</span>
+                                    </a>
+                                    <ul class="dropdown-menu dropdown-menu-right">
+                                        <li><a class="today">Hoy</a></li>
+                                        <li><a class="thisWeek">Esta Semana</a></li>
+                                        <li><a class="expire">Vencidos</a></li>
+                                    </ul>
+                                </div>
+                            </div>  
+                        </div>
+                    </div>
+                </h2>
+                <div class="widget-content">
+                    <a></a>
+                </div>
+                <div class="widget-content widget-loading">
+                    <i class='fa fa-cog fa-spin fa-3x fa-fw'></i>
+                </div>
+            </div>
+        </div>
+    </t>
+</template>

+ 1 - 1
static/src/xml/widgets/widget_balance.xml

@@ -2,7 +2,7 @@
 <template xml:space="preserve">
     <t t-name="WidgetBalance">
         <div>
-            <div class="grid-stack-item-content reporting-dashboard balance">
+            <div class="grid-stack-item-content reporting-dashboard teal">
                 <h2 class="widget-title">
                     <div class="row">
                         <div class="col-xs-6">

+ 1 - 1
static/src/xml/widgets/widget_bank.xml

@@ -2,7 +2,7 @@
 <template xml:space="preserve">
     <t t-name="WidgetBank">
         <div>
-            <div class="grid-stack-item-content reporting-dashboard">
+            <div class="grid-stack-item-content reporting-dashboard teal">
                 <h2 class="widget-title">
                     <div class="row">
                         <div class="col-xs-6">

+ 1 - 1
static/src/xml/widgets/widget_cash.xml

@@ -2,7 +2,7 @@
 <template xml:space="preserve">
     <t t-name="WidgetCash">
         <div>
-            <div class="grid-stack-item-content reporting-dashboard">
+            <div class="grid-stack-item-content reporting-dashboard teal">
                 <h2 class="widget-title">
                     <div class="row">
                         <div class="col-xs-6">

+ 1 - 1
static/src/xml/widgets/widget_expense.xml

@@ -2,7 +2,7 @@
 <template xml:space="preserve">
     <t t-name="WidgetExpense">
         <div>
-            <div class="grid-stack-item-content reporting-dashboard expense">
+            <div class="grid-stack-item-content reporting-dashboard orange">
                 <h2 class="widget-title">
                     <div class="row">
                         <div class="col-xs-6">

+ 2 - 0
templates.xml

@@ -28,6 +28,8 @@
                 <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/widgets/widget_cash.js" />
                 <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/widgets/widget_bank.js" />
                 <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/widgets/chart_ingreso_egreso.js" />
+                <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/widgets/widget_account_receivable.js" />
+                <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/widgets/widget_account_to_pay.js" />
 
                 <!-- Dashboard Main  -->
                 <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/dashboard.js" />