diff --git a/admin/src/components/jobs/jobs.edit.jsx b/admin/src/components/jobs/jobs.edit.jsx
index 133e9a295..aa191e1e8 100644
--- a/admin/src/components/jobs/jobs.edit.jsx
+++ b/admin/src/components/jobs/jobs.edit.jsx
@@ -141,7 +141,6 @@ const JobsEdit = (props) => (
-
diff --git a/admin/src/components/jobs/jobs.show.jsx b/admin/src/components/jobs/jobs.show.jsx
index f57787c8d..ccb5c0be0 100644
--- a/admin/src/components/jobs/jobs.show.jsx
+++ b/admin/src/components/jobs/jobs.show.jsx
@@ -7,7 +7,7 @@ import {
Show,
Tab,
TabbedShowLayout,
- TextField
+ TextField,
} from "react-admin";
const JobsShow = (props) => (
@@ -128,7 +128,6 @@ const JobsShow = (props) => (
-
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index d64846190..525f8ac33 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -19131,6 +19131,27 @@
+
+ scheduledinchange
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
state_tax_amt
false
diff --git a/client/src/components/contract-form/contract-form.component.jsx b/client/src/components/contract-form/contract-form.component.jsx
index d50ac8a94..74e6a59bc 100644
--- a/client/src/components/contract-form/contract-form.component.jsx
+++ b/client/src/components/contract-form/contract-form.component.jsx
@@ -104,9 +104,14 @@ export default function ContractFormComponent({
)}
-
-
-
+ {selectedJobState && (
+
+
+
+ )}
{t("jobs.errors.nodates")}
@@ -97,13 +96,6 @@ export default function JobDetailCardsDatesComponent({ loading, data }) {
) : null}
- {data.date_closed ? (
-
-
- {data.date_closed}
-
- ) : null}
-
{data.date_exported ? (
diff --git a/client/src/components/jobs-detail-dates/jobs-detail-dates.component.jsx b/client/src/components/jobs-detail-dates/jobs-detail-dates.component.jsx
index 4ceefe853..d75d907e1 100644
--- a/client/src/components/jobs-detail-dates/jobs-detail-dates.component.jsx
+++ b/client/src/components/jobs-detail-dates/jobs-detail-dates.component.jsx
@@ -1,4 +1,4 @@
-import { DatePicker, Form } from "antd";
+import { DatePicker, Form, Tooltip } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -36,9 +36,11 @@ export function JobsDetailDatesComponent({ jobRO, job }) {
>
-
-
-
+
+
+
+
+
@@ -73,9 +75,7 @@ export function JobsDetailDatesComponent({ jobRO, job }) {
-
-
-
+
diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js
index 040e2e497..9da5ea9a4 100644
--- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js
+++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util.js
@@ -45,7 +45,7 @@ export default function DuplicateJob(
delete newJob.date_estimated;
delete newJob.date_scheduled;
delete newJob.date_invoiced;
- delete newJob.date_closed;
+
delete newJob.date_exported;
delete newJob.date_delivered;
delete newJob.scheduled_completion;
diff --git a/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx b/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx
index ff051e291..43a98c85d 100644
--- a/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx
+++ b/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx
@@ -85,6 +85,17 @@ export function ScheduleJobModalContainer({
}
}
+ if (existingAppointments.data.appointments.length > 0) {
+ console.log("Cancelling all previous appts.");
+ await Promise.all(
+ existingAppointments.data.appointments.map((app) => {
+ return cancelAppointment({
+ variables: { appid: app.id },
+ });
+ })
+ );
+ }
+
const appt = await insertAppointment({
variables: {
app: {
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 5cfda38e8..b7b61a101 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -466,7 +466,6 @@ export const GET_JOB_BY_PK = gql`
date_open
date_scheduled
date_invoiced
- date_closed
date_exported
status
owner_owing
@@ -602,7 +601,7 @@ export const QUERY_JOB_CARD_DETAILS = gql`
date_invoiced
date_open
date_exported
- date_closed
+
date_scheduled
date_estimated
@@ -658,7 +657,7 @@ export const QUERY_TECH_JOB_DETAILS = gql`
date_invoiced
date_open
date_exported
- date_closed
+
date_scheduled
date_estimated
employee_body
diff --git a/client/src/pages/jobs-detail/jobs-detail.page.component.jsx b/client/src/pages/jobs-detail/jobs-detail.page.component.jsx
index 553d18a71..33477cb78 100644
--- a/client/src/pages/jobs-detail/jobs-detail.page.component.jsx
+++ b/client/src/pages/jobs-detail/jobs-detail.page.component.jsx
@@ -10,7 +10,7 @@ import Axios from "axios";
import Dinero from "dinero.js";
import moment from "moment";
import queryString from "query-string";
-import React, { lazy, Suspense, useState } from "react";
+import React, { lazy, Suspense, useState, useEffect } from "react";
import { useTranslation } from "react-i18next";
import { FaHardHat, FaRegStickyNote, FaShieldAlt } from "react-icons/fa";
import { connect } from "react-redux";
@@ -94,6 +94,12 @@ export function JobsDetailPage({
// size: "small",
};
+ useEffect(() => {
+ console.log("Resetting jobs form as job has changed.");
+ form.resetFields();
+ form.resetFields();
+ }, [form, job]);
+
const handleFinish = async (values) => {
setLoading(true);
//const newTotals = CalculateJob({ ...job, ...values }, bodyshop.shoprates);
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index f93919eaf..3759066f8 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -1155,6 +1155,7 @@
"sale_labor": "Sales - Labor",
"sale_parts": "Sales - Parts",
"sales": "Sales",
+ "scheduledinchange": "The scheduled in is based off the latest appointment. To change this date, please schedule or reschedule the job. ",
"state_tax_amt": "State/Provincial Taxes",
"subletstotal": "Sublets Total",
"subtotal": "Subtotal",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 8c42db601..bd30fcb83 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -1155,6 +1155,7 @@
"sale_labor": "",
"sale_parts": "",
"sales": "",
+ "scheduledinchange": "",
"state_tax_amt": "",
"subletstotal": "",
"subtotal": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 7449ae7fa..132df8ee7 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -1155,6 +1155,7 @@
"sale_labor": "",
"sale_parts": "",
"sales": "",
+ "scheduledinchange": "",
"state_tax_amt": "",
"subletstotal": "",
"subtotal": "",
diff --git a/hasura/migrations/1612812065763_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1612812065763_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..1446f80b1
--- /dev/null
+++ b/hasura/migrations/1612812065763_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,263 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_insert_permission
+- args:
+ permission:
+ check:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - alt_transport
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - ca_gst_registrant
+ - cat_no
+ - category
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - class
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - deliverchecklist
+ - depreciation_taxes
+ - employee_body
+ - employee_prep
+ - employee_refinish
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - lbr_adjustments
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - queued_for_parts
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_registration_number
+ - tax_shop_mat_rt
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_insert_permission
diff --git a/hasura/migrations/1612812065763_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1612812065763_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..a1edd15a6
--- /dev/null
+++ b/hasura/migrations/1612812065763_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,262 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_insert_permission
+- args:
+ permission:
+ check:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - alt_transport
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - ca_gst_registrant
+ - cat_no
+ - category
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - class
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - deliverchecklist
+ - depreciation_taxes
+ - employee_body
+ - employee_prep
+ - employee_refinish
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - lbr_adjustments
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - queued_for_parts
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_registration_number
+ - tax_shop_mat_rt
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_insert_permission
diff --git a/hasura/migrations/1612812077482_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1612812077482_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..eac2bb100
--- /dev/null
+++ b/hasura/migrations/1612812077482_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,264 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: true
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - alt_transport
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - ca_gst_registrant
+ - cat_no
+ - category
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - class
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - deliverchecklist
+ - depreciation_taxes
+ - employee_body
+ - employee_prep
+ - employee_refinish
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - lbr_adjustments
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - queued_for_parts
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_registration_number
+ - tax_shop_mat_rt
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ computed_fields: []
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/1612812077482_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1612812077482_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..ba019ac4c
--- /dev/null
+++ b/hasura/migrations/1612812077482_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,263 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: true
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - alt_transport
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - ca_gst_registrant
+ - cat_no
+ - category
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - class
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - deliverchecklist
+ - depreciation_taxes
+ - employee_body
+ - employee_prep
+ - employee_refinish
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - lbr_adjustments
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - queued_for_parts
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_registration_number
+ - tax_shop_mat_rt
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ computed_fields: []
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/1612812086661_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1612812086661_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..5dbd57336
--- /dev/null
+++ b/hasura/migrations/1612812086661_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,263 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_update_permission
+- args:
+ permission:
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - alt_transport
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - ca_gst_registrant
+ - cat_no
+ - category
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - class
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - deliverchecklist
+ - depreciation_taxes
+ - employee_body
+ - employee_prep
+ - employee_refinish
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - lbr_adjustments
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - queued_for_parts
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_registration_number
+ - tax_shop_mat_rt
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_update_permission
diff --git a/hasura/migrations/1612812086661_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1612812086661_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..470a9347b
--- /dev/null
+++ b/hasura/migrations/1612812086661_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,262 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_update_permission
+- args:
+ permission:
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - alt_transport
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - ca_gst_registrant
+ - cat_no
+ - category
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - class
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - deliverchecklist
+ - depreciation_taxes
+ - employee_body
+ - employee_prep
+ - employee_refinish
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - lbr_adjustments
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - queued_for_parts
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_registration_number
+ - tax_shop_mat_rt
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_update_permission
diff --git a/hasura/migrations/metadata.yaml b/hasura/migrations/metadata.yaml
index f5b8535e0..29dbd0008 100644
--- a/hasura/migrations/metadata.yaml
+++ b/hasura/migrations/metadata.yaml
@@ -2212,7 +2212,6 @@ tables:
- created_at
- csr
- cust_pr
- - date_closed
- date_estimated
- date_exported
- date_invoiced
@@ -2455,7 +2454,6 @@ tables:
- created_at
- csr
- cust_pr
- - date_closed
- date_estimated
- date_exported
- date_invoiced
@@ -2708,7 +2706,6 @@ tables:
- created_at
- csr
- cust_pr
- - date_closed
- date_estimated
- date_exported
- date_invoiced
diff --git a/server/accounting/qbxml/qbxml-receivables.js b/server/accounting/qbxml/qbxml-receivables.js
index 80119a6c6..f6e8f4841 100644
--- a/server/accounting/qbxml/qbxml-receivables.js
+++ b/server/accounting/qbxml/qbxml-receivables.js
@@ -297,7 +297,7 @@ const generateInvoiceQbxml = (jobs_by_pk, bodyshop) => {
? { ClassRef: { FullName: jobs_by_pk.class } }
: {}),
- TxnDate: jobs_by_pk.date_closed,
+ TxnDate: jobs_by_pk.date_invoiced,
RefNumber: jobs_by_pk.ro_number,
BillAddress: {
Addr1: jobs_by_pk.ownr_addr1,
diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js
index 8ac1b9e34..26936f7cd 100644
--- a/server/graphql-client/queries.js
+++ b/server/graphql-client/queries.js
@@ -46,7 +46,6 @@ query QUERY_JOBS_FOR_RECEIVABLES_EXPORT($ids: [uuid!]!) {
id
job_totals
date_invoiced
- date_closed
ro_number
clm_total
clm_no