IO-1678 Add actual hours deducted from labor on bill posting.
This commit is contained in:
@@ -334,6 +334,25 @@ export function BillEnterModalLinesComponent({
|
|||||||
additional: (record, index) => (
|
additional: (record, index) => (
|
||||||
<Form.Item shouldUpdate style={{ display: "inline-block" }}>
|
<Form.Item shouldUpdate style={{ display: "inline-block" }}>
|
||||||
{() => {
|
{() => {
|
||||||
|
const price = getFieldValue([
|
||||||
|
"billlines",
|
||||||
|
record.name,
|
||||||
|
"actual_price",
|
||||||
|
]);
|
||||||
|
console.log(
|
||||||
|
"🚀 ~ file: bill-form.lines.component.jsx ~ line 342 ~ columns ~ price",
|
||||||
|
price
|
||||||
|
);
|
||||||
|
const adjustmentRate = getFieldValue([
|
||||||
|
"billlines",
|
||||||
|
record.name,
|
||||||
|
"lbr_adjustment",
|
||||||
|
"rate",
|
||||||
|
]);
|
||||||
|
console.log(
|
||||||
|
"🚀 ~ file: bill-form.lines.component.jsx ~ line 348 ~ columns ~ adjustmentRate",
|
||||||
|
adjustmentRate
|
||||||
|
);
|
||||||
if (getFieldValue(["billlines", record.name, "deductedfromlbr"]))
|
if (getFieldValue(["billlines", record.name, "deductedfromlbr"]))
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -406,6 +425,9 @@ export function BillEnterModalLinesComponent({
|
|||||||
>
|
>
|
||||||
<InputNumber precision={2} min={0.01} />
|
<InputNumber precision={2} min={0.01} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
{price &&
|
||||||
|
adjustmentRate &&
|
||||||
|
`${(price / adjustmentRate).toFixed(2)} hrs`}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
return <></>;
|
return <></>;
|
||||||
|
|||||||
Reference in New Issue
Block a user