mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
commit
f467b32730
@ -1 +1 @@
|
||||
5.3.83
|
||||
5.3.84
|
@ -271,8 +271,10 @@ class CompanySettings extends BaseSettings
|
||||
public $use_credits_payment = 'off'; //always, option, off //@implemented
|
||||
public $hide_empty_columns_on_pdf = false;
|
||||
public $email_from_name = '';
|
||||
public $auto_archive_invoice_cancelled = false;
|
||||
|
||||
public static $casts = [
|
||||
'auto_archive_invoice_cancelled' => 'bool',
|
||||
'email_from_name' => 'string',
|
||||
'show_all_tasks_client_portal' => 'string',
|
||||
'entity_send_time' => 'int',
|
||||
|
@ -107,6 +107,8 @@ class ClientController extends BaseController
|
||||
*/
|
||||
public function index(ClientFilters $filters)
|
||||
{
|
||||
set_time_limit(45);
|
||||
|
||||
$clients = Client::filter($filters);
|
||||
|
||||
return $this->listResponse($clients);
|
||||
|
@ -119,6 +119,8 @@ class InvoiceController extends BaseController
|
||||
*/
|
||||
public function index(InvoiceFilters $filters)
|
||||
{
|
||||
set_time_limit(45);
|
||||
|
||||
$invoices = Invoice::filter($filters);
|
||||
|
||||
return $this->listResponse($invoices);
|
||||
|
@ -111,6 +111,7 @@ class SelfUpdateController extends BaseController
|
||||
}
|
||||
|
||||
$this->testWritable();
|
||||
$this->clearCacheDir();
|
||||
|
||||
copy($this->getDownloadUrl(), storage_path('app/invoiceninja.zip'));
|
||||
|
||||
@ -158,6 +159,19 @@ class SelfUpdateController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
private function clearCacheDir()
|
||||
{
|
||||
|
||||
$directoryIterator = new \RecursiveDirectoryIterator(base_path('bootstrap/cache'), \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||
|
||||
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
|
||||
|
||||
unlink(base_path('bootstrap/cache/').$file->getFileName());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function testWritable()
|
||||
{
|
||||
$directoryIterator = new \RecursiveDirectoryIterator(base_path(), \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||
|
@ -569,8 +569,6 @@ class BaseImport
|
||||
'company' => $this->company,
|
||||
];
|
||||
|
||||
nlog($this->company->company_users);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new ImportCompleted($this->company, $data);
|
||||
$nmo->company = $this->company;
|
||||
|
@ -30,7 +30,8 @@ class SupportMessageSent extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$system_info = null;
|
||||
$system_info = request()->has('version') ? 'Version: '.request()->input('version') : 'Version: No Version Supplied.';
|
||||
|
||||
$log_lines = [];
|
||||
|
||||
/*
|
||||
|
@ -159,7 +159,7 @@ class Gateway extends StaticModel
|
||||
break;
|
||||
case 52:
|
||||
return [
|
||||
GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => [' ']], // GoCardless
|
||||
GatewayType::BANK_TRANSFER => ['refund' => false, 'token_billing' => true, 'webhooks' => [' ']], // GoCardless
|
||||
GatewayType::DIRECT_DEBIT => ['refund' => false, 'token_billing' => true, 'webhooks' => [' ']],
|
||||
GatewayType::SEPA => ['refund' => false, 'token_billing' => true, 'webhooks' => [' ']],
|
||||
GatewayType::INSTANT_BANK_PAY => ['refund' => false, 'token_billing' => true, 'webhooks' => [' ']],
|
||||
|
@ -186,7 +186,7 @@ class PaymentRepository extends BaseRepository {
|
||||
|
||||
TransactionLog::dispatch(TransactionEvent::PAYMENT_MADE, $transaction, $payment->company->db);
|
||||
|
||||
return $payment->fresh();
|
||||
return $payment->refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,6 +52,8 @@ class HandleCancellation extends AbstractService
|
||||
//adjust client balance
|
||||
$this->invoice->client->service()->updateBalance($adjustment)->save();
|
||||
|
||||
$this->invoice->service()->workFlow()->save();
|
||||
|
||||
event(new InvoiceWasCancelled($this->invoice, $this->invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
|
||||
$transaction = [
|
||||
|
@ -546,6 +546,19 @@ class InvoiceService
|
||||
event(new InvoiceWasArchived($this->invoice, $this->invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ($this->invoice->status_id == Invoice::STATUS_CANCELLED && $this->invoice->client->getSetting('auto_archive_invoice_cancelled')) {
|
||||
/* Throws: Payment amount xxx does not match invoice totals. */
|
||||
|
||||
if ($this->invoice->trashed())
|
||||
return $this;
|
||||
|
||||
$this->invoice->delete();
|
||||
|
||||
event(new InvoiceWasArchived($this->invoice, $this->invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));
|
||||
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -48,7 +48,8 @@ class Ninja
|
||||
'White Label: '.'\\n'. // TODO: Implement white label with hasFeature.
|
||||
'Server OS: '.php_uname('s').' '.php_uname('r').'\\n'.
|
||||
'PHP Version: '.phpversion().'\\n'.
|
||||
'MySQL Version: '.$mysql_version;
|
||||
'MySQL Version: '.$mysql_version.'\\n'.
|
||||
'Version: '. request()->has('version') ? request()->input('version') : 'No Version Supplied.';
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
@ -14,8 +14,8 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => '5.3.83',
|
||||
'app_tag' => '5.3.83',
|
||||
'app_version' => '5.3.84',
|
||||
'app_tag' => '5.3.84',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', ''),
|
||||
|
Loading…
Reference in New Issue
Block a user