AR Credit Note v2

Revision as of 07:18, 28 May 2018 by DanielY (talk | contribs)

Rules in AR Note

  1. Net Total of the document is read-only. The calculation of net total is from amount total.
  2. Account No. must not be Creditor Code and Bank or Cash account
  3. Account No. must be a leaf account

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

Item Group API Usage

New

public void NewARCreditNote(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.ARAP.ARCN.ARCNDataAccess cmd = AutoCount.ARAP.ARCN.ARCNDataAccess.Create(userSession, userSession.DBSetting);
    AutoCount.ARAP.ARCN.ARCNEntity doc = cmd.NewARCN();
    AutoCount.ARAP.ARCN.ARCNDTLEntity dtl = null;

    doc.DebtorCode = "300-A001";
    doc.DocDate = new DateTime(2018, 5, 23);
    doc.Description = "Interest Charge";
    doc.Reason = "Late Payment";
    doc.OurInvoiceNo = "IV-0001";

    dtl = doc.NewDetail();
    dtl.AccNo = "580-0002";
    dtl.Description = "INTEREST CHARGE";
    dtl.Amount = 0.10M;

    try
    {
        cmd.SaveARCN(doc, userSession.LoginUserID);
    }
    catch (AutoCount.AppException ex)
    {
        AutoCount.AppMessage.ShowMessage(ex.Message);
    }
}

Edit

public void EditARCreditNote(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.ARAP.ARCN.ARCNDataAccess cmd = AutoCount.ARAP.ARCN.ARCNDataAccess.Create(userSession, userSession.DBSetting);
    AutoCount.ARAP.ARCN.ARCNEntity doc = cmd.GetARCN("CN-000001");
    AutoCount.ARAP.ARCN.ARCNDTLEntity dtl = null;

    if (doc == null)
        return;

    doc.DocDate = new DateTime(2018, 5, 23);
    doc.Description = "Interest Charge";
    doc.Reason = "Late Payment";
    doc.OurInvoiceNo = "IV-000001";

    doc.ClearDetails();
    dtl.AccNo = "580-0002";
    dtl.Description = "INTEREST CHARGE";
    dtl.Amount = 0.50M;

    try
    {
        cmd.SaveARCN(doc, userSession.LoginUserID);
    }
    catch (AutoCount.AppException ex)
    {
        AutoCount.AppMessage.ShowMessage(ex.Message);
    }
}

Delete

public void DeleteARCreditNote(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.ARAP.ARCN.ARCNDataAccess cmd = AutoCount.ARAP.ARCN.ARCNDataAccess.Create(userSession, userSession.DBSetting);

    try
    {
        cmd.DeleteARCN("CN-000001", userSession.LoginUserID);
    }
    catch (AutoCount.AppException ex)
    {
        AutoCount.AppMessage.ShowMessage(ex.Message);
    }
}

Void (Cancel)

public void CancelARCreditNote(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.ARAP.ARCN.ARCNDataAccess cmd = AutoCount.ARAP.ARCN.ARCNDataAccess.Create(userSession, userSession.DBSetting);

    try
    {
        cmd.CancelARCN("CN-000001", userSession.LoginUserID);
    }
    catch (AutoCount.AppException ex)
    {
        AutoCount.AppMessage.ShowMessage(ex.Message);
    }
}

Template:SeeAlsoAccountV2

Go to menu

  Go to top
  Resources For AutoCount Software Developers