AP Debit Note: Difference between revisions

From AutoCount Resource Center
Content added Content deleted
(Created page with "==Rules in AP Debit Note== ==References of AutoCount Accounting version 2.0== {{BaseReferenceAC20}} '''AutoCount.ARAP.dll''' ==AP Payment API Usage== ===New=== <syntaxhigh...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1:
==Rules in AP Debit Note==
 
==References of AutoCount Accounting version 21.08, 1.9==
{{BaseReferenceAC18}}
'''BCE.AutoCount.ARAP.dll'''
 
==Rules in AP Debit Note API Usage==
==References of AutoCount Accounting version 2.0==
{{BaseReferenceAC20}}
'''AutoCount.ARAP.dll'''
 
==AP Payment API Usage==
===New===
<syntaxhighlight lang="csharp">
public void NewAPDebitNoteEntry(AutoCountBCE.AuthenticationData.UserSessionDBSetting userSessiondbSetting)
{
string userId = BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID;
AutoCount.ARAP.APDN.APDNDataAccess cmd =
BCE.AutoCount.ARAP.APDN.APDNDataAccess.Create(userSession, userSession.DBSetting);cmd =
BCE.AutoCount.ARAP.APDN.APDNEntity doc = cmdAPDNDataAccess.NewAPDNCreate(dbSetting);
BCE.AutoCount.ARAP.APDN.APDNDTLEntityAPDNEntity dtldoc = nullcmd.NewAPDN();
BCE.AutoCount.ARAP.APDN.APDNDataAccessAPDNDTLEntity cmddtl = null;
 
 
Line 24 ⟶ 23:
try
{
cmd.SaveAPDN(doc, userSession.LoginUserIDuserId);
//Log success
AutoCountBCE.Application.AppMessage.ShowMessage(string.Format("AP Debit Note '{0}' is created.", doc.DocNo));
}
catch (AutoCountBCE.Application.AppException ex)
{
//Log Error
AutoCountBCE.Application.AppMessage.ShowMessage("Fail to create new AP Debit Note.\n" + ex.Message);
}
}
Line 38 ⟶ 37:
===Edit===
<syntaxhighlight lang="csharp">
public void EditAPDebitNoteEntry(AutoCountBCE.AuthenticationData.UserSessionDBSetting userSessiondbSetting)
{
string docNo = "DN-000001";
string userId = BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID;
AutoCount.ARAP.APDN.APDNDataAccess cmd =
BCE.AutoCount.ARAP.APDN.APDNDataAccess.Create(userSession, userSession.DBSetting);cmd =
BCE.AutoCount.ARAP.APDN.APDNEntity doc = cmdAPDNDataAccess.GetAPDNCreate(docNodbSetting);
BCE.AutoCount.ARAP.APDN.APDNDTLEntityAPDNEntity dtldoc = nullcmd.GetAPDN(docNo);
BCE.AutoCount.ARAP.APDN.APDNDataAccessAPDNDTLEntity cmddtl = null;
 
if (doc == null)
Line 58:
try
{
cmd.SaveAPDN(doc, userSession.LoginUserIDuserId);
//Log success
AutoCountBCE.Application.AppMessage.ShowMessage(string.Format("AP Debit Note '{0}' is updated.", doc.DocNo));
}
catch (AutoCountBCE.Application.AppException ex)
{
//Log Error
AutoCountBCE.Application.AppMessage.ShowMessage("Fail to update AP Debit Note.\n" + ex.Message);
}
}
Line 72:
===Cancel (Void)===
<syntaxhighlight lang="csharp">
public void CancelAPDebitNote(AutoCountBCE.AuthenticationData.UserSessionDBSetting userSessiondbSetting)
{
string docNo = "DN-000001";
BCE.AutoCount.ARAP.APDN.APDNDataAccess cmd =
BCE.AutoCount.ARAP.APDN.APDNDataAccess.Create(userSession, userSession.DBSettingdbSetting);
try
{
cmd.CancelAPDN(docNo, userSessionBCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID);
}
catch (AutoCountBCE.Application.AppException ex)
{
//log error
Line 90:
===Delete===
<syntaxhighlight lang="csharp">
public void DeleteAPDebitNote(AutoCountBCE.AuthenticationData.UserSessionDBSetting userSessiondbSetting)
{
string docNo = "DN-000001";
BCE.AutoCount.ARAP.APDN.APDNDataAccess cmd =
BCE.AutoCount.ARAP.APDN.APDNDataAccess.Create(userSession, userSession.DBSettingdbSetting);
try
{
cmd.DeleteAPDN(docNo, userSessionBCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID);
}
catch (AutoCountBCE.Application.AppException ex)
{
//log error
Line 107:
 
<br />
{{SeeAlsoAPIAccount}}
{{SeeAlsoAccount}}
 
[[Category:Programmer]]
[[Category:API]]

Latest revision as of 04:21, 14 June 2018

References of AutoCount Accounting version 1.8, 1.9

BCE.AutoCount.dll
BCE.AutoCount.CommonAccounting.dll
BCE.AutoCount.MainEntry.dll
BCE.Utils.dll
BCE.Utils.UI.dll
BCE.AutoCount.ARAP.dll

AP Debit Note API Usage

New

public void NewAPDebitNoteEntry(BCE.Data.DBSetting dbSetting)
{
    string userId = BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID;
    BCE.AutoCount.ARAP.APDN.APDNDataAccess cmd =
        BCE.AutoCount.ARAP.APDN.APDNDataAccess.Create(dbSetting);
    BCE.AutoCount.ARAP.APDN.APDNEntity doc = cmd.NewAPDN();
    BCE.AutoCount.ARAP.APDN.APDNDTLEntity dtl = null;


    dtl = doc.NewDetail();
    dtl.AccNo = "700-1010";
    dtl.Description = "INTEREST CHARGE";
    dtl.Amount = 10M;

    try
    {
        cmd.SaveAPDN(doc, userId);
        //Log success
        BCE.Application.AppMessage.ShowMessage(string.Format("AP Debit Note '{0}' is created.", doc.DocNo));
    }
    catch (BCE.Application.AppException ex)
    {
        //Log Error
        BCE.Application.AppMessage.ShowMessage("Fail to create new AP Debit Note.\n" + ex.Message);
    }
}

Edit

public void EditAPDebitNoteEntry(BCE.Data.DBSetting dbSetting)
{
    string docNo = "DN-000001";
    string userId = BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID;
    BCE.AutoCount.ARAP.APDN.APDNDataAccess cmd =
        BCE.AutoCount.ARAP.APDN.APDNDataAccess.Create(dbSetting);
    BCE.AutoCount.ARAP.APDN.APDNEntity doc = cmd.GetAPDN(docNo);
    BCE.AutoCount.ARAP.APDN.APDNDTLEntity dtl = null;

    if (doc == null)
        return;

    doc.ClearDetails();

    dtl = doc.NewDetail();
    dtl.AccNo = "700-1010";
    dtl.Description = "INTEREST CHARGE";
    dtl.Amount = 10.5M;

    try
    {
        cmd.SaveAPDN(doc, userId);
        //Log success
        BCE.Application.AppMessage.ShowMessage(string.Format("AP Debit Note '{0}' is updated.", doc.DocNo));
    }
    catch (BCE.Application.AppException ex)
    {
        //Log Error
        BCE.Application.AppMessage.ShowMessage("Fail to update AP Debit Note.\n" + ex.Message);
    }
}

Cancel (Void)

public void CancelAPDebitNote(BCE.Data.DBSetting dbSetting)
{
    string docNo = "DN-000001";
    BCE.AutoCount.ARAP.APDN.APDNDataAccess cmd =
        BCE.AutoCount.ARAP.APDN.APDNDataAccess.Create(dbSetting);
    try
    {
        cmd.CancelAPDN(docNo, BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID);
    }
    catch (BCE.Application.AppException ex)
    {
        //log error
    }
}

Delete

public void DeleteAPDebitNote(BCE.Data.DBSetting dbSetting)
{
    string docNo = "DN-000001";
    BCE.AutoCount.ARAP.APDN.APDNDataAccess cmd =
        BCE.AutoCount.ARAP.APDN.APDNDataAccess.Create(dbSetting);
    try
    {
        cmd.DeleteAPDN(docNo, BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID);
    }
    catch (BCE.Application.AppException ex)
    {
        //log error
    }
}


See Also

AutoCount Accounting Account API
AR AP
Transactions Version Transactions Version
AR Debtor (Customer) 1.8, 1.9
2.0
AP Creditor (Supplier) 1.8, 1.9
2.0
AR Invoice 1.8, 1.9
2.0
AP Invoice 1.8, 1.9
2.0
AR Received Payment 1.8, 1.9
2.0
AP Payment 1.8, 1.9
2.0
AR Debit Note 1.8, 1.9
2.0
AP Debit Note 1.8, 1.9
2.0
AR Credit Note 1.8, 1.9
2.0
AP Credit Note 1.8, 1.9
2.0
AR Refund 1.8, 1.9
2.0
AP Refund 1.8, 1.9
2.0
AR Deposit 1.8, 1.9
2.0
AP Deposit 1.8, 1.9
2.0
AR Deposit - Create New or Update
with Refund & Forfeit
1.8, 1.9
2.0
A/R and A/P Contra Entry 1.8, 1.9
2.0

Go to menu

Go to top
Resources For AutoCount Software Developers