AP Deposit API: Difference between revisions

m
no edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1:
==Technical Specification==
#Deposit Account (Deposit Payment Method) is mandatory field
#Deposit Account (Deposit Payment Method) is a Payment Method that is maintained in '''G/L | Account Maintenance''' & '''General Maintenance | Payment Method Maintenance'''.
#:[[AR Deposit#Method_to_check_the_validity_of_.28Deposit.29_Payment_Method|Method to check the validity of Deposit Payment Method]]
Line 20 ⟶ 21:
//must check the Deposit setting in General Maintenance > Payment Method Maintenance,
//to get correct value
doc.DepositPaymentMethod = "DEPOSIT RECEIVEDPAYABLE";
doc.DocDate = new DateTime(2018, 6, 25);
doc.CreditorCode = "400-X001";
Line 54 ⟶ 55:
BCE.AutoCount.ARAP.APDeposit.APDepositRefundDetail refundDtl = null;
 
doc.DepositPaymentMethod = "DEPOSIT RECEIVEDPAYABLE";
doc.DocDate = new DateTime(2018, 6, 25);
doc.CreditorCode = "400-X001";
Line 106 ⟶ 107:
doc.ClearDetails();
 
doc.DepositPaymentMethod = "DEPOSIT RECEIVEDPAYABLE";
doc.DocDate = new DateTime(2018, 6, 25);
doc.CreditorCode = "400-X001";
Line 206 ⟶ 207:
 
===Delete===
*The '''Delete''' method does not provide parameter of '''DocNo'''
<syntaxhighlight lang="csharp">
*:Function '''GetAPDepositDocKey''' is to [[AP_Deposit_API#Convert_AP_Deposit_DocNo_to_DocKey|Convert AP Deposit DocNo to '''DocKey''']]
<syntaxhighlight lang="csharp" highlight="9">
public void Delete(BCE.Data.DBSetting dbSetting)
{
Line 221 ⟶ 224:
cmd.Delete(docKey.Value);
//Log success
BCE.Application.AppMessage.ShowMessage($"AP Deposit '{docNo}' is cancelleddeleted.");
}
else
{
//Log unable to locate docNo
BCE.Application.AppMessage.ShowMessage($"AP Deposit '{docNo}' is not a valid document no.");
}
}
Line 227 ⟶ 235:
{
//Log error
BCE.Application.AppMessage.ShowMessage("Error when canceldeleting AP Deposit.\n" + ex.Message);
}
}