CA Error on saving an ARPayment in 22R1

  • 11 November 2022
  • 3 replies

Userlevel 1

Hello, Does anybody knows why am I getting a “CA Error The TranDate value of the CADailySummary table is incorrect because it contains a time component. The format must be yyyy-mm-dd” when trying to save an ARPayment record.

My code is:

ARPaymentEntry graphPAY = PXGraph.CreateInstance<ARPaymentEntry>();
ARPayment payment = new ARPayment();
payment.DocType = "PMT";
payment.ExtRefNbr = paymentRecord.tid;
payment.CustomerID = salesOrders.CustomerID;
payment.AdjDate = creationDate;
payment.DocDesc = ihubOrder.storeCode;
payment.CuryOrigDocAmt = paymentRecord.value;
//payment.AdjFinPeriodID = creationDate.ToString("MM-yyyy");
PaymentMethod method = SelectFrom<PaymentMethod>.Where<PaymentMethodExt.usrMarketPlacePaymentMethod.IsEqual<@P.AsString>>.View.Select(graphSO,;
if (method != null)
payment.PaymentMethodID = method.PaymentMethodID;
payment.PaymentMethodID = "DEFAULT"; //DEFAULT

CashAccount cashAcc = SelectFrom<CashAccount>.Where<CashAccount.cashAccountCD.IsEqual<@P.AsString>>.View.Select(graphSO, "BANAMEX001"); // BANAMEX001
if (cashAcc != null)
payment.CashAccountID = cashAcc.CashAccountID;

I hope somebody could help me. I just can’t fin the light on this issue.

Thanks in advance.


Best answer by Dmitrii Naumov 11 November 2022, 13:48

View original

3 replies

Userlevel 5
Badge +1

I find that I get CADSummary errors when the BranchID doesn't get set. If you can, I would debug and check, other option is to get it from AccessInfo

Userlevel 7
Badge +17

Hi @albertobello83  Not sure about the error and have never seen it.

I tried with the below sample code to create the payment and it is working fine for me.


Hope this can help you!

ARPaymentEntry graphPAY = PXGraph.CreateInstance<ARPaymentEntry>();
ARPayment payment = new ARPayment();
payment.DocType = "PMT";
payment.ExtRefNbr = "TEST ExtRefNbr";
payment.CustomerID = 7048;
payment.AdjDate = Base.Accessinfo.BusinessDate;
payment.DocDesc = "Test Desc";
payment.CuryOrigDocAmt = 50m;
payment.PaymentMethodID = "CASH";



Userlevel 7
Badge +5

You have payment.AdjDate = creationDate, which, I assume, contains the time component. 

It must only contain date, the time must be set to 00:00:00.000 for all Date fields in the ARPayment document


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved