1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #8735 from turbo124/v5-develop

v5.7.0
This commit is contained in:
David Bomba 2023-08-21 21:15:54 +10:00 committed by GitHub
commit 39471152fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 22 additions and 17 deletions

View File

@ -1 +1 @@
5.6.31
5.7.0

View File

@ -125,11 +125,11 @@ class StripeConnectController extends BaseController
$company_gateway->save();
// StripeWebhook::dispatch($company->company_key, $company_gateway->id);
if(isset($request->getTokenContent()['is_react']) && $request->getTokenContent()['is_react']) {
// if(isset($request->getTokenContent()['is_react']) && $request->getTokenContent()['is_react']) {
$redirect_uri = 'https://app.invoicing.co/#/settings/online_payments';
} else {
$redirect_uri = 'https://invoicing.co/stripe/completed';
}
// } else {
// $redirect_uri = 'https://invoicing.co/stripe/completed';
// }
//response here
return view('auth.connect.completed', ['url' => $redirect_uri]);

View File

@ -118,11 +118,8 @@ class DocumentsTable extends Component
protected function documents()
{
return Document::query()
->where('is_public', true)
->whereHasMorph('documentable', [Client::class], function ($query) {
$query->where('client_id', $this->client->id);
});
return $this->client->documents()
->where('is_public', true);
}
protected function credits()

View File

@ -111,6 +111,7 @@ class ProcessBankTransactions implements ShouldQueue
if($account[0]['current_balance']) {
$this->bank_integration->balance = $account[0]['current_balance'];
$this->bank_integration->currency = $account[0]['account_currency'];
$this->bank_integration->bank_account_status = $account[0]['account_status'];
$this->bank_integration->save();
}

View File

@ -880,6 +880,13 @@ class Company extends BaseModel
return $data;
}
public function utc_offset(): int
{
$timezone = $this->timezone();
return $timezone->utc_offset ?? 0;
}
public function timezone_offset(): int
{
$offset = 0;

View File

@ -118,7 +118,7 @@ class TaskRepository extends BaseRepository
$task->is_running = $data['is_running'] ? 1 : 0;
}
$task->calculated_start_date = $this->harvestStartDate($time_log);
$task->calculated_start_date = $this->harvestStartDate($time_log, $task);
$task->time_log = json_encode($time_log);
@ -133,11 +133,11 @@ class TaskRepository extends BaseRepository
return $task;
}
private function harvestStartDate($time_log)
private function harvestStartDate($time_log, $task)
{
if(isset($time_log[0][0])){
return \Carbon\Carbon::createFromTimestamp($time_log[0][0]);
return \Carbon\Carbon::createFromTimestamp($time_log[0][0])->addSeconds($task->company->utc_offset());
}
return null;
@ -218,7 +218,7 @@ class TaskRepository extends BaseRepository
$log = array_merge($log, [[$start_time, 0]]);
$task->time_log = json_encode($log);
$task->calculated_start_date = \Carbon\Carbon::createFromTimestamp($start_time);
$task->calculated_start_date = \Carbon\Carbon::createFromTimestamp($start_time)->addSeconds($task->company->utc_offset());
$task->saveQuietly();
}

View File

@ -15,8 +15,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.6.31'),
'app_tag' => env('APP_TAG','5.6.31'),
'app_version' => env('APP_VERSION','5.7.0'),
'app_tag' => env('APP_TAG','5.7.0'),
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -46,6 +46,6 @@ class RecurringInvoicesCronTest extends TestCase
$this->assertEquals(5, $recurring_invoices->count());
$this->assertEquals(6, $recurring_all->count());
$this->assertEquals(7, $recurring_all->count());
}
}