Page 1 of 1

Inconsistent "The transaction date must be today or tomorrow." message

Posted: Mon Jul 24, 2023 9:56 pm
by ckootg
We're seeing inconsistent "The transaction date must be today or tomorrow." messages. When trying to post transfer in/out transactions after hours, some transactions will post successfully, while others get "The transaction date must be today or tomorrow." message. We haven't seen these errors during business hours. Why is the message inconsistent or is it something we're doing wrong?

The account used does not have the "Use any transaction date" permission.

This is the code we use.

Code: Select all

var newTransaction = transactionsManager.NewTransaction<ILedgerTransferOutTransaction>(ledgerInfo);
newTransaction.Memo = memo;
newTransaction.Amount = amount;
newTransaction.Name = name;
newTransaction.Status = TransactionStatus.Posted;

var ledgerInTransaction = transactionsManager.NewLedgerTransferIn(newTransaction, ledgerInInfo, TransactionStatus.Posted, null);

ledgerInTransaction.Memo = transferInMemo;

ledgerInTransaction.Splits.Where(s => s.Kind == TransactionSplitKind.Applied).FirstOrDefault().Amount = amount;
ledgerInTransaction.Splits.Where(s => s.Kind == TransactionSplitKind.Unapplied).FirstOrDefault().Amount = 0;

ledgerInTransaction.Name = orderNumber;
ledgerInTransaction.Tags.Add(new Tag("OrderContactID", contactId));

ledgerInTransaction.Medium = medium;

transactionsManager.ApplyChanges(null, newTransaction);

Re: Inconsistent "The transaction date must be today or tomorrow." message

Posted: Fri Jul 28, 2023 5:59 pm
by PaulMcCullough
Do you know the times that these failures happen? And do you have Office Hours configured for the profile you connect with from your code?

Re: Inconsistent "The transaction date must be today or tomorrow." message

Posted: Fri Jul 28, 2023 7:49 pm
by ckootg
They happened after 6pm. I don't have access to spAdmin, but from what I could gather from the database, the start of business day is 1753-01-01 00:00:00.000 and end of business day is 1753-01-01 23:59:00.000.

Re: Inconsistent "The transaction date must be today or tomorrow." message

Posted: Mon Jul 31, 2023 11:36 am
by PaulMcCullough
We are looking to see if there is an edge condition you might be encountering. I have a few more questions.

Is your integration code a server integration, shell integration, or a standalone application?
Does your integration code run in a different time zone than the server?
Do you have any specific examples of the time value when you see success vs. failure?
Are the failures grouped together or do you have some successful transactions mixed in around the same time as failed transactions?

Re: Inconsistent "The transaction date must be today or tomorrow." message

Posted: Mon Jul 31, 2023 2:54 pm
by ckootg
  • Standalone application
  • Specific times for success and failure
    • success 2023-07-19 18:04:18.903, 2023-07-19 18:04:35.013
    • failure 2023-07-19 18:04:04.930, 2023-07-19 18:04:35.013, 2023-07-19 18:04:57.703
  • Successful transactions mixed in failed transactions

Re: Inconsistent "The transaction date must be today or tomorrow." message

Posted: Tue Aug 01, 2023 10:47 am
by PaulMcCullough
Sorry, I looked at this issue with several of my teammates but due to its complexity, it is out of scope for this forum. For in-depth assistance, please contact SoftPro Customer Support so that someone on the Select team can review this issue.