mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:27:31 -05:00 
			
		
		
		
	
						commit
						bfe31c09ce
					
				@ -1 +1 @@
 | 
				
			|||||||
5.3.45
 | 
					5.3.46
 | 
				
			||||||
@ -87,6 +87,10 @@ class InvitationController extends Controller
 | 
				
			|||||||
        if(!$invitation)
 | 
					        if(!$invitation)
 | 
				
			||||||
            return abort(404,'The resource is no longer available.');
 | 
					            return abort(404,'The resource is no longer available.');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /* 12/01/2022 Clean up an edge case where if the contact is trashed, restore if a invitation comes back. */
 | 
				
			||||||
 | 
					        if($invitation->contact->trashed())
 | 
				
			||||||
 | 
					            $invitation->contact->restore();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* Return early if we have the correct client_hash embedded */
 | 
					        /* Return early if we have the correct client_hash embedded */
 | 
				
			||||||
        $client_contact = $invitation->contact;
 | 
					        $client_contact = $invitation->contact;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -34,7 +34,7 @@ class CheckClientExistence
 | 
				
			|||||||
            ->where('email', auth('contact')->user()->email)
 | 
					            ->where('email', auth('contact')->user()->email)
 | 
				
			||||||
            ->whereNotNull('email')
 | 
					            ->whereNotNull('email')
 | 
				
			||||||
            ->where('email', '<>', '')
 | 
					            ->where('email', '<>', '')
 | 
				
			||||||
            ->whereNull('deleted_at')
 | 
					            // ->whereNull('deleted_at')
 | 
				
			||||||
            ->distinct('company_id')
 | 
					            ->distinct('company_id')
 | 
				
			||||||
            ->distinct('email')
 | 
					            ->distinct('email')
 | 
				
			||||||
            ->whereNotNull('company_id')
 | 
					            ->whereNotNull('company_id')
 | 
				
			||||||
@ -46,10 +46,11 @@ class CheckClientExistence
 | 
				
			|||||||
            })
 | 
					            })
 | 
				
			||||||
            ->get();
 | 
					            ->get();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /* This catches deleted clients who don't have access to the app. We automatically log them out here*/
 | 
				
			||||||
        if (count($multiple_contacts) == 0) {
 | 
					        if (count($multiple_contacts) == 0) {
 | 
				
			||||||
            Auth::logout();
 | 
					            Auth::logout();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return redirect()->route('client.login');
 | 
					            return redirect()->route('client.login')->with('message', 'Login disabled');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (count($multiple_contacts) == 1 && !Auth::guard('contact')->check()) {
 | 
					        if (count($multiple_contacts) == 1 && !Auth::guard('contact')->check()) {
 | 
				
			||||||
 | 
				
			|||||||
@ -477,6 +477,11 @@ class Import implements ShouldQueue
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $company_settings->{$key} = $value;
 | 
					                $company_settings->{$key} = $value;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if($key == 'payment_terms'){
 | 
				
			||||||
 | 
					                    settype($company_settings->payment_terms, 'string');
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $data['settings'] = $company_settings;
 | 
					            $data['settings'] = $company_settings;
 | 
				
			||||||
 | 
				
			|||||||
@ -60,14 +60,14 @@ class Token
 | 
				
			|||||||
        if(!$response_status['success'])
 | 
					        if(!$response_status['success'])
 | 
				
			||||||
          return $this->processUnsuccessfulPayment($response);
 | 
					          return $this->processUnsuccessfulPayment($response);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      	$payment = $this->processSuccessfulPayment($response);
 | 
					      	$payment = $this->processSuccessfulPayment($response, $cgt);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      	return $payment;
 | 
					      	return $payment;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private function processSuccessfulPayment($response)
 | 
					    private function processSuccessfulPayment($response, $cgt)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $amount = array_sum(array_column($this->eway_driver->payment_hash->invoices(), 'amount')) + $this->eway_driver->payment_hash->fee_total;
 | 
					        $amount = array_sum(array_column($this->eway_driver->payment_hash->invoices(), 'amount')) + $this->eway_driver->payment_hash->fee_total;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -103,7 +103,7 @@ class Token
 | 
				
			|||||||
            'error_code' => $error_code,
 | 
					            'error_code' => $error_code,
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $this->driver_class->processUnsuccessfulTransaction($data);
 | 
					        return $this->eway_driver->processUnsuccessfulTransaction($data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -114,7 +114,7 @@ class SOFORT
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        $server_response = $this->stripe->payment_hash->data;
 | 
					        $server_response = $this->stripe->payment_hash->data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->stripe->sendFailureMail($server_response);
 | 
					        $this->stripe->sendFailureMail("There was an undefined error processing this payment.");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $message = [
 | 
					        $message = [
 | 
				
			||||||
            'server_response' => $server_response,
 | 
					            'server_response' => $server_response,
 | 
				
			||||||
 | 
				
			|||||||
@ -53,7 +53,8 @@ return [
 | 
				
			|||||||
    */
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    'url' => env('APP_URL', 'http://localhost'),
 | 
					    'url' => env('APP_URL', 'http://localhost'),
 | 
				
			||||||
    'mix_url' => env('APP_URL', 'http://localhost'),
 | 
					
 | 
				
			||||||
 | 
					    'mix_url' => env('MIX_ASSET_URL', env('APP_URL', null)),
 | 
				
			||||||
    /*
 | 
					    /*
 | 
				
			||||||
    |--------------------------------------------------------------------------
 | 
					    |--------------------------------------------------------------------------
 | 
				
			||||||
    | Application Timezone
 | 
					    | Application Timezone
 | 
				
			||||||
 | 
				
			|||||||
@ -14,8 +14,8 @@ return [
 | 
				
			|||||||
    'require_https' => env('REQUIRE_HTTPS', true),
 | 
					    'require_https' => env('REQUIRE_HTTPS', true),
 | 
				
			||||||
    'app_url' => rtrim(env('APP_URL', ''), '/'),
 | 
					    'app_url' => rtrim(env('APP_URL', ''), '/'),
 | 
				
			||||||
    'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
 | 
					    'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
 | 
				
			||||||
    'app_version' => '5.3.45',
 | 
					    'app_version' => '5.3.46',
 | 
				
			||||||
    'app_tag' => '5.3.45',
 | 
					    'app_tag' => '5.3.46',
 | 
				
			||||||
    'minimum_client_version' => '5.0.16',
 | 
					    'minimum_client_version' => '5.0.16',
 | 
				
			||||||
    'terms_version' => '1.0.1',
 | 
					    'terms_version' => '1.0.1',
 | 
				
			||||||
    'api_secret' => env('API_SECRET', ''),
 | 
					    'api_secret' => env('API_SECRET', ''),
 | 
				
			||||||
 | 
				
			|||||||
@ -196,6 +196,6 @@ return [
 | 
				
			|||||||
    |
 | 
					    |
 | 
				
			||||||
    */
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    'same_site' => 'lax',
 | 
					    'same_site' => env('SESSION_SAME_SITE', 'lax'),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user