mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04: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;
|
$user_filter = $this->is_admin ? '' : 'AND payments.user_id = '.$this->user->id;
|
||||||
|
|
||||||
return DB::select(("
|
return DB::select("
|
||||||
SELECT
|
SELECT
|
||||||
sum(payments.amount - payments.refunded) as paid_to_date,
|
sum(payments.amount - payments.refunded) as paid_to_date,
|
||||||
payments.currency_id AS currency_id
|
payments.currency_id AS currency_id
|
||||||
|
@ -139,7 +139,7 @@ trait ChartQueriesLegacy
|
|||||||
AND invoices.is_deleted = 0
|
AND invoices.is_deleted = 0
|
||||||
AND (invoices.date BETWEEN :start_date AND :end_date)
|
AND (invoices.date BETWEEN :start_date AND :end_date)
|
||||||
GROUP BY currency_id
|
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)
|
public function getInvoiceChartQuery($start_date, $end_date, $currency_id)
|
||||||
|
@ -15,6 +15,7 @@ use App\Models\Client;
|
|||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
use App\Models\Expense;
|
use App\Models\Expense;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use App\Services\Chart\ChartQueriesLegacy;
|
||||||
|
|
||||||
class ChartServiceLegacy
|
class ChartServiceLegacy
|
||||||
{
|
{
|
||||||
|
@ -19,11 +19,11 @@ class PurchaseOrderHistoryTransformer extends EntityTransformer
|
|||||||
{
|
{
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
|
|
||||||
protected $defaultIncludes = [
|
protected array $defaultIncludes = [
|
||||||
// 'activity',
|
// 'activity',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $availableIncludes = [
|
protected array $availableIncludes = [
|
||||||
'activity',
|
'activity',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user