Skip to content

Commit 4b4779d

Browse files
authored
Merge pull request Expensify#77812 from Expensify/jsenyitko-release-4-reimbursable-amt
Add reimbursable total and non reimbursable total to custom columns
2 parents e24ddc8 + dc739cb commit 4b4779d

16 files changed

Lines changed: 89 additions & 0 deletions

File tree

src/CONST/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6722,6 +6722,8 @@ const CONST = {
67226722
TITLE: this.TABLE_COLUMNS.TITLE,
67236723
FROM: this.TABLE_COLUMNS.FROM,
67246724
TO: this.TABLE_COLUMNS.TO,
6725+
REIMBURSABLE_TOTAL: this.TABLE_COLUMNS.REIMBURSABLE_TOTAL,
6726+
NON_REIMBURSABLE_TOTAL: this.TABLE_COLUMNS.NON_REIMBURSABLE_TOTAL,
67256727
REPORT_ID: this.TABLE_COLUMNS.REPORT_ID,
67266728
BASE_62_REPORT_ID: this.TABLE_COLUMNS.BASE_62_REPORT_ID,
67276729
ACTION: this.TABLE_COLUMNS.ACTION,
@@ -6826,6 +6828,8 @@ const CONST = {
68266828
REPORT_ID: 'reportID',
68276829
BASE_62_REPORT_ID: 'base62ReportID',
68286830
TAX: 'tax',
6831+
REIMBURSABLE_TOTAL: 'reimbursableTotal',
6832+
NON_REIMBURSABLE_TOTAL: 'nonReimbursableTotal',
68296833
},
68306834
SYNTAX_OPERATORS: {
68316835
AND: 'and',

src/components/SelectionListWithSections/Search/ExpenseReportListItemRow.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ function ExpenseReportListItemRow({
7979
return {total: reportTotal, currency: reportCurrency};
8080
}, [item.type, item.total, item.currency]);
8181

82+
const nonReimbursableTotal = item.nonReimbursableTotal ?? 0;
83+
const reimbursableTotal = total - nonReimbursableTotal;
84+
8285
const columnComponents = {
8386
[CONST.SEARCH.TABLE_COLUMNS.DATE]: (
8487
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.DATE, item.shouldShowYear)]}>
@@ -145,6 +148,22 @@ function ExpenseReportListItemRow({
145148
)}
146149
</View>
147150
),
151+
[CONST.SEARCH.TABLE_COLUMNS.REIMBURSABLE_TOTAL]: (
152+
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.TOTAL)]}>
153+
<TotalCell
154+
total={reimbursableTotal}
155+
currency={currency}
156+
/>
157+
</View>
158+
),
159+
[CONST.SEARCH.TABLE_COLUMNS.NON_REIMBURSABLE_TOTAL]: (
160+
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.TOTAL)]}>
161+
<TotalCell
162+
total={nonReimbursableTotal}
163+
currency={currency}
164+
/>
165+
</View>
166+
),
148167
[CONST.SEARCH.TABLE_COLUMNS.TOTAL]: (
149168
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.TOTAL)]}>
150169
<TotalCell

src/components/SelectionListWithSections/SearchTableHeader.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,14 @@ const getExpenseReportHeaders = (profileIcon?: IconAsset): SearchColumnConfig[]
212212
columnName: CONST.SEARCH.TABLE_COLUMNS.TO,
213213
translationKey: 'common.to',
214214
},
215+
{
216+
columnName: CONST.SEARCH.TABLE_COLUMNS.REIMBURSABLE_TOTAL,
217+
translationKey: 'common.reimbursableTotal',
218+
},
219+
{
220+
columnName: CONST.SEARCH.TABLE_COLUMNS.NON_REIMBURSABLE_TOTAL,
221+
translationKey: 'common.nonReimbursableTotal',
222+
},
215223
{
216224
columnName: CONST.SEARCH.TABLE_COLUMNS.TOTAL,
217225
translationKey: 'common.total',

src/languages/de.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,8 @@ const translations: TranslationDeepObject<typeof en> = {
691691
actionRequired: 'Aktion erforderlich',
692692
duplicate: 'Duplizieren',
693693
duplicated: 'Dupliziert',
694+
reimbursableTotal: 'Erstattungsfähiger Gesamtbetrag',
695+
nonReimbursableTotal: 'Nicht erstattungsfähiger Gesamtbetrag',
694696
originalAmount: 'Ursprünglicher Betrag',
695697
},
696698
supportalNoAccess: {

src/languages/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,8 @@ const translations = {
682682
actionRequired: 'Action required',
683683
duplicate: 'Duplicate',
684684
duplicated: 'Duplicated',
685+
reimbursableTotal: 'Reimbursable total',
686+
nonReimbursableTotal: 'Non-reimbursable total',
685687
},
686688
supportalNoAccess: {
687689
title: 'Not so fast',

src/languages/es.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ const translations: TranslationDeepObject<typeof en> = {
378378
actionRequired: 'Acción requerida',
379379
duplicate: 'Duplicar',
380380
duplicated: 'Duplicado',
381+
reimbursableTotal: 'Total reembolsable',
382+
nonReimbursableTotal: 'Total no reembolsable',
381383
},
382384
supportalNoAccess: {
383385
title: 'No tan rápido',

src/languages/fr.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,8 @@ const translations: TranslationDeepObject<typeof en> = {
693693
actionRequired: 'Action requise',
694694
duplicate: 'Dupliquer',
695695
duplicated: 'Dupliqué',
696+
reimbursableTotal: 'Total remboursable',
697+
nonReimbursableTotal: 'Total non remboursable',
696698
originalAmount: 'Montant d’origine',
697699
},
698700
supportalNoAccess: {

src/languages/it.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,8 @@ const translations: TranslationDeepObject<typeof en> = {
692692
actionRequired: 'Azione richiesta',
693693
duplicate: 'Duplica',
694694
duplicated: 'Duplicato',
695+
reimbursableTotal: 'Totale rimborsabile',
696+
nonReimbursableTotal: 'Totale non rimborsabile',
695697
originalAmount: 'Importo originale',
696698
},
697699
supportalNoAccess: {

src/languages/ja.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,8 @@ const translations: TranslationDeepObject<typeof en> = {
691691
actionRequired: '対応が必要',
692692
duplicate: '複製',
693693
duplicated: '重複',
694+
reimbursableTotal: '経費精算対象の合計',
695+
nonReimbursableTotal: '非払い戻し合計',
694696
originalAmount: '元の金額',
695697
},
696698
supportalNoAccess: {

src/languages/nl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,8 @@ const translations: TranslationDeepObject<typeof en> = {
692692
actionRequired: 'Actie vereist',
693693
duplicate: 'Dupliceren',
694694
duplicated: 'Gedupliceerd',
695+
reimbursableTotal: 'Totaal te vergoeden',
696+
nonReimbursableTotal: 'Niet-vergoedbaar totaal',
695697
originalAmount: 'Oorspronkelijk bedrag',
696698
},
697699
supportalNoAccess: {

0 commit comments

Comments
 (0)