Compare commits

..

1 Commits

Author SHA1 Message Date
Allan Carr
4dd868130c IO-2341 Jobs Schedule Completion Report 2023-06-21 08:31:30 -07:00
9 changed files with 51 additions and 46 deletions

View File

@@ -187,9 +187,8 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
<Form.Item
name="dms_unsold"
label={t("jobs.fields.dms.dms_unsold")}
initialValue={false}
>
<Switch />
<Switch defaultChecked={false} />
</Form.Item>
</Space>
</div>

View File

@@ -45,8 +45,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(DmsContainer);
export const socket = SocketIO(
process.env.NODE_ENV === "production"
? process.env.REACT_APP_AXIOS_BASE_API_URL
: window.location.origin,
// "http://localhost:4000", // for dev testing,
: window.location.origin, //"http://localhost:4000" for dev testing,
{
path: "/ws",
withCredentials: true,

View File

@@ -2568,6 +2568,7 @@
"job_costing_ro_ins_co": "Job Costing by RO Source",
"jobs_completed_not_invoiced": "Jobs Completed not Invoiced",
"jobs_invoiced_not_exported": "Jobs Invoiced not Exported",
"jobs_scheduled_completion": "Jobs Scheduled Completion",
"jobs_reconcile": "Parts/Sublet/Labor Reconciliation",
"lag_time": "Lag Time",
"open_orders": "Open Orders by Date",

View File

@@ -2565,6 +2565,7 @@
"job_costing_ro_ins_co": "",
"jobs_completed_not_invoiced": "",
"jobs_invoiced_not_exported": "",
"jobs_scheduled_completion": "",
"jobs_reconcile": "",
"lag_time": "",
"open_orders": "",

View File

@@ -2565,6 +2565,7 @@
"job_costing_ro_ins_co": "",
"jobs_completed_not_invoiced": "",
"jobs_invoiced_not_exported": "",
"jobs_scheduled_completion": "",
"jobs_reconcile": "",
"lag_time": "",
"open_orders": "",

View File

@@ -1897,6 +1897,18 @@ export const TemplateList = (type, context) => {
},
group: "sales",
},
jobs_scheduled_completion: {
title: i18n.t("reportcenter.templates.jobs_scheduled_completion"),
subject: i18n.t("reportcenter.templates.jobs_scheduled_completion"),
key: "jobs_scheduled_completion",
//idtype: "vendor",
disabled: false,
rangeFilter: {
object: i18n.t("reportcenter.labels.objects.jobs"),
field: i18n.t("jobs.fields.scheduled_completion"),
},
group: "jobs",
},
}
: {}),
...(!type || type === "courtesycarcontract"

View File

@@ -262,10 +262,10 @@ const generateInvoiceQbxml = (
RefNumber: jobs_by_pk.ro_number,
BillAddress: {
Addr1: jobs_by_pk.ownr_co_nm
? jobs_by_pk.ownr_co_nm.substring(0, 30).trim()
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
.substring(0, 30)
.trim()}`,
? jobs_by_pk.ownr_co_nm.substring(0, 30)
: `${`${jobs_by_pk.ownr_ln || ""} ${
jobs_by_pk.ownr_fn || ""
}`.substring(0, 30)}`,
Addr2: jobs_by_pk.ownr_addr1,
Addr3: jobs_by_pk.ownr_addr2,
City: jobs_by_pk.ownr_city,
@@ -274,10 +274,10 @@ const generateInvoiceQbxml = (
},
ShipAddress: {
Addr1: jobs_by_pk.ownr_co_nm
? jobs_by_pk.ownr_co_nm.substring(0, 30).trim()
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
.substring(0, 30)
.trim()}`,
? jobs_by_pk.ownr_co_nm.substring(0, 30)
: `${`${jobs_by_pk.ownr_ln || ""} ${
jobs_by_pk.ownr_fn || ""
}`.substring(0, 30)}`,
Addr2: jobs_by_pk.ownr_addr1,
Addr3: jobs_by_pk.ownr_addr2,
City: jobs_by_pk.ownr_city,

View File

@@ -21,9 +21,9 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${
jobs_by_pk.owner.accountingid || ""
}`
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
.substring(0, 30)
.trim()} #${jobs_by_pk.owner.accountingid || ""}`
: `${`${jobs_by_pk.ownr_ln || ""} ${
jobs_by_pk.ownr_fn || ""
}`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`
)
.trim()
.replace(":", " ");
@@ -39,9 +39,9 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${
jobs_by_pk.owner.accountingid || ""
}`
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
.substring(0, 30)
.trim()} #${jobs_by_pk.owner.accountingid || ""}`
: `${`${jobs_by_pk.ownr_ln || ""} ${
jobs_by_pk.ownr_fn || ""
}`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`
)
.trim()
.replace(":", " ");

View File

@@ -717,24 +717,22 @@ async function InsertDmsVehicle(socket) {
dealer: {
dealerNumber: socket.JobData.bodyshop.cdk_dealerid,
...(socket.txEnvelope.inservicedate && {
inServiceDate:
socket.txEnvelope.dms_unsold === true
? ""
: moment(socket.txEnvelope.inservicedate)
//.tz(socket.JobData.bodyshop.timezone)
.startOf("day")
.toISOString(),
inServiceDate: socket.txEnvelope.dms_unsold === true
? ""
: moment(socket.txEnvelope.inservicedate)
//.tz(socket.JobData.bodyshop.timezone)
.startOf("day")
.toISOString(),
}),
vehicleId: socket.DMSVid.vehiclesVehId,
},
manufacturer: {},
vehicle: {
deliveryDate:
socket.txEnvelope.dms_unsold === true
? ""
: moment()
// .tz(socket.JobData.bodyshop.timezone)
.format("YYYYMMDD"),
deliveryDate: socket.txEnvelope.dms_unsold === true
? ""
: moment()
// .tz(socket.JobData.bodyshop.timezone)
.format("YYYYMMDD"),
licensePlateNo:
socket.JobData.plate_no === null
? null
@@ -866,25 +864,19 @@ async function UpdateDmsVehicle(socket) {
...socket.DMSVeh.dealer,
...((socket.txEnvelope.inservicedate ||
socket.DMSVeh.dealer.inServiceDate) && {
inServiceDate:
socket.txEnvelope.dms_unsold === true
? ""
: moment(
socket.DMSVeh.dealer.inServiceDate ||
socket.txEnvelope.inservicedate
)
// .tz(socket.JobData.bodyshop.timezone)
.toISOString(),
inServiceDate: moment(
socket.DMSVeh.dealer.inServiceDate ||
socket.txEnvelope.inservicedate
)
// .tz(socket.JobData.bodyshop.timezone)
.toISOString(),
}),
},
vehicle: {
...socket.DMSVeh.vehicle,
deliveryDate:
socket.txEnvelope.dms_unsold === true
? ""
: moment(socket.DMSVeh.vehicle.deliveryDate)
//.tz(socket.JobData.bodyshop.timezone)
.toISOString(),
deliveryDate: moment(socket.DMSVeh.vehicle.deliveryDate)
//.tz(socket.JobData.bodyshop.timezone)
.toISOString(),
},
owners: ids,
},