Resolve dashboard/reporting discrepancy.
This commit is contained in:
@@ -31,16 +31,24 @@ export default function DashboardProjectedMonthlySales({ data, ...cardProps }) {
|
||||
}
|
||||
|
||||
export const DashboardProjectedMonthlySalesGql = `
|
||||
projected_monthly_sales: jobs(where: {_or: [{_and: [{date_invoiced: {_gte: "${moment()
|
||||
.startOf("month")
|
||||
.format("YYYY-MM-DD")}"}}, {date_invoiced: {_lte: "${moment()
|
||||
.endOf("month")
|
||||
.format("YYYY-MM-DD")}"}}]}, {_and: [{scheduled_completion: {_gte: "${moment()
|
||||
projected_monthly_sales: jobs(where: {
|
||||
voided: {_eq: false},
|
||||
_or: [
|
||||
{_and: [{date_invoiced: {_gte: "${moment()
|
||||
.startOf("month").startOf('day').toISOString()}"}}, {date_invoiced: {_lte: "${moment()
|
||||
.endOf("month").endOf('day').toISOString()}"}}]},
|
||||
|
||||
{_and: [
|
||||
{date_invoiced: {_is_null: true}},
|
||||
{scheduled_completion: {_gte: "${moment()
|
||||
.startOf("month")
|
||||
.format("YYYY-MM-DD")}"}}, {scheduled_completion: {_lte: "${moment()
|
||||
.endOf("month")
|
||||
.format("YYYY-MM-DD")}"}}]}]}) {
|
||||
.startOf('day').toISOString()}"}}, {scheduled_completion: {_lte: "${moment()
|
||||
.endOf("month").endOf('day').toISOString()}"}}]}
|
||||
|
||||
]}) {
|
||||
id
|
||||
ro_number
|
||||
voided
|
||||
date_invoiced
|
||||
job_totals
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user