Merge branch 'v5-develop' of https://github.com/turbo124/invoiceninja into v5-develop

This commit is contained in:
David Bomba 2022-02-21 20:31:23 +11:00
commit 4179610685
3 changed files with 13 additions and 10 deletions

View File

@ -70,16 +70,16 @@ class PaymentMethod
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
$this->gateways =
CompanyGateway::with('gateway')
->where('company_id', $this->client->company_id)
$this->gateways = $this->client
->company
->company_gateways
->whereIn('id', $transformed_ids)
->where('is_deleted', false)
->whereNull('deleted_at')
->where('gateway_key', '!=', '54faab2ab6e3223dbe848b1686490baa')
->sortby(function ($model) use ($transformed_ids) { //company gateways are sorted in order of priority
return array_search($model->id, $transformed_ids);// this closure sorts for us
})->get();
});
} else {
@ -105,15 +105,16 @@ class PaymentMethod
$transformed_ids = $this->transformKeys(explode(',', $company_gateways));
$this->gateways = CompanyGateway::with('gateway')
->where('company_id', $this->client->company_id)
$this->gateways = $this->client
->company
->company_gateways
->whereIn('id', $transformed_ids)
->where('is_deleted', false)
->whereNull('deleted_at')
->where('gateway_key', '54faab2ab6e3223dbe848b1686490baa')
->sortby(function ($model) use ($transformed_ids) { //company gateways are sorted in order of priority
return array_search($model->id, $transformed_ids);// this closure sorts for us
})->get();
});
} else {

View File

@ -262,9 +262,11 @@ class Helpers
}
}
$x = str_replace(["\n", "<br>"], ["\r", "<br>"], $value);
return $value;
return $x;
// $x = str_replace(["\n", "<br>"], ["\r", "<br>"], $value);
// return $x;
}
/**

View File

@ -78,7 +78,7 @@
{{ ctrans('texts.due_date') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $invoice->due_date }}
{{ $invoice->translateDate($invoice->due_date, $invoice->client->date_format(), $invoice->client->locale()) }}
</dd>
</div>
@endif