AR Received Payment: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1:
==Technical Specification==
==Rules in AR Payment==
# Payment '''Knockoff Date''' must be equal or greater than the '''Payment Date'''.
# Payment net total must be greater than 0.
# Payment net total must be the sum of Payment Amount in '''Payment Detail'''
Line 6:
# '''Payment Method''' is created in ''General Maintenance | '''Payment Method Maintenance'''''.
 
==References of AutoCount Accounting version 1.8, 1.9==
{{BaseReferenceAC18}}
BCE.AutoCount.dll
BCE.AutoCount.CommonAccounting.dll
BCE.AutoCount.MainEntry.dll
BCE.Utils.dll
BCE.Utils.UI.dll
'''BCE.AutoCount.ARAP.dll'''
 
Line 21 ⟶ 17:
BCE.AutoCount.ARAP.ARPayment.ARPaymentDataAccess cmd = BCE.AutoCount.ARAP.ARPayment.ARPaymentDataAccess.Create(dbSetting);
BCE.AutoCount.ARAP.ARPayment.ARPaymentEntity doc = cmd.NewARPayment();
 
//If you want to set your own Payment Voucher number, uncomment the next linedoc.DocNo, otherwise, the system will use running number.
//doc.DocNo = “RC-0001″;
doc.DebtorCode = "300-A001";
Line 30 ⟶ 27:
paymentDetail.PaymentAmt = 100;
paymentDetail.ChequeNo = "MBB 123456";
 
//Knockoff Invoice
//doc.KnockOff(BCE.AutoCount.Document.DocumentType.ARInvoice, "IV-0001", 100);
 
try
cmd.SaveARPayment(doc, BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID);
{
cmd.SaveARPayment(doc, BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID);
BCE.Application.AppMessage.ShowMessage($"Success: {doc.DocNo}");
}
catch (BCE.Application.AppException ex)
{
BCE.Application.AppMessage.ShowMessage(ex.Message);
}
}
</syntaxhighlight>
Line 42 ⟶ 48:
BCE.AutoCount.ARAP.ARPayment.ARPaymentDataAccess cmd = BCE.AutoCount.ARAP.ARPayment.ARPaymentDataAccess.Create(dbSetting);
BCE.AutoCount.ARAP.ARPayment.ARPaymentEntity doc = cmd.GetARPayment("RC-0001");
 
//If doc (arPayment) is null, doc (arPayment) does not exist in AR Payment;
//Then exit this function
Line 72 ⟶ 79:
}
</syntaxhighlight>
 
===Knockoff===
<syntaxhighlight lang="csharp">
doc.KnockOff(knockoff.DocType, knockoff.DocNo, knockoff.Amount, knockoff.Date.Value);
</syntaxhighlight>
See [[AR Received Payment#Create New ARPayment|Example of ARPayment Knockoff]]
<br /><br />
 
Line 78 ⟶ 91:
 
===Source Data (Example for reference Only)===
'''Source Data''' is implemented to hold data that is to be updated into AutoCount Accounting.
The Source Data designed here is for reference only.
You may either create your own data source, or read from your database and assign value to transaction/document of AutoCount Accounting without source data.
Line 120 ⟶ 133:
public string BankChargeBillNoForGst { get; set; }
public string PaymentBy { get; set; }
 
//If this cheque is returned/bounced cheque
//Set the returned/bounced date. Otherwise it is null
Line 159 ⟶ 173:
BCE.AutoCount.ARAP.ARPayment.ARPaymentDataAccess cmd =
BCE.AutoCount.ARAP.ARPayment.ARPaymentDataAccess.Create(dbSetting);
 
//Create a new ARPayment transaction
BCE.AutoCount.ARAP.ARPayment.ARPaymentEntity doc = cmd.NewARPayment();
Line 224 ⟶ 239:
</syntaxhighlight>
 
===Example of AR Payment in Home currency only sample===
====Test Data Result Screenshot====
[[File:ProgrammerNewARPayment1.PNG|link=]]
Line 250 ⟶ 265:
source.PaymentKnockoff.Add(new PaymentKnockoffSource()
{
DocType = PaymentKnockoffSource.ARInvoiceDocType, DocNo = "I-000002", Amount = 70
DocNo = "I-000002",
Amount = 70
});
source.PaymentKnockoff.Add(new PaymentKnockoffSource()
{
DocType = PaymentKnockoffSource.ARInvoiceDocType, DocNo = "I-000003", Amount = 30
DocNo = "I-000003",
Amount = 30
});
 
Line 262 ⟶ 281:
</syntaxhighlight>
----
 
===Example of Foreign Customer and payment in customer currency===
====Test Data Result Screenshot====
[[File:ProgrammerNewARPayment2.PNG|link=]]<br/>
Line 297 ⟶ 317:
source.PaymentKnockoff.Add(new PaymentKnockoffSource()
{
DocType = PaymentKnockoffSource.ARInvoiceDocType, DocNo = "I-000017", Amount = 70
DocNo = "I-000017",
Amount = 70
});
source.PaymentKnockoff.Add(new PaymentKnockoffSource()
{
DocType = PaymentKnockoffSource.ARInvoiceDocType, DocNo = "I-000018", Amount = 30
DocNo = "I-000018",
Amount = 30
});
 
Line 308 ⟶ 332:
</syntaxhighlight>
 
<br /><br />
{{SeeAlsoAPIAccount}}
==See Also==
* [[AR Debtor]]
* [[AR Invoice]]
* [[AR Received Payment]]
* [[AR Debit Note]]
* [[AR Credit Note]]
* [[AR Refund]]
* [[AR Deposit]]
* [[AR Deposit - Create New or Update with Refund & Forfeit]]
 
[[Category:Programmer]]
[[Category:API]]