Lines 19-33
$(document).ready(function() {
Link Here
|
19 |
var tbody = summary_modal.find('tbody') |
19 |
var tbody = summary_modal.find('tbody') |
20 |
tbody.empty(); |
20 |
tbody.empty(); |
21 |
for (out of data.summary.payout_grouped) { |
21 |
for (out of data.summary.payout_grouped) { |
22 |
if ( out.credit_type_code == 'REFUND' ) { |
22 |
if (out.credit_type_code == 'REFUND') { |
23 |
tbody.append('<tr><td>' + out.credit_type.description + ' ' + __("against") + ' ' + out.related_debit.debit_type.description + '</td><td>- ' + out.total + '</td></tr>'); |
23 |
tbody.append('<tr><td>' + __x('{credit_type_description} against {debit_type_description}', { 'credit_type_description': escape_str(out.credit_type.description), 'debit_type_description': escape_str(out.related_debit.debit_type.description) }) + '</td><td>- ' + out.total.format_price() + '</td></tr>'); |
24 |
} else { |
24 |
} else { |
25 |
tbody.append('<tr><td>' + out.credit_type.description + '</td><td>- ' + out.total + '</td></tr>'); |
25 |
tbody.append('<tr><td>' + escape_str(out.credit_type.description) + '</td><td>- ' + out.total.format_price() + '</td></tr>'); |
26 |
} |
26 |
} |
27 |
} |
27 |
} |
28 |
|
28 |
|
29 |
for (income of data.summary.income_grouped) { |
29 |
for (income of data.summary.income_grouped) { |
30 |
tbody.append('<tr><td>' + income.debit_type.description + '</td><td>' + income.total.format_price() + '</td></tr>'); |
30 |
tbody.append('<tr><td>' + escape_str(income.debit_type.description) + '</td><td>' + income.total.format_price() + '</td></tr>'); |
31 |
} |
31 |
} |
32 |
|
32 |
|
33 |
var tfoot = summary_modal.find('tfoot'); |
33 |
var tfoot = summary_modal.find('tfoot'); |
Lines 35-41
$(document).ready(function() {
Link Here
|
35 |
tfoot.append('<tr><td>Total</td><td>' + data.summary.total.format_price() + '</td></tr>'); |
35 |
tfoot.append('<tr><td>Total</td><td>' + data.summary.total.format_price() + '</td></tr>'); |
36 |
for (type of data.summary.total_grouped) { |
36 |
for (type of data.summary.total_grouped) { |
37 |
if (type.total !== 0) { |
37 |
if (type.total !== 0) { |
38 |
tfoot.append('<tr><td>' + type.payment_type + '</td><td>' + type.total.format_price() + '</td></tr>'); |
38 |
tfoot.append('<tr><td>' + escape_str(type.payment_type) + '</td><td>' + type.total.format_price() + '</td></tr>'); |
39 |
} |
39 |
} |
40 |
} |
40 |
} |
41 |
} |
41 |
} |
42 |
- |
|
|