Bug fixes

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

View File

@ -54,13 +54,13 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
return; return;
} }
$client->shipping_address1 = trim($data['SHIPTOSTREET']); $client->shipping_address1 = isset($data['SHIPTOSTREET']) ? trim($data['SHIPTOSTREET']) : '';
$client->shipping_address2 = ''; $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_state = isset($data['SHIPTOSTATE']) ? trim($data['SHIPTOSTATE']) : '';
$client->shipping_postal_code = isset($data['SHIPTOZIP']) ? trim($data['SHIPTOZIP']) : ''; $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'])); return strtolower($item->iso_3166_2) == strtolower(trim($data['SHIPTOCOUNTRYCODE']));
})->first()) { })->first()) {
$client->shipping_country_id = $country->id; $client->shipping_country_id = $country->id;

View File

@ -21,6 +21,10 @@ class ExpenseReport extends AbstractReport
'public_notes' => ['columnSelector-false'], 'public_notes' => ['columnSelector-false'],
'private_notes' => ['columnSelector-false'], 'private_notes' => ['columnSelector-false'],
'user' => ['columnSelector-false'], 'user' => ['columnSelector-false'],
'payment_date' => ['columnSelector-false'],
'payment_type' => ['columnSelector-false'],
'payment_reference' => ['columnSelector-false'],
]; ];
$user = auth()->user(); $user = auth()->user();
@ -59,7 +63,7 @@ class ExpenseReport extends AbstractReport
$expenses = Expense::scope() $expenses = Expense::scope()
->orderBy('expense_date', 'desc') ->orderBy('expense_date', 'desc')
->withArchived() ->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->startDate)
->where('expense_date', '<=', $this->endDate); ->where('expense_date', '<=', $this->endDate);
@ -93,6 +97,9 @@ class ExpenseReport extends AbstractReport
$expense->public_notes, $expense->public_notes,
$expense->private_notes, $expense->private_notes,
$expense->user->getDisplayName(), $expense->user->getDisplayName(),
$expense->present()->payment_date(),
$expense->payment_type_id ? $expense->payment_type->name : '',
$expense->transaction_reference,
]; ];
if ($account->customLabel('expense1')) { if ($account->customLabel('expense1')) {

View File

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