mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 07:04:35 -04:00
Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop
This commit is contained in:
commit
0dd4f53332
@ -1 +1 @@
|
|||||||
5.5.18
|
5.5.19
|
@ -436,9 +436,12 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
public $auto_archive_invoice_cancelled = false;
|
public $auto_archive_invoice_cancelled = false;
|
||||||
|
|
||||||
public $vendor_portal_enable_uploads=false;
|
public $vendor_portal_enable_uploads = false;
|
||||||
|
|
||||||
|
public $send_email_on_mark_paid = false;
|
||||||
|
|
||||||
public static $casts = [
|
public static $casts = [
|
||||||
|
'send_email_on_mark_paid' => 'bool',
|
||||||
'vendor_portal_enable_uploads' => 'bool',
|
'vendor_portal_enable_uploads' => 'bool',
|
||||||
'besr_id' => 'string',
|
'besr_id' => 'string',
|
||||||
'qr_iban' => 'string',
|
'qr_iban' => 'string',
|
||||||
|
@ -901,6 +901,10 @@ class BaseController extends Controller
|
|||||||
return redirect('/')->with(['signup' => 'true']);
|
return redirect('/')->with(['signup' => 'true']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$canvas_path_array = parse_url(config('ninja.app_url'));
|
||||||
|
|
||||||
|
$canvas_path = (array_key_exists('path', $canvas_path_array)) ? $canvas_path_array['path'] : '';
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
//pass report errors bool to front end
|
//pass report errors bool to front end
|
||||||
@ -911,6 +915,7 @@ class BaseController extends Controller
|
|||||||
$data['build'] = request()->has('build') ? request()->input('build') : '';
|
$data['build'] = request()->has('build') ? request()->input('build') : '';
|
||||||
$data['login'] = request()->has('login') ? request()->input('login') : 'false';
|
$data['login'] = request()->has('login') ? request()->input('login') : 'false';
|
||||||
$data['signup'] = request()->has('signup') ? request()->input('signup') : 'false';
|
$data['signup'] = request()->has('signup') ? request()->input('signup') : 'false';
|
||||||
|
$data['canvas_path'] = $canvas_path;
|
||||||
|
|
||||||
if (request()->session()->has('login')) {
|
if (request()->session()->has('login')) {
|
||||||
$data['login'] = 'true';
|
$data['login'] = 'true';
|
||||||
|
@ -80,9 +80,9 @@ class AdjustProductInventory implements ShouldQueue
|
|||||||
$p->in_stock_quantity -= $item->quantity;
|
$p->in_stock_quantity -= $item->quantity;
|
||||||
$p->saveQuietly();
|
$p->saveQuietly();
|
||||||
|
|
||||||
if ($p->stock_notification_threshold && $p->in_stock_quantity <= $p->stock_notification_threshold) {
|
if ($this->company->stock_notification && $p->stock_notification && $p->stock_notification_threshold && $p->in_stock_quantity <= $p->stock_notification_threshold) {
|
||||||
$this->notifyStockLevels($p, 'product');
|
$this->notifyStockLevels($p, 'product');
|
||||||
} elseif ($this->company->stock_notification_threshold && $p->in_stock_quantity <= $this->company->stock_notification_threshold) {
|
} elseif ($this->company->stock_notification && $p->stock_notification && $this->company->inventory_notification_threshold && $p->in_stock_quantity <= $this->company->inventory_notification_threshold) {
|
||||||
$this->notifyStocklevels($p, 'company');
|
$this->notifyStocklevels($p, 'company');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,10 @@ namespace App\Jobs\Util;
|
|||||||
use App\DataMapper\InvoiceItem;
|
use App\DataMapper\InvoiceItem;
|
||||||
use App\Events\Invoice\InvoiceWasEmailed;
|
use App\Events\Invoice\InvoiceWasEmailed;
|
||||||
use App\Jobs\Entity\EmailEntity;
|
use App\Jobs\Entity\EmailEntity;
|
||||||
|
use App\Jobs\Ninja\TransactionLog;
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
|
use App\Models\TransactionEvent;
|
||||||
use App\Utils\Ninja;
|
use App\Utils\Ninja;
|
||||||
use App\Utils\Traits\MakesDates;
|
use App\Utils\Traits\MakesDates;
|
||||||
use App\Utils\Traits\MakesReminders;
|
use App\Utils\Traits\MakesReminders;
|
||||||
@ -201,10 +203,20 @@ class ReminderJob implements ShouldQueue
|
|||||||
$client = $invoice->client;
|
$client = $invoice->client;
|
||||||
$client = $client->fresh();
|
$client = $client->fresh();
|
||||||
|
|
||||||
nlog('adjusting client balance and invoice balance by '.($invoice->balance - $temp_invoice_balance));
|
nlog('adjusting client balance and invoice balance by #'.$invoice->number.' '.($invoice->balance - $temp_invoice_balance));
|
||||||
$client->service()->updateBalance($invoice->balance - $temp_invoice_balance)->save();
|
$client->service()->updateBalance($invoice->balance - $temp_invoice_balance)->save();
|
||||||
$invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$invoice->number}");
|
$invoice->ledger()->updateInvoiceBalance($invoice->balance - $temp_invoice_balance, "Late Fee Adjustment for invoice {$invoice->number}");
|
||||||
|
|
||||||
|
$transaction = [
|
||||||
|
'invoice' => $invoice->transaction_event(),
|
||||||
|
'payment' => [],
|
||||||
|
'client' => $client->transaction_event(),
|
||||||
|
'credit' => [],
|
||||||
|
'metadata' => ['setLateFee'],
|
||||||
|
];
|
||||||
|
|
||||||
|
TransactionLog::dispatch(TransactionEvent::CLIENT_STATUS, $transaction, $invoice->company->db);
|
||||||
|
|
||||||
return $invoice;
|
return $invoice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,7 @@ class ApplyPayment extends AbstractService
|
|||||||
|
|
||||||
$this->invoice
|
$this->invoice
|
||||||
->client
|
->client
|
||||||
|
->fresh()
|
||||||
->service()
|
->service()
|
||||||
->updateBalance($amount_paid)
|
->updateBalance($amount_paid)
|
||||||
->save();
|
->save();
|
||||||
|
@ -17,6 +17,7 @@ use App\Factory\PaymentFactory;
|
|||||||
use App\Jobs\Invoice\InvoiceWorkflowSettings;
|
use App\Jobs\Invoice\InvoiceWorkflowSettings;
|
||||||
use App\Jobs\Payment\EmailPayment;
|
use App\Jobs\Payment\EmailPayment;
|
||||||
use App\Libraries\Currency\Conversion\CurrencyApi;
|
use App\Libraries\Currency\Conversion\CurrencyApi;
|
||||||
|
use App\Models\Client;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use App\Services\AbstractService;
|
use App\Services\AbstractService;
|
||||||
@ -87,11 +88,13 @@ class ApplyPaymentAmount extends AbstractService
|
|||||||
|
|
||||||
$this->invoice
|
$this->invoice
|
||||||
->client
|
->client
|
||||||
|
->fresh()
|
||||||
->service()
|
->service()
|
||||||
->updateBalance($payment->amount * -1)
|
->updateBalance($payment->amount * -1)
|
||||||
->updatePaidToDate($payment->amount)
|
->updatePaidToDate($payment->amount)
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
|
|
||||||
if ($this->invoice->client->getSetting('client_manual_payment_notification')) {
|
if ($this->invoice->client->getSetting('client_manual_payment_notification')) {
|
||||||
$payment->service()->sendEmail();
|
$payment->service()->sendEmail();
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,9 @@ class MarkPaid extends AbstractService
|
|||||||
|
|
||||||
$payment->service()->applyNumber()->save();
|
$payment->service()->applyNumber()->save();
|
||||||
|
|
||||||
|
if($payment->company->getSetting('send_email_on_mark_paid'))
|
||||||
|
$payment->service()->sendEmail();
|
||||||
|
|
||||||
$this->setExchangeRate($payment);
|
$this->setExchangeRate($payment);
|
||||||
|
|
||||||
/* Create a payment relationship to the invoice entity */
|
/* Create a payment relationship to the invoice entity */
|
||||||
|
@ -69,6 +69,7 @@ class MarkSent extends AbstractService
|
|||||||
$client = Client::withTrashed()->where('id', $this->client->id)->lockForUpdate()->first();
|
$client = Client::withTrashed()->where('id', $this->client->id)->lockForUpdate()->first();
|
||||||
$client->balance += $adjustment;
|
$client->balance += $adjustment;
|
||||||
$client->save();
|
$client->save();
|
||||||
|
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
||||||
$this->invoice->markInvitationsSent();
|
$this->invoice->markInvitationsSent();
|
||||||
|
@ -160,7 +160,7 @@ class HtmlEngine
|
|||||||
$data['$date'] = ['value' => $this->translateDate($this->entity->date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.invoice_date')];
|
$data['$date'] = ['value' => $this->translateDate($this->entity->date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.invoice_date')];
|
||||||
|
|
||||||
if($this->entity->project) {
|
if($this->entity->project) {
|
||||||
$data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project_name')];
|
$data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project')];
|
||||||
$data['$invoice.project'] = &$data['$project.name'];
|
$data['$invoice.project'] = &$data['$project.name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.5.18',
|
'app_version' => '5.5.19',
|
||||||
'app_tag' => '5.5.18',
|
'app_tag' => '5.5.19',
|
||||||
'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', ''),
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
window.flutterConfiguration = {
|
window.flutterConfiguration = {
|
||||||
canvasKitBaseUrl: "/canvaskit/"
|
canvasKitBaseUrl: "{{ $canvas_path }}/canvaskit/"
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user