SalesCharts   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 4
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
c 0
b 0
f 0
dl 0
loc 4
rs 10
1
# Copyright 2013 Mathias WOLFF
2
# This file is part of pyfreebilling.
3
#
4
# pyfreebilling is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# pyfreebilling is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with pyfreebilling.  If not, see <http://www.gnu.org/licenses/>
16
17
# -*- coding: utf-8 -*-
18
from base_modules import BaseChart, BaseCharts
19
from django.utils.translation import ugettext_lazy as _
20
from .models import DimCustomerDestination
21
22
23
class SalesChart(BaseChart):
24
    """
25
Dashboard module with sales charts.
26
27
With default values it is suited best for 2-column dashboard layouts.
28
"""
29
    title = _(u'Sales stats')
30
    template = 'admin/pyfreebill/stats/chart.html'
31
    chart_size = "580x100"
32
    days = None
33
    interval = 'days'
34
    queryset = DimCustomerDestination.objects.all()
35
    date_field = 'date'
36
37
38
class SalesCharts(BaseCharts):
39
    """ Group module with 3 default sales charts """
40
    title = _(u'Sales')
41
    chart_model = SalesChart
42