CSFCA error while trying to create a CashHead

It looks like someone was able to get it working using the ChangeReceiptAmt instead of ChangeTranAmtCashHead here: MassGenerateCashDtl / GenerateCashDtl - #4 by Jeff_Owens

I’m not sure if that’s the issue, but you could try something like

Action<string, dynamic> CreateMiscCashReceipt = (pGrpID, pCashReceipt) =>
{
    try
    {
        CallService<Erp.Contracts.CashRecSvcContract>(bo =>
        {
            var cashTs = new Erp.Tablesets.CashRecTableset();
            bo.GetNewCashHeadType(ref cashTs, pGrpID, "MisPay");

            var cashHead = cashTs.CashHead.FirstOrDefault(c => c.Added());
            if (cashHead == null)
                throw new Exception("Impossible de créer l'entête Miscellaneous");
            

            string checkNum = pCashReceipt.CheckNum;
            cashHead.CheckRef = checkNum; 

            decimal amount = pCashReceipt.Amount;
            cashHead.ReceiptAmt = amount;

            bo.ChangeReceiptAmt( ref cashTs );

            bool outUpdate;
            bo.PreUpdate(ref cashTs, out outUpdate);
            decimal opTotalCashReceived;
            decimal opTotalApplied;
            decimal opUnappliedBalance;
            decimal opTotalMisc;
            decimal opTotalDiscount;
            decimal opTotalDeposit;
            decimal opTotalARAmount;
            decimal opTotalWithold;
            decimal opTotalWriteOff;
            bool opUpdateRan;
            
            
            bo.UpdateMaster(ref cashTs, pGrpID, "CashHead", true, out opTotalCashReceived, out opTotalApplied, out opUnappliedBalance, out opTotalMisc, out opTotalDiscount, out opTotalDeposit, out opTotalARAmount, out opTotalWithold, out opTotalWriteOff, out opUpdateRan, 2);
            
            
        });
    }
    catch (Exception ex)
    {
        oSuccess = false;
        _messageList.Add(ex.ToString());
    }
};