|
@@ -9,20 +9,24 @@ function monthly_expenses(widget) {
|
|
|
accountInvoice:[],
|
|
|
currencyRate :[],
|
|
|
resCompany:[],
|
|
|
+
|
|
|
events: {
|
|
|
'click a': 'showCustomers',
|
|
|
'click h2': 'showCustomers',
|
|
|
},
|
|
|
+
|
|
|
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({
|
|
@@ -75,6 +79,7 @@ function monthly_expenses(widget) {
|
|
|
});
|
|
|
return defer;
|
|
|
},
|
|
|
+
|
|
|
fetchCurrency: function () {
|
|
|
var defer = $.Deferred();
|
|
|
var currency_Rate = new model.web.Model('res.currency.rate');
|
|
@@ -98,6 +103,7 @@ function monthly_expenses(widget) {
|
|
|
|
|
|
return defer;
|
|
|
},
|
|
|
+
|
|
|
fetchReduceVoucher: function () {
|
|
|
var self = this;
|
|
|
var newVoucher;
|
|
@@ -129,8 +135,7 @@ function monthly_expenses(widget) {
|
|
|
return map.currency_id[1];
|
|
|
});
|
|
|
self.$el.find('.widget-content.widget-loading').css('display','none');
|
|
|
- self.$el.find('.widget-content').find('a').text(accounting.formatNumber(cat,2, ".", ","));
|
|
|
- self.$el.find('.widget-footer').find('span').text("Monto en "+ company);
|
|
|
+ self.$el.find('.widget-content').find('a').text(accounting.formatNumber(cat,2, ".", ",")).append(' <small>'+company+'</small>');
|
|
|
self.$el.find('#morosidad').unblock();
|
|
|
},
|
|
|
getCutrrencyRate: function (currency_id) {
|
|
@@ -156,7 +161,7 @@ function monthly_expenses(widget) {
|
|
|
var number = _.map(self.accountInvoice,function(map){return map.number});
|
|
|
|
|
|
this.do_action({
|
|
|
- name:"Gastos del Mes",
|
|
|
+ name:"Listado de gastos del mes",
|
|
|
type: 'ir.actions.act_window',
|
|
|
res_model: "account.voucher",
|
|
|
views: [[false, 'list']],
|