IO-244 IOU Parts
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project be_version="2.7.1" version="1.2">
|
<babeledit_project version="1.2" be_version="2.7.1">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
@@ -1348,6 +1348,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>jobioucreated</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>jobmodifylbradj</name>
|
<name>jobmodifylbradj</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -2716,6 +2737,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>iouexists</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>local_tax</name>
|
<name>local_tax</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -17339,6 +17381,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ioucreated</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>new</name>
|
<name>new</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -17800,6 +17863,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>createiou</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>deliver</name>
|
<name>deliver</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -24763,6 +24847,27 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>createiouwarning</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>creating_new_job</name>
|
<name>creating_new_job</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -27098,6 +27203,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ioucreated</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>partsqueue</name>
|
<name>partsqueue</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { UploadOutlined } from "@ant-design/icons";
|
import Icon, { UploadOutlined } from "@ant-design/icons";
|
||||||
import { useApolloClient } from "@apollo/client";
|
import { useApolloClient } from "@apollo/client";
|
||||||
|
import { MdOpenInNew } from "react-icons/md";
|
||||||
import {
|
import {
|
||||||
|
Alert,
|
||||||
Divider,
|
Divider,
|
||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
@@ -13,6 +15,7 @@ import {
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { CHECK_BILL_INVOICE_NUMBER } from "../../graphql/bills.queries";
|
import { CHECK_BILL_INVOICE_NUMBER } from "../../graphql/bills.queries";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
@@ -132,6 +135,30 @@ export function BillFormComponent({
|
|||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
{job &&
|
||||||
|
job.ious &&
|
||||||
|
job.ious.length > 0 &&
|
||||||
|
job.ious.map((iou) => (
|
||||||
|
<Alert
|
||||||
|
key={iou.id}
|
||||||
|
type="warning"
|
||||||
|
message={
|
||||||
|
<Space>
|
||||||
|
{t("bills.labels.iouexists")}
|
||||||
|
<Link
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
to={`/manage/jobs/${iou.id}?tab=repairdata`}
|
||||||
|
>
|
||||||
|
<Space>
|
||||||
|
{iou.ro_number}
|
||||||
|
<Icon component={MdOpenInNew} />
|
||||||
|
</Space>
|
||||||
|
</Link>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bills.fields.invoice_number")}
|
label={t("bills.fields.invoice_number")}
|
||||||
@@ -337,6 +364,7 @@ export function BillFormComponent({
|
|||||||
responsibilityCenters={responsibilityCenters}
|
responsibilityCenters={responsibilityCenters}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="upload"
|
name="upload"
|
||||||
label="Upload"
|
label="Upload"
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
import { useApolloClient } from "@apollo/client";
|
||||||
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
import { Button, notification, Popconfirm } from "antd";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { useHistory } from "react-router";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { UPDATE_JOB_LINES_IOU } from "../../graphql/jobs-lines.queries";
|
||||||
|
import {
|
||||||
|
selectBodyshop,
|
||||||
|
selectCurrentUser,
|
||||||
|
} from "../../redux/user/user.selectors";
|
||||||
|
import { CreateIouForJob } from "../jobs-detail-header-actions/jobs-detail-header-actions.duplicate.util";
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
bodyshop: selectBodyshop,
|
||||||
|
currentUser: selectCurrentUser,
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
|
});
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(JobCreateIOU);
|
||||||
|
|
||||||
|
export function JobCreateIOU({
|
||||||
|
bodyshop,
|
||||||
|
currentUser,
|
||||||
|
jobid,
|
||||||
|
selectedJobLines,
|
||||||
|
}) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const client = useApolloClient();
|
||||||
|
const history = useHistory();
|
||||||
|
|
||||||
|
const { IOU_Tracking } = useTreatments(
|
||||||
|
["IOU_Tracking"],
|
||||||
|
{},
|
||||||
|
bodyshop.imexshopid
|
||||||
|
);
|
||||||
|
if (IOU_Tracking.treatment !== "on") return null;
|
||||||
|
|
||||||
|
const handleCreateIou = async () => {
|
||||||
|
setLoading(true);
|
||||||
|
//Query all of the job details to recreate.
|
||||||
|
const iouId = await CreateIouForJob(
|
||||||
|
client,
|
||||||
|
jobid,
|
||||||
|
{
|
||||||
|
status: bodyshop.md_ro_statuses.default_open,
|
||||||
|
bodyshopid: bodyshop.id,
|
||||||
|
useremail: currentUser.email,
|
||||||
|
},
|
||||||
|
selectedJobLines
|
||||||
|
);
|
||||||
|
notification.open({
|
||||||
|
type: "success",
|
||||||
|
message: t("jobs.successes.ioucreated"),
|
||||||
|
onClick: () => history.push(`/manage/jobs/${iouId}`),
|
||||||
|
});
|
||||||
|
const selectedJobLinesIds = selectedJobLines.map((l) => l.id);
|
||||||
|
await client.mutate({
|
||||||
|
mutation: UPDATE_JOB_LINES_IOU,
|
||||||
|
variables: { ids: selectedJobLinesIds },
|
||||||
|
update(cache) {
|
||||||
|
cache.modify({
|
||||||
|
id: cache.identify(jobid),
|
||||||
|
fields: {
|
||||||
|
joblines(existingJobLines, { readField }) {
|
||||||
|
return existingJobLines.map((a) => {
|
||||||
|
if (!selectedJobLinesIds.includes(a.id)) return a;
|
||||||
|
return { ...a, ioucreated: true };
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Popconfirm
|
||||||
|
title={t("jobs.labels.createiouwarning")}
|
||||||
|
onConfirm={handleCreateIou}
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
loading={loading}
|
||||||
|
disabled={!selectedJobLines || selectedJobLines.length === 0}
|
||||||
|
>
|
||||||
|
{t("jobs.actions.createiou")}
|
||||||
|
</Button>
|
||||||
|
</Popconfirm>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -37,6 +37,7 @@ import JobLinesBillRefernece from "../job-lines-bill-reference/job-lines-bill-re
|
|||||||
// import AllocationsEmployeeLabelContainer from "../allocations-employee-label/allocations-employee-label.container";
|
// import AllocationsEmployeeLabelContainer from "../allocations-employee-label/allocations-employee-label.container";
|
||||||
import PartsOrderModalContainer from "../parts-order-modal/parts-order-modal.container";
|
import PartsOrderModalContainer from "../parts-order-modal/parts-order-modal.container";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import JobCreateIOU from "../job-create-iou/job-create-iou.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -427,6 +428,7 @@ export function JobLinesComponent({
|
|||||||
>
|
>
|
||||||
{t("joblines.actions.new")}
|
{t("joblines.actions.new")}
|
||||||
</Button>
|
</Button>
|
||||||
|
<JobCreateIOU jobid={job.id} selectedJobLines={selectedLines} />
|
||||||
<Input.Search
|
<Input.Search
|
||||||
placeholder={t("general.labels.search")}
|
placeholder={t("general.labels.search")}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { Input, notification } from "antd";
|
import { Input, notification, Space } from "antd";
|
||||||
|
import { FieldTimeOutlined } from "@ant-design/icons";
|
||||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { UPDATE_JOB_LINE } from "../../graphql/jobs-lines.queries";
|
import { UPDATE_JOB_LINE } from "../../graphql/jobs-lines.queries";
|
||||||
@@ -59,6 +60,12 @@ export default function JobLineNotePopup({ jobline, disabled }) {
|
|||||||
style={{ width: "100%", minHeight: "2rem", cursor: "pointer" }}
|
style={{ width: "100%", minHeight: "2rem", cursor: "pointer" }}
|
||||||
onClick={() => !disabled && setEditing(true)}
|
onClick={() => !disabled && setEditing(true)}
|
||||||
>
|
>
|
||||||
|
{jobline.ioucreated && (
|
||||||
|
<Space>
|
||||||
|
<FieldTimeOutlined />
|
||||||
|
{t("joblines.labels.ioucreated")}
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
{jobline.notes}
|
{jobline.notes}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import Axios from "axios";
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { INSERT_NEW_JOB, QUERY_JOB_FOR_DUPE } from "../../graphql/jobs.queries";
|
import { INSERT_NEW_JOB, QUERY_JOB_FOR_DUPE } from "../../graphql/jobs.queries";
|
||||||
|
import moment from "moment";
|
||||||
|
import i18n from "i18next";
|
||||||
|
|
||||||
export default async function DuplicateJob(
|
export default async function DuplicateJob(
|
||||||
apolloClient,
|
apolloClient,
|
||||||
@@ -57,3 +59,71 @@ export default async function DuplicateJob(
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function CreateIouForJob(
|
||||||
|
apolloClient,
|
||||||
|
jobId,
|
||||||
|
config,
|
||||||
|
jobLinesToKeep
|
||||||
|
) {
|
||||||
|
logImEXEvent("job_create_iou");
|
||||||
|
|
||||||
|
const { status } = config;
|
||||||
|
//get a list of all fields on the job
|
||||||
|
const res = await apolloClient.query({
|
||||||
|
query: QUERY_JOB_FOR_DUPE,
|
||||||
|
variables: { id: jobId },
|
||||||
|
});
|
||||||
|
|
||||||
|
const { jobs_by_pk } = res.data;
|
||||||
|
const existingJob = _.cloneDeep(jobs_by_pk);
|
||||||
|
delete existingJob.__typename;
|
||||||
|
delete existingJob.id;
|
||||||
|
delete existingJob.createdat;
|
||||||
|
delete existingJob.updatedat;
|
||||||
|
|
||||||
|
const newJob = {
|
||||||
|
...existingJob,
|
||||||
|
|
||||||
|
converted: true,
|
||||||
|
status: status,
|
||||||
|
iouparent: jobId,
|
||||||
|
date_open: moment(),
|
||||||
|
audit_trails: {
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
useremail: config.useremail,
|
||||||
|
bodyshopid: config.bodyshopid,
|
||||||
|
operation: i18n.t("audit_trail.messages.jobioucreated"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectedJoblinesIds = jobLinesToKeep.map((l) => l.id);
|
||||||
|
|
||||||
|
const _tempLines = _.cloneDeep(existingJob.joblines).filter((l) =>
|
||||||
|
selectedJoblinesIds.includes(l.id)
|
||||||
|
);
|
||||||
|
_tempLines.forEach((line) => {
|
||||||
|
delete line.id;
|
||||||
|
delete line.__typename;
|
||||||
|
line.manual_line = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
delete newJob.joblines;
|
||||||
|
newJob.joblines = { data: _tempLines };
|
||||||
|
|
||||||
|
const res2 = await apolloClient.mutate({
|
||||||
|
mutation: INSERT_NEW_JOB,
|
||||||
|
variables: { job: [newJob] },
|
||||||
|
});
|
||||||
|
|
||||||
|
Axios.post("/job/totalsssu", {
|
||||||
|
id: res2.data.insert_jobs.returning[0].id,
|
||||||
|
});
|
||||||
|
|
||||||
|
//insert the new job. call the callback with the returned ID when done.
|
||||||
|
|
||||||
|
return res2.data.insert_jobs.returning[0].id;
|
||||||
|
}
|
||||||
|
|||||||
@@ -179,6 +179,10 @@ export const GET_JOB_LINES_TO_ENTER_BILL = gql`
|
|||||||
jobs_by_pk(id: $id) {
|
jobs_by_pk(id: $id) {
|
||||||
id
|
id
|
||||||
status
|
status
|
||||||
|
ious {
|
||||||
|
id
|
||||||
|
ro_number
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -226,3 +230,14 @@ export const DELETE_JOB_LINE_BY_PK = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const UPDATE_JOB_LINES_IOU = gql`
|
||||||
|
mutation UPDATE_JOB_LINES_IOU($ids: [uuid!]!) {
|
||||||
|
update_joblines(where: { id: { _in: $ids } }, _set: { ioucreated: true }) {
|
||||||
|
returning {
|
||||||
|
ioucreated
|
||||||
|
id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
@@ -529,6 +529,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
manual_line
|
manual_line
|
||||||
prt_dsmk_p
|
prt_dsmk_p
|
||||||
prt_dsmk_m
|
prt_dsmk_m
|
||||||
|
ioucreated
|
||||||
billlines(limit: 1, order_by: { bill: { date: desc } }) {
|
billlines(limit: 1, order_by: { bill: { date: desc } }) {
|
||||||
id
|
id
|
||||||
quantity
|
quantity
|
||||||
@@ -1253,9 +1254,7 @@ export const QUERY_JOB_FOR_DUPE = gql`
|
|||||||
servicing_dealer
|
servicing_dealer
|
||||||
servicing_dealer_contact
|
servicing_dealer_contact
|
||||||
shopid
|
shopid
|
||||||
|
|
||||||
state_tax_rate
|
state_tax_rate
|
||||||
|
|
||||||
tax_lbr_rt
|
tax_lbr_rt
|
||||||
tax_levies_rt
|
tax_levies_rt
|
||||||
tax_paint_mat_rt
|
tax_paint_mat_rt
|
||||||
@@ -1320,9 +1319,19 @@ export const QUERY_JOB_FOR_DUPE = gql`
|
|||||||
tax_part
|
tax_part
|
||||||
unq_seq
|
unq_seq
|
||||||
manual_line
|
manual_line
|
||||||
|
notes
|
||||||
|
line_no
|
||||||
|
tran_code
|
||||||
}
|
}
|
||||||
driveable
|
driveable
|
||||||
towin
|
towin
|
||||||
|
adj_g_disc
|
||||||
|
adj_strdis
|
||||||
|
adj_towdis
|
||||||
|
ca_gst_registrant
|
||||||
|
special_coverage_policy
|
||||||
|
tax_registration_number
|
||||||
|
tax_shop_mat_rt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
"jobfieldchanged": "Job field $t(jobs.fields.{{field}}) changed to {{value}}.",
|
"jobfieldchanged": "Job field $t(jobs.fields.{{field}}) changed to {{value}}.",
|
||||||
"jobimported": "Job imported.",
|
"jobimported": "Job imported.",
|
||||||
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
||||||
|
"jobioucreated": "IOU Created.",
|
||||||
"jobmodifylbradj": "Labor adjustments modified.",
|
"jobmodifylbradj": "Labor adjustments modified.",
|
||||||
"jobnoteadded": "Note added to job.",
|
"jobnoteadded": "Note added to job.",
|
||||||
"jobnotedeleted": "Note deleted from job.",
|
"jobnotedeleted": "Note deleted from job.",
|
||||||
@@ -176,6 +177,7 @@
|
|||||||
"entered_total": "Total of Entered Lines",
|
"entered_total": "Total of Entered Lines",
|
||||||
"enteringcreditmemo": "You are entering a credit memo. Please ensure you are also entering positive values.",
|
"enteringcreditmemo": "You are entering a credit memo. Please ensure you are also entering positive values.",
|
||||||
"federal_tax": "Federal Tax",
|
"federal_tax": "Federal Tax",
|
||||||
|
"iouexists": "An IOU exists that is associated to this RO.",
|
||||||
"local_tax": "Local Tax",
|
"local_tax": "Local Tax",
|
||||||
"markforreexport": "Mark for Re-export",
|
"markforreexport": "Mark for Re-export",
|
||||||
"new": "New Bill",
|
"new": "New Bill",
|
||||||
@@ -1082,6 +1084,7 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"billref": "Latest Bill",
|
"billref": "Latest Bill",
|
||||||
"edit": "Edit Line",
|
"edit": "Edit Line",
|
||||||
|
"ioucreated": "IOU",
|
||||||
"new": "New Line",
|
"new": "New Line",
|
||||||
"nostatus": "No Status",
|
"nostatus": "No Status",
|
||||||
"presets": "Jobline Presets"
|
"presets": "Jobline Presets"
|
||||||
@@ -1111,6 +1114,7 @@
|
|||||||
"changestatus": "Change Status",
|
"changestatus": "Change Status",
|
||||||
"changestimator": "Change Estimator",
|
"changestimator": "Change Estimator",
|
||||||
"convert": "Convert",
|
"convert": "Convert",
|
||||||
|
"createiou": "Create IOU",
|
||||||
"deliver": "Deliver",
|
"deliver": "Deliver",
|
||||||
"dms": {
|
"dms": {
|
||||||
"addpayer": "Add Payer",
|
"addpayer": "Add Payer",
|
||||||
@@ -1469,6 +1473,7 @@
|
|||||||
"ownerinfo": "Owner Info",
|
"ownerinfo": "Owner Info",
|
||||||
"vehicleinfo": "Vehicle Info"
|
"vehicleinfo": "Vehicle Info"
|
||||||
},
|
},
|
||||||
|
"createiouwarning": "Are you sure you want to create an IOU for these lines? A new RO will be created based on those lines for this customer.",
|
||||||
"creating_new_job": "Creating new job...",
|
"creating_new_job": "Creating new job...",
|
||||||
"deductible": {
|
"deductible": {
|
||||||
"stands": "Stands",
|
"stands": "Stands",
|
||||||
@@ -1589,6 +1594,7 @@
|
|||||||
"duplicated": "Job duplicated successfully. ",
|
"duplicated": "Job duplicated successfully. ",
|
||||||
"exported": "Job(s) exported successfully. ",
|
"exported": "Job(s) exported successfully. ",
|
||||||
"invoiced": "Job closed and invoiced successfully.",
|
"invoiced": "Job closed and invoiced successfully.",
|
||||||
|
"ioucreated": "IOU created successfully. Click to see.",
|
||||||
"partsqueue": "Job added to parts queue.",
|
"partsqueue": "Job added to parts queue.",
|
||||||
"save": "Job saved successfully.",
|
"save": "Job saved successfully.",
|
||||||
"savetitle": "Record saved successfully.",
|
"savetitle": "Record saved successfully.",
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
"jobfieldchanged": "",
|
"jobfieldchanged": "",
|
||||||
"jobimported": "",
|
"jobimported": "",
|
||||||
"jobinproductionchange": "",
|
"jobinproductionchange": "",
|
||||||
|
"jobioucreated": "",
|
||||||
"jobmodifylbradj": "",
|
"jobmodifylbradj": "",
|
||||||
"jobnoteadded": "",
|
"jobnoteadded": "",
|
||||||
"jobnotedeleted": "",
|
"jobnotedeleted": "",
|
||||||
@@ -176,6 +177,7 @@
|
|||||||
"entered_total": "",
|
"entered_total": "",
|
||||||
"enteringcreditmemo": "",
|
"enteringcreditmemo": "",
|
||||||
"federal_tax": "",
|
"federal_tax": "",
|
||||||
|
"iouexists": "",
|
||||||
"local_tax": "",
|
"local_tax": "",
|
||||||
"markforreexport": "",
|
"markforreexport": "",
|
||||||
"new": "",
|
"new": "",
|
||||||
@@ -1082,6 +1084,7 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"billref": "",
|
"billref": "",
|
||||||
"edit": "Línea de edición",
|
"edit": "Línea de edición",
|
||||||
|
"ioucreated": "",
|
||||||
"new": "Nueva línea",
|
"new": "Nueva línea",
|
||||||
"nostatus": "",
|
"nostatus": "",
|
||||||
"presets": ""
|
"presets": ""
|
||||||
@@ -1111,6 +1114,7 @@
|
|||||||
"changestatus": "Cambiar Estado",
|
"changestatus": "Cambiar Estado",
|
||||||
"changestimator": "",
|
"changestimator": "",
|
||||||
"convert": "Convertir",
|
"convert": "Convertir",
|
||||||
|
"createiou": "",
|
||||||
"deliver": "",
|
"deliver": "",
|
||||||
"dms": {
|
"dms": {
|
||||||
"addpayer": "",
|
"addpayer": "",
|
||||||
@@ -1469,6 +1473,7 @@
|
|||||||
"ownerinfo": "",
|
"ownerinfo": "",
|
||||||
"vehicleinfo": ""
|
"vehicleinfo": ""
|
||||||
},
|
},
|
||||||
|
"createiouwarning": "",
|
||||||
"creating_new_job": "Creando nuevo trabajo ...",
|
"creating_new_job": "Creando nuevo trabajo ...",
|
||||||
"deductible": {
|
"deductible": {
|
||||||
"stands": "",
|
"stands": "",
|
||||||
@@ -1589,6 +1594,7 @@
|
|||||||
"duplicated": "",
|
"duplicated": "",
|
||||||
"exported": "",
|
"exported": "",
|
||||||
"invoiced": "",
|
"invoiced": "",
|
||||||
|
"ioucreated": "",
|
||||||
"partsqueue": "",
|
"partsqueue": "",
|
||||||
"save": "Trabajo guardado con éxito.",
|
"save": "Trabajo guardado con éxito.",
|
||||||
"savetitle": "Registro guardado con éxito.",
|
"savetitle": "Registro guardado con éxito.",
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
"jobfieldchanged": "",
|
"jobfieldchanged": "",
|
||||||
"jobimported": "",
|
"jobimported": "",
|
||||||
"jobinproductionchange": "",
|
"jobinproductionchange": "",
|
||||||
|
"jobioucreated": "",
|
||||||
"jobmodifylbradj": "",
|
"jobmodifylbradj": "",
|
||||||
"jobnoteadded": "",
|
"jobnoteadded": "",
|
||||||
"jobnotedeleted": "",
|
"jobnotedeleted": "",
|
||||||
@@ -176,6 +177,7 @@
|
|||||||
"entered_total": "",
|
"entered_total": "",
|
||||||
"enteringcreditmemo": "",
|
"enteringcreditmemo": "",
|
||||||
"federal_tax": "",
|
"federal_tax": "",
|
||||||
|
"iouexists": "",
|
||||||
"local_tax": "",
|
"local_tax": "",
|
||||||
"markforreexport": "",
|
"markforreexport": "",
|
||||||
"new": "",
|
"new": "",
|
||||||
@@ -1082,6 +1084,7 @@
|
|||||||
"labels": {
|
"labels": {
|
||||||
"billref": "",
|
"billref": "",
|
||||||
"edit": "Ligne d'édition",
|
"edit": "Ligne d'édition",
|
||||||
|
"ioucreated": "",
|
||||||
"new": "Nouvelle ligne",
|
"new": "Nouvelle ligne",
|
||||||
"nostatus": "",
|
"nostatus": "",
|
||||||
"presets": ""
|
"presets": ""
|
||||||
@@ -1111,6 +1114,7 @@
|
|||||||
"changestatus": "Changer le statut",
|
"changestatus": "Changer le statut",
|
||||||
"changestimator": "",
|
"changestimator": "",
|
||||||
"convert": "Convertir",
|
"convert": "Convertir",
|
||||||
|
"createiou": "",
|
||||||
"deliver": "",
|
"deliver": "",
|
||||||
"dms": {
|
"dms": {
|
||||||
"addpayer": "",
|
"addpayer": "",
|
||||||
@@ -1469,6 +1473,7 @@
|
|||||||
"ownerinfo": "",
|
"ownerinfo": "",
|
||||||
"vehicleinfo": ""
|
"vehicleinfo": ""
|
||||||
},
|
},
|
||||||
|
"createiouwarning": "",
|
||||||
"creating_new_job": "Création d'un nouvel emploi ...",
|
"creating_new_job": "Création d'un nouvel emploi ...",
|
||||||
"deductible": {
|
"deductible": {
|
||||||
"stands": "",
|
"stands": "",
|
||||||
@@ -1589,6 +1594,7 @@
|
|||||||
"duplicated": "",
|
"duplicated": "",
|
||||||
"exported": "",
|
"exported": "",
|
||||||
"invoiced": "",
|
"invoiced": "",
|
||||||
|
"ioucreated": "",
|
||||||
"partsqueue": "",
|
"partsqueue": "",
|
||||||
"save": "Le travail a été enregistré avec succès.",
|
"save": "Le travail a été enregistré avec succès.",
|
||||||
"savetitle": "Enregistrement enregistré avec succès.",
|
"savetitle": "Enregistrement enregistré avec succès.",
|
||||||
|
|||||||
@@ -2123,6 +2123,7 @@
|
|||||||
- est_seq
|
- est_seq
|
||||||
- glass_flag
|
- glass_flag
|
||||||
- id
|
- id
|
||||||
|
- ioucreated
|
||||||
- jobid
|
- jobid
|
||||||
- lbr_amt
|
- lbr_amt
|
||||||
- lbr_hrs_j
|
- lbr_hrs_j
|
||||||
@@ -2185,6 +2186,7 @@
|
|||||||
- est_seq
|
- est_seq
|
||||||
- glass_flag
|
- glass_flag
|
||||||
- id
|
- id
|
||||||
|
- ioucreated
|
||||||
- jobid
|
- jobid
|
||||||
- lbr_amt
|
- lbr_amt
|
||||||
- lbr_hrs_j
|
- lbr_hrs_j
|
||||||
@@ -2258,6 +2260,7 @@
|
|||||||
- est_seq
|
- est_seq
|
||||||
- glass_flag
|
- glass_flag
|
||||||
- id
|
- id
|
||||||
|
- ioucreated
|
||||||
- jobid
|
- jobid
|
||||||
- lbr_amt
|
- lbr_amt
|
||||||
- lbr_hrs_j
|
- lbr_hrs_j
|
||||||
@@ -2390,6 +2393,9 @@
|
|||||||
- name: employee_refinish_rel
|
- name: employee_refinish_rel
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on: employee_refinish
|
foreign_key_constraint_on: employee_refinish
|
||||||
|
- name: iouparent_rel
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: iouparent
|
||||||
- name: owner
|
- name: owner
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on: ownerid
|
foreign_key_constraint_on: ownerid
|
||||||
@@ -2453,6 +2459,13 @@
|
|||||||
table:
|
table:
|
||||||
schema: public
|
schema: public
|
||||||
name: exportlog
|
name: exportlog
|
||||||
|
- name: ious
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: iouparent
|
||||||
|
table:
|
||||||
|
schema: public
|
||||||
|
name: jobs
|
||||||
- name: job_conversations
|
- name: job_conversations
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on:
|
foreign_key_constraint_on:
|
||||||
@@ -2678,6 +2691,7 @@
|
|||||||
- intakechecklist
|
- intakechecklist
|
||||||
- invoice_allocation
|
- invoice_allocation
|
||||||
- invoice_date
|
- invoice_date
|
||||||
|
- iouparent
|
||||||
- job_totals
|
- job_totals
|
||||||
- kanbanparent
|
- kanbanparent
|
||||||
- kmin
|
- kmin
|
||||||
@@ -2931,6 +2945,7 @@
|
|||||||
- intakechecklist
|
- intakechecklist
|
||||||
- invoice_allocation
|
- invoice_allocation
|
||||||
- invoice_date
|
- invoice_date
|
||||||
|
- iouparent
|
||||||
- job_totals
|
- job_totals
|
||||||
- kanbanparent
|
- kanbanparent
|
||||||
- kmin
|
- kmin
|
||||||
@@ -3194,6 +3209,7 @@
|
|||||||
- intakechecklist
|
- intakechecklist
|
||||||
- invoice_allocation
|
- invoice_allocation
|
||||||
- invoice_date
|
- invoice_date
|
||||||
|
- iouparent
|
||||||
- job_totals
|
- job_totals
|
||||||
- kanbanparent
|
- kanbanparent
|
||||||
- kmin
|
- kmin
|
||||||
|
|||||||
@@ -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 "iouparent" uuid
|
||||||
|
-- null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."jobs" add column "iouparent" uuid
|
||||||
|
null;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."jobs" drop constraint "jobs_iouparent_fkey";
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
alter table "public"."jobs"
|
||||||
|
add constraint "jobs_iouparent_fkey"
|
||||||
|
foreign key ("iouparent")
|
||||||
|
references "public"."jobs"
|
||||||
|
("id") on update set null on delete set null;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "jobs_idx_iouparent";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "jobs_idx_iouparent" on
|
||||||
|
"public"."jobs" using btree ("iouparent");
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."joblines" add column "ioucreated" boolean
|
||||||
|
-- not null default 'false';
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."joblines" add column "ioucreated" boolean
|
||||||
|
not null default 'false';
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."joblines" add column "iou" boolean
|
||||||
|
-- not null default 'false';
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."joblines" add column "iou" boolean
|
||||||
|
not null default 'false';
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
alter table "public"."joblines" alter column "iou" set default false;
|
||||||
|
alter table "public"."joblines" alter column "iou" drop not null;
|
||||||
|
alter table "public"."joblines" add column "iou" bool;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."joblines" drop column "iou" cascade;
|
||||||
Reference in New Issue
Block a user