invoice send receipt email template issue fixed #2505
This commit is contained in:
parent
3db69e8cbf
commit
9a9f777fe6
@ -4,7 +4,8 @@ namespace App\Http\Controllers\Modals;
|
||||
|
||||
use App\Abstracts\Http\Controller;
|
||||
use App\Models\Banking\Transaction;
|
||||
use App\Notifications\Banking\Transaction as Notification;
|
||||
use App\Notifications\Portal\PaymentReceived as PaymentReceivedNotification;
|
||||
use App\Notifications\Banking\Transaction as TransactionNotification;
|
||||
use App\Jobs\Banking\SendTransactionAsCustomMail;
|
||||
use App\Http\Requests\Common\CustomMail as Request;
|
||||
|
||||
@ -33,7 +34,19 @@ class TransactionEmails extends Controller
|
||||
{
|
||||
$email_template = config('type.transaction.' . $transaction->type . '.email_template');
|
||||
|
||||
$notification = new Notification($transaction, $email_template, true);
|
||||
if (request()->get('email_template')) {
|
||||
$email_template = request()->get('email_template');
|
||||
}
|
||||
|
||||
switch ($email_template) {
|
||||
case 'invoice_payment_customer':
|
||||
$notification = new PaymentReceivedNotification($transaction->document, $transaction, $email_template, true);
|
||||
break;
|
||||
|
||||
default:
|
||||
$notification = new TransactionNotification($transaction, $email_template, true);
|
||||
break;
|
||||
}
|
||||
|
||||
$store_route = 'modals.transactions.emails.store';
|
||||
|
||||
|
@ -818,7 +818,11 @@ const app = new Vue({
|
||||
buttons:{}
|
||||
};
|
||||
|
||||
let email_promise = Promise.resolve(window.axios.get(email.route));
|
||||
let email_promise = Promise.resolve(window.axios.get(email.route, {
|
||||
params: {
|
||||
email_template: 'invoice_payment_customer'
|
||||
}
|
||||
}));
|
||||
|
||||
email_promise.then(response => {
|
||||
email.modal = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user