More stuff.

This commit is contained in:
James Cole
2015-05-17 12:49:09 +02:00
parent 033f5b67db
commit b123860304
15 changed files with 301 additions and 81 deletions

View File

@@ -272,13 +272,10 @@ class BillRepository implements BillRepositoryInterface
*/
public function scan(Bill $bill, TransactionJournal $journal)
{
/*
* Match words.
*/
$amountMatch = false;
$wordMatch = false;
$matches = explode(',', $bill->match);
$description = strtolower($journal->description);
Log::debug('Now scanning ' . $description);
/*
* Attach expense account to description for more narrow matching.
@@ -316,7 +313,6 @@ class BillRepository implements BillRepositoryInterface
* Match amount.
*/
$amountMatch = false;
if (count($transactions) > 1) {
$amount = max(floatval($transactions[0]->amount), floatval($transactions[1]->amount));