IO-2696 Incorrect job totals showing per instance.
This commit is contained in:
@@ -6,6 +6,7 @@ import {useTranslation} from "react-i18next";
|
|||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||||
|
import InstanceRenderManager from '../../utils/instanceRenderMgr';
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -29,8 +30,28 @@ export function JobTotalsTableTotals({bodyshop, job}) {
|
|||||||
total: job.job_totals.totals.subtotal,
|
total: job.job_totals.totals.subtotal,
|
||||||
bold: true,
|
bold: true,
|
||||||
},
|
},
|
||||||
|
...InstanceRenderManager({imex: [ {
|
||||||
...(job.job_totals.totals.us_sales_tax_breakdown
|
key: t("jobs.labels.local_tax_amt"),
|
||||||
|
total: job.job_totals.totals.local_tax,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: t("jobs.labels.state_tax_amt"),
|
||||||
|
total: job.job_totals.totals.state_tax,
|
||||||
|
},
|
||||||
|
...(bodyshop.region_config === "CA_BC"
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
key: t("jobs.fields.ca_bc_pvrt"),
|
||||||
|
total: job.job_totals.additional.pvrt,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
{
|
||||||
|
key: t("jobs.labels.federal_tax_amt"),
|
||||||
|
total: job.job_totals.totals.federal_tax,
|
||||||
|
},],
|
||||||
|
promanager: "USE_ROME",
|
||||||
|
rome: [(job.job_totals.totals.us_sales_tax_breakdown
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
key: `${
|
key: `${
|
||||||
@@ -130,7 +151,9 @@ export function JobTotalsTableTotals({bodyshop, job}) {
|
|||||||
key: t("jobs.labels.state_tax_amt"),
|
key: t("jobs.labels.state_tax_amt"),
|
||||||
total: job.job_totals.totals.state_tax,
|
total: job.job_totals.totals.state_tax,
|
||||||
},
|
},
|
||||||
]),
|
])]
|
||||||
|
}),
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
key: t("jobs.labels.total_repairs"),
|
key: t("jobs.labels.total_repairs"),
|
||||||
|
|||||||
@@ -749,7 +749,7 @@
|
|||||||
"refuelcharge": "Refuel Charge (per liter/gallon)",
|
"refuelcharge": "Refuel Charge (per liter/gallon)",
|
||||||
"scheduledreturn": "Scheduled Return",
|
"scheduledreturn": "Scheduled Return",
|
||||||
"start": "Contract Start",
|
"start": "Contract Start",
|
||||||
"statetax": "State Taxes",
|
"statetax": "Provincial/State Taxes",
|
||||||
"status": "Status"
|
"status": "Status"
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
@@ -2001,7 +2001,7 @@
|
|||||||
"savebeforeconversion": "You have unsaved changes on the Job. Please save them before converting it. ",
|
"savebeforeconversion": "You have unsaved changes on the Job. Please save them before converting it. ",
|
||||||
"scheduledinchange": "The scheduled in is based off the latest appointment. To change this date, please schedule or reschedule the Job. ",
|
"scheduledinchange": "The scheduled in is based off the latest appointment. To change this date, please schedule or reschedule the Job. ",
|
||||||
"specialcoveragepolicy": "Special Coverage Policy Applies",
|
"specialcoveragepolicy": "Special Coverage Policy Applies",
|
||||||
"state_tax_amt": "State Taxes",
|
"state_tax_amt": "Provincial/State Taxes",
|
||||||
"subletstotal": "Sublets Total",
|
"subletstotal": "Sublets Total",
|
||||||
"subtotal": "Subtotal",
|
"subtotal": "Subtotal",
|
||||||
"supplementnote": "The Job had a supplement imported.",
|
"supplementnote": "The Job had a supplement imported.",
|
||||||
|
|||||||
Reference in New Issue
Block a user