1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Add private notes to expense import

This commit is contained in:
Hillel Coren 2018-02-14 22:39:30 +02:00
parent fa7ff2061d
commit 6ccdc5802d
2 changed files with 4 additions and 1 deletions

View File

@ -61,6 +61,7 @@ class Expense extends EntityModel
'vendor',
'amount',
'public_notes',
'private_notes',
'expense_category',
'expense_date',
];
@ -73,7 +74,8 @@ class Expense extends EntityModel
'category' => 'expense_category',
'client' => 'client',
'vendor' => 'vendor',
'notes|details' => 'public_notes',
'notes|details^private' => 'public_notes',
'notes|details^public' => 'private_notes',
'date' => 'expense_date',
];
}

View File

@ -24,6 +24,7 @@ class ExpenseTransformer extends BaseTransformer
'client_id' => isset($data->client) ? $this->getClientId($data->client) : null,
'expense_date' => isset($data->expense_date) ? date('Y-m-d', strtotime($data->expense_date)) : null,
'public_notes' => $this->getString($data, 'public_notes'),
'private_notes' => $this->getString($data, 'private_notes'),
'expense_category_id' => isset($data->expense_category) ? $this->getExpenseCategoryId($data->expense_category) : null,
];
});