mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Fixes for db::raw
This commit is contained in:
parent
f7f4804e34
commit
681c38e659
@ -168,7 +168,7 @@ trait ChartQueries
|
||||
{
|
||||
$user_filter = $this->is_admin ? '' : 'AND payments.user_id = '.$this->user->id;
|
||||
|
||||
return DB::select(("
|
||||
return DB::select("
|
||||
SELECT
|
||||
sum(payments.amount - payments.refunded) as paid_to_date,
|
||||
payments.currency_id AS currency_id
|
||||
|
@ -139,7 +139,7 @@ trait ChartQueriesLegacy
|
||||
AND invoices.is_deleted = 0
|
||||
AND (invoices.date BETWEEN :start_date AND :end_date)
|
||||
GROUP BY currency_id
|
||||
"), ['company_currency' => $this->company->settings->currency_id, 'company_id' => $this->company->id, 'start_date' => $start_date, 'end_date' => $end_date]);
|
||||
", ['company_currency' => $this->company->settings->currency_id, 'company_id' => $this->company->id, 'start_date' => $start_date, 'end_date' => $end_date]);
|
||||
}
|
||||
|
||||
public function getInvoiceChartQuery($start_date, $end_date, $currency_id)
|
||||
|
@ -15,6 +15,7 @@ use App\Models\Client;
|
||||
use App\Models\Company;
|
||||
use App\Models\Expense;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use App\Services\Chart\ChartQueriesLegacy;
|
||||
|
||||
class ChartServiceLegacy
|
||||
{
|
||||
|
@ -19,11 +19,11 @@ class PurchaseOrderHistoryTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
|
||||
protected $defaultIncludes = [
|
||||
protected array $defaultIncludes = [
|
||||
// 'activity',
|
||||
];
|
||||
|
||||
protected $availableIncludes = [
|
||||
protected array $availableIncludes = [
|
||||
'activity',
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user