ARAP Contra Entry v2: Difference between revisions
Content added Content deleted
(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'...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
# Debtor and Creditor must be same currency code |
# Debtor and Creditor must be same currency code |
||
# Programmer can assign decimal value to '''NetTotal''' in '''ARAP Contra Entry''' |
# Programmer can assign decimal value to '''NetTotal''' in '''ARAP Contra Entry''' |
||
# '''NetTotal''' must be larger than knockoff amount(s) |
# '''NetTotal''' must be larger than total knockoff amount(s) |
||
==References of AutoCount Accounting version 2.0== |
==References of AutoCount Accounting version 2.0== |
||
Line 25: | Line 25: | ||
doc.NetTotal = 100; |
doc.NetTotal = 100; |
||
//Knockoff AR Invoice (customer) |
|||
doc.KnockOff(AutoCount.Document.DocumentType.ARInvoice, "I-000001", 100); |
doc.KnockOff(AutoCount.Document.DocumentType.ARInvoice, "I-000001", 100); |
||
//Knockoff AP Invoice (supplier) |
|||
doc.KnockOff(AutoCount.Document.DocumentType.APInvoice, "PI-000001", 100); |
doc.KnockOff(AutoCount.Document.DocumentType.APInvoice, "PI-000001", 100); |
||
Line 43: | Line 45: | ||
</syntaxhighlight> |
</syntaxhighlight> |
||
===Edit=== |
|||
{{SeeAlsoAccountV2}} |
|||
<syntaxhighlight lang="csharp"> |
|||
public void EditARAPContra(AutoCount.Authentication.UserSession userSession) |
|||
{ |
|||
AutoCount.ARAP.Contra.ContraDataAccess cmd = |
|||
AutoCount.ARAP.Contra.ContraDataAccess.Create(userSession, userSession.DBSetting); |
|||
AutoCount.ARAP.Contra.ContraEntity doc = cmd.GetContra("JV-000001"); |
|||
if (doc == null) |
|||
return; |
|||
doc.DebtorCode = "300-A001"; |
|||
doc.CreditorCode = "400-X001"; |
|||
doc.DocDate = new DateTime(2018, 6, 5); |
|||
doc.Description = "Edited Generated ARAP CONTRA"; |
|||
doc.JournalType = "GENERAL"; |
|||
doc.NetTotal = 80; |
|||
//Knockoff AR Invoice (customer) |
|||
doc.KnockOff(AutoCount.Document.DocumentType.ARInvoice, "I-000001", 80); |
|||
//Knockoff AP Invoice (supplier) |
|||
doc.KnockOff(AutoCount.Document.DocumentType.APInvoice, "PI-000001", 80); |
|||
try |
|||
{ |
|||
cmd.SaveContra(doc, userSession.LoginUserID); |
|||
//Log Success |
|||
AutoCount.AppMessage.ShowMessage($"Contra '{doc.DocNo}' is updated"); |
|||
} |
|||
catch (AutoCount.AppException ex) |
|||
{ |
|||
//Log Fail |
|||
AutoCount.AppMessage.ShowMessage( |
|||
string.Format("Fail to update Contra.\n{0}", ex.Message)); |
|||
} |
|||
} |
|||
</syntaxhighlight> |
|||
===Cancel (void)=== |
|||
<syntaxhighlight lang="csharp"> |
|||
public void CancelARAPContra(AutoCount.Authentication.UserSession userSession) |
|||
{ |
|||
string docNo = "JV-000001"; |
|||
AutoCount.ARAP.Contra.ContraDataAccess cmd = |
|||
AutoCount.ARAP.Contra.ContraDataAccess.Create(userSession, userSession.DBSetting); |
|||
try |
|||
{ |
|||
cmd.CancelContra(docNo, userSession.LoginUserID); |
|||
//Log Success |
|||
AutoCount.AppMessage.ShowMessage($"Contra '{docNo}' is cancelled."); |
|||
} |
|||
catch (AutoCount.AppException ex) |
|||
{ |
|||
//Log Fail |
|||
AutoCount.AppMessage.ShowMessage( |
|||
string.Format("Fail to cancel Contra.\n{0}", ex.Message)); |
|||
} |
|||
} |
|||
</syntaxhighlight> |
|||
===Delete=== |
|||
<syntaxhighlight lang="csharp"> |
|||
public void DeleteARAPContra(AutoCount.Authentication.UserSession userSession) |
|||
{ |
|||
string docNo = "JV-000001"; |
|||
AutoCount.ARAP.Contra.ContraDataAccess cmd = |
|||
AutoCount.ARAP.Contra.ContraDataAccess.Create(userSession, userSession.DBSetting); |
|||
try |
|||
{ |
|||
cmd.DeleteContra(docNo, userSession.LoginUserID); |
|||
//Log Success |
|||
AutoCount.AppMessage.ShowMessage($"Contra '{docNo}' is deleted."); |
|||
} |
|||
catch (AutoCount.AppException ex) |
|||
{ |
|||
//Log Fail |
|||
AutoCount.AppMessage.ShowMessage( |
|||
string.Format("Fail to delete Contra.\n{0}", ex.Message)); |
|||
} |
|||
} |
|||
</syntaxhighlight> |
|||
{{SeeAlsoAPIAccount}} |
|||
{{NavigateDeveloper}} |
{{NavigateDeveloper}} |
||
[[Category:Programmer]] |
|||
[[Category:API]] |
|||
[[Category:Integrate]] |
|||
[[Category:Plug-In]] |
Latest revision as of 04:17, 14 June 2018
Technical Specification
- Debtor and Creditor must be same currency code
- Programmer can assign decimal value to NetTotal in ARAP Contra Entry
- NetTotal must be larger than total 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;
//Knockoff AR Invoice (customer)
doc.KnockOff(AutoCount.Document.DocumentType.ARInvoice, "I-000001", 100);
//Knockoff AP Invoice (supplier)
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));
}
}
Edit
public void EditARAPContra(AutoCount.Authentication.UserSession userSession)
{
AutoCount.ARAP.Contra.ContraDataAccess cmd =
AutoCount.ARAP.Contra.ContraDataAccess.Create(userSession, userSession.DBSetting);
AutoCount.ARAP.Contra.ContraEntity doc = cmd.GetContra("JV-000001");
if (doc == null)
return;
doc.DebtorCode = "300-A001";
doc.CreditorCode = "400-X001";
doc.DocDate = new DateTime(2018, 6, 5);
doc.Description = "Edited Generated ARAP CONTRA";
doc.JournalType = "GENERAL";
doc.NetTotal = 80;
//Knockoff AR Invoice (customer)
doc.KnockOff(AutoCount.Document.DocumentType.ARInvoice, "I-000001", 80);
//Knockoff AP Invoice (supplier)
doc.KnockOff(AutoCount.Document.DocumentType.APInvoice, "PI-000001", 80);
try
{
cmd.SaveContra(doc, userSession.LoginUserID);
//Log Success
AutoCount.AppMessage.ShowMessage($"Contra '{doc.DocNo}' is updated");
}
catch (AutoCount.AppException ex)
{
//Log Fail
AutoCount.AppMessage.ShowMessage(
string.Format("Fail to update Contra.\n{0}", ex.Message));
}
}
Cancel (void)
public void CancelARAPContra(AutoCount.Authentication.UserSession userSession)
{
string docNo = "JV-000001";
AutoCount.ARAP.Contra.ContraDataAccess cmd =
AutoCount.ARAP.Contra.ContraDataAccess.Create(userSession, userSession.DBSetting);
try
{
cmd.CancelContra(docNo, userSession.LoginUserID);
//Log Success
AutoCount.AppMessage.ShowMessage($"Contra '{docNo}' is cancelled.");
}
catch (AutoCount.AppException ex)
{
//Log Fail
AutoCount.AppMessage.ShowMessage(
string.Format("Fail to cancel Contra.\n{0}", ex.Message));
}
}
Delete
public void DeleteARAPContra(AutoCount.Authentication.UserSession userSession)
{
string docNo = "JV-000001";
AutoCount.ARAP.Contra.ContraDataAccess cmd =
AutoCount.ARAP.Contra.ContraDataAccess.Create(userSession, userSession.DBSetting);
try
{
cmd.DeleteContra(docNo, userSession.LoginUserID);
//Log Success
AutoCount.AppMessage.ShowMessage($"Contra '{docNo}' is deleted.");
}
catch (AutoCount.AppException ex)
{
//Log Fail
AutoCount.AppMessage.ShowMessage(
string.Format("Fail to delete Contra.\n{0}", ex.Message));
}
}
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 top
|
Resources For AutoCount Software Developers
|