mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fixes for payment emails
This commit is contained in:
parent
d1048b4542
commit
c166ef82ff
@ -17,6 +17,7 @@ use App\Http\ValidationRules\Company\ValidSubdomain;
|
||||
use App\Http\ValidationRules\ValidSettingsRule;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Invoiceninja\Einvoice\Models\FatturaPA\FatturaElettronica;
|
||||
|
||||
class UpdateCompanyRequest extends Request
|
||||
{
|
||||
@ -113,6 +114,11 @@ class UpdateCompanyRequest extends Request
|
||||
$input['smtp_verify_peer'] == 'true' ? true : false;
|
||||
}
|
||||
|
||||
// if(isset($input['e_invoice'])){
|
||||
// nlog("am i set?");
|
||||
// $r = FatturaElettronica::validate($input['e_invoice']);
|
||||
// }
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
|
||||
|
@ -241,6 +241,32 @@ class CompanyImport implements ShouldQueue
|
||||
CompanyGateway::class => [
|
||||
'always_show_required_fields',
|
||||
]
|
||||
],
|
||||
'5.8.57' => [
|
||||
Company::class => [
|
||||
'einvoice',
|
||||
'e_invoice',
|
||||
],
|
||||
Invoice::class => [
|
||||
'einvoice',
|
||||
'e_invoice',
|
||||
],
|
||||
Quote::class => [
|
||||
'einvoice',
|
||||
'e_invoice',
|
||||
],
|
||||
Credit::class => [
|
||||
'einvoice',
|
||||
'e_invoice',
|
||||
],
|
||||
PurchaseOrder::class => [
|
||||
'einvoice',
|
||||
'e_invoice',
|
||||
],
|
||||
Expense::class => [
|
||||
'einvoice',
|
||||
'e_invoice',
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -675,6 +675,9 @@ class NinjaMailerJob implements ShouldQueue
|
||||
*/
|
||||
private function preFlightChecksFail(): bool
|
||||
{
|
||||
|
||||
(new \Modules\Admin\Jobs\Account\EmailQuality($this->nmo, $this->company))->run();
|
||||
|
||||
/* Always send regardless */
|
||||
if ($this->override) {
|
||||
return false;
|
||||
|
@ -116,13 +116,16 @@ class EmailPayment implements ShouldQueue
|
||||
|
||||
$invoice->invitations->each(function ($invite) use ($email_builder) {
|
||||
|
||||
$cloned_mailable = unserialize(serialize($email_builder));
|
||||
|
||||
$nmo = new NinjaMailerObject();
|
||||
$nmo->mailable = new TemplateEmail($email_builder, $invite->contact, $invite);
|
||||
$nmo->mailable = new TemplateEmail($cloned_mailable, $invite->contact, $invite);
|
||||
$nmo->to_user = $invite->contact;
|
||||
$nmo->settings = $this->settings;
|
||||
$nmo->company = $this->company;
|
||||
$nmo->entity = $this->payment;
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
$nmo = null;
|
||||
|
||||
event(new PaymentWasEmailed($this->payment, $this->payment->company, $invite->contact, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
|
||||
|
@ -126,7 +126,7 @@ class ReminderJob implements ShouldQueue
|
||||
}
|
||||
|
||||
$reminder_template = $invoice->calculateTemplate('invoice');
|
||||
nrlog("reminder template = {$reminder_template}");
|
||||
nrlog("#{$invoice->number} => reminder template = {$reminder_template}");
|
||||
$invoice->service()->touchReminder($reminder_template)->save();
|
||||
$fees = $this->calcLateFee($invoice, $reminder_template);
|
||||
|
||||
|
@ -364,6 +364,7 @@ class Company extends BaseModel
|
||||
'smtp_encryption',
|
||||
'smtp_local_domain',
|
||||
'smtp_verify_peer',
|
||||
'e_invoice',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
20
composer.lock
generated
20
composer.lock
generated
@ -1385,16 +1385,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.304.1",
|
||||
"version": "3.307.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "6dac9b3257873a807ac73f6dc4418bdc49a5d9db"
|
||||
"reference": "cc79f16e1a1bd3feee421401ba2f21915abfdf91"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6dac9b3257873a807ac73f6dc4418bdc49a5d9db",
|
||||
"reference": "6dac9b3257873a807ac73f6dc4418bdc49a5d9db",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/cc79f16e1a1bd3feee421401ba2f21915abfdf91",
|
||||
"reference": "cc79f16e1a1bd3feee421401ba2f21915abfdf91",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1474,9 +1474,9 @@
|
||||
"support": {
|
||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.304.1"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.307.1"
|
||||
},
|
||||
"time": "2024-04-09T19:25:27+00:00"
|
||||
"time": "2024-05-17T18:07:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@ -5034,12 +5034,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/invoiceninja/einvoice.git",
|
||||
"reference": "e59a4c4d06ea61da87f7cdb19dac88e4e8665454"
|
||||
"reference": "39aec367c528ba66d923dc1d9e5c96f673bb46c7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/e59a4c4d06ea61da87f7cdb19dac88e4e8665454",
|
||||
"reference": "e59a4c4d06ea61da87f7cdb19dac88e4e8665454",
|
||||
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/39aec367c528ba66d923dc1d9e5c96f673bb46c7",
|
||||
"reference": "39aec367c528ba66d923dc1d9e5c96f673bb46c7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5075,7 +5075,7 @@
|
||||
"source": "https://github.com/invoiceninja/einvoice/tree/main",
|
||||
"issues": "https://github.com/invoiceninja/einvoice/issues"
|
||||
},
|
||||
"time": "2024-05-20T04:15:47+00:00"
|
||||
"time": "2024-05-20T11:42:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "invoiceninja/inspector",
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user