commit
cc6b6ac6fa
|
|
@ -1 +1 @@
|
|||
5.12.16
|
||||
5.12.17
|
||||
|
|
@ -75,7 +75,7 @@ class Handler extends ExceptionHandler
|
|||
];
|
||||
|
||||
protected $hostedDontReport = [
|
||||
MaxAttemptsExceededException::class,
|
||||
// MaxAttemptsExceededException::class,
|
||||
CommandNotFoundException::class,
|
||||
ValidationException::class,
|
||||
ModelNotFoundException::class,
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ class ExpenseExport extends BaseExport
|
|||
$entity['expense.net_amount'] = round($expense->amount, $precision) - $total_tax_amount;
|
||||
} else {
|
||||
$entity['expense.net_amount'] = round($expense->amount, $precision);
|
||||
$entity['expense.amount'] = round($expense->amount, $precision) + $total_tax_amount;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -274,7 +275,8 @@ class ExpenseExport extends BaseExport
|
|||
$entity['expense.net_amount'] = round(($expense->amount - round($total_tax_amount, $precision)), $precision);
|
||||
} else {
|
||||
$total_tax_amount = ($expense->amount * (($expense->tax_rate1 ?? 0) / 100)) + ($expense->amount * (($expense->tax_rate2 ?? 0) / 100)) + ($expense->amount * (($expense->tax_rate3 ?? 0) / 100));
|
||||
$entity['expense.net_amount'] = round(($expense->amount + round($total_tax_amount, $precision)), $precision);
|
||||
$entity['expense.net_amount'] = round($expense->amount, $precision);
|
||||
$entity['expense.amount'] = round($expense->amount, $precision) + $total_tax_amount;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ class ClientController extends BaseController
|
|||
//delete all documents
|
||||
$client->documents->each(function ($document) {
|
||||
try {
|
||||
Storage::disk(config('filesystems.default'))->delete($document->url);
|
||||
Storage::disk($document->disk)->delete($document->url);
|
||||
} catch (\Exception $e) {
|
||||
nlog($e->getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,19 +34,19 @@ class ReportExportController extends BaseController
|
|||
return response()->json(['message' => 'Still working.....'], 409);
|
||||
}
|
||||
|
||||
$report = base64_decode($report);
|
||||
// $report = base64_decode($report);
|
||||
|
||||
Cache::forget($hash);
|
||||
// Cache::forget($hash);
|
||||
|
||||
if($this->isXlsxData($report)){
|
||||
// if($this->isXlsxData($report)){
|
||||
|
||||
return response($report, 200, [
|
||||
'Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'Content-Disposition' => 'inline; filename="report.xlsx"',
|
||||
'Content-Length' => strlen($report)
|
||||
]);
|
||||
// return response($report, 200, [
|
||||
// 'Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
// 'Content-Disposition' => 'inline; filename="report.xlsx"',
|
||||
// 'Content-Length' => strlen($report)
|
||||
// ]);
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
// Check if the content starts with PDF signature (%PDF-)
|
||||
$isPdf = str_starts_with(trim($report), '%PDF-');
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ class ReportPreviewController extends BaseController
|
|||
|
||||
$report = Cache::get($hash);
|
||||
|
||||
nlog($report);
|
||||
|
||||
if (!$report) {
|
||||
return response()->json(['message' => 'Still working.....'], 409);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class CheckVat implements ShouldQueue
|
|||
|
||||
public function middleware()
|
||||
{
|
||||
return [(new WithoutOverlapping($this->client->client_hash))->releaseAfter(60)];
|
||||
return [(new WithoutOverlapping($this->client->client_hash))->releaseAfter(60)->expireAfter(60)];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,13 @@ use Illuminate\Queue\Middleware\WithoutOverlapping;
|
|||
|
||||
class PaymentBalanceActivity implements ShouldQueue
|
||||
{
|
||||
|
||||
use InteractsWithQueue;
|
||||
|
||||
public $tries = 1;
|
||||
|
||||
public $delay = 5;
|
||||
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
|
|
@ -45,4 +51,13 @@ class PaymentBalanceActivity implements ShouldQueue
|
|||
{
|
||||
return [(new WithoutOverlapping($event->payment->client->client_hash))->releaseAfter(60)->expireAfter(60)];
|
||||
}
|
||||
|
||||
public function failed($exception)
|
||||
{
|
||||
if ($exception) {
|
||||
nlog('PaymentBalanceActivity failed', ['exception' => $exception]);
|
||||
}
|
||||
|
||||
// config(['queue.failed.driver' => null]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -926,7 +926,12 @@ class Client extends BaseModel implements HasLocalePreference
|
|||
{
|
||||
return $this->company->company_key.'/';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* document_filepath
|
||||
* @deprecated. not used.
|
||||
* @return string
|
||||
*/
|
||||
public function document_filepath(): string
|
||||
{
|
||||
return $this->company->company_key.'/documents/';
|
||||
|
|
|
|||
|
|
@ -88,4 +88,12 @@ class StripeWebhook implements ShouldQueue
|
|||
], $stripe->stripe_connect_auth);
|
||||
}
|
||||
}
|
||||
|
||||
public function failed($exception = null)
|
||||
{
|
||||
nlog("StripeWebhook failed: " . $exception->getMessage());
|
||||
|
||||
config(['queue.failed.driver' => null]);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class BankMatchingService implements ShouldQueue
|
|||
|
||||
public $timeout = 3600;
|
||||
|
||||
public function __construct(public $company_id, public $db)
|
||||
public function __construct(public int $company_id, public string $db)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ class Statement
|
|||
$this->client->settings = $settings;
|
||||
|
||||
$this->entity = \App\Models\Invoice::factory()->make(); //@phpstan-ignore-line
|
||||
$this->entity->client_id = $this->client->id;//@phpstan-ignore-line
|
||||
$this->entity->client = $this->client;//@phpstan-ignore-line
|
||||
$ii = \App\Models\InvoiceInvitation::factory()->make(); //@phpstan-ignore-line
|
||||
$ii->setRelation('invoice', $this->entity); //@phpstan-ignore-line
|
||||
|
|
@ -219,17 +220,10 @@ class Statement
|
|||
$ii->setRelation('company', $this->client->company);
|
||||
$ii->setRelation('user', $this->client->user);
|
||||
$this->entity->client->setRelation('company', $this->client->company);
|
||||
$this->entity->setRelation('invitations', $ii); //@phpstan-ignore-line
|
||||
$this->entity->setRelation('invitations', collect([$ii])); //@phpstan-ignore-line
|
||||
$this->entity->setRelation('company', $this->client->company);
|
||||
$this->entity->setRelation('user', $this->client->user);
|
||||
|
||||
// $this->entity = \App\Models\Invoice::factory()->make(); //@phpstan-ignore-line
|
||||
// $this->entity->client = \App\Models\Client::factory()->make(['settings' => $settings]); //@phpstan-ignore-line
|
||||
// $this->entity->client->setRelation('company', $this->client->company);
|
||||
// $this->entity->setRelation('invitations', \App\Models\InvoiceInvitation::factory()->make()); //@phpstan-ignore-line
|
||||
// $this->entity->setRelation('company', $this->client->company);
|
||||
// $this->entity->setRelation('user', $this->client->user);
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ return [
|
|||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => env('APP_VERSION', '5.12.16'),
|
||||
'app_tag' => env('APP_TAG', '5.12.16'),
|
||||
'app_version' => env('APP_VERSION', '5.12.17'),
|
||||
'app_tag' => env('APP_TAG', '5.12.17'),
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', false),
|
||||
|
|
|
|||
|
|
@ -42,7 +42,11 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'queue' => env('SCOUT_QUEUE', true),
|
||||
// 'queue' => env('SCOUT_QUEUE', true),
|
||||
'queue' => [
|
||||
'connection' => 'redis',
|
||||
'queue' => 'scout'
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue