PostPurchasesCreditJournal - accountsIQ/API-Wiki GitHub Wiki

The PostPurchasesCreditJournal function posts a ledger journal.

Declaration

C#

public WSResultStatus PostPurchasesCreditJournal(String token, WSLedgerJournal journal)

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.
journal WSLedgerJournal The journal to be posted.

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 result = ws.PostPurchasesCreditJournal(auth, wsledsgerJournal);

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

}
            

See Also

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