Skip to content

Commit 5fd7ac7

Browse files
authored
Merge pull request #1095 from topcoder-platform/diazz-admin-f2f-30376988
Admin billing accounts: always set payment_terms_id = 1 when send update
2 parents 538deb9 + 6f686e3 commit 5fd7ac7

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

src/apps/admin/src/billing-account/BillingAccountNewPage/BillingAccountNewPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import _ from 'lodash'
1414
import classNames from 'classnames'
1515
import moment from 'moment'
1616

17+
import { EnvironmentConfig } from '~/config'
1718
import {
1819
Button,
1920
InputDatePicker,
@@ -133,7 +134,7 @@ export const BillingAccountNewPage: FC<Props> = (props: Props) => {
133134
name: billingAccount.name,
134135
paymentTerms: billingAccount.paymentTerms
135136
? parseInt(billingAccount.paymentTerms, 10) ?? 0
136-
: undefined,
137+
: EnvironmentConfig.ADMIN.DEFAULT_PAYMENT_TERMS,
137138
poNumber: billingAccount.poNumber,
138139
salesTax: billingAccount.salesTax,
139140
startDate: billingAccount.startDate,

src/config/environments/default.env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const ADMIN = {
8080
AV_SCAN_SCORER_REVIEW_TYPE_ID: '68c5a381-c8ab-48af-92a7-7a869a4ee6c3',
8181
CHALLENGE_URL: 'https://www.topcoder-dev.com/challenges',
8282
CONNECT_URL: 'https://connect.topcoder-dev.com',
83+
DEFAULT_PAYMENT_TERMS: 1,
8384
DIRECT_URL: 'https://www.topcoder-dev.com/direct',
8485
ONLINE_REVIEW_URL: 'https://software.topcoder-dev.com/review',
8586
WORK_MANAGER_URL: 'https://challenges.topcoder-dev.com',

src/config/environments/global-config.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export interface GlobalConfig {
4545
},
4646
ADMIN: {
4747
CONNECT_URL: string
48+
DEFAULT_PAYMENT_TERMS: number
4849
DIRECT_URL: string
4950
WORK_MANAGER_URL: string
5051
ONLINE_REVIEW_URL: string

src/config/environments/prod.env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const ADMIN = {
1010
AV_SCAN_SCORER_REVIEW_TYPE_ID: '55bbb17d-aac2-45a6-89c3-a8d102863d05',
1111
CHALLENGE_URL: 'https://www.topcoder.com/challenges',
1212
CONNECT_URL: 'https://connect.topcoder.com',
13+
DEFAULT_PAYMENT_TERMS: 1,
1314
DIRECT_URL: 'https://www.topcoder.com/direct',
1415
ONLINE_REVIEW_URL: 'https://software.topcoder.com/review',
1516
WORK_MANAGER_URL: 'https://challenges.topcoder.com',

0 commit comments

Comments
 (0)