1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Merge branch 'develop' of github.com:invoiceninja/invoiceninja into develop

This commit is contained in:
Hillel Coren 2016-10-19 10:17:32 +03:00
commit 4ed8246681

View File

@ -23,11 +23,16 @@ class ExpenseTransformer extends EntityTransformer
'transaction_id' => $expense->transaction_id, 'transaction_id' => $expense->transaction_id,
'bank_id' => $expense->bank_id, 'bank_id' => $expense->bank_id,
'expense_currency_id' => (int) $expense->expense_currency_id, 'expense_currency_id' => (int) $expense->expense_currency_id,
'expense_category_id' => (int) $expense->expense_category_id,
'amount' => (float) $expense->amount, 'amount' => (float) $expense->amount,
'expense_date' => $expense->expense_date, 'expense_date' => $expense->expense_date,
'exchange_rate' => (float) $expense->exchange_rate, 'exchange_rate' => (float) $expense->exchange_rate,
'invoice_currency_id' => (int) $expense->invoice_currency_id, 'invoice_currency_id' => (int) $expense->invoice_currency_id,
'is_deleted' => (bool) $expense->is_deleted, 'is_deleted' => (bool) $expense->is_deleted,
'tax_name1' => $expense->tax_name1,
'tax_name2' => $expense->tax_name2,
'tax_rate1' => $expense->tax_rate1,
'tax_rate2' => $expense->tax_rate2,
'client_id' => $this->client ? $this->client->public_id : (isset($expense->client->public_id) ? (int) $expense->client->public_id : null), 'client_id' => $this->client ? $this->client->public_id : (isset($expense->client->public_id) ? (int) $expense->client->public_id : null),
'invoice_id' => isset($expense->invoice->public_id) ? (int) $expense->invoice->public_id : null, 'invoice_id' => isset($expense->invoice->public_id) ? (int) $expense->invoice->public_id : null,
'vendor_id' => isset($expense->vendor->public_id) ? (int) $expense->vendor->public_id : null, 'vendor_id' => isset($expense->vendor->public_id) ? (int) $expense->vendor->public_id : null,