From e56424c9b36470dec326d2f561ed6a2dc6e82d07 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 6 May 2022 09:30:29 -0700 Subject: [PATCH 1/7] IO-1858 Email Groupings --- bodyshop_translations.babel | 42 +++++++++++++++ .../email-overlay/email-overlay.component.jsx | 12 ++++- .../shop-info/shop-info.general.component.jsx | 54 +++++++++++++++++++ client/src/graphql/bodyshop.queries.js | 2 + client/src/translations/en_us/common.json | 2 + client/src/translations/es/common.json | 2 + client/src/translations/fr/common.json | 2 + hasura/metadata/tables.yaml | 2 + .../down.sql | 4 ++ .../up.sql | 2 + 10 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 hasura/migrations/1651792938097_alter_table_public_bodyshops_add_column_md_to_emails/down.sql create mode 100644 hasura/migrations/1651792938097_alter_table_public_bodyshops_add_column_md_to_emails/up.sql diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index a7de63bcb..d03467a82 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -8927,6 +8927,48 @@ + + md_to_emails + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + md_to_emails_emails + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + messagingpresets false diff --git a/client/src/components/email-overlay/email-overlay.component.jsx b/client/src/components/email-overlay/email-overlay.component.jsx index baf52d376..0c7fefc78 100644 --- a/client/src/components/email-overlay/email-overlay.component.jsx +++ b/client/src/components/email-overlay/email-overlay.component.jsx @@ -42,7 +42,12 @@ export function EmailOverlayComponent({ const { t } = useTranslation(); const handleClick = ({ item, key, keyPath }) => { const email = item.props.value; - form.setFieldsValue({ to: _.uniq([...form.getFieldValue("to"), email]) }); + form.setFieldsValue({ + to: _.uniq([ + ...form.getFieldValue("to"), + ...(typeof email === "string" ? [email] : email), + ]), + }); }; const menu = ( @@ -55,6 +60,11 @@ export function EmailOverlayComponent({ {`${e.first_name} ${e.last_name}`} ))} + {bodyshop.md_to_emails.map((e, idx) => ( + + {e.label} + + ))} ); diff --git a/client/src/components/shop-info/shop-info.general.component.jsx b/client/src/components/shop-info/shop-info.general.component.jsx index 0eeb78d4a..92e99791b 100644 --- a/client/src/components/shop-info/shop-info.general.component.jsx +++ b/client/src/components/shop-info/shop-info.general.component.jsx @@ -1393,6 +1393,60 @@ export default function ShopInfoGeneral({ form }) { }} + + + {(fields, { add, remove, move }) => { + return ( + + {fields.map((field, index) => ( + + + + + + + + + + + { + remove(field.name); + }} + /> + + + + + ))} + + { + add(); + }} + style={{ width: "100%" }} + > + {t("general.actions.add")} + + + + ); + }} + + ); } diff --git a/client/src/graphql/bodyshop.queries.js b/client/src/graphql/bodyshop.queries.js index 26f3f72a0..045fe4278 100644 --- a/client/src/graphql/bodyshop.queries.js +++ b/client/src/graphql/bodyshop.queries.js @@ -106,6 +106,7 @@ export const QUERY_BODYSHOP = gql` last_name_first md_parts_order_comment bill_allow_post_to_closed + md_to_emails employees { user_email id @@ -209,6 +210,7 @@ export const UPDATE_SHOP = gql` last_name_first md_parts_order_comment bill_allow_post_to_closed + md_to_emails employees { id first_name diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index c57cb7cdb..713aeef22 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -544,6 +544,8 @@ "jobstatuses": "Job Statuses", "laborrates": "Labor Rates", "licensing": "Licensing", + "md_to_emails": "Preset To Emails", + "md_to_emails_emails": "Emails", "messagingpresets": "Messaging Presets", "notemplatesavailable": "No templates available to add.", "notespresets": "Notes Presets", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index ac51a720e..e02845ee7 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -544,6 +544,8 @@ "jobstatuses": "", "laborrates": "", "licensing": "", + "md_to_emails": "", + "md_to_emails_emails": "", "messagingpresets": "", "notemplatesavailable": "", "notespresets": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 945381bdd..8193fce89 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -544,6 +544,8 @@ "jobstatuses": "", "laborrates": "", "licensing": "", + "md_to_emails": "", + "md_to_emails_emails": "", "messagingpresets": "", "notemplatesavailable": "", "notespresets": "", diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml index 767c52081..709a33ec0 100644 --- a/hasura/metadata/tables.yaml +++ b/hasura/metadata/tables.yaml @@ -858,6 +858,7 @@ - md_referral_sources - md_responsibility_centers - md_ro_statuses + - md_to_emails - messagingservicesid - pbs_configuration - pbs_serialnumber @@ -944,6 +945,7 @@ - md_referral_sources - md_responsibility_centers - md_ro_statuses + - md_to_emails - pbs_configuration - phone - prodtargethrs diff --git a/hasura/migrations/1651792938097_alter_table_public_bodyshops_add_column_md_to_emails/down.sql b/hasura/migrations/1651792938097_alter_table_public_bodyshops_add_column_md_to_emails/down.sql new file mode 100644 index 000000000..1d189d5ae --- /dev/null +++ b/hasura/migrations/1651792938097_alter_table_public_bodyshops_add_column_md_to_emails/down.sql @@ -0,0 +1,4 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- alter table "public"."bodyshops" add column "md_to_emails" jsonb +-- null default jsonb_build_array(); diff --git a/hasura/migrations/1651792938097_alter_table_public_bodyshops_add_column_md_to_emails/up.sql b/hasura/migrations/1651792938097_alter_table_public_bodyshops_add_column_md_to_emails/up.sql new file mode 100644 index 000000000..013e6a5f3 --- /dev/null +++ b/hasura/migrations/1651792938097_alter_table_public_bodyshops_add_column_md_to_emails/up.sql @@ -0,0 +1,2 @@ +alter table "public"."bodyshops" add column "md_to_emails" jsonb + null default jsonb_build_array(); From 467841bea2f8f6a2773e6a4b67f028e902126039 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 6 May 2022 09:46:26 -0700 Subject: [PATCH 2/7] IO-1865 Add employee external ID --- bodyshop_translations.babel | 21 +++++++++++++++++++ .../shop-employees-form.component.jsx | 6 ++++++ client/src/graphql/bodyshop.queries.js | 2 ++ client/src/graphql/employees.queries.js | 1 + client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + hasura/metadata/tables.yaml | 3 +++ .../down.sql | 4 ++++ .../up.sql | 2 ++ 10 files changed, 42 insertions(+) create mode 100644 hasura/migrations/1651854742243_alter_table_public_employees_add_column_external_id/down.sql create mode 100644 hasura/migrations/1651854742243_alter_table_public_employees_add_column_external_id/up.sql diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index d03467a82..a8ae33e7b 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -14038,6 +14038,27 @@ + + external_id + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + first_name false diff --git a/client/src/components/shop-employees/shop-employees-form.component.jsx b/client/src/components/shop-employees/shop-employees-form.component.jsx index 2282d62ef..82fafb1aa 100644 --- a/client/src/components/shop-employees/shop-employees-form.component.jsx +++ b/client/src/components/shop-employees/shop-employees-form.component.jsx @@ -328,6 +328,12 @@ export function ShopEmployeesFormComponent({ bodyshop }) { > + + + {(fields, { add, remove, move }) => { diff --git a/client/src/graphql/bodyshop.queries.js b/client/src/graphql/bodyshop.queries.js index 045fe4278..06d86ff3c 100644 --- a/client/src/graphql/bodyshop.queries.js +++ b/client/src/graphql/bodyshop.queries.js @@ -115,6 +115,7 @@ export const QUERY_BODYSHOP = gql` last_name employee_number rates + external_id } } } @@ -219,6 +220,7 @@ export const UPDATE_SHOP = gql` employee_number rates user_email + external_id } } } diff --git a/client/src/graphql/employees.queries.js b/client/src/graphql/employees.queries.js index c47b81919..207c10bab 100644 --- a/client/src/graphql/employees.queries.js +++ b/client/src/graphql/employees.queries.js @@ -25,6 +25,7 @@ export const QUERY_EMPLOYEE_BY_ID = gql` rates pin user_email + external_id employee_vacations(order_by: { start: desc }) { id start diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 713aeef22..f75ed1931 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -879,6 +879,7 @@ "base_rate": "Base Rate", "cost_center": "Cost Center", "employee_number": "Employee Number", + "external_id": "External Employee ID", "first_name": "First Name", "flat_rate": "Flat Rate (Disabled is Straight Time)", "hire_date": "Hire Date", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index e02845ee7..1d63e0ffc 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -879,6 +879,7 @@ "base_rate": "Tasa básica", "cost_center": "Centro de costos", "employee_number": "Numero de empleado", + "external_id": "", "first_name": "Nombre de pila", "flat_rate": "Tarifa plana (deshabilitado es tiempo recto)", "hire_date": "Fecha de contratación", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 8193fce89..002cba126 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -879,6 +879,7 @@ "base_rate": "Taux de base", "cost_center": "Centre de coûts", "employee_number": "Numéro d'employé", + "external_id": "", "first_name": "Prénom", "flat_rate": "Taux fixe (désactivé est le temps normal)", "hire_date": "Date d'embauche", diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml index 709a33ec0..9d71bdd90 100644 --- a/hasura/metadata/tables.yaml +++ b/hasura/metadata/tables.yaml @@ -1955,6 +1955,7 @@ - active - created_at - employee_number + - external_id - first_name - flat_rate - hire_date @@ -1973,6 +1974,7 @@ - active - created_at - employee_number + - external_id - first_name - flat_rate - hire_date @@ -2001,6 +2003,7 @@ - active - created_at - employee_number + - external_id - first_name - flat_rate - hire_date diff --git a/hasura/migrations/1651854742243_alter_table_public_employees_add_column_external_id/down.sql b/hasura/migrations/1651854742243_alter_table_public_employees_add_column_external_id/down.sql new file mode 100644 index 000000000..35e6b6b0d --- /dev/null +++ b/hasura/migrations/1651854742243_alter_table_public_employees_add_column_external_id/down.sql @@ -0,0 +1,4 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- alter table "public"."employees" add column "external_id" text +-- null; diff --git a/hasura/migrations/1651854742243_alter_table_public_employees_add_column_external_id/up.sql b/hasura/migrations/1651854742243_alter_table_public_employees_add_column_external_id/up.sql new file mode 100644 index 000000000..139abc4d9 --- /dev/null +++ b/hasura/migrations/1651854742243_alter_table_public_employees_add_column_external_id/up.sql @@ -0,0 +1,2 @@ +alter table "public"."employees" add column "external_id" text + null; From d78955a8fdfdfb3972b2c46f91c1f56c8999f968 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 6 May 2022 10:19:49 -0700 Subject: [PATCH 3/7] IO-1853 Add Attendance Table excel creation. --- bodyshop_translations.babel | 26 ++++++++++++ ...ime-tickets-attendance-table.component.jsx | 42 +++++++++++++++++++ .../time-tickets/time-tickets.container.jsx | 2 + client/src/translations/en_us/common.json | 3 ++ client/src/translations/es/common.json | 3 ++ client/src/translations/fr/common.json | 3 ++ client/src/utils/TemplateConstants.js | 7 ++++ 7 files changed, 86 insertions(+) create mode 100644 client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index a8ae33e7b..9322e859a 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -36737,6 +36737,32 @@ + + special + + + attendance_detail_csv + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + subjects diff --git a/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx b/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx new file mode 100644 index 000000000..8448eb131 --- /dev/null +++ b/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx @@ -0,0 +1,42 @@ +import { Button } from "antd"; +import queryString from "query-string"; +import React, { useState } from "react"; +import { useLocation } from "react-router-dom"; +import { GenerateDocument } from "../../utils/RenderTemplate"; +import { TemplateList } from "../../utils/TemplateConstants"; +import { useTranslation } from "react-i18next"; +import moment from "moment"; +const AttendanceCsv = TemplateList("special").attendance_detail_csv; + +export default function TimeTicketsAttendanceTable() { + const searchParams = queryString.parse(useLocation().search); + const { start, end } = searchParams; + const { t } = useTranslation(); + const [loading, setLoading] = useState(false); + + const handleClick = async () => { + setLoading(true); + + await GenerateDocument( + { + name: AttendanceCsv.key, + variables: { + start: start + ? start + : moment().startOf("week").subtract(7, "days").format("YYYY-MM-DD"), + end: end ? end : moment().endOf("week").format("YYYY-MM-DD"), + }, + }, + {}, + "x" + ); + + setLoading(false); + }; + + return ( + + {t("printcenter.special.attendance_detail_csv")} + + ); +} diff --git a/client/src/pages/time-tickets/time-tickets.container.jsx b/client/src/pages/time-tickets/time-tickets.container.jsx index 222be5117..03cfdda50 100644 --- a/client/src/pages/time-tickets/time-tickets.container.jsx +++ b/client/src/pages/time-tickets/time-tickets.container.jsx @@ -14,6 +14,7 @@ import TimeTicketList from "../../components/time-ticket-list/time-ticket-list.c import TimeTicketsPayrollTable from "../../components/time-tickets-payroll-table/time-tickets-payroll-table.component"; import TimeTicketsSummaryEmployees from "../../components/time-tickets-summary-employees/time-tickets-summary-employees.component"; import { QUERY_TIME_TICKETS_IN_RANGE } from "../../graphql/timetickets.queries"; +import TimeTicketsAttendanceTable from "../../components/time-tickets-attendance-table/time-tickets-attendance-table.component"; import { setBreadcrumbs, setSelectedHeader, @@ -71,6 +72,7 @@ export function TimeTicketsContainer({ timetickets={data ? data.timetickets : []} extra={ + diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index f75ed1931..0dc3c96d2 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -2174,6 +2174,9 @@ "ca_bc_etf_table": "ICBC ETF Table", "exported_payroll": "Payroll Table" }, + "special": { + "attendance_detail_csv": "Attendance Table" + }, "subjects": { "jobs": { "parts_order": "Parts Order PO: {{ro_number}} - {{name}}" diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 1d63e0ffc..8670f0f47 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -2174,6 +2174,9 @@ "ca_bc_etf_table": "", "exported_payroll": "" }, + "special": { + "attendance_detail_csv": "" + }, "subjects": { "jobs": { "parts_order": "" diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 002cba126..fc457d9ff 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -2174,6 +2174,9 @@ "ca_bc_etf_table": "", "exported_payroll": "" }, + "special": { + "attendance_detail_csv": "" + }, "subjects": { "jobs": { "parts_order": "" diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index fcc6af566..71dacacce 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -1668,6 +1668,13 @@ export const TemplateList = (type, context) => { key: "exported_payroll", disabled: false, }, + attendance_detail_csv: { + title: i18n.t("printcenter.special.attendance_detail_csv"), + description: "Est Detail", + subject: i18n.t("printcenter.special.attendance_detail_csv"), + key: "attendance_detail_csv", + disabled: false, + }, production_by_technician_one: { title: i18n.t( "reportcenter.templates.production_by_technician_one" From 09d54722f0aaf74be55d125b990ee97f972075de Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 6 May 2022 14:25:02 -0700 Subject: [PATCH 4/7] IO-1863 Delete parts return and order line. --- .../parts-order-delete-line.component.jsx | 47 +++++++++++++++++++ .../parts-order-list-table.component.jsx | 22 ++++++--- client/src/graphql/parts-orders.queries.js | 8 ++++ 3 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 client/src/components/parts-order-delete-line/parts-order-delete-line.component.jsx diff --git a/client/src/components/parts-order-delete-line/parts-order-delete-line.component.jsx b/client/src/components/parts-order-delete-line/parts-order-delete-line.component.jsx new file mode 100644 index 000000000..0edad9bb5 --- /dev/null +++ b/client/src/components/parts-order-delete-line/parts-order-delete-line.component.jsx @@ -0,0 +1,47 @@ +import React from "react"; +import { Button, Popconfirm } from "antd"; +import { DeleteFilled } from "@ant-design/icons"; +import { useTranslation } from "react-i18next"; +import { DELETE_PARTS_ORDER_LINE } from "../../graphql/parts-orders.queries"; +import { useMutation } from "@apollo/client"; + +export default function PartsOrderDeleteLine({ + disabled, + partsLineId, + partsOrderId, +}) { + const { t } = useTranslation(); + const [deletePartsOrderLine] = useMutation(DELETE_PARTS_ORDER_LINE); + return ( + { + //Delete the parts return.! + + await deletePartsOrderLine({ + variables: { partsOrderLineId: partsLineId }, + update(cache) { + cache.modify({ + id: cache.identify({ + __typename: "parts_orders", + id: partsOrderId, + }), + fields: { + parts_order_lines(cached, { readField }) { + return cached.filter((c) => { + return readField("id", c) !== partsLineId; + }); + }, + }, + }); + }, + }); + }} + > + + + + + ); +} diff --git a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx index 9806b6cca..ed66ecdd7 100644 --- a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx +++ b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx @@ -30,6 +30,7 @@ import { TemplateList } from "../../utils/TemplateConstants"; import DataLabel from "../data-label/data-label.component"; import PartsOrderBackorderEta from "../parts-order-backorder-eta/parts-order-backorder-eta.component"; import PartsOrderCmReceived from "../parts-order-cm-received/parts-order-cm-received.component"; +import PartsOrderDeleteLine from "../parts-order-delete-line/parts-order-delete-line.component"; import PartsOrderLineBackorderButton from "../parts-order-line-backorder-button/parts-order-line-backorder-button.component"; import PartsReceiveModalContainer from "../parts-receive-modal/parts-receive-modal.container"; import PrintWrapper from "../print-wrapper/print-wrapper.component"; @@ -391,12 +392,21 @@ export function PartsOrderListTableComponent({ dataIndex: "actions", key: "actions", render: (text, record) => ( - + + + + ), }, ]; diff --git a/client/src/graphql/parts-orders.queries.js b/client/src/graphql/parts-orders.queries.js index e95537021..f415eeab6 100644 --- a/client/src/graphql/parts-orders.queries.js +++ b/client/src/graphql/parts-orders.queries.js @@ -292,6 +292,14 @@ export const DELETE_PARTS_ORDER = gql` } `; +export const DELETE_PARTS_ORDER_LINE = gql` + mutation DELETE_PARTS_ORDER_LINE($partsOrderLineId: uuid!) { + delete_parts_order_lines_by_pk(id: $partsOrderLineId) { + id + } + } +`; + export const MUTATION_UPDATE_PO_CM_REECEIVED = gql` mutation MUTATION_UPDATE_PO_CM_REECEIVED( $partsLineId: uuid! From cf23266831a7dd5063eb03166ab1e063879b7752 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 6 May 2022 14:30:26 -0700 Subject: [PATCH 5/7] IO-1853 Change attendance recipe type to text. --- .../time-tickets-attendance-table.component.jsx | 2 +- client/src/utils/RenderTemplate.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx b/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx index 8448eb131..ce7c4b34f 100644 --- a/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx +++ b/client/src/components/time-tickets-attendance-table/time-tickets-attendance-table.component.jsx @@ -28,7 +28,7 @@ export default function TimeTicketsAttendanceTable() { }, }, {}, - "x" + "text" ); setLoading(false); diff --git a/client/src/utils/RenderTemplate.js b/client/src/utils/RenderTemplate.js index 9fa495e4e..6c5bbba31 100644 --- a/client/src/utils/RenderTemplate.js +++ b/client/src/utils/RenderTemplate.js @@ -18,7 +18,8 @@ export default async function RenderTemplate( templateObject, bodyshop, renderAsHtml = false, - renderAsExcel = false + renderAsExcel = false, + renderAsText = false ) { //Query assets that match the template name. Must be in format <>.query let { contextData, useShopSpecificTemplate } = await fetchContextData( @@ -54,6 +55,7 @@ export default async function RenderTemplate( }), }), ...(renderAsExcel ? { recipe: "html-to-xlsx" } : {}), + ...(renderAsText ? { recipe: "text" } : {}), }, data: { ...contextData, @@ -254,6 +256,9 @@ export const GenerateDocument = async ( } else if (sendType === "x") { console.log("excel"); await RenderTemplate(template, bodyshop, false, true); + } else if (sendType === "x") { + console.log("text"); + await RenderTemplate(template, bodyshop, false, false, true); } else { await RenderTemplate(template, bodyshop); } From eca5e8241a2025467c508451de9ac7069bcc8503 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 6 May 2022 15:35:34 -0700 Subject: [PATCH 6/7] QBO Bill parent by default. --- server/accounting/qbo/qbo-receivables.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/accounting/qbo/qbo-receivables.js b/server/accounting/qbo/qbo-receivables.js index 108da861a..62047de04 100644 --- a/server/accounting/qbo/qbo-receivables.js +++ b/server/accounting/qbo/qbo-receivables.js @@ -239,6 +239,7 @@ async function InsertInsuranceCo(oauthClient, qbo_realmId, req, job, bodyshop) { const Customer = { DisplayName: job.ins_co_nm, + BillWithParent: true, BillAddr: { City: job.ownr_city, Line1: insCo.street1, @@ -302,6 +303,7 @@ async function InsertOwner( const ownerName = generateOwnerTier(job, true, null); const Customer = { DisplayName: ownerName, + BillWithParent: true, BillAddr: { City: job.ownr_city, Line1: job.ownr_addr1, @@ -362,6 +364,7 @@ exports.QueryJob = QueryJob; async function InsertJob(oauthClient, qbo_realmId, req, job, parentTierRef) { const Customer = { DisplayName: job.ro_number, + BillWithParent: true, BillAddr: { City: job.ownr_city, Line1: job.ownr_addr1, From 6c3d29ba914f353a82430493aaa9d37d34ca57f7 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 6 May 2022 15:50:05 -0700 Subject: [PATCH 7/7] IO-1853 CSV Generation. --- client/src/utils/RenderTemplate.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src/utils/RenderTemplate.js b/client/src/utils/RenderTemplate.js index 6c5bbba31..5584b3aa4 100644 --- a/client/src/utils/RenderTemplate.js +++ b/client/src/utils/RenderTemplate.js @@ -256,8 +256,7 @@ export const GenerateDocument = async ( } else if (sendType === "x") { console.log("excel"); await RenderTemplate(template, bodyshop, false, true); - } else if (sendType === "x") { - console.log("text"); + } else if (sendType === "text") { await RenderTemplate(template, bodyshop, false, false, true); } else { await RenderTemplate(template, bodyshop);