AR Refund: Difference between revisions

From AutoCount Resource Center
Content added Content deleted
mNo edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Assemblies version 1.8, 1.9==
{{NavigateDeveloper}}
{{BaseReferenceAC18}}
===Assemblies version 1.8===
'''BCE.AutoCount.ARAP.dll'''
<pre>
BCE.AutoCount.dll
BCE.AutoCount.ARAP.dll
BCE.Utils.dll
</pre>


<br />
==Sample with data model==
===Create new AR Refund===
===Create new AR Refund===
<syntaxhighlight lang="csharp">
<syntaxhighlight lang="csharp">
Line 38: Line 36:
</syntaxhighlight>
</syntaxhighlight>


===Class of source data===
===Class of source data (data model)===
<syntaxhighlight lang="csharp">
<syntaxhighlight lang="csharp">
public class RefundSource
public class RefundSource
Line 51: Line 49:
</syntaxhighlight>
</syntaxhighlight>


<br />
==See Also==
{{SeeAlsoAPIAccount}}
* [[AR Debtor]]
* [[AR Invoice]]
* [[AR Received Payment]]
* [[AR Debit Note]]
* [[AR Credit Note]]
* [[AR Refund]]
* [[AR Deposit]]
* [[AR Deposit with AR Refund & AR Forfeit]]

[[Category:Programmer]]
[[Category:Programmer]]
[[Category:API]]
[[Category:API]]
[[Category:Integrate]]
[[Category:Integrate]]
[[Category:Plug-In]]
[[Category:Plug-In]]
{{NavigateDeveloper}}

Latest revision as of 04:03, 14 June 2018

Assemblies 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


Sample with data model

Create new AR Refund

public void CreateNewARRefund(BCE.Data.DBSetting dbSetting, RefundSource source)
{
    string userID = BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID;
    BCE.AutoCount.ARAP.ARRefund.ARRefundDataAccess cmd = BCE.AutoCount.ARAP.ARRefund.ARRefundDataAccess.Create(dbSetting);
    BCE.AutoCount.ARAP.ARRefund.ARRefundEntity doc = cmd.NewARRefund();

    doc.DocNo = source.DocNo;
    doc.DocDate = source.Date;
    doc.Description = source.Description;

    BCE.AutoCount.ARAP.ARRefund.ARRefundDTLEntity dtl = doc.NewDetail();
    dtl.PaymentMethod = "CASH";
    dtl.PaymentAmt = source.RefundAmount;
    dtl.BankCharge = source.BankCharge;

    //Only ARPayment & ARCreditNote allowed to knockoff by ARRefund
    doc.KnockOff(BCE.AutoCount.Document.DocumentType.ARPayment, source.PaymentToRefund, source.RefundAmount);

    try
    {
        cmd.SaveARRefund(doc, userID);
    }
    catch (BCE.Application.AppException ex)
    {
        BCE.Application.AppMessage.ShowMessage(ex.Message);
    }
}

Class of source data (data model)

public class RefundSource
{
    public string DocNo { get; set; }
    public DateTime Date { get; set; }
    public string Description { get; set; }
    public decimal RefundAmount { get; set; }
    public decimal BankCharge { get; set; }
    public string PaymentToRefund { get; set; }
}


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