Compare commits

...

7 Commits

Author SHA1 Message Date
Allan Carr
b967bb6d4e IO-2342 Trim Comany Name after SubString 2023-06-29 10:45:52 -07:00
Allan Carr
39aa21d985 IO-2342 Billing and Shipping Addr1 Trim 2023-06-29 09:58:20 -07:00
Allan Carr
6de06e084b IO-2342 QBD Owner Name with just LN Trim
Removes extra space if there is just a OWNR_LN before the ACCT #
2023-06-23 08:53:14 -07:00
Allan Carr
cb49c91983 Merged in test (pull request #871)
IO-2340 CDK New Unsold Vehicle adjustments
2023-06-23 02:46:58 +00:00
Allan Carr
b0df5fa91c Merged in release/2023-07-07 (pull request #870)
IO-2340 CDK New Unsold Vehicle adjustments
2023-06-22 22:46:52 +00:00
Allan Carr
0652404334 Merged in feature/IO-2340-CDK-New-Unsold-Vehicle (pull request #869)
IO-2340 CDK New Unsold Vehicle adjustments
2023-06-22 22:43:26 +00:00
Allan Carr
bd7d8068df IO-2340 CDK New Unsold Vehicle adjustments 2023-06-22 15:38:18 -07:00
5 changed files with 46 additions and 36 deletions

View File

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

View File

@@ -45,7 +45,8 @@ 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

@@ -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)
: `${`${jobs_by_pk.ownr_ln || ""} ${
jobs_by_pk.ownr_fn || ""
}`.substring(0, 30)}`,
? jobs_by_pk.ownr_co_nm.substring(0, 30).trim()
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
.substring(0, 30)
.trim()}`,
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)
: `${`${jobs_by_pk.ownr_ln || ""} ${
jobs_by_pk.ownr_fn || ""
}`.substring(0, 30)}`,
? jobs_by_pk.ownr_co_nm.substring(0, 30).trim()
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
.substring(0, 30)
.trim()}`,
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)} #${jobs_by_pk.owner.accountingid || ""}`
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
.substring(0, 30)
.trim()} #${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)} #${jobs_by_pk.owner.accountingid || ""}`
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}`
.substring(0, 30)
.trim()} #${jobs_by_pk.owner.accountingid || ""}`
)
.trim()
.replace(":", " ");

View File

@@ -717,22 +717,24 @@ 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
@@ -864,19 +866,25 @@ async function UpdateDmsVehicle(socket) {
...socket.DMSVeh.dealer,
...((socket.txEnvelope.inservicedate ||
socket.DMSVeh.dealer.inServiceDate) && {
inServiceDate: moment(
socket.DMSVeh.dealer.inServiceDate ||
socket.txEnvelope.inservicedate
)
// .tz(socket.JobData.bodyshop.timezone)
.toISOString(),
inServiceDate:
socket.txEnvelope.dms_unsold === true
? ""
: moment(
socket.DMSVeh.dealer.inServiceDate ||
socket.txEnvelope.inservicedate
)
// .tz(socket.JobData.bodyshop.timezone)
.toISOString(),
}),
},
vehicle: {
...socket.DMSVeh.vehicle,
deliveryDate: moment(socket.DMSVeh.vehicle.deliveryDate)
//.tz(socket.JobData.bodyshop.timezone)
.toISOString(),
deliveryDate:
socket.txEnvelope.dms_unsold === true
? ""
: moment(socket.DMSVeh.vehicle.deliveryDate)
//.tz(socket.JobData.bodyshop.timezone)
.toISOString(),
},
owners: ids,
},