WIP Payroll.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project version="1.2" be_version="2.7.1">
|
<babeledit_project be_version="2.7.1" version="1.2">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
@@ -45969,6 +45969,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>payall</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>printemployee</name>
|
<name>printemployee</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -215,9 +215,10 @@ export function PayrollLaborAllocationsTable({
|
|||||||
await axios.post("/payroll/payall", {
|
await axios.post("/payroll/payall", {
|
||||||
jobid: jobId,
|
jobid: jobId,
|
||||||
});
|
});
|
||||||
|
if (refetch) refetch();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
(TODO: Add Label) Pay All
|
{t("timetickets.actions.payall")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
|
|||||||
@@ -2729,6 +2729,7 @@
|
|||||||
"commit": "Commit Tickets ({{count}})",
|
"commit": "Commit Tickets ({{count}})",
|
||||||
"commitone": "Commit",
|
"commitone": "Commit",
|
||||||
"enter": "Enter New Time Ticket",
|
"enter": "Enter New Time Ticket",
|
||||||
|
"payall": "Pay All",
|
||||||
"printemployee": "Print Time Tickets",
|
"printemployee": "Print Time Tickets",
|
||||||
"uncommit": "Uncommit"
|
"uncommit": "Uncommit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2729,6 +2729,7 @@
|
|||||||
"commit": "",
|
"commit": "",
|
||||||
"commitone": "",
|
"commitone": "",
|
||||||
"enter": "",
|
"enter": "",
|
||||||
|
"payall": "",
|
||||||
"printemployee": "",
|
"printemployee": "",
|
||||||
"uncommit": ""
|
"uncommit": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2729,6 +2729,7 @@
|
|||||||
"commit": "",
|
"commit": "",
|
||||||
"commitone": "",
|
"commitone": "",
|
||||||
"enter": "",
|
"enter": "",
|
||||||
|
"payall": "",
|
||||||
"printemployee": "",
|
"printemployee": "",
|
||||||
"uncommit": ""
|
"uncommit": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ exports.claimtask = async function (req, res) {
|
|||||||
completed_tasks: [...job.completed_tasks, task],
|
completed_tasks: [...job.completed_tasks, task],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log("🚀 ~ file: claim-task.js:85 ~ updateResult:", updateResult)
|
|
||||||
}
|
}
|
||||||
res.json(ticketsToInsert);
|
res.json(ticketsToInsert);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -83,6 +83,22 @@ exports.payall = async function (req, res) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (diff.op === "update") {
|
} else if (diff.op === "update") {
|
||||||
|
//An old ticket amount isn't sufficient
|
||||||
|
//We can't modify the existing ticket, it might already be committed. So let's add a new one instead.
|
||||||
|
ticketsToInsert.push({
|
||||||
|
jobid: job.id,
|
||||||
|
bodyshopid: job.bodyshop.id,
|
||||||
|
employeeid: path.employeeid,
|
||||||
|
productivehrs: diff.val - diff.oldVal,
|
||||||
|
rate: path.rate,
|
||||||
|
ciecacode: path.mod_lbr_ty,
|
||||||
|
flat_rate: true,
|
||||||
|
cost_center:
|
||||||
|
job.bodyshop.md_responsibility_centers.defaults.costs[
|
||||||
|
path.mod_lbr_ty
|
||||||
|
],
|
||||||
|
memo: "*System* Hours adjustment during Pay All function. (Update)",
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
//Has to be a delete
|
//Has to be a delete
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user