ARAP Contra Entry v2

From AutoCount Resource Center
Revision as of 10:04, 5 June 2018 by DanielY (talk | contribs) (Created page with " ==Technical Specification== # Debtor and Creditor must be same currency code # Programmer can assign decimal value to '''NetTotal''' in '''ARAP Contra Entry''' # '''NetTotal'...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Technical Specification

  1. Debtor and Creditor must be same currency code
  2. Programmer can assign decimal value to NetTotal in ARAP Contra Entry
  3. NetTotal must be larger than knockoff amount(s)

References of AutoCount Accounting version 2.0

AutoCount.Accounting.dll
AutoCount.Accounting.UI.dll
AutoCount.dll
AutoCount.MainEntry.dll
AutoCount.UI.dll
AutoCount.ARAP.dll

API Usage

New

public void NewARAPContra(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.ARAP.Contra.ContraDataAccess cmd =
        AutoCount.ARAP.Contra.ContraDataAccess.Create(userSession, userSession.DBSetting);
    AutoCount.ARAP.Contra.ContraEntity doc = cmd.NewContra();

    doc.DebtorCode = "300-A001";
    doc.CreditorCode = "400-X001";
    doc.DocDate = new DateTime(2018, 6, 5);
    doc.Description = "Generate Test CONTRA";
    doc.JournalType = "GENERAL";
    doc.NetTotal = 100;

    doc.KnockOff(AutoCount.Document.DocumentType.ARInvoice, "I-000001", 100);
    doc.KnockOff(AutoCount.Document.DocumentType.APInvoice, "PI-000001", 100);

    try
    {
        cmd.SaveContra(doc, userSession.LoginUserID);
        //Log Success
        AutoCount.AppMessage.ShowMessage($"Contra '{doc.DocNo}' is created.");
    }
    catch (AutoCount.AppException ex)
    {
        //Log Fail
        AutoCount.AppMessage.ShowMessage(
            string.Format("Fail to create Contra.\n{0}", ex.Message));
    }
}

Template:SeeAlsoAccountV2

Go to menu

Go to top
Resources For AutoCount Software Developers