Merged in release/2024-11-15 (pull request #1935)

IO-3030 Null Check memo
This commit is contained in:
Allan Carr
2024-11-18 16:48:26 +00:00

View File

@@ -219,7 +219,11 @@ async function InsertPayment(oauthClient, qbo_realmId, req, payment, parentRef,
PaymentMethodRef: { PaymentMethodRef: {
value: paymentMethods[payment.type] value: paymentMethods[payment.type]
}, },
PrivateNote: payment.memo.length > 4000 ? payment.memo.substring(0, 4000).trim() : payment.memo.trim(), PrivateNote: payment.memo
? payment.memo.length > 4000
? payment.memo.substring(0, 4000).trim()
: payment.memo.trim()
: "",
PaymentRefNum: payment.transactionid, PaymentRefNum: payment.transactionid,
...(invoices && invoices.length === 1 && invoices[0] ...(invoices && invoices.length === 1 && invoices[0]
? { ? {