2,743
edits
(Created page with " ==Rules in AR Note== # Net Total of the document is read-only. The calculation of net total is from amount total. # Account No. must not be '''Creditor Code''' and '''Bank or...") |
No edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1:
==Technical Specification==
# Net Total of the document is read-only. The calculation of net total is from amount total.
# '''Knock Off Date''' must be equal or greater than the document date.
# Account No. must not be '''Creditor Code''' and '''Bank or Cash account'''▼
# Total of '''Knock Off Amount''' must not exceed the amount of Credit Note.
# Account No. must be a '''leaf account'''▼
# '''Knock Off Amount''' of the AR Invoice or AR Debit Note must not exceed its remain outstanding.
# '''CN Type''' must be specified.
# Debit A/C (of Detail) does not allow Debtor or Creditor Account.
#:The common reason to select Creditor in Debit A/C of Credit Note is for Contra.
#:To do Contra, create '''[[ARAP Contra Entry v2|A/R and A/P Contra Entry]]'''
▲#
#:Related to Bank or Cash transaction must be created at '''[[AR Received Payment v2|AR Received Payment]]'''
==References of AutoCount Accounting version 2.0==
Line 9 ⟶ 17:
'''AutoCount.ARAP.dll'''
==
===New===
<syntaxhighlight lang="csharp">
Line 18 ⟶ 26:
AutoCount.ARAP.ARCN.ARCNDTLEntity dtl = null;
//doc.
doc.DocDate = new DateTime(2018,
doc.Description = "
doc.Reason = "
doc.OurInvoiceNo = "
doc.JournalType = "SALES";
doc.CNType = "DISCOUNT";
dtl = doc.NewDetail();
dtl.
dtl.
//Knockoff AR Invoice
//If knockoff date is not defined, it follows system settings in Tools | Options
doc.KnockOff(AutoCount.Document.DocumentType.ARInvoice, "I-000001", 10);
try
{
cmd.SaveARCN(doc, userSession.LoginUserID);
//Log success
}
catch (AutoCount.AppException ex)
{
//Log Failed
▲ AutoCount.AppMessage.ShowMessage(ex.Message);
string.Format("Fail to create new Credit Note.\n{0}", ex.Message));
}
}
Line 51 ⟶ 70:
return;
//doc.
doc.
doc.
doc.
doc.OurInvoiceNo = "I-000001";
doc.JournalType = "SALES";
doc.CNType = "DISCOUNT";
doc.ClearDetails();
▲ dtl.AccNo = "580-0002";
dtl
dtl.
dtl.Description = "DISCOUNT ALLOWED";
dtl.Amount = 10M;
//Knockoff AR Invoice
//If knockoff date is not defined, it follows system settings in Tools | Options
doc.KnockOff(AutoCount.Document.DocumentType.ARInvoice, "I-000001", 10);
try
{
cmd.SaveARCN(doc, userSession.LoginUserID);
//Log success
AutoCount.AppMessage.ShowMessage($"Credit Note '{doc.DocNo}' Updated Successfully.");
}
catch (AutoCount.AppException ex)
{
//Log Failed
▲ AutoCount.AppMessage.ShowMessage(ex.Message);
AutoCount.AppMessage.ShowMessage(
string.Format("Fail to update Credit Note '{0}'.\n{1}", doc.DocNo, ex.Message));
}
}
</syntaxhighlight>
===
<syntaxhighlight lang="csharp">
public void
{
string docNo = "CN-000001";
AutoCount.ARAP.ARCN.ARCNDataAccess cmd = AutoCount.ARAP.ARCN.ARCNDataAccess.Create(userSession, userSession.DBSetting);
try
{
cmd.
AutoCount.AppMessage.ShowMessage($"{docNo} is cancelled.");
}
catch (AutoCount.AppException ex)
Line 89 ⟶ 123:
</syntaxhighlight>
===
<syntaxhighlight lang="csharp">
public void
{
string docNo = "CN-000001";
AutoCount.ARAP.ARCN.ARCNDataAccess cmd = AutoCount.ARAP.ARCN.ARCNDataAccess.Create(userSession, userSession.DBSetting);
try
{
cmd.
AutoCount.AppMessage.ShowMessage($"{docNo} is deleted.");
}
catch (AutoCount.AppException ex)
Line 106 ⟶ 142:
</syntaxhighlight>
{{SeeAlsoAPIAccount}}
[[Category:Programmer]]
[[Category:API]]
[[Category:Integrate]]
[[Category:Plug-In]]
{{NavigateDeveloper}}
|