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

Latest Credit Transactions / Bank Statements

Open Organizer21 opened this issue 6 years ago • 2 comments

I'm rather new to this and failing at finding out how I can simply pull the latest bank statements for an account (as seen under my Main Account -> Bank Statements tab in Xero?

I've tried and seen the result of Bank Transactions which is confusing; while it seems to show many of the transactions, it does not show at all and at glance I don't even see the logic of the missing ones. $xero->load(BankTransaction::class)->execute();

I've also tried Payments (that's what I mainly need) which also included some results I can' match to my latest bank statements and in either case I got an Unreconciled item today which for some reason is not included in this list either.

Is the API not pulling live data; am I using the wrong class options as to see all the latest in-comings? Any and all help welcome as "at least for me" there's a lot to wish for documentation/example wise.

Organizer21 avatar Oct 26 '18 17:10 Organizer21

Have you had a look at the ->where() options for BankTransactions? I believe it should include everything.

I've successfully done something like this:

$new_transactions = $xero->load(BankTransaction::class)
    ->modifiedAfter($last_modified)
    ->orderBy('UpdatedDateUTC')
    ->page($page)
    ->execute();

calcinai avatar Oct 28 '18 22:10 calcinai

Ive tried (below) but can't seem to pull a transaction by ref:

      $trans = $this->xero->load(\XeroPHP\Models\Accounting\BankTransaction::class)
		                          ->where("Reference",$ref)
		                          ->execute();

futurewebsites avatar Feb 21 '19 15:02 futurewebsites