diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json
index 14c1686f5..b6b8e62bb 100644
--- a/auth-web/package-lock.json
+++ b/auth-web/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "auth-web",
- "version": "2.6.76",
+ "version": "2.6.77",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "auth-web",
- "version": "2.6.76",
+ "version": "2.6.77",
"dependencies": {
"@bcrs-shared-components/base-address": "2.0.3",
"@bcrs-shared-components/bread-crumb": "1.0.8",
diff --git a/auth-web/package.json b/auth-web/package.json
index 0124297ad..4e9de7239 100644
--- a/auth-web/package.json
+++ b/auth-web/package.json
@@ -1,6 +1,6 @@
{
"name": "auth-web",
- "version": "2.6.76",
+ "version": "2.6.77",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
diff --git a/auth-web/src/components/auth/account-freeze/AccountOverview.vue b/auth-web/src/components/auth/account-freeze/AccountOverview.vue
index efb40c265..1f9dae195 100644
--- a/auth-web/src/components/auth/account-freeze/AccountOverview.vue
+++ b/auth-web/src/components/auth/account-freeze/AccountOverview.vue
@@ -32,12 +32,12 @@
- {{ formatDateRange(invoice.fromDate, invoice.toDate) }}
+ {{ formatDateRange(statement.fromDate, statement.toDate) }}
@@ -95,7 +95,7 @@ export default defineComponent({
const suspendedDate = (currentOrganization.value?.suspendedOn) ? formatDate(new Date(currentOrganization.value.suspendedOn)) : ''
const state = reactive({
- invoices: [],
+ statements: [],
totalAmountDue: 0
})
@@ -105,7 +105,7 @@ export default defineComponent({
onMounted(async () => {
const failedInvoices: FailedInvoice = await calculateFailedInvoices()
- state.invoices = failedInvoices?.invoices || []
+ state.statements = failedInvoices?.statements || []
state.totalAmountDue = failedInvoices?.totalAmountToPay || 0
})
diff --git a/auth-web/src/models/invoice.ts b/auth-web/src/models/invoice.ts
index 7dc9a3308..677d8f90a 100644
--- a/auth-web/src/models/invoice.ts
+++ b/auth-web/src/models/invoice.ts
@@ -1,4 +1,5 @@
-import { LineItem } from '.'
+import { LineItem } from './line-item'
+import { Statement } from './statement'
export interface InvoiceList {
consInvNumber?: string
@@ -44,22 +45,14 @@ export interface FailedInvoice {
totalTransactionAmount?: number
totalAmountToPay?: number
invoices?: InvoiceList[]
-}
-
-export interface FailedEFTInvoice {
- invoices: InvoiceList[]
- totalAmountDue: number
+ statements?: Statement[]
}
export interface NonSufficientFundsInvoiceListResponse {
invoices: InvoiceList[]
+ statements: Statement[]
total: number
totalAmount: number
totalAmountRemaining: number
nsfAmount: number
}
-
-export interface EFTInvoiceListResponse {
- invoices: InvoiceList[]
- totalAmountDue: number
-}
diff --git a/auth-web/src/models/statement.ts b/auth-web/src/models/statement.ts
index c07d5d85f..7a696f193 100644
--- a/auth-web/src/models/statement.ts
+++ b/auth-web/src/models/statement.ts
@@ -9,6 +9,15 @@ export interface StatementListItem {
paymentMethods?: string[]
}
+export interface Statement {
+ id?: number
+ isInterimStatement?: boolean
+ frequency: string
+ fromDate: string
+ toDate: string
+ paymentMethods: string[]
+}
+
export interface StatementSettings {
currentFrequency?: StatementListItem
frequencies: Frequencies[]
diff --git a/auth-web/src/services/payment.services.ts b/auth-web/src/services/payment.services.ts
index 667b35c76..5dd8989e3 100644
--- a/auth-web/src/services/payment.services.ts
+++ b/auth-web/src/services/payment.services.ts
@@ -218,10 +218,6 @@ export default class PaymentService {
return axios.get(`${ConfigHelper.getPayAPIURL()}/accounts/${accountId}/nsf`)
}
- static getEFTInvoices (accountId: string | number): AxiosPromise {
- return axios.get(`${ConfigHelper.getPayAPIURL()}/accounts/${accountId}/eft`)
- }
-
static downloadNSFInvoicesPDF (accountId: string | number): AxiosPromise {
const url = `${ConfigHelper.getPayAPIURL()}/accounts/${accountId}/nsf/statement`
const headers = { 'Accept': 'application/pdf' }
diff --git a/auth-web/src/stores/org.ts b/auth-web/src/stores/org.ts
index e2d9dc075..34741ed5e 100644
--- a/auth-web/src/stores/org.ts
+++ b/auth-web/src/stores/org.ts
@@ -36,8 +36,8 @@ import {
} from '@/models/Organization'
import { BcolAccountDetails, BcolProfile } from '@/models/bcol'
import { CreateRequestBody as CreateInvitationRequestBody, Invitation } from '@/models/Invitation'
-import { EFTInvoiceListResponse, FailedEFTInvoice, FailedInvoice, NonSufficientFundsInvoiceListResponse } from '@/models/invoice'
import { EftRefundRequest, RefundRequest } from './../models/refund'
+import { FailedInvoice, NonSufficientFundsInvoiceListResponse } from '@/models/invoice'
import { Products, ProductsRequestBody } from '@/models/Staff'
import { StatementFilterParams, StatementNotificationSettings, StatementSettings, StatementsSummary } from '@/models/statement'
import { computed, reactive, toRefs } from '@vue/composition-api'
@@ -766,16 +766,6 @@ export const useOrgStore = defineStore('org', () => {
}
}
- async function getEFTInvoices (): Promise {
- try {
- const response = await PaymentService.getEFTInvoices(state.currentOrganization.id)
- return response?.data || {}
- } catch (error) {
- // eslint-disable-next-line no-console
- console.error('get EFT invoices operation failed! - ', error)
- }
- }
-
async function downloadNSFInvoicesPDF (): Promise {
try {
const response = await PaymentService.downloadNSFInvoicesPDF(state.currentOrganization.id)
@@ -789,29 +779,20 @@ export const useOrgStore = defineStore('org', () => {
async function calculateFailedInvoices (): Promise {
const nsfInvoices = await getNSFInvoices()
const invoices = nsfInvoices?.invoices || []
+ const statements = nsfInvoices?.statements || []
const totalAmount = nsfInvoices?.totalAmount || 0
const totalAmountRemaining = nsfInvoices?.totalAmountRemaining || 0
const nsfAmount = nsfInvoices?.nsfAmount || 0
return {
invoices: invoices,
+ statements: statements,
nsfFee: nsfAmount,
totalAmountToPay: totalAmountRemaining,
totalTransactionAmount: totalAmount
}
}
- async function calculateFailedEFTInvoices (): Promise {
- const fetchInvoices = await getEFTInvoices()
- const invoices = fetchInvoices?.invoices || []
- const totalAmountDue = fetchInvoices?.totalAmountDue || 0
-
- return {
- invoices: invoices,
- totalAmountDue: totalAmountDue
- }
- }
-
async function resetAccountSetupProgress (): Promise {
setGrantAccess(false)
setCurrentOrganization(undefined)
@@ -1146,7 +1127,6 @@ export const useOrgStore = defineStore('org', () => {
updateStatementNotifications,
getOrgPayments,
calculateFailedInvoices,
- calculateFailedEFTInvoices,
resetAccountSetupProgress,
resetAccountWhileSwitchingPremium,
createOutstandingAccountPayment,
diff --git a/auth-web/src/views/auth/account-freeze/AccountHoldView.vue b/auth-web/src/views/auth/account-freeze/AccountHoldView.vue
index 0843fb1b3..f95675565 100644
--- a/auth-web/src/views/auth/account-freeze/AccountHoldView.vue
+++ b/auth-web/src/views/auth/account-freeze/AccountHoldView.vue
@@ -30,11 +30,11 @@
Overdue Statements
- {{ formatDateRange(invoice.fromDate, invoice.toDate) }}
+ {{ formatDateRange(statement.fromDate, statement.toDate) }}
import { computed, defineComponent, onMounted, reactive, toRefs } from '@vue/composition-api'
import CommonUtils from '@/util/common-util'
-import { FailedEFTInvoice } from '@/models/invoice'
+import { FailedInvoice } from '@/models/invoice'
import moment from 'moment'
import sanitizeHtml from 'sanitize-html'
import { useOrgStore } from '@/stores/org'
@@ -76,13 +76,12 @@ export default defineComponent({
const orgStore = useOrgStore()
const currentOrganization = computed(() => orgStore.currentOrganization)
const getAccountAdministrator = orgStore.getAccountAdministrator
- const calculateFailedInvoices: any = orgStore.calculateFailedEFTInvoices
- console.log(currentOrganization.value.id)
+ const calculateFailedInvoices: any = orgStore.calculateFailedInvoices
const formatDate = CommonUtils.formatDisplayDate
const formatDateRange = CommonUtils.formatDateRange
const state = reactive({
- invoices: [],
+ statements: [],
suspendedDate: (currentOrganization.value?.suspendedOn) ? formatDate(moment(currentOrganization.value.suspendedOn)) : '',
accountAdministratorEmail: ''
})
@@ -97,9 +96,9 @@ export default defineComponent({
})
onMounted(async () => {
- setAdminContact()
- const failedInvoices: FailedEFTInvoice = await calculateFailedInvoices()
- state.invoices = failedInvoices?.invoices || []
+ await setAdminContact()
+ const failedInvoices: FailedInvoice = await calculateFailedInvoices()
+ state.statements = failedInvoices?.statements || []
})
return {