mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 21:52:35 +01:00
commit
2caf21ff47
@ -1 +1 @@
|
|||||||
5.4.3
|
5.4.4
|
@ -866,7 +866,7 @@ class CheckData extends Command
|
|||||||
|
|
||||||
foreach(Invoice::with(['payments'])->whereHas('payments')->where('status_id', 4)->where('balance', '>', 0)->where('is_deleted',0)->cursor() as $invoice)
|
foreach(Invoice::with(['payments'])->whereHas('payments')->where('status_id', 4)->where('balance', '>', 0)->where('is_deleted',0)->cursor() as $invoice)
|
||||||
{
|
{
|
||||||
$this->$this->wrong_paid_status++;
|
$this->wrong_paid_status++;
|
||||||
|
|
||||||
$this->logMessage("# {$invoice->id} " . ' - '.$invoice->number." - Marked as paid, but balance = {$invoice->balance}");
|
$this->logMessage("# {$invoice->id} " . ' - '.$invoice->number." - Marked as paid, but balance = {$invoice->balance}");
|
||||||
|
|
||||||
|
@ -90,8 +90,10 @@ class TemplateEmail extends Mailable
|
|||||||
|
|
||||||
if (strlen($settings->bcc_email) > 1){
|
if (strlen($settings->bcc_email) > 1){
|
||||||
|
|
||||||
if(Ninja::isHosted())
|
if(Ninja::isHosted()){
|
||||||
$this->bcc(reset(explode(",",str_replace(" ", "", $settings->bcc_email))));//remove whitespace if any has been inserted.
|
$bccs = explode(",",str_replace(" ", "", $settings->bcc_email));
|
||||||
|
$this->bcc(reset($bccs));//remove whitespace if any has been inserted.
|
||||||
|
}
|
||||||
else
|
else
|
||||||
$this->bcc(explode(",",str_replace(" ", "", $settings->bcc_email)));//remove whitespace if any has been inserted.
|
$this->bcc(explode(",",str_replace(" ", "", $settings->bcc_email)));//remove whitespace if any has been inserted.
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ class Account extends BaseModel
|
|||||||
{
|
{
|
||||||
|
|
||||||
if(Carbon::createFromTimestamp($this->created_at)->diffInWeeks() == 0)
|
if(Carbon::createFromTimestamp($this->created_at)->diffInWeeks() == 0)
|
||||||
return 50;
|
return 20;
|
||||||
|
|
||||||
if($this->isPaid()){
|
if($this->isPaid()){
|
||||||
$limit = $this->paid_plan_email_quota;
|
$limit = $this->paid_plan_email_quota;
|
||||||
|
@ -118,6 +118,9 @@ class PaymentIntentWebhook implements ShouldQueue
|
|||||||
if(!$payment_hash)
|
if(!$payment_hash)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
nlog("payment intent");
|
||||||
|
nlog($this->stripe_request);
|
||||||
|
|
||||||
if(optional($this->stripe_request['object']['charges']['data'][0]['metadata']['payment_hash']) && in_array('card', $this->stripe_request['object']['allowed_source_types']))
|
if(optional($this->stripe_request['object']['charges']['data'][0]['metadata']['payment_hash']) && in_array('card', $this->stripe_request['object']['allowed_source_types']))
|
||||||
{
|
{
|
||||||
nlog("hash found");
|
nlog("hash found");
|
||||||
|
@ -123,6 +123,7 @@ class AutoBillInvoice extends AbstractService
|
|||||||
->setPaymentHash($payment_hash)
|
->setPaymentHash($payment_hash)
|
||||||
->tokenBilling($gateway_token, $payment_hash);
|
->tokenBilling($gateway_token, $payment_hash);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
$this->invoice->auto_bill_tries += 1;
|
$this->invoice->auto_bill_tries += 1;
|
||||||
|
|
||||||
if ($this->invoice->auto_bill_tries == 3) {
|
if ($this->invoice->auto_bill_tries == 3) {
|
||||||
@ -131,6 +132,8 @@ class AutoBillInvoice extends AbstractService
|
|||||||
$this->invoice->save();
|
$this->invoice->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->invoice->save();
|
||||||
|
|
||||||
nlog("payment NOT captured for " . $this->invoice->number . " with error " . $e->getMessage());
|
nlog("payment NOT captured for " . $this->invoice->number . " with error " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ class UpdateReminder extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($this->invoice->reminder1_sent) &&
|
if (is_null($this->invoice->reminder1_sent) &&
|
||||||
|
$this->invoice->due_date &&
|
||||||
$this->settings->schedule_reminder1 == 'before_due_date') {
|
$this->settings->schedule_reminder1 == 'before_due_date') {
|
||||||
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->subDays($this->settings->num_days_reminder1)->addSeconds($offset);
|
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->subDays($this->settings->num_days_reminder1)->addSeconds($offset);
|
||||||
|
|
||||||
@ -66,6 +67,7 @@ class UpdateReminder extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($this->invoice->reminder1_sent) &&
|
if (is_null($this->invoice->reminder1_sent) &&
|
||||||
|
$this->invoice->due_date &&
|
||||||
$this->settings->schedule_reminder1 == 'after_due_date') {
|
$this->settings->schedule_reminder1 == 'after_due_date') {
|
||||||
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->addDays($this->settings->num_days_reminder1)->addSeconds($offset);
|
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->addDays($this->settings->num_days_reminder1)->addSeconds($offset);
|
||||||
|
|
||||||
@ -82,6 +84,7 @@ class UpdateReminder extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($this->invoice->reminder2_sent) &&
|
if (is_null($this->invoice->reminder2_sent) &&
|
||||||
|
$this->invoice->due_date &&
|
||||||
$this->settings->schedule_reminder2 == 'before_due_date') {
|
$this->settings->schedule_reminder2 == 'before_due_date') {
|
||||||
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->subDays($this->settings->num_days_reminder2)->addSeconds($offset);
|
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->subDays($this->settings->num_days_reminder2)->addSeconds($offset);
|
||||||
|
|
||||||
@ -90,6 +93,7 @@ class UpdateReminder extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($this->invoice->reminder2_sent) &&
|
if (is_null($this->invoice->reminder2_sent) &&
|
||||||
|
$this->invoice->due_date &&
|
||||||
$this->settings->schedule_reminder2 == 'after_due_date') {
|
$this->settings->schedule_reminder2 == 'after_due_date') {
|
||||||
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->addDays($this->settings->num_days_reminder2)->addSeconds($offset);
|
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->addDays($this->settings->num_days_reminder2)->addSeconds($offset);
|
||||||
|
|
||||||
@ -106,6 +110,7 @@ class UpdateReminder extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($this->invoice->reminder3_sent) &&
|
if (is_null($this->invoice->reminder3_sent) &&
|
||||||
|
$this->invoice->due_date &&
|
||||||
$this->settings->schedule_reminder3 == 'before_due_date') {
|
$this->settings->schedule_reminder3 == 'before_due_date') {
|
||||||
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->subDays($this->settings->num_days_reminder3)->addSeconds($offset);
|
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->subDays($this->settings->num_days_reminder3)->addSeconds($offset);
|
||||||
|
|
||||||
@ -114,6 +119,7 @@ class UpdateReminder extends AbstractService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($this->invoice->reminder3_sent) &&
|
if (is_null($this->invoice->reminder3_sent) &&
|
||||||
|
$this->invoice->due_date &&
|
||||||
$this->settings->schedule_reminder3 == 'after_due_date') {
|
$this->settings->schedule_reminder3 == 'after_due_date') {
|
||||||
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->addDays($this->settings->num_days_reminder3)->addSeconds($offset);
|
$reminder_date = Carbon::parse($this->invoice->due_date)->startOfDay()->addDays($this->settings->num_days_reminder3)->addSeconds($offset);
|
||||||
|
|
||||||
|
@ -116,6 +116,11 @@ class Helpers
|
|||||||
|
|
||||||
$replacements = [
|
$replacements = [
|
||||||
'literal' => [
|
'literal' => [
|
||||||
|
':MONTHYEAR' => \sprintf(
|
||||||
|
'%s %s',
|
||||||
|
Carbon::createFromDate(now()->month)->translatedFormat('F'),
|
||||||
|
now()->year,
|
||||||
|
),
|
||||||
':MONTH' => Carbon::createFromDate(now()->year, now()->month)->translatedFormat('F'),
|
':MONTH' => Carbon::createFromDate(now()->year, now()->month)->translatedFormat('F'),
|
||||||
':YEAR' => now()->year,
|
':YEAR' => now()->year,
|
||||||
':QUARTER' => 'Q' . now()->quarter,
|
':QUARTER' => 'Q' . now()->quarter,
|
||||||
@ -139,6 +144,7 @@ class Helpers
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
'raw' => [
|
'raw' => [
|
||||||
|
':MONTHYEAR' => now()->month,
|
||||||
':MONTH' => now()->month,
|
':MONTH' => now()->month,
|
||||||
':YEAR' => now()->year,
|
':YEAR' => now()->year,
|
||||||
':QUARTER' => now()->quarter,
|
':QUARTER' => now()->quarter,
|
||||||
@ -256,6 +262,18 @@ class Helpers
|
|||||||
$output = \Carbon\Carbon::create()->month($output)->translatedFormat('F');
|
$output = \Carbon\Carbon::create()->month($output)->translatedFormat('F');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($matches->keys()->first() == ':MONTHYEAR') {
|
||||||
|
|
||||||
|
$final_date = now()->addMonths($output-now()->month);
|
||||||
|
|
||||||
|
$output = \sprintf(
|
||||||
|
'%s %s',
|
||||||
|
$final_date->translatedFormat('F'),
|
||||||
|
$final_date->year,
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$value = preg_replace(
|
$value = preg_replace(
|
||||||
$target, $output, $value, 1
|
$target, $output, $value, 1
|
||||||
);
|
);
|
||||||
|
@ -14,8 +14,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => '5.4.3',
|
'app_version' => '5.4.4',
|
||||||
'app_tag' => '5.4.3',
|
'app_tag' => '5.4.4',
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', ''),
|
'api_secret' => env('API_SECRET', ''),
|
||||||
|
@ -26,7 +26,7 @@ class CreateScheduledJobsTable extends Migration
|
|||||||
$table->id();
|
$table->id();
|
||||||
$table->string('action_name');
|
$table->string('action_name');
|
||||||
$table->string('action_class');
|
$table->string('action_class');
|
||||||
$table->json('parameters')->nullable();
|
$table->mediumText('parameters')->nullable();
|
||||||
$table->foreignIdFor(\App\Models\Company::class);
|
$table->foreignIdFor(\App\Models\Company::class);
|
||||||
$table->foreignIdFor(\App\Models\Scheduler::class);
|
$table->foreignIdFor(\App\Models\Scheduler::class);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
Loading…
Reference in New Issue
Block a user