Merge remote-tracking branch 'origin/master-AIO' into feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration

This commit is contained in:
Dave
2025-10-29 10:43:09 -04:00
4 changed files with 42 additions and 39 deletions

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

@@ -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);