xero-php icon indicating copy to clipboard operation
xero-php copied to clipboard

Attachment not working on BankTranfer

Open KimBev opened this issue 5 years ago • 4 comments

Hi, Your SDK is great, thanks for the effort in putting it together.

I am adding attachment to Invoices and it works fine, now I have tried adding an attachment to a BankTransfer but it does not seem to work, is this a known issue?

This is my code

$trf = new BankTransfer($xero);
$trf->setAmount(100);
$fromBank = new FromBankAccount($xero);
$fromBank->setCode(1234);
$trf->setFromBankAccount($fromBank);
$toBank = new ToBankAccount($xero);
$toBank->setCode($4567);
$trf->setToBankAccount($toBank);
$trf->setDate($date);
$trf->save();

$attachment = Attachment::createFromLocalFile($filePath,'text/csv');
$trf->addAttachment($attachment);

thanks Kim

KimBev avatar Apr 02 '19 04:04 KimBev

Hmm, are you getting any errors?

calcinai avatar Apr 02 '19 05:04 calcinai

Hi, no errors, I also printed out the raw response from AttachmentTrait->addAttachment and it seemed to be successful. But when I got Xero the attachment is not present on the bank transfer transaction.

KimBev avatar Apr 02 '19 05:04 KimBev

Hi, did you have any luck replicating this behaviour? I can activate some debugging or something if you need.

KimBev avatar Apr 03 '19 23:04 KimBev

Hi, Any ideas on this one?

KimBev avatar Apr 24 '19 06:04 KimBev