AR Received Payment: Difference between revisions

no edit summary
mNo edit summary
No edit summary
Line 79:
==Sample Code with Data Model for Testing==
This sample code provides the example of creating new AR Payment with tested data.
===Test SampleData Result Screenshot===
[[File:ProgrammerNewARPayment1.PNG|link=]]
 
===TestAssign SampleTest Data===
<syntaxhighlight lang="csharp">
public void MainEntry(BCE.Data.DBSetting dbSetting)
{
ARPaymentSource source = new ARPaymentSource()
{
//Home Currency Debtor, payment with home currency
DebtorCode = "300-A001",
Description = "Payment Received",
DocumentDate = new DateTime(2017, 12, 20),
};
 
source.PaymentDetail.Add(new ARPaymentDetailSource()
{
PaymentMethod = "BANK",
ChequeNo = "CHQ00012",
PaymentAmount = 100,
BankCharge = 0.50M
});
 
//Document type is required for document knockoff
source.PaymentKnockoff.Add(new PaymentKnockoffSource()
{
DocType = PaymentKnockoffSource.ARInvoiceDocType, DocNo = "I-000002", Amount = 70
});
source.PaymentKnockoff.Add(new PaymentKnockoffSource()
{
DocType = PaymentKnockoffSource.ARInvoiceDocType, DocNo = "I-000003", Amount = 30
});
 
//Create New ARPayment in AutoCount Accounting
NewARPayment(source, dbSetting);
}
</syntaxhighlight>
 
===Source Data Modal (Example for reference Only)===