|
@@ -686,7 +686,6 @@ function report_doctor_ranking(reporting){
|
|
|
var self = this;
|
|
|
var data = [];
|
|
|
var ResDoctor = self.getResDoctor();
|
|
|
- console.log(self);
|
|
|
var type = $('#current-type').val();
|
|
|
var company = $('#current-company').val();
|
|
|
if(company && company != 9999999){
|
|
@@ -759,23 +758,21 @@ function report_doctor_ranking(reporting){
|
|
|
amount: accounting.formatMoney(index.amount_total_currency,'',CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
|
|
|
});
|
|
|
});
|
|
|
- }
|
|
|
-
|
|
|
+ };
|
|
|
var amount = invoice_amount + pos_amount;
|
|
|
-
|
|
|
if(amount > 0){
|
|
|
data.push({
|
|
|
id: item.id,
|
|
|
medic: item.name,
|
|
|
qty_total: accounting.formatNumber((PosOrder.length + AccountInvoice.length),0,'.',','),
|
|
|
- total_amount: accounting.formatMoney(pos_amount, '', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
|
|
|
+ total_amount: accounting.formatMoney(amount, '', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
|
|
|
/*
|
|
|
================================
|
|
|
VALORES SIN FORMATEAR
|
|
|
================================
|
|
|
*/
|
|
|
qty: (PosOrder.length + AccountInvoice.length),
|
|
|
- amount: pos_amount,
|
|
|
+ amount: amount,
|
|
|
/*
|
|
|
================================
|
|
|
TOTAL FOOTER CONFIGURATION
|
|
@@ -828,7 +825,7 @@ function report_doctor_ranking(reporting){
|
|
|
label.push(item.medic.trim());
|
|
|
body.push(item.amount);
|
|
|
}
|
|
|
- BarChart.fetchBarChart(data,CurrencyBase,label,body);
|
|
|
+ BarChart.BuildBarChart(data,CurrencyBase,label,body);
|
|
|
|
|
|
/*
|
|
|
================================================
|
|
@@ -864,7 +861,7 @@ function report_doctor_ranking(reporting){
|
|
|
label.push('Otros Doctores');
|
|
|
body.push((num/amount_total)*100);
|
|
|
}
|
|
|
- PieChart.fetchPieChart(data,CurrencyBase,label,body);
|
|
|
+ PieChart.BuildPieChart(data,CurrencyBase,label,body);
|
|
|
|
|
|
self.$el.find('.report-form').css('display','block');
|
|
|
self.$el.find('.search-form').unblock();
|