mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:54:30 -04:00
Merge pull request #7033 from turbo124/v5-develop
Minor fixes for client statements
This commit is contained in:
commit
df483b11d6
@ -96,7 +96,7 @@ class ContactLoginController extends Controller
|
|||||||
return $this->sendLockoutResponse($request);
|
return $this->sendLockoutResponse($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Ninja::isHosted() && $company = Company::where('company_key', $request->input('company_key'))->first()){
|
if(Ninja::isHosted() && $request->has('password') && $company = Company::where('company_key', $request->input('company_key'))->first()){
|
||||||
|
|
||||||
$contact = ClientContact::where(['email' => $request->input('email'), 'company_id' => $company->id])->first();
|
$contact = ClientContact::where(['email' => $request->input('email'), 'company_id' => $company->id])->first();
|
||||||
|
|
||||||
@ -132,7 +132,6 @@ class ContactLoginController extends Controller
|
|||||||
|
|
||||||
public function authenticated(Request $request, ClientContact $client)
|
public function authenticated(Request $request, ClientContact $client)
|
||||||
{
|
{
|
||||||
// Auth::guard('contact')->loginUsingId($client->id, true);
|
|
||||||
auth()->guard('contact')->loginUsingId($client->id, true);
|
auth()->guard('contact')->loginUsingId($client->id, true);
|
||||||
|
|
||||||
event(new ContactLoggedIn($client, $client->company, Ninja::eventVars()));
|
event(new ContactLoggedIn($client, $client->company, Ninja::eventVars()));
|
||||||
|
@ -37,15 +37,14 @@ class ContactRegister
|
|||||||
if(! $company->client_can_register)
|
if(! $company->client_can_register)
|
||||||
abort(400, 'Registration disabled');
|
abort(400, 'Registration disabled');
|
||||||
|
|
||||||
// $request->merge(['key' => $company->company_key]);
|
session()->put('key', $company->company_key);
|
||||||
session()->put('key', $company->company_key);
|
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'portal_domain' => $request->getSchemeAndHttpHost(),
|
'portal_domain' => $request->getSchemeAndHttpHost(),
|
||||||
'portal_mode' => 'domain',
|
'portal_mode' => 'domain',
|
||||||
];
|
];
|
||||||
|
@ -1332,15 +1332,17 @@ class CompanyImport implements ShouldQueue
|
|||||||
if(array_key_exists('deleted_at', $obj_array) && $obj_array['deleted_at'] > 1){
|
if(array_key_exists('deleted_at', $obj_array) && $obj_array['deleted_at'] > 1){
|
||||||
$obj_array['deleted_at'] = now();
|
$obj_array['deleted_at'] = now();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* New to convert product ids from old hashes to new hashes*/
|
/* New to convert product ids from old hashes to new hashes*/
|
||||||
if($class == 'App\Models\Subscription'){
|
if($class == 'App\Models\Subscription'){
|
||||||
//$obj_array['product_ids'] = $this->recordProductIds($obj_array['product_ids']);
|
|
||||||
//$obj_array['recurring_product_ids'] = $this->recordProductIds($obj_array['recurring_product_ids']);
|
if(array_key_exists('company', $obj_array))
|
||||||
// $obj_array['webhook_configuration'] = json_encode($obj_array['webhook_configuration']);
|
unset($obj_array['company']);
|
||||||
$obj_array['webhook_configuration'] = '';
|
|
||||||
|
$obj_array['webhook_configuration'] = (array)$obj_array['webhook_configuration'];
|
||||||
$obj_array['recurring_product_ids'] = '';
|
$obj_array['recurring_product_ids'] = '';
|
||||||
$obj_array['product_ids'] = '';
|
$obj_array['product_ids'] = '';
|
||||||
|
nlog($obj_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expenses that don't have a number will not be inserted - so need to override here*/
|
/* Expenses that don't have a number will not be inserted - so need to override here*/
|
||||||
|
@ -172,7 +172,7 @@ class Statement
|
|||||||
$item->tax_rate1 = 5;
|
$item->tax_rate1 = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$product = Product::all()->random();
|
$product = Product::first();
|
||||||
|
|
||||||
$item->cost = (float) $product->cost;
|
$item->cost = (float) $product->cost;
|
||||||
$item->product_key = $product->product_key;
|
$item->product_key = $product->product_key;
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
<p class="block text-center text-gray-600">{{ ctrans('texts.register_label') }}</p>
|
<p class="block text-center text-gray-600">{{ ctrans('texts.register_label') }}</p>
|
||||||
|
|
||||||
<form action="{{ route('client.register', request()->route('company_key')) }}" method="POST" x-data="{ more: false }">
|
<form action="{{ route('client.register', request()->route('company_key')) }}" method="POST" x-data="{ more: false }">
|
||||||
|
@if($company)
|
||||||
|
<input type="hidden" name="company_key" value="{{ $company->company_key }}">
|
||||||
|
@endif
|
||||||
|
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<div class="grid grid-cols-12 gap-4 mt-10">
|
<div class="grid grid-cols-12 gap-4 mt-10">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user