Lines 16-34
$('#cashupSummaryModal').on('show.bs.modal', function(e) {
Link Here
|
16 |
var tbody = summary_modal.find('tbody') |
16 |
var tbody = summary_modal.find('tbody') |
17 |
tbody.empty(); |
17 |
tbody.empty(); |
18 |
for (out of data.summary.payout_grouped) { |
18 |
for (out of data.summary.payout_grouped) { |
19 |
tbody.append('<tr><td>' + out.credit_type.description + '</td><td>- ' + out.total + '</td></tr>'); |
19 |
tbody.append('<tr><td>' + out.credit_type.description + '</td><td>- ' + out.total.format_price() + '</td></tr>'); |
20 |
} |
20 |
} |
21 |
|
21 |
|
22 |
for (income of data.summary.income_grouped) { |
22 |
for (income of data.summary.income_grouped) { |
23 |
tbody.append('<tr><td>' + income.debit_type.description + '</td><td>' + income.total + '</td></tr>'); |
23 |
tbody.append('<tr><td>' + income.debit_type.description + '</td><td>' + income.total.format_price() + '</td></tr>'); |
24 |
} |
24 |
} |
25 |
|
25 |
|
26 |
var tfoot = summary_modal.find('tfoot'); |
26 |
var tfoot = summary_modal.find('tfoot'); |
27 |
tfoot.empty(); |
27 |
tfoot.empty(); |
28 |
tfoot.append('<tr><td>Total</td><td>' + data.summary.total + '</td></tr>'); |
28 |
tfoot.append('<tr><td>Total</td><td>' + data.summary.total.format_price() + '</td></tr>'); |
29 |
for (type of data.summary.total_grouped) { |
29 |
for (type of data.summary.total_grouped) { |
30 |
if (type.total !== 0) { |
30 |
if (type.total !== 0) { |
31 |
tfoot.append('<tr><td>' + type.payment_type + '</td><td>' + type.total + '</td></tr>'); |
31 |
tfoot.append('<tr><td>' + type.payment_type + '</td><td>' + type.total.format_price() + '</td></tr>'); |
32 |
} |
32 |
} |
33 |
} |
33 |
} |
34 |
} |
34 |
} |
35 |
- |
|
|