on 02-07-2019 4:27 PM
Hi all,
I know how to add outgoing or incoming payment with Invoices in PHP it works fine, but I tried to add outgoing payment on account it does not work, below is my codes I tried to do I do know if there is something I forget
$oIncoming=$mycomp->GetBusinessObject(46);
$oIncoming->CardCode="303000";
$oIncoming->DocDate="2019-02-07";
$oIncoming->TaxDate="2019-02-07";
$oIncoming->BPLId=4;
$oIncoming->Series=78;
$oIncoming->CashSum=1000;
$oIncoming->CashAccount="561100";
$oIncoming->AccountPayments->AccountCode = "303000";
$oIncoming->AccountPayments->SumPaid = 1000;
$oIncoming->AccountPayments->OcrCode="AB";
$RetCode=$oIncoming->AccountPayments->Add;
$RetCode=$oIncoming->Add;
if ($RetCode==0)
{
echo"Added";
}
else
{
echo"Not added";
}
Please anyone can help me
Check the following thread:
outgoing payments(account) via DI API SDK
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ANKIT,
I checked the link you sent, is there the static value I can use to initialize DocType instead of using SAPbobsCOM.BoRcptTypes.rAccount ? because PHP cannot understand it.
I tried to add DocType field in my codes like this
$oIncoming->DocType="rAccount"; //OR
$oIncoming->DocType="Account"; //OR
$oIncoming->DocType="A";
All above codes displays error message ( ! ) com_exception: Parameter 0: Type mismatch.
I think the problem is there
Thank you
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.