mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 21:54:35 -04:00
Minor fixes for task start date calculations
This commit is contained in:
parent
b513ceed11
commit
9593c7c820
@ -144,7 +144,10 @@ class PaymentMethodController extends Controller
|
|||||||
try {
|
try {
|
||||||
event(new MethodDeleted($payment_method, auth()->guard('contact')->user()->company, Ninja::eventVars(auth()->guard('contact')->user()->id)));
|
event(new MethodDeleted($payment_method, auth()->guard('contact')->user()->company, Ninja::eventVars(auth()->guard('contact')->user()->id)));
|
||||||
|
|
||||||
|
$payment_method->is_deleted = true;
|
||||||
$payment_method->delete();
|
$payment_method->delete();
|
||||||
|
$payment_method->save();
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
nlog($e->getMessage());
|
nlog($e->getMessage());
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ class TaskRepository extends BaseRepository
|
|||||||
{
|
{
|
||||||
|
|
||||||
if(isset($time_log[0][0])) {
|
if(isset($time_log[0][0])) {
|
||||||
return \Carbon\Carbon::createFromTimestamp($time_log[0][0])->addSeconds($task->company->utc_offset());
|
return \Carbon\Carbon::createFromTimestamp($time_log[0][0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -323,13 +323,22 @@ class AutoBillInvoice extends AbstractService
|
|||||||
public function getGateway($amount)
|
public function getGateway($amount)
|
||||||
{
|
{
|
||||||
//get all client gateway tokens and set the is_default one to the first record
|
//get all client gateway tokens and set the is_default one to the first record
|
||||||
$gateway_tokens = $this->client
|
$gateway_tokens = \App\Models\ClientGatewayToken::query()
|
||||||
->gateway_tokens()
|
->where('client_id', $this->client->id)
|
||||||
->whereHas('gateway', function ($query) {
|
->where('is_deleted', 0)
|
||||||
$query->where('is_deleted', 0)
|
->whereHas('gateway', function ($query) {
|
||||||
->where('deleted_at', null);
|
$query->where('is_deleted', 0)
|
||||||
})->orderBy('is_default', 'DESC')
|
->where('deleted_at', null);
|
||||||
->get();
|
})->orderBy('is_default', 'DESC')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// $gateway_tokens = $this->client
|
||||||
|
// ->gateway_tokens()
|
||||||
|
// ->whereHas('gateway', function ($query) {
|
||||||
|
// $query->where('is_deleted', 0)
|
||||||
|
// ->where('deleted_at', null);
|
||||||
|
// })->orderBy('is_default', 'DESC')
|
||||||
|
// ->get();
|
||||||
|
|
||||||
$filtered_gateways = $gateway_tokens->filter(function ($gateway_token) use ($amount) {
|
$filtered_gateways = $gateway_tokens->filter(function ($gateway_token) use ($amount) {
|
||||||
$company_gateway = $gateway_token->gateway;
|
$company_gateway = $gateway_token->gateway;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user