Fix batch summary to use the api
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 25 Jan 2022 07:39:24 +0000 (20:39 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 25 Jan 2022 08:28:55 +0000 (21:28 +1300)
commit2d4bdc585f55fffd137a12161bd6331e19507e58
treed399d949a6b4129c5ed72aa155dcbe14da6b1a05
parentac90ec604a4248a909debb32bbf95fabbab6f377
Fix batch summary to use the api

In looking at @colemanw's work to clean up the retrieve function it
turned out that in at least one place NULL is being passed to Batch::retrieve

Since I dug into that 1 place I fixed it to use v4 api (it is
the screen accessed after creating a new accounting batch
from contribution->accounting batches->new batch)

However, it seems safer to continue to accept NULL
CRM/Batch/BAO/Batch.php
CRM/Financial/Page/AJAX.php
tests/phpunit/CRM/Financial/Page/AjaxBatchSummaryTest.php