-
Notifications
You must be signed in to change notification settings - Fork 0
/
client_services_totals.pdt
88 lines (86 loc) · 5.29 KB
/
client_services_totals.pdt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<div class="row total-summary">
<div class="col-sm-6 col-md-5 offset-sm-6 offset-md-7">
<div class="card bg-light d-block p-2 mb-2">
<div class="table-responsive">
<table class="table table-curved">
<tbody>
<tr>
<td><?php $this->_('ClientServices.totals.subtotal');?></td>
<td class="text-right">
<?php echo $this->CurrencyFormat->format($this->Html->_($totals->subtotal, true), $this->Html->ifSet($currency));?>
</td>
</tr>
<?php
foreach ($this->Html->ifSet($discounts, []) as $discount) {
?>
<tr>
<td><?php $this->Html->_($discount->description);?></td>
<td class="text-right">
<?php
// Show discount as negative
$discount = $this->Html->ifSet($discount->total, 0) * -1;
echo $this->CurrencyFormat->format($this->Html->_($discount, true), $this->Html->ifSet($currency));
?>
</td>
</tr>
<?php
}
foreach ($this->Html->ifSet($taxes, []) as $tax) {
?>
<tr>
<td><?php $this->Html->_($tax->description);?></td>
<td class="text-right">
<?php echo $this->CurrencyFormat->format($this->Html->_($tax->total, true), $this->Html->ifSet($currency));?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<hr />
<table class="table table-curved">
<tbody>
<tr>
<td><?php $this->_('ClientServices.totals.total');?></td>
<td class="text-right">
<h4>
<?php
echo $this->CurrencyFormat->format(
$this->Html->ifSet($settings['client_prorate_credits']) == 'false' && $this->Html->_($totals->total_without_exclusive_tax, true) < 0 ? 0 : $this->Html->_($totals->total_without_exclusive_tax, true),
$this->Html->ifSet($currency)
);
?>
</h4>
</td>
</tr>
<?php
// Display the recurring total
if ($this->Html->ifSet($totals_recurring)) {
?>
<tr>
<td>
<?php $this->_('ClientServices.totals.total_recurring');?>
<a href="#" data-toggle="tooltip" title="<?php $this->_('ClientServices.!tooltip.total_recurring');?>"><i class="fas fa-question-circle text-info"></i></a>
</td>
<td class="text-right">
<?php
echo $this->CurrencyFormat->format(
$this->Html->ifSet($settings['client_prorate_credits']) == 'false' && $this->Html->_($totals_recurring->total_without_exclusive_tax, true) < 0 ? 0 : $this->Html->_($totals_recurring->total_without_exclusive_tax, true),
$this->Html->ifSet($currency)
);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="float-right total-summary">
</div>
<div class="clearfix"></div>