Merged in release/2025-10-24 (pull request #2640)

Release/2025 10 24 into master-AIO - IO-3412 - IO-3398
This commit is contained in:
Dave Richer
2025-10-25 01:41:09 +00:00
3 changed files with 33 additions and 30 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

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