@@ -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
|
||||||
@@ -4388,6 +4388,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>logo_img_path</name>
|
<name>logo_img_path</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -20581,6 +20623,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>date_scheduled</name>
|
<name>date_scheduled</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -20602,6 +20665,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>ded_amt</name>
|
<name>ded_amt</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -27371,6 +27455,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>total_cost</name>
|
<name>total_cost</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -38448,6 +38553,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</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>
|
<concept_node>
|
||||||
<name>production_by_ro</name>
|
<name>production_by_ro</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Table } from "antd";
|
import { Space, Table } from "antd";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
import React, { useMemo, useState } from "react";
|
import React, { useMemo, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -119,7 +119,18 @@ export default function JobTotalsTableLabor({ job }) {
|
|||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<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">
|
<Table.Summary.Cell align="right">
|
||||||
<CurrencyFormatter>
|
<CurrencyFormatter>
|
||||||
{job.job_totals.rates.mapa.rate}
|
{job.job_totals.rates.mapa.rate}
|
||||||
@@ -133,7 +144,18 @@ export default function JobTotalsTableLabor({ job }) {
|
|||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
<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">
|
<Table.Summary.Cell align="right">
|
||||||
<CurrencyFormatter>
|
<CurrencyFormatter>
|
||||||
{job.job_totals.rates.mash.rate}
|
{job.job_totals.rates.mash.rate}
|
||||||
|
|||||||
@@ -58,6 +58,15 @@ export default function JobsAdminDatesChange({ job }) {
|
|||||||
>
|
>
|
||||||
<FormDatePicker format="MM/DD/YYYY" />
|
<FormDatePicker format="MM/DD/YYYY" />
|
||||||
</Form.Item>
|
</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">
|
<Form.Item label={t("jobs.fields.date_open")} name="date_open">
|
||||||
<DateTimePicker />
|
<DateTimePicker />
|
||||||
</Form.Item>
|
</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.
|
//Wahtever is left in the existing lines, are lines that should be removed.
|
||||||
|
|
||||||
const insertQueries = linesToInsert.reduce((acc, value, idx) => {
|
const insertQueries = linesToInsert.reduce((acc, value, idx) => {
|
||||||
return acc + generateInsertQuery(value, idx, jobId);
|
return acc + generateInsertQuery(value, idx, jobId);
|
||||||
}, "");
|
}, "");
|
||||||
@@ -49,6 +48,13 @@ export const GetSupplementDelta = async (client, jobId, newLines) => {
|
|||||||
const removeQueries = existingLines.reduce((acc, value, idx) => {
|
const removeQueries = existingLines.reduce((acc, value, idx) => {
|
||||||
return acc + generateRemoveQuery(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) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(gql`
|
resolve(gql`
|
||||||
|
|||||||
@@ -220,12 +220,13 @@ export function JobsAvailableContainer({
|
|||||||
);
|
);
|
||||||
|
|
||||||
delete supp.joblines;
|
delete supp.joblines;
|
||||||
await client.mutate({
|
if (suppDelta !== null) {
|
||||||
mutation: gql`
|
await client.mutate({
|
||||||
${suppDelta}
|
mutation: gql`
|
||||||
`,
|
${suppDelta}
|
||||||
});
|
`,
|
||||||
|
});
|
||||||
|
}
|
||||||
const updateResult = await updateJob({
|
const updateResult = await updateJob({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: selectedJob,
|
jobId: selectedJob,
|
||||||
|
|||||||
@@ -39,6 +39,12 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
|
|||||||
<Form.Item label={t("jobs.fields.date_open")} name="date_open">
|
<Form.Item label={t("jobs.fields.date_open")} name="date_open">
|
||||||
<DateTimePicker disabled={jobRO} />
|
<DateTimePicker disabled={jobRO} />
|
||||||
</Form.Item>
|
</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>
|
||||||
|
|
||||||
<FormRow header={t("jobs.forms.scheddates")}>
|
<FormRow header={t("jobs.forms.scheddates")}>
|
||||||
|
|||||||
@@ -401,6 +401,9 @@ export function JobsDetailHeaderActions({
|
|||||||
job: {
|
job: {
|
||||||
status: bodyshop.md_ro_statuses.default_void,
|
status: bodyshop.md_ro_statuses.default_void,
|
||||||
voided: true,
|
voided: true,
|
||||||
|
scheduled_in: null,
|
||||||
|
scheduled_completion: null,
|
||||||
|
inproduction: false,
|
||||||
},
|
},
|
||||||
note: [
|
note: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ export function JobNotesComponent({
|
|||||||
<EditFilled />
|
<EditFilled />
|
||||||
</Button>
|
</Button>
|
||||||
<PrintWrapperComponent
|
<PrintWrapperComponent
|
||||||
emailOnly
|
|
||||||
templateObject={{
|
templateObject={{
|
||||||
name: Templates.individual_job_note.key,
|
name: Templates.individual_job_note.key,
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,11 @@ 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";
|
||||||
const ProdTemplates = TemplateList("production");
|
const ProdTemplates = TemplateList("production");
|
||||||
const { production_by_technician_one, production_by_category_one } =
|
const {
|
||||||
TemplateList("special");
|
production_by_technician_one,
|
||||||
|
production_by_category_one,
|
||||||
|
production_by_repair_status_one,
|
||||||
|
} = TemplateList("special");
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -95,6 +98,29 @@ export function ProductionListPrint({ bodyshop }) {
|
|||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
))}
|
))}
|
||||||
</Menu.SubMenu>
|
</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>
|
</Menu>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -142,6 +142,18 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</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>
|
||||||
<LayoutFormRow header={t("bodyshop.labels.accountingsetup")}>
|
<LayoutFormRow header={t("bodyshop.labels.accountingsetup")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
@@ -595,6 +595,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
ca_gst_registrant
|
ca_gst_registrant
|
||||||
ownerid
|
ownerid
|
||||||
ded_note
|
ded_note
|
||||||
|
materials
|
||||||
owner {
|
owner {
|
||||||
id
|
id
|
||||||
ownr_fn
|
ownr_fn
|
||||||
@@ -649,6 +650,8 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
date_invoiced
|
date_invoiced
|
||||||
date_last_contacted
|
date_last_contacted
|
||||||
date_next_contact
|
date_next_contact
|
||||||
|
date_towin
|
||||||
|
date_rentalresp
|
||||||
date_exported
|
date_exported
|
||||||
status
|
status
|
||||||
owner_owing
|
owner_owing
|
||||||
@@ -1097,6 +1100,15 @@ export const VOID_JOB = gql`
|
|||||||
insert_notes(objects: $note) {
|
insert_notes(objects: $note) {
|
||||||
affected_rows
|
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"
|
"mash": "Job Costing - Shop Materials Hourly Cost Rate"
|
||||||
},
|
},
|
||||||
"lastnumberworkingdays": "Scoreboard - Last Number of Working Days",
|
"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": "Shop Logo",
|
||||||
"logo_img_path_height": "Logo Image Height",
|
"logo_img_path_height": "Logo Image Height",
|
||||||
"logo_img_path_width": "Logo Image Width",
|
"logo_img_path_width": "Logo Image Width",
|
||||||
@@ -1254,7 +1256,9 @@
|
|||||||
"date_last_contacted": "Last Contacted Date",
|
"date_last_contacted": "Last Contacted Date",
|
||||||
"date_next_contact": "Next Contact Date",
|
"date_next_contact": "Next Contact Date",
|
||||||
"date_open": "Open",
|
"date_open": "Open",
|
||||||
|
"date_rentalresp": "Shop Rental Responsibility Start",
|
||||||
"date_scheduled": "Scheduled",
|
"date_scheduled": "Scheduled",
|
||||||
|
"date_towin": "Towed In",
|
||||||
"ded_amt": "Deductible",
|
"ded_amt": "Deductible",
|
||||||
"ded_note": "Deductible Note",
|
"ded_note": "Deductible Note",
|
||||||
"ded_status": "Deductible Status",
|
"ded_status": "Deductible Status",
|
||||||
@@ -1602,6 +1606,7 @@
|
|||||||
"supplementnote": "The job had a supplement imported.",
|
"supplementnote": "The job had a supplement imported.",
|
||||||
"suspended": "SUSPENDED",
|
"suspended": "SUSPENDED",
|
||||||
"suspense": "Suspense",
|
"suspense": "Suspense",
|
||||||
|
"threshhold": "Max Threshold: ${{amount}}",
|
||||||
"total_cost": "Total Cost",
|
"total_cost": "Total Cost",
|
||||||
"total_cust_payable": "Total Customer Amount Payable",
|
"total_cust_payable": "Total Customer Amount Payable",
|
||||||
"total_repairs": "Total Repairs",
|
"total_repairs": "Total Repairs",
|
||||||
@@ -2281,6 +2286,7 @@
|
|||||||
"production_by_csr": "Production by CSR",
|
"production_by_csr": "Production by CSR",
|
||||||
"production_by_last_name": "Production by Last Name",
|
"production_by_last_name": "Production by Last Name",
|
||||||
"production_by_repair_status": "Production by Status",
|
"production_by_repair_status": "Production by Status",
|
||||||
|
"production_by_repair_status_one": "Production filtered by Status",
|
||||||
"production_by_ro": "Production by RO",
|
"production_by_ro": "Production by RO",
|
||||||
"production_by_target_date": "Production by Target Date",
|
"production_by_target_date": "Production by Target Date",
|
||||||
"production_by_technician": "Production by Technician",
|
"production_by_technician": "Production by Technician",
|
||||||
|
|||||||
@@ -275,6 +275,8 @@
|
|||||||
"mash": ""
|
"mash": ""
|
||||||
},
|
},
|
||||||
"lastnumberworkingdays": "",
|
"lastnumberworkingdays": "",
|
||||||
|
"logo_img_footer_margin": "",
|
||||||
|
"logo_img_header_margin": "",
|
||||||
"logo_img_path": "",
|
"logo_img_path": "",
|
||||||
"logo_img_path_height": "",
|
"logo_img_path_height": "",
|
||||||
"logo_img_path_width": "",
|
"logo_img_path_width": "",
|
||||||
@@ -1254,7 +1256,9 @@
|
|||||||
"date_last_contacted": "",
|
"date_last_contacted": "",
|
||||||
"date_next_contact": "",
|
"date_next_contact": "",
|
||||||
"date_open": "Abierto",
|
"date_open": "Abierto",
|
||||||
|
"date_rentalresp": "",
|
||||||
"date_scheduled": "Programado",
|
"date_scheduled": "Programado",
|
||||||
|
"date_towin": "",
|
||||||
"ded_amt": "Deducible",
|
"ded_amt": "Deducible",
|
||||||
"ded_note": "",
|
"ded_note": "",
|
||||||
"ded_status": "Estado deducible",
|
"ded_status": "Estado deducible",
|
||||||
@@ -1602,6 +1606,7 @@
|
|||||||
"supplementnote": "",
|
"supplementnote": "",
|
||||||
"suspended": "",
|
"suspended": "",
|
||||||
"suspense": "",
|
"suspense": "",
|
||||||
|
"threshhold": "",
|
||||||
"total_cost": "",
|
"total_cost": "",
|
||||||
"total_cust_payable": "",
|
"total_cust_payable": "",
|
||||||
"total_repairs": "",
|
"total_repairs": "",
|
||||||
@@ -2281,6 +2286,7 @@
|
|||||||
"production_by_csr": "",
|
"production_by_csr": "",
|
||||||
"production_by_last_name": "",
|
"production_by_last_name": "",
|
||||||
"production_by_repair_status": "",
|
"production_by_repair_status": "",
|
||||||
|
"production_by_repair_status_one": "",
|
||||||
"production_by_ro": "",
|
"production_by_ro": "",
|
||||||
"production_by_target_date": "",
|
"production_by_target_date": "",
|
||||||
"production_by_technician": "",
|
"production_by_technician": "",
|
||||||
|
|||||||
@@ -275,6 +275,8 @@
|
|||||||
"mash": ""
|
"mash": ""
|
||||||
},
|
},
|
||||||
"lastnumberworkingdays": "",
|
"lastnumberworkingdays": "",
|
||||||
|
"logo_img_footer_margin": "",
|
||||||
|
"logo_img_header_margin": "",
|
||||||
"logo_img_path": "",
|
"logo_img_path": "",
|
||||||
"logo_img_path_height": "",
|
"logo_img_path_height": "",
|
||||||
"logo_img_path_width": "",
|
"logo_img_path_width": "",
|
||||||
@@ -1254,7 +1256,9 @@
|
|||||||
"date_last_contacted": "",
|
"date_last_contacted": "",
|
||||||
"date_next_contact": "",
|
"date_next_contact": "",
|
||||||
"date_open": "Ouvrir",
|
"date_open": "Ouvrir",
|
||||||
|
"date_rentalresp": "",
|
||||||
"date_scheduled": "Prévu",
|
"date_scheduled": "Prévu",
|
||||||
|
"date_towin": "",
|
||||||
"ded_amt": "Déductible",
|
"ded_amt": "Déductible",
|
||||||
"ded_note": "",
|
"ded_note": "",
|
||||||
"ded_status": "Statut de franchise",
|
"ded_status": "Statut de franchise",
|
||||||
@@ -1602,6 +1606,7 @@
|
|||||||
"supplementnote": "",
|
"supplementnote": "",
|
||||||
"suspended": "",
|
"suspended": "",
|
||||||
"suspense": "",
|
"suspense": "",
|
||||||
|
"threshhold": "",
|
||||||
"total_cost": "",
|
"total_cost": "",
|
||||||
"total_cust_payable": "",
|
"total_cust_payable": "",
|
||||||
"total_repairs": "",
|
"total_repairs": "",
|
||||||
@@ -2281,6 +2286,7 @@
|
|||||||
"production_by_csr": "",
|
"production_by_csr": "",
|
||||||
"production_by_last_name": "",
|
"production_by_last_name": "",
|
||||||
"production_by_repair_status": "",
|
"production_by_repair_status": "",
|
||||||
|
"production_by_repair_status_one": "",
|
||||||
"production_by_ro": "",
|
"production_by_ro": "",
|
||||||
"production_by_target_date": "",
|
"production_by_target_date": "",
|
||||||
"production_by_technician": "",
|
"production_by_technician": "",
|
||||||
|
|||||||
@@ -1672,6 +1672,18 @@ export const TemplateList = (type, context) => {
|
|||||||
//idtype: "vendor",
|
//idtype: "vendor",
|
||||||
disabled: false,
|
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_last_contacted
|
||||||
- date_next_contact
|
- date_next_contact
|
||||||
- date_open
|
- date_open
|
||||||
|
- date_rentalresp
|
||||||
- date_scheduled
|
- date_scheduled
|
||||||
|
- date_towin
|
||||||
- ded_amt
|
- ded_amt
|
||||||
- ded_note
|
- ded_note
|
||||||
- ded_status
|
- ded_status
|
||||||
@@ -2804,6 +2806,7 @@
|
|||||||
- loss_desc
|
- loss_desc
|
||||||
- loss_of_use
|
- loss_of_use
|
||||||
- loss_type
|
- loss_type
|
||||||
|
- materials
|
||||||
- other_amount_payable
|
- other_amount_payable
|
||||||
- owner_owing
|
- owner_owing
|
||||||
- ownerid
|
- ownerid
|
||||||
@@ -2978,7 +2981,9 @@
|
|||||||
- date_last_contacted
|
- date_last_contacted
|
||||||
- date_next_contact
|
- date_next_contact
|
||||||
- date_open
|
- date_open
|
||||||
|
- date_rentalresp
|
||||||
- date_scheduled
|
- date_scheduled
|
||||||
|
- date_towin
|
||||||
- ded_amt
|
- ded_amt
|
||||||
- ded_note
|
- ded_note
|
||||||
- ded_status
|
- ded_status
|
||||||
@@ -3061,6 +3066,7 @@
|
|||||||
- loss_desc
|
- loss_desc
|
||||||
- loss_of_use
|
- loss_of_use
|
||||||
- loss_type
|
- loss_type
|
||||||
|
- materials
|
||||||
- other_amount_payable
|
- other_amount_payable
|
||||||
- owner_owing
|
- owner_owing
|
||||||
- ownerid
|
- ownerid
|
||||||
@@ -3245,7 +3251,9 @@
|
|||||||
- date_last_contacted
|
- date_last_contacted
|
||||||
- date_next_contact
|
- date_next_contact
|
||||||
- date_open
|
- date_open
|
||||||
|
- date_rentalresp
|
||||||
- date_scheduled
|
- date_scheduled
|
||||||
|
- date_towin
|
||||||
- ded_amt
|
- ded_amt
|
||||||
- ded_note
|
- ded_note
|
||||||
- ded_status
|
- ded_status
|
||||||
@@ -3328,6 +3336,7 @@
|
|||||||
- loss_desc
|
- loss_desc
|
||||||
- loss_of_use
|
- loss_of_use
|
||||||
- loss_type
|
- loss_type
|
||||||
|
- materials
|
||||||
- other_amount_payable
|
- other_amount_payable
|
||||||
- owner_owing
|
- owner_owing
|
||||||
- ownerid
|
- 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;
|
||||||
@@ -960,6 +960,7 @@ exports.GET_JOB_BY_PK = ` query GET_JOB_BY_PK($id: uuid!) {
|
|||||||
voided
|
voided
|
||||||
ca_bc_pvrt
|
ca_bc_pvrt
|
||||||
ca_customer_gst
|
ca_customer_gst
|
||||||
|
materials
|
||||||
joblines(where: { removed: { _eq: false } }){
|
joblines(where: { removed: { _eq: false } }){
|
||||||
id
|
id
|
||||||
line_no
|
line_no
|
||||||
|
|||||||
@@ -234,11 +234,30 @@ function CalculateRatesTotals(ratesList) {
|
|||||||
if (!ret[property].total) {
|
if (!ret[property].total) {
|
||||||
ret[property].total = Dinero();
|
ret[property].total = Dinero();
|
||||||
}
|
}
|
||||||
ret[property].total = ret[property].total.add(
|
let threshold;
|
||||||
Dinero({
|
//Check if there is a max for this type.
|
||||||
amount: Math.round((ret[property].rate || 0) * 100),
|
if (ratesList.materials[property]) {
|
||||||
}).multiply(ret[property].hours)
|
//
|
||||||
);
|
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);
|
subtotal = subtotal.add(ret[property].total);
|
||||||
@@ -252,6 +271,7 @@ function CalculateRatesTotals(ratesList) {
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
function CalculatePartsTotals(jobLines) {
|
function CalculatePartsTotals(jobLines) {
|
||||||
const ret = jobLines
|
const ret = jobLines
|
||||||
.filter((jl) => !jl.removed)
|
.filter((jl) => !jl.removed)
|
||||||
|
|||||||
Reference in New Issue
Block a user