Compare commits

...

17 Commits

Author SHA1 Message Date
Patrick Fic
abce19530f Merged in feature/IO-3398-bill-line-select-display (pull request #2638)
IO-3398 Bill line search select will now show price in select value.
2025-10-23 18:49:29 +00:00
Patrick Fic
1fd9b68320 IO-3398 Bill line search select will now show price in select value. 2025-10-23 11:48:35 -07:00
Patrick Fic
cff1afe605 Merged in feature/IO-3412-costing-tax-rate-typo (pull request #2637)
IO-3412 Resolve tax rate typo in job costing.
2025-10-23 16:21:03 +00:00
Patrick Fic
b337309f94 IO-3412 Resolve tax rate typo in job costing. 2025-10-23 09:17:15 -07:00
Patrick Fic
77f041b0f1 Merged in feature/IO-3407-us-qbd-tax-adj-quantity (pull request #2636)
IO-3407 Remove tax code ref for adjustment as well.
2025-10-17 22:09:11 +00:00
Patrick Fic
68be8670b4 IO-3407 Remove tax code ref for adjustment as well. 2025-10-17 15:06:58 -07:00
Patrick Fic
745c429f08 Merged in feature/IO-3407-us-qbd-tax-adj-quantity (pull request #2635)
IO-3407 Resolve quantity required for QBD sales tax adj.
2025-10-17 21:57:23 +00:00
Patrick Fic
cc9e4740de IO-3407 Resolve quantity required for QBD sales tax adj. 2025-10-17 14:56:44 -07:00
Dave Richer
06ebcbaa07 Merged in release/2025-10-17 (pull request #2633)
Release/2025 10 17  into Master-AIO - IO-3373 - IO-3404 - IO-3385
2025-10-17 18:59:37 +00:00
Dave
42427c4569 release/2025-10-17 - Refine Job Totals Logging (switch from error to warn for USA key issues, normalize case on logging level) 2025-10-17 14:56:21 -04:00
Dave Richer
d5f921ed35 Merged in feature/IO-3385-Remove-CASL-From-Rome (pull request #2631)
feature/IO-3385-Remove-CASL-From-Rome - Remove CASL Report from Rome Customers.
2025-10-15 15:48:13 +00:00
Dave Richer
54850e8ee2 Merged in feature/IO-3404-Seamless-Logout (pull request #2629)
feature/IO-3404-Seamless-Logout - Implement Seamless Logout
2025-10-15 15:33:29 +00:00
Dave
199ddc7d9e feature/IO-3404-Seamless-Logout - Implement Seamless Logout 2025-10-15 11:31:34 -04:00
Dave Richer
e3337bacea Merged in hotfix/2025-10-10 (pull request #2626)
Hotfix/2025 10 10
2025-10-10 20:05:08 +00:00
Allan Carr
29df829120 Merged in feature/IO-3373-Dashboard-Component-Redux-Fix (pull request #2622)
IO-3373 Dashboard Component Refresh Cyclic object fix

Approved-by: Dave Richer
2025-10-10 16:08:21 +00:00
Allan Carr
d2b6054e60 Merged in feature/IO-3386-carfax-rps (pull request #2620)
IO-3368 CARFAX Adjustments for OP_CODE [PENDING APPROVAL]
2025-10-09 17:28:31 +00:00
Allan Carr
7004ed9880 IO-3373 Dashboard Component Refresh Cyclic object fix
Signed-off-by: Allan Carr <allan@imexsystems.ca>
2025-10-09 09:13:03 -07:00
8 changed files with 100 additions and 71 deletions

View File

@@ -12,6 +12,7 @@ import GlobalLoadingBar from "../components/global-loading-bar/global-loading-ba
import { setDarkMode } from "../redux/application/application.actions"; import { setDarkMode } from "../redux/application/application.actions";
import { selectDarkMode } from "../redux/application/application.selectors"; import { selectDarkMode } from "../redux/application/application.selectors";
import { selectCurrentUser } from "../redux/user/user.selectors.js"; import { selectCurrentUser } from "../redux/user/user.selectors.js";
import { signOutStart } from "../redux/user/user.actions";
import client from "../utils/GraphQLClient"; import client from "../utils/GraphQLClient";
import App from "./App"; import App from "./App";
import getTheme from "./themeProvider"; import getTheme from "./themeProvider";
@@ -20,14 +21,13 @@ import getTheme from "./themeProvider";
const config = { const config = {
core: { core: {
authorizationKey: import.meta.env.VITE_APP_SPLIT_API, authorizationKey: import.meta.env.VITE_APP_SPLIT_API,
key: "anon" // Default key, overridden dynamically by SplitClientProvider key: "anon"
} }
}; };
// Custom provider to manage the Split client key based on imexshopid from Redux
function SplitClientProvider({ children }) { function SplitClientProvider({ children }) {
const imexshopid = useSelector((state) => state.user.imexshopid); // Access imexshopid from Redux store const imexshopid = useSelector((state) => state.user.imexshopid);
const splitClient = useSplitClient({ key: imexshopid || "anon" }); // Use imexshopid or fallback to "anon" const splitClient = useSplitClient({ key: imexshopid || "anon" });
useEffect(() => { useEffect(() => {
if (splitClient && imexshopid) { if (splitClient && imexshopid) {
console.log(`Split client initialized with key: ${imexshopid}, isReady: ${splitClient.isReady}`); console.log(`Split client initialized with key: ${imexshopid}, isReady: ${splitClient.isReady}`);
@@ -36,40 +36,66 @@ function SplitClientProvider({ children }) {
return children; return children;
} }
const mapDispatchToProps = (dispatch) => ({
setDarkMode: (isDarkMode) => dispatch(setDarkMode(isDarkMode))
});
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser currentUser: selectCurrentUser
}); });
function AppContainer({ currentUser, setDarkMode }) { const mapDispatchToProps = (dispatch) => ({
setDarkMode: (isDarkMode) => dispatch(setDarkMode(isDarkMode)),
signOutStart: () => dispatch(signOutStart())
});
function AppContainer({ currentUser, setDarkMode, signOutStart }) {
const { t } = useTranslation(); const { t } = useTranslation();
const isDarkMode = useSelector(selectDarkMode); const isDarkMode = useSelector(selectDarkMode);
const theme = useMemo(() => getTheme(isDarkMode), [isDarkMode]); const theme = useMemo(() => getTheme(isDarkMode), [isDarkMode]);
// Update data-theme attribute when dark mode changes // Global seamless logout listener with redirect to /signin
useEffect(() => {
const handleSeamlessLogout = (event) => {
if (event.data?.type !== "seamlessLogoutRequest") return;
const requestOrigin = event.origin;
if (currentUser?.authorized !== true) {
window.parent.postMessage(
{ type: "seamlessLogoutResponse", status: "already_logged_out" },
requestOrigin || "*"
);
return;
}
signOutStart();
window.parent.postMessage({ type: "seamlessLogoutResponse", status: "logged_out" }, requestOrigin || "*");
};
window.addEventListener("message", handleSeamlessLogout);
return () => {
window.removeEventListener("message", handleSeamlessLogout);
};
}, [signOutStart, currentUser]);
// Update data-theme attribute
useEffect(() => { useEffect(() => {
document.documentElement.setAttribute("data-theme", isDarkMode ? "dark" : "light"); document.documentElement.setAttribute("data-theme", isDarkMode ? "dark" : "light");
return () => document.documentElement.removeAttribute("data-theme"); return () => document.documentElement.removeAttribute("data-theme");
}, [isDarkMode]); }, [isDarkMode]);
// Sync Redux darkMode with localStorage on user change // Sync darkMode with localStorage
useEffect(() => { useEffect(() => {
if (currentUser?.uid) { if (currentUser?.uid) {
const savedMode = localStorage.getItem(`dark-mode-${currentUser.uid}`); const savedMode = localStorage.getItem(`dark-mode-${currentUser.uid}`);
if (savedMode !== null) { if (savedMode !== null) {
setDarkMode(JSON.parse(savedMode)); setDarkMode(JSON.parse(savedMode));
} else { } else {
setDarkMode(false); // default to light mode setDarkMode(false);
} }
} else { } else {
setDarkMode(false); setDarkMode(false);
} }
}, [currentUser?.uid]); }, [currentUser?.uid, setDarkMode]);
// Persist darkMode to localStorage when it or user changes // Persist darkMode
useEffect(() => { useEffect(() => {
if (currentUser?.uid) { if (currentUser?.uid) {
localStorage.setItem(`dark-mode-${currentUser.uid}`, JSON.stringify(isDarkMode)); localStorage.setItem(`dark-mode-${currentUser.uid}`, JSON.stringify(isDarkMode));

View File

@@ -45,7 +45,7 @@ export function BillEnterModalLinesComponent({
title: t("billlines.fields.jobline"), title: t("billlines.fields.jobline"),
dataIndex: "joblineid", dataIndex: "joblineid",
editable: true, editable: true,
width: "20rem", minWidth: "10rem",
formItemProps: (field) => { formItemProps: (field) => {
return { return {
key: `${field.index}joblinename`, key: `${field.index}joblinename`,
@@ -71,9 +71,9 @@ export function BillEnterModalLinesComponent({
disabled={disabled} disabled={disabled}
options={lineData} options={lineData}
style={{ style={{
width: "20rem", //width: "10rem",
maxWidth: "20rem", // maxWidth: "20rem",
minWidth: "10rem", minWidth: "20rem",
whiteSpace: "normal", whiteSpace: "normal",
height: "auto", height: "auto",
minHeight: "32px" // default height of Ant Design inputs minHeight: "32px" // default height of Ant Design inputs
@@ -110,7 +110,7 @@ export function BillEnterModalLinesComponent({
title: t("billlines.fields.line_desc"), title: t("billlines.fields.line_desc"),
dataIndex: "line_desc", dataIndex: "line_desc",
editable: true, editable: true,
width: "20rem", minWidth: "10rem",
formItemProps: (field) => { formItemProps: (field) => {
return { return {
key: `${field.index}line_desc`, key: `${field.index}line_desc`,
@@ -232,7 +232,7 @@ export function BillEnterModalLinesComponent({
title: t("billlines.fields.actual_cost"), title: t("billlines.fields.actual_cost"),
dataIndex: "actual_cost", dataIndex: "actual_cost",
editable: true, editable: true,
width: "8rem", width: "10rem",
formItemProps: (field) => { formItemProps: (field) => {
return { return {
@@ -357,6 +357,7 @@ export function BillEnterModalLinesComponent({
title: t("billlines.labels.deductedfromlbr"), title: t("billlines.labels.deductedfromlbr"),
dataIndex: "deductedfromlbr", dataIndex: "deductedfromlbr",
editable: true, editable: true,
width: "40px",
formItemProps: (field) => { formItemProps: (field) => {
return { return {
valuePropName: "checked", valuePropName: "checked",
@@ -464,7 +465,7 @@ export function BillEnterModalLinesComponent({
title: t("billlines.fields.federal_tax_applicable"), title: t("billlines.fields.federal_tax_applicable"),
dataIndex: "applicable_taxes.federal", dataIndex: "applicable_taxes.federal",
editable: true, editable: true,
width: "40px",
formItemProps: (field) => { formItemProps: (field) => {
return { return {
key: `${field.index}fedtax`, key: `${field.index}fedtax`,
@@ -485,7 +486,7 @@ export function BillEnterModalLinesComponent({
title: t("billlines.fields.state_tax_applicable"), title: t("billlines.fields.state_tax_applicable"),
dataIndex: "applicable_taxes.state", dataIndex: "applicable_taxes.state",
editable: true, editable: true,
width: "40px",
formItemProps: (field) => { formItemProps: (field) => {
return { return {
key: `${field.index}statetax`, key: `${field.index}statetax`,
@@ -503,7 +504,7 @@ export function BillEnterModalLinesComponent({
title: t("billlines.fields.local_tax_applicable"), title: t("billlines.fields.local_tax_applicable"),
dataIndex: "applicable_taxes.local", dataIndex: "applicable_taxes.local",
editable: true, editable: true,
width: "40px",
formItemProps: (field) => { formItemProps: (field) => {
return { return {
key: `${field.index}localtax`, key: `${field.index}localtax`,

View File

@@ -39,30 +39,32 @@ const BillLineSearchSelect = ({ options, disabled, allowRemoved, ...restProps },
style: { style: {
...(item.removed ? { textDecoration: "line-through" } : {}) ...(item.removed ? { textDecoration: "line-through" } : {})
}, },
name: `${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${ name: generateLineName(item),
item.oem_partno ? ` - ${item.oem_partno}` : "" label: generateLineName(item)
}${item.alt_partno ? ` (${item.alt_partno})` : ""}`.trim(),
label: (
<div style={{ whiteSpace: "normal", wordBreak: "break-word" }}>
<span>
{`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${
item.oem_partno ? ` - ${item.oem_partno}` : ""
}${item.alt_partno ? ` (${item.alt_partno})` : ""}`.trim()}
</span>
{InstanceRenderMgr({
rome: item.act_price === 0 && item.mod_lb_hrs > 0 && (
<span style={{ float: "right", paddingleft: "1rem" }}>{`${item.mod_lb_hrs} units`}</span>
)
})}
<span style={{ float: "right", paddingleft: "1rem" }}>
{item.act_price ? `$${item.act_price && item.act_price.toFixed(2)}` : ``}
</span>
</div>
)
})) }))
]} ]}
{...restProps} {...restProps}
></Select> ></Select>
); );
}; };
function generateLineName(item) {
return (
<div style={{ whiteSpace: "normal", wordBreak: "break-word" }}>
<span>
{`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${
item.oem_partno ? ` - ${item.oem_partno}` : ""
}${item.alt_partno ? ` (${item.alt_partno})` : ""}`.trim()}
</span>
{InstanceRenderMgr({
rome: item.act_price === 0 && item.mod_lb_hrs > 0 && (
<span style={{ float: "right", paddingleft: "1rem" }}>{`${item.mod_lb_hrs} units`}</span>
)
})}
<span style={{ float: "right", paddingleft: "1rem" }}>
{item.act_price ? `$${item.act_price && item.act_price.toFixed(2)}` : ``}
</span>
</div>
);
}
export default forwardRef(BillLineSearchSelect); export default forwardRef(BillLineSearchSelect);

View File

@@ -196,7 +196,7 @@ export function DashboardGridComponent({ currentUser }) {
<PageHeader <PageHeader
extra={ extra={
<Space> <Space>
<Button onClick={refetch}> <Button onClick={() => refetch()}>
<SyncOutlined /> <SyncOutlined />
</Button> </Button>
<Dropdown menu={menu} trigger={["click"]}> <Dropdown menu={menu} trigger={["click"]}>

View File

@@ -919,16 +919,16 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes
FullName: responsibilityCenters.ttl_tax_adjustment?.accountitem FullName: responsibilityCenters.ttl_tax_adjustment?.accountitem
}, },
Desc: "Tax Adjustment", Desc: "Tax Adjustment",
Quantity: 1, //Quantity: 1,
Amount: Dinero(jobs_by_pk.job_totals.totals?.ttl_tax_adjustment).toFormat(DineroQbFormat), Amount: Dinero(jobs_by_pk.job_totals.totals?.ttl_tax_adjustment).toFormat(DineroQbFormat),
SalesTaxCodeRef: InstanceManager({ // SalesTaxCodeRef: InstanceManager({
imex: { // imex: {
FullName: "E" // FullName: "E"
}, // },
rome: { // rome: {
FullName: bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON" // FullName: bodyshop.md_responsibility_centers.taxes.itemexemptcode || "NON"
} // }
}) // })
}); });
} }
} }

View File

@@ -405,7 +405,7 @@ function GenerateCostingData(job) {
) { ) {
const discountRate = const discountRate =
Math.abs(job.parts_tax_rates[val.part_type.toUpperCase()].prt_discp) > 1 Math.abs(job.parts_tax_rates[val.part_type.toUpperCase()].prt_discp) > 1
? job.parts_tax_rates_rates[val.part_type.toUpperCase()].prt_discp ? job.parts_tax_rates[val.part_type.toUpperCase()].prt_discp
: job.parts_tax_rates[val.part_type.toUpperCase()].prt_discp * 100; : job.parts_tax_rates[val.part_type.toUpperCase()].prt_discp * 100;
const disc = partsAmount.percentage(discountRate).multiply(-1); const disc = partsAmount.percentage(discountRate).multiply(-1);
partsAmount = partsAmount.add(disc); partsAmount = partsAmount.add(disc);

View File

@@ -24,7 +24,7 @@ exports.totalsSsu = async function (req, res) {
const BearerToken = req.BearerToken; const BearerToken = req.BearerToken;
const client = req.userGraphQLClient; const client = req.userGraphQLClient;
logger.log("job-totals-ssu-USA", "DEBUG", req?.user?.email, id); logger.log("job-totals-ssu-USA", "debug", req?.user?.email, id);
try { try {
const job = await client.setHeaders({ Authorization: BearerToken }).request(queries.GET_JOB_BY_PK, { const job = await client.setHeaders({ Authorization: BearerToken }).request(queries.GET_JOB_BY_PK, {
@@ -49,7 +49,7 @@ exports.totalsSsu = async function (req, res) {
res.status(200).send(); res.status(200).send();
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-USA-error", "ERROR", req?.user?.email, id, { logger.log("job-totals-ssu-USA-error", "error", req?.user?.email, id, {
jobid: id, jobid: id,
error: error.message, error: error.message,
stack: error.stack stack: error.stack
@@ -95,7 +95,7 @@ async function TotalsServerSide(req, res) {
ret.totals.subtotal = ret.totals.subtotal.add(ret.totals.ttl_adjustment); ret.totals.subtotal = ret.totals.subtotal.add(ret.totals.ttl_adjustment);
ret.totals.total_repairs = ret.totals.total_repairs.add(ret.totals.ttl_adjustment); ret.totals.total_repairs = ret.totals.total_repairs.add(ret.totals.ttl_adjustment);
ret.totals.net_repairs = ret.totals.net_repairs.add(ret.totals.ttl_adjustment); ret.totals.net_repairs = ret.totals.net_repairs.add(ret.totals.ttl_adjustment);
logger.log("job-totals-USA-ttl-adj", "DEBUG", null, job.id, { logger.log("job-totals-USA-ttl-adj", "debug", null, job.id, {
adjAmount: ttlDifference adjAmount: ttlDifference
}); });
} }
@@ -116,7 +116,7 @@ async function TotalsServerSide(req, res) {
ret.totals.ttl_tax_adjustment = Dinero({ amount: Math.round(ttlTaxDifference * 100) }); ret.totals.ttl_tax_adjustment = Dinero({ amount: Math.round(ttlTaxDifference * 100) });
ret.totals.total_repairs = ret.totals.total_repairs.add(ret.totals.ttl_tax_adjustment); ret.totals.total_repairs = ret.totals.total_repairs.add(ret.totals.ttl_tax_adjustment);
ret.totals.net_repairs = ret.totals.net_repairs.add(ret.totals.ttl_tax_adjustment); ret.totals.net_repairs = ret.totals.net_repairs.add(ret.totals.ttl_tax_adjustment);
logger.log("job-totals-USA-ttl-tax-adj", "DEBUG", null, job.id, { logger.log("job-totals-USA-ttl-tax-adj", "debug", null, job.id, {
adjAmount: ttlTaxDifference adjAmount: ttlTaxDifference
}); });
} }
@@ -124,7 +124,7 @@ async function TotalsServerSide(req, res) {
return ret; return ret;
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-USA-error", "ERROR", req.user?.email, job.id, { logger.log("job-totals-ssu-USA-error", "error", req.user?.email, job.id, {
jobid: job.id, jobid: job.id,
error: error.message, error: error.message,
stack: error.stack stack: error.stack
@@ -142,7 +142,7 @@ async function Totals(req, res) {
const logger = req.logger; const logger = req.logger;
const client = req.userGraphQLClient; const client = req.userGraphQLClient;
logger.log("job-totals-ssu-USA", "DEBUG", req.user.email, job.id, { logger.log("job-totals-ssu-USA", "debug", req.user.email, job.id, {
jobid: job.id, jobid: job.id,
id: id id: id
}); });
@@ -159,7 +159,7 @@ async function Totals(req, res) {
res.status(200).json(ret); res.status(200).json(ret);
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-USA-error", "ERROR", req.user.email, job.id, { logger.log("job-totals-ssu-USA-error", "error", req.user.email, job.id, {
jobid: job.id, jobid: job.id,
error: error.message, error: error.message,
stack: error.stack stack: error.stack
@@ -240,7 +240,7 @@ async function AtsAdjustmentsIfRequired({ job, client, user }) {
job.joblines.push(newAtsLine); job.joblines.push(newAtsLine);
} }
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-ats-error", "ERROR", user?.email, job.id, { logger.log("job-totals-ssu-ats-error", "error", user?.email, job.id, {
jobid: job.id, jobid: job.id,
error: error.message, error: error.message,
stack: error.stack stack: error.stack
@@ -258,7 +258,7 @@ async function AtsAdjustmentsIfRequired({ job, client, user }) {
job.joblines[atsLineIndex].act_price = atsAmount; job.joblines[atsLineIndex].act_price = atsAmount;
} }
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-ats-error", "ERROR", user?.email, job.id, { logger.log("job-totals-ssu-ats-error", "error", user?.email, job.id, {
jobid: job.id, jobid: job.id,
atsLineIndex: atsLineIndex, atsLineIndex: atsLineIndex,
atsAmount: atsAmount, atsAmount: atsAmount,
@@ -1055,7 +1055,7 @@ function CalculateTaxesTotals(job, otherTotals) {
} }
} }
} catch (error) { } catch (error) {
logger.log("job-totals-USA Key with issue", "error", null, job.id, { logger.log("job-totals-USA Key with issue", "warn", null, job.id, {
key: key, key: key,
error: error.message, error: error.message,
stack: error.stack stack: error.stack

View File

@@ -23,7 +23,7 @@ exports.totalsSsu = async function (req, res) {
const BearerToken = req.BearerToken; const BearerToken = req.BearerToken;
const client = req.userGraphQLClient; const client = req.userGraphQLClient;
logger.log("job-totals-ssu", "DEBUG", req.user.email, id, null); logger.log("job-totals-ssu", "debug", req.user.email, id, null);
try { try {
const job = await client.setHeaders({ Authorization: BearerToken }).request(queries.GET_JOB_BY_PK, { const job = await client.setHeaders({ Authorization: BearerToken }).request(queries.GET_JOB_BY_PK, {
@@ -49,7 +49,7 @@ exports.totalsSsu = async function (req, res) {
res.status(200).send(); res.status(200).send();
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-error", "ERROR", req.user.email, id, { logger.log("job-totals-ssu-error", "error", req.user.email, id, {
jobid: id, jobid: id,
error: error.message, error: error.message,
stack: error.stack stack: error.stack
@@ -73,7 +73,7 @@ async function TotalsServerSide(req, res) {
return ret; return ret;
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-error", "ERROR", req?.user?.email, job.id, { logger.log("job-totals-ssu-error", "error", req?.user?.email, job.id, {
jobid: job.id, jobid: job.id,
error: error.message, error: error.message,
stack: error.stack stack: error.stack
@@ -91,7 +91,7 @@ async function Totals(req, res) {
const logger = req.logger; const logger = req.logger;
const client = req.userGraphQLClient; const client = req.userGraphQLClient;
logger.log("job-totals-ssu", "DEBUG", req.user.email, job.id, { logger.log("job-totals-ssu", "debug", req.user.email, job.id, {
jobid: job.id, jobid: job.id,
id: id id: id
}); });
@@ -108,7 +108,7 @@ async function Totals(req, res) {
res.status(200).json(ret); res.status(200).json(ret);
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-error", "ERROR", req.user.email, job.id, { logger.log("job-totals-ssu-error", "error", req.user.email, job.id, {
jobid: job.id, jobid: job.id,
error: error.message, error: error.message,
stack: error.stack stack: error.stack
@@ -189,7 +189,7 @@ async function AtsAdjustmentsIfRequired({ job, client, user }) {
job.joblines.push(newAtsLine); job.joblines.push(newAtsLine);
} }
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-ats-error", "ERROR", user?.email, job.id, { logger.log("job-totals-ssu-ats-error", "error", user?.email, job.id, {
jobid: job.id, jobid: job.id,
error: error.message, error: error.message,
stack: error.stack stack: error.stack
@@ -207,7 +207,7 @@ async function AtsAdjustmentsIfRequired({ job, client, user }) {
job.joblines[atsLineIndex].act_price = atsAmount; job.joblines[atsLineIndex].act_price = atsAmount;
} }
} catch (error) { } catch (error) {
logger.log("job-totals-ssu-ats-error", "ERROR", user?.email, job.id, { logger.log("job-totals-ssu-ats-error", "error", user?.email, job.id, {
jobid: job.id, jobid: job.id,
atsLineIndex: atsLineIndex, atsLineIndex: atsLineIndex,
atsAmount: atsAmount, atsAmount: atsAmount,