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

deploy fix #15

Merged
merged 2 commits into from
Dec 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/services/paymentService.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ async function paymentExists(payment, connection) {
* @param {Object} payment the payment info
*/
async function createPayment(payment) {
let connection
try {
const connection = await helper.getInformixConnection()
connection = await helper.getInformixConnection()
await connection.beginTransactionAsync()

const existing = await paymentExists(payment, connection)
Expand All @@ -85,8 +86,7 @@ async function createPayment(payment) {
const paymentDetailId = await paymentDetailIdGen.getNextId()
const paymentId = await paymentIdGen.getNextId()
const insertDetail = await prepare(connection, INSERT_PAYMENT_DETAIL)
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.
])
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])
const insertPayment = await prepare(connection, INSERT_PAYMENT)
await insertPayment.executeAsync([paymentId, payment.memberId, paymentDetailId])
const insertDetailXref = await prepare(connection, INSERT_PAYMENT_DETAIL_XREF)
Expand Down