This commit is contained in:
James Cole
2019-09-01 14:49:26 +02:00
parent 48d3130b36
commit f5b01c7b21
3 changed files with 8 additions and 6 deletions

View File

@@ -197,6 +197,9 @@ class BelongsUser implements Rule
*/
private function validateBudgetId(int $value): bool
{
if (0 === $value) {
return true;
}
$count = Budget::where('id', '=', $value)->where('user_id', '=', auth()->user()->id)->count();
return 1 === $count;

2
public/v1/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -570,9 +570,8 @@
currentArray.foreign_currency_id = foreignCurrency;
}
// set budget id and piggy ID.
if (parseInt(row.budget) > 0) {
currentArray.budget_id = parseInt(row.budget);
}
if (parseInt(row.piggy_bank) > 0) {
currentArray.piggy_bank_id = parseInt(row.piggy_bank);
}