Compound transaction with key and foreign currency
The following section describes how a compound transactions either with key currency or foreign currencies have to be established.
Example code
// set the amount of the payment
decimal paymentAmount = 1000.0M;
// Load transactions via LoadTransactions()
errorcode = manager.LoadTransactions();
// Add here some logic to handle the error code
// Create a transaction instance
ITransaction transaction = new Transaction();
transaction.NumRangeFID = manager.Defaults.DefCompoundNumRangeFID;
transaction.TransactionTypeFID = (int)TransactionType.Compound;
transaction.DocNum = manager.Defaults.DefCompoundCurrNum;
DateTime date = DateTime.Today;
transaction.DocType = "RR";
transaction.DocDate = new DateTime(date.Year, date.Month, date.Day);
// Create your first posting
IPosting posting1 = new Posting();
posting1.AccountFID = manager.FindAccountID("1000");
posting1.Text = "TestCase Compound Transaction Posting #1";
posting1.FreeCode = "Free 1";
posting.Amount = paymentAmount;
posting.IsDebit = true;
// Create your second posting
IPosting posting2 = new Posting();
posting2.AccountFID = manager.FindAccountID("1100");
posting2.Text = "TestCase Compound Transaction Posting #1";
posting2.Amount = paymentAmount;
posting2.IsDebit = false;
transaction.Postings.Add(posting1);
transaction.Postings.Add(posting2);
// Save the created transaction
errorcode = manager.SaveTransaction(transaction);
// Add here some logic to handle the error code
UNDER CONSTRUCTION
UNDER CONSTRUCTION
UNDER CONSTRUCTION