Improve tax display on totals page.
This commit is contained in:
@@ -2250,6 +2250,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>mod_lbr_adjustment</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>other</name>
|
<name>other</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -2349,6 +2370,27 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>actions</name>
|
<name>actions</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>deductallhours</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>edit</name>
|
<name>edit</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -32420,6 +32462,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>total_sales_tax</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>totals</name>
|
<name>totals</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -32,42 +32,105 @@ export function JobTotalsTableTotals({ bodyshop, job }) {
|
|||||||
...(job.job_totals.totals.us_sales_tax_breakdown
|
...(job.job_totals.totals.us_sales_tax_breakdown
|
||||||
? [
|
? [
|
||||||
{
|
{
|
||||||
key:
|
key: `${
|
||||||
bodyshop.md_responsibility_centers.taxes.tax_ty1?.tax_type1 ||
|
bodyshop.md_responsibility_centers.taxes.tax_ty1?.tax_type1 ||
|
||||||
"T1",
|
"T1"
|
||||||
|
} - ${[
|
||||||
|
job.cieca_pft.ty1_rate1,
|
||||||
|
job.cieca_pft.ty1_rate2,
|
||||||
|
job.cieca_pft.ty1_rate3,
|
||||||
|
job.cieca_pft.ty1_rate4,
|
||||||
|
job.cieca_pft.ty1_rate5,
|
||||||
|
]
|
||||||
|
.filter((i) => i > 0)
|
||||||
|
.join(", ")}%`,
|
||||||
total: job.job_totals.totals.us_sales_tax_breakdown.ty1Tax,
|
total: job.job_totals.totals.us_sales_tax_breakdown.ty1Tax,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key:
|
key: `${
|
||||||
bodyshop.md_responsibility_centers.taxes.tax_ty2?.tax_type2 ||
|
bodyshop.md_responsibility_centers.taxes.tax_ty2?.tax_type2 ||
|
||||||
"T2",
|
"T2"
|
||||||
|
} - ${[
|
||||||
|
job.cieca_pft.ty2_rate1,
|
||||||
|
job.cieca_pft.ty2_rate2,
|
||||||
|
job.cieca_pft.ty2_rate3,
|
||||||
|
job.cieca_pft.ty2_rate4,
|
||||||
|
job.cieca_pft.ty2_rate5,
|
||||||
|
]
|
||||||
|
.filter((i) => i > 0)
|
||||||
|
.join(", ")}%`,
|
||||||
total: job.job_totals.totals.us_sales_tax_breakdown.ty2Tax,
|
total: job.job_totals.totals.us_sales_tax_breakdown.ty2Tax,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key:
|
key: `${
|
||||||
bodyshop.md_responsibility_centers.taxes.tax_ty3?.tax_type3 ||
|
bodyshop.md_responsibility_centers.taxes.tax_ty3?.tax_type3 ||
|
||||||
"T3",
|
"T3"
|
||||||
|
} - ${[
|
||||||
|
job.cieca_pft.ty3_rate1,
|
||||||
|
job.cieca_pft.ty3_rate2,
|
||||||
|
job.cieca_pft.ty3_rate3,
|
||||||
|
job.cieca_pft.ty3_rate4,
|
||||||
|
job.cieca_pft.ty3_rate5,
|
||||||
|
]
|
||||||
|
.filter((i) => i > 0)
|
||||||
|
.join(", ")}%`,
|
||||||
total: job.job_totals.totals.us_sales_tax_breakdown.ty3Tax,
|
total: job.job_totals.totals.us_sales_tax_breakdown.ty3Tax,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key:
|
key: `${
|
||||||
bodyshop.md_responsibility_centers.taxes.tax_ty4?.tax_type4 ||
|
bodyshop.md_responsibility_centers.taxes.tax_ty4?.tax_type4 ||
|
||||||
"T4",
|
"T4"
|
||||||
|
} - ${[
|
||||||
|
job.cieca_pft.ty4_rate1,
|
||||||
|
job.cieca_pft.ty4_rate2,
|
||||||
|
job.cieca_pft.ty4_rate3,
|
||||||
|
job.cieca_pft.ty4_rate4,
|
||||||
|
job.cieca_pft.ty4_rate5,
|
||||||
|
]
|
||||||
|
.filter((i) => i > 0)
|
||||||
|
.join(", ")}%`,
|
||||||
total: job.job_totals.totals.us_sales_tax_breakdown.ty4Tax,
|
total: job.job_totals.totals.us_sales_tax_breakdown.ty4Tax,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key:
|
key: `${
|
||||||
bodyshop.md_responsibility_centers.taxes.tax_ty5?.tax_type5 ||
|
bodyshop.md_responsibility_centers.taxes.tax_ty5?.tax_type5 ||
|
||||||
"T5",
|
"TT"
|
||||||
|
} - ${[
|
||||||
|
job.cieca_pft.ty5_rate1,
|
||||||
|
job.cieca_pft.ty5_rate2,
|
||||||
|
job.cieca_pft.ty5_rate3,
|
||||||
|
job.cieca_pft.ty5_rate4,
|
||||||
|
job.cieca_pft.ty5_rate5,
|
||||||
|
]
|
||||||
|
.filter((i) => i > 0)
|
||||||
|
.join(", ")}%`,
|
||||||
total: job.job_totals.totals.us_sales_tax_breakdown.ty5Tax,
|
total: job.job_totals.totals.us_sales_tax_breakdown.ty5Tax,
|
||||||
},
|
},
|
||||||
]
|
{
|
||||||
|
key: t("jobs.labels.total_sales_tax"),
|
||||||
|
bold: true,
|
||||||
|
total: Dinero(job.job_totals.totals.us_sales_tax_breakdown.ty1Tax)
|
||||||
|
.add(
|
||||||
|
Dinero(job.job_totals.totals.us_sales_tax_breakdown.ty2Tax)
|
||||||
|
)
|
||||||
|
.add(
|
||||||
|
Dinero(job.job_totals.totals.us_sales_tax_breakdown.ty3Tax)
|
||||||
|
)
|
||||||
|
.add(
|
||||||
|
Dinero(job.job_totals.totals.us_sales_tax_breakdown.ty4Tax)
|
||||||
|
)
|
||||||
|
.add(
|
||||||
|
Dinero(job.job_totals.totals.us_sales_tax_breakdown.ty5Tax)
|
||||||
|
).toJSON(),
|
||||||
|
},
|
||||||
|
].filter((item) => item.total.amount !== 0)
|
||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
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"),
|
||||||
total: job.job_totals.totals.total_repairs,
|
total: job.job_totals.totals.total_repairs,
|
||||||
@@ -101,7 +164,7 @@ export function JobTotalsTableTotals({ bodyshop, job }) {
|
|||||||
bold: true,
|
bold: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}, [job.job_totals, t, bodyshop.md_responsibility_centers]);
|
}, [job.job_totals, job.cieca_pft, t, bodyshop.md_responsibility_centers]);
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -145,6 +145,7 @@
|
|||||||
"deductedfromlbr": "Deduct from Labor?",
|
"deductedfromlbr": "Deduct from Labor?",
|
||||||
"entered": "Entered",
|
"entered": "Entered",
|
||||||
"from": "From",
|
"from": "From",
|
||||||
|
"mod_lbr_adjustment": "",
|
||||||
"other": "-- Not On Estimate --",
|
"other": "-- Not On Estimate --",
|
||||||
"reconciled": "Reconciled!",
|
"reconciled": "Reconciled!",
|
||||||
"unreconciled": "Unreconciled"
|
"unreconciled": "Unreconciled"
|
||||||
@@ -155,6 +156,7 @@
|
|||||||
},
|
},
|
||||||
"bills": {
|
"bills": {
|
||||||
"actions": {
|
"actions": {
|
||||||
|
"deductallhours": "",
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"receive": "Receive Part",
|
"receive": "Receive Part",
|
||||||
"return": "Return Items"
|
"return": "Return Items"
|
||||||
@@ -1890,6 +1892,7 @@
|
|||||||
"total_cust_payable": "Total Customer Amount Payable",
|
"total_cust_payable": "Total Customer Amount Payable",
|
||||||
"total_repairs": "Total Repairs",
|
"total_repairs": "Total Repairs",
|
||||||
"total_sales": "Total Sales",
|
"total_sales": "Total Sales",
|
||||||
|
"total_sales_tax": "Total Sales Tax",
|
||||||
"totals": "Totals",
|
"totals": "Totals",
|
||||||
"unvoidnote": "This job was unvoided.",
|
"unvoidnote": "This job was unvoided.",
|
||||||
"vehicle_info": "Vehicle",
|
"vehicle_info": "Vehicle",
|
||||||
|
|||||||
@@ -145,6 +145,7 @@
|
|||||||
"deductedfromlbr": "",
|
"deductedfromlbr": "",
|
||||||
"entered": "",
|
"entered": "",
|
||||||
"from": "",
|
"from": "",
|
||||||
|
"mod_lbr_adjustment": "",
|
||||||
"other": "",
|
"other": "",
|
||||||
"reconciled": "",
|
"reconciled": "",
|
||||||
"unreconciled": ""
|
"unreconciled": ""
|
||||||
@@ -155,6 +156,7 @@
|
|||||||
},
|
},
|
||||||
"bills": {
|
"bills": {
|
||||||
"actions": {
|
"actions": {
|
||||||
|
"deductallhours": "",
|
||||||
"edit": "",
|
"edit": "",
|
||||||
"receive": "",
|
"receive": "",
|
||||||
"return": ""
|
"return": ""
|
||||||
@@ -1890,6 +1892,7 @@
|
|||||||
"total_cust_payable": "",
|
"total_cust_payable": "",
|
||||||
"total_repairs": "",
|
"total_repairs": "",
|
||||||
"total_sales": "",
|
"total_sales": "",
|
||||||
|
"total_sales_tax": "",
|
||||||
"totals": "",
|
"totals": "",
|
||||||
"unvoidnote": "",
|
"unvoidnote": "",
|
||||||
"vehicle_info": "Vehículo",
|
"vehicle_info": "Vehículo",
|
||||||
|
|||||||
@@ -145,6 +145,7 @@
|
|||||||
"deductedfromlbr": "",
|
"deductedfromlbr": "",
|
||||||
"entered": "",
|
"entered": "",
|
||||||
"from": "",
|
"from": "",
|
||||||
|
"mod_lbr_adjustment": "",
|
||||||
"other": "",
|
"other": "",
|
||||||
"reconciled": "",
|
"reconciled": "",
|
||||||
"unreconciled": ""
|
"unreconciled": ""
|
||||||
@@ -155,6 +156,7 @@
|
|||||||
},
|
},
|
||||||
"bills": {
|
"bills": {
|
||||||
"actions": {
|
"actions": {
|
||||||
|
"deductallhours": "",
|
||||||
"edit": "",
|
"edit": "",
|
||||||
"receive": "",
|
"receive": "",
|
||||||
"return": ""
|
"return": ""
|
||||||
@@ -1890,6 +1892,7 @@
|
|||||||
"total_cust_payable": "",
|
"total_cust_payable": "",
|
||||||
"total_repairs": "",
|
"total_repairs": "",
|
||||||
"total_sales": "",
|
"total_sales": "",
|
||||||
|
"total_sales_tax": "",
|
||||||
"totals": "",
|
"totals": "",
|
||||||
"unvoidnote": "",
|
"unvoidnote": "",
|
||||||
"vehicle_info": "Véhicule",
|
"vehicle_info": "Véhicule",
|
||||||
|
|||||||
Reference in New Issue
Block a user