Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 5aa5bc9

Browse files
author
sachin-maheshwari
authored
Merge pull request #9 from topcoder-platform/develop
Fix: correcting net_amount and total_amount condition
2 parents 03b1433 + 66c0f62 commit 5aa5bc9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/services/paymentService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async function createPayment (payment) {
4141
try {
4242
await connection.beginTransactionAsync()
4343
const insertDetail = await prepare(connection, INSERT_PAYMENT_DETAIL)
44-
await insertDetail.executeAsync([paymentDetailId, payment.amount, payment.amount, payment.statusId, payment.modificationRationaleId, payment.desc, payment.typeId, payment.methodId, payment.projectId, payment.charityInd, payment.grossAmount, payment.installmentNumber, payment.createUser, payment.v5ChallengeId])
44+
await insertDetail.executeAsync([paymentDetailId, payment.amount, payment.amount, payment.statusId, payment.modificationRationaleId, payment.desc, payment.typeId, payment.methodId, payment.projectId, payment.charityInd, payment.amount, payment.installmentNumber, payment.createUser, payment.v5ChallengeId])
4545
const insertPayment = await prepare(connection, INSERT_PAYMENT)
4646
await insertPayment.executeAsync([paymentId, payment.memberId, paymentDetailId])
4747
const insertDetailXref = await prepare(connection, INSERT_PAYMENT_DETAIL_XREF)

src/services/processorService.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async function processUpdate(message) {
2222
if (!legacyId) {
2323
logger.warn(`payload of challenge ${v5ChallengeId} does not contain a legacy id`)
2424
}
25-
const grossAmount = _.sumBy(_.flatMap(message.payload.prizeSets, 'prizes'), 'value')
25+
//const grossAmount = _.sumBy(_.flatMap(message.payload.prizeSets, 'prizes'), 'value')
2626

2727
// the same properties of userPayment and copilotPayment
2828
const basePayment = {
@@ -33,7 +33,6 @@ async function processUpdate(message) {
3333
charityInd: config.CHARITY_IND,
3434
installmentNumber: config.INSTALLMENT_NUMBER,
3535
createUser: createUserId,
36-
grossAmount,
3736
v5ChallengeId
3837
}
3938

0 commit comments

Comments
 (0)