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

Bug fixes

This commit is contained in:
Hillel Coren 2019-02-18 16:08:16 +02:00
parent aabb32b6ed
commit 46d342fa63
3 changed files with 12 additions and 4 deletions

View File

@ -54,13 +54,13 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
return;
}
$client->shipping_address1 = trim($data['SHIPTOSTREET']);
$client->shipping_address1 = isset($data['SHIPTOSTREET']) ? trim($data['SHIPTOSTREET']) : '';
$client->shipping_address2 = '';
$client->shipping_city = trim($data['SHIPTOCITY']);
$client->shipping_city = isset($data['SHIPTOCITY']) ? trim($data['SHIPTOCITY']) : '';
$client->shipping_state = isset($data['SHIPTOSTATE']) ? trim($data['SHIPTOSTATE']) : '';
$client->shipping_postal_code = isset($data['SHIPTOZIP']) ? trim($data['SHIPTOZIP']) : '';
if ($country = cache('countries')->filter(function ($item) use ($data) {
if (isset($data['SHIPTOCOUNTRYCODE']) && $country = cache('countries')->filter(function ($item) use ($data) {
return strtolower($item->iso_3166_2) == strtolower(trim($data['SHIPTOCOUNTRYCODE']));
})->first()) {
$client->shipping_country_id = $country->id;

View File

@ -22,6 +22,10 @@ class ExpenseReport extends AbstractReport
'public_notes' => ['columnSelector-false'],
'private_notes' => ['columnSelector-false'],
'user' => ['columnSelector-false'],
'payment_date' => ['columnSelector-false'],
'payment_type' => ['columnSelector-false'],
'payment_reference' => ['columnSelector-false'],
];
$user = auth()->user();
@ -62,7 +66,7 @@ class ExpenseReport extends AbstractReport
$expenses = Expense::scope()
->orderBy('expense_date', 'desc')
->withArchived()
->with('client.contacts', 'vendor', 'expense_category', 'user')
->with('client.contacts', 'vendor', 'expense_category', 'user', 'payment_type')
->where('expense_date', '>=', $this->startDate)
->where('expense_date', '<=', $this->endDate);
@ -97,6 +101,9 @@ class ExpenseReport extends AbstractReport
$expense->public_notes,
$expense->private_notes,
$expense->user->getDisplayName(),
$expense->present()->payment_date(),
$expense->payment_type_id ? $expense->payment_type->name : '',
$expense->transaction_reference,
];
if ($account->customLabel('expense1')) {

View File

@ -19,6 +19,7 @@
#scrollable-dropdown-menu .tt-menu {
max-height: 150px;
width: 300px;
overflow-y: auto;
overflow-x: hidden;
}