What I want to do is create an order with no Trust Account.
Then go to the Register and unclick the Proform Generate Transactions check box.
This way I only get the pending ledger transfer transactions in the Register.
Then I want to select Generate Pending Transactions and select the pending disbursement to the B contact to pull it into the Register.
So in the API in order to get the ledger I have to assign a Trust Account to the order.
I do so by using:
Code: Select all
IAccountsManager am = (IAccountsManager)userObject.sps.GetService<IAccountsManager>();
ITrustAccountInfo trustAccount = am.TrustAccounts.Where(t => t.Code == "ILCMTUS7020").FirstOrDefault();
((IOrder)order).SetTag("TrustAccountId", trustAccount.ID.ToString());
Code: Select all
string ordnum = order.Number;
ILedgersManager lm = userObject.sps.GetService<ILedgersManager>();
ILedgerInfo info = lm.Ledgers.Where(l => l.Name == ordnum).FirstOrDefault();
IOrderLedger ledger = (IOrderLedger)lm.GetLedger(info);
Code: Select all
ledger.EnableProFormGeneratedTransactions = false;
What I would like to see is only the two Ledger Transfer transactions in ledger.Transactions but I see 4 which includes a check and a receipt, I believe it is. And if I get the ledger again it comes back with the ledger.EnableProFormGeneratedTransactions set to true.
Any ideas or help would be appreciated.