|
@@ -310,27 +310,6 @@
|
|
|
color: red;
|
|
|
}
|
|
|
|
|
|
- #tb-summary + .layui-table-view .layui-table-header .layui-table-cell {
|
|
|
- white-space: normal !important;
|
|
|
- line-height: 1.5em !important;
|
|
|
- height: auto !important;
|
|
|
- overflow: visible !important;
|
|
|
- }
|
|
|
-
|
|
|
- #tb-summary + .layui-table-view .layui-table-header th {
|
|
|
- height: 50px !important;
|
|
|
- vertical-align: middle !important;
|
|
|
- }
|
|
|
-
|
|
|
- #tb-summary + .layui-table-view .layui-table-header th[data-field="channel_invoice_quota"],
|
|
|
- #tb-summary + .layui-table-view .layui-table-header th[data-field="mch_invoice_quota"] {
|
|
|
- color: blue !important;
|
|
|
- }
|
|
|
-
|
|
|
- #tb-summary + .layui-table-view .layui-table-header th[data-field="channel_mch_delta"] {
|
|
|
- background-color: #FFB800;
|
|
|
- }
|
|
|
-
|
|
|
.chinese-money {
|
|
|
font-size: 12px;
|
|
|
color: red;
|
|
@@ -353,6 +332,15 @@
|
|
|
font-size: 10px;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
+
|
|
|
+ .summary-tables-subject {
|
|
|
+ width: 135px;
|
|
|
+ line-height: 30px;
|
|
|
+ font-size: 18px;
|
|
|
+ background-color: #1E9FFF;
|
|
|
+ padding-left: 15px;
|
|
|
+ font-weight: 800;
|
|
|
+ }
|
|
|
</style>
|
|
|
|
|
|
<div class="page" id="app">
|
|
@@ -427,7 +415,9 @@
|
|
|
<!-- 综合统计 -->
|
|
|
<div class="stats-panel layui-font-14">
|
|
|
<summary-set type="KEY_QUOTA_SUMMARY" emit="updateSummary"></summary-set>
|
|
|
- <table class="layui-hide" id="tb-summary"></table>
|
|
|
+ <div id="summary-tables">
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 申请确认 -->
|
|
@@ -611,7 +601,7 @@
|
|
|
item.remark = remark || "";
|
|
|
|
|
|
await dataHelper.addOrUpdateData(CONSTANTS.KEY_QUOTA_COMPANY, item, 1);
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
}
|
|
|
|
|
|
applyOne(index) {
|
|
@@ -742,12 +732,12 @@
|
|
|
await that.updateCompanyUsedQuota(subject);
|
|
|
setTimeout(function () {
|
|
|
companyTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables()
|
|
|
}, 0);
|
|
|
}
|
|
|
if (col === 'total_invoiced') {
|
|
|
setTimeout(function () {
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
}, 0);
|
|
|
}
|
|
|
|
|
@@ -1271,7 +1261,7 @@
|
|
|
await dataHelper.addOrUpdateData(CONSTANTS.KEY_QUOTA_CHANNEL, item, 2);
|
|
|
|
|
|
setTimeout(function () {
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
}, 0);
|
|
|
}
|
|
|
|
|
@@ -1281,127 +1271,184 @@
|
|
|
}
|
|
|
|
|
|
class SummaryTable extends LayuiTableBase {
|
|
|
- constructor() {
|
|
|
- super('tb-summary');
|
|
|
+ constructor(tableId, subject) {
|
|
|
+ super(tableId);
|
|
|
+ this.subject = subject;
|
|
|
+ this.lines = 0;
|
|
|
}
|
|
|
|
|
|
renderTable() {
|
|
|
const that = this;
|
|
|
|
|
|
- const companyList = dataHelper.getCompanyList();
|
|
|
- const tableData = dataHelper.getSummaryList();
|
|
|
- tableData.forEach(item => {
|
|
|
- Object.assign(item, {
|
|
|
- subject_quota: 0,
|
|
|
- channel_amounts: 0,
|
|
|
- channel_total_invoiced: 0,
|
|
|
- channel_invoice_quota: 0,
|
|
|
- subject_channel_delta: 0,
|
|
|
- mch_invoice_quota: 0,
|
|
|
- subject_mch_delta: 0,
|
|
|
- channel_mch_delta: 0
|
|
|
- });
|
|
|
-
|
|
|
- const activeItem = companyList.find(cItem => cItem.name === item.subject);
|
|
|
- if (activeItem !== undefined) {
|
|
|
- item.subject_quota = formatDecimals(activeItem.total_quota);
|
|
|
- }
|
|
|
+ const channelData = this.channelTableData().filter(item => {
|
|
|
+ return item.subject === that.subject;
|
|
|
});
|
|
|
+ this.lines = channelData.length;
|
|
|
+
|
|
|
+ const merchantData = this.merchantTableData();
|
|
|
+ const mch_invoice_quota = merchantData[this.subject] ?? 0;
|
|
|
+
|
|
|
+ const summaryData = dataHelper.getSummaryList().find(item => item.subject === that.subject);
|
|
|
+ const invoice_remaining_amount = summaryData === undefined || summaryData.invoice_remaining_amount === '' ? '0' : summaryData.invoice_remaining_amount;
|
|
|
+
|
|
|
+ const estimated_invoice_amount_total = channelData.reduce((total, item) => {
|
|
|
+ return total + parseFloat(item.estimated_invoice_amount);
|
|
|
+ }, 0);
|
|
|
+ let invoice_needed_amount = mch_invoice_quota - estimated_invoice_amount_total - parseFloat(invoice_remaining_amount);
|
|
|
+ for (const chan of channelData) {
|
|
|
+ chan.estimated_invoice_amount_total = formatDecimals(estimated_invoice_amount_total); //所有行都设置同一个合计值,以此满足合并需求
|
|
|
+ chan.invoice_remaining_amount = invoice_remaining_amount;
|
|
|
+ chan.invoice_needed_amount = formatDecimals(invoice_needed_amount);
|
|
|
+ }
|
|
|
|
|
|
layui.table.render({
|
|
|
elem: '#' + this.tableId,
|
|
|
- data: tableData,
|
|
|
- limit: tableData.length,
|
|
|
+ data: channelData,
|
|
|
+ limit: channelData.length,
|
|
|
cols: [[
|
|
|
- {field: 'subject', title: '对应主体', width: 150},
|
|
|
- {field: 'subject_quota', title: '本月总额度', width: 200},
|
|
|
- {field: 'channel_amounts', title: '上游本月需开票', width: 150},
|
|
|
- {field: 'channel_total_invoiced', title: '上游已开票', width: 150},
|
|
|
- {field: 'channel_invoice_quota', title: '上游可开票', width: 150},
|
|
|
- {field: 'subject_channel_delta', title: '差额(主体-上游)', width: 150},
|
|
|
- {field: 'mch_invoice_quota', title: '下游可开票', width: 150},
|
|
|
- {field: 'subject_mch_delta', title: '差额(主体-下游)', width: 150},
|
|
|
- {field: 'channel_mch_delta', title: '差额(上-下)<br>ps:还需进货', width: 150}
|
|
|
+ {field: 'store_name', title: '上游', width: 150},
|
|
|
+ {field: 'total_amounts', title: '总计', width: 200},
|
|
|
+ {field: 'total_invoiced', title: '已开', width: 150},
|
|
|
+ {field: 'estimated_invoice_amount', title: '待开', width: 150},
|
|
|
+ {field: 'estimated_invoice_amount_total', title: '合计', width: 150},
|
|
|
+ {field: 'invoice_remaining_amount', title: '现有多少票', width: 150},
|
|
|
+ {field: 'invoice_needed_amount', title: '需进票', width: 150},
|
|
|
]],
|
|
|
done: function (res, curr, count) {
|
|
|
- const channelQuota = {};
|
|
|
- const channelTb = $('#' + channelTable.tableId);
|
|
|
- const channelTrs = channelTb.next('.layui-table-view').find('.layui-table-body tbody tr');
|
|
|
- channelTrs.each(function (i, tr) {
|
|
|
- const subject = $(tr).find('td[data-field="subject"]').find('div').text();
|
|
|
- const estimated_amount = $(tr).find('td[data-field="estimated_invoice_amount"]').find('div').text();
|
|
|
- const channel_amounts = $(tr).find('td[data-field="total_amounts"]').find('div').text();
|
|
|
- const total_invoiced = $(tr).find('td[data-field="total_invoiced"]').find('div').text();
|
|
|
-
|
|
|
- if (!channelQuota[subject]) {
|
|
|
- channelQuota[subject] = {
|
|
|
- channel_amounts: 0,
|
|
|
- channel_total_invoiced: 0,
|
|
|
- channel_invoice_quota: 0
|
|
|
- };
|
|
|
- }
|
|
|
+ that.mergeCells();
|
|
|
+ that.setRole();
|
|
|
+ that.setEditCell();
|
|
|
+ that.updateTable();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- const n_estimated_amount = parseFloat(estimated_amount);
|
|
|
- channelQuota[subject].channel_invoice_quota += n_estimated_amount;
|
|
|
+ updateTable() {
|
|
|
+ this.setValueClass(['total_amounts', 'total_invoiced', 'estimated_invoice_amount', 'estimated_invoice_amount_total', 'invoice_remaining_amount', 'invoice_needed_amount']);
|
|
|
+ }
|
|
|
|
|
|
- channelQuota[subject].channel_amounts += parseFloat(channel_amounts);
|
|
|
- channelQuota[subject].channel_total_invoiced += parseFloat(total_invoiced);
|
|
|
- });
|
|
|
+ mergeCells() {
|
|
|
+ const tbRoot = $('#' + this.tableId);
|
|
|
+ const trs = tbRoot.next('.layui-table-view').find('.layui-table-body tbody tr');
|
|
|
|
|
|
- const merchantQuota = {};
|
|
|
- const merchantTb = $('#' + merchantTable.tableId);
|
|
|
- const merchantTrs = merchantTb.next('.layui-table-view').find('.layui-table-body tbody tr');
|
|
|
- merchantTrs.each(function (i, tr) {
|
|
|
- const subject = $(tr).find('td[data-field="subject"]').find('div').text();
|
|
|
- const estimated_amount = $(tr).find('td[data-field="estimated_invoice_amount"]').find('div').text();
|
|
|
- if (!merchantQuota[subject]) {
|
|
|
- merchantQuota[subject] = 0;
|
|
|
- }
|
|
|
+ const mergeColumns = ['estimated_invoice_amount_total', 'invoice_remaining_amount', 'invoice_needed_amount'];
|
|
|
+ for (let col of mergeColumns) {
|
|
|
+ trs.eq(0).find('td[data-field="' + col + '"]').attr('rowspan', this.lines);
|
|
|
+ for (let j = 1; j < this.lines; j++) {
|
|
|
+ trs.eq(j).find('td[data-field="' + col + '"]').addClass('layui-hide');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- const n_estimated_amount = parseFloat(estimated_amount);
|
|
|
- if (n_estimated_amount > 0) {
|
|
|
- merchantQuota[subject] += n_estimated_amount;
|
|
|
- }
|
|
|
- });
|
|
|
+ setEditCell() {
|
|
|
+ const that = this;
|
|
|
+ const tbRoot = $('#' + this.tableId);
|
|
|
+ const trs = tbRoot.next('.layui-table-view').find('.layui-table-body tbody tr');
|
|
|
+ trs.each(function (i, tr) {
|
|
|
+ const editNumberColumns = ['invoice_remaining_amount'];
|
|
|
+
|
|
|
+ for (let col of editNumberColumns) {
|
|
|
+ const td = $(tr).find('td[data-field="' + col + '"]').not('.layui-hide');
|
|
|
+ const valDiv = td.find('div');
|
|
|
+ valDiv.attr('contenteditable', true).css('background-color', 'lightblue');
|
|
|
+ valDiv.off('input', handleInputd2)
|
|
|
+ .off('keypress')
|
|
|
+ .off('blur')
|
|
|
+ .on('input', handleInputd2)
|
|
|
+ .on('keypress', function (e) {
|
|
|
+ if (e.keyCode === 13) {
|
|
|
+ e.preventDefault();
|
|
|
+ $(this).blur();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .on('blur', async function () {
|
|
|
+ let val = valDiv.text().trim();
|
|
|
+ if (!isNumeric(val)) {
|
|
|
+ valDiv.html('0');
|
|
|
+ }
|
|
|
+ val = normalizeAmount(val);//过滤,比如前导 0
|
|
|
+ valDiv.html(formatDecimals(val));
|
|
|
|
|
|
- const summaryTb = $('#' + that.tableId);
|
|
|
- const summaryTrs = summaryTb.next('.layui-table-view').find('.layui-table-body tbody tr');
|
|
|
- summaryTrs.each(function (i, tr) {
|
|
|
- const subjectTd = $(tr).find('td[data-field="subject"]').find('div');
|
|
|
- const subjectQuotaTd = $(tr).find('td[data-field="subject_quota"]').find('div');
|
|
|
- const channelAmountsTd = $(tr).find('td[data-field="channel_amounts"]').find('div');
|
|
|
- const channelTotalInvoicedTd = $(tr).find('td[data-field="channel_total_invoiced"]').find('div');
|
|
|
- const channelInvoiceQuotaTd = $(tr).find('td[data-field="channel_invoice_quota"]').find('div');
|
|
|
- const subjectChannelDeltaTd = $(tr).find('td[data-field="subject_channel_delta"]').find('div');
|
|
|
- const mchInvoiceQuotaTd = $(tr).find('td[data-field="mch_invoice_quota"]').find('div');
|
|
|
- const subjectMchDeltaTd = $(tr).find('td[data-field="subject_mch_delta"]').find('div');
|
|
|
- const channelMchDeltaTd = $(tr).find('td[data-field="channel_mch_delta"]').find('div');
|
|
|
-
|
|
|
- let channel_invoice_quota = 0, channel_amounts = 0, channel_total_invoiced = 0, mch_invoice_quota = 0;
|
|
|
- const subject_quota = parseFloat(subjectQuotaTd.text());
|
|
|
- const subject = subjectTd.text();
|
|
|
- if (channelQuota[subject] !== undefined) {
|
|
|
- channel_invoice_quota = channelQuota[subject].channel_invoice_quota;
|
|
|
- channel_amounts = channelQuota[subject].channel_amounts;
|
|
|
- channel_total_invoiced = channelQuota[subject].channel_total_invoiced;
|
|
|
- }
|
|
|
- if (merchantQuota[subject] !== undefined) {
|
|
|
- mch_invoice_quota = merchantQuota[subject];
|
|
|
- }
|
|
|
+ const index = $(this).parent().parent().data('index');
|
|
|
+ await that.saveEdit(index);
|
|
|
|
|
|
- channelAmountsTd.html(formatDecimals(channel_amounts));
|
|
|
- channelTotalInvoicedTd.html(formatDecimals(channel_total_invoiced));
|
|
|
- channelInvoiceQuotaTd.html(formatDecimals(channel_invoice_quota));
|
|
|
- subjectChannelDeltaTd.html(formatDecimals(subject_quota - channel_invoice_quota));
|
|
|
- mchInvoiceQuotaTd.html(formatDecimals(mch_invoice_quota));
|
|
|
- subjectMchDeltaTd.html(formatDecimals(subject_quota - mch_invoice_quota));
|
|
|
- channelMchDeltaTd.html(formatDecimals(channel_invoice_quota - mch_invoice_quota));
|
|
|
- });
|
|
|
+ that.updateTable();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- that.setValueClass(['subject_quota', 'channel_invoice_quota', 'subject_channel_delta', 'mch_invoice_quota', 'subject_mch_delta', 'channel_mch_delta']);
|
|
|
- that.setRole();
|
|
|
+ async saveEdit(index) {
|
|
|
+ const summaryData = dataHelper.getSummaryList();
|
|
|
+ if (index >= summaryData.length) {
|
|
|
+ console.error('主体数据错误:编辑索引大于主体总数');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const tr = $('#' + this.tableId).next('.layui-table-view').find('.layui-table-body tbody tr[data-index="' + index + '"]');
|
|
|
+ const invoice_remaining_amount = tr.find('td[data-field="invoice_remaining_amount"]').find('div').not('.layui-hide').text().trim();
|
|
|
+
|
|
|
+ let item = dataHelper.getSummaryList().find(item => item.subject === this.subject);
|
|
|
+ if (item === undefined) {
|
|
|
+ item = {
|
|
|
+ sort: 0,
|
|
|
+ subject: this.subject,
|
|
|
+ invoice_remaining_amount: invoice_remaining_amount
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ item.invoice_remaining_amount = invoice_remaining_amount;
|
|
|
+ }
|
|
|
+
|
|
|
+ await dataHelper.addOrUpdateData(CONSTANTS.KEY_QUOTA_SUMMARY, item, 1);
|
|
|
+
|
|
|
+ const that = this;
|
|
|
+ setTimeout(function () {
|
|
|
+ that.renderTable();
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ channelTableData() {
|
|
|
+ const data = [];
|
|
|
+
|
|
|
+ const channelTb = $('#' + channelTable.tableId);
|
|
|
+ const channelTrs = channelTb.next('.layui-table-view').find('.layui-table-body tbody tr');
|
|
|
+ channelTrs.each(function (i, tr) {
|
|
|
+ const subject = $(tr).find('td[data-field="subject"]').find('div').text();
|
|
|
+ const store_name = $(tr).find('td[data-field="store_name"]').find('div').text();
|
|
|
+ const total_amounts = $(tr).find('td[data-field="total_amounts"]').find('div').text();
|
|
|
+ const total_invoiced = $(tr).find('td[data-field="total_invoiced"]').find('div').text();
|
|
|
+ const estimated_invoice_amount = $(tr).find('td[data-field="estimated_invoice_amount"]').find('div').text();
|
|
|
+ data.push({
|
|
|
+ subject,
|
|
|
+ store_name,
|
|
|
+ total_amounts,
|
|
|
+ total_invoiced,
|
|
|
+ estimated_invoice_amount
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
+ merchantTableData() {
|
|
|
+ const data = {};
|
|
|
+
|
|
|
+ const merchantTb = $('#' + merchantTable.tableId);
|
|
|
+ const merchantTrs = merchantTb.next('.layui-table-view').find('.layui-table-body tbody tr');
|
|
|
+ merchantTrs.each(function (i, tr) {
|
|
|
+ const subject = $(tr).find('td[data-field="subject"]').find('div').text();
|
|
|
+ let estimated_invoice_amount = $(tr).find('td[data-field="estimated_invoice_amount"]').find('div').text();
|
|
|
+ estimated_invoice_amount = parseFloat(estimated_invoice_amount);
|
|
|
+
|
|
|
+ if (data[subject] === undefined) {
|
|
|
+ data[subject] = 0;
|
|
|
+ }
|
|
|
+ if (estimated_invoice_amount > 0) {
|
|
|
+ data[subject] += parseFloat(estimated_invoice_amount);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ return data;
|
|
|
}
|
|
|
|
|
|
setRole() {
|
|
@@ -1813,11 +1860,11 @@
|
|
|
|
|
|
await dataHelper.updateAllData(CONSTANTS.KEY_QUOTA_COMPANY, companyData);
|
|
|
companyTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
} else if (that.type === 'chan') {
|
|
|
await dataHelper.updateAllData(CONSTANTS.KEY_QUOTA_CHANNEL, typeData);
|
|
|
await channelTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2108,7 +2155,7 @@
|
|
|
|
|
|
await dataHelper.updateAllData(CONSTANTS.KEY_QUOTA_COMPANY, companyData);
|
|
|
companyTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
|
|
|
layer.closeAll();
|
|
|
},
|
|
@@ -2219,6 +2266,22 @@
|
|
|
return condition.month;
|
|
|
}
|
|
|
|
|
|
+ function renderSummaryTables() {
|
|
|
+ let $tables = $('#summary-tables');
|
|
|
+ $tables.html('');
|
|
|
+
|
|
|
+ const summarys = dataHelper.getSummaryList();
|
|
|
+ summarys.forEach(function(item, index) {
|
|
|
+ const subject = filterSubjectPrefix(item.subject);
|
|
|
+ $tables.append(`<div class="summary-tables-subject">${subject}</div>`);
|
|
|
+
|
|
|
+ const tableId = `tb-summary${item.subject}`;
|
|
|
+ $tables.append(`<table class="layui-hide" id="${tableId}"></table>`);
|
|
|
+ const summaryTable = new SummaryTable(tableId, item.subject);
|
|
|
+ summaryTable.renderTable();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
async function initPage() {
|
|
|
const loadIndex = layer.load(2, {shade: [0.2, '#000']});
|
|
|
|
|
@@ -2235,27 +2298,29 @@
|
|
|
companyTable.renderTable();
|
|
|
await merchantTable.renderTable();
|
|
|
await channelTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
|
|
|
//UI回调事件
|
|
|
app.on('updateCompany', () => {
|
|
|
companyTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
});
|
|
|
app.on('updateMerchant', async () => {
|
|
|
await merchantTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
});
|
|
|
app.on('updateChannel', async () => {
|
|
|
await channelTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
});
|
|
|
app.on('updateSummary', async () => {
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
});
|
|
|
|
|
|
loadMsgBadge();
|
|
|
|
|
|
+ renderSummaryTables();
|
|
|
+
|
|
|
layer.close(loadIndex);
|
|
|
}
|
|
|
|
|
@@ -2265,7 +2330,6 @@
|
|
|
const companyTable = new CompanyTable();
|
|
|
const merchantTable = new MerchantTable();
|
|
|
const channelTable = new ChannelTable();
|
|
|
- const summaryTable = new SummaryTable();
|
|
|
|
|
|
$('.ac-approve').on('click', function () {
|
|
|
if (systemUserName !== 'admin') {
|
|
@@ -2350,7 +2414,7 @@
|
|
|
|
|
|
await merchantTable.renderTable();
|
|
|
companyTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
};
|
|
|
|
|
|
const updateChannel = async (field) => {
|
|
@@ -2365,7 +2429,7 @@
|
|
|
await dataHelper.updateAllData(CONSTANTS.KEY_QUOTA_CHANNEL, channelList);
|
|
|
|
|
|
await channelTable.renderTable();
|
|
|
- summaryTable.renderTable();
|
|
|
+ renderSummaryTables();
|
|
|
};
|
|
|
|
|
|
if (col === 'actual_invoice_amount') {
|