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
|
||||
@@ -45969,6 +45969,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</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>
|
||||
<name>printemployee</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -215,9 +215,10 @@ export function PayrollLaborAllocationsTable({
|
||||
await axios.post("/payroll/payall", {
|
||||
jobid: jobId,
|
||||
});
|
||||
if (refetch) refetch();
|
||||
}}
|
||||
>
|
||||
(TODO: Add Label) Pay All
|
||||
{t("timetickets.actions.payall")}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
|
||||
@@ -2729,6 +2729,7 @@
|
||||
"commit": "Commit Tickets ({{count}})",
|
||||
"commitone": "Commit",
|
||||
"enter": "Enter New Time Ticket",
|
||||
"payall": "Pay All",
|
||||
"printemployee": "Print Time Tickets",
|
||||
"uncommit": "Uncommit"
|
||||
},
|
||||
|
||||
@@ -2729,6 +2729,7 @@
|
||||
"commit": "",
|
||||
"commitone": "",
|
||||
"enter": "",
|
||||
"payall": "",
|
||||
"printemployee": "",
|
||||
"uncommit": ""
|
||||
},
|
||||
|
||||
@@ -2729,6 +2729,7 @@
|
||||
"commit": "",
|
||||
"commitone": "",
|
||||
"enter": "",
|
||||
"payall": "",
|
||||
"printemployee": "",
|
||||
"uncommit": ""
|
||||
},
|
||||
|
||||
@@ -82,7 +82,6 @@ exports.claimtask = async function (req, res) {
|
||||
completed_tasks: [...job.completed_tasks, task],
|
||||
},
|
||||
});
|
||||
console.log("🚀 ~ file: claim-task.js:85 ~ updateResult:", updateResult)
|
||||
}
|
||||
res.json(ticketsToInsert);
|
||||
} catch (error) {
|
||||
|
||||
@@ -83,6 +83,22 @@ exports.payall = async function (req, res) {
|
||||
});
|
||||
}
|
||||
} 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 {
|
||||
//Has to be a delete
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user