mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #5296 from turbo124/v5-develop
Fixes for subscriptions
This commit is contained in:
commit
ffdd81ab6b
@ -70,6 +70,10 @@ class Request extends FormRequest
|
||||
|
||||
public function decodePrimaryKeys($input)
|
||||
{
|
||||
if (array_key_exists('group_id', $input) && is_string($input['group_id'])) {
|
||||
$input['group_id'] = $this->decodePrimaryKey($input['group_id']);
|
||||
}
|
||||
|
||||
if (array_key_exists('subscription_id', $input) && is_string($input['subscription_id'])) {
|
||||
$input['subscription_id'] = $this->decodePrimaryKey($input['subscription_id']);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ namespace App\Mail;
|
||||
use App\Models\Client;
|
||||
use App\Models\ClientContact;
|
||||
use App\Models\User;
|
||||
use App\Utils\HtmlEngine;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
@ -52,6 +53,9 @@ class TemplateEmail extends Mailable
|
||||
|
||||
$company = $this->client->company;
|
||||
|
||||
$html_variables = (new HtmlEngine($this->invitation))->makeValues();
|
||||
|
||||
//str_replace(array_keys($html_variables), array_values($html_variables), $settings->email_signature)
|
||||
$this->from(config('mail.from.address'), $this->company->present()->name());
|
||||
|
||||
if (strlen($settings->bcc_email) > 1)
|
||||
@ -71,7 +75,7 @@ class TemplateEmail extends Mailable
|
||||
'view_link' => $this->build_email->getViewLink(),
|
||||
'view_text' => $this->build_email->getViewText(),
|
||||
'title' => '',
|
||||
'signature' => $settings->email_signature,
|
||||
'signature' => str_replace(array_keys($html_variables), array_values($html_variables), $settings->email_signature),
|
||||
'settings' => $settings,
|
||||
'company' => $company,
|
||||
'whitelabel' => $this->client->user->account->isPaid() ? true : false,
|
||||
|
@ -21,6 +21,17 @@ class AddPriceColumnToSubscriptionsTable extends Migration
|
||||
Schema::table('recurring_invoices', function (Blueprint $table) {
|
||||
$table->unsignedInteger('subscription_id')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('subscriptions', function (Blueprint $table) {
|
||||
$table->unsignedInteger('group_id')->nullable()->change();
|
||||
$table->text('product_ids')->nullable()->change();
|
||||
$table->text('recurring_product_ids')->nullable()->change();
|
||||
$table->text('auto_bill')->nullable()->change();
|
||||
$table->text('promo_code')->nullable()->change();
|
||||
$table->unsignedInteger('frequency_id')->nullable()->change();
|
||||
$table->text('plan_map')->nullable()->change();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -30,8 +41,5 @@ class AddPriceColumnToSubscriptionsTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('subscriptions', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
{{ $body }}
|
||||
{!! $body !!}
|
@ -8,7 +8,7 @@
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
<div class="sm:flex sm:items-start sm:justify-between">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
||||
{{ ctrans('texts.pending_approval') }}
|
||||
{{ ctrans('texts.approve') }}
|
||||
</h3>
|
||||
|
||||
<div class="mt-5 sm:mt-0 sm:ml-6 sm:flex-shrink-0 sm:flex sm:items-center">
|
||||
|
Loading…
x
Reference in New Issue
Block a user