Updated pay all calculations and introduction of split.
This commit is contained in:
@@ -70,7 +70,7 @@ export function PayrollLaborAllocationsTable({
|
||||
sorter: (a, b) => a.total - b.total,
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "total" && state.sortedInfo.order,
|
||||
render: (text, record) => record.total.toFixed(1),
|
||||
render: (text, record) => record.total.toFixed(2),
|
||||
},
|
||||
{
|
||||
title: t("jobs.labels.hrs_claimed"),
|
||||
@@ -79,7 +79,7 @@ export function PayrollLaborAllocationsTable({
|
||||
sorter: (a, b) => a.claimed - b.claimed,
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "claimed" && state.sortedInfo.order,
|
||||
render: (text, record) => record.claimed && record.claimed.toFixed(1),
|
||||
render: (text, record) => record.claimed && record.claimed.toFixed(2),
|
||||
},
|
||||
{
|
||||
title: t("jobs.labels.adjustments"),
|
||||
@@ -90,7 +90,7 @@ export function PayrollLaborAllocationsTable({
|
||||
state.sortedInfo.columnKey === "adjustments" && state.sortedInfo.order,
|
||||
render: (text, record) => (
|
||||
<Space wrap>
|
||||
{record.adjustments.toFixed(1)}
|
||||
{record.adjustments.toFixed(2)}
|
||||
{!technician && (
|
||||
<LaborAllocationsAdjustmentEdit
|
||||
jobId={jobId}
|
||||
@@ -182,7 +182,7 @@ export function PayrollLaborAllocationsTable({
|
||||
render: (text, record) =>
|
||||
record.convertedtolbr_data &&
|
||||
record.convertedtolbr_data.mod_lb_hrs &&
|
||||
record.convertedtolbr_data.mod_lb_hrs.toFixed(1),
|
||||
record.convertedtolbr_data.mod_lb_hrs.toFixed(2),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -208,10 +208,17 @@ export function PayrollLaborAllocationsTable({
|
||||
<Col span={24}>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
console.log(
|
||||
await axios.post("/payroll/payall", {
|
||||
jobid: jobId,
|
||||
})
|
||||
const { data } = await axios.post("/payroll/payall", {
|
||||
jobid: jobId,
|
||||
});
|
||||
|
||||
setTotals(
|
||||
CalculateAllocationsTotals(
|
||||
bodyshop,
|
||||
joblines,
|
||||
[...timetickets, ...data],
|
||||
adjustments
|
||||
)
|
||||
);
|
||||
}}
|
||||
>
|
||||
@@ -235,16 +242,16 @@ export function PayrollLaborAllocationsTable({
|
||||
</Typography.Title>
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>
|
||||
{summary.hrs_total.toFixed(1)}
|
||||
{summary.hrs_total.toFixed(2)}
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>
|
||||
{summary.hrs_claimed.toFixed(1)}
|
||||
{summary.hrs_claimed.toFixed(2)}
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>
|
||||
{summary.adjustments.toFixed(1)}
|
||||
{summary.adjustments.toFixed(2)}
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>
|
||||
{summary.difference.toFixed(1)}
|
||||
{summary.difference.toFixed(2)}
|
||||
</Table.Summary.Cell>
|
||||
</Table.Summary.Row>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user