~serpentcs/openobject-addons/trunk-webkit-reports-addons

« back to all changes in this revision

Viewing changes to hr_timesheet_invoice/report/account_analytic_profit.mako

  • Committer: Hemangini Patel
  • Date: 2013-10-16 10:19:06 UTC
  • Revision ID: h.patel.serpentcs@gmail.com-20131016101906-9bqrmodzzepjw5zs
[ADD] Added hr_timesheet_invoice module with webkit reports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
    <style type="text/css">
 
4
        ${css}
 
5
    </style>
 
6
</head>
 
7
    <body>
 
8
    <br/>
 
9
            <br/>
 
10
            <center><h2>Invoice rate by user</h2></center>
 
11
            <br/>
 
12
            <br/>
 
13
            <table class="basic_table" width="100%" align="center">
 
14
                <tr>
 
15
                    <td width="40%">
 
16
                        <b>${_("Period from startdate")} </b>
 
17
                    </td>
 
18
                    <td width="30%">
 
19
                        <b>${_("Period to enddate")}</b>
 
20
                    </td>
 
21
                    <td width="30%">
 
22
                        <b>${_("Currency")} </b>
 
23
                    </td>
 
24
                </tr>
 
25
                <tr>
 
26
                    <td>
 
27
                        ${formatLang(data['form']['date_from'],date=True) or '' }
 
28
                    </td>
 
29
                    <td>
 
30
                        ${formatLang (data['form']['date_to'] ,date=True) or ''}
 
31
                    </td>
 
32
                    <td>
 
33
                        ${company.currency_id.name or ''}
 
34
                    </td>
 
35
                </tr>
 
36
            </table>    
 
37
            <br/><br/>
 
38
        <table class="list_table"  width="100%">
 
39
            <thead><table class="list_table"  width="100%">
 
40
            <thead>
 
41
                <tr>
 
42
                    <th style="text-align:left;" width="30%">${_("User or Journal Name")}</th>
 
43
                    <th style="text-align:left;" width="5%"></th>
 
44
                    <th style="text-align:left;" width="10%">${_("Units")}</th>
 
45
                    <th style="text-align:left;" width="15%">${_("Theorical")}</th>
 
46
                    <th style="text-align:right;" width="10%">${_("Income")}</th>
 
47
                    <th style="text-align:right;" width="10%">${_("Cost")}</th>
 
48
                    <th style="text-align:right;" width="10%">${_("Profit")}</th>
 
49
                    <th style="text-align:right;" width="10%">${_("Eff.")}</th>
 
50
                </tr>
 
51
            </thead>
 
52
        </table>
 
53
        <br/>
 
54
        %for e in user_ids(lines(data['form'])):
 
55
        <table class="list_table"  width="100%">
 
56
            <thead>
 
57
                %for line in line(data['form'], data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]):
 
58
                        <tr>
 
59
                            <th style="text-align:left;" width="30%">${_("Totals:")}</th>
 
60
                            <th style="text-align:left;" width="5%"></th>
 
61
                            <th style="text-align:left;" width="10%">${line['unit_amount']}</th>
 
62
                             <th style="text-align:left;" width="15%"></th>
 
63
                            <th style="text-align:right;" width="10%">
 
64
                            %if line['amount'] != 0:
 
65
                                ${line['amount']}
 
66
                            %endif
 
67
                            </th>
 
68
                            <th style="text-align:right;" width="10%">${line['cost']}</th>
 
69
                            <th style="text-align:right;" width="10%">${line['profit']}</th>
 
70
                                <th style="text-align:right;" width="10%">
 
71
                                %if line['amount'] != 0:
 
72
                                        ${line['cost'] and (line['amount']/line['cost'])* (-100) }
 
73
                                %endif
 
74
                                ${_("%")}
 
75
                                </th>
 
76
                        </tr>
 
77
               %endfor
 
78
            </thead>
 
79
                <thead>
 
80
                        <tr>
 
81
                        <td class="td_line" style="text-align:left;">
 
82
                                <b>${e.name or '' }</b>
 
83
                        </td>
 
84
                        %for j in journal_ids(data['form'], [e.id]):
 
85
                                %for li in line(data['form'], [j.id], [e.id]):
 
86
                                        <td style="text-align:left;">
 
87
                                        </td>
 
88
                                        <td style="text-align:left;">
 
89
                                                ${li['unit_amount']}
 
90
                                        </td>
 
91
                                        <td style="text-align:left;">
 
92
                                                %if li['amount_th'] != 0:
 
93
                                                        ${li['amount_th']}
 
94
                                                %endif
 
95
                                        </td>
 
96
                                         <td style="text-align:right;">
 
97
                                         %if li['amount'] != 0:
 
98
                                                ${li['amount']}
 
99
                                        %endif
 
100
                                        </td>
 
101
                                         <td style="text-align:right;">
 
102
                                                ${li['cost']}
 
103
                                        </td>
 
104
                                         <td style="text-align:right;">
 
105
                                                ${li['profit']}
 
106
                                        </td>
 
107
                                         <td style="text-align:right;">
 
108
                                          %if li['amount'] != 0:
 
109
                                                ${li['cost']  and (li['amount'] / li['cost'])* (100.0)}
 
110
                                          %endif
 
111
                                          ${_("%")}
 
112
                                        </td>
 
113
                                %endfor
 
114
                   </tr>
 
115
                   <tr>
 
116
                        <td colspan="1">
 
117
                                                        ${ j.name }
 
118
                                        </td>
 
119
                   </tr>
 
120
                   
 
121
               </thead>
 
122
         </table>
 
123
         <table class="list_table"  width="100%">
 
124
            %for l in line(data['form'], [j.id],[e.id]):
 
125
                <tbody>
 
126
                    <tr>
 
127
                        <td style="text-align:left; border-style:none;" width="30%">
 
128
                            ${ l['name'] or '' }
 
129
                         </td>
 
130
                        <td style="text-align:left; border-style:none;" width="5%">
 
131
                         </td>
 
132
                        <td style="text-align:left; border-style:none;" width="10%">
 
133
                            ${ l['unit_amount'] or '' }
 
134
                         </td>
 
135
                         <td style="text-align:left; border-style:none;" width="15%">
 
136
                            ${ l['amount_th'] or '' }
 
137
                        </td>
 
138
                        <td style="text-align:right; border-style:none;" width="10%">
 
139
                            ${ l['amount'] or '' }
 
140
                        </td>
 
141
                        <td style="text-align:right; border-style:none;" width="10%">
 
142
                            ${ l['cost'] or '' }
 
143
                        </td>
 
144
                        <td style="text-align:right; border-style:none;" width="10%">
 
145
                            ${ l['profit'] or '' }
 
146
                        </td>
 
147
                        <td style="text-align:right; border-style:none;" width="10%">
 
148
                            ${ l['eff'] or '' } %
 
149
                        </td>
 
150
                    </tr>
 
151
                </tbody>
 
152
                %endfor
 
153
                %endfor 
 
154
        </table>                
 
155
          %endfor
 
156
         <p style="page-break-after:always;"> </p>
 
157
   
 
158
</body>
 
159
</html>