mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-02 13:39:19 -06:00
Refer to correct location for bill transformer.
This commit is contained in:
parent
d3c8d06114
commit
811d8e330f
@ -25,7 +25,7 @@ namespace FireflyIII\Api\V1\Controllers;
|
|||||||
use Auth;
|
use Auth;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Models\Bill;
|
use FireflyIII\Models\Bill;
|
||||||
use FireflyIII\Transformers\Bill\BillTransformer;
|
use FireflyIII\Transformers\BillTransformer;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use League\Fractal\Manager;
|
use League\Fractal\Manager;
|
||||||
|
@ -30,9 +30,12 @@ use FireflyIII\Models\Bill;
|
|||||||
use FireflyIII\Models\Note;
|
use FireflyIII\Models\Note;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\Transformers\Bill\BillTransformer;
|
use FireflyIII\Transformers\BillTransformer;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use League\Fractal\Manager;
|
||||||
|
use League\Fractal\Resource\Item;
|
||||||
|
use League\Fractal\Serializer\DataArraySerializer;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
use URL;
|
use URL;
|
||||||
use View;
|
use View;
|
||||||
@ -230,8 +233,13 @@ class BillController extends Controller
|
|||||||
$pageSize = intval(Preferences::get('listPageSize', 50)->data);
|
$pageSize = intval(Preferences::get('listPageSize', 50)->data);
|
||||||
$yearAverage = $repository->getYearAverage($bill, $start);
|
$yearAverage = $repository->getYearAverage($bill, $start);
|
||||||
$overallAverage = $repository->getOverallAverage($bill);
|
$overallAverage = $repository->getOverallAverage($bill);
|
||||||
$transformer = new BillTransformer($start, $end);
|
$manager = new Manager();
|
||||||
$object = $transformer->transform($bill);
|
$manager->setSerializer(new DataArraySerializer());
|
||||||
|
$manager->parseIncludes(['attachments']);
|
||||||
|
|
||||||
|
// Make a resource out of the data and
|
||||||
|
$resource = new Item($bill, new BillTransformer($start, $end), 'bill');
|
||||||
|
$object = $manager->createData($resource)->toArray();
|
||||||
|
|
||||||
// use collector:
|
// use collector:
|
||||||
/** @var JournalCollectorInterface $collector */
|
/** @var JournalCollectorInterface $collector */
|
||||||
|
Loading…
Reference in New Issue
Block a user