AR Deposit - Create New or Update with Refund & Forfeit: Difference between revisions

no edit summary
mNo edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1:
==Technical Specification==
{{NavigateDeveloper}}
===Rules in AR Deposit Refund & Forfeit===
# One AR Deposit allows only one Refund, and one Payment Voucher is created.
# One AR Deposit allows only one Forfeit
# Refund created in AR Deposit will auto create GL Cash Book Payment Voucher under GL | Cash Book Entry.
<br />
 
===AssembliesReferences of AutoCount Accounting version 1.8=, 1.9==
{{BaseReferenceAC18}}
<pre>
'''BCE.AutoCount.ARAP.dll'''
<br /pre>
==Sample with data model==
 
===Add New or Edit Existing AR Deposit with Deposit Refund and Forfeit===
<syntaxhighlight lang="csharp">
Line 83 ⟶ 82:
if (source.Refund == null)
{
//No refund
doc.HasRefund = false;
}
Line 88:
{
doc.HasRefund = true;
if (doc.RefundDocNo != null && doc.RefundDocNo == source.Refund.DocumentNo)
{
//Do nothing when no changed in Refund Document number
//and doc.RefundDocNo is not null
}
else if (source.Refund.DocumentNo == null && doc.RefundDocNo.Length == 0)
Line 114 ⟶ 115:
if (source.Forfeit == null)
{
//No forfeit
doc.HasForfeited = false;
doc.MasterRow["ForfeitedAmt"] = 0.00M;
Line 122 ⟶ 124:
doc.HasForfeited = true;
doc.ForFeitedAccNo = source.Forfeit.ForfeitAccNo ?? doc.ForFeitedAccNo;
//Reference to version 1.8.28.184, doc.ForfeitedAmt is read only field,
//but it is a required amount when forfeited is true.
//Therefore, in this case we have to direct update the DataRow
doc.MasterRow["ForfeitedAmt"] = source.Forfeit.ForfeitAmount;
doc.ForfeitedDate = source.Forfeit.ForfeitDate;
Line 139 ⟶ 144:
}
 
//Return null if document is not created or updated.
//If successfully saved, Document number is returned.
return retDocNo;
}
Line 365 ⟶ 372:
}
</syntaxhighlight>
<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]]
[[Category:Integrate]]
[[Category:Plug-In]]
{{NavigateDeveloper}}