Merge pull request #7714 from turbo124/v5-stable

v5.5.7
This commit is contained in:
David Bomba 2022-08-05 10:00:07 +10:00 committed by GitHub
commit fb552029b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 6 deletions

View File

@ -1 +1 @@
5.5.6
5.5.7

View File

@ -37,7 +37,7 @@ class ContactLoginController extends Controller
$this->middleware('guest:contact', ['except' => ['logout']]);
}
public function showLoginForm(Request $request)
public function showLoginForm(Request $request, $company_key = false)
{
$company = false;
$account = false;
@ -49,6 +49,9 @@ class ContactLoginController extends Controller
elseif($request->has('company_key')){
MultiDB::findAndSetDbByCompanyKey($request->input('company_key'));
$company = Company::where('company_key', $request->input('company_key'))->first();
}elseif($company_key){
MultiDB::findAndSetDbByCompanyKey($company_key);
$company = Company::where('company_key', $company_key)->first();
}
if ($company) {

View File

@ -84,6 +84,7 @@ class CreateAccount
if (Ninja::isHosted()) {
$sp794f3f->hosted_client_count = config('ninja.quotas.free.clients');
$sp794f3f->hosted_company_count = config('ninja.quotas.free.max_companies');
$sp794f3f->account_sms_verified = true;
// $sp794f3f->trial_started = now();
// $sp794f3f->trial_plan = 'pro';
}

View File

@ -172,6 +172,11 @@ class Vendor extends BaseModel
return $this->company->company_key.'/'.$this->vendor_hash.'/'.$contact_key.'/purchase_orders/';
}
public function locale()
{
return $this->company->locale();
}
public function country()
{
return $this->belongsTo(Country::class);

View File

@ -55,7 +55,6 @@ class MarkPaid extends AbstractService
$payment->amount = $this->invoice->balance;
$payment->applied = $this->invoice->balance;
$payment->number = $this->getNextPaymentNumber($this->invoice->client, $payment);
$payment->status_id = Payment::STATUS_COMPLETED;
$payment->client_id = $this->invoice->client_id;
$payment->transaction_reference = ctrans('texts.manual_entry');
@ -74,6 +73,8 @@ class MarkPaid extends AbstractService
$payment->saveQuietly();
$payment->service()->applyNumber()->save();
$this->setExchangeRate($payment);
/* Create a payment relationship to the invoice entity */

View File

@ -36,7 +36,7 @@ class SendEmail
$contact = $this->payment->client->contacts()->first();
if ($contact->email)
if ($contact?->email)
EmailPayment::dispatch($this->payment, $this->payment->company, $contact);
}

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.5.6',
'app_tag' => '5.5.6',
'app_version' => '5.5.7',
'app_tag' => '5.5.7',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),