Skip to Content
0

Adding Outgoing Payments with Check

Dec 12, 2017 at 01:13 AM

54

avatar image
Former Member

Hi friends,

I am having problem while adding Outgoing Payments through DI API using check payment. whatever I set bank code, that always use default bank to create Outgoing Payments.

Thank you in advance,

-Xavier

var messages = new Dictionary<string, string>();


foreach (var o in OutgoingPaymentsParams) {
	var outgoing = (Payments)company.GetBusinessObject(BoObjectTypes.oVendorPayments);


	outgoing.CardCode = o.CardCode;
	outgoing.DocDate = o.DocDate;
	outgoing.VatDate = o.DocDate;
	outgoing.DocType = o.DocType;
	outgoing.Reference2 = o.Reference;
	outgoing.CounterReference = o.Reference;
	outgoing.JournalRemarks = $"Outgoing: {o.Reference} - {o.CardCode}";


	outgoing.Invoices.InvoiceType = o.InvoiceType;
	outgoing.Invoices.DocEntry = o.DocEntry;
	outgoing.Invoices.SumApplied = (double)o.SumApplied;


	outgoing.Checks.BankCode = o.CheckBankCode;
	outgoing.Checks.CheckAccount = o.BankAccount;


	outgoing.Checks.CheckSum = (double)o.SumApplied;
	outgoing.Checks.DueDate = o.DocDate;


	if (outgoing.Add() == Projects.SAP.ActionSuccessCode) {
		messages.Add(o.CardCode, "Succes");
		continue;
	}


	int errorCode;
	string errorMessage;
	company.GetLastError(out errorCode, out errorMessage);
	messages.Add(o.CardCode, $"{errorCode}: {errorMessage}");
}
c#
10 |10000 characters needed characters left characters exceeded

What is the error message?

0
Former Member

Hi Danilo,

Thank you for your reply.

No any error, that outgoing payment created with check, but wrong bank.

For example,

Two bank and bank code 1. Bank-A, 2. Bank-B, and in Company Details -> Basic Initialization tab, the default house bank is 'Bank-A',

and above code snippet use outgoing.Checks.BankCode = "Bank-B"; but it still use Bank-A for that check.

Thank you in advance,

-Xavier

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Dec 14, 2017 at 04:41 PM
0

Just add your Country code + Bank code. For example "US^BOA" something like that.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Bryan Gomez,

Thank you for your reply.

Do you meaning set it for bank code field?

Thank you in advance,

outgoing.Checks.BankCode = "US^BOA";
0
Former Member

Yes, you could try that and make sure that the bank code is existing.

0