mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Fix some tests for account API
This commit is contained in:
@@ -68,6 +68,7 @@ class StoreController extends Controller
|
||||
public function store(StoreRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getAllAccountData();
|
||||
$this->repository->resetAccountOrder();
|
||||
$account = $this->repository->store($data);
|
||||
$manager = $this->getManager();
|
||||
|
||||
|
@@ -80,7 +80,7 @@ class StoreRequest extends FormRequest
|
||||
// append Location information.
|
||||
$data = $this->appendLocationData($data, null);
|
||||
|
||||
if ('liability' === $data['account_type']) {
|
||||
if ('liability' === $data['account_type'] || 'liabilities' === $data['account_type']) {
|
||||
$data['opening_balance'] = bcmul($this->string('liability_amount'), '-1');
|
||||
$data['opening_balance_date'] = $this->date('liability_start_date');
|
||||
$data['account_type'] = $this->string('liability_type');
|
||||
|
@@ -195,7 +195,7 @@ class UpdateRequest extends FormRequest
|
||||
{
|
||||
$validator->after(
|
||||
function (Validator $validator) {
|
||||
$this->validateOneRecurrenceTransaction($validator);
|
||||
//$this->validateOneRecurrenceTransaction($validator);
|
||||
$this->validateOneRepetitionUpdate($validator);
|
||||
$this->validateRecurrenceRepetition($validator);
|
||||
$this->validateRepetitionMoment($validator);
|
||||
|
Reference in New Issue
Block a user