mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 18:14: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);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
@ -132,7 +132,6 @@ class ContactLoginController extends Controller
|
||||
|
||||
public function authenticated(Request $request, ClientContact $client)
|
||||
{
|
||||
// Auth::guard('contact')->loginUsingId($client->id, true);
|
||||
auth()->guard('contact')->loginUsingId($client->id, true);
|
||||
|
||||
event(new ContactLoggedIn($client, $client->company, Ninja::eventVars()));
|
||||
|
@ -37,15 +37,14 @@ class ContactRegister
|
||||
if(! $company->client_can_register)
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$query = [
|
||||
$query = [
|
||||
'portal_domain' => $request->getSchemeAndHttpHost(),
|
||||
'portal_mode' => 'domain',
|
||||
];
|
||||
|
@ -1335,12 +1335,14 @@ class CompanyImport implements ShouldQueue
|
||||
|
||||
/* New to convert product ids from old hashes to new hashes*/
|
||||
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']);
|
||||
// $obj_array['webhook_configuration'] = json_encode($obj_array['webhook_configuration']);
|
||||
$obj_array['webhook_configuration'] = '';
|
||||
|
||||
if(array_key_exists('company', $obj_array))
|
||||
unset($obj_array['company']);
|
||||
|
||||
$obj_array['webhook_configuration'] = (array)$obj_array['webhook_configuration'];
|
||||
$obj_array['recurring_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*/
|
||||
|
@ -172,7 +172,7 @@ class Statement
|
||||
$item->tax_rate1 = 5;
|
||||
}
|
||||
|
||||
$product = Product::all()->random();
|
||||
$product = Product::first();
|
||||
|
||||
$item->cost = (float) $product->cost;
|
||||
$item->product_key = $product->product_key;
|
||||
|
@ -11,6 +11,10 @@
|
||||
<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 }">
|
||||
@if($company)
|
||||
<input type="hidden" name="company_key" value="{{ $company->company_key }}">
|
||||
@endif
|
||||
|
||||
@csrf
|
||||
|
||||
<div class="grid grid-cols-12 gap-4 mt-10">
|
||||
|
Loading…
x
Reference in New Issue
Block a user