Fix types and codes import

This commit is contained in:
Nabeel Shahzad
2018-03-22 19:59:35 -05:00
parent 112a72ac6f
commit 8b53ca2fdc
5 changed files with 47 additions and 4 deletions

View File

@@ -50,6 +50,9 @@ class ExpenseImporter extends ImportExport
$row = $this->getRefClassInfo($row);
$row['type'] = ExpenseType::getFromCode($row['type']);
if(!$row['active']) {
$row['active'] = true;
}
$expense = Expense::firstOrNew([
'name' => $row['name'],