Skip to content

Commit

Permalink
update message and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitpanjwani committed Mar 3, 2022
1 parent a23644c commit 9a0de9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@ public function __invoke(Request $request)

$this->authorize('manage company', $company);

if ($company->hasTransactions()) {
return response()->json([
'success' => false,
]);
}

return response()->json([
'success' => true,
'has_transactions' => $company->hasTransactions(),
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __invoke(UpdateSettingsRequest $request)
if ($companyCurrency !== $data['currency'] && $company->hasTransactions()) {
return response()->json([
'success' => false,
'message' => 'You cannot change currency once transaction is created.'
'message' => 'Cannot update company currency after transactions are created.'
]);
}

Expand Down

0 comments on commit 9a0de9f

Please sign in to comment.