From ec480f2cb17cc25d7292c21af88037f909d1ad8c Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 29 May 2024 14:08:49 -0700 Subject: [PATCH 1/3] Resolve Bill Posting errors on Beta. --- .../bill-line-search-select.component.jsx | 57 +++++++++---------- .../parts-order-list-table.component.jsx | 4 +- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx b/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx index 187cf29bf..6481a6737 100644 --- a/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx +++ b/client/src/components/bill-line-search-select/bill-line-search-select.component.jsx @@ -25,31 +25,27 @@ const BillLineSearchSelect = ({ options, disabled, allowRemoved, ...restProps }, ); }} notFoundContent={"Removed."} - {...restProps} - > - - {t("billlines.labels.other")} - - {options - ? options.map((item) => ( - - )) - : null} - + + ) + })) + ]} + {...restProps} + > ); }; export default forwardRef(BillLineSearchSelect); 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 a18d2b4ba..b407964ed 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 @@ -101,7 +101,7 @@ export function PartsOrderListTableComponent({ } else { const fetchData = async () => { const result = await billQuery({ - variables: { billid: returnfrombill }, + variables: { billid: returnfrombill } }); setBillData(result.data); }; @@ -203,7 +203,7 @@ export function PartsOrderListTableComponent({ is_credit_memo: record.return, billlines: record.parts_order_lines.map((pol) => { return { - joblineid: pol.job_line_id, + joblineid: pol.job_line_id || "noline", line_desc: pol.line_desc, quantity: pol.quantity, From e4066c15703c865f13b133ac521a906d64b01b97 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Fri, 31 May 2024 13:20:54 -0400 Subject: [PATCH 2/3] - Add Additional IDS to headers Signed-off-by: Dave Richer --- .../components/header/header.component.jsx | 14 ++++++++ .../jobs-detail-header-actions.component.jsx | 33 ++++++++++++++++++- .../jobs-detail.page.component.jsx | 12 +++++++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx index 160dd8770..47b59a309 100644 --- a/client/src/components/header/header.component.jsx +++ b/client/src/components/header/header.component.jsx @@ -141,11 +141,13 @@ function Header({ accountingChildren.push( { key: "bills", + id: "header-accounting-bills", icon: , label: {t("menus.header.bills")} }, { key: "enterbills", + id: "header-accounting-enterbills", icon: , label: t("menus.header.enterbills"), onClick: () => { @@ -165,6 +167,7 @@ function Header({ }, { key: "inventory", + id: "header-accounting-inventory", icon: , label: {t("menus.header.inventory")} } @@ -183,11 +186,13 @@ function Header({ }, { key: "allpayments", + id: "header-accounting-allpayments", icon: , label: {t("menus.header.allpayments")} }, { key: "enterpayments", + id: "header-accounting-enterpayments", icon: , label: t("menus.header.enterpayment"), onClick: () => { @@ -203,6 +208,7 @@ function Header({ if (ImEXPay.treatment === "on") { accountingChildren.push({ key: "entercardpayments", + id: "header-accounting-entercardpayments", icon: , label: t("menus.header.entercardpayment"), onClick: () => { @@ -227,6 +233,7 @@ function Header({ }, { key: "timetickets", + id: "header-accounting-timetickets", icon: , label: {t("menus.header.timetickets")} } @@ -235,6 +242,7 @@ function Header({ if (bodyshop?.md_tasks_presets?.use_approvals) { accountingChildren.push({ key: "ttapprovals", + id: "header-accounting-ttapprovals", icon: , label: {t("menus.header.ttapprovals")} }); @@ -244,6 +252,7 @@ function Header({ key: "entertimetickets", icon: , label: t("menus.header.entertimeticket"), + id: "header-accounting-entertimetickets", onClick: () => { setTimeTicketContext({ actions: {}, @@ -264,6 +273,7 @@ function Header({ const accountingExportChildren = [ { key: "receivables", + id: "header-accounting-receivables", label: {t("menus.header.accounting-receivables")} } ]; @@ -271,6 +281,7 @@ function Header({ if (!((bodyshop && bodyshop.cdk_dealerid) || (bodyshop && bodyshop.pbs_serialnumber)) || DmsAp.treatment === "on") { accountingExportChildren.push({ key: "payables", + id: "header-accounting-payables", label: {t("menus.header.accounting-payables")} }); } @@ -278,6 +289,7 @@ function Header({ if (!((bodyshop && bodyshop.cdk_dealerid) || (bodyshop && bodyshop.pbs_serialnumber))) { accountingExportChildren.push({ key: "payments", + id: "header-accounting-payments", label: {t("menus.header.accounting-payments")} }); } @@ -288,6 +300,7 @@ function Header({ }, { key: "exportlogs", + id: "header-accounting-exportlogs", label: {t("menus.header.export-logs")} } ); @@ -301,6 +314,7 @@ function Header({ ) { accountingChildren.push({ key: "accountingexport", + id: "header-accounting-export", icon: , label: t("menus.header.export"), children: accountingExportChildren diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx index 9930fee85..c9c3b8fb7 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx @@ -1,7 +1,7 @@ import { DownCircleFilled } from "@ant-design/icons"; import { useApolloClient, useMutation } from "@apollo/client"; import { useSplitTreatments } from "@splitsoftware/splitio-react"; -import { Button, Card, Dropdown, Form, Input, Modal, Popconfirm, Popover, Select, Space, notification } from "antd"; +import { Button, Card, Dropdown, Form, Input, Modal, notification, Popconfirm, Popover, Select, Space } from "antd"; import axios from "axios"; import parsePhoneNumber from "libphonenumber-js"; import React, { useMemo, useState } from "react"; @@ -641,6 +641,7 @@ export function JobsDetailHeaderActions({ const menuItems = [ { key: "schedule", + id: "job-actions-schedule", disabled: !jobInPreProduction || !job.converted || jobRO, label: t("jobs.actions.schedule"), onClick: () => { @@ -657,6 +658,7 @@ export function JobsDetailHeaderActions({ }, { key: "cancelallappointments", + id: "job-actions-cancelallappointments", onClick: () => { if (job.status !== bodyshop.md_ro_statuses.default_scheduled) { return; @@ -670,6 +672,7 @@ export function JobsDetailHeaderActions({ imex: [ { key: "intake", + id: "job-actions-intake", disabled: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO, label: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO ? ( @@ -680,6 +683,7 @@ export function JobsDetailHeaderActions({ }, { key: "deliver", + id: "job-actions-deliver", disabled: !jobInProduction || jobRO, label: !jobInProduction ? ( t("jobs.actions.deliver") @@ -689,6 +693,7 @@ export function JobsDetailHeaderActions({ }, { key: "checklist", + id: "job-actions-checklist", disabled: !job.converted, label: {t("jobs.actions.viewchecklist")} } @@ -697,6 +702,7 @@ export function JobsDetailHeaderActions({ promanager: [ { key: "toggleproduction", + id: "job-actions-toggleproduction", disabled: !job.converted || jobRO, label: } @@ -710,6 +716,7 @@ export function JobsDetailHeaderActions({ ? [ { key: "entertimetickets", + id: "job-actions-entertimetickets", disabled: !job.converted || (!bodyshop.tt_allow_post_to_invoiced && job.date_invoiced), label: t("timetickets.actions.enter"), onClick: () => { @@ -733,6 +740,7 @@ export function JobsDetailHeaderActions({ if (bodyshop.md_tasks_presets.enable_tasks) { menuItems.push({ key: "claimtimetickettasks", + id: "job-actions-claimtimetickettasks", disabled: !job.converted || (!bodyshop.tt_allow_post_to_invoiced && job.date_invoiced), onClick: () => { setTimeTicketTaskContext({ @@ -746,6 +754,7 @@ export function JobsDetailHeaderActions({ menuItems.push({ key: "enterpayments", + id: "job-actions-enterpayments", disabled: !job.converted, label: t("menus.header.enterpayment"), onClick: () => { @@ -761,6 +770,7 @@ export function JobsDetailHeaderActions({ if (ImEXPay.treatment === "on") { menuItems.push({ key: "entercardpayments", + id: "job-actions-entercardpayments", disabled: !job.converted, label: t("menus.header.entercardpayment"), onClick: () => { @@ -777,6 +787,7 @@ export function JobsDetailHeaderActions({ if (HasFeatureAccess({ featureName: "courtesycars", bodyshop })) { menuItems.push({ key: "cccontract", + id: "job-actions-cccontract", disabled: jobRO || !job.converted, label: ( @@ -788,6 +799,7 @@ export function JobsDetailHeaderActions({ menuItems.push({ key: "createtask", + id: "job-actions-createtask", label: t("menus.header.create_task"), onClick: () => setTaskUpsertContext({ @@ -800,12 +812,14 @@ export function JobsDetailHeaderActions({ job.inproduction ? { key: "removefromproduction", + id: "job-actions-removefromproduction", disabled: !job.converted, label: t("jobs.actions.removefromproduction"), onClick: () => AddToProduction(client, job.id, refetch, true) } : { key: "addtoproduction", + id: "job-actions-addtoproduction", disabled: !job.converted, label: t("jobs.actions.addtoproduction"), onClick: () => AddToProduction(client, job.id, refetch) @@ -815,12 +829,14 @@ export function JobsDetailHeaderActions({ menuItems.push( { key: "togglesuspend", + id: "job-actions-togglesuspend", onClick: handleSuspend, label: job.suspended ? t("production.actions.unsuspend") : t("production.actions.suspend") }, { key: "toggleAlert", onClick: handleAlertToggle, + id: "job-actions-togglealert", label: job.production_vars && job.production_vars.alert ? t("production.labels.alertoff") @@ -832,6 +848,7 @@ export function JobsDetailHeaderActions({ children: [ { key: "duplicate", + id: "job-actions-duplicate", label: ( { @@ -888,6 +907,7 @@ export function JobsDetailHeaderActions({ { key: "addtopartsqueue", + id: "job-actions-addtopartsqueue", disabled: !job.converted || !jobInProduction || jobRO, label: t("jobs.actions.addtopartsqueue"), onClick: async () => { @@ -913,6 +933,7 @@ export function JobsDetailHeaderActions({ }, { key: "closejob", + id: "job-actions-closejob", disabled: !jobInPostProduction, label: !jobInPostProduction ? ( t("menus.jobsactions.closejob") @@ -928,6 +949,7 @@ export function JobsDetailHeaderActions({ }, { key: "admin", + id: "job-actions-admin", label: ( 0, label: t("jobs.actions.generatecsi"), onClick: handleCreateCsi @@ -1004,6 +1030,7 @@ export function JobsDetailHeaderActions({ } menuItems.push({ key: "sendcsi", + id: "job-actions-sendcsi", label: t("jobs.actions.sendcsi"), disabled: !job.converted, children @@ -1012,6 +1039,7 @@ export function JobsDetailHeaderActions({ menuItems.push({ key: "jobcosting", + id: "job-actions-jobcosting", disabled: !job.converted, label: t("jobs.labels.jobcosting"), onClick: () => { @@ -1029,6 +1057,7 @@ export function JobsDetailHeaderActions({ if (job && !job.converted) { menuItems.push({ key: "deletejob", + id: "job-actions-deletejob", label: ( { setVisibility(true); }, @@ -1054,6 +1084,7 @@ export function JobsDetailHeaderActions({ if (!jobRO && job.converted) { menuItems.push({ key: "voidjob", + id: "job-actions-voidjob", label: ( , + id: "job-details-general", label: t("menus.jobsdetail.general"), forceRender: true, children: @@ -298,6 +299,7 @@ export function JobsDetailPage({ { key: "repairdata", icon: , + id: "job-details-repairdata", label: t("menus.jobsdetail.repairdata"), forceRender: true, children: @@ -305,18 +307,21 @@ export function JobsDetailPage({ { key: "rates", icon: , + id: "job-details-rates", label: t("menus.jobsdetail.rates"), forceRender: true, children: }, { key: "totals", + id: "job-details-totals", icon: , label: t("menus.jobsdetail.totals"), children: }, { key: "partssublet", + id: "job-details-partssublet", icon: , label: HasFeatureAccess({ featureName: "bills", bodyshop }) ? t("menus.jobsdetail.partssublet") @@ -331,6 +336,7 @@ export function JobsDetailPage({ ? [ { key: "labor", + id: "job-details-labor", icon: , label: t("menus.jobsdetail.labor"), children: @@ -340,11 +346,13 @@ export function JobsDetailPage({ { key: "lifecycle", icon: , + id: "job-details-lifecycle", label: t("menus.jobsdetail.lifecycle"), children: }, { key: "dates", + id: "job-details-dates", icon: , label: t("menus.jobsdetail.dates"), forceRender: true, @@ -358,6 +366,7 @@ export function JobsDetailPage({ ? [ { key: "documents", + id: "job-details-documents", icon: , label: t("jobs.labels.documents"), children: bodyshop.uselocalmediaserver ? ( @@ -370,6 +379,7 @@ export function JobsDetailPage({ : []), { key: "notes", + id: "job-details-notes", icon: , label: t("jobs.labels.notes"), children: @@ -377,12 +387,14 @@ export function JobsDetailPage({ { key: "audit", icon: , + id: "job-details-audit", label: t("jobs.labels.audit"), children: }, { key: "tasks", icon: , + id: "job-details-tasks", label: ( {t("jobs.labels.tasks")} From 885477fa688df8a9cd9e08b93f0d229aadacc740 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Fri, 31 May 2024 12:31:49 -0700 Subject: [PATCH 3/3] IO-2793 State Tax Rate Null send to QBO Signed-off-by: Allan Carr --- server/accounting/qb-receivables-lines.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/accounting/qb-receivables-lines.js b/server/accounting/qb-receivables-lines.js index a19fe64d7..b0f5b90fe 100644 --- a/server/accounting/qb-receivables-lines.js +++ b/server/accounting/qb-receivables-lines.js @@ -72,7 +72,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes local: false, federal: InstanceManager({ imex: true, rome: false }), state: - jobs_by_pk.state_tax_rate === 0 + !jobs_by_pk.state_tax_rate || jobs_by_pk.state_tax_rate === 0 ? false : jobline.db_ref === "900511" || jobline.db_ref === "900510" || @@ -156,7 +156,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes { local: false, federal: InstanceManager({ imex: true, rome: false }), - state: jobs_by_pk.state_tax_rate === 0 ? false : true + state: !jobs_by_pk.state_tax_rate || jobs_by_pk.state_tax_rate === 0 ? false : true }, bodyshop.md_responsibility_centers.sales_tax_codes ); @@ -224,7 +224,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes { local: false, federal: InstanceManager({ imex: true, rome: false }), - state: jobs_by_pk.state_tax_rate === 0 ? false : true + state: !jobs_by_pk.state_tax_rate || jobs_by_pk.state_tax_rate === 0 ? false : true }, bodyshop.md_responsibility_centers.sales_tax_codes ); @@ -293,7 +293,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes { local: false, federal: InstanceManager({ imex: true, rome: false }), - state: jobs_by_pk.state_tax_rate === 0 ? false : true + state: !jobs_by_pk.state_tax_rate || jobs_by_pk.state_tax_rate === 0 ? false : true }, bodyshop.md_responsibility_centers.sales_tax_codes ); @@ -379,7 +379,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes { local: false, federal: InstanceManager({ imex: true, rome: false }), - state: jobs_by_pk.state_tax_rate === 0 ? false : true + state: !jobs_by_pk.state_tax_rate || jobs_by_pk.state_tax_rate === 0 ? false : true }, bodyshop.md_responsibility_centers.sales_tax_codes ); @@ -439,7 +439,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes { local: false, federal: InstanceManager({ imex: true, rome: false }), - state: jobs_by_pk.state_tax_rate === 0 ? false : true + state: !jobs_by_pk.state_tax_rate || jobs_by_pk.state_tax_rate === 0 ? false : true }, bodyshop.md_responsibility_centers.sales_tax_codes ); @@ -499,7 +499,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes { local: false, federal: InstanceManager({ imex: true, rome: false }), - state: jobs_by_pk.state_tax_rate === 0 ? false : true + state: !jobs_by_pk.state_tax_rate || jobs_by_pk.state_tax_rate === 0 ? false : true }, bodyshop.md_responsibility_centers.sales_tax_codes ); @@ -670,7 +670,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes { local: false, federal: process.env.COUNTRY === "USA" ? false : true, - state: jobs_by_pk.state_tax_rate === 0 ? false : true + state: !jobs_by_pk.state_tax_rate || jobs_by_pk.state_tax_rate === 0 ? false : true }, bodyshop.md_responsibility_centers.sales_tax_codes );