Jelajahi Sumber

[ADD] widget de Efectivo y banco

Rodney Elpidio Enciso Arias 7 tahun lalu
induk
melakukan
ba32e7fbf2

+ 6 - 0
data/charts_data.xml

@@ -34,5 +34,11 @@
         <record model="chart.list" id="widget_WidgetPurchase">
             <field name="name">WidgetPurchase</field>
         </record>
+        <record model="chart.list" id="widget_WidgetCash">
+            <field name="name">WidgetCash</field>
+        </record>
+        <record model="chart.list" id="widget_WidgetBank">
+            <field name="name">WidgetBank</field>
+        </record>
     </data>
 </openerp>

+ 57 - 9
static/src/js/dashboard.js

@@ -51,14 +51,14 @@ function dashboard_reporting_widget (instance, widget) {
             
             // *************************** Compras
             var wWidgetPurchase = new widgets.WidgetPurchaseWidget(self);
-            wWidgetPosOrder.fetchCurrentUser().then(function(CurrentUser){
+            wWidgetPurchase.fetchCurrentUser().then(function(CurrentUser){
                 return CurrentUser;
             }).then(function(CurrentUser){
-                wWidgetPosOrder.fetchResUser(CurrentUser).then(function(chart_ids){
+                wWidgetPurchase.fetchResUser(CurrentUser).then(function(chart_ids){
                     return chart_ids;
                 }).then(function(chart_ids){
                     var charts = chart_ids[0].chart_ids;
-                    wWidgetPosOrder.fetchChartList(charts).then(function(ChartList){
+                    wWidgetPurchase.fetchChartList(charts).then(function(ChartList){
                         return ChartList;
                     }).then(function(ChartList){
                         var chart =  _.flatten(_.filter(ChartList,function (inv) {
@@ -75,14 +75,14 @@ function dashboard_reporting_widget (instance, widget) {
             
             // *************************** Gastos
             var wWidgetExpense = new widgets.WidgetExpenseWidget(self);
-            wWidgetPosOrder.fetchCurrentUser().then(function(CurrentUser){
+            wWidgetExpense.fetchCurrentUser().then(function(CurrentUser){
                 return CurrentUser;
             }).then(function(CurrentUser){
-                wWidgetPosOrder.fetchResUser(CurrentUser).then(function(chart_ids){
+                wWidgetExpense.fetchResUser(CurrentUser).then(function(chart_ids){
                     return chart_ids;
                 }).then(function(chart_ids){
                     var charts = chart_ids[0].chart_ids;
-                    wWidgetPosOrder.fetchChartList(charts).then(function(ChartList){
+                    wWidgetExpense.fetchChartList(charts).then(function(ChartList){
                         return ChartList;
                     }).then(function(ChartList){
                         var chart =  _.flatten(_.filter(ChartList,function (inv) {
@@ -100,14 +100,14 @@ function dashboard_reporting_widget (instance, widget) {
 
             // *************************** Balance
             var wWidgetBalance = new widgets.WidgetBalanceWidget(self);
-            wWidgetPosOrder.fetchCurrentUser().then(function(CurrentUser){
+            wWidgetBalance.fetchCurrentUser().then(function(CurrentUser){
                 return CurrentUser;
             }).then(function(CurrentUser){
-                wWidgetPosOrder.fetchResUser(CurrentUser).then(function(chart_ids){
+                wWidgetBalance.fetchResUser(CurrentUser).then(function(chart_ids){
                     return chart_ids;
                 }).then(function(chart_ids){
                     var charts = chart_ids[0].chart_ids;
-                    wWidgetPosOrder.fetchChartList(charts).then(function(ChartList){
+                    wWidgetBalance.fetchChartList(charts).then(function(ChartList){
                         return ChartList;
                     }).then(function(ChartList){
                         var chart =  _.flatten(_.filter(ChartList,function (inv) {
@@ -122,6 +122,54 @@ function dashboard_reporting_widget (instance, widget) {
                 });
             });
 
+            // *************************** Caja Efectivo
+            var wWidgetCash = new widgets.WidgetCashWidget(self);
+            wWidgetCash.fetchCurrentUser().then(function(CurrentUser){
+                return CurrentUser;
+            }).then(function(CurrentUser){
+                wWidgetCash.fetchResUser(CurrentUser).then(function(chart_ids){
+                    return chart_ids;
+                }).then(function(chart_ids){
+                    var charts = chart_ids[0].chart_ids;
+                    wWidgetCash.fetchChartList(charts).then(function(ChartList){
+                        return ChartList;
+                    }).then(function(ChartList){
+                        var chart =  _.flatten(_.filter(ChartList,function (inv) {
+                            return inv.name == 'WidgetCash';
+                        }));
+                        if(chart.length > 0){
+                            wWidgetCash.renderElement();
+                            wWidgetCash.start();
+                            self.grid.addWidget(wWidgetCash.$el, 0, 0, wWidgetCash.size.width,  wWidgetCash.size.height, true);
+                        }
+                    });
+                });
+            });
+
+            // *************************** Caja Banco
+            var wWidgetBank = new widgets.WidgetBankWidget(self);
+            wWidgetBank.fetchCurrentUser().then(function(CurrentUser){
+                return CurrentUser;
+            }).then(function(CurrentUser){
+                wWidgetBank.fetchResUser(CurrentUser).then(function(chart_ids){
+                    return chart_ids;
+                }).then(function(chart_ids){
+                    var charts = chart_ids[0].chart_ids;
+                    wWidgetBank.fetchChartList(charts).then(function(ChartList){
+                        return ChartList;
+                    }).then(function(ChartList){
+                        var chart =  _.flatten(_.filter(ChartList,function (inv) {
+                            return inv.name == 'WidgetCash';
+                        }));
+                        if(chart.length > 0){
+                            wWidgetBank.renderElement();
+                            wWidgetBank.start();
+                            self.grid.addWidget(wWidgetBank.$el, 0, 0, wWidgetBank.size.width,  wWidgetBank.size.height, true);
+                        }
+                    });
+                });
+            });
+
 
 
 

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

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

+ 225 - 0
static/src/js/widgets/widget_bank.js

@@ -0,0 +1,225 @@
+function widget_bank(widget) {
+    "use strict";
+
+    var model = openerp;
+
+    widget.WidgetBankWidget = widget.Base.extend({
+        template: 'WidgetBank',
+
+        events: {
+            'click .today': 'showToday',
+            'click .thisWeek': 'showThisWeek',
+            'click .thisMonth': 'showThisMonth',
+        },
+
+        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.fetchAccountJournal().then(function (AccountJournal) {
+                return AccountJournal;
+            }).then(function (AccountJournal) {
+                self.AccountJournal = AccountJournal;
+                return self.fetchAccountBankStatement();
+            }).then(function(AccountBankStatement) {
+                self.AccountBankStatement = AccountBankStatement;
+                return self.fetchResCompany();
+            }).then(function(ResCompany) {
+                self.ResCompany = ResCompany;
+                return self.fetchResCurrecy();
+            }).then(function(ResCurrecy) {
+                self.ResCurrecy = ResCurrecy;
+                return self.showThisMonth();
+            });
+        },
+
+        // Usuario Logeado
+        fetchCurrentUser: function() {
+            var self = this;
+            var ResUser = new model.web.Model('res.users');
+            return ResUser.call('get_user', {
+                context: new model.web.CompoundContext()
+            });
+        },
+
+        // Lista de Graficos disponibles para el usuario
+        fetchResUser: function(id) {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name','chart_ids'];
+            var domain = [['id','=',id]];
+            var ResUser = new model.web.Model('res.users');
+            ResUser.query(fields).filter(domain).all().then(function (results) {
+                defer.resolve(results);
+            });
+
+            return defer;
+        },
+
+        // Obtener detalles de la lista de graficos
+        fetchChartList: function(chart_ids) {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name'];
+            var domain = [['id','in',chart_ids]];
+            var ChartList = new model.web.Model('chart.list');
+            ChartList.query(fields).filter(domain).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        fetchAccountJournal: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id', 'name', 'date_order', 'amount_total'];
+            var domain = [['type', '=', 'bank']];
+            var PosOrder = new model.web.Model('account.journal');
+            PosOrder.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+
+            return defer;
+        },
+
+        fetchAccountBankStatement: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var journal_ids = _.flatten(_.map(self.AccountJournal, function (item) {
+                return item.id;
+            }));
+            var fields = ['id', 'name', 'date', 'balance_end'];
+            var domain = [['state', 'in', ['open','confirm']],['journal_id','in',journal_ids]];
+            var AccountBankStatement = new model.web.Model('account.bank.statement');
+            AccountBankStatement.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;
+            })
+        },
+
+        getTodayAccountBankStatement:function() {
+            var self = this;
+            var date = moment().format('YYYY-MM-DD');
+            return _.flatten(_.filter(self.AccountBankStatement,function (inv) {
+                return moment(inv.date).format('YYYY-MM-DD') === date;
+            }));
+        },
+
+        getThisWeekAccountBankStatement:function() {
+            var self = this;
+            var week = moment().week();
+            return _.flatten(_.filter(self.AccountBankStatement,function (inv) {
+                return moment(inv.date).week() === week & moment(inv.date).format('YYYY')=== moment().format('YYYY');
+            }));
+        },
+
+        getThisMonthAccountBankStatement:function() {
+            var self = this;
+            return _.flatten(_.filter(self.AccountBankStatement,function (inv) {
+                return moment(inv.date).format('YYYY-MM')=== moment().format('YYYY-MM');
+            }));
+        },
+
+        showToday: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var statement = self.getTodayAccountBankStatement();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(statement.length > 0){
+                amount = _.reduce(_.map(statement, function (map) {
+                    return map.balance_end;
+                }), 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 statement = self.getThisWeekAccountBankStatement();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(statement.length > 0){
+                amount = _.reduce(_.map(statement, function (map) {
+                    return map.balance_end;
+                }), 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))
+        },
+
+        showThisMonth: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var statement = self.getThisMonthAccountBankStatement();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(statement.length > 0){
+                amount = _.reduce(_.map(statement, function (map) {
+                    return map.balance_end;
+                }), 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))
+        },
+    });
+}

+ 225 - 0
static/src/js/widgets/widget_cash.js

@@ -0,0 +1,225 @@
+function widget_cash(widget) {
+    "use strict";
+
+    var model = openerp;
+
+    widget.WidgetCashWidget = widget.Base.extend({
+        template: 'WidgetCash',
+
+        events: {
+            'click .today': 'showToday',
+            'click .thisWeek': 'showThisWeek',
+            'click .thisMonth': 'showThisMonth',
+        },
+
+        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.fetchAccountJournal().then(function (AccountJournal) {
+                return AccountJournal;
+            }).then(function (AccountJournal) {
+                self.AccountJournal = AccountJournal;
+                return self.fetchAccountBankStatement();
+            }).then(function(AccountBankStatement) {
+                self.AccountBankStatement = AccountBankStatement;
+                return self.fetchResCompany();
+            }).then(function(ResCompany) {
+                self.ResCompany = ResCompany;
+                return self.fetchResCurrecy();
+            }).then(function(ResCurrecy) {
+                self.ResCurrecy = ResCurrecy;
+                return self.showThisMonth();
+            });
+        },
+
+        // Usuario Logeado
+        fetchCurrentUser: function() {
+            var self = this;
+            var ResUser = new model.web.Model('res.users');
+            return ResUser.call('get_user', {
+                context: new model.web.CompoundContext()
+            });
+        },
+
+        // Lista de Graficos disponibles para el usuario
+        fetchResUser: function(id) {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name','chart_ids'];
+            var domain = [['id','=',id]];
+            var ResUser = new model.web.Model('res.users');
+            ResUser.query(fields).filter(domain).all().then(function (results) {
+                defer.resolve(results);
+            });
+
+            return defer;
+        },
+
+        // Obtener detalles de la lista de graficos
+        fetchChartList: function(chart_ids) {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name'];
+            var domain = [['id','in',chart_ids]];
+            var ChartList = new model.web.Model('chart.list');
+            ChartList.query(fields).filter(domain).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        fetchAccountJournal: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id', 'name', 'date_order', 'amount_total'];
+            var domain = [['type', '=', 'cash']];
+            var PosOrder = new model.web.Model('account.journal');
+            PosOrder.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+
+            return defer;
+        },
+
+        fetchAccountBankStatement: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var journal_ids = _.flatten(_.map(self.AccountJournal, function (item) {
+                return item.id;
+            }));
+            var fields = ['id', 'name', 'date', 'balance_end'];
+            var domain = [['state', 'in', ['open','confirm']],['journal_id','in',journal_ids]];
+            var AccountBankStatement = new model.web.Model('account.bank.statement');
+            AccountBankStatement.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;
+            })
+        },
+
+        getTodayAccountBankStatement:function() {
+            var self = this;
+            var date = moment().format('YYYY-MM-DD');
+            return _.flatten(_.filter(self.AccountBankStatement,function (inv) {
+                return moment(inv.date).format('YYYY-MM-DD') === date;
+            }));
+        },
+
+        getThisWeekAccountBankStatement:function() {
+            var self = this;
+            var week = moment().week();
+            return _.flatten(_.filter(self.AccountBankStatement,function (inv) {
+                return moment(inv.date).week() === week & moment(inv.date).format('YYYY')=== moment().format('YYYY');
+            }));
+        },
+
+        getThisMonthAccountBankStatement:function() {
+            var self = this;
+            return _.flatten(_.filter(self.AccountBankStatement,function (inv) {
+                return moment(inv.date).format('YYYY-MM')=== moment().format('YYYY-MM');
+            }));
+        },
+
+        showToday: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var statement = self.getTodayAccountBankStatement();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(statement.length > 0){
+                amount = _.reduce(_.map(statement, function (map) {
+                    return map.balance_end;
+                }), 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 statement = self.getThisWeekAccountBankStatement();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(statement.length > 0){
+                amount = _.reduce(_.map(statement, function (map) {
+                    return map.balance_end;
+                }), 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))
+        },
+
+        showThisMonth: function () {
+            var self = this;
+            var amount = 0;
+            var data = [];
+            var statement = self.getThisMonthAccountBankStatement();
+            var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            if(statement.length > 0){
+                amount = _.reduce(_.map(statement, function (map) {
+                    return map.balance_end;
+                }), 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_bank.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template xml:space="preserve">
+    <t t-name="WidgetBank">
+        <div>
+            <div class="grid-stack-item-content reporting-dashboard balance">
+                <h2 class="widget-title">
+                    <div class="row">
+                        <div class="col-xs-6">
+                           <i class="fa fa-money" aria-hidden="true"> </i>
+                            Caja Banco
+                        </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="thisMonth">Este Mes</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_cash.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template xml:space="preserve">
+    <t t-name="WidgetCash">
+        <div>
+            <div class="grid-stack-item-content reporting-dashboard balance">
+                <h2 class="widget-title">
+                    <div class="row">
+                        <div class="col-xs-6">
+                           <i class="fa fa-money" aria-hidden="true"> </i>
+                            Caja Efectivo
+                        </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="thisMonth">Este Mes</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>

+ 2 - 0
templates.xml

@@ -23,6 +23,8 @@
                 <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/widgets/widget_purchase.js" />
                 <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/widgets/widget_expense.js" />
                 <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/widgets/widget_balance.js" />
+                <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" />
 
                 <!-- Dashboard Main  -->
                 <script type="text/javascript" src="/eiru_reporting_dashboard/static/src/js/dashboard.js" />