diff --git a/app/DataMapper/Sources/PayPalBalanceAffecting.php b/app/DataMapper/Sources/PayPalBalanceAffecting.php index ad11c0340bb6..2e547b706fd5 100644 --- a/app/DataMapper/Sources/PayPalBalanceAffecting.php +++ b/app/DataMapper/Sources/PayPalBalanceAffecting.php @@ -105,17 +105,34 @@ class PayPalBalanceAffecting public $discount; public $creditTransactionalFee; public $originalInvoiceId; - + public function __construct(private array $import_row){} public function run(): self { + $this->cleanUp(); + foreach($this->import_row as $key => $value) { $prop = $this->key_map[$key] ?? false; - if($prop) + if($prop){ + + echo "Setting {$prop} to {$value}".PHP_EOL; $this->{$prop} = $value; + + } + } + + return $this; + } + + private function cleanUp(): self + { + + foreach($this->key_map as $value){ + echo "Setting {$value} to null".PHP_EOL; + $this->{$value} = null; } return $this; @@ -149,6 +166,7 @@ class PayPalBalanceAffecting 'line_items' => [$item], 'name' => $this->name ?? '', 'email' => $this->fromEmailAddress ?? '', + 'transaction_reference' => $this->transactionId ?? '', ]; } diff --git a/resources/views/portal/ninja2020/components/general/sidebar/header.blade.php b/resources/views/portal/ninja2020/components/general/sidebar/header.blade.php index 59ebf6b00108..9a9f41940360 100644 --- a/resources/views/portal/ninja2020/components/general/sidebar/header.blade.php +++ b/resources/views/portal/ninja2020/components/general/sidebar/header.blade.php @@ -25,7 +25,7 @@ @foreach($multiple_contacts as $contact) {{ $contact->client->present()->name()}} + class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900">{{ $contact->client->present()->name()}} - ({{$contact->company->present()->name()}}) @endforeach