mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
feat(reports): drop the raw booking ID from revenue transactions
The bare UUID column sat next to the booking reference it duplicates, and a reference is what anyone reading or exporting this report actually quotes. The report is the audit trail for an export, so a column nobody can act on is weight in every downloaded file.
This commit is contained in:
@@ -73,7 +73,6 @@ export const revenueTransactionsReport: ReportDefinition = {
|
|||||||
{ key: 'issuedAt', label: 'Issued', type: 'date', sortable: true, sortExpr: REVENUE_DATE },
|
{ key: 'issuedAt', label: 'Issued', type: 'date', sortable: true, sortExpr: REVENUE_DATE },
|
||||||
{ key: 'invoiceNumber', label: 'Invoice No.', type: 'string', sortable: true, sortExpr: 'i.invoice_number' },
|
{ key: 'invoiceNumber', label: 'Invoice No.', type: 'string', sortable: true, sortExpr: 'i.invoice_number' },
|
||||||
{ key: 'bookingRef', label: 'Booking', type: 'string', sortable: true, sortExpr: 'b.reference' },
|
{ key: 'bookingRef', label: 'Booking', type: 'string', sortable: true, sortExpr: 'b.reference' },
|
||||||
{ key: 'bookingId', label: 'Booking ID', type: 'string' },
|
|
||||||
{ key: 'payer', label: 'Customer', type: 'string', sortable: true, sortExpr: PAYER_EXPR },
|
{ key: 'payer', label: 'Customer', type: 'string', sortable: true, sortExpr: PAYER_EXPR },
|
||||||
{ key: 'category', label: 'Revenue category', type: 'string', sortable: true, sortExpr: REVENUE_CATEGORY_EXPR },
|
{ key: 'category', label: 'Revenue category', type: 'string', sortable: true, sortExpr: REVENUE_CATEGORY_EXPR },
|
||||||
{ key: 'paymentClass', label: 'Payment class', type: 'string' },
|
{ key: 'paymentClass', label: 'Payment class', type: 'string' },
|
||||||
@@ -96,7 +95,6 @@ export const revenueTransactionsReport: ReportDefinition = {
|
|||||||
.select(`to_char(${REVENUE_DATE}, 'YYYY-MM-DD HH24:MI')`, 'issuedAt')
|
.select(`to_char(${REVENUE_DATE}, 'YYYY-MM-DD HH24:MI')`, 'issuedAt')
|
||||||
.addSelect('i.invoice_number', 'invoiceNumber')
|
.addSelect('i.invoice_number', 'invoiceNumber')
|
||||||
.addSelect("COALESCE(b.reference, '—')", 'bookingRef')
|
.addSelect("COALESCE(b.reference, '—')", 'bookingRef')
|
||||||
.addSelect("COALESCE(b.id::text, '')", 'bookingId')
|
|
||||||
.addSelect(PAYER_EXPR, 'payer')
|
.addSelect(PAYER_EXPR, 'payer')
|
||||||
.addSelect(REVENUE_CATEGORY_EXPR, 'category')
|
.addSelect(REVENUE_CATEGORY_EXPR, 'category')
|
||||||
.addSelect(PAYMENT_CLASS_EXPR, 'paymentClass')
|
.addSelect(PAYMENT_CLASS_EXPR, 'paymentClass')
|
||||||
|
|||||||
Reference in New Issue
Block a user