PostPurchasesCreditJournalGetBackTransactionID - accountsIQ/API-Wiki GitHub Wiki

The PostPurchasesCreditJournalGetBackTransactionID function posts a ledger journal.

Declaration

C#

public WSResultStatus PostPurchasesCreditJournalGetBackTransactionID(String token, WSLedgerJournal journal, out int transactionID)

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.
journal WSLedgerJournal The journal to be posted.
transactionID int The transaction Id that will be returned once the journal posts successfully.

Example

C#

Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);

if (auth != null)
{
    var wsledsgerJournal = new WSLedgerJournal();
wsledsgerJournal.AccountCode = "AMAZ01";
wsledsgerJournal.ExchangeRate = 1;
wsledsgerJournal.JournalNumber = "Example journal";
wsledsgerJournal.TransactionDate = DateTime.Now;
wsledsgerJournal.Lines = new WSLedgerJournalLine[2];
wsledsgerJournal.Lines[0] = new WSLedgerJournalLine()
{
    Amount = 200,
    BankExchangeRate = 1,
    DepartmentID = "Dept 1",
    Description = "An example line in a jounal",
    GLAccountCode = "10000"
};
wsledsgerJournal.Lines[1] = new WSLedgerJournalLine()
{
    Amount = 15,
    BankExchangeRate = 1,
    DepartmentID = "Dept 1",
    Description = "Another example line in a jounal",
    GLAccountCode = "10000"
};

var transactionId = 0;
var result = ws.PostPurchasesCreditJournalGetBackTransactionID(auth, wsledsgerJournal, out transactionId);

Console.WriteLine(
    $"Result status: {result.Status} " +
    $"\r\nTransaction Id: {transactionId} " +
    $"\r\n----------------------------------\r\n");

}
            

See Also

⚠️ **GitHub.com Fallback** ⚠️