|
39 | 39 |
|
40 | 40 | echo ' |
41 | 41 | <!-- Riepilogo dei costi --> |
42 | | -<table class="table table condensed table-striped table-hover table-bordered"> |
43 | | - <thead> |
44 | | - <tr> |
45 | | - <th width="40%"></th> |
46 | | - <th width="20%" class="text-center">'.tr('Costo', [], ['upper' => true]).' <span class="tip" title="'.tr('Costo interno').'"><i class="fa fa-question-circle-o"></i></span></th> |
47 | | - <th width="20%" class="text-center">'.tr('Addebito', [], ['upper' => true]).' <span class="tip" title="'.tr('Addebito al cliente').'"><i class="fa fa-question-circle-o"></i></span></th> |
48 | | - <th width="20%" class="text-center">'.tr('Tot. Scontato', [], ['upper' => true]).' <span class="tip" title="'.tr('Addebito scontato al cliente').'"><i class="fa fa-question-circle-o"></i></span></th> |
49 | | - </tr> |
50 | | - </thead> |
51 | | -
|
52 | | - <tbody> |
53 | | - <tr> |
54 | | - <th>'.tr('Totale manodopera', [], ['upper' => true]).'</th> |
55 | | - <td class="text-right">'.moneyFormat($sessioni->sum('costo_manodopera'), 2).'</td> |
56 | | - <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_manodopera'), 2).'</td> |
57 | | - <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_manodopera_scontato'), 2).'</td> |
58 | | - </tr> |
| 42 | +<div class="table-responsive"> |
| 43 | + <table class="table table-condensed table-striped table-hover table-bordered"> |
| 44 | + <thead> |
| 45 | + <tr> |
| 46 | + <th></th> |
| 47 | + <th width="15%" class="text-center">'.tr('Costo', [], ['upper' => true]).' <span class="tip" title="'.tr('Costo interno').'"><i class="fa fa-question-circle-o"></i></span></th> |
| 48 | + <th width="15%" class="text-center">'.tr('Addebito', [], ['upper' => true]).' <span class="tip" title="'.tr('Addebito al cliente').'"><i class="fa fa-question-circle-o"></i></span></th> |
| 49 | + <th width="15%" class="text-center">'.tr('Tot. Scontato', [], ['upper' => true]).' <span class="tip" title="'.tr('Addebito scontato al cliente').'"><i class="fa fa-question-circle-o"></i></span></th> |
| 50 | + </tr> |
| 51 | + </thead> |
| 52 | +
|
| 53 | + <tbody> |
| 54 | + <tr> |
| 55 | + <th>'.tr('Totale manodopera', [], ['upper' => true]).'</th> |
| 56 | + <td class="text-right">'.moneyFormat($sessioni->sum('costo_manodopera'), 2).'</td> |
| 57 | + <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_manodopera'), 2).'</td> |
| 58 | + <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_manodopera_scontato'), 2).'</td> |
| 59 | + </tr> |
| 60 | +
|
| 61 | + <tr> |
| 62 | + <th>'.tr('Totale diritto di chiamata', [], ['upper' => true]).'</th> |
| 63 | + <td class="text-right">'.moneyFormat($sessioni->sum('costo_diritto_chiamata'), 2).'</td> |
| 64 | + <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_diritto_chiamata'), 2).'</td> |
| 65 | + <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_diritto_chiamata'), 2).'</td> |
| 66 | + </tr> |
| 67 | +
|
| 68 | + <tr> |
| 69 | + <th>'.tr('Totale viaggio', [], ['upper' => true]).'</th> |
| 70 | + <td class="text-right">'.moneyFormat($sessioni->sum('costo_viaggio'), 2).'</td> |
| 71 | + <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_viaggio'), 2).'</td> |
| 72 | + <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_viaggio_scontato'), 2).'</td> |
| 73 | + </tr> |
| 74 | +
|
| 75 | + <tr> |
| 76 | + <th>'.tr('Totale righe', [], ['upper' => true]).'</th> |
| 77 | + <td class="text-right">'.moneyFormat($righe->sum('spesa'), 2).'</td> |
| 78 | + <td class="text-right">'.moneyFormat($righe->sum('imponibile'), 2).'</td> |
| 79 | + <td class="text-right">'.moneyFormat($righe->sum('totale_imponibile'), 2).'</td> |
| 80 | + </tr> |
| 81 | + </tbody>'; |
| 82 | + |
| 83 | + // Calcoli |
| 84 | + $imponibile = abs($intervento->imponibile); |
| 85 | + $sconto = -$intervento->sconto; |
| 86 | + $totale_imponibile = abs($intervento->totale_imponibile); |
| 87 | + $iva = abs($intervento->iva); |
| 88 | + $totale = abs($intervento->totale); |
59 | 89 |
|
| 90 | + echo ' |
60 | 91 | <tr> |
61 | | - <th>'.tr('Totale diritto di chiamata', [], ['upper' => true]).'</th> |
62 | | - <td class="text-right">'.moneyFormat($sessioni->sum('costo_diritto_chiamata'), 2).'</td> |
63 | | - <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_diritto_chiamata'), 2).'</td> |
64 | | - <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_diritto_chiamata'), 2).'</td> |
65 | | - </tr> |
66 | | -
|
| 92 | + <td colspan="3" class="text-right"> |
| 93 | + <b>'.tr('Imponibile', [], ['upper' => true]).':</b> |
| 94 | + </td> |
| 95 | + <td class="text-right"> |
| 96 | + '.moneyFormat($imponibile, 2).' |
| 97 | + </td> |
| 98 | + </tr>'; |
| 99 | + |
| 100 | + // Totale sconto |
| 101 | + if (!empty($sconto)) { |
| 102 | + echo ' |
67 | 103 | <tr> |
68 | | - <th>'.tr('Totale viaggio', [], ['upper' => true]).'</th> |
69 | | - <td class="text-right">'.moneyFormat($sessioni->sum('costo_viaggio'), 2).'</td> |
70 | | - <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_viaggio'), 2).'</td> |
71 | | - <td class="text-right">'.moneyFormat($sessioni->sum('prezzo_viaggio_scontato'), 2).'</td> |
72 | | - </tr> |
73 | | -
|
| 104 | + <td colspan="3" class="text-right"> |
| 105 | + <b><span class="tip" title="'.tr('Un importo positivo indica uno sconto, mentre uno negativo indica una maggiorazione').'"> <i class="fa fa-question-circle-o"></i> '.tr('Sconto/maggiorazione', [], ['upper' => true]).':</span></b> |
| 106 | + </td> |
| 107 | + <td class="text-right"> |
| 108 | + '.moneyFormat($sconto, 2).' |
| 109 | + </td> |
| 110 | + </tr>'; |
| 111 | + |
| 112 | + // Totale imponibile |
| 113 | + echo ' |
74 | 114 | <tr> |
75 | | - <th>'.tr('Totale righe', [], ['upper' => true]).'</th> |
76 | | - <td class="text-right">'.moneyFormat($righe->sum('spesa'), 2).'</td> |
77 | | - <td class="text-right">'.moneyFormat($righe->sum('imponibile'), 2).'</td> |
78 | | - <td class="text-right">'.moneyFormat($righe->sum('totale_imponibile'), 2).'</td> |
79 | | - </tr> |
80 | | - </tbody>'; |
81 | | - |
82 | | - // Calcoli |
83 | | - $imponibile = abs($intervento->imponibile); |
84 | | - $sconto = -$intervento->sconto; |
85 | | - $totale_imponibile = abs($intervento->totale_imponibile); |
86 | | - $iva = abs($intervento->iva); |
87 | | - $totale = abs($intervento->totale); |
88 | | - |
89 | | - echo ' |
90 | | - <tr> |
91 | | - <td colspan="3" class="text-right"> |
92 | | - <b>'.tr('Imponibile', [], ['upper' => true]).':</b> |
93 | | - </td> |
94 | | - <td class="text-right"> |
95 | | - '.moneyFormat($imponibile, 2).' |
96 | | - </td> |
97 | | - </tr>'; |
98 | | - |
99 | | - // Totale sconto |
100 | | - if (!empty($sconto)) { |
| 115 | + <td colspan="3" class="text-right"> |
| 116 | + <b>'.tr('Totale imponibile', [], ['upper' => true]).':</b> |
| 117 | + </td> |
| 118 | + <td class="text-right"> |
| 119 | + '.moneyFormat($totale_imponibile, 2).' |
| 120 | + </td> |
| 121 | + </tr>'; |
| 122 | + } |
| 123 | + |
| 124 | + // Totale iva |
101 | 125 | echo ' |
102 | | - <tr> |
103 | | - <td colspan="3" class="text-right"> |
104 | | - <b><span class="tip" title="'.tr('Un importo positivo indica uno sconto, mentre uno negativo indica una maggiorazione').'"> <i class="fa fa-question-circle-o"></i> '.tr('Sconto/maggiorazione', [], ['upper' => true]).':</span></b> |
105 | | - </td> |
106 | | - <td class="text-right"> |
107 | | - '.moneyFormat($sconto, 2).' |
108 | | - </td> |
109 | | - </tr>'; |
110 | | - |
111 | | - // Totale imponibile |
| 126 | + <tr> |
| 127 | + <td colspan="3" class="text-right"> |
| 128 | + <b><i class="fa fa-question-circle-o tip" title="'.tr("Il valore dell'IVA totale è esclusivamente indicativo e basato sulle impostazioni di default del gestionale se non è impostata l'iva predefinita nell'anagrafica").'."></i> '.tr('IVA', [], ['upper' => true]).':</b> |
| 129 | + </td> |
| 130 | + <td class="text-right"> |
| 131 | + '.moneyFormat($iva, 2).' |
| 132 | + </td> |
| 133 | + </tr>'; |
| 134 | + |
| 135 | + // Totale attività |
112 | 136 | echo ' |
113 | | - <tr> |
114 | | - <td colspan="3" class="text-right"> |
115 | | - <b>'.tr('Totale imponibile', [], ['upper' => true]).':</b> |
116 | | - </td> |
117 | | - <td class="text-right"> |
118 | | - '.moneyFormat($totale_imponibile, 2).' |
119 | | - </td> |
120 | | - </tr>'; |
121 | | - } |
122 | | - |
123 | | - // Totale iva |
124 | | - echo ' |
125 | | - <tr> |
126 | | - <td colspan="3" class="text-right"> |
127 | | - <b><i class="fa fa-question-circle-o tip" title="'.tr("Il valore dell'IVA totale è esclusivamente indicativo e basato sulle impostazioni di default del gestionale se non è impostata l'iva predefinita nell'anagrafica").'."></i> '.tr('IVA', [], ['upper' => true]).':</b> |
128 | | - </td> |
129 | | - <td class="text-right"> |
130 | | - '.moneyFormat($iva, 2).' |
131 | | - </td> |
132 | | - </tr>'; |
133 | | - |
134 | | - // Totale attività |
135 | | - echo ' |
136 | | - <tr> |
137 | | - <td colspan="3" class="text-right"> |
138 | | - <b>'.tr('Totale documento', [], ['upper' => true]).':</b> |
139 | | - </td> |
140 | | - <td class="text-right"> |
141 | | - '.moneyFormat($totale, 2).' |
142 | | - </td> |
143 | | - </tr>'; |
| 137 | + <tr> |
| 138 | + <td colspan="3" class="text-right"> |
| 139 | + <b>'.tr('Totale documento', [], ['upper' => true]).':</b> |
| 140 | + </td> |
| 141 | + <td class="text-right"> |
| 142 | + '.moneyFormat($totale, 2).' |
| 143 | + </td> |
| 144 | + </tr>'; |
144 | 145 |
|
145 | | - echo ' |
146 | | -</table>'; |
| 146 | + echo ' |
| 147 | + </table> |
| 148 | +</div>'; |
147 | 149 | } |
148 | 150 |
|
149 | 151 | echo ' |
|
0 commit comments