New test content.

This commit is contained in:
James Cole
2014-12-23 21:55:08 +01:00
parent d8fea44968
commit b741565f57
6 changed files with 67 additions and 20 deletions

View File

@@ -334,7 +334,7 @@ class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
$limit->repeat_freq = 'monthly';
$limit->repeats = 0;
$result = $limit->save();
\Log::info('Created new limit? ' . boolval($result));
\Log::info('Created new limit? ' . boolstr($result));
\Log::info('ID: ' . $limit->id);
/*
* A newly stored limit also created a limit repetition.

View File

@@ -262,7 +262,9 @@ class PiggyBank implements CUD, CommonDatabaseCalls, PiggyBankInterface
*/
public function leftOnAccount(\Account $account)
{
\Log::debug('Now in leftOnAccount() for account #'.$account->id.' ('.$account->name.')');
$balance = \Steam::balance($account);
\Log::debug('Steam says: ' . $balance);
/** @var \Piggybank $p */
foreach ($account->piggybanks()->get() as $p) {
$balance -= $p->currentRelevantRep()->currentamount;