Compare commits
25 Commits
release/20
...
release/20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75743f44e7 | ||
|
|
71f161ec27 | ||
|
|
f59911d5ab | ||
|
|
417958e1e8 | ||
|
|
ccf2f0ad47 | ||
|
|
bb993ab1fb | ||
|
|
9c39c8d59b | ||
|
|
3439f09d9a | ||
|
|
279e93f0c3 | ||
|
|
92f14d6fa5 | ||
|
|
148c645f18 | ||
|
|
9a65b6a1ce | ||
|
|
839c82abb9 | ||
|
|
471756d7ad | ||
|
|
2e2a4920ca | ||
|
|
f775e09391 | ||
|
|
c0b0bcd55e | ||
|
|
1bc5493f3f | ||
|
|
2579558090 | ||
|
|
bc9a3a21a8 | ||
|
|
f11eb6406d | ||
|
|
3d6bad9e7d | ||
|
|
a318f3e74b | ||
|
|
e5a5cb4e85 | ||
|
|
ce3fbab1dc |
@@ -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
|
||||
@@ -4388,6 +4388,48 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>logo_img_footer_margin</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>logo_img_header_margin</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>logo_img_path</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -20581,6 +20623,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>date_rentalresp</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>date_scheduled</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -20602,6 +20665,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>date_towin</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>ded_amt</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -27371,6 +27455,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>threshhold</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>total_cost</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -34752,6 +34857,27 @@
|
||||
</concept_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<concept_node>
|
||||
<name>mechanical_authorization</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>mpi_animal_checklist</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -38427,6 +38553,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>production_by_repair_status_one</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>production_by_ro</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -43353,6 +43500,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>novehinfo</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>relatedjobs</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -64,9 +64,9 @@ export default function JobBillsTotalComponent({
|
||||
})
|
||||
);
|
||||
|
||||
const totalPartsSublet = Dinero(totals.parts.parts.total).add(
|
||||
Dinero(totals.parts.sublets.total)
|
||||
);
|
||||
const totalPartsSublet = Dinero(totals.parts.parts.total)
|
||||
.add(Dinero(totals.parts.sublets.total))
|
||||
.add(Dinero(totals.additional.towing));
|
||||
|
||||
const discrepancy = totalPartsSublet.subtract(billTotals);
|
||||
|
||||
|
||||
@@ -462,7 +462,7 @@ export function JobLinesComponent({
|
||||
};
|
||||
}}
|
||||
rowSelection={{
|
||||
selectedRowKeys: selectedLines.map((item) => item.id),
|
||||
selectedRowKeys: selectedLines.map((item) => item && item.id),
|
||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||
setSelectedLines(selectedRows);
|
||||
},
|
||||
|
||||
@@ -18,7 +18,11 @@ export default function JobReconciliationModalComponent({ job, bills }) {
|
||||
.flat() || [];
|
||||
|
||||
const jobLineData = job.joblines.filter(
|
||||
(j) => j.part_type !== null && j.part_type !== "PAE"
|
||||
(j) =>
|
||||
(j.part_type !== null && j.part_type !== "PAE") ||
|
||||
(j.line_desc &&
|
||||
j.line_desc.toLowerCase().includes("towing") &&
|
||||
j.lbr_op === "OP13")
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Table } from "antd";
|
||||
import { Space, Table } from "antd";
|
||||
import Dinero from "dinero.js";
|
||||
import React, { useMemo, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -119,7 +119,18 @@ export default function JobTotalsTableLabor({ job }) {
|
||||
</Table.Summary.Cell>
|
||||
</Table.Summary.Row>
|
||||
<Table.Summary.Row>
|
||||
<Table.Summary.Cell>{t("jobs.labels.mapa")}</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>
|
||||
<Space>
|
||||
{t("jobs.labels.mapa")}
|
||||
{job.materials &&
|
||||
job.materials.mapa &&
|
||||
job.materials.mapa.cal_maxdlr &&
|
||||
job.materials.mapa.cal_maxdlr > 0 &&
|
||||
t("jobs.labels.threshhold", {
|
||||
amount: job.materials.mapa.cal_maxdlr,
|
||||
})}
|
||||
</Space>
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell align="right">
|
||||
<CurrencyFormatter>
|
||||
{job.job_totals.rates.mapa.rate}
|
||||
@@ -133,7 +144,18 @@ export default function JobTotalsTableLabor({ job }) {
|
||||
</Table.Summary.Cell>
|
||||
</Table.Summary.Row>
|
||||
<Table.Summary.Row>
|
||||
<Table.Summary.Cell>{t("jobs.labels.mash")}</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>
|
||||
<Space wrap>
|
||||
{t("jobs.labels.mash")}
|
||||
{job.materials &&
|
||||
job.materials.mash &&
|
||||
job.materials.mash.cal_maxdlr &&
|
||||
job.materials.mash.cal_maxdlr > 0 &&
|
||||
t("jobs.labels.threshhold", {
|
||||
amount: job.materials.mash.cal_maxdlr,
|
||||
})}
|
||||
</Space>
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell align="right">
|
||||
<CurrencyFormatter>
|
||||
{job.job_totals.rates.mash.rate}
|
||||
|
||||
@@ -58,6 +58,15 @@ export default function JobsAdminDatesChange({ job }) {
|
||||
>
|
||||
<FormDatePicker format="MM/DD/YYYY" />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.date_towin")} name="date_towin">
|
||||
<DateTimePicker />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("jobs.fields.date_rentalresp")}
|
||||
name="date_rentalresp"
|
||||
>
|
||||
<DateTimePicker />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.date_open")} name="date_open">
|
||||
<DateTimePicker />
|
||||
</Form.Item>
|
||||
|
||||
@@ -37,7 +37,6 @@ export const GetSupplementDelta = async (client, jobId, newLines) => {
|
||||
});
|
||||
|
||||
//Wahtever is left in the existing lines, are lines that should be removed.
|
||||
|
||||
const insertQueries = linesToInsert.reduce((acc, value, idx) => {
|
||||
return acc + generateInsertQuery(value, idx, jobId);
|
||||
}, "");
|
||||
@@ -49,6 +48,13 @@ export const GetSupplementDelta = async (client, jobId, newLines) => {
|
||||
const removeQueries = existingLines.reduce((acc, value, idx) => {
|
||||
return acc + generateRemoveQuery(value, idx);
|
||||
}, "");
|
||||
console.log(insertQueries, updateQueries, removeQueries);
|
||||
|
||||
if ((insertQueries + updateQueries + removeQueries).trim() === "") {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(null);
|
||||
});
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(gql`
|
||||
|
||||
@@ -220,12 +220,13 @@ export function JobsAvailableContainer({
|
||||
);
|
||||
|
||||
delete supp.joblines;
|
||||
await client.mutate({
|
||||
mutation: gql`
|
||||
${suppDelta}
|
||||
`,
|
||||
});
|
||||
|
||||
if (suppDelta !== null) {
|
||||
await client.mutate({
|
||||
mutation: gql`
|
||||
${suppDelta}
|
||||
`,
|
||||
});
|
||||
}
|
||||
const updateResult = await updateJob({
|
||||
variables: {
|
||||
jobId: selectedJob,
|
||||
|
||||
@@ -39,6 +39,12 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
|
||||
<Form.Item label={t("jobs.fields.date_open")} name="date_open">
|
||||
<DateTimePicker disabled={jobRO} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.date_towin")} name="date_towin">
|
||||
<DateTimePicker disabled={jobRO} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.date_rentalresp")} name="date_rentalresp">
|
||||
<DateTimePicker disabled={jobRO} />
|
||||
</Form.Item>
|
||||
</FormRow>
|
||||
|
||||
<FormRow header={t("jobs.forms.scheddates")}>
|
||||
|
||||
@@ -401,6 +401,9 @@ export function JobsDetailHeaderActions({
|
||||
job: {
|
||||
status: bodyshop.md_ro_statuses.default_void,
|
||||
voided: true,
|
||||
scheduled_in: null,
|
||||
scheduled_completion: null,
|
||||
inproduction: false,
|
||||
},
|
||||
note: [
|
||||
{
|
||||
|
||||
@@ -60,6 +60,13 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
);
|
||||
}, [job.status, bodyshop.md_ro_statuses.post_production_statuses]);
|
||||
|
||||
const vehicleTitle = `${job.v_model_yr || ""} ${job.v_color || ""}
|
||||
${job.v_make_desc || ""}
|
||||
${job.v_model_desc || ""}`.trim();
|
||||
console.log(
|
||||
"🚀 ~ file: jobs-detail-header.component.jsx ~ line 64 ~ vehicleTitle",
|
||||
vehicleTitle.length
|
||||
);
|
||||
return (
|
||||
<Row gutter={[16, 16]} style={{ alignItems: "stretch" }}>
|
||||
<Col {...colSpan}>
|
||||
@@ -188,9 +195,9 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
||||
: job.vehicle && `/manage/vehicles/${job.vehicle.id}`
|
||||
}
|
||||
>
|
||||
{`${job.v_model_yr || ""} ${job.v_color || ""}
|
||||
${job.v_make_desc || ""}
|
||||
${job.v_model_desc || ""}`}
|
||||
{vehicleTitle.length > 0
|
||||
? vehicleTitle
|
||||
: t("vehicles.labels.novehinfo")}
|
||||
</Link>
|
||||
) : (
|
||||
<span></span>
|
||||
|
||||
@@ -115,7 +115,6 @@ export function JobNotesComponent({
|
||||
<EditFilled />
|
||||
</Button>
|
||||
<PrintWrapperComponent
|
||||
emailOnly
|
||||
templateObject={{
|
||||
name: Templates.individual_job_note.key,
|
||||
|
||||
|
||||
@@ -8,8 +8,11 @@ import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
const ProdTemplates = TemplateList("production");
|
||||
const { production_by_technician_one, production_by_category_one } =
|
||||
TemplateList("special");
|
||||
const {
|
||||
production_by_technician_one,
|
||||
production_by_category_one,
|
||||
production_by_repair_status_one,
|
||||
} = TemplateList("special");
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -95,6 +98,29 @@ export function ProductionListPrint({ bodyshop }) {
|
||||
</Menu.Item>
|
||||
))}
|
||||
</Menu.SubMenu>
|
||||
<Menu.SubMenu
|
||||
title={t("reportcenter.templates.production_by_repair_status_one")}
|
||||
>
|
||||
{bodyshop.md_ro_statuses.production_statuses.map((e) => (
|
||||
<Menu.Item
|
||||
key={e}
|
||||
onClick={async () => {
|
||||
setLoading(true);
|
||||
await GenerateDocument(
|
||||
{
|
||||
name: production_by_repair_status_one.key,
|
||||
variables: { status: e },
|
||||
},
|
||||
{},
|
||||
"p"
|
||||
);
|
||||
setLoading(false);
|
||||
}}
|
||||
>
|
||||
{e}
|
||||
</Menu.Item>
|
||||
))}
|
||||
</Menu.SubMenu>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
|
||||
@@ -142,6 +142,18 @@ export default function ShopInfoGeneral({ form }) {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.logo_img_header_margin")}
|
||||
name={["logo_img_path", "headerMargin"]}
|
||||
>
|
||||
<InputNumber min={0} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.logo_img_footer_margin")}
|
||||
name={["logo_img_path", "footerMargin"]}
|
||||
>
|
||||
<InputNumber min={0} />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow header={t("bodyshop.labels.accountingsetup")}>
|
||||
<Form.Item
|
||||
|
||||
@@ -595,6 +595,7 @@ export const GET_JOB_BY_PK = gql`
|
||||
ca_gst_registrant
|
||||
ownerid
|
||||
ded_note
|
||||
materials
|
||||
owner {
|
||||
id
|
||||
ownr_fn
|
||||
@@ -649,6 +650,8 @@ export const GET_JOB_BY_PK = gql`
|
||||
date_invoiced
|
||||
date_last_contacted
|
||||
date_next_contact
|
||||
date_towin
|
||||
date_rentalresp
|
||||
date_exported
|
||||
status
|
||||
owner_owing
|
||||
@@ -1097,6 +1100,15 @@ export const VOID_JOB = gql`
|
||||
insert_notes(objects: $note) {
|
||||
affected_rows
|
||||
}
|
||||
update_appointments(
|
||||
where: { jobid: { _eq: $jobId } }
|
||||
_set: { canceled: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
canceled
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
@@ -275,6 +275,8 @@
|
||||
"mash": "Job Costing - Shop Materials Hourly Cost Rate"
|
||||
},
|
||||
"lastnumberworkingdays": "Scoreboard - Last Number of Working Days",
|
||||
"logo_img_footer_margin": "Footer Margin (px)",
|
||||
"logo_img_header_margin": "Header Margin (px)",
|
||||
"logo_img_path": "Shop Logo",
|
||||
"logo_img_path_height": "Logo Image Height",
|
||||
"logo_img_path_width": "Logo Image Width",
|
||||
@@ -1254,7 +1256,9 @@
|
||||
"date_last_contacted": "Last Contacted Date",
|
||||
"date_next_contact": "Next Contact Date",
|
||||
"date_open": "Open",
|
||||
"date_rentalresp": "Shop Rental Responsibility Start",
|
||||
"date_scheduled": "Scheduled",
|
||||
"date_towin": "Towed In",
|
||||
"ded_amt": "Deductible",
|
||||
"ded_note": "Deductible Note",
|
||||
"ded_status": "Deductible Status",
|
||||
@@ -1602,6 +1606,7 @@
|
||||
"supplementnote": "The job had a supplement imported.",
|
||||
"suspended": "SUSPENDED",
|
||||
"suspense": "Suspense",
|
||||
"threshhold": "Max Threshold: ${{amount}}",
|
||||
"total_cost": "Total Cost",
|
||||
"total_cust_payable": "Total Customer Amount Payable",
|
||||
"total_repairs": "Total Repairs",
|
||||
@@ -2068,6 +2073,7 @@
|
||||
"labels": "Labels",
|
||||
"position": "Starting Position"
|
||||
},
|
||||
"mechanical_authorization": "Mechanical Authorization",
|
||||
"mpi_animal_checklist": "MPI - Animal Checklist",
|
||||
"mpi_eglass_auth": "MPI - eGlass Auth",
|
||||
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet",
|
||||
@@ -2280,6 +2286,7 @@
|
||||
"production_by_csr": "Production by CSR",
|
||||
"production_by_last_name": "Production by Last Name",
|
||||
"production_by_repair_status": "Production by Status",
|
||||
"production_by_repair_status_one": "Production filtered by Status",
|
||||
"production_by_ro": "Production by RO",
|
||||
"production_by_target_date": "Production by Target Date",
|
||||
"production_by_technician": "Production by Technician",
|
||||
@@ -2578,6 +2585,7 @@
|
||||
},
|
||||
"labels": {
|
||||
"fromvehicle": "Historical Vehicle Record",
|
||||
"novehinfo": "No Vehicle Information",
|
||||
"relatedjobs": "Related Jobs",
|
||||
"updatevehicle": "Update Vehicle Information"
|
||||
},
|
||||
|
||||
@@ -275,6 +275,8 @@
|
||||
"mash": ""
|
||||
},
|
||||
"lastnumberworkingdays": "",
|
||||
"logo_img_footer_margin": "",
|
||||
"logo_img_header_margin": "",
|
||||
"logo_img_path": "",
|
||||
"logo_img_path_height": "",
|
||||
"logo_img_path_width": "",
|
||||
@@ -1254,7 +1256,9 @@
|
||||
"date_last_contacted": "",
|
||||
"date_next_contact": "",
|
||||
"date_open": "Abierto",
|
||||
"date_rentalresp": "",
|
||||
"date_scheduled": "Programado",
|
||||
"date_towin": "",
|
||||
"ded_amt": "Deducible",
|
||||
"ded_note": "",
|
||||
"ded_status": "Estado deducible",
|
||||
@@ -1602,6 +1606,7 @@
|
||||
"supplementnote": "",
|
||||
"suspended": "",
|
||||
"suspense": "",
|
||||
"threshhold": "",
|
||||
"total_cost": "",
|
||||
"total_cust_payable": "",
|
||||
"total_repairs": "",
|
||||
@@ -2068,6 +2073,7 @@
|
||||
"labels": "",
|
||||
"position": ""
|
||||
},
|
||||
"mechanical_authorization": "",
|
||||
"mpi_animal_checklist": "",
|
||||
"mpi_eglass_auth": "",
|
||||
"mpi_final_acct_sheet": "",
|
||||
@@ -2280,6 +2286,7 @@
|
||||
"production_by_csr": "",
|
||||
"production_by_last_name": "",
|
||||
"production_by_repair_status": "",
|
||||
"production_by_repair_status_one": "",
|
||||
"production_by_ro": "",
|
||||
"production_by_target_date": "",
|
||||
"production_by_technician": "",
|
||||
@@ -2578,6 +2585,7 @@
|
||||
},
|
||||
"labels": {
|
||||
"fromvehicle": "",
|
||||
"novehinfo": "",
|
||||
"relatedjobs": "",
|
||||
"updatevehicle": ""
|
||||
},
|
||||
|
||||
@@ -275,6 +275,8 @@
|
||||
"mash": ""
|
||||
},
|
||||
"lastnumberworkingdays": "",
|
||||
"logo_img_footer_margin": "",
|
||||
"logo_img_header_margin": "",
|
||||
"logo_img_path": "",
|
||||
"logo_img_path_height": "",
|
||||
"logo_img_path_width": "",
|
||||
@@ -1254,7 +1256,9 @@
|
||||
"date_last_contacted": "",
|
||||
"date_next_contact": "",
|
||||
"date_open": "Ouvrir",
|
||||
"date_rentalresp": "",
|
||||
"date_scheduled": "Prévu",
|
||||
"date_towin": "",
|
||||
"ded_amt": "Déductible",
|
||||
"ded_note": "",
|
||||
"ded_status": "Statut de franchise",
|
||||
@@ -1602,6 +1606,7 @@
|
||||
"supplementnote": "",
|
||||
"suspended": "",
|
||||
"suspense": "",
|
||||
"threshhold": "",
|
||||
"total_cost": "",
|
||||
"total_cust_payable": "",
|
||||
"total_repairs": "",
|
||||
@@ -2068,6 +2073,7 @@
|
||||
"labels": "",
|
||||
"position": ""
|
||||
},
|
||||
"mechanical_authorization": "",
|
||||
"mpi_animal_checklist": "",
|
||||
"mpi_eglass_auth": "",
|
||||
"mpi_final_acct_sheet": "",
|
||||
@@ -2280,6 +2286,7 @@
|
||||
"production_by_csr": "",
|
||||
"production_by_last_name": "",
|
||||
"production_by_repair_status": "",
|
||||
"production_by_repair_status_one": "",
|
||||
"production_by_ro": "",
|
||||
"production_by_target_date": "",
|
||||
"production_by_technician": "",
|
||||
@@ -2578,6 +2585,7 @@
|
||||
},
|
||||
"labels": {
|
||||
"fromvehicle": "",
|
||||
"novehinfo": "",
|
||||
"relatedjobs": "",
|
||||
"updatevehicle": ""
|
||||
},
|
||||
|
||||
@@ -37,6 +37,14 @@ export const TemplateList = (type, context) => {
|
||||
disabled: false,
|
||||
group: "authorization",
|
||||
},
|
||||
mechanical_authorization: {
|
||||
title: i18n.t("printcenter.jobs.mechanical_authorization"),
|
||||
description: "Diagnostic Authorization",
|
||||
subject: i18n.t("printcenter.jobs.mechanical_authorization"),
|
||||
key: "mechanical_authorization",
|
||||
disabled: false,
|
||||
group: "authorization",
|
||||
},
|
||||
appointment_reminder: {
|
||||
title: i18n.t("printcenter.jobs.appointment_reminder"),
|
||||
description: "All Jobs Notes",
|
||||
@@ -1664,6 +1672,18 @@ export const TemplateList = (type, context) => {
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
},
|
||||
production_by_repair_status_one: {
|
||||
title: i18n.t(
|
||||
"reportcenter.templates.production_by_repair_status_one"
|
||||
),
|
||||
description: "",
|
||||
subject: i18n.t(
|
||||
"reportcenter.templates.production_by_repair_status_one"
|
||||
),
|
||||
key: "production_by_repair_status_one",
|
||||
//idtype: "vendor",
|
||||
disabled: false,
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
@@ -2721,7 +2721,9 @@
|
||||
- date_last_contacted
|
||||
- date_next_contact
|
||||
- date_open
|
||||
- date_rentalresp
|
||||
- date_scheduled
|
||||
- date_towin
|
||||
- ded_amt
|
||||
- ded_note
|
||||
- ded_status
|
||||
@@ -2804,6 +2806,7 @@
|
||||
- loss_desc
|
||||
- loss_of_use
|
||||
- loss_type
|
||||
- materials
|
||||
- other_amount_payable
|
||||
- owner_owing
|
||||
- ownerid
|
||||
@@ -2978,7 +2981,9 @@
|
||||
- date_last_contacted
|
||||
- date_next_contact
|
||||
- date_open
|
||||
- date_rentalresp
|
||||
- date_scheduled
|
||||
- date_towin
|
||||
- ded_amt
|
||||
- ded_note
|
||||
- ded_status
|
||||
@@ -3061,6 +3066,7 @@
|
||||
- loss_desc
|
||||
- loss_of_use
|
||||
- loss_type
|
||||
- materials
|
||||
- other_amount_payable
|
||||
- owner_owing
|
||||
- ownerid
|
||||
@@ -3245,7 +3251,9 @@
|
||||
- date_last_contacted
|
||||
- date_next_contact
|
||||
- date_open
|
||||
- date_rentalresp
|
||||
- date_scheduled
|
||||
- date_towin
|
||||
- ded_amt
|
||||
- ded_note
|
||||
- ded_status
|
||||
@@ -3328,6 +3336,7 @@
|
||||
- loss_desc
|
||||
- loss_of_use
|
||||
- loss_type
|
||||
- materials
|
||||
- other_amount_payable
|
||||
- owner_owing
|
||||
- ownerid
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."jobs" add column "materials" jsonb
|
||||
-- not null default jsonb_build_object();
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."jobs" add column "materials" jsonb
|
||||
not null default jsonb_build_object();
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."jobs" add column "towin_date" timestamptz
|
||||
-- null;
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."jobs" add column "towin_date" timestamptz
|
||||
null;
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."jobs" rename column "date_towin" to "towin_date";
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."jobs" rename column "towin_date" to "date_towin";
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."jobs" add column "date_rentalresp" timestamptz
|
||||
-- null;
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."jobs" add column "date_rentalresp" timestamptz
|
||||
null;
|
||||
@@ -96,7 +96,7 @@ exports.default = async (req, res) => {
|
||||
count: autoHouseObject.AutoHouseExport.RepairOrder.length,
|
||||
xml: ret,
|
||||
filename: `IM_${bodyshop.autohouseid}_${moment().format(
|
||||
"DDMMYYYY_HHMMSS"
|
||||
"DDMMYYYY_HHMMss"
|
||||
)}.xml`,
|
||||
});
|
||||
|
||||
@@ -328,8 +328,12 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
||||
.format(AhDateFormat)) ||
|
||||
"",
|
||||
DeliveryAppointmentDate:
|
||||
(job.scheduled_delivery &&
|
||||
moment(job.scheduled_delivery)
|
||||
// (job.scheduled_delivery &&
|
||||
// moment(job.scheduled_delivery)
|
||||
// .tz(job.bodyshop.timezone)
|
||||
// .format(AhDateFormat)) ||
|
||||
(job.scheduled_completion &&
|
||||
moment(job.scheduled_completion)
|
||||
.tz(job.bodyshop.timezone)
|
||||
.format(AhDateFormat)) ||
|
||||
"",
|
||||
@@ -538,7 +542,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
||||
),
|
||||
GlassLaborTotalCost:
|
||||
repairCosts.GlassLaborTotalCost.toFormat(AHDineroFormat),
|
||||
DetailLaborTotal: Dinero(job.job_totals.rates.lag.total).toFormat(
|
||||
DetailLaborTotal: Dinero(job.job_totals.rates.lad.total).toFormat(
|
||||
AHDineroFormat
|
||||
),
|
||||
DetailLaborTotalCost:
|
||||
@@ -590,7 +594,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
|
||||
AHDineroFormat
|
||||
),
|
||||
InsurancePay: Dinero(job.job_totals.totals.total_repairs)
|
||||
.subtract(Dinero(job.job_totals.totals.custPayable))
|
||||
.subtract(Dinero(job.job_totals.totals.custPayable.total))
|
||||
.toFormat(AHDineroFormat),
|
||||
Deposit: 0,
|
||||
AmountDue: 0,
|
||||
@@ -822,7 +826,9 @@ const GenerateDetailLines = (job, line, statuses) => {
|
||||
)) ||
|
||||
0,
|
||||
//Critical: null,
|
||||
Description: line.line_desc || "",
|
||||
Description: line.line_desc
|
||||
? line.line_desc.replace(/[^\x00-\x7F]/g, "")
|
||||
: "",
|
||||
DiscountMarkup: line.prt_dsmk_m || 0,
|
||||
InvoiceNumber: line.billlines[0] && line.billlines[0].bill.invoice_number,
|
||||
IOUPart: 0,
|
||||
|
||||
@@ -960,6 +960,7 @@ exports.GET_JOB_BY_PK = ` query GET_JOB_BY_PK($id: uuid!) {
|
||||
voided
|
||||
ca_bc_pvrt
|
||||
ca_customer_gst
|
||||
materials
|
||||
joblines(where: { removed: { _eq: false } }){
|
||||
id
|
||||
line_no
|
||||
|
||||
@@ -234,11 +234,30 @@ function CalculateRatesTotals(ratesList) {
|
||||
if (!ret[property].total) {
|
||||
ret[property].total = Dinero();
|
||||
}
|
||||
ret[property].total = ret[property].total.add(
|
||||
Dinero({
|
||||
amount: Math.round((ret[property].rate || 0) * 100),
|
||||
}).multiply(ret[property].hours)
|
||||
);
|
||||
let threshold;
|
||||
//Check if there is a max for this type.
|
||||
if (ratesList.materials && ratesList.materials[property]) {
|
||||
//
|
||||
if (
|
||||
ratesList.materials[property].cal_maxdlr &&
|
||||
ratesList.materials[property].cal_maxdlr > 0
|
||||
) {
|
||||
//It has an upper threshhold.
|
||||
threshold = Dinero({
|
||||
amount: Math.round(ratesList.materials[property].cal_maxdlr * 100),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const total = Dinero({
|
||||
amount: Math.round((ret[property].rate || 0) * 100),
|
||||
}).multiply(ret[property].hours);
|
||||
|
||||
if (threshold && total.greaterThanOrEqual(threshold)) {
|
||||
ret[property].total = ret[property].total.add(threshold);
|
||||
} else {
|
||||
ret[property].total = ret[property].total.add(total);
|
||||
}
|
||||
}
|
||||
|
||||
subtotal = subtotal.add(ret[property].total);
|
||||
@@ -252,6 +271,7 @@ function CalculateRatesTotals(ratesList) {
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
function CalculatePartsTotals(jobLines) {
|
||||
const ret = jobLines
|
||||
.filter((jl) => !jl.removed)
|
||||
@@ -418,21 +438,27 @@ function CalculateAdditional(job) {
|
||||
pvrt: null,
|
||||
total: null,
|
||||
};
|
||||
ret.towing = Dinero({
|
||||
amount: Math.round((job.towing_payable || 0) * 100),
|
||||
});
|
||||
ret.additionalCosts = job.joblines
|
||||
.filter((jl) => !jl.removed && IsAdditionalCost(jl))
|
||||
.reduce((acc, val) => {
|
||||
const lineValue = Dinero({
|
||||
amount: Math.round((val.act_price || 0) * 100),
|
||||
}).multiply(val.part_qty || 1);
|
||||
ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });
|
||||
return acc.add(lineValue);
|
||||
|
||||
if (val.line_desc.toLowerCase().includes("towing")) {
|
||||
ret.towing = lineValue;
|
||||
return acc;
|
||||
} else {
|
||||
ret.additionalCostItems.push({ key: val.line_desc, total: lineValue });
|
||||
return acc.add(lineValue);
|
||||
}
|
||||
}, Dinero());
|
||||
ret.adjustments = Dinero({
|
||||
amount: Math.round((job.adjustment_bottom_line || 0) * 100),
|
||||
});
|
||||
ret.towing = Dinero({
|
||||
amount: Math.round((job.towing_payable || 0) * 100),
|
||||
});
|
||||
ret.storage = Dinero({
|
||||
amount: Math.round((job.storage_payable || 0) * 100),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user