IO-2327 posting bills test cases
This commit is contained in:
@@ -153,6 +153,7 @@ export function BillDetailEditReturn({
|
||||
// label={t("joblines.fields.actual_price")}
|
||||
key={`${index}actual_price`}
|
||||
name={[field.name, "actual_price"]}
|
||||
data-cy="billline-actual-price"
|
||||
>
|
||||
<ReadOnlyFormItemComponent type="currency" />
|
||||
</Form.Item>
|
||||
|
||||
@@ -5,13 +5,11 @@ const ReadOnlyFormItem = ({ value, type = "text", onChange }, ref) => {
|
||||
if (!value) return null;
|
||||
switch (type) {
|
||||
case "text":
|
||||
return <div>{value}</div>;
|
||||
return <>{value}</>;
|
||||
case "currency":
|
||||
return (
|
||||
<div>{Dinero({ amount: Math.round(value * 100) }).toFormat()}</div>
|
||||
);
|
||||
return <>{Dinero({ amount: Math.round(value * 100) }).toFormat()}</>;
|
||||
default:
|
||||
return <div>{value}</div>;
|
||||
return <>{value}</>;
|
||||
}
|
||||
};
|
||||
export default forwardRef(ReadOnlyFormItem);
|
||||
|
||||
@@ -84,6 +84,8 @@ export default function JobBillsTotalComponent({
|
||||
})
|
||||
);
|
||||
|
||||
console.log(totals.parts.parts.total);
|
||||
|
||||
const totalPartsSublet = Dinero(totals.parts.parts.total)
|
||||
.add(Dinero(totals.parts.sublets.total))
|
||||
.add(Dinero(totals.additional.shipping))
|
||||
|
||||
Reference in New Issue
Block a user