Compare commits

...

67 Commits

Author SHA1 Message Date
Patrick Fic
7a49c61105 Resolve mising requery. 2021-12-09 19:52:36 -08:00
Patrick Fic
448b6c723d Merge branch 'master' into release/2021-12-10 2021-12-09 19:25:13 -08:00
Patrick Fic
74b9eb40b1 Add polling back. 2021-12-09 18:13:56 -08:00
Patrick Fic
53af7a916c More package updates. 2021-12-09 17:25:08 -08:00
Patrick Fic
35bb79cc59 Merge branch 'release/2021-12-10' of https://bitbucket.org/snaptsoft/bodyshop into release/2021-12-10 2021-12-09 17:24:38 -08:00
Patrick Fic
a7c3d89531 Remove open replay. 2021-12-09 17:23:52 -08:00
Patrick Fic
09cd44905a IO-1552 WIP Autohouse Updates 2021-12-09 17:10:15 -08:00
Patrick Fic
2b635ba3bf Revert "IO-1567 Resolve refretch on export."
This reverts commit cd191dae70.
2021-12-09 17:06:19 -08:00
Patrick Fic
cd191dae70 IO-1567 Resolve refretch on export. 2021-12-09 14:22:49 -08:00
Patrick Fic
780d8b926d PBS Update & Send to DMS Button 2021-12-09 11:37:36 -08:00
Patrick Fic
267b927a7f IO-1551 Remove image for notifications. 2021-12-08 18:08:08 -08:00
Patrick Fic
2c793c25ee IO-1550 Resolve production diff bug. 2021-12-08 17:39:58 -08:00
Patrick Fic
58848481c9 IO-1551 Polling mode for unsupported browsers. 2021-12-08 17:05:44 -08:00
Patrick Fic
5bb1231d5e Merged in release/2021-12-08 (pull request #294)
Resolve Report Center Issue.
2021-12-08 23:15:20 +00:00
Patrick Fic
932bbd8fde Resolve Report Center Issue.
(cherry picked from commit 76ea8ca2ed)
2021-12-08 15:14:50 -08:00
Patrick Fic
76ea8ca2ed Resolve Report Center Issue. 2021-12-08 15:00:23 -08:00
Patrick Fic
02fcbf7ffa Env Based Firebase SW. 2021-12-08 13:17:52 -08:00
Patrick Fic
1f7b53ee22 IO-1551 Refactor messaging. 2021-12-08 12:38:26 -08:00
Patrick Fic
01977cefde Merged in release/2021-12-10 (pull request #292)
Release/2021 12 10
2021-12-08 18:29:37 +00:00
Patrick Fic
26d22388c0 Add IO Event tracking to graylog. 2021-12-08 09:25:55 -08:00
Patrick Fic
22a5c4a12d Add production repolling once an hr. 2021-12-07 15:15:40 -08:00
Patrick Fic
61edcf63be Update split functionality for Production List Colors. 2021-12-07 13:49:34 -08:00
Patrick Fic
a09daf052b DMS Updates 2021-12-07 13:45:33 -08:00
Patrick Fic
4393bf42ed IO-1550 Updated production boards to simplify subscription. 2021-12-06 16:39:13 -08:00
Patrick Fic
df83acb5ed IO-117 PBS Updates. 2021-12-06 11:33:50 -08:00
Patrick Fic
09cf49080b IO-223 ARMS Updates. 2021-12-03 18:34:09 -08:00
Patrick Fic
3b301efd27 IO-223 ARMS Updates. 2021-12-03 18:33:52 -08:00
Patrick Fic
2e843bbd8a IO-244 IOU Parts 2021-12-03 17:39:58 -08:00
Patrick Fic
b539ecaeb1 Package updates. 2021-12-03 14:40:31 -08:00
Patrick Fic
62cba80f82 Merged in release/2021-12-03 (pull request #289)
release/2021-12-03

Approved-by: Patrick Fic
2021-12-03 22:37:55 +00:00
Patrick Fic
7d7cd8d85e Merged in release/2021-12-03 (pull request #288)
Resolve CI.
2021-12-03 22:06:35 +00:00
Patrick Fic
5518395533 Resolve CI. 2021-12-03 14:05:17 -08:00
Patrick Fic
1cf2851e39 Merged in release/2021-12-03 (pull request #287)
Release/2021 12 03
2021-12-03 21:58:32 +00:00
Patrick Fic
cdbcef323f IO-233 Update Receive Bills 2021-12-03 13:57:48 -08:00
Patrick Fic
5125b20721 IO-233 Update CDK URLs. 2021-12-03 11:17:07 -08:00
Patrick Fic
c644ed67fd Merged in release/2021-12-03 (pull request #286)
Release/2021 12 03
2021-12-03 17:33:37 +00:00
Patrick Fic
48fd2b1461 IO-233 Minor CDK UI Updates. 2021-12-03 09:32:47 -08:00
Patrick Fic
2f1c168b3e IO-233 Add GST override for CDK. 2021-12-03 09:13:24 -08:00
Patrick Fic
a5aee28d42 IO-233 CDK Updates. 2021-12-02 15:51:21 -08:00
Patrick Fic
3c9625b622 Merged in release/2021-12-03 (pull request #285)
IO-233 CDK Updates.
2021-12-02 21:13:28 +00:00
Patrick Fic
8d3c2f7af6 IO-233 CDK Updates. 2021-12-02 13:11:23 -08:00
Patrick Fic
0109c9974f Merged in release/2021-12-03 (pull request #284)
Release/2021 12 03
2021-12-02 18:51:08 +00:00
Patrick Fic
39ec9d92ec IO-233 CDK updates. 2021-12-02 10:50:11 -08:00
Patrick Fic
a77e664ab1 Add OEC Reference Files. 2021-12-01 14:33:27 -08:00
Patrick Fic
b601bf1c1f Merged in release/2021-12-03 (pull request #282)
release/2021-12-03

Approved-by: Patrick Fic
2021-12-01 21:38:21 +00:00
Patrick Fic
724898714d IO-223 ARMS WIP 2021-12-01 13:37:55 -08:00
Patrick Fic
9fe535336c Merge branch 'release/2021-12-03' of bitbucket.org:snaptsoft/bodyshop into release/2021-12-03 2021-12-01 13:37:16 -08:00
Patrick Fic
1483f5f7c8 IO-233 Add CDK Control List. 2021-12-01 13:37:03 -08:00
Patrick Fic
4355a04ba4 IO-223 ARMS Backup. 2021-11-30 15:20:26 -08:00
Patrick Fic
cdc0c8bb37 IO-117 WIP PBS. 2021-11-30 12:46:04 -08:00
Patrick Fic
85deec1c21 Merge branch 'test' into release/2021-12-03 2021-11-30 08:39:18 -08:00
Patrick Fic
d4572a2d36 IO-1383 Include PVRT on export. 2021-11-29 15:37:49 -08:00
Patrick Fic
6f76c16994 Merged in release/2021-11-26 (pull request #280)
release/2021-11-26

Approved-by: Patrick Fic
2021-11-29 23:07:49 +00:00
Patrick Fic
97317c5179 Merge branch 'feature/oec' into release/2021-11-26 2021-11-29 15:07:29 -08:00
Patrick Fic
673654a9b7 IO-223 WIP ARMS 2021-11-29 10:46:59 -08:00
Patrick Fic
ca6f4070d0 Merged in release/2021-11-26 (pull request #279)
IO-233 CDK Updates.

Approved-by: Patrick Fic
2021-11-26 17:26:11 +00:00
Patrick Fic
8c40d541c4 Merged in release/2021-11-26 (pull request #278)
release/2021-11-26

Approved-by: Patrick Fic
2021-11-26 17:25:22 +00:00
Patrick Fic
c3baee1fa9 IO-233 CDK Updates. 2021-11-26 09:18:19 -08:00
Patrick Fic
dc6e5fe3aa Merged in release/2021-11-26 (pull request #277)
release/2021-11-26

Approved-by: Patrick Fic
2021-11-23 22:25:05 +00:00
Patrick Fic
b311a6df53 Resolve CI issues. 2021-11-23 14:24:48 -08:00
Patrick Fic
785f22c026 Merged in release/2021-11-26 (pull request #276)
Release/2021 11 26
2021-11-23 20:37:44 +00:00
Patrick Fic
112dfdf074 Merged in release/2021-11-26 (pull request #275)
release/2021-11-26

Approved-by: Patrick Fic
2021-11-22 06:25:53 +00:00
Patrick Fic
ac22e226b5 Merged in release/2021-11-26 (pull request #274)
IO-1533 Resolve board rerender.

Approved-by: Patrick Fic
2021-11-22 06:00:13 +00:00
Patrick Fic
ff5611e123 Merged in release/2021-11-19 (pull request #273)
IO-233 CDK Updates.

Approved-by: Patrick Fic
2021-11-19 20:09:14 +00:00
Patrick Fic
485959c399 Merged in release/2021-11-12 (pull request #264)
release/2021-11-12

Approved-by: Patrick Fic
2021-11-12 23:29:35 +00:00
Patrick Fic
122d21d4eb Merged in release/2021-11-01 (pull request #259)
IO-1438 Resolve issue with texting

Approved-by: Patrick Fic
2021-11-01 16:01:32 +00:00
Patrick Fic
e0157f6da4 Merged in release/2021-10-29 (pull request #257)
Release/2021 10 29
2021-10-29 21:18:53 +00:00
99 changed files with 5853 additions and 1687 deletions

586
_reference/OEC/Audatex.xsl Normal file
View File

@@ -0,0 +1,586 @@
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:template match="/">
<xsl:for-each select="//TranslatedData">
<xsl:element name="TranslatedData">
<xsl:attribute name="TranslationOutputFile">
<xsl:value-of select="@TranslationOutputFile"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="Details/@PrgID">
<xsl:copy-of select="Details" />
</xsl:when>
<xsl:otherwise>
<xsl:element name="Details">
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
<xsl:for-each select="Details/@*">
<xsl:copy-of select="." />
</xsl:for-each>
<xsl:for-each select="Details/*">
<xsl:copy-of select="." />
</xsl:for-each>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
<xsl:element name="Header">
<xsl:attribute name="RONum">
<xsl:value-of select="//Envelope/@RONum" />
</xsl:attribute>
<xsl:attribute name="OwnerFName">
<xsl:value-of select="//Admin/@OwnerF"/>
</xsl:attribute>
<xsl:attribute name="OwnerLName">
<xsl:value-of select="//Admin/@OwnerL"/>
</xsl:attribute>
<xsl:attribute name="VIN">
<xsl:value-of select="//Vehicle/@TransVIN" />
</xsl:attribute>
<xsl:attribute name="Mileage">
<xsl:value-of select="//Vehicle/@TransMileage" />
</xsl:attribute>
<xsl:attribute name="Year">
<xsl:value-of select="//Vehicle/@TransYear" />
</xsl:attribute>
<xsl:attribute name="Make">
<xsl:if test="//Vehicle/@ManufName[. != '']" >
<xsl:choose>
<xsl:when test="//Vehicle/@ManufName[. = 'Geo']">CHEV</xsl:when>
<xsl:when test="//Vehicle/@ManufName[. = 'Chev-GMC Truck']">CHEV</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Vehicle/@ManufName" />
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="//Vehicle/@ManufName[. = '']" >
<xsl:value-of select="//Vehicle/@ManufCode" />
</xsl:if>
</xsl:attribute>
<xsl:attribute name="Model">
<xsl:value-of select="//Vehicle/@TransModel" />
</xsl:attribute>
<xsl:attribute name="Description">
<xsl:value-of select="//Vehicle/@TransYear" />
<xsl:text> </xsl:text>
<xsl:value-of select="//Vehicle/@ManufName" />
<xsl:text> </xsl:text>
<xsl:value-of select="//Vehicle/@TransModel" />
</xsl:attribute>
<xsl:attribute name="LastSupplLevel">
<xsl:choose>
<xsl:when test="//Envelope/@TransactionType = 'E'">0</xsl:when>
<xsl:when test="substring(//Envelope/@SupplementNum, 1, 1) = 'S'">
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
<xsl:apply-templates select="PartsList" />
<xsl:element name="Envelope">
<xsl:element name="Software">
<xsl:attribute name="Manifest">Audatex.xml</xsl:attribute>
<xsl:attribute name="Descriptor">Audatex.xsl</xsl:attribute>
<xsl:attribute name="System">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>
</xsl:attribute>
<xsl:attribute name="Version">
<xsl:value-of select="//Envelope/@SoftwareVersion"/>
</xsl:attribute>
<xsl:attribute name="SystemName">
<xsl:value-of select="//Envelope/@SystemName"/>
</xsl:attribute>
<xsl:attribute name="EstimateFileID">
<xsl:value-of select="//Envelope/@EstimateFileID"/>
</xsl:attribute>
<xsl:attribute name="UniqueFileID">
<xsl:value-of select="//Envelope/@UniqueFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateID">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateIDv2">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateFormatVersion">
<xsl:value-of select="//Envelope/@EMSVersion"/>
</xsl:attribute>
</xsl:element>
</xsl:element>
<xsl:element name="Totals">
<xsl:attribute name="GrandTotalAmount">
<xsl:value-of select="//Total/@GrandTotalAmount"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Administrative">
<xsl:element name="Owner">
<xsl:attribute name="FName">
<xsl:value-of select="//Admin/@OwnerF"/>
</xsl:attribute>
<xsl:attribute name="LName">
<xsl:value-of select="//Admin/@OwnerL"/>
</xsl:attribute>
<xsl:attribute name="Company">
<!--<xsl:value-of select="//Admin/@OwnerCompanyName"/>-->
</xsl:attribute>
<xsl:attribute name="Address">
<!--<xsl:value-of select="//Admin/@OwnerAddr1"/>-->
</xsl:attribute>
<xsl:attribute name="Address2">
<!--<xsl:value-of select="//Admin/@OwnerAddr2"/>-->
</xsl:attribute>
<xsl:attribute name="City">
<!--<xsl:value-of select="//Admin/@OwnerCity"/>-->
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin/@OwnerState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<!--<xsl:choose>
<xsl:when test="contains(//Admin/@OwnerZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin/@OwnerZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin/@OwnerZip, '-'))=4">
<xsl:value-of select="//Admin/@OwnerZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin/@OwnerZip)=9">
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@OwnerZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin/@OwnerZip)&gt;4">
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
</xsl:when>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Country">
<!--<xsl:value-of select="//Admin/@OwnerCountry"/>-->
</xsl:attribute>
<xsl:attribute name="Phone">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerPhone1Ext[. != '']">
<xsl:value-of select="//Admin/@OwnerPhone1"/>&#32;x<xsl:value-of select="//Admin/@OwnerPhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerPhone1"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Phone2">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerPhone2Ext[. != '']">
<xsl:value-of select="//Admin/@OwnerPhone2"/>&#32;x<xsl:value-of select="//Admin/@OwnerPhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerPhone2"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Fax">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerFaxExt[. != '']">
<xsl:value-of select="//Admin/@OwnerFax"/>&#32;x<xsl:value-of select="//Admin/@OwnerFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerFax"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Email">
<!--<xsl:value-of select="//Admin/@OwnerEmail"/>-->
</xsl:attribute>
</xsl:element>
<xsl:element name="InsuranceCompany">
<xsl:attribute name="Id">
<xsl:value-of select="//Admin/@InsuranceCompanyID"/>
</xsl:attribute>
<xsl:attribute name="Name">
<xsl:value-of select="//Admin/@InsuranceCompanyName"/>
</xsl:attribute>
<xsl:attribute name="Address">
<xsl:value-of select="//Admin/@InsuranceAddr1"/>
</xsl:attribute>
<xsl:attribute name="Address2">
<xsl:value-of select="//Admin/@InsuranceAddr2"/>
</xsl:attribute>
<xsl:attribute name="City">
<xsl:value-of select="//Admin/@InsuranceCity"/>
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin/@InsuranceState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<xsl:choose>
<xsl:when test="contains(//Admin/@InsuranceZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
<xsl:value-of select="//Admin/@InsuranceZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin/@InsuranceZip)&gt;4">
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Country">
<xsl:value-of select="//Admin/@InsuranceCountry"/>
</xsl:attribute>
<xsl:attribute name="Phone">
<xsl:choose>
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
<xsl:value-of select="//Admin/@InsurancePhone1"/>&#32;x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsurancePhone1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Phone2">
<xsl:choose>
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
<xsl:value-of select="//Admin/@InsurancePhone2"/>&#32;x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsurancePhone2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Fax">
<xsl:choose>
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
<xsl:value-of select="//Admin/@InsuranceFax"/>&#32;x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsuranceFax"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Email">
<xsl:value-of select="//Admin/@InsuranceEmail"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Insured">
<xsl:attribute name="LastName">
<xsl:value-of select="//Admin/@InsuranceLName" />
</xsl:attribute>
</xsl:element>
<xsl:element name="Claim">
<xsl:attribute name="Number">
<xsl:value-of select="//Admin/@ClaimNumber"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Estimator">
<xsl:attribute name="FName">
<xsl:value-of select="//Admin2/@EstimatorF"/>
</xsl:attribute>
<xsl:attribute name="LName">
<xsl:value-of select="//Admin2/@EstimatorL"/>
</xsl:attribute>
<xsl:attribute name="Company">
<xsl:value-of select="//Admin2/@EstimatorCompanyName"/>
</xsl:attribute>
<xsl:attribute name="BodyShopCity">
<xsl:value-of select="//Admin2/@BodyShopCity"/>
</xsl:attribute>
<xsl:attribute name="BodyShopName">
<xsl:value-of select="//Admin2/@BodyShopName"/>
</xsl:attribute>
<xsl:attribute name="Address">
<xsl:value-of select="//Admin2/@EstimatorAddr1"/>
</xsl:attribute>
<xsl:attribute name="Address2">
<xsl:value-of select="//Admin2/@EstimatorAddr2"/>
</xsl:attribute>
<xsl:attribute name="City">
<xsl:value-of select="//Admin2/@EstimatorCity"/>
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin2/@EstimatorState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<xsl:choose>
<xsl:when test="contains(//Admin2/@EstimatorZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
<xsl:value-of select="//Admin2/@EstimatorZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin2/@EstimatorZip)&gt;4">
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Country">
<xsl:value-of select="//Admin2/@EstimatorCountry"/>
</xsl:attribute>
<xsl:attribute name="Phone">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Phone2">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Fax">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
<xsl:value-of select="//Admin2/@EstimatorFax"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorFax"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Email">
<xsl:value-of select="//Admin2/@EstimatorEmail"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="RepairInformation">
<xsl:attribute name="VehicleDateIn">
<xsl:if test="string-length(//Admin2/@VehicleInDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="EstimatedVehicleDateOut">
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="VehicleDateOut">
<xsl:if test="string-length(//Admin2/@VehicleOutDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:for-each>
</xsl:template>
<xsl:template match="PartsList">
<xsl:element name="PartsList" >
<xsl:for-each select="Part">
<xsl:element name="Part" >
<!-- Part number translation rules -->
<xsl:variable name="OEMPartNumber">
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
<xsl:value-of select="@TDPartNum" />
</xsl:if>
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
</xsl:if>
</xsl:variable>
<xsl:variable name="AltPartNumber">
<xsl:value-of select="@AltPartNum"/>
</xsl:variable>
<xsl:variable name="PrimaryPartType">
<xsl:value-of select="@PartType"/>
</xsl:variable>
<xsl:variable name="PrimaryPartNumber">
<xsl:choose>
<xsl:when test="@PartType='PAN' or @PartType='PAG'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<xsl:when test="@PartType!='PAN' and @PartType!='PAG'">
<xsl:choose>
<xsl:when test="$AltPartNumber!=''">
<xsl:value-of select="$AltPartNumber"/>
</xsl:when>
<xsl:when test="$OEMPartNumber!=''">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<xsl:otherwise>Salvage or Assembly</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SecondaryPartNumber">
<xsl:choose>
<xsl:when test="@PartType!='PAN'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SecondaryPartType">
<xsl:choose>
<xsl:when test="@PartType='PAA'">PAN</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:attribute name="TDPartNum">
<xsl:value-of select="$PrimaryPartNumber"/>
</xsl:attribute>
<xsl:attribute name="AltPartNum">
<xsl:value-of select="$SecondaryPartNumber" />
</xsl:attribute>
<xsl:attribute name="ExternalPartType">
<xsl:value-of select="$PrimaryPartType" />
</xsl:attribute>
<xsl:attribute name="ExternalAltPartType">
<xsl:value-of select="$SecondaryPartType" />
</xsl:attribute>
<xsl:attribute name="TDPartType">
<xsl:choose>
<xsl:when test="$PrimaryPartType='PAN' or $PrimaryPartType='PAP'">1</xsl:when>
<xsl:when test="$PrimaryPartType='PAA' or $PrimaryPartType='PATR'">2</xsl:when>
<xsl:when test="$PrimaryPartType='PAL'">3</xsl:when>
<xsl:when test="$PrimaryPartType='PAM' or $PrimaryPartType='PAC' or $PrimaryPartType='PAR'">4</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="AltPartType">
<xsl:choose>
<xsl:when test="$SecondaryPartType='PAN'">1</xsl:when>
<xsl:when test="$SecondaryPartType='PAA' or $SecondaryPartType='PATR'">2</xsl:when>
<xsl:when test="$SecondaryPartType='PAL'">3</xsl:when>
<xsl:when test="$SecondaryPartType='PAM' or $SecondaryPartType='PAC' or $SecondaryPartType='PAR'">4</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="TDPartDesc">
<xsl:value-of select="@TDPartDesc" />
</xsl:attribute>
<xsl:attribute name="TDEstimate">
<xsl:choose>
<xsl:when test="@PartType='PAN'">
<xsl:value-of select="@TDEstimate" />
</xsl:when>
<xsl:when test="@PartType='PAM'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:when test="@PartType='PAA'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:when test="@PartType='PAL'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@ActPrice" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="TDPartQty">
<xsl:value-of select="@TDPartQty" />
</xsl:attribute>
<xsl:attribute name="LineNumber">
<xsl:value-of select="@LineNumber" />
</xsl:attribute>
<xsl:attribute name="SequenceNumber">
<xsl:value-of select="@SequenceNumber" />
</xsl:attribute>
<xsl:attribute name="SupplLevel">
<xsl:choose>
<xsl:when test="@SupplementLevel = 'E'">0</xsl:when>
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
<xsl:value-of select="substring(@SupplementLevel, 2)" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="LaborType">
<xsl:value-of select="@LaborType" />
</xsl:attribute>
<xsl:attribute name="LaborHours">
<xsl:value-of select="@LaborHours" />
</xsl:attribute>
<xsl:attribute name="OperationCode">
<xsl:value-of select="@LaborOp" />
</xsl:attribute>
<xsl:attribute name="PriceIncluded">
<xsl:value-of select="@PriceIncluded" />
</xsl:attribute>
<xsl:attribute name="MarkUp">
<xsl:value-of select="@MarkUp" />
</xsl:attribute>
<xsl:attribute name="CLPart">
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
<!-- CLPart is false if PartType is not 'PAN','PAP','PAL','PAG', 'PAM', or 'PAA', or 'PAC' or 'PATR' -->
<!-- CLPart is false if LaborCode is only labor -->
<!-- CLPart is false if OpCode is not "Remove/Replace" or "Remove/Replace Partial" -->
<!-- If LaborOp is OP1, then allow the part to import CP 12/28/08 for Shop Client Release 4.1.4 -->
<xsl:choose>
<xsl:when test="@TransactionCode='3'">False</xsl:when>
<xsl:when test="@TransactionCode='1' or @TransactionCode=' ' or @TransactionCode='' or @TransactionCode='2'">
<xsl:choose>
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAC' or @PartType='PATR'">
<xsl:choose>
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
<xsl:otherwise>
<xsl:choose>
<!--xsl:when test="@LaborOp='OP0'">False</xsl:when -->
<xsl:when test="@LaborOp='OP1'">False</xsl:when>
<xsl:when test="@LaborOp='OP2'">False</xsl:when>
<xsl:when test="@LaborOp='OP3'">False</xsl:when>
<xsl:when test="@LaborOp='OP4'">False</xsl:when>
<xsl:when test="@LaborOp='OP5'">False</xsl:when>
<xsl:when test="@LaborOp='OP6'">False</xsl:when>
<xsl:when test="@LaborOp='OP7'">False</xsl:when>
<xsl:when test="@LaborOp='OP8'">False</xsl:when>
<xsl:when test="@LaborOp='OP9'">False</xsl:when>
<xsl:when test="@LaborOp='OP10'">False</xsl:when>
<xsl:when test="@LaborOp='OP13'">False</xsl:when>
<xsl:when test="@LaborOp='OP14'">False</xsl:when>
<xsl:when test="@LaborOp='OP15'">False</xsl:when>
<xsl:when test="@LaborOp='OP16'">False</xsl:when>
<xsl:otherwise>True</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>False</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>False</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<TranslationDescriptor>
<FileTranslations FormatName="ADP EMS" ElementName="Estimate" Description="Translation Descriptor for a ADP ShopLink Estimate, Version EMS 2.0">
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType="" Description="Unique File Identifier"/>
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType="" Description="Part Number"/>
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="Part Quantity"/>
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType="" Description="Part Type"/>
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
<DBFFieldSpec FieldName="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description="Line number"/>
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" FieldType="" Description=""/>
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
<DBFFieldSpec FieldName="PRICE_INC" Form="attribute" Name="PriceIncluded" FieldType="" Description="Price Included"/>
<DBFFieldSpec FieldName="PRT_DSMK_P" Form="attribute" Name="MarkUp" FieldType="" Description="Price Mark up for non OEM parts"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description=""/>
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType="" Description="V_MODEL_YR"/>
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType="" Description="Estimator Lastname"/>
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
<DBFFieldSpec FieldName="RF_CITY" Form="attribute" Name="BodyShopCity" FieldType="" Description="Body Shop City"/>
<DBFFieldSpec FieldName="RF_CO_NM" Form="attribute" Name="BodyShopName" FieldType="" Description="Body Shop Name"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
</DBFFileTranslation>
</FileTranslation>
</FileTranslations>
<StyleSheetTranslation>
<StyleSheetURL>Audatex.xsl</StyleSheetURL>
</StyleSheetTranslation>
</TranslationDescriptor>

607
_reference/OEC/CCC.xsl Normal file
View File

@@ -0,0 +1,607 @@
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:template match="/">
<xsl:for-each select="//TranslatedData">
<xsl:element name="TranslatedData">
<xsl:attribute name="TranslationOutputFile">
<xsl:value-of select="@TranslationOutputFile"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="Details/@PrgID">
<xsl:copy-of select="Details" />
</xsl:when>
<xsl:otherwise>
<xsl:element name="Details">
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
<xsl:for-each select="Details/@*">
<xsl:copy-of select="." />
</xsl:for-each>
<xsl:for-each select="Details/*">
<xsl:copy-of select="." />
</xsl:for-each>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
<xsl:element name="Header">
<xsl:attribute name="RONum">
<xsl:value-of select="//Envelope/@RONum" />
</xsl:attribute>
<xsl:attribute name="OwnerFName">
<xsl:value-of select="//Admin/@OwnerF"/>
</xsl:attribute>
<xsl:attribute name="OwnerLName">
<xsl:value-of select="//Admin/@OwnerL"/>
</xsl:attribute>
<xsl:attribute name="VIN">
<xsl:value-of select="//Vehicle/@TransVIN" />
</xsl:attribute>
<xsl:attribute name="Mileage">
<xsl:value-of select="//Vehicle/@TransMileage" />
</xsl:attribute>
<xsl:attribute name="Year">
<xsl:value-of select="//Vehicle/@TransYear" />
</xsl:attribute>
<xsl:attribute name="Make">
<xsl:if test="//Vehicle/@ManufName[. != '']" >
<xsl:value-of select="//Vehicle/@ManufName" />
</xsl:if>
<xsl:if test="//Vehicle/@ManufName[. = '']" >
<xsl:value-of select="//Vehicle/@ManufCode" />
</xsl:if>
</xsl:attribute>
<xsl:attribute name="Model">
<xsl:value-of select="//Vehicle/@TransModel" />
</xsl:attribute>
<xsl:attribute name="Description">
<xsl:value-of select="//Vehicle/@TransYear" />
<xsl:text> </xsl:text>
<xsl:value-of select="//Vehicle/@ManufName" />
<xsl:text> </xsl:text>
<xsl:value-of select="//Vehicle/@TransModel" />
</xsl:attribute>
<xsl:attribute name="LastSupplLevel">
<xsl:choose>
<xsl:when test="//Envelope/@TransactionType = 'E'">0</xsl:when>
<xsl:when test="//Envelope/@TransactionType = 'S'">
<xsl:value-of select="substring(//Envelope/@SupplementNum, 2)" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
<xsl:apply-templates select="PartsList" />
<xsl:element name="Envelope">
<xsl:element name="Software">
<xsl:attribute name="Manifest">CCC.xml</xsl:attribute>
<xsl:attribute name="Descriptor">CCC.xsl</xsl:attribute>
<xsl:attribute name="System">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>
</xsl:attribute>
<xsl:attribute name="Version">
<xsl:value-of select="//Envelope/@SoftwareVersion"/>
</xsl:attribute>
<xsl:attribute name="SystemName">
<xsl:value-of select="//Envelope/@SystemName"/>
</xsl:attribute>
<xsl:attribute name="EstimateFileID">
<xsl:value-of select="//Envelope/@EstimateFileID"/>
</xsl:attribute>
<xsl:attribute name="UniqueFileID">
<xsl:value-of select="//Envelope/@UniqueFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateID">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateIDv2">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@UniqueFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateFormatVersion">
<xsl:value-of select="//Envelope/@EMSVersion"/>
</xsl:attribute>
</xsl:element>
</xsl:element>
<xsl:element name="Totals">
<xsl:attribute name="GrandTotalAmount">
<xsl:value-of select="//Total/@GrandTotalAmount"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Administrative">
<xsl:element name="Owner">
<xsl:attribute name="FName">
<xsl:value-of select="//Admin/@OwnerF"/>
</xsl:attribute>
<xsl:attribute name="LName">
<xsl:value-of select="//Admin/@OwnerL"/>
</xsl:attribute>
<xsl:attribute name="Company">
<!--<xsl:value-of select="//Admin/@OwnerCompanyName"/>-->
</xsl:attribute>
<xsl:attribute name="Address">
<!--<xsl:value-of select="//Admin/@OwnerAddr1"/>-->
</xsl:attribute>
<xsl:attribute name="Address2">
<!--<xsl:value-of select="//Admin/@OwnerAddr2"/>-->
</xsl:attribute>
<xsl:attribute name="City">
<!--<xsl:value-of select="//Admin/@OwnerCity"/>-->
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin/@OwnerState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<!--<xsl:choose>
<xsl:when test="contains(//Admin/@OwnerZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin/@OwnerZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin/@OwnerZip, '-'))=4">
<xsl:value-of select="//Admin/@OwnerZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin/@OwnerZip)=9">
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@OwnerZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin/@OwnerZip)&gt;4">
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
</xsl:when>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Country">
<!--<xsl:value-of select="//Admin/@OwnerCountry"/>-->
</xsl:attribute>
<xsl:attribute name="Phone">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerPhone1Ext[. != '']">
<xsl:value-of select="//Admin/@OwnerPhone1"/>&#32;x<xsl:value-of select="//Admin/@OwnerPhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerPhone1"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Phone2">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerPhone2Ext[. != '']">
<xsl:value-of select="//Admin/@OwnerPhone2"/>&#32;x<xsl:value-of select="//Admin/@OwnerPhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerPhone2"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Fax">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerFaxExt[. != '']">
<xsl:value-of select="//Admin/@OwnerFax"/>&#32;x<xsl:value-of select="//Admin/@OwnerFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerFax"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Email">
<!--<xsl:value-of select="//Admin/@OwnerEmail"/>-->
</xsl:attribute>
</xsl:element>
<xsl:element name="InsuranceCompany">
<xsl:attribute name="Id">
<xsl:value-of select="//Admin/@InsuranceCompanyID"/>
</xsl:attribute>
<xsl:attribute name="Name">
<xsl:value-of select="//Admin/@InsuranceCompanyName"/>
</xsl:attribute>
<xsl:attribute name="Address">
<xsl:value-of select="//Admin/@InsuranceAddr1"/>
</xsl:attribute>
<xsl:attribute name="Address2">
<xsl:value-of select="//Admin/@InsuranceAddr2"/>
</xsl:attribute>
<xsl:attribute name="City">
<xsl:value-of select="//Admin/@InsuranceCity"/>
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin/@InsuranceState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<xsl:choose>
<xsl:when test="contains(//Admin/@InsuranceZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
<xsl:value-of select="//Admin/@InsuranceZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin/@InsuranceZip)&gt;4">
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Country">
<xsl:value-of select="//Admin/@InsuranceCountry"/>
</xsl:attribute>
<xsl:attribute name="Phone">
<xsl:choose>
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
<xsl:value-of select="//Admin/@InsurancePhone1"/>&#32;x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsurancePhone1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Phone2">
<xsl:choose>
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
<xsl:value-of select="//Admin/@InsurancePhone2"/>&#32;x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsurancePhone2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Fax">
<xsl:choose>
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
<xsl:value-of select="//Admin/@InsuranceFax"/>&#32;x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsuranceFax"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Email">
<xsl:value-of select="//Admin/@InsuranceEmail"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Insured">
<xsl:attribute name="LastName">
<xsl:value-of select="//Admin/@InsuranceLName" />
</xsl:attribute>
</xsl:element>
<xsl:element name="Claim">
<xsl:attribute name="Number">
<xsl:value-of select="//Admin/@ClaimNumber"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Estimator">
<xsl:attribute name="FName">
<xsl:value-of select="//Admin2/@EstimatorF"/>
</xsl:attribute>
<xsl:attribute name="LName">
<xsl:value-of select="//Admin2/@EstimatorL"/>
</xsl:attribute>
<xsl:attribute name="Company">
<xsl:value-of select="//Admin2/@EstimatorCompanyName"/>
</xsl:attribute>
<xsl:attribute name="Address">
<xsl:value-of select="//Admin2/@EstimatorAddr1"/>
</xsl:attribute>
<xsl:attribute name="Address2">
<xsl:value-of select="//Admin2/@EstimatorAddr2"/>
</xsl:attribute>
<xsl:attribute name="City">
<xsl:value-of select="//Admin2/@EstimatorCity"/>
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin2/@EstimatorState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<xsl:choose>
<xsl:when test="contains(//Admin2/@EstimatorZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
<xsl:value-of select="//Admin2/@EstimatorZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin2/@EstimatorZip)&gt;4">
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Country">
<xsl:value-of select="//Admin2/@EstimatorCountry"/>
</xsl:attribute>
<xsl:attribute name="Phone">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Phone2">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Fax">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
<xsl:value-of select="//Admin2/@EstimatorFax"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorFax"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Email">
<xsl:value-of select="//Admin2/@EstimatorEmail"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="RepairInformation">
<xsl:attribute name="VehicleDateIn">
<xsl:if test="string-length(//Admin2/@VehicleInDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="EstimatedVehicleDateOut">
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="VehicleDateOut">
<xsl:if test="string-length(//Admin2/@VehicleOutDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:for-each>
</xsl:template>
<xsl:template match="PartsList">
<xsl:element name="PartsList" >
<xsl:for-each select="Part">
<xsl:element name="Part" >
<!-- Part number translation rules -->
<xsl:variable name="OEMPartNumber">
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
<xsl:value-of select="@TDPartNum" />
</xsl:if>
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
</xsl:if>
</xsl:variable>
<xsl:variable name="AltPartNumber">
<xsl:value-of select="@AltPartNum"/>
</xsl:variable>
<xsl:variable name="PrimaryPartType">
<!-- RoseP modified to convert PAP to PAN -->
<!--<xsl:value-of select="@PartType"/>-->
<xsl:choose>
<xsl:when test="@PartType='PAP'">PAN</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@PartType"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="PrimaryPartNumber">
<xsl:choose>
<xsl:when test="@PartType='PAN'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<xsl:when test="@PartType='PAA'">
<xsl:value-of select="$AltPartNumber"/>
</xsl:when>
<xsl:when test="@PartType='PAL'">
<xsl:choose>
<xsl:when test="$AltPartNumber!=''">
<xsl:value-of select="$AltPartNumber"/>
</xsl:when>
<xsl:when test="$OEMPartNumber!=''">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<xsl:otherwise>Salvage or Assembly</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@PartType='PAG'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<!-- RoseP added Dec 08, 06 -->
<xsl:when test="@PartType='PAP'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<xsl:when test="@PartType='PAM'">
<xsl:choose>
<xsl:when test="$AltPartNumber!=''">
<xsl:value-of select="$AltPartNumber"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$OEMPartNumber"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SecondaryPartNumber">
<xsl:choose>
<xsl:when test="@PartType='PAA'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<xsl:when test="@PartType='PAM'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SecondaryPartType">
<xsl:choose>
<xsl:when test="@PartType='PAA'">PAN</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:attribute name="TDPartNum">
<xsl:value-of select="$PrimaryPartNumber"/>
</xsl:attribute>
<xsl:attribute name="AltPartNum">
<xsl:value-of select="$SecondaryPartNumber" />
</xsl:attribute>
<xsl:attribute name="ExternalPartType">
<xsl:value-of select="$PrimaryPartType" />
</xsl:attribute>
<xsl:attribute name="ExternalAltPartType">
<xsl:value-of select="$SecondaryPartType" />
</xsl:attribute>
<xsl:attribute name="TDPartType">
<xsl:choose>
<xsl:when test="$PrimaryPartType='PAN'">1</xsl:when>
<xsl:when test="$PrimaryPartType='PAA'">2</xsl:when>
<xsl:when test="$PrimaryPartType='PAL'">3</xsl:when>
<xsl:when test="$PrimaryPartType='PAM'">4</xsl:when>
<xsl:when test="$PrimaryPartType='PAR'">4</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="AltPartType">
<xsl:choose>
<xsl:when test="$SecondaryPartType='PAN'">1</xsl:when>
<xsl:when test="$SecondaryPartType='PAA'">2</xsl:when>
<xsl:when test="$SecondaryPartType='PAL'">3</xsl:when>
<xsl:when test="$SecondaryPartType='PAM'">4</xsl:when>
<xsl:when test="$SecondaryPartType='PAR'">4</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="TDPartDesc">
<xsl:value-of select="@TDPartDesc" />
</xsl:attribute>
<xsl:attribute name="TDLineRef">
<xsl:value-of select="@TDLineRef" />
</xsl:attribute>
<xsl:attribute name="TDEstimate">
<xsl:choose>
<xsl:when test="@PartType='PAN'">
<xsl:value-of select="@TDEstimate" />
</xsl:when>
<xsl:when test="@PartType='PAM'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:when test="@PartType='PAA'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:when test="@PartType='PAL'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@ActPrice" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="TDPartQty">
<xsl:value-of select="@TDPartQty" />
</xsl:attribute>
<xsl:attribute name="LineNumber">
<xsl:value-of select="@LineNumber" />
</xsl:attribute>
<xsl:attribute name="SequenceNumber">
<xsl:value-of select="@SequenceNumber" />
</xsl:attribute>
<xsl:attribute name="SupplLevel">
<xsl:choose>
<xsl:when test="@SupplementLevel = 'E01'">0</xsl:when>
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
<xsl:value-of select="substring(@SupplementLevel, 2)" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="LaborType">
<xsl:value-of select="@LaborType" />
</xsl:attribute>
<xsl:attribute name="LaborHours">
<xsl:value-of select="@LaborHours" />
</xsl:attribute>
<xsl:attribute name="OperationCode">
<xsl:value-of select="@LaborOp" />
</xsl:attribute>
<xsl:attribute name="CLPart">
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
<!-- CLPart is false if PartType is not 'PAN','PAP','PAL','PAG', 'PAM', 'PAA', 'PAO', 'PAR', or '' -->
<!-- CLPart is false if LaborCode is only labor -->
<!-- CLPart is false if OpCode is not "Remove/Replace" or "Remove/Replace Partial" or "Repair, Partial" -->
<xsl:choose>
<xsl:when test="@TransactionCode='3'">False</xsl:when>
<xsl:when test="@TransactionCode='1' or @TransactionCode ='2'">
<xsl:choose>
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAO' or @PartType='PAR' or @PartType=''" >
<!-- we now handle blank part types-->
<xsl:choose>
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@LaborOp=''">False</xsl:when>
<!--Needed for Blank Part Type-->
<xsl:when test="@LaborOp='OP0'">False</xsl:when>
<xsl:when test="@LaborOp='OP1'">False</xsl:when>
<xsl:when test="@LaborOp='OP2'">False</xsl:when>
<xsl:when test="@LaborOp='OP3'">False</xsl:when>
<xsl:when test="@LaborOp='OP4'">False</xsl:when>
<xsl:when test="@LaborOp='OP5'">False</xsl:when>
<xsl:when test="@LaborOp='OP6'">False</xsl:when>
<xsl:when test="@LaborOp='OP7'">False</xsl:when>
<xsl:when test="@LaborOp='OP8'">False</xsl:when>
<xsl:when test="@LaborOp='OP9'">False</xsl:when>
<!-- RoseP removed OP10 Dec 08, 06 -->
<!-- <xsl:when test="@LaborOp='OP10'">False</xsl:when> -->
<xsl:when test="@LaborOp='OP13'">False</xsl:when>
<xsl:when test="@LaborOp='OP14'">False</xsl:when>
<xsl:when test="@LaborOp='OP15'">False</xsl:when>
<xsl:when test="@LaborOp='OP16'">False</xsl:when>
<xsl:otherwise>True</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>False</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>False</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<TranslationDescriptor>
<FileTranslations FormatName="CCC" ElementName="Estimate" Description="Translation Descriptor for a CCC Estimate, Version 2.0">
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType="" Description="Unique File Identifier"/>
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType="" Description="Part Number"/>
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="PART_QTY"/>
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description=""/>
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" FieldType="" Description=""/>
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType="" Description="Part Type"/>
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
<DBFFieldSpec FieldName="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
<DBFFieldSpec FieldName="LINE_REF" Form="attribute" Name="TDLineRef" FieldType="" Description="Line Reference Number"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description="V_VIN"/>
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType="" Description="V_MODEL_YR"/>
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType="" Description="Estimator Lastname"/>
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
</DBFFileTranslation>
</FileTranslation>
</FileTranslations>
<StyleSheetTranslation>
<StyleSheetURL>ccc.xsl</StyleSheetURL>
</StyleSheetTranslation>
</TranslationDescriptor>

580
_reference/OEC/Mitchell.xsl Normal file
View File

@@ -0,0 +1,580 @@
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:template match="/">
<xsl:for-each select="//TranslatedData">
<xsl:element name="TranslatedData">
<xsl:attribute name="TranslationOutputFile">
<xsl:value-of select="@TranslationOutputFile"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="Details/@PrgID">
<xsl:copy-of select="Details" />
</xsl:when>
<xsl:otherwise>
<xsl:element name="Details">
<xsl:attribute name="PrgID">OECTrans.ImportTrans</xsl:attribute>
<xsl:for-each select="Details/@*">
<xsl:copy-of select="." />
</xsl:for-each>
<xsl:for-each select="Details/*">
<xsl:copy-of select="." />
</xsl:for-each>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
<xsl:element name="Header">
<xsl:attribute name="RONum">
<xsl:value-of select="//Envelope/@RONum" />
</xsl:attribute>
<xsl:attribute name="OwnerFName">
<xsl:value-of select="//Admin/@OwnerF"/>
</xsl:attribute>
<xsl:attribute name="OwnerLName">
<xsl:value-of select="//Admin/@OwnerL"/>
</xsl:attribute>
<xsl:attribute name="VIN">
<xsl:value-of select="//Vehicle/@TransVIN" />
</xsl:attribute>
<xsl:attribute name="Mileage">
<xsl:value-of select="//Vehicle/@TransMileage" />
</xsl:attribute>
<xsl:attribute name="Year">
<xsl:value-of select="//Vehicle/@TransYear" />
</xsl:attribute>
<xsl:attribute name="Make">
<xsl:if test="//Vehicle/@ManufName[. != '']" >
<xsl:value-of select="//Vehicle/@ManufName" />
</xsl:if>
<xsl:if test="//Vehicle/@ManufName[. = '']" >
<xsl:value-of select="//Vehicle/@ManufCode" />
</xsl:if>
</xsl:attribute>
<xsl:attribute name="Model">
<xsl:value-of select="//Vehicle/@TransModel" />
</xsl:attribute>
<xsl:attribute name="Description">
<xsl:value-of select="//Vehicle/@TransYear" />
<xsl:text> </xsl:text>
<xsl:value-of select="//Vehicle/@ManufName" />
<xsl:text> </xsl:text>
<xsl:value-of select="//Vehicle/@TransModel" />
</xsl:attribute>
<xsl:attribute name="LastSupplLevel">
<xsl:choose>
<xsl:when test="string-length(//Envelope/@SupplementNum) > 0">
<xsl:value-of select="//Envelope/@SupplementNum" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
<xsl:apply-templates select="PartsList" />
<xsl:element name="Envelope">
<xsl:element name="Software">
<xsl:attribute name="Manifest">Mitchell.xml</xsl:attribute>
<xsl:attribute name="Descriptor">Mitchell.xsl</xsl:attribute>
<xsl:attribute name="System">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>
</xsl:attribute>
<xsl:attribute name="Version">
<xsl:value-of select="//Envelope/@SoftwareVersion"/>
</xsl:attribute>
<xsl:attribute name="SystemName">
<xsl:value-of select="//Envelope/@SystemName"/>
</xsl:attribute>
<xsl:attribute name="EstimateFileID">
<xsl:value-of select="//Envelope/@EstimateFileID"/>
</xsl:attribute>
<xsl:attribute name="UniqueFileID">
<xsl:value-of select="//Envelope/@UniqueFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateID">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@SoftwareVersion"/>-<xsl:value-of select="//Envelope/@EstimateFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateIDv2">
<xsl:value-of select="//Envelope/@EstimatingSystem"/>-<xsl:value-of select="//Envelope/@EstimateFileID"/>
</xsl:attribute>
<xsl:attribute name="EstimateFormatVersion">
<xsl:value-of select="//Envelope/@EMSVersion"/>
</xsl:attribute>
</xsl:element>
</xsl:element>
<xsl:element name="Totals">
<xsl:attribute name="GrandTotalAmount">
<xsl:value-of select="//Total/@GrandTotalAmount"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Administrative">
<xsl:element name="Owner">
<xsl:attribute name="FName">
<xsl:value-of select="//Admin/@OwnerF"/>
</xsl:attribute>
<xsl:attribute name="LName">
<xsl:value-of select="//Admin/@OwnerL"/>
</xsl:attribute>
<xsl:attribute name="Company">
<!--<xsl:value-of select="//Admin/@OwnerCompanyName"/>-->
</xsl:attribute>
<xsl:attribute name="Address">
<!--<xsl:value-of select="//Admin/@OwnerAddr1"/>-->
</xsl:attribute>
<xsl:attribute name="Address2">
<!--<xsl:value-of select="//Admin/@OwnerAddr2"/>-->
</xsl:attribute>
<xsl:attribute name="City">
<!--<xsl:value-of select="//Admin/@OwnerCity"/>-->
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin/@OwnerState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<!--<xsl:choose>
<xsl:when test="contains(//Admin/@OwnerZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin/@OwnerZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin/@OwnerZip, '-'))=4">
<xsl:value-of select="//Admin/@OwnerZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin/@OwnerZip)=9">
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@OwnerZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin/@OwnerZip)&gt;4">
<xsl:value-of select="substring(//Admin/@OwnerZip, 1, 5)"/>
</xsl:when>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Country">
<!--<xsl:value-of select="//Admin/@OwnerCountry"/>-->
</xsl:attribute>
<xsl:attribute name="Phone">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerPhone1Ext[. != '']">
<xsl:value-of select="//Admin/@OwnerPhone1"/>&#32;x<xsl:value-of select="//Admin/@OwnerPhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerPhone1"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Phone2">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerPhone2Ext[. != '']">
<xsl:value-of select="//Admin/@OwnerPhone2"/>&#32;x<xsl:value-of select="//Admin/@OwnerPhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerPhone2"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Fax">
<!--<xsl:choose>
<xsl:when test="//Admin/@OwnerFaxExt[. != '']">
<xsl:value-of select="//Admin/@OwnerFax"/>&#32;x<xsl:value-of select="//Admin/@OwnerFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@OwnerFax"/>
</xsl:otherwise>
</xsl:choose>-->
</xsl:attribute>
<xsl:attribute name="Email">
<!--<xsl:value-of select="//Admin/@OwnerEmail"/>-->
</xsl:attribute>
</xsl:element>
<xsl:element name="InsuranceCompany">
<xsl:attribute name="Id">
<xsl:value-of select="//Admin/@InsuranceCompanyID"/>
</xsl:attribute>
<xsl:attribute name="Name">
<xsl:value-of select="//Admin/@InsuranceCompanyName"/>
</xsl:attribute>
<xsl:attribute name="Address">
<xsl:value-of select="//Admin/@InsuranceAddr1"/>
</xsl:attribute>
<xsl:attribute name="Address2">
<xsl:value-of select="//Admin/@InsuranceAddr2"/>
</xsl:attribute>
<xsl:attribute name="City">
<xsl:value-of select="//Admin/@InsuranceCity"/>
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin/@InsuranceState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<xsl:choose>
<xsl:when test="contains(//Admin/@InsuranceZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin/@InsuranceZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin/@InsuranceZip, '-'))=4">
<xsl:value-of select="//Admin/@InsuranceZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin/@InsuranceZip)=9">
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin/@InsuranceZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin/@InsuranceZip)&gt;4">
<xsl:value-of select="substring(//Admin/@InsuranceZip, 1, 5)"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Country">
<xsl:value-of select="//Admin/@InsuranceCountry"/>
</xsl:attribute>
<xsl:attribute name="Phone">
<xsl:choose>
<xsl:when test="//Admin/@InsurancePhone1Ext[. != '']">
<xsl:value-of select="//Admin/@InsurancePhone1"/>&#32;x<xsl:value-of select="//Admin/@InsurancePhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsurancePhone1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Phone2">
<xsl:choose>
<xsl:when test="//Admin/@InsurancePhone2Ext[. != '']">
<xsl:value-of select="//Admin/@InsurancePhone2"/>&#32;x<xsl:value-of select="//Admin/@InsurancePhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsurancePhone2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Fax">
<xsl:choose>
<xsl:when test="//Admin/@InsuranceFaxExt[. != '']">
<xsl:value-of select="//Admin/@InsuranceFax"/>&#32;x<xsl:value-of select="//Admin/@InsuranceFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin/@InsuranceFax"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Email">
<xsl:value-of select="//Admin/@InsuranceEmail"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Insured">
<xsl:attribute name="LastName">
<xsl:value-of select="//Admin/@InsuranceLName"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Claim">
<xsl:attribute name="Number">
<xsl:value-of select="//Admin/@ClaimNumber"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="Estimator">
<xsl:attribute name="FName">
<xsl:value-of select="//Admin2/@EstimatorF"/>
</xsl:attribute>
<xsl:attribute name="LName">
<xsl:value-of select="//Admin2/@EstimatorL"/>
</xsl:attribute>
<xsl:attribute name="Company">
<xsl:value-of select="//Admin2/@EstimatorCompanyName"/>
</xsl:attribute>
<xsl:attribute name="BodyShopName">
<xsl:value-of select="//Admin2/@BodyShopName"/>
</xsl:attribute>
<xsl:attribute name="Address">
<xsl:value-of select="//Admin2/@EstimatorAddr1"/>
</xsl:attribute>
<xsl:attribute name="Address2">
<xsl:value-of select="//Admin2/@EstimatorAddr2"/>
</xsl:attribute>
<xsl:attribute name="City">
<xsl:value-of select="//Admin2/@EstimatorCity"/>
</xsl:attribute>
<xsl:attribute name="State">
<xsl:value-of select="//Admin2/@EstimatorState"/>
</xsl:attribute>
<xsl:attribute name="Zip">
<xsl:choose>
<xsl:when test="contains(//Admin2/@EstimatorZip, '-')">
<xsl:choose>
<xsl:when test="string-length(substring-before(//Admin2/@EstimatorZip, '-'))=5">
<xsl:choose>
<xsl:when test="string-length(substring-after(//Admin2/@EstimatorZip, '-'))=4">
<xsl:value-of select="//Admin2/@EstimatorZip"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="string-length(//Admin2/@EstimatorZip)=9">
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>-<xsl:value-of select="substring(//Admin2/@EstimatorZip, 6, 4)"/>
</xsl:when>
<xsl:when test="string-length(//Admin2/@EstimatorZip)&gt;4">
<xsl:value-of select="substring(//Admin2/@EstimatorZip, 1, 5)"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Country">
<xsl:value-of select="//Admin2/@EstimatorCountry"/>
</xsl:attribute>
<xsl:attribute name="Phone">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorPhone1Ext[. != '']">
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorPhone1Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorPhone1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Phone2">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorPhone2Ext[. != '']">
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorPhone2Ext"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorPhone2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Fax">
<xsl:choose>
<xsl:when test="//Admin2/@EstimatorFaxExt[. != '']">
<xsl:value-of select="//Admin2/@EstimatorFax"/>&#32;x<xsl:value-of select="//Admin2/@EstimatorFaxExt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//Admin2/@EstimatorFax"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="Email">
<xsl:value-of select="//Admin2/@EstimatorEmail"/>
</xsl:attribute>
</xsl:element>
<xsl:element name="RepairInformation">
<xsl:attribute name="VehicleDateIn">
<xsl:if test="string-length(//Admin2/@VehicleInDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@VehicleInDate, ' ')"/>
<xsl:if test="string-length(//Admin2/@VehicleInTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@VehicleInTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleInTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="EstimatedVehicleDateOut">
<xsl:if test="string-length(//Admin2/@TargetVehicleOutDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@TargetVehicleOutDate,' ')"/>
<xsl:if test="string-length(//Admin2/@TargetVehicleOutTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@TargetVehicleOutTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="VehicleDateOut">
<xsl:if test="string-length(//Admin2/@VehicleOutDate)&gt;6">
<xsl:value-of select="substring-before(//Admin2/@VehicleOutDate, ' ')"/>
<xsl:if test="string-length(//Admin2/@VehicleOutTime)=4">
&#32;<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 1, 2)"/>:<xsl:value-of select="substring(//Admin2/@VehicleOutTime, 3, 2)"/>
</xsl:if>
</xsl:if>
</xsl:attribute>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:for-each>
</xsl:template>
<xsl:template match="PartsList">
<xsl:element name="PartsList" >
<xsl:for-each select="Part">
<xsl:element name="Part" >
<!-- Part number translation rules -->
<xsl:variable name="OEMPartNumber">
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) != ' GM PART'">
<xsl:value-of select="@TDPartNum" />
</xsl:if>
<xsl:if test="substring(@TDPartNum, string-length(@TDPartNum) - 7) = ' GM PART'">
<xsl:value-of select="substring-before(@TDPartNum,' GM PART')" />
</xsl:if>
</xsl:variable>
<xsl:variable name="AltPartNumber">
<xsl:value-of select="@AltPartNum"/>
</xsl:variable>
<xsl:variable name="PrimaryPartType">
<xsl:value-of select="@PartType"/>
</xsl:variable>
<xsl:variable name="PrimaryPartNumber">
<xsl:choose>
<xsl:when test="@PartType='PAN'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<xsl:when test="@PartType!='PAN'">
<xsl:choose>
<xsl:when test="$AltPartNumber!=''">
<xsl:value-of select="$AltPartNumber"/>
</xsl:when>
<xsl:when test="$OEMPartNumber!=''">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
<xsl:otherwise>Salvage or Assembly</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SecondaryPartNumber">
<xsl:choose>
<xsl:when test="@PartType!='PAN'">
<xsl:value-of select="$OEMPartNumber"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="SecondaryPartType">
<xsl:choose>
<xsl:when test="@PartType='PAA'">PAN</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:attribute name="TDPartNum">
<xsl:value-of select="$PrimaryPartNumber"/>
</xsl:attribute>
<xsl:attribute name="AltPartNum">
<xsl:value-of select="$SecondaryPartNumber" />
</xsl:attribute>
<xsl:attribute name="ExternalPartType">
<xsl:value-of select="$PrimaryPartType" />
</xsl:attribute>
<xsl:attribute name="ExternalAltPartType">
<xsl:value-of select="$SecondaryPartType" />
</xsl:attribute>
<xsl:attribute name="TDPartType">
<xsl:choose>
<xsl:when test="$PrimaryPartType='PAN'">1</xsl:when>
<xsl:when test="$PrimaryPartType='PAA'">2</xsl:when>
<xsl:when test="$PrimaryPartType='PAL'">3</xsl:when>
<xsl:when test="$PrimaryPartType='PAM'">4</xsl:when>
<xsl:when test="$PrimaryPartType='PAR'">4</xsl:when>
<xsl:when test="$PrimaryPartType='PAC'">4</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="AltPartType">
<xsl:choose>
<xsl:when test="$SecondaryPartType='PAN'">1</xsl:when>
<xsl:when test="$SecondaryPartType='PAA'">2</xsl:when>
<xsl:when test="$SecondaryPartType='PAL'">3</xsl:when>
<xsl:when test="$SecondaryPartType='PAM'">4</xsl:when>
<xsl:when test="$SecondaryPartType='PAC'">4</xsl:when>
<xsl:when test="$SecondaryPartType='PAR'">4</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="TDPartDesc">
<xsl:value-of select="@TDPartDesc" />
</xsl:attribute>
<xsl:attribute name="TDEstimate">
<xsl:choose>
<xsl:when test="@PartType='PAN'">
<xsl:value-of select="@TDEstimate" />
</xsl:when>
<xsl:when test="@PartType='PAM'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:when test="@PartType='PAA'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:when test="@PartType='PAL'">
<xsl:value-of select="@ActPrice" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@ActPrice" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="TDPartQty">
<xsl:value-of select="@TDPartQty" />
</xsl:attribute>
<xsl:attribute name="LineNumber">
<xsl:value-of select="@LineNumber" />
</xsl:attribute>
<xsl:attribute name="SequenceNumber">
<xsl:value-of select="@SequenceNumber" />
</xsl:attribute>
<xsl:attribute name="SupplLevel">
<xsl:choose>
<xsl:when test="@SupplementLevel = 'E'">0</xsl:when>
<xsl:when test="substring(@SupplementLevel, 1, 1) = 'S'">
<xsl:value-of select="substring(@SupplementLevel, 2)" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="LaborType">
<xsl:value-of select="@LaborType" />
</xsl:attribute>
<xsl:attribute name="LaborHours">
<xsl:value-of select="@LaborHours" />
</xsl:attribute>
<xsl:attribute name="OperationCode">
<xsl:value-of select="@LaborOp" />
</xsl:attribute>
<xsl:attribute name="GlassFlag">
<xsl:value-of select="@GlassFlag" />
</xsl:attribute>
<xsl:attribute name="MarkUp">
<xsl:value-of select="@MarkUp" />
</xsl:attribute>
<xsl:attribute name="CLPart">
<!-- CLPart is false if TRAN_CODE == 2 or TRAN_CODE == 3 -->
<!-- CLPart is false if PartType is not 'PAN','PAP','PAL','PAG', 'PAM', or 'PAA' or 'PAC' or 'PAR' -->
<!-- CLPart is false if LaborCode is only labor -->
<!-- CLPart is false if OpCode is not "Remove/Replace" or "Remove/Replace Partial" -->
<xsl:choose>
<xsl:when test="@TransactionCode='3'">False</xsl:when>
<xsl:when test="@TransactionCode='1' or @TransactionCode='2'">
<xsl:choose>
<xsl:when test="@PartType='PAN' or @PartType='PAG' or @PartType='PAM' or @PartType='PAP' or @PartType='PAL' or @PartType='PAA' or @PartType='PAR' or @PartType='PAC'">
<xsl:choose>
<xsl:when test="@LaborType='LAD' or @LaborType='LAE' or @LaborType='LAU' or @LaborType='LAT'">False</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@LaborOp='OP0'">False</xsl:when>
<xsl:when test="@LaborOp='OP1'">False</xsl:when>
<xsl:when test="@LaborOp='OP2'">False</xsl:when>
<xsl:when test="@LaborOp='OP3'">False</xsl:when>
<xsl:when test="@LaborOp='OP4'">False</xsl:when>
<xsl:when test="@LaborOp='OP5'">False</xsl:when>
<xsl:when test="@LaborOp='OP6'">False</xsl:when>
<xsl:when test="@LaborOp='OP7'">False</xsl:when>
<xsl:when test="@LaborOp='OP8'">False</xsl:when>
<xsl:when test="@LaborOp='OP9'">False</xsl:when>
<xsl:when test="@LaborOp='OP10'">False</xsl:when>
<xsl:when test="@LaborOp='OP13'">False</xsl:when>
<xsl:when test="@LaborOp='OP14'">False</xsl:when>
<xsl:when test="@LaborOp='OP15'">False</xsl:when>
<xsl:when test="@LaborOp='OP16'">False</xsl:when>
<xsl:otherwise>True</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>False</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>False</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<TranslationDescriptor>
<FileTranslations FormatName="Mitchell" ElementName="Estimate" Description="Translation Descriptor for a Mitchell Estimate, Version EMS 2.0">
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.env">
<DBFFileTranslation ID="ID1" ElementName="Envelope" Description="Envelope Table">
<DBFFieldSpec FieldName="RO_ID" Form="attribute" Name="RONum" FieldType="" Description="RO Number"/>
<DBFFieldSpec FieldName="UNQFILE_ID" Form="attribute" Name="UniqueFileID" FieldType="" Description="Unique File Identifier"/>
<DBFFieldSpec FieldName="ESTFILE_ID" Form="attribute" Name="EstimateFileID" FieldType="" Description="Estimate File Identifier"/>
<DBFFieldSpec FieldName="INCL_ADMIN" Form="attribute" Name="IncludesAdminInfo" FieldType="Boolean" Description="Includes Admin Info Flag"/>
<DBFFieldSpec FieldName="INCL_VEH" Form="attribute" Name="IncludesVehicleInfo" FieldType="Boolean" Description="Includes Vehicle Info Flag"/>
<DBFFieldSpec FieldName="INCL_EST" Form="attribute" Name="IncludesEstimateInfo" FieldType="Boolean" Description="Includes Estimate Info Flag"/>
<DBFFieldSpec FieldName="INCL_PROFL" Form="attribute" Name="IncludesProfileInfo" FieldType="Boolean" Description="Includes Profile Info Flag"/>
<DBFFieldSpec FieldName="INCL_TOTAL" Form="attribute" Name="IncludesTotalsInfo" FieldType="Boolean" Description="Includes Totals Info Flag"/>
<DBFFieldSpec FieldName="INCL_VENDR" Form="attribute" Name="IncludesVendorInfo" FieldType="Boolean" Description="Includes Vendor Info Flag"/>
<DBFFieldSpec FieldName="EMS_VER" Form="attribute" Name="EMSVersion" FieldType="" Description="EMS Version Number"/>
<DBFFieldSpec FieldName="SUPP_NO" Form="attribute" Name="SupplementNum" FieldType="" Description="Supplement Number"/>
<DBFFieldSpec FieldName="TRANS_TYPE" Form="attribute" Name="TransactionType" FieldType="" Description="Transaction Type"/>
<DBFFieldSpec FieldName="EST_SYSTEM" Form="attribute" Name="EstimatingSystem" FieldType="" Description="Estimating System Software"/>
<DBFFieldSpec FieldName="SW_VERSION" Form="attribute" Name="SoftwareVersion" FieldType="" Description="Software Version Identifier"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.LIN">
<DBFFileTranslation ID="ID2" ElementSetName="PartsList" ElementName="Part" Description="Parts List Table">
<DBFFieldSpec FieldName="OEM_PARTNO" Form="attribute" Name="TDPartNum" FieldType="" Description="Part Number"/>
<DBFFieldSpec FieldName="ALT_PARTNO" Form="attribute" Name="AltPartNum" FieldType="" Description="Alternate Part Number"/>
<DBFFieldSpec FieldName="ACT_PRICE" Form="attribute" Name="ActPrice" FieldType="" Description="Actual Part Price"/>
<DBFFieldSpec FieldName="LINE_DESC" Form="attribute" Name="TDPartDesc" FieldType="" Description="Part Description"/>
<DBFFieldSpec FieldName="DB_PRICE" Form="attribute" Name="TDEstimate" FieldType="" Description="DB_Price"/>
<DBFFieldSpec FieldName="PART_QTY" Form="attribute" Name="TDPartQty" FieldType="" Description="Part Quantity"/>
<DBFFieldSpec FieldName="LINE_NO" Form="attribute" Name="LineNumber" FieldType="" Description=""/>
<DBFFieldSpec FieldName="UNQ_SEQ" Form="attribute" Name="SequenceNumber" FieldType="" Description=""/>
<DBFFieldSpec FieldName="PART_TYPE" Form="attribute" Name="PartType" FieldType="" Description="Part Type"/>
<DBFFieldSpec FieldName="MOD_LBR_TY" Form="attribute" Name="LaborType" FieldType="" Description="Labor Type"/>
<DBFFieldSpec FieldName="MOD_LB_HRS" Form="attribute" Name="LaborHours" FieldType="" Description="Labor Hours"/>
<DBFFieldSpec FieldName="LBR_OP" Form="attribute" Name="LaborOp" FieldType="" Description="Labor Op"/>
<DBFFieldSpec FieldName="LINE_IND" Form="attribute" Name="SupplementLevel" FieldType="" Description="Supplement Level"/>
<DBFFieldSpec FieldName="TRAN_CODE" Form="attribute" Name="TransactionCode" FieldType="" Description="Transaction Code"/>
<DBFFieldSpec FieldName="GLASS_FLAG" Form="attribute" Name="GlassFlag" FieldType="" Description="Glass Flag"/>
<DBFFieldSpec FieldName="PRT_DSMK_M" Form="attribute" Name="MarkUp" FieldType="" Description="Price Mark up for non OEM parts"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.VEH">
<DBFFileTranslation ID="ID3" ElementName="Vehicle" Description="Vehicle Table">
<DBFFieldSpec FieldName="V_VIN" Form="attribute" Name="TransVIN" FieldType="" Description=""/>
<DBFFieldSpec FieldName="V_MODEL_YR" Form="attribute" Name="TransYear" FieldType="" Description="V_MODEL_YR"/>
<DBFFieldSpec FieldName="V_MAKEDESC" Form="attribute" Name="ManufName" FieldType="" Description="V_MAKEDESC"/>
<DBFFieldSpec FieldName="V_MAKECODE" Form="attribute" Name="ManufCode" FieldType="" Description="V_MAKECODE"/>
<DBFFieldSpec FieldName="V_MODEL" Form="attribute" Name="TransModel" FieldType="" Description="V_MODEL"/>
<DBFFieldSpec FieldName="V_MILEAGE" Form="attribute" Name="TransMileage" FieldType="" Description="V_MILEAGE"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD1">
<DBFFileTranslation ID="ID4" ElementName="Admin" Description="Administrative information">
<DBFFieldSpec FieldName="OWNR_LN" Form="attribute" Name="OwnerL" FieldType="" Description="Owner Lastname"/>
<DBFFieldSpec FieldName="OWNR_FN" Form="attribute" Name="OwnerF" FieldType="" Description="Owner Firstname"/>
<DBFFieldSpec FieldName="OWNR_CO_NM" Form="attribute" Name="OwnerCompanyName" FieldType="" Description="Owner Company Name"/>
<DBFFieldSpec FieldName="OWNR_TITLE" Form="attribute" Name="OwnerTitle" FieldType="" Description="Owner Title"/>
<DBFFieldSpec FieldName="OWNR_ADDR1" Form="attribute" Name="OwnerAddr1" FieldType="" Description="Owner Address Line 1"/>
<DBFFieldSpec FieldName="OWNR_ADDR2" Form="attribute" Name="OwnerAddr2" FieldType="" Description="Owner Address Line 2"/>
<DBFFieldSpec FieldName="OWNR_CITY" Form="attribute" Name="OwnerCity" FieldType="" Description="Owner City"/>
<DBFFieldSpec FieldName="OWNR_ST" Form="attribute" Name="OwnerState" FieldType="" Description="Owner State"/>
<DBFFieldSpec FieldName="OWNR_ZIP" Form="attribute" Name="OwnerZip" FieldType="" Description="Owner Zip"/>
<DBFFieldSpec FieldName="OWNR_CTRY" Form="attribute" Name="OwnerCountry" FieldType="" Description="Owner Country"/>
<DBFFieldSpec FieldName="OWNR_PH1" Form="attribute" Name="OwnerPhone1" FieldType="" Description="Owner Primary Phone"/>
<DBFFieldSpec FieldName="OWNR_PH1X" Form="attribute" Name="OwnerPhone1Ext" FieldType="" Description="Owner Primary Phone Extension"/>
<DBFFieldSpec FieldName="OWNR_PH2" Form="attribute" Name="OwnerPhone2" FieldType="" Description="Owner Secondary Phone"/>
<DBFFieldSpec FieldName="OWNR_PH2X" Form="attribute" Name="OwnerPhone2Ext" FieldType="" Description="Owner Secondary Phone Extension"/>
<DBFFieldSpec FieldName="OWNR_FAX" Form="attribute" Name="OwnerFax" FieldType="" Description="Owner Fax"/>
<DBFFieldSpec FieldName="OWNR_FAXX" Form="attribute" Name="OwnerFaxExt" FieldType="" Description="Owner Fax Extension"/>
<DBFFieldSpec FieldName="OWNR_EA" Form="attribute" Name="OwnerEmail" FieldType="" Description="Owner Email Address"/>
<DBFFieldSpec FieldName="INS_CO_NM" Form="attribute" Name="InsuranceCompanyName" FieldType="" Description="Insurance Company Name"/>
<DBFFieldSpec FieldName="INS_CO_ID" Form="attribute" Name="InsuranceCompanyID" FieldType="" Description="Insurance Company Identifier"/>
<DBFFieldSpec FieldName="INS_ADDR1" Form="attribute" Name="InsuranceAddr1" FieldType="" Description="Insurance Address Line 1"/>
<DBFFieldSpec FieldName="INS_ADDR2" Form="attribute" Name="InsuranceAddr2" FieldType="" Description="Insurance Address Line 2"/>
<DBFFieldSpec FieldName="INS_CITY" Form="attribute" Name="InsuranceCity" FieldType="" Description="Insurance City"/>
<DBFFieldSpec FieldName="INS_ST" Form="attribute" Name="InsuranceState" FieldType="" Description="Insurance State"/>
<DBFFieldSpec FieldName="INS_ZIP" Form="attribute" Name="InsuranceZip" FieldType="" Description="Insurance Zip"/>
<DBFFieldSpec FieldName="INS_CTRY" Form="attribute" Name="InsuranceCountry" FieldType="" Description="Insurance Country"/>
<DBFFieldSpec FieldName="INS_PH1" Form="attribute" Name="InsurancePhone1" FieldType="" Description="Insurance Primary Phone"/>
<DBFFieldSpec FieldName="INS_PH1X" Form="attribute" Name="InsurancePhone1Ext" FieldType="" Description="Insurance Primary Phone Extension"/>
<DBFFieldSpec FieldName="INS_PH2" Form="attribute" Name="InsurancePhone2" FieldType="" Description="Insurance Secondary Phone"/>
<DBFFieldSpec FieldName="INS_PH2X" Form="attribute" Name="InsurancePhone2Ext" FieldType="" Description="Insurance Secondary Phone Extension"/>
<DBFFieldSpec FieldName="INS_FAX" Form="attribute" Name="InsuranceFax" FieldType="" Description="Insurance Fax"/>
<DBFFieldSpec FieldName="INS_FAXX" Form="attribute" Name="InsuranceFaxExt" FieldType="" Description="Insurance Fax Extension"/>
<DBFFieldSpec FieldName="INS_EA" Form="attribute" Name="InsuranceEmail" FieldType="" Description="Insurance Email Address"/>
<DBFFieldSpec FieldName="INSD_LN" Form="attribute" Name="InsuranceLName" FieldType="" Description="Insurance Last Name"/>
<DBFFieldSpec FieldName="CLM_NO" Form="attribute" Name="ClaimNumber" FieldType="" Description="Claim Number"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.AD2">
<DBFFileTranslation ID="ID5" ElementName="Admin2" Description="Administrative information2">
<DBFFieldSpec FieldName="EST_CT_LN" Form="attribute" Name="EstimatorL" FieldType="" Description="Estimator Lastname"/>
<DBFFieldSpec FieldName="EST_CT_FN" Form="attribute" Name="EstimatorF" FieldType="" Description="Estimator Firstname"/>
<DBFFieldSpec FieldName="EST_CO_NM" Form="attribute" Name="EstimatorCompanyName" FieldType="" Description="Estimator Company Name"/>
<DBFFieldSpec FieldName="EST_CO_ID" Form="attribute" Name="EstimatorCompanyID" FieldType="" Description="Estimator Company Identifier"/>
<DBFFieldSpec FieldName="EST_ADDR1" Form="attribute" Name="EstimatorAddr1" FieldType="" Description="Estimator Address1"/>
<DBFFieldSpec FieldName="EST_ADDR2" Form="attribute" Name="EstimatorAddr2" FieldType="" Description="Estimator Address2"/>
<DBFFieldSpec FieldName="EST_CITY" Form="attribute" Name="EstimatorCity" FieldType="" Description="Estimator City"/>
<DBFFieldSpec FieldName="EST_ST" Form="attribute" Name="EstimatorState" FieldType="" Description="Estimator State"/>
<DBFFieldSpec FieldName="EST_ZIP" Form="attribute" Name="EstimatorZip" FieldType="" Description="Estimator Zip"/>
<DBFFieldSpec FieldName="EST_CTRY" Form="attribute" Name="EstimatorCountry" FieldType="" Description="Estimator Country"/>
<DBFFieldSpec FieldName="EST_PH1" Form="attribute" Name="EstimatorPhone1" FieldType="" Description="Estimator Primary Phone"/>
<DBFFieldSpec FieldName="EST_PH1X" Form="attribute" Name="EstimatorPhone1Ext" FieldType="" Description="Estimator Primary Phone Extension"/>
<DBFFieldSpec FieldName="EST_PH2" Form="attribute" Name="EstimatorPhone2" FieldType="" Description="Estimator Secondary Phone"/>
<DBFFieldSpec FieldName="EST_PH2X" Form="attribute" Name="EstimatorPhone2Ext" FieldType="" Description="Estimator Secondary Phone Extension"/>
<DBFFieldSpec FieldName="EST_FAX" Form="attribute" Name="EstimatorFax" FieldType="" Description="Estimator Fax"/>
<DBFFieldSpec FieldName="EST_FAXX" Form="attribute" Name="EstimatorFaxExt" FieldType="" Description="Estimator Fax Extension"/>
<DBFFieldSpec FieldName="EST_EA" Form="attribute" Name="EstimatorEmail" FieldType="" Description="Estimator Email Address"/>
<DBFFieldSpec FieldName="EST_LIC_NO" Form="attribute" Name="EstimatorLicenseNumber" FieldType="" Description="Estimator License Number"/>
<DBFFieldSpec FieldName="EST_FILENO" Form="attribute" Name="EstimatorFileNumber" FieldType="" Description="Estimator File Number"/>
<DBFFieldSpec FieldName="RO_IN_DATE" Form="attribute" Name="VehicleInDate" FieldType="" Description="Date arrived in shop"/>
<DBFFieldSpec FieldName="RO_IN_TIME" Form="attribute" Name="VehicleInTime" FieldType="" Description="Time arrived in shop"/>
<DBFFieldSpec FieldName="TAR_DATE" Form="attribute" Name="TargetVehicleOutDate" FieldType="" Description="Target date to be completed"/>
<DBFFieldSpec FieldName="TAR_TIME" Form="attribute" Name="TargetVehicleOutTime" FieldType="" Description="Target time to be completed"/>
<DBFFieldSpec FieldName="RO_CMPDATE" Form="attribute" Name="VehicleOutDate" FieldType="" Description="Date completed"/>
<DBFFieldSpec FieldName="RO_CMPTIME" Form="attribute" Name="VehicleOutTime" FieldType="" Description="Time completed"/>
<DBFFieldSpec FieldName="RF_CO_NM" Form="attribute" Name="BodyShopName" FieldType="" Description="Body Shop Name"/>
</DBFFileTranslation>
</FileTranslation>
<FileTranslation TranslatorID="OECImportEngine.DBFTranslator" FileNameMask="*.TTL">
<DBFFileTranslation ID="ID6" ElementName="Total" Description="Total Table">
<DBFFieldSpec FieldName="G_TTL_AMT" Form="attribute" Name="GrandTotalAmount" FieldType="" Description=""/>
</DBFFileTranslation>
</FileTranslation>
</FileTranslations>
<StyleSheetTranslation>
<StyleSheetURL>Mitchell.xsl</StyleSheetURL>
</StyleSheetTranslation>
</TranslationDescriptor>

File diff suppressed because one or more lines are too long

View File

@@ -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
@@ -1348,6 +1348,27 @@
</translation>
</translations>
</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>
<name>jobmodifylbradj</name>
<definition_loaded>false</definition_loaded>
@@ -2716,6 +2737,27 @@
</translation>
</translations>
</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>
<name>local_tax</name>
<definition_loaded>false</definition_loaded>
@@ -6092,6 +6134,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>gst_override</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>la1</name>
<definition_loaded>false</definition_loaded>
@@ -6491,6 +6554,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>pag</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>pal</name>
<definition_loaded>false</definition_loaded>
@@ -7994,6 +8078,27 @@
<folder_node>
<name>cdk</name>
<children>
<concept_node>
<name>controllist</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>payers</name>
<definition_loaded>false</definition_loaded>
@@ -8038,6 +8143,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>pbs_serialnumber</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>title</name>
<definition_loaded>false</definition_loaded>
@@ -12104,6 +12230,63 @@
</folder_node>
</children>
</folder_node>
<folder_node>
<name>dms</name>
<children>
<folder_node>
<name>errors</name>
<children>
<concept_node>
<name>alreadyexported</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>
</children>
</folder_node>
<folder_node>
<name>labels</name>
<children>
<concept_node>
<name>refreshallocations</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>
</children>
</folder_node>
</children>
</folder_node>
<folder_node>
<name>documents</name>
<children>
@@ -14016,6 +14199,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>tryagain</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>view</name>
<definition_loaded>false</definition_loaded>
@@ -14063,6 +14267,27 @@
<folder_node>
<name>errors</name>
<children>
<concept_node>
<name>fcm</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>notfound</name>
<definition_loaded>false</definition_loaded>
@@ -14451,6 +14676,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>help</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>hours</name>
<definition_loaded>false</definition_loaded>
@@ -17198,6 +17444,27 @@
</translation>
</translations>
</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>
<name>new</name>
<definition_loaded>false</definition_loaded>
@@ -17659,6 +17926,27 @@
</translation>
</translations>
</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>
<name>deliver</name>
<definition_loaded>false</definition_loaded>
@@ -17767,6 +18055,32 @@
</translation>
</translations>
</concept_node>
<folder_node>
<name>labels</name>
<children>
<concept_node>
<name>refreshallocations</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>
</children>
</folder_node>
<concept_node>
<name>post</name>
<definition_loaded>false</definition_loaded>
@@ -18273,6 +18587,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>sendtodms</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>sync</name>
<definition_loaded>false</definition_loaded>
@@ -20377,6 +20712,27 @@
</concept_node>
</children>
</folder_node>
<concept_node>
<name>dms_allocation</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>driveable</name>
<definition_loaded>false</definition_loaded>
@@ -22109,6 +22465,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>po_number</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>policy_no</name>
<definition_loaded>false</definition_loaded>
@@ -24533,6 +24910,27 @@
</concept_node>
</children>
</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>
<name>creating_new_job</name>
<definition_loaded>false</definition_loaded>
@@ -26868,6 +27266,27 @@
</translation>
</translations>
</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>
<name>partsqueue</name>
<definition_loaded>false</definition_loaded>
@@ -29508,6 +29927,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>nopush</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>phonenumber</name>
<definition_loaded>false</definition_loaded>

View File

@@ -1,53 +1,56 @@
importScripts("https://www.gstatic.com/firebasejs/7.14.2/firebase-app.js");
importScripts(
"https://www.gstatic.com/firebasejs/7.14.2/firebase-messaging.js"
);
// Scripts for firebase and firebase messaging
importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-app.js");
importScripts("https://www.gstatic.com/firebasejs/8.2.0/firebase-messaging.js");
firebase.initializeApp({
apiKey: "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
authDomain: "imex-prod.firebaseapp.com",
databaseURL: "https://imex-prod.firebaseio.com",
projectId: "imex-prod",
storageBucket: "imex-prod.appspot.com",
messagingSenderId: "253497221485",
appId: "1:253497221485:web:3c81c483b94db84b227a64",
measurementId: "G-NTWBKG2L0M",
});
// Initialize the Firebase app in the service worker by passing the generated config
let firebaseConfig;
switch (this.location.hostname) {
case "localhost":
firebaseConfig = {
apiKey: "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc",
authDomain: "imex-dev.firebaseapp.com",
databaseURL: "https://imex-dev.firebaseio.com",
projectId: "imex-dev",
storageBucket: "imex-dev.appspot.com",
messagingSenderId: "759548147434",
appId: "1:759548147434:web:e8239868a48ceb36700993",
measurementId: "G-K5XRBVVB4S",
};
break;
case "test.imex.online":
firebaseConfig = {
apiKey: "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c",
authDomain: "imex-test.firebaseapp.com",
projectId: "imex-test",
storageBucket: "imex-test.appspot.com",
messagingSenderId: "991923618608",
appId: "1:991923618608:web:633437569cdad78299bef5",
// measurementId: "${config.measurementId}",
};
break;
case "imex.online":
default:
firebaseConfig = {
apiKey: "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
authDomain: "imex-prod.firebaseapp.com",
databaseURL: "https://imex-prod.firebaseio.com",
projectId: "imex-prod",
storageBucket: "imex-prod.appspot.com",
messagingSenderId: "253497221485",
appId: "1:253497221485:web:3c81c483b94db84b227a64",
measurementId: "G-NTWBKG2L0M",
};
}
// firebase.initializeApp({
// apiKey: "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc",
// authDomain: "imex-dev.firebaseapp.com",
// databaseURL: "https://imex-dev.firebaseio.com",
// projectId: "imex-dev",
// storageBucket: "imex-dev.appspot.com",
// messagingSenderId: "759548147434",
// appId: "1:759548147434:web:e8239868a48ceb36700993",
// measurementId: "G-K5XRBVVB4S",
// });
firebase.initializeApp(firebaseConfig);
// Retrieve firebase messaging
const messaging = firebase.messaging();
self.addEventListener("fetch", (fetch) => {
//required for installation as a PWA. Can ignore for now.
//console.log("fetch", fetch);
});
messaging.onBackgroundMessage(function (payload) {
// Customize notification here
const channel = new BroadcastChannel("imex-sw-messages");
channel.postMessage(payload);
messaging.setBackgroundMessageHandler(function (payload) {
return self.registration.showNotification(
"[SW]" + payload.notification.title,
payload.notification
);
});
//Handles the notification getting clicked.
self.addEventListener("notificationclick", function (event) {
console.log("SW notificationclick", event);
// event.notification.close();
if (event.action === "archive") {
// Archive action was clicked
archiveEmail();
} else {
// Main body of notification was clicked
clients.openWindow("/inbox");
}
//self.registration.showNotification(notificationTitle, notificationOptions);
});

View File

@@ -1,7 +1,4 @@
import { ApolloProvider } from "@apollo/client";
//import trackerRedux from "@openreplay/tracker-redux";
import Tracker from "@openreplay/tracker";
import trackerGraphQL from "@openreplay/tracker-graphql";
import { SplitFactory, SplitSdk } from "@splitsoftware/splitio-react";
import { ConfigProvider } from "antd";
import enLocale from "antd/es/locale/en_US";
@@ -10,31 +7,14 @@ import moment from "moment";
import React from "react";
import { useTranslation } from "react-i18next";
import GlobalLoadingBar from "../components/global-loading-bar/global-loading-bar.component";
//import trackerAssist from "@openreplay/tracker-assist";
import { getCurrentUser } from "../firebase/firebase.utils";
import client from "../utils/GraphQLClient";
import App from "./App";
moment.locale("en-US");
export const tracker = new Tracker({
projectKey: "trDmOZlEXUpjGsMtHroA",
ingestPoint: "https://replay.imex.online/ingest",
...(process.env.NODE_ENV === null || process.env.NODE_ENV === "development"
? { __DISABLE_SECURE_MODE: true }
: {}),
// beaconSize: 10485760,
onStart: async ({ sessionID }) => {
const user = await getCurrentUser();
if (user) tracker.setUserID(user.email);
},
});
// tracker.use(
// trackerAssist({ confirmText: "Technical support is about to assist you." })
// ); // check the list of available options below
export const recordGraphQL = tracker.use(trackerGraphQL());
tracker.start();
//tracker.start();
if (process.env.NODE_ENV === "production") LogRocket.init("gvfvfw/bodyshopapp");
export const factory = SplitSdk({

View File

@@ -251,7 +251,10 @@ function BillEnterModalContainer({
keyboard="false"
onOk={() => form.submit()}
onCancel={handleCancel}
afterClose={() => form.resetFields()}
afterClose={() => {
form.resetFields();
setLoading(false);
}}
footer={
<Space>
<Button onClick={handleCancel}>{t("general.actions.cancel")}</Button>

View File

@@ -1,6 +1,8 @@
import { UploadOutlined } from "@ant-design/icons";
import Icon, { UploadOutlined } from "@ant-design/icons";
import { useApolloClient } from "@apollo/client";
import { MdOpenInNew } from "react-icons/md";
import {
Alert,
Divider,
Form,
Input,
@@ -13,6 +15,7 @@ import {
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { CHECK_BILL_INVOICE_NUMBER } from "../../graphql/bills.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
@@ -132,6 +135,30 @@ export function BillFormComponent({
/>
</Form.Item>
</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>
<Form.Item
label={t("bills.fields.invoice_number")}
@@ -337,6 +364,7 @@ export function BillFormComponent({
responsibilityCenters={responsibilityCenters}
disabled={disabled}
/>
<Form.Item
name="upload"
label="Upload"

View File

@@ -7,13 +7,14 @@ import {
Select,
Space,
Switch,
Table,
Table
} from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CiecaSelect from "../../utils/Ciecaselect";
import BillLineSearchSelect from "../bill-line-search-select/bill-line-search-select.component";
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
@@ -72,11 +73,13 @@ export function BillEnterModalLinesComponent({
quantity: opt.part_qty || 1,
actual_price: opt.cost,
cost_center: opt.part_type
? responsibilityCenters.defaults &&
(responsibilityCenters.defaults.costs[
opt.part_type
] ||
null)
? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid
? opt.part_type
: responsibilityCenters.defaults &&
(responsibilityCenters.defaults.costs[
opt.part_type
] ||
null)
: null,
};
}
@@ -224,6 +227,7 @@ export function BillEnterModalLinesComponent({
key: `${field.index}cost_center`,
name: [field.name, "cost_center"],
label: t("billlines.fields.cost_center"),
valuePropName: "value",
rules: [
{
required: true,
@@ -233,10 +237,12 @@ export function BillEnterModalLinesComponent({
};
},
formInput: (record, index) => (
<Select style={{ minWidth: "3rem" }} disabled={disabled}>
{responsibilityCenters.costs.map((item) => (
<Select.Option key={item.name}>{item.name}</Select.Option>
))}
<Select showSearch style={{ minWidth: "3rem" }} disabled={disabled}>
{bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? CiecaSelect(true, false)
: responsibilityCenters.costs.map((item) => (
<Select.Option key={item.name}>{item.name}</Select.Option>
))}
</Select>
),
},

View File

@@ -1,43 +0,0 @@
import { MessageOutlined } from "@ant-design/icons";
import { Badge, Card } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { toggleChatVisible } from "../../redux/messaging/messaging.actions";
import { selectChatVisible } from "../../redux/messaging/messaging.selectors";
import ChatPopupComponent from '../chat-popup/chat-popup.component'
const mapStateToProps = createStructuredSelector({
chatVisible: selectChatVisible,
});
const mapDispatchToProps = (dispatch) => ({
toggleChatVisible: () => dispatch(toggleChatVisible()),
});
export function ChatAffixComponent({
chatVisible,
toggleChatVisible,
conversationList,
unreadCount,
}) {
const { t } = useTranslation();
return (
<Badge count={unreadCount}>
<Card size='small'>
{chatVisible ? (
<ChatPopupComponent conversationList={conversationList} />
) : (
<div
onClick={() => toggleChatVisible()}
style={{ cursor: "pointer" }}>
<MessageOutlined />
<strong>{t("messaging.labels.messaging")}</strong>
</div>
)}
</Card>
</Badge>
);
}
export default connect(mapStateToProps, mapDispatchToProps)(ChatAffixComponent);

View File

@@ -1,13 +1,16 @@
import { useSubscription } from "@apollo/client";
import React from "react";
import { useApolloClient } from "@apollo/client";
import { getToken, onMessage } from "@firebase/messaging";
import { Button, notification, Space } from "antd";
import axios from "axios";
import React, { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { CONVERSATION_LIST_SUBSCRIPTION } from "../../graphql/conversations.queries";
import { messaging, requestForToken } from "../../firebase/firebase.utils";
import { selectChatVisible } from "../../redux/messaging/messaging.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import ChatAffixComponent from "./chat-affix.component";
import FcmHandler from "../../utils/fcm-handler";
import ChatPopupComponent from "../chat-popup/chat-popup.component";
import "./chat-affix.styles.scss";
const mapStateToProps = createStructuredSelector({
@@ -16,32 +19,87 @@ const mapStateToProps = createStructuredSelector({
});
export function ChatAffixContainer({ bodyshop, chatVisible }) {
const { loading, error, data } = useSubscription(
CONVERSATION_LIST_SUBSCRIPTION,
{
skip: !bodyshop || (bodyshop && !bodyshop.messagingservicesid),
}
);
const { t } = useTranslation();
const client = useApolloClient();
useEffect(() => {
if (!bodyshop || !bodyshop.messagingservicesid) return;
if (loading) return <LoadingSpinner />;
if (error) return <AlertComponent message={error.message} type="error" />;
async function SubscribeToTopic() {
try {
const r = await axios.post("/notifications/subscribe", {
fcm_tokens: await getToken(messaging, {
vapidKey: process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY,
}),
type: "messaging",
imexshopid: bodyshop.imexshopid,
});
console.log("FCM Topic Subscription", r.data);
} catch (error) {
console.log(
"Error attempting to subscribe to messaging topic: ",
error
);
notification.open({
type: "warning",
message: t("general.errors.fcm"),
btn: (
<Space>
<Button
onClick={async () => {
await requestForToken();
SubscribeToTopic();
}}
>
{t("general.actions.tryagain")}
</Button>
<Button
onClick={() => {
const win = window.open(
"https://help.imex.online/en/article/enabling-notifications-o978xi/",
"_blank"
);
win.focus();
}}
>
{t("general.labels.help")}
</Button>
</Space>
),
});
}
}
SubscribeToTopic();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [bodyshop]);
useEffect(() => {
function handleMessage(payload) {
FcmHandler({
client,
payload: (payload && payload.data && payload.data.data) || payload.data,
});
}
let stopMessageListenr, channel;
try {
stopMessageListenr = onMessage(messaging, handleMessage);
channel = new BroadcastChannel("imex-sw-messages");
channel.addEventListener("message", handleMessage);
} catch (error) {
console.log("Unable to set event listeners.");
}
return () => {
stopMessageListenr && stopMessageListenr();
channel && channel.removeEventListener("message", handleMessage);
};
}, [client]);
if (!bodyshop || !bodyshop.messagingservicesid) return <></>;
return (
<div className={`chat-affix ${chatVisible ? "chat-affix-open" : ""}`}>
{bodyshop && bodyshop.messagingservicesid ? (
<ChatAffixComponent
conversationList={(data && data.conversations) || []}
unreadCount={
(data &&
data.conversations.reduce((acc, val) => {
return (acc = acc + val.messages_aggregate.aggregate.count);
}, 0)) ||
0
}
/>
) : null}
{bodyshop && bodyshop.messagingservicesid ? <ChatPopupComponent /> : null}
</div>
);
}

View File

@@ -1,14 +1,12 @@
import { Badge, List, Tag, Tooltip } from "antd";
import { AlertFilled } from "@ant-design/icons";
import { Badge, List, Tag } from "antd";
import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { setSelectedConversation } from "../../redux/messaging/messaging.actions";
import { selectSelectedConversation } from "../../redux/messaging/messaging.selectors";
import { TimeAgoFormatter } from "../../utils/DateFormatter";
import PhoneFormatter from "../../utils/PhoneFormatter";
import "./chat-conversation-list.styles.scss";
import { useTranslation } from "react-i18next";
import { TimeAgoFormatter } from "../../utils/DateFormatter";
const mapStateToProps = createStructuredSelector({
selectedConversation: selectSelectedConversation,
@@ -24,8 +22,6 @@ export function ChatConversationListComponent({
selectedConversation,
setSelectedConversation,
}) {
const { t } = useTranslation();
return (
<div className="chat-list-container">
<List
@@ -33,6 +29,7 @@ export function ChatConversationListComponent({
dataSource={conversationList}
renderItem={(item) => (
<List.Item
key={item.id}
onClick={() => setSelectedConversation(item.id)}
className={`chat-list-item ${
item.id === selectedConversation
@@ -43,19 +40,9 @@ export function ChatConversationListComponent({
{item.job_conversations.length > 0 ? (
<div className="chat-name">
{item.job_conversations.map((j, idx) => (
<div key={idx} style={{ display: "flex" }}>
{j.job.owner && !j.job.owner.allow_text_message && (
<Tooltip title={t("messaging.labels.noallowtxt")}>
<AlertFilled
className="production-alert"
style={{ marginRight: ".3rem", alignItems: "center" }}
/>
</Tooltip>
)}
<div>{`${j.job.ownr_fn || ""} ${j.job.ownr_ln || ""} ${
j.job.ownr_co_nm || ""
} `}</div>
</div>
<div key={idx}>{`${j.job.ownr_fn || ""} ${
j.job.ownr_ln || ""
} ${j.job.ownr_co_nm || ""} `}</div>
))}
</div>
) : (

View File

@@ -9,6 +9,7 @@ import "./chat-conversation.styles.scss";
export default function ChatConversationComponent({
subState,
conversation,
messages,
handleMarkConversationAsRead,
}) {
const [loading, error] = subState;
@@ -16,8 +17,6 @@ export default function ChatConversationComponent({
if (loading) return <LoadingSkeleton />;
if (error) return <AlertComponent message={error.message} type="error" />;
const messages = (conversation && conversation.messages) || [];
return (
<div
className="chat-conversation"

View File

@@ -1,18 +1,32 @@
import { useMutation, useSubscription } from "@apollo/client";
import { useMutation, useQuery, useSubscription } from "@apollo/client";
import React, { useState } from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { CONVERSATION_SUBSCRIPTION_BY_PK } from "../../graphql/conversations.queries";
import {
CONVERSATION_SUBSCRIPTION_BY_PK,
GET_CONVERSATION_DETAILS,
} from "../../graphql/conversations.queries";
import { MARK_MESSAGES_AS_READ_BY_CONVERSATION } from "../../graphql/messages.queries";
import { selectSelectedConversation } from "../../redux/messaging/messaging.selectors";
import ChatConversationComponent from "./chat-conversation.component";
import axios from "axios";
import { selectBodyshop } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
selectedConversation: selectSelectedConversation,
bodyshop: selectBodyshop,
});
export default connect(mapStateToProps, null)(ChatConversationContainer);
export function ChatConversationContainer({ selectedConversation }) {
export function ChatConversationContainer({ bodyshop, selectedConversation }) {
const {
loading: convoLoading,
error: convoError,
data: convoData,
} = useQuery(GET_CONVERSATION_DETAILS, {
variables: { conversationId: selectedConversation },
});
const { loading, error, data } = useSubscription(
CONVERSATION_SUBSCRIPTION_BY_PK,
{
@@ -26,30 +40,46 @@ export function ChatConversationContainer({ selectedConversation }) {
MARK_MESSAGES_AS_READ_BY_CONVERSATION,
{
variables: { conversationId: selectedConversation },
update(cache) {
cache.modify({
id: cache.identify({
__typename: "conversations",
id: selectedConversation,
}),
fields: {
messages_aggregate(cached) {
return { aggregate: { count: 0 } };
},
},
});
},
}
);
const unreadCount =
(data &&
data.conversations_by_pk &&
data.conversations_by_pk &&
data.conversations_by_pk.messages_aggregate &&
data.conversations_by_pk.messages_aggregate.aggregate &&
data.conversations_by_pk.messages_aggregate.aggregate.count) ||
0;
data &&
data.messages &&
data.messages.reduce((acc, val) => {
return !val.read && !val.isoutbound ? acc + 1 : acc;
}, 0);
const handleMarkConversationAsRead = async () => {
if (unreadCount > 0 && !!selectedConversation && !markingAsReadInProgress) {
setMarkingAsReadInProgress(true);
await markConversationRead();
await markConversationRead({});
await axios.post("/sms/markConversationRead", {
conversationid: selectedConversation,
imexshopid: bodyshop.imexshopid,
});
setMarkingAsReadInProgress(false);
}
};
return (
<ChatConversationComponent
subState={[loading, error]}
conversation={data ? data.conversations_by_pk : {}}
subState={[loading || convoLoading, error || convoError]}
conversation={convoData ? convoData.conversations_by_pk : {}}
messages={data ? data.messages : []}
handleMarkConversationAsRead={handleMarkConversationAsRead}
/>
);

View File

@@ -46,7 +46,7 @@ export function ChatNewConversation({ openChatByPhone }) {
return (
<Popover trigger="click" content={popContent}>
<PlusCircleFilled style={{ margin: "1rem" }} />
<PlusCircleFilled />
</Popover>
);
}

View File

@@ -1,54 +1,119 @@
import { ShrinkOutlined, InfoCircleOutlined } from "@ant-design/icons";
import { Col, Row, Tooltip, Typography } from "antd";
import React from "react";
import {
InfoCircleOutlined,
MessageOutlined,
ShrinkOutlined,
SyncOutlined,
} from "@ant-design/icons";
import { useQuery } from "@apollo/client";
import { Badge, Card, Col, Row, Space, Tag, Tooltip, Typography } from "antd";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { CONVERSATION_LIST_QUERY } from "../../graphql/conversations.queries";
import { toggleChatVisible } from "../../redux/messaging/messaging.actions";
import {
selectChatVisible,
selectSelectedConversation,
} from "../../redux/messaging/messaging.selectors";
import ChatConversationListComponent from "../chat-conversation-list/chat-conversation-list.component";
import ChatConversationContainer from "../chat-conversation/chat-conversation.container";
import { selectSelectedConversation } from "../../redux/messaging/messaging.selectors";
import "./chat-popup.styles.scss";
import ChatNewConversation from "../chat-new-conversation/chat-new-conversation.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import "./chat-popup.styles.scss";
const mapStateToProps = createStructuredSelector({
selectedConversation: selectSelectedConversation,
chatVisible: selectChatVisible,
});
const mapDispatchToProps = (dispatch) => ({
toggleChatVisible: () => dispatch(toggleChatVisible()),
});
export function ChatPopupComponent({
conversationList,
chatVisible,
selectedConversation,
toggleChatVisible,
}) {
const { t } = useTranslation();
return (
<div className="chat-popup">
<div style={{ display: "flex", alignItems: "center" }}>
<Typography.Title level={4}>
{t("messaging.labels.messaging")}
</Typography.Title>
<ChatNewConversation />
<Tooltip title={t("messaging.labels.recentonly")}>
<InfoCircleOutlined />
</Tooltip>
</div>
<ShrinkOutlined
onClick={() => toggleChatVisible()}
style={{ position: "absolute", right: ".5rem", top: ".5rem" }}
/>
const [pollInterval, setpollInterval] = useState(0);
const { loading, data, refetch, called } = useQuery(CONVERSATION_LIST_QUERY, {
...(pollInterval > 0 ? { pollInterval } : {}),
});
<Row gutter={[8, 8]} className="chat-popup-content">
<Col span={8}>
<ChatConversationListComponent conversationList={conversationList} />
</Col>
<Col span={16}>
{selectedConversation ? <ChatConversationContainer /> : null}
</Col>
</Row>
</div>
const fcmToken = sessionStorage.getItem("fcmtoken");
useEffect(() => {
if (fcmToken) {
setpollInterval(0);
} else {
setpollInterval(60000);
}
}, [fcmToken]);
useEffect(() => {
if (called && chatVisible) refetch();
}, [chatVisible, called, refetch]);
const unreadCount = data
? data.conversations.reduce(
(acc, val) => val.messages_aggregate.aggregate.count + acc,
0
)
: 0;
return (
<Badge count={unreadCount}>
<Card size="small">
{chatVisible ? (
<div className="chat-popup">
<Space align="center">
<Typography.Title level={4}>
{t("messaging.labels.messaging")}
</Typography.Title>
<ChatNewConversation />
<Tooltip title={t("messaging.labels.recentonly")}>
<InfoCircleOutlined />
</Tooltip>
<SyncOutlined
style={{ cursor: "pointer" }}
onClick={() => refetch()}
/>
{pollInterval > 0 && (
<Tag color="yellow">{t("messaging.labels.nopush")}</Tag>
)}
</Space>
<ShrinkOutlined
onClick={() => toggleChatVisible()}
style={{ position: "absolute", right: ".5rem", top: ".5rem" }}
/>
<Row gutter={[8, 8]} className="chat-popup-content">
<Col span={8}>
{loading ? (
<LoadingSpinner />
) : (
<ChatConversationListComponent
conversationList={data ? data.conversations : []}
/>
)}
</Col>
<Col span={16}>
{selectedConversation ? <ChatConversationContainer /> : null}
</Col>
</Row>
</div>
) : (
<div
onClick={() => toggleChatVisible()}
style={{ cursor: "pointer" }}
>
<MessageOutlined />
<strong>{t("messaging.labels.messaging")}</strong>
</div>
)}
</Card>
</Badge>
);
}
export default connect(mapStateToProps, mapDispatchToProps)(ChatPopupComponent);

View File

@@ -95,19 +95,22 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) {
columns={columns}
rowKey="center"
dataSource={allocationsSummary}
locale={{ emptyText: t("dms.labels.refreshallocations") }}
summary={() => {
const totals = allocationsSummary.reduce(
(acc, val) => {
return {
totalSale: acc.totalSale.add(Dinero(val.sale)),
totalCost: acc.totalCost.add(Dinero(val.cost)),
};
},
{
totalSale: Dinero(),
totalCost: Dinero(),
}
);
const totals =
allocationsSummary &&
allocationsSummary.reduce(
(acc, val) => {
return {
totalSale: acc.totalSale.add(Dinero(val.sale)),
totalCost: acc.totalCost.add(Dinero(val.cost)),
};
},
{
totalSale: Dinero(),
totalCost: Dinero(),
}
);
return (
<Table.Summary.Row>
@@ -117,7 +120,7 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) {
</Typography.Title>
</Table.Summary.Cell>
<Table.Summary.Cell>
{totals.totalSale.toFormat()}
{totals && totals.totalSale.toFormat()}
</Table.Summary.Cell>
<Table.Summary.Cell>
{

View File

@@ -48,7 +48,7 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
];
return (
<div>
<>
<Modal
width={"90%"}
visible={visible}
@@ -100,6 +100,6 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
>
{t("jobs.actions.dms.findmakemodelcode")}
</Button>
</div>
</>
);
}

View File

@@ -4,9 +4,12 @@ import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import {
selectBodyshop,
selectCurrentUser,
} from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
currentUser: selectCurrentUser,
bodyshop: selectBodyshop,
});
const mapDispatchToProps = (dispatch) => ({
@@ -14,9 +17,12 @@ const mapDispatchToProps = (dispatch) => ({
});
export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkMakesRefetch);
export function DmsCdkMakesRefetch({ bodyshop, form, socket }) {
export function DmsCdkMakesRefetch({ currentUser, bodyshop, form, socket }) {
const [loading, setLoading] = useState(false);
const { t } = useTranslation();
if (!currentUser.email.includes("@imex.")) return null;
const handleRefetch = async () => {
setLoading(true);
await axios.post("/cdk/getvehicles", {

View File

@@ -34,10 +34,6 @@ export function DmsCustomerSelector({ bodyshop }) {
setVisible(true);
setDmsType("pbs");
setcustomerList(customerList);
console.log(
"🚀 ~ file: dms-customer-selector.component.jsx ~ line 37 ~ socket.on ~ customerList",
customerList
);
});
const onUseSelected = () => {
@@ -49,7 +45,7 @@ export function DmsCustomerSelector({ bodyshop }) {
const onUseGeneric = () => {
setVisible(false);
socket.emit(
"cdk-selected-customer",
`${dmsType}selected-customer`,
bodyshop.cdk_configuration.generic_customer_number
);
setSelectedCustomer(null);
@@ -57,7 +53,7 @@ export function DmsCustomerSelector({ bodyshop }) {
const onCreateNew = () => {
setVisible(false);
socket.emit("cdk-selected-customer", null);
socket.emit(`${dmsType}-selected-customer`, null);
setSelectedCustomer(null);
};
@@ -86,11 +82,13 @@ export function DmsCustomerSelector({ bodyshop }) {
//dataIndex: ["name2", "fullName"],
key: "address",
render: (record, value) =>
`${record.address && record.address.addressLine[0]}, ${
record.address && record.address.city
} ${record.address && record.address.stateOrProvince} ${
record.address && record.address.postalCode
}`,
`${
record.address &&
record.address.addressLine &&
record.address.addressLine[0]
}, ${record.address && record.address.city} ${
record.address && record.address.stateOrProvince
} ${record.address && record.address.postalCode}`,
},
];
@@ -100,12 +98,6 @@ export function DmsCustomerSelector({ bodyshop }) {
dataIndex: "ContactId",
key: "ContactId",
},
{
title: t("jobs.fields.dms.vinowner"),
dataIndex: "vinOwner",
key: "vinOwner",
render: (text, record) => <Checkbox disabled checked={record.vinOwner} />,
},
{
title: t("jobs.fields.dms.name1"),
key: "name1",

View File

@@ -22,7 +22,9 @@ export default connect(mapStateToProps, mapDispatchToProps)(DmsLogEvents);
export function DmsLogEvents({ socket, logs, bodyshop }) {
return (
<Timeline pending reverse={true}>
<Timeline pending
reverse={true}
>
{logs.map((log, idx) => (
<Timeline.Item key={idx} color={LogLevelHierarchy(log.level)}>
<Space wrap align="start" style={{}}>

View File

@@ -1,11 +1,13 @@
import { DeleteFilled } from "@ant-design/icons";
import { DeleteFilled, DownOutlined } from "@ant-design/icons";
import {
Button,
Card,
Divider,
Dropdown,
Form,
Input,
InputNumber,
Menu,
Select,
Space,
Statistic,
@@ -19,9 +21,9 @@ import { createStructuredSelector } from "reselect";
import { determineDmsType } from "../../pages/dms/dms.container";
import { selectBodyshop } from "../../redux/user/user.selectors";
import DmsCdkMakes from "../dms-cdk-makes/dms-cdk-makes.component";
import DmsCdkMakesRefetch from "../dms-cdk-makes/dms-cdk-makes.refetch.component";
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import DmsCdkMakesRefetch from "../dms-cdk-makes/dms-cdk-makes.refetch.component";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -31,7 +33,7 @@ const mapDispatchToProps = (dispatch) => ({
});
export default connect(mapStateToProps, mapDispatchToProps)(DmsPostForm);
export function DmsPostForm({ bodyshop, socket, job }) {
export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
const [form] = Form.useForm();
const { t } = useTranslation();
@@ -59,6 +61,14 @@ export function DmsPostForm({ bodyshop, socket, job }) {
jobid: job.id,
txEnvelope: values,
});
console.log(logsRef);
if (logsRef) {
console.log("executing", logsRef);
logsRef.curent &&
logsRef.current.scrollIntoView({
behavior: "smooth",
});
}
};
return (
@@ -120,33 +130,36 @@ export function DmsPostForm({ bodyshop, socket, job }) {
</LayoutFormRow>
{bodyshop.cdk_dealerid && (
<LayoutFormRow style={{ justifyContent: "center" }} grow>
<Form.Item
name="dms_make"
label={t("jobs.fields.dms.dms_make")}
rules={[
{
required: true,
},
]}
>
<Input disabled />
</Form.Item>
<Form.Item
name="dms_model"
label={t("jobs.fields.dms.dms_model")}
rules={[
{
required: true,
},
]}
>
<Input disabled />
</Form.Item>
<DmsCdkMakes form={form} socket={socket} job={job} />
<DmsCdkMakesRefetch />
</LayoutFormRow>
<div>
<LayoutFormRow style={{ justifyContent: "center" }} grow>
<Form.Item
name="dms_make"
label={t("jobs.fields.dms.dms_make")}
rules={[
{
required: true,
},
]}
>
<Input disabled />
</Form.Item>
<Form.Item
name="dms_model"
label={t("jobs.fields.dms.dms_model")}
rules={[
{
required: true,
},
]}
>
<Input disabled />
</Form.Item>
</LayoutFormRow>
<Space>
<DmsCdkMakes form={form} socket={socket} job={job} />
<DmsCdkMakesRefetch />
</Space>
</div>
)}
<Form.Item
name="story"
@@ -219,7 +232,47 @@ export function DmsPostForm({ bodyshop, socket, job }) {
</Form.Item>
<Form.Item
label={t("jobs.fields.dms.payer.controlnumber")}
label={
<div>
{t("jobs.fields.dms.payer.controlnumber")}{" "}
<Dropdown
overlay={
<Menu>
{bodyshop.cdk_configuration.controllist &&
bodyshop.cdk_configuration.controllist.map(
(key, idx) => (
<Menu.Item
key={idx}
onClick={() => {
form.setFieldsValue({
payers: form
.getFieldValue("payers")
.map((row, mapIndex) => {
if (index !== mapIndex)
return row;
return {
...row,
controlnumber:
key.controlnumber,
};
}),
});
}}
>
{key.name}
</Menu.Item>
)
)}
</Menu>
}
>
<a href=" #" onClick={(e) => e.preventDefault()}>
<DownOutlined />
</a>
</Dropdown>
</div>
}
key={`${index}controlnumber`}
name={[field.name, "controlnumber"]}
rules={[

View File

@@ -9,7 +9,6 @@ import {
selectBodyshop,
selectCurrentUser,
} from "../../redux/user/user.selectors";
import { tracker } from "../../App/App.container";
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser,
@@ -37,7 +36,6 @@ class ErrorBoundary extends React.Component {
componentDidCatch(error, info) {
console.log("Exception Caught by Error Boundary.", error, info);
this.setState({ ...this.state, error, info });
tracker.event("error_boundary", error, true);
}
handleErrorSubmit = () => {

View File

@@ -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>
);
}

View File

@@ -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 PartsOrderModalContainer from "../parts-order-modal/parts-order-modal.container";
import _ from "lodash";
import JobCreateIOU from "../job-create-iou/job-create-iou.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
@@ -427,6 +428,7 @@ export function JobLinesComponent({
>
{t("joblines.actions.new")}
</Button>
<JobCreateIOU jobid={job.id} selectedJobLines={selectedLines} />
<Input.Search
placeholder={t("general.labels.search")}
onChange={(e) => {

View File

@@ -1,5 +1,6 @@
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 { useMutation } from "@apollo/client";
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" }}
onClick={() => !disabled && setEditing(true)}
>
{jobline.ioucreated && (
<Space>
<FieldTimeOutlined />
{t("joblines.labels.ioucreated")}
</Space>
)}
{jobline.notes}
</div>
);

View File

@@ -100,7 +100,7 @@ export function JobsAvailableContainer({
}
//IO-539 Check for Parts Rate on PAL for SGI use case.
await CheckTaxRates(estData.est_data, bodyshop);
console.log(estData);
const newTotals = (
await Axios.post("/job/totals", {
job: {

View File

@@ -54,6 +54,7 @@ export function JobsCloseAutoAllocate({ bodyshop, joblines, form, disabled }) {
const handleMenuClick = ({ item, key, keyPath, domEvent }) => {
logImEXEvent("jobs_close_allocate_auto_dms");
form.setFieldsValue({ dms_allocation: key });
handleAllocate(
bodyshop.md_responsibility_centers.dms_defaults.find(
(x) => x.name === key
@@ -64,7 +65,9 @@ export function JobsCloseAutoAllocate({ bodyshop, joblines, form, disabled }) {
const overlay = (bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
<Menu onClick={handleMenuClick}>
{bodyshop.md_responsibility_centers.dms_defaults.map((mapping) => (
<Menu.Item key={mapping.name}>{mapping.name}</Menu.Item>
<Menu.Item disabled={disabled} key={mapping.name}>
{mapping.name}
</Menu.Item>
))}
</Menu>
);

View File

@@ -2,6 +2,8 @@ import Axios from "axios";
import _ from "lodash";
import { logImEXEvent } from "../../firebase/firebase.utils";
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(
apolloClient,
@@ -57,3 +59,71 @@ export default async function DuplicateJob(
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;
}

View File

@@ -38,12 +38,7 @@ export function LaborAllocationsTable({
useEffect(() => {
if (!!joblines && !!timetickets && !!bodyshop);
setTotals(
CalculateAllocationsTotals(
bodyshop.md_responsibility_centers,
joblines,
timetickets,
adjustments
)
CalculateAllocationsTotals(bodyshop, joblines, timetickets, adjustments)
);
if (!jobId) setTotals([]);
}, [joblines, timetickets, bodyshop, adjustments, jobId]);

View File

@@ -1,9 +1,12 @@
import i18next from "i18next";
export const CalculateAllocationsTotals = (
responsibilitycenters,
bodyshop,
joblines,
timetickets,
adjustments = []
) => {
const responsibilitycenters = bodyshop.md_responsibility_centers;
const jobCodes = joblines.map((item) => item.mod_lbr_ty);
//.filter((value, index, self) => self.indexOf(value) === index && !!value);
const ticketCodes = timetickets.map((item) => item.ciecacode);
@@ -15,7 +18,12 @@ export const CalculateAllocationsTotals = (
const r = allCodes.reduce((acc, value) => {
const r = {
opcode: value,
cost_center: responsibilitycenters.defaults.costs[value],
cost_center:
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? i18next.t(
`joblines.fields.lbr_types.${value && value.toUpperCase()}`
)
: responsibilitycenters.defaults.costs[value],
mod_lbr_ty: value,
total: joblines.reduce((acc2, val2) => {
return val2.mod_lbr_ty === value ? acc2 + val2.mod_lb_hrs : acc2;

View File

@@ -10,7 +10,7 @@ import {
PageHeader,
Popconfirm,
Space,
Table,
Table
} from "antd";
import queryString from "query-string";
import React, { useState } from "react";
@@ -165,10 +165,15 @@ export function PartsOrderListTableComponent({
quantity: pol.quantity,
actual_price: pol.act_price,
cost_center: pol.jobline?.part_type
? responsibilityCenters.defaults.costs[
pol.jobline.part_type
] || null
? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid
? pol.jobline.part_type
: responsibilityCenters.defaults &&
(responsibilityCenters.defaults.costs[
pol.jobline.part_type
] ||
null)
: null,
};
}),

View File

@@ -1,14 +1,30 @@
import { DeleteFilled, WarningFilled } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import { Divider, Form, Input, InputNumber, Radio, Space, Tag } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import FormDatePicker from "../form-date-picker/form-date-picker.component";
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
export default function PartsOrderModalComponent({
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export default connect(
mapStateToProps,
mapDispatchToProps
)(PartsOrderModalComponent);
export function PartsOrderModalComponent({
bodyshop,
vendorList,
sendTypeState,
isReturn,
@@ -16,7 +32,11 @@ export default function PartsOrderModalComponent({
job,
}) {
const [sendType, setSendType] = sendTypeState;
const { OEConnection } = useTreatments(
["OEConnection"],
{},
bodyshop.imexshopid
);
const { t } = useTranslation();
return (
@@ -164,7 +184,9 @@ export default function PartsOrderModalComponent({
<Radio value={"none"}>{t("general.labels.none")}</Radio>
<Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
<Radio value={"p"}>{t("parts_orders.labels.print")}</Radio>
<Radio value={"oec"}>{t("parts_orders.labels.oec")}</Radio>
{OEConnection.treatment === "on" && (
<Radio value={"oec"}>{t("parts_orders.labels.oec")}</Radio>
)}
</Radio.Group>
</div>
);

View File

@@ -2,7 +2,8 @@ import { useApolloClient } from "@apollo/client";
import Board, { moveCard } from "@asseinfo/react-kanban";
//import "@asseinfo/react-kanban/dist/styles.css";
import "./production-board-kanban.styles.scss";
import { Grid, notification, PageHeader, Space, Statistic } from "antd";
import { SyncOutlined } from '@ant-design/icons'
import { Grid, notification, Button, PageHeader, Space, Statistic } from "antd";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -33,6 +34,7 @@ const mapDispatchToProps = (dispatch) => ({
export function ProductionBoardKanbanComponent({
data,
bodyshop,
refetch,
technician,
insertAuditTrail,
associationSettings,
@@ -192,6 +194,9 @@ export function ProductionBoardKanbanComponent({
}
extra={
<Space wrap>
<Button onClick={() => refetch && refetch()}>
<SyncOutlined />
</Button>
<ProductionBoardFilters
filter={filter}
setFilter={setFilter}

View File

@@ -1,8 +1,14 @@
import { useQuery, useSubscription } from "@apollo/client";
import React from "react";
import { useApolloClient, useQuery, useSubscription } from "@apollo/client";
import _ from "lodash";
import React, { useEffect, useState } from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { SUBSCRIPTION_JOBS_IN_PRODUCTION } from "../../graphql/jobs.queries";
import {
QUERY_EXACT_JOBS_IN_PRODUCTION,
QUERY_EXACT_JOB_IN_PRODUCTION,
QUERY_JOBS_IN_PRODUCTION,
SUBSCRIPTION_JOBS_IN_PRODUCTION,
} from "../../graphql/jobs.queries";
import { QUERY_KANBAN_SETTINGS } from "../../graphql/user.queries";
import {
selectBodyshop,
@@ -14,13 +20,62 @@ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
currentUser: selectCurrentUser,
});
export function ProductionBoardKanbanContainer({ bodyshop, currentUser }) {
const { loading, data } = useSubscription(
SUBSCRIPTION_JOBS_IN_PRODUCTION,
{}
const { refetch, loading, data } = useQuery(QUERY_JOBS_IN_PRODUCTION, {
pollInterval: 3600000,
});
const client = useApolloClient();
const [joblist, setJoblist] = useState([]);
const { data: updatedJobs } = useSubscription(
SUBSCRIPTION_JOBS_IN_PRODUCTION
);
useEffect(() => {
if (!(data && data.jobs)) return;
setJoblist(
data.jobs.map((j) => {
return { id: j.id, updated_at: j.updated_at };
})
);
}, [data]);
useEffect(() => {
if (!updatedJobs || joblist.length === 0) return;
const jobDiff = _.differenceWith(
joblist,
updatedJobs.jobs,
(a, b) => a.id === b.id && a.updated_at === b.updated_at
);
jobDiff.forEach((job) => {
getUpdatedJobData(job.id);
});
if (jobDiff.length > 1) {
getUpdatedJobsData(jobDiff.map((j) => j.id));
} else if (jobDiff.length === 1) {
jobDiff.forEach((job) => {
getUpdatedJobData(job.id);
});
}
setJoblist(updatedJobs.jobs);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [updatedJobs]);
const getUpdatedJobData = async (jobId) => {
client.query({
query: QUERY_EXACT_JOB_IN_PRODUCTION,
variables: { id: jobId },
});
};
const getUpdatedJobsData = async (jobIds) => {
client.query({
query: QUERY_EXACT_JOBS_IN_PRODUCTION,
variables: { ids: jobIds },
});
};
const { loading: associationSettingsLoading, data: associationSettings } =
useQuery(QUERY_KANBAN_SETTINGS, {
variables: { email: currentUser.email },
@@ -30,6 +85,7 @@ export function ProductionBoardKanbanContainer({ bodyshop, currentUser }) {
<ProductionBoardKanbanComponent
loading={loading || associationSettingsLoading}
data={data ? data.jobs : []}
refetch={refetch}
associationSettings={
associationSettings && associationSettings.associations[0]
? associationSettings.associations[0]

View File

@@ -1,4 +1,7 @@
import { SyncOutlined } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import {
Button,
Dropdown,
Input,
Menu,
@@ -24,7 +27,6 @@ import ProductionListSaveConfigButton from "../production-list-save-config-butto
import ProductionListPrint from "./production-list-print.component";
import ProductionListTableViewSelect from "./production-list-table-view-select.component";
import ResizeableTitle from "./production-list-table.resizeable.component";
import { useTreatments } from "@splitsoftware/splitio-react";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -35,6 +37,7 @@ const mapStateToProps = createStructuredSelector({
export function ProductionListTable({
loading,
data,
refetch,
bodyshop,
technician,
currentUser,
@@ -42,6 +45,7 @@ export function ProductionListTable({
const [searchText, setSearchText] = useState("");
const { Production_List_Status_Colors } = useTreatments([
"Production_List_Status_Colors",
bodyshop.imexshopid,
]);
const assoc = bodyshop.associations.find(
(a) => a.useremail === currentUser.email
@@ -195,6 +199,9 @@ export function ProductionListTable({
}
extra={
<Space wrap>
<Button onClick={() => refetch && refetch()}>
<SyncOutlined />
</Button>
<ProductionListColumnsAdd
columnState={[columns, setColumns]}
tableState={state}

View File

@@ -1,13 +1,74 @@
import { useSubscription } from "@apollo/client";
import React from "react";
import { SUBSCRIPTION_JOBS_IN_PRODUCTION } from "../../graphql/jobs.queries";
import { useApolloClient, useQuery, useSubscription } from "@apollo/client";
import React, { useEffect, useState } from "react";
import {
QUERY_EXACT_JOBS_IN_PRODUCTION,
QUERY_EXACT_JOB_IN_PRODUCTION,
QUERY_JOBS_IN_PRODUCTION,
SUBSCRIPTION_JOBS_IN_PRODUCTION,
} from "../../graphql/jobs.queries";
import ProductionListTable from "./production-list-table.component";
import _ from "lodash";
export default function ProductionListTableContainer() {
const { loading, data } = useSubscription(
SUBSCRIPTION_JOBS_IN_PRODUCTION,
{}
const { refetch, loading, data } = useQuery(QUERY_JOBS_IN_PRODUCTION, {
pollInterval: 3600000,
});
const client = useApolloClient();
const [joblist, setJoblist] = useState([]);
const { data: updatedJobs } = useSubscription(
SUBSCRIPTION_JOBS_IN_PRODUCTION
);
return <ProductionListTable loading={loading} data={data ? data.jobs : []} />;
useEffect(() => {
if (!(data && data.jobs)) return;
setJoblist(
data.jobs.map((j) => {
return { id: j.id, updated_at: j.updated_at };
})
);
}, [data]);
useEffect(() => {
if (!updatedJobs || joblist.length === 0) return;
const jobDiff = _.differenceWith(
joblist,
updatedJobs.jobs,
(a, b) => a.id === b.id && a.updated_at === b.updated_at
);
console.log(jobDiff);
if (jobDiff.length > 1) {
getUpdatedJobsData(jobDiff.map((j) => j.id));
} else if (jobDiff.length === 1) {
console.log("length was 1");
jobDiff.forEach((job) => {
console.log("Job ", job);
getUpdatedJobData(job.id);
});
}
setJoblist(updatedJobs.jobs);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [updatedJobs]);
const getUpdatedJobData = async (jobId) => {
client.query({
query: QUERY_EXACT_JOB_IN_PRODUCTION,
variables: { id: jobId },
});
};
const getUpdatedJobsData = async (jobIds) => {
client.query({
query: QUERY_EXACT_JOBS_IN_PRODUCTION,
variables: { ids: jobIds },
});
};
return (
<ProductionListTable
loading={loading}
data={data ? data.jobs : []}
refetch={refetch}
/>
);
}

View File

@@ -3,10 +3,10 @@ import { Button, List, notification, Popover } from "antd";
import React, { useMemo, useState } from "react";
import { useMutation } from "@apollo/client";
import { useTranslation } from "react-i18next";
import { UPDATE_JOB_LINE } from "../../graphql/jobs-lines.queries";
import { UPDATE_JOB_LINE_SUBLET } from "../../graphql/jobs-lines.queries";
export default function ProductionSubletsManageComponent({ subletJobLines }) {
const { t } = useTranslation();
const [updateJobLine] = useMutation(UPDATE_JOB_LINE);
const [updateJobLine] = useMutation(UPDATE_JOB_LINE_SUBLET);
const [loading, setLoading] = useState(false);
const subletCount = useMemo(() => {
return {
@@ -22,6 +22,8 @@ export default function ProductionSubletsManageComponent({ subletJobLines }) {
const result = await updateJobLine({
variables: {
jobId: sublet.jobid,
now: new Date(),
lineId: sublet.id,
line: {
sublet_completed:

View File

@@ -185,24 +185,14 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
);
}}
</Form.Item>
<Form.Item
shouldUpdate={(prev, cur) =>
Templates[prev.key]?.idtype !== Templates[cur.key]?.idtype
}
style={{ display: "none", margin: 0, padding: 0 }}
>
{() => {
form.setFieldsValue({ id: null });
return null;
}}
</Form.Item>
<Form.Item style={{ margin: 0, padding: 0 }} dependencies={["key"]}>
{() => {
const key = form.getFieldValue("key");
const currentId = form.getFieldValue("id");
if (!key) return null;
//Kind of Id
const idtype = Templates[key] && Templates[key].idtype;
if (!idtype) {
if (!idtype && currentId) {
form.setFieldsValue({ id: null });
return null;
}

View File

@@ -14,6 +14,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import FormDatePicker from "../form-date-picker/form-date-picker.component";
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import CiecaSelect from "../../utils/Ciecaselect";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -218,6 +219,7 @@ export function ShopEmployeesFormComponent({
label={t("employees.fields.cost_center")}
key={`${index}`}
name={[field.name, "cost_center"]}
valuePropName="value"
rules={[
{
required: true,
@@ -232,11 +234,16 @@ export function ShopEmployeesFormComponent({
>
{t("timetickets.labels.shift")}
</Select.Option>
{bodyshop.md_responsibility_centers.costs.map((c) => (
<Select.Option key={c.name} value={c.name}>
{c.name}
</Select.Option>
))}
{bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? CiecaSelect(false, true)
: bodyshop.md_responsibility_centers.costs.map(
(c) => (
<Select.Option key={c.name} value={c.name}>
{c.name}
</Select.Option>
)
)}
</Select>
</Form.Item>
<Form.Item

View File

@@ -472,7 +472,7 @@ export default function ShopInfoGeneral({ form }) {
label={t("bodyshop.fields.md_email_cc", { template: "parts_order" })}
rules={[
{
required: true,
//message: t("general.validation.required"),
type: "array",
},
@@ -492,7 +492,7 @@ export default function ShopInfoGeneral({ form }) {
label={t("bodyshop.fields.md_ded_notes")}
rules={[
{
required: true,
//message: t("general.validation.required"),
type: "array",
},

View File

@@ -7,16 +7,31 @@ import { useTranslation } from "react-i18next";
import styled from "styled-components";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export default connect(
mapStateToProps,
mapDispatchToProps
)(ShopInfoROStatusComponent);
const SelectorDiv = styled.div`
.ant-form-item .ant-select {
width: 200px;
}
`;
export default function ShopInfoROStatusComponent({ form }) {
export function ShopInfoROStatusComponent({ bodyshop, form }) {
const { t } = useTranslation();
const { Production_List_Status_Colors } = useTreatments([
"Production_List_Status_Colors",
bodyshop.imexshopid,
]);
const [options, setOptions] = useState(

View File

@@ -47,9 +47,13 @@ export function TimeTicketModalComponent({
>
{emps &&
emps.rates.map((item) => (
<Select.Option key={item.cost_center}>
<Select.Option key={item.cost_center} value={item.cost_center}>
{item.cost_center === "timetickets.labels.shift"
? t(item.cost_center)
: bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? t(
`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`
)
: item.cost_center}
</Select.Option>
))}
@@ -137,6 +141,7 @@ export function TimeTicketModalComponent({
<Form.Item
name="cost_center"
label={t("timetickets.fields.cost_center")}
valuePropName="value"
rules={[
{
required: true,

View File

@@ -143,13 +143,16 @@ export function TimeTicketModalContainer({
}
if (!!changedFields.cost_center && !!EmployeeAutoCompleteData) {
form.setFieldsValue({
ciecacode: Object.keys(
bodyshop.md_responsibility_centers.defaults.costs
).find(
(key) =>
bodyshop.md_responsibility_centers.defaults.costs[key] ===
changedFields.cost_center
),
ciecacode:
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? changedFields.cost_center
: Object.keys(
bodyshop.md_responsibility_centers.defaults.costs
).find(
(key) =>
bodyshop.md_responsibility_centers.defaults.costs[key] ===
changedFields.cost_center
),
});
}
};

View File

@@ -2,8 +2,7 @@ import { getAnalytics, logEvent } from "firebase/analytics";
import { initializeApp } from "firebase/app";
import { getAuth, updatePassword, updateProfile } from "firebase/auth";
import { getFirestore } from "firebase/firestore";
import { tracker } from "../App/App.container";
//import { getMessaging } from "firebase/messaging";
import { getMessaging, getToken, onMessage } from "firebase/messaging";
import { store } from "../redux/store";
const config = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG);
@@ -39,18 +38,42 @@ export const updateCurrentPassword = async (password) => {
return updatePassword(currentUser, password);
};
let messaging;
try {
messaging = getMessaging();
} catch (error) {
console.log(error);
}
//let messaging;
// try {
// messaging = getMessaging();
// // Project Settings => Cloud Messaging => Web Push certificates
// messaging.usePublicVapidKey(process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY);
// console.log("[FCM UTIL] FCM initialized successfully.");
// } catch {
// console.log("[FCM UTIL] Firebase Messaging is likely unsupported.");
// }
export { messaging };
// export { messaging };
export const requestForToken = () => {
return getToken(messaging, {
vapidKey: process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY,
})
.then((currentToken) => {
if (currentToken) {
console.log("current token for client: ", currentToken);
window.sessionStorage.setItem("fcmtoken", currentToken);
// Perform any other necessary action with the token
} else {
// Show permission request UI
console.log(
"No registration token available. Request permission to generate one."
);
}
})
.catch((err) => {
console.log("An error occurred while retrieving token. ", err);
});
};
export const onMessageListener = () =>
new Promise((resolve) => {
onMessage(messaging, (payload) => {
console.log("Inbound FCM Message", payload);
resolve(payload);
});
});
export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
const state = stateProp || store.getState();
@@ -70,9 +93,6 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
// eventParams
// );
logEvent(analytics, eventName, eventParams);
//Log event to OpenReplay server.
tracker.event(eventName, eventParams);
};
// if (messaging) {

View File

@@ -1,15 +1,54 @@
import { gql } from "@apollo/client";
export const CONVERSATION_LIST_SUBSCRIPTION = gql`
subscription CONVERSATION_LIST_SUBSCRIPTION {
// export const CONVERSATION_LIST_SUBSCRIPTION = gql`
// subscription CONVERSATION_LIST_SUBSCRIPTION {
// conversations(
// order_by: { updated_at: desc }
// limit: 50
// where: { archived: { _eq: false } }
// ) {
// phone_num
// id
// updated_at
// unreadcnt
// messages_aggregate(
// where: { read: { _eq: false }, isoutbound: { _eq: false } }
// ) {
// aggregate {
// count
// }
// }
// job_conversations {
// job {
// id
// ro_number
// ownr_fn
// ownr_ln
// ownr_co_nm
// }
// }
// }
// }
// `;
export const CONVERSATION_LIST_QUERY = gql`
query CONVERSATION_LIST_QUERY {
conversations(
order_by: { updated_at: desc }
limit: 100
limit: 50
where: { archived: { _eq: false } }
) {
phone_num
id
updated_at
unreadcnt
messages_aggregate(
where: { read: { _eq: false }, isoutbound: { _eq: false } }
) {
aggregate {
count
}
}
job_conversations {
job {
id
@@ -17,17 +56,6 @@ export const CONVERSATION_LIST_SUBSCRIPTION = gql`
ownr_fn
ownr_ln
ownr_co_nm
owner {
id
allow_text_message
}
}
}
messages_aggregate(
where: { read: { _eq: false }, isoutbound: { _eq: false } }
) {
aggregate {
count
}
}
}
@@ -36,24 +64,26 @@ export const CONVERSATION_LIST_SUBSCRIPTION = gql`
export const CONVERSATION_SUBSCRIPTION_BY_PK = gql`
subscription CONVERSATION_SUBSCRIPTION_BY_PK($conversationId: uuid!) {
messages(
order_by: { created_at: asc_nulls_first }
where: { conversationid: { _eq: $conversationId } }
) {
id
status
text
isoutbound
image
image_path
userid
created_at
read
}
}
`;
export const GET_CONVERSATION_DETAILS = gql`
query GET_CONVERSATION_DETAILS($conversationId: uuid!) {
conversations_by_pk(id: $conversationId) {
messages(order_by: { created_at: asc_nulls_first }) {
id
status
text
isoutbound
image
image_path
userid
created_at
}
messages_aggregate(
where: { read: { _eq: false }, isoutbound: { _eq: false } }
) {
aggregate {
count
}
}
id
phone_num
archived

View File

@@ -136,6 +136,27 @@ export const RECEIVE_PARTS_LINE = gql`
}
`;
export const UPDATE_JOB_LINE_SUBLET = gql`
mutation UPDATE_JOB_LINE_SUBLET(
$lineId: uuid!
$line: joblines_set_input!
$now: timestamptz!
$jobId: uuid!
) {
update_jobs_by_pk(pk_columns: { id: $jobId }, _set: { updated_at: $now }) {
id
updated_at
}
update_joblines(where: { id: { _eq: $lineId } }, _set: $line) {
returning {
id
sublet_completed
sublet_ignored
}
}
}
`;
export const UPDATE_JOB_LINE = gql`
mutation UPDATE_JOB_LINE($lineId: uuid!, $line: joblines_set_input!) {
update_joblines(where: { id: { _eq: $lineId } }, _set: $line) {
@@ -179,6 +200,10 @@ export const GET_JOB_LINES_TO_ENTER_BILL = gql`
jobs_by_pk(id: $id) {
id
status
ious {
id
ro_number
}
}
}
`;
@@ -226,3 +251,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
}
}
}
`;

View File

@@ -105,10 +105,18 @@ export const QUERY_PARTS_QUEUE = gql`
}
}
`;
export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
subscription SUBSCRIPTION_JOBS_IN_PRODUCTION {
jobs(where: { inproduction: { _eq: true } }) {
id
updated_at
}
}
`;
export const QUERY_EXACT_JOB_IN_PRODUCTION = gql`
query QUERY_EXACT_JOB_IN_PRODUCTION($id: uuid!) {
jobs(where: { id: { _eq: $id } }) {
id
status
ro_number
@@ -171,6 +179,150 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
line_desc
sublet_ignored
sublet_completed
jobid
}
}
}
`;
export const QUERY_EXACT_JOBS_IN_PRODUCTION = gql`
query QUERY_EXACT_JOBS_IN_PRODUCTION($ids: [uuid!]!) {
jobs(where: { id: { _in: $ids } }) {
id
status
ro_number
ownr_fn
ownr_ln
ownr_co_nm
v_model_yr
v_model_desc
clm_no
v_make_desc
v_color
plate_no
actual_in
scheduled_completion
scheduled_delivery
date_last_contacted
date_next_contact
ins_co_nm
clm_total
ownr_ph1
ownr_ph2
special_coverage_policy
owner_owing
production_vars
kanbanparent
alt_transport
employee_body
employee_refinish
employee_prep
employee_csr
labhrs: joblines_aggregate(
where: {
_and: [{ mod_lbr_ty: { _neq: "LAR" } }, { removed: { _eq: false } }]
}
) {
aggregate {
sum {
mod_lb_hrs
}
}
}
larhrs: joblines_aggregate(
where: {
_and: [{ mod_lbr_ty: { _eq: "LAR" } }, { removed: { _eq: false } }]
}
) {
aggregate {
sum {
mod_lb_hrs
}
}
}
subletLines: joblines(
where: {
_and: { part_type: { _in: ["PAS", "PASL"] }, removed: { _eq: false } }
}
order_by: { line_no: asc }
) {
id
line_desc
sublet_ignored
sublet_completed
jobid
}
}
}
`;
export const QUERY_JOBS_IN_PRODUCTION = gql`
query QUERY_JOBS_IN_PRODUCTION {
jobs(where: { inproduction: { _eq: true } }) {
id
updated_at
status
ro_number
ownr_fn
ownr_ln
ownr_co_nm
v_model_yr
v_model_desc
clm_no
v_make_desc
v_color
plate_no
actual_in
scheduled_completion
scheduled_delivery
date_last_contacted
date_next_contact
ins_co_nm
clm_total
ownr_ph1
ownr_ph2
special_coverage_policy
owner_owing
production_vars
kanbanparent
alt_transport
employee_body
employee_refinish
employee_prep
employee_csr
labhrs: joblines_aggregate(
where: {
_and: [{ mod_lbr_ty: { _neq: "LAR" } }, { removed: { _eq: false } }]
}
) {
aggregate {
sum {
mod_lb_hrs
}
}
}
larhrs: joblines_aggregate(
where: {
_and: [{ mod_lbr_ty: { _eq: "LAR" } }, { removed: { _eq: false } }]
}
) {
aggregate {
sum {
mod_lb_hrs
}
}
}
subletLines: joblines(
where: {
_and: { part_type: { _in: ["PAS", "PASL"] }, removed: { _eq: false } }
}
order_by: { line_no: asc }
) {
id
line_desc
sublet_ignored
sublet_completed
jobid
}
}
}
@@ -529,6 +681,7 @@ export const GET_JOB_BY_PK = gql`
manual_line
prt_dsmk_p
prt_dsmk_m
ioucreated
billlines(limit: 1, order_by: { bill: { date: desc } }) {
id
quantity
@@ -874,6 +1027,7 @@ export const UPDATE_JOB = gql`
update_jobs(where: { id: { _eq: $jobId } }, _set: $job) {
returning {
id
date_exported
status
alt_transport
@@ -1253,9 +1407,7 @@ export const QUERY_JOB_FOR_DUPE = gql`
servicing_dealer
servicing_dealer_contact
shopid
state_tax_rate
tax_lbr_rt
tax_levies_rt
tax_paint_mat_rt
@@ -1320,9 +1472,19 @@ export const QUERY_JOB_FOR_DUPE = gql`
tax_part
unq_seq
manual_line
notes
line_no
tran_code
}
driveable
towin
adj_g_disc
adj_strdis
adj_towdis
ca_gst_registrant
special_coverage_policy
tax_registration_number
tax_shop_mat_rt
}
}
`;
@@ -1580,46 +1742,6 @@ export const QUERY_ALL_JOB_FIELDS = gql`
}
}
`;
export const QUERY_JOBS_IN_PRODUCTION = gql`
query QUERY_JOBS_IN_PRODUCTION {
jobs(
where: { inproduction: { _eq: true } }
order_by: { scheduled_completion: asc }
) {
id
ro_number
ownr_co_nm
ownr_fn
ownr_ln
v_model_yr
v_make_desc
v_model_desc
scheduled_completion
labhrs: joblines_aggregate(
where: {
_and: [{ mod_lbr_ty: { _neq: "LAR" } }, { removed: { _eq: false } }]
}
) {
aggregate {
sum {
mod_lb_hrs
}
}
}
larhrs: joblines_aggregate(
where: {
_and: [{ mod_lbr_ty: { _eq: "LAR" } }, { removed: { _eq: false } }]
}
) {
aggregate {
sum {
mod_lb_hrs
}
}
}
}
}
`;
export const QUERY_ALL_JOBS_PAGINATED_STATUS_FILTERED = gql`
query QUERY_ALL_JOBS_PAGINATED_STATUS_FILTERED(
@@ -1695,6 +1817,7 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
ro_number
invoice_allocation
ins_co_id
dms_allocation
id
ded_amt
ded_status
@@ -1918,6 +2041,7 @@ export const QUERY_JOB_EXPORT_DMS = gql`
v_model_yr
v_model_desc
area_of_damage
date_exported
}
}
`;

View File

@@ -8,6 +8,8 @@ export const MARK_MESSAGES_AS_READ_BY_CONVERSATION = gql`
) {
returning {
id
read
isoutbound
}
}
}

View File

@@ -7,13 +7,13 @@ import {
Result,
Row,
Select,
Space,
Space
} from "antd";
import queryString from "query-string";
import React, { useEffect, useState } from "react";
import React, { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useLocation, useHistory } from "react-router-dom";
import { useHistory, useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import SocketIO from "socket.io-client";
import AlertComponent from "../../components/alert/alert.component";
@@ -26,7 +26,7 @@ import { auth } from "../../firebase/firebase.utils";
import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries";
import {
setBreadcrumbs,
setSelectedHeader,
setSelectedHeader
} from "../../redux/application/application.actions";
import { selectBodyshop } from "../../redux/user/user.selectors";
@@ -66,6 +66,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
variables: { id: jobId },
skip: !jobId,
});
const logsRef = useRef(null);
useEffect(() => {
document.title = t("titles.dms");
@@ -125,12 +126,15 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
!(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) ||
!(data && data.jobs_by_pk)
)
return <Result status="404" />;
return <Result status="404" title={t("general.errors.notfound")} />;
if (data.jobs_by_pk && data.jobs_by_pk.date_exported)
return <Result status="warning" title={t("dms.errors.alreadyexported")} />;
return (
<div>
<Row gutter={[16, 16]}>
<Col span={10}>
<Col md={24} lg={10}>
<DmsAllocationsSummary
title={`${data && data.jobs_by_pk && data.jobs_by_pk.ro_number} | ${
data.jobs_by_pk.ownr_fn || ""
@@ -143,51 +147,54 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
jobId={jobId}
/>
</Col>
<Col span={14}>
<Col md={24} lg={14}>
<DmsPostForm
socket={socket}
jobId={jobId}
job={data && data.jobs_by_pk}
logsRef={logsRef}
/>
</Col>
<DmsCustomerSelector />
<Col span={24}>
<Card
title={t("jobs.labels.dms.logs")}
extra={
<Space wrap>
<Select
placeholder="Log Level"
value={logLevel}
onChange={(value) => {
setLogLevel(value);
socket.emit("set-log-level", value);
}}
>
<Select.Option key="TRACE">TRACE</Select.Option>
<Select.Option key="DEBUG">DEBUG</Select.Option>
<Select.Option key="INFO">INFO</Select.Option>
<Select.Option key="WARNING">WARNING</Select.Option>
<Select.Option key="ERROR">ERROR</Select.Option>
</Select>
<Button onClick={() => setLogs([])}>Clear Logs</Button>
<Button
onClick={() => {
setLogs([]);
socket.disconnect();
socket.connect();
}}
>
Reconnect
</Button>
</Space>
}
>
<DmsLogEvents socket={socket} logs={logs} />
</Card>
</Col>
<div ref={logsRef}>
<Card
title={t("jobs.labels.dms.logs")}
extra={
<Space wrap>
<Select
placeholder="Log Level"
value={logLevel}
onChange={(value) => {
setLogLevel(value);
socket.emit("set-log-level", value);
}}
>
<Select.Option key="TRACE">TRACE</Select.Option>
<Select.Option key="DEBUG">DEBUG</Select.Option>
<Select.Option key="INFO">INFO</Select.Option>
<Select.Option key="WARNING">WARNING</Select.Option>
<Select.Option key="ERROR">ERROR</Select.Option>
</Select>
<Button onClick={() => setLogs([])}>Clear Logs</Button>
<Button
onClick={() => {
setLogs([]);
socket.disconnect();
socket.connect();
}}
>
Reconnect
</Button>
</Space>
}
>
<DmsLogEvents socket={socket} logs={logs} />
</Card>
</div>
</Col>
</Row>
</div>
);

View File

@@ -9,6 +9,7 @@ import {
Divider,
PageHeader,
InputNumber,
Input,
} from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -26,6 +27,8 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import LayoutFormRow from "../../components/layout-form-row/layout-form-row.component";
import DateTimePicker from "../../components/form-date-time-picker/form-date-time-picker.component";
import moment from "moment";
import { Link } from "react-router-dom";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
@@ -59,6 +62,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
actual_delivery: values.actual_delivery,
kmin: values.kmin,
kmout: values.kmout,
dms_allocation: values.dms_allocation,
},
},
refetchQueries: ["QUERY_JOB_CLOSE_DETAILS"],
@@ -117,6 +121,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
: job.scheduled_delivery && moment(job.scheduled_delivery),
kmin: job.kmin,
kmout: job.kmout,
dms_allocation: job.dms_allocation,
}}
scrollToFirstError
>
@@ -141,7 +146,13 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
{t("general.actions.close")}
</Button>
</Popconfirm>
{(bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid) && (
<Link to={`/manage/dms?jobId=${job.id}`}>
<Button disabled={job.date_exported || !jobRO}>
{t("jobs.actions.sendtodms")}
</Button>
</Link>
)}
<JobsScoreboardAdd job={job} disabled={false} />
</Space>
}
@@ -247,6 +258,19 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
<InputNumber precision={0} disabled={jobRO} />
</Form.Item>
)}
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
<Form.Item
label={t("jobs.fields.dms_allocation")}
name="dms_allocation"
rules={[
{
required: true,
},
]}
>
<Input disabled />
</Form.Item>
)}
</LayoutFormRow>
<Divider />
<JobsCloseLines job={job} />

View File

@@ -5,13 +5,12 @@ import preval from "preval.macro";
import React, { lazy, Suspense, useEffect } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import ErrorBoundary from "../../components/error-boundary/error-boundary.component";
import { Link, Route, Switch } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import BreadCrumbs from "../../components/breadcrumbs/breadcrumbs.component";
import ChatAffixContainer from "../../components/chat-affix/chat-affix.container";
import ConflictComponent from "../../components/conflict/conflict.component";
import FcmNotification from "../../components/fcm-notification/fcm-notification.component";
import ErrorBoundary from "../../components/error-boundary/error-boundary.component";
//import FooterComponent from "../../components/footer/footer.component";
//Component Imports
import HeaderContainer from "../../components/header/header.container";
@@ -20,12 +19,11 @@ import PartnerPingComponent from "../../components/partner-ping/partner-ping.com
import PrintCenterModalContainer from "../../components/print-center-modal/print-center-modal.container";
import ShopSubStatusComponent from "../../components/shop-sub-status/shop-sub-status.component";
import TestComponent from "../../components/_test/test.component";
import { QUERY_STRIPE_ID } from "../../graphql/bodyshop.queries";
import { requestForToken } from "../../firebase/firebase.utils";
import {
selectBodyshop,
selectInstanceConflict,
} from "../../redux/user/user.selectors";
import client from "../../utils/GraphQLClient";
import "./manage.page.styles.scss";
const ManageRootPage = lazy(() =>
@@ -166,16 +164,15 @@ const Dms = lazy(() => import("../dms/dms.container"));
const { Content, Footer } = Layout;
const stripePromise = new Promise((resolve, reject) => {
client.query({ query: QUERY_STRIPE_ID }).then((resp) => {
if (resp.data.bodyshops[0])
resolve(
loadStripe(process.env.REACT_APP_STRIPE_PUBLIC_KEY, {
stripeAccount:
resp.data.bodyshops[0].stripe_acct_id || "No Stripe Id Resolve",
})
);
reject();
});
// client.query({ query: QUERY_STRIPE_ID }).then((resp) => {
// if (resp.data.bodyshops[0])
resolve(
loadStripe(process.env.REACT_APP_STRIPE_PUBLIC_KEY, {
stripeAccount: "No Stripe Id Resolve",
})
);
// reject();
// });
});
const mapStateToProps = createStructuredSelector({
@@ -188,7 +185,13 @@ export function Manage({ match, conflict, bodyshop }) {
useEffect(() => {
const widgetId = "IABVNO4scRKY11XBQkNr";
window.noticeable.render("widget", widgetId);
try {
requestForToken();
} catch (error) {
console.log("Unable to request for token.", error);
}
}, []);
useEffect(() => {
document.title = t("titles.app");
}, [t]);
@@ -395,7 +398,6 @@ export function Manage({ match, conflict, bodyshop }) {
<HeaderContainer />
<Content className="content-container">
<FcmNotification />
<PartnerPingComponent />
<ErrorBoundary>{PageContent}</ErrorBoundary>
<BackTop />

View File

@@ -1,6 +1,6 @@
import {
PaymentRequestButtonElement,
useStripe
useStripe,
} from "@stripe/react-stripe-js";
import React, { useEffect, useState } from "react";
@@ -60,10 +60,9 @@ export default function MobilePaymentComponent() {
// it to close the browser payment method collection interface.
ev.complete("success");
// Let Stripe.js handle the rest of the payment flow.
const { error, //paymentIntent
} = await stripe.confirmCardPayment(
"clientSecret"
);
const {
error, //paymentIntent
} = await stripe.confirmCardPayment("clientSecret");
if (error) {
// The payment failed -- ask your customer for a new payment method.
} else {

View File

@@ -5,7 +5,7 @@ import { connect } from "react-redux";
import { Redirect, Route, Switch } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import ErrorBoundary from "../../components/error-boundary/error-boundary.component";
import FcmNotification from "../../components/fcm-notification/fcm-notification.component";
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
import TechHeader from "../../components/tech-header/tech-header.component";
import TechSider from "../../components/tech-sider/tech-sider.component";
@@ -58,7 +58,6 @@ export function TechPage({ technician, match }) {
{technician ? null : <Redirect to={`${match.path}/login`} />}
<TechHeader />
<Content className="tech-content-container">
<FcmNotification />
<ErrorBoundary>
<Suspense
fallback={

View File

@@ -1,7 +1,6 @@
import Fingerprint2 from "@fingerprintjs/fingerprintjs";
import * as Sentry from "@sentry/browser";
import { notification } from "antd";
import { auth, analytics, firestore } from "../../firebase/firebase.utils";
import { setUserId, setUserProperties } from "firebase/analytics";
import {
checkActionCode,
@@ -13,8 +12,11 @@ import { doc } from "firebase/firestore";
import i18next from "i18next";
import LogRocket from "logrocket";
import { all, call, delay, put, select, takeLatest } from "redux-saga/effects";
import { factory, tracker } from "../../App/App.container";
import { factory } from "../../App/App.container";
import {
analytics,
auth,
firestore,
getCurrentUser,
logImEXEvent,
updateCurrentUser,
@@ -75,7 +77,7 @@ export function* isUserAuthenticated() {
}
LogRocket.identify(user.email);
tracker.setUserID(user.email);
yield put(
signInSuccess({
uid: user.uid,
@@ -174,7 +176,6 @@ export function* onSignInSuccess() {
export function* signInSuccessSaga({ payload }) {
LogRocket.identify(payload.email);
tracker.setUserID(payload.email);
try {
// window.$crisp.push(["set", "user:email", [payload.email]]);

View File

@@ -95,6 +95,7 @@
"jobfieldchanged": "Job field $t(jobs.fields.{{field}}) changed to {{value}}.",
"jobimported": "Job imported.",
"jobinproductionchange": "Job production status set to {{inproduction}}",
"jobioucreated": "IOU Created.",
"jobmodifylbradj": "Labor adjustments modified.",
"jobnoteadded": "Note added to job.",
"jobnotedeleted": "Note deleted from job.",
@@ -176,6 +177,7 @@
"entered_total": "Total of Entered Lines",
"enteringcreditmemo": "You are entering a credit memo. Please ensure you are also entering positive values.",
"federal_tax": "Federal Tax",
"iouexists": "An IOU exists that is associated to this RO.",
"local_tax": "Local Tax",
"markforreexport": "Mark for Re-export",
"new": "New Bill",
@@ -394,6 +396,7 @@
"ar": "Accounts Receivable",
"ats": "ATS",
"federal_tax": "Federal Tax",
"gst_override": "GST Override Account #",
"la1": "LA1",
"la2": "LA2",
"la3": "LA3",
@@ -413,6 +416,7 @@
"mash": "Shop Materials",
"paa": "Aftermarket",
"pac": "Chrome",
"pag": "Glass",
"pal": "LKQ",
"pam": "Remanufactured",
"pan": "OEM",
@@ -496,9 +500,11 @@
"deliverchecklist": "Delivery Checklist",
"dms": {
"cdk": {
"controllist": "Control Number List",
"payers": "CDK Payers"
},
"cdk_dealerid": "CDK Dealer ID",
"pbs_serialnumber": "PBS Serial Number",
"title": "DMS"
},
"emaillater": "Email Later",
@@ -757,6 +763,14 @@
"projectedmonthlysales": "Projected Monthly Sales"
}
},
"dms": {
"errors": {
"alreadyexported": "This job has already been sent to the DMS. If you need to resend it, please use admin permissions to mark the job for re-export."
},
"labels": {
"refreshallocations": "Refresh to see DMS Allocataions."
}
},
"documents": {
"actions": {
"delete": "Delete Selected Documents",
@@ -885,10 +899,12 @@
"selectall": "Select All",
"senderrortosupport": "Send Error to Support",
"submit": "Submit",
"tryagain": "Try Again",
"view": "View",
"viewreleasenotes": "See What's Changed"
},
"errors": {
"fcm": "You must allow notification permissions to have real time messaging. Click to try again.",
"notfound": "No record was found."
},
"itemtypes": {
@@ -911,6 +927,7 @@
"exceptiontitle": "An error has occurred.",
"friday": "Friday",
"globalsearch": "Global Search",
"help": "Help",
"hours": "hrs",
"in": "In",
"instanceconflictext": "Your $t(titles.app) account can only be used on one device at any given time. Refresh your session to take control.",
@@ -1070,6 +1087,7 @@
"labels": {
"billref": "Latest Bill",
"edit": "Edit Line",
"ioucreated": "IOU",
"new": "New Line",
"nostatus": "No Status",
"presets": "Jobline Presets"
@@ -1099,12 +1117,16 @@
"changestatus": "Change Status",
"changestimator": "Change Estimator",
"convert": "Convert",
"createiou": "Create IOU",
"deliver": "Deliver",
"dms": {
"addpayer": "Add Payer",
"createnewcustomer": "Create New Customer",
"findmakemodelcode": "Find Make/Model Code",
"getmakes": "",
"labels": {
"refreshallocations": "Refresh this component to see the DMS allocations."
},
"post": "Post",
"refetchmakesmodels": "Refetch Make and Model Codes",
"usegeneric": "Use Generic Customer",
@@ -1130,6 +1152,7 @@
"removefromproduction": "Remove from Production",
"schedule": "Schedule",
"sendcsi": "Send CSI",
"sendtodms": "Send to DMS",
"sync": "Sync",
"uninvoice": "Uninvoice",
"unvoid": "Unvoid Job",
@@ -1239,6 +1262,7 @@
"story": "Story",
"vinowner": "VIN Owner"
},
"dms_allocation": "DMS Allocation",
"driveable": "Driveable",
"employee_body": "Body",
"employee_csr": "Customer Service Rep.",
@@ -1325,6 +1349,7 @@
"pas": "Sublet",
"pay_date": "Pay Date",
"phoneshort": "PH",
"po_number": "PO Number",
"policy_no": "Policy #",
"ponumber": "PO Number",
"production_vars": {
@@ -1451,6 +1476,7 @@
"ownerinfo": "Owner 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...",
"deductible": {
"stands": "Stands",
@@ -1571,6 +1597,7 @@
"duplicated": "Job duplicated successfully. ",
"exported": "Job(s) exported successfully. ",
"invoiced": "Job closed and invoiced successfully.",
"ioucreated": "IOU created successfully. Click to see.",
"partsqueue": "Job added to parts queue.",
"save": "Job saved successfully.",
"savetitle": "Record saved successfully.",
@@ -1739,6 +1766,7 @@
"messaging": "Messaging",
"noallowtxt": "This customer has not indicated their permission to be messaged.",
"nojobs": "Not associated to any job.",
"nopush": "Polling Mode Enabled",
"phonenumber": "Phone #",
"presets": "Presets",
"recentonly": "Only your most recent 50 conversations will be shown here. If you are looking for an older conversation, find the related contact and click their phone number to view the conversation.",

View File

@@ -95,6 +95,7 @@
"jobfieldchanged": "",
"jobimported": "",
"jobinproductionchange": "",
"jobioucreated": "",
"jobmodifylbradj": "",
"jobnoteadded": "",
"jobnotedeleted": "",
@@ -176,6 +177,7 @@
"entered_total": "",
"enteringcreditmemo": "",
"federal_tax": "",
"iouexists": "",
"local_tax": "",
"markforreexport": "",
"new": "",
@@ -394,6 +396,7 @@
"ar": "",
"ats": "",
"federal_tax": "",
"gst_override": "",
"la1": "",
"la2": "",
"la3": "",
@@ -413,6 +416,7 @@
"mash": "",
"paa": "",
"pac": "",
"pag": "",
"pal": "",
"pam": "",
"pan": "",
@@ -496,9 +500,11 @@
"deliverchecklist": "",
"dms": {
"cdk": {
"controllist": "",
"payers": ""
},
"cdk_dealerid": "",
"pbs_serialnumber": "",
"title": ""
},
"emaillater": "",
@@ -757,6 +763,14 @@
"projectedmonthlysales": ""
}
},
"dms": {
"errors": {
"alreadyexported": ""
},
"labels": {
"refreshallocations": ""
}
},
"documents": {
"actions": {
"delete": "",
@@ -885,10 +899,12 @@
"selectall": "",
"senderrortosupport": "",
"submit": "",
"tryagain": "",
"view": "",
"viewreleasenotes": ""
},
"errors": {
"fcm": "",
"notfound": ""
},
"itemtypes": {
@@ -911,6 +927,7 @@
"exceptiontitle": "",
"friday": "",
"globalsearch": "",
"help": "",
"hours": "",
"in": "en",
"instanceconflictext": "",
@@ -1070,6 +1087,7 @@
"labels": {
"billref": "",
"edit": "Línea de edición",
"ioucreated": "",
"new": "Nueva línea",
"nostatus": "",
"presets": ""
@@ -1099,12 +1117,16 @@
"changestatus": "Cambiar Estado",
"changestimator": "",
"convert": "Convertir",
"createiou": "",
"deliver": "",
"dms": {
"addpayer": "",
"createnewcustomer": "",
"findmakemodelcode": "",
"getmakes": "",
"labels": {
"refreshallocations": ""
},
"post": "",
"refetchmakesmodels": "",
"usegeneric": "",
@@ -1130,6 +1152,7 @@
"removefromproduction": "",
"schedule": "Programar",
"sendcsi": "",
"sendtodms": "",
"sync": "",
"uninvoice": "",
"unvoid": "",
@@ -1239,6 +1262,7 @@
"story": "",
"vinowner": ""
},
"dms_allocation": "",
"driveable": "",
"employee_body": "",
"employee_csr": "Representante de servicio al cliente.",
@@ -1325,6 +1349,7 @@
"pas": "",
"pay_date": "Fecha de Pay",
"phoneshort": "PH",
"po_number": "",
"policy_no": "Política #",
"ponumber": "numero postal",
"production_vars": {
@@ -1451,6 +1476,7 @@
"ownerinfo": "",
"vehicleinfo": ""
},
"createiouwarning": "",
"creating_new_job": "Creando nuevo trabajo ...",
"deductible": {
"stands": "",
@@ -1571,6 +1597,7 @@
"duplicated": "",
"exported": "",
"invoiced": "",
"ioucreated": "",
"partsqueue": "",
"save": "Trabajo guardado con éxito.",
"savetitle": "Registro guardado con éxito.",
@@ -1739,6 +1766,7 @@
"messaging": "Mensajería",
"noallowtxt": "",
"nojobs": "",
"nopush": "",
"phonenumber": "",
"presets": "",
"recentonly": "",

View File

@@ -95,6 +95,7 @@
"jobfieldchanged": "",
"jobimported": "",
"jobinproductionchange": "",
"jobioucreated": "",
"jobmodifylbradj": "",
"jobnoteadded": "",
"jobnotedeleted": "",
@@ -176,6 +177,7 @@
"entered_total": "",
"enteringcreditmemo": "",
"federal_tax": "",
"iouexists": "",
"local_tax": "",
"markforreexport": "",
"new": "",
@@ -394,6 +396,7 @@
"ar": "",
"ats": "",
"federal_tax": "",
"gst_override": "",
"la1": "",
"la2": "",
"la3": "",
@@ -413,6 +416,7 @@
"mash": "",
"paa": "",
"pac": "",
"pag": "",
"pal": "",
"pam": "",
"pan": "",
@@ -496,9 +500,11 @@
"deliverchecklist": "",
"dms": {
"cdk": {
"controllist": "",
"payers": ""
},
"cdk_dealerid": "",
"pbs_serialnumber": "",
"title": ""
},
"emaillater": "",
@@ -757,6 +763,14 @@
"projectedmonthlysales": ""
}
},
"dms": {
"errors": {
"alreadyexported": ""
},
"labels": {
"refreshallocations": ""
}
},
"documents": {
"actions": {
"delete": "",
@@ -885,10 +899,12 @@
"selectall": "",
"senderrortosupport": "",
"submit": "",
"tryagain": "",
"view": "",
"viewreleasenotes": ""
},
"errors": {
"fcm": "",
"notfound": ""
},
"itemtypes": {
@@ -911,6 +927,7 @@
"exceptiontitle": "",
"friday": "",
"globalsearch": "",
"help": "",
"hours": "",
"in": "dans",
"instanceconflictext": "",
@@ -1070,6 +1087,7 @@
"labels": {
"billref": "",
"edit": "Ligne d'édition",
"ioucreated": "",
"new": "Nouvelle ligne",
"nostatus": "",
"presets": ""
@@ -1099,12 +1117,16 @@
"changestatus": "Changer le statut",
"changestimator": "",
"convert": "Convertir",
"createiou": "",
"deliver": "",
"dms": {
"addpayer": "",
"createnewcustomer": "",
"findmakemodelcode": "",
"getmakes": "",
"labels": {
"refreshallocations": ""
},
"post": "",
"refetchmakesmodels": "",
"usegeneric": "",
@@ -1130,6 +1152,7 @@
"removefromproduction": "",
"schedule": "Programme",
"sendcsi": "",
"sendtodms": "",
"sync": "",
"uninvoice": "",
"unvoid": "",
@@ -1239,6 +1262,7 @@
"story": "",
"vinowner": ""
},
"dms_allocation": "",
"driveable": "",
"employee_body": "",
"employee_csr": "représentant du service à la clientèle",
@@ -1325,6 +1349,7 @@
"pas": "",
"pay_date": "Date d'Pay",
"phoneshort": "PH",
"po_number": "",
"policy_no": "Politique #",
"ponumber": "Numéro de bon de commande",
"production_vars": {
@@ -1451,6 +1476,7 @@
"ownerinfo": "",
"vehicleinfo": ""
},
"createiouwarning": "",
"creating_new_job": "Création d'un nouvel emploi ...",
"deductible": {
"stands": "",
@@ -1571,6 +1597,7 @@
"duplicated": "",
"exported": "",
"invoiced": "",
"ioucreated": "",
"partsqueue": "",
"save": "Le travail a été enregistré avec succès.",
"savetitle": "Enregistrement enregistré avec succès.",
@@ -1739,6 +1766,7 @@
"messaging": "Messagerie",
"noallowtxt": "",
"nojobs": "",
"nopush": "",
"phonenumber": "",
"presets": "",
"recentonly": "",

View File

@@ -0,0 +1,101 @@
import React from "react";
import { Select } from "antd";
import i18n from "../translations/i18n";
export default function CiecaSelect(parts = true, labor = true) {
return (
<>
{labor && (
<>
<Select.Option value="LAA">
{i18n.t("joblines.fields.lbr_types.LAA")}
</Select.Option>
<Select.Option value="LAB">
{i18n.t("joblines.fields.lbr_types.LAB")}
</Select.Option>
<Select.Option value="LAD">
{i18n.t("joblines.fields.lbr_types.LAD")}
</Select.Option>
<Select.Option value="LAE">
{i18n.t("joblines.fields.lbr_types.LAE")}
</Select.Option>
<Select.Option value="LAF">
{i18n.t("joblines.fields.lbr_types.LAF")}
</Select.Option>
<Select.Option value="LAG">
{i18n.t("joblines.fields.lbr_types.LAG")}
</Select.Option>
<Select.Option value="LAM">
{i18n.t("joblines.fields.lbr_types.LAM")}
</Select.Option>
<Select.Option value="LAR">
{i18n.t("joblines.fields.lbr_types.LAR")}
</Select.Option>
<Select.Option value="LAS">
{i18n.t("joblines.fields.lbr_types.LAS")}
</Select.Option>
<Select.Option value="LAU">
{i18n.t("joblines.fields.lbr_types.LAU")}
</Select.Option>
<Select.Option value="LA1">
{i18n.t("joblines.fields.lbr_types.LA1")}
</Select.Option>
<Select.Option value="LA2">
{i18n.t("joblines.fields.lbr_types.LA2")}
</Select.Option>
<Select.Option value="LA3">
{i18n.t("joblines.fields.lbr_types.LA3")}
</Select.Option>
<Select.Option value="LA4">
{i18n.t("joblines.fields.lbr_types.LA4")}
</Select.Option>
</>
)}
{parts && (
<>
<Select.Option value="PAA">
{i18n.t("joblines.fields.part_types.PAA")}
</Select.Option>
<Select.Option value="PAC">
{i18n.t("joblines.fields.part_types.PAC")}
</Select.Option>
<Select.Option value="PAL">
{i18n.t("joblines.fields.part_types.PAL")}
</Select.Option>
<Select.Option value="PAG">
{i18n.t("joblines.fields.part_types.PAG")}
</Select.Option>
<Select.Option value="PAM">
{i18n.t("joblines.fields.part_types.PAM")}
</Select.Option>
<Select.Option value="PAP">
{i18n.t("joblines.fields.part_types.PAP")}
</Select.Option>
<Select.Option value="PAN">
{i18n.t("joblines.fields.part_types.PAN")}
</Select.Option>
<Select.Option value="PAO">
{i18n.t("joblines.fields.part_types.PAO")}
</Select.Option>
<Select.Option value="PAR">
{i18n.t("joblines.fields.part_types.PAR")}
</Select.Option>
<Select.Option value="PAS">
{i18n.t("joblines.fields.part_types.PAS")}
</Select.Option>
</>
)}
</>
);
}
export function GetPartTypeName(part_type) {
if (!part_type) return null;
return i18n.t(`joblines.fields.part_types.${part_type.toUpperCase()}`);
}
export function Get(part_type) {
if (!part_type) return null;
return i18n.t(`joblines.fields.part_types.${part_type.toUpperCase()}`);
}

View File

@@ -6,9 +6,10 @@ import { WebSocketLink } from "@apollo/client/link/ws";
import { getMainDefinition } from "@apollo/client/utilities";
//import { split } from "apollo-link";
import apolloLogger from "apollo-link-logger";
import axios from "axios";
import { auth } from "../firebase/firebase.utils";
import errorLink from "../graphql/apollo-error-handling";
import { store } from "../redux/store";
const httpLink = new HttpLink({
uri: process.env.REACT_APP_GRAPHQL_ENDPOINT,
});
@@ -47,7 +48,24 @@ const roundTripLink = new ApolloLink((operation, forward) => {
});
const TrackExecutionTime = async (operationName, time) => {
//await axios.post("/ioevent", { operationName, time, dbevent: true });
const rdxStore = store.getState();
try {
axios.post("/ioevent", {
operationName,
time,
dbevent: true,
user:
rdxStore.user &&
rdxStore.user.currentUser &&
rdxStore.user.currentUser.email,
imexshopid:
rdxStore.user &&
rdxStore.user.bodyshop &&
rdxStore.user.bodyshop.imexshopid,
});
} catch (error) {
console.log("IOEvent Error", error);
}
};
const subscriptionMiddleware = {

View File

@@ -148,8 +148,6 @@ export async function RenderTemplates(
},
};
console.log("reportRequest", reportRequest);
try {
const render = await jsreport.renderAsync(reportRequest);
if (!renderAsHtml) {

View File

@@ -0,0 +1,34 @@
export default async function FcmHandler({ client, payload }) {
console.log("Handling payload type", payload);
switch (payload.type) {
case "messaging-inbound":
client.cache.modify({
id: client.cache.identify({
__typename: "conversations",
id: payload.conversationid,
}),
fields: {
messages_aggregate(cached) {
return { aggregate: { count: cached.aggregate.count + 1 } };
},
},
});
break;
case "messaging-mark-conversation-read":
client.cache.modify({
id: client.cache.identify({
__typename: "conversations",
id: payload.conversationid,
}),
fields: {
messages_aggregate(cached) {
return { aggregate: { count: 0 } };
},
},
});
break;
default:
console.log("No payload type set.");
break;
}
}

View File

@@ -1172,11 +1172,12 @@
- active:
_eq: true
columns:
- id
- created_at
- updated_at
- bodyshopid
- created_at
- id
- phone_num
- unreadcnt
- updated_at
select_permissions:
- role: user
permission:
@@ -1186,6 +1187,7 @@
- created_at
- id
- phone_num
- unreadcnt
- updated_at
filter:
bodyshop:
@@ -1206,6 +1208,7 @@
- created_at
- id
- phone_num
- unreadcnt
- updated_at
filter:
bodyshop:
@@ -2123,6 +2126,7 @@
- est_seq
- glass_flag
- id
- ioucreated
- jobid
- lbr_amt
- lbr_hrs_j
@@ -2185,6 +2189,7 @@
- est_seq
- glass_flag
- id
- ioucreated
- jobid
- lbr_amt
- lbr_hrs_j
@@ -2258,6 +2263,7 @@
- est_seq
- glass_flag
- id
- ioucreated
- jobid
- lbr_amt
- lbr_hrs_j
@@ -2390,6 +2396,9 @@
- name: employee_refinish_rel
using:
foreign_key_constraint_on: employee_refinish
- name: iouparent_rel
using:
foreign_key_constraint_on: iouparent
- name: owner
using:
foreign_key_constraint_on: ownerid
@@ -2453,6 +2462,13 @@
table:
schema: public
name: exportlog
- name: ious
using:
foreign_key_constraint_on:
column: iouparent
table:
schema: public
name: jobs
- name: job_conversations
using:
foreign_key_constraint_on:
@@ -2616,6 +2632,7 @@
- ded_status
- deliverchecklist
- depreciation_taxes
- dms_allocation
- driveable
- employee_body
- employee_csr
@@ -2677,6 +2694,7 @@
- intakechecklist
- invoice_allocation
- invoice_date
- iouparent
- job_totals
- kanbanparent
- kmin
@@ -2868,6 +2886,7 @@
- ded_status
- deliverchecklist
- depreciation_taxes
- dms_allocation
- driveable
- employee_body
- employee_csr
@@ -2929,6 +2948,7 @@
- intakechecklist
- invoice_allocation
- invoice_date
- iouparent
- job_totals
- kanbanparent
- kmin
@@ -3130,6 +3150,7 @@
- ded_status
- deliverchecklist
- depreciation_taxes
- dms_allocation
- driveable
- employee_body
- employee_csr
@@ -3191,6 +3212,7 @@
- intakechecklist
- invoice_allocation
- invoice_date
- iouparent
- job_totals
- kanbanparent
- kmin

View File

@@ -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 "dms_allocation" text
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."jobs" add column "dms_allocation" text
null;

View File

@@ -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;

View File

@@ -0,0 +1,2 @@
alter table "public"."jobs" add column "iouparent" uuid
null;

View File

@@ -0,0 +1 @@
alter table "public"."jobs" drop constraint "jobs_iouparent_fkey";

View File

@@ -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;

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "jobs_idx_iouparent";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "jobs_idx_iouparent" on
"public"."jobs" using btree ("iouparent");

View File

@@ -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';

View File

@@ -0,0 +1,2 @@
alter table "public"."joblines" add column "ioucreated" boolean
not null default 'false';

View File

@@ -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';

View File

@@ -0,0 +1,2 @@
alter table "public"."joblines" add column "iou" boolean
not null default 'false';

View File

@@ -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;

View File

@@ -0,0 +1 @@
alter table "public"."joblines" drop column "iou" cascade;

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."conversations" add column "unreadcnt" numeric
-- not null default '0';

View File

@@ -0,0 +1,2 @@
alter table "public"."conversations" add column "unreadcnt" numeric
not null default '0';

View File

@@ -17,13 +17,13 @@
"start": "node server.js"
},
"dependencies": {
"aws-sdk": "^2.1028.0",
"aws-sdk": "^2.1043.0",
"axios": "^0.24.0",
"bluebird": "^3.7.2",
"body-parser": "^1.18.3",
"cloudinary": "^1.27.1",
"compression": "^1.7.4",
"cookie-parser": "^1.4.5",
"cookie-parser": "^1.4.6",
"cors": "2.8.5",
"csrf": "^3.1.0",
"dinero.js": "^1.9.1",
@@ -31,7 +31,7 @@
"express": "^4.16.4",
"firebase-admin": "^10.0.0",
"graphql": "^16.0.1",
"graphql-request": "^3.6.1",
"graphql-request": "^3.7.0",
"graylog2": "^0.2.1",
"inline-css": "^3.0.0",
"intuit-oauth": "^4.0.0",
@@ -40,13 +40,13 @@
"node-mailjet": "^3.3.4",
"node-quickbooks": "^2.0.39",
"nodemailer": "^6.7.1",
"phone": "^3.1.9",
"phone": "^3.1.10",
"query-string": "^7.0.1",
"soap": "^0.43.0",
"socket.io": "^4.3.2",
"socket.io": "^4.4.0",
"ssh2-sftp-client": "^7.1.0",
"stripe": "^8.188.0",
"twilio": "^3.71.1",
"stripe": "^8.191.0",
"twilio": "^3.71.3",
"uuid": "^8.3.2",
"xmlbuilder2": "^3.0.2"
},

View File

@@ -66,7 +66,6 @@ app.get("/test", async function (req, res) {
"git rev-parse --short HEAD"
);
logger.log("test-api-status", "DEBUG", "api", { commit });
res.status(200).send(`OK - ${commit}`);
});
@@ -114,6 +113,7 @@ app.post(
twilio.webhook({ validate: process.env.NODE_ENV === "PRODUCTION" }),
smsStatus.status
);
app.post("/sms/markConversationRead", smsStatus.markConversationRead);
var job = require("./server/job/job");
app.post("/job/totals", fb.validateFirebaseIdToken, job.totals);
@@ -133,9 +133,10 @@ app.post("/render/inlinecss", fb.validateFirebaseIdToken, inlineCss.inlinecss);
app.post(
"/notifications/send",
fb.validateFirebaseIdToken,
fb.sendNotification
);
app.post("/notifications/subscribe", fb.validateFirebaseIdToken, fb.subscribe);
app.post("/adm/updateuser", fb.validateFirebaseIdToken, fb.updateUser);
//Stripe Processing

View File

@@ -6,7 +6,7 @@ require("dotenv").config({
),
});
const GraphQLClient = require("graphql-request").GraphQLClient;
const axios = require("axios").default;
const AxiosLib = require("axios").default;
const queries = require("../../graphql-client/queries");
const { PBS_ENDPOINTS, PBS_CREDENTIALS } = require("./pbs-constants");
@@ -15,6 +15,37 @@ const CalculateAllocations =
require("../../cdk/cdk-calculate-allocations").default;
const CdkBase = require("../../web-sockets/web-socket");
const moment = require("moment");
const Dinero = require("dinero.js");
const axios = AxiosLib.create();
axios.interceptors.request.use((x) => {
const socket = x.socket;
const headers = {
...x.headers.common,
...x.headers[x.method],
...x.headers,
};
const printable = `${new Date()} | Request: ${x.method.toUpperCase()} | ${
x.url
} | ${JSON.stringify(x.data)} | ${JSON.stringify(headers)}`;
console.log(printable);
CdkBase.createLogEvent(socket, "TRACE", `Raw Request: ${printable}`);
return x;
});
axios.interceptors.response.use((x) => {
const socket = x.config.socket;
const printable = `${new Date()} | Response: ${x.status} | ${JSON.stringify(
x.data
)}`;
console.log(printable);
CdkBase.createLogEvent(socket, "TRACE", `Raw Response: ${printable}`);
return x;
});
exports.default = async function (socket, { txEnvelope, jobid }) {
socket.logEvents = [];
@@ -31,7 +62,7 @@ exports.default = async function (socket, { txEnvelope, jobid }) {
socket.JobData = JobData;
//Query for the Vehicle record to get the associated customer.
// socket.DmsVeh = await QueryVehicleFromDms(socket);
socket.DmsVeh = await QueryVehicleFromDms(socket);
//Todo: Need to validate the lines and methods below.
if (socket.DmsVeh && socket.DmsVeh.CustomerRef) {
//Get the associated customer from the Vehicle Record.
@@ -72,7 +103,9 @@ exports.PbsSelectedCustomer = async function PbsSelectedCustomer(
CdkBase.createLogEvent(
socket,
"DEBUG",
`Upserting contact information to DMS for ${socket.JobData.ownr_fn} ${socket.JobData.ownr_ln} ${socket.JobData.ownr_co_nm}`
`Upserting contact information to DMS for ${
socket.JobData.ownr_fn || ""
} ${socket.JobData.ownr_ln || ""} ${socket.JobData.ownr_co_nm || ""}`
);
const ownerRef = await UpsertContactData(socket, selectedCustomerId);
@@ -83,9 +116,11 @@ exports.PbsSelectedCustomer = async function PbsSelectedCustomer(
);
await UpsertVehicleData(socket, ownerRef.ReferenceId);
CdkBase.createLogEvent(socket, "DEBUG", `Inserting account data.`);
await InsertAccountPostingData(socket);
CdkBase.createLogEvent(socket, "DEBUG", `Marking job as exported.`);
// await MarkJobExported(socket, socket.JobData.id);
await MarkJobExported(socket, socket.JobData.id);
socket.emit("export-success", socket.JobData.id);
} catch (error) {
@@ -135,7 +170,7 @@ async function QueryJobData(socket, jobid) {
async function QueryVehicleFromDms(socket) {
try {
const { data: VehicleGetResponse } = await axios.post(
const { data: VehicleGetResponse, request } = await axios.post(
PBS_ENDPOINTS.VehicleGet,
{
SerialNumber: socket.JobData.bodyshop.pbs_serialnumber,
@@ -160,8 +195,9 @@ async function QueryVehicleFromDms(socket) {
// IncludeBuildVehicles: false,
// ShortVIN: "String",
},
{ auth: PBS_CREDENTIALS }
{ auth: PBS_CREDENTIALS, socket }
);
CheckForErrors(socket, VehicleGetResponse);
return VehicleGetResponse;
} catch (error) {
@@ -180,13 +216,13 @@ async function QueryCustomersFromDms(socket) {
{
SerialNumber: socket.JobData.bodyshop.pbs_serialnumber,
//ContactId: "00000000000000000000000000000000",
ContactCode: socket.JobData.owner.accountingid,
// ContactCode: socket.JobData.owner.accountingid,
FirstName: socket.JobData.ownr_co_nm
? socket.JobData.ownr_co_nm
: socket.JobData.ownr_fn,
LastName: socket.JobData.ownr_ln,
PhoneNumber: socket.JobData.ownr_ph1,
// EmailAddress: "String",
EmailAddress: socket.JobData.ownr_ea,
// ModifiedSince: "0001-01-01T00:00:00.0000000Z",
// ModifiedUntil: "0001-01-01T00:00:00.0000000Z",
// ContactIdList: ["00000000000000000000000000000000"],
@@ -196,7 +232,7 @@ async function QueryCustomersFromDms(socket) {
// DriverLicense: "String",
// ZipCode: "String",
},
{ auth: PBS_CREDENTIALS }
{ auth: PBS_CREDENTIALS, socket }
);
CheckForErrors(socket, CustomerGetResponse);
return CustomerGetResponse && CustomerGetResponse.Contacts;
@@ -232,7 +268,7 @@ async function QueryCustomerBycodeFromDms(socket, CustomerRef) {
// DriverLicense: "String",
// ZipCode: "String",
},
{ auth: PBS_CREDENTIALS }
{ auth: PBS_CREDENTIALS, socket }
);
CheckForErrors(socket, CustomerGetResponse);
return CustomerGetResponse && CustomerGetResponse.Contacts;
@@ -318,7 +354,7 @@ async function UpsertContactData(socket, selectedCustomerId) {
// UserRequest: "String",
// UserRef: "00000000000000000000000000000000",
},
{ auth: PBS_CREDENTIALS }
{ auth: PBS_CREDENTIALS, socket }
);
CheckForErrors(socket, ContactChangeResponse);
return ContactChangeResponse;
@@ -347,16 +383,17 @@ async function UpsertVehicleData(socket, ownerRef) {
//FleetNumber: "String",
//Status: "String",
OwnerRef: ownerRef, // "00000000000000000000000000000000",
//ModelNumber: "String",
ModelNumber:
socket.JobData.vehicle && socket.JobData.vehicle.v_makecode,
Make: socket.JobData.v_make_desc,
Model: socket.JobData.v_model_desc,
//Trim: "String",
Trim: socket.JobData.vehicle && socket.JobData.vehicle.v_trimcode,
//VehicleType: "String",
Year: socket.JobData.v_model_yr,
Odometer: socket.JobData.kmin,
Odometer: socket.JobData.kmout,
ExteriorColor: {
Code: socket.JobData.v_color,
//Description: "String",
Description: socket.JobData.v_color,
},
// InteriorColor: { Code: "String", Description: "String" },
//Engine: "String",
@@ -475,7 +512,7 @@ async function UpsertVehicleData(socket, ownerRef) {
// UserRequest: "String",
// UserRef: "00000000000000000000000000000000",
},
{ auth: PBS_CREDENTIALS }
{ auth: PBS_CREDENTIALS, socket }
);
CheckForErrors(socket, VehicleChangeResponse);
return VehicleChangeResponse;
@@ -499,7 +536,7 @@ async function InsertAccountPostingData(socket) {
const item = {
Account: alloc.profitCenter.dms_acctnumber,
ControlNumber: socket.JobData.ro_number,
Amount: alloc.sale.multiply(-1).toFormat("0.0"),
Amount: alloc.sale.multiply(-1).toFormat("0.00"),
//Comment: "String",
//AdditionalInfo: "String",
InvoiceNumber: socket.JobData.ro_number,
@@ -513,7 +550,7 @@ async function InsertAccountPostingData(socket) {
const item = {
Account: alloc.costCenter.dms_acctnumber,
ControlNumber: socket.JobData.ro_number,
Amount: alloc.cost.toFormat("0.0"),
Amount: alloc.cost.toFormat("0.00"),
//Comment: "String",
//AdditionalInfo: "String",
InvoiceNumber: socket.JobData.ro_number,
@@ -524,7 +561,7 @@ async function InsertAccountPostingData(socket) {
const itemWip = {
Account: alloc.costCenter.dms_wip_acctnumber,
ControlNumber: socket.JobData.ro_number,
Amount: alloc.cost.multiply(-1).toFormat("0.0"),
Amount: alloc.cost.multiply(-1).toFormat("0.00"),
//Comment: "String",
//AdditionalInfo: "String",
InvoiceNumber: socket.JobData.ro_number,
@@ -539,7 +576,7 @@ async function InsertAccountPostingData(socket) {
const item2 = {
Account: alloc.profitCenter.dms_acctnumber,
ControlNumber: socket.JobData.ro_number,
Amount: alloc.sale.multiply(-1).toFormat("0.0"),
Amount: alloc.sale.multiply(-1).toFormat("0.00"),
//Comment: "String",
//AdditionalInfo: "String",
InvoiceNumber: socket.JobData.ro_number,
@@ -549,6 +586,21 @@ async function InsertAccountPostingData(socket) {
}
}
});
socket.txEnvelope.payers.forEach((payer) => {
const item = {
Account: payer.dms_acctnumber,
ControlNumber: payer.controlnumber,
Amount: Dinero({ amount: Math.round(payer.amount * 100) }).toFormat(
"0.0"
),
//Comment: "String",
//AdditionalInfo: "String",
InvoiceNumber: socket.JobData.ro_number,
InvoiceDate: moment(socket.JobData.date_invoiced).toISOString(),
};
wips.push(item);
});
const { data: AccountPostingChange } = await axios.post(
PBS_ENDPOINTS.AccountingPostingChange,
@@ -564,7 +616,7 @@ async function InsertAccountPostingData(socket) {
Lines: wips,
},
},
{ auth: PBS_CREDENTIALS }
{ auth: PBS_CREDENTIALS, socket }
);
CheckForErrors(socket, AccountPostingChange);

View File

@@ -106,10 +106,23 @@ exports.default = async function (socket, jobid) {
return acc;
}, {});
const selectedDmsAllocationConfig =
bodyshop.md_responsibility_centers.dms_defaults.find(
(d) => d.name === job.dms_allocation
);
CdkBase.createLogEvent(
socket,
"DEBUG",
`Using DMS Allocation ${
selectedDmsAllocationConfig && selectedDmsAllocationConfig.name
} for cost export.`
);
const costCenterHash = job.bills.reduce((bill_acc, bill_val) => {
bill_val.billlines.map((line_val) => {
if (!bill_acc[line_val.cost_center])
bill_acc[line_val.cost_center] = Dinero();
if (!bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]])
bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]] =
Dinero();
let lineDinero = Dinero({
amount: Math.round((line_val.actual_cost || 0) * 100),
@@ -117,8 +130,10 @@ exports.default = async function (socket, jobid) {
.multiply(line_val.quantity)
.multiply(bill_val.is_credit_memo ? -1 : 1);
bill_acc[line_val.cost_center] =
bill_acc[line_val.cost_center].add(lineDinero);
bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]] =
bill_acc[selectedDmsAllocationConfig.costs[line_val.cost_center]].add(
lineDinero
);
return null;
});
return bill_acc;
@@ -136,17 +151,19 @@ exports.default = async function (socket, jobid) {
),
});
//Add it to the right cost center.
if (!costCenterHash[ticket.cost_center])
costCenterHash[ticket.cost_center] = Dinero();
if (!costCenterHash[selectedDmsAllocationConfig.costs[ticket.ciecacode]])
costCenterHash[selectedDmsAllocationConfig.costs[ticket.ciecacode]] =
Dinero();
costCenterHash[ticket.cost_center] =
costCenterHash[ticket.cost_center].add(TicketTotal);
costCenterHash[selectedDmsAllocationConfig.costs[ticket.ciecacode]] =
costCenterHash[selectedDmsAllocationConfig.costs[ticket.ciecacode]].add(
TicketTotal
);
});
if (!hasMapaLine && job.job_totals.rates.mapa.total.amount > 0) {
// console.log("Adding MAPA Line Manually.");
const mapaAccountName =
bodyshop.md_responsibility_centers.defaults.profits.MAPA;
const mapaAccountName = selectedDmsAllocationConfig.profits.MAPA;
const mapaAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === mapaAccountName
@@ -167,8 +184,7 @@ exports.default = async function (socket, jobid) {
if (!hasMashLine && job.job_totals.rates.mash.total.amount > 0) {
// console.log("Adding MASH Line Manually.");
const mashAccountName =
bodyshop.md_responsibility_centers.defaults.profits.MASH;
const mashAccountName = selectedDmsAllocationConfig.profits.MASH;
const mashAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === mashAccountName
@@ -192,13 +208,12 @@ exports.default = async function (socket, jobid) {
// );
taxAllocations.state.sale = taxAllocations.state.sale.add(
Dinero({ amount: (ca_bc_pvrt || 0) * 100 })
Dinero({ amount: Math.round((ca_bc_pvrt || 0) * 100) })
);
}
if (job.towing_payable && job.towing_payable !== 0) {
const towAccountName =
bodyshop.md_responsibility_centers.defaults.profits.TOW;
const towAccountName = selectedDmsAllocationConfig.profits.TOW;
const towAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === towAccountName
@@ -218,8 +233,7 @@ exports.default = async function (socket, jobid) {
}
}
if (job.storage_payable && job.storage_payable !== 0) {
const storageAccountName =
bodyshop.md_responsibility_centers.defaults.profits.TOW;
const storageAccountName = selectedDmsAllocationConfig.profits.TOW;
const towAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === storageAccountName
@@ -242,8 +256,7 @@ exports.default = async function (socket, jobid) {
}
if (job.adjustment_bottom_line && job.adjustment_bottom_line !== 0) {
const otherAccountName =
bodyshop.md_responsibility_centers.defaults.profits.PAO;
const otherAccountName = selectedDmsAllocationConfig.profits.PAO;
const otherAccount = bodyshop.md_responsibility_centers.profits.find(
(c) => c.name === otherAccountName
@@ -294,7 +307,20 @@ exports.default = async function (socket, jobid) {
taxAllocations[key].cost.getAmount() > 0
)
.map((key) => {
return { ...taxAllocations[key], tax: key };
if (
key === "federal" &&
selectedDmsAllocationConfig.gst_override &&
selectedDmsAllocationConfig.gst_override !== ""
) {
const ret = { ...taxAllocations[key], tax: key };
ret.costCenter.dms_acctnumber =
selectedDmsAllocationConfig.gst_override;
ret.profitCenter.dms_acctnumber =
selectedDmsAllocationConfig.gst_override;
return ret;
} else {
return { ...taxAllocations[key], tax: key };
}
}),
];
} catch (error) {

View File

@@ -54,18 +54,21 @@ exports.default = async function (socket, { txEnvelope, jobid }) {
const DMSVehCustomer =
socket.DMSVeh &&
socket.DMSVeh.owners &&
socket.DMSVeh.owners.find((o) => o.id.assigningPartyId === "CURRENT");
CdkBase.createLogEvent(
socket,
"DEBUG",
`{2.2} Querying the Customer using the ID from DMSVeh: ${DMSVehCustomer.id.value}`
);
socket.DMSVehCustomer = await QueryDmsCustomerById(
socket,
JobData,
DMSVehCustomer.id.value
);
if (DMSVehCustomer && DMSVehCustomer.id && DMSVehCustomer.id.value) {
CdkBase.createLogEvent(
socket,
"DEBUG",
`{2.2} Querying the Customer using the ID from DMSVeh: ${DMSVehCustomer.id.value}`
);
socket.DMSVehCustomer = await QueryDmsCustomerById(
socket,
JobData,
DMSVehCustomer.id.value
);
}
}
CdkBase.createLogEvent(
@@ -771,26 +774,44 @@ async function UpdateDmsVehicle(socket) {
let ids = [];
const existingOwnerinVeh = socket.DMSVeh.owners.filter(
(o) => o.id.value === socket.DMSCust.id.value
);
const existingOwnerinVeh =
socket.DMSVeh &&
socket.DMSVeh.owners &&
socket.DMSVeh.owners.find((o) => o.id.value === socket.DMSCust.id.value);
if (existingOwnerinVeh) {
ids = socket.DMSVeh.owners.filter(
(o) => o.id.value === socket.DMSCust.id.value
);
ids = socket.DMSVeh.owners.map((o) => {
return {
id: {
assigningPartyId:
o.id.value === socket.DMSCust.id.value ? "CURRENT" : "PREVIOUS",
value: o.id.value,
},
};
});
} else {
const oldOwner =
socket.DMSVeh &&
socket.DMSVeh.owners &&
socket.DMSVeh.owners.find((o) => o.id.assigningPartyId === "CURRENT");
ids = [
{
assigningPartyId: "CURRENT",
value: socket.DMSCust.id.value,
id: {
assigningPartyId: "CURRENT",
value: socket.DMSCust.id.value,
},
},
...socket.DMSVeh.owners.map((o) => {
return {
assigningPartyId: "PREVIOUS",
value: o.id.value,
};
}),
...(oldOwner
? [
{
id: {
assigningPartyId: "PREVIOUS",
value: oldOwner.id.value,
},
},
]
: []),
];
}
@@ -812,7 +833,7 @@ async function UpdateDmsVehicle(socket) {
socket.DMSVeh.vehicle.deliveryDate
).toISOString(),
},
owners: { ids: ids },
owners: ids,
},
arg3: "VEHICLES",
});

View File

@@ -15,10 +15,10 @@ const CDK_CREDENTIALS = {
};
exports.CDK_CREDENTIALS = CDK_CREDENTIALS;
// const cdkDomain =
// process.env.NODE_ENV === "production"
// ? "https://3pa.dmotorworks.com"
// : "https://uat-3pa.dmotorworks.com";
const cdkDomain =
process.env.NODE_ENV === "production"
? "https://3pa.dmotorworks.com"
: "https://uat-3pa.dmotorworks.com";
function CheckCdkResponseForError(socket, soapResponse) {
if (!soapResponse[0]) {
@@ -75,7 +75,7 @@ function checkIndividualResult(socket, ResultToCheck) {
exports.checkIndividualResult = checkIndividualResult;
const cdkDomain = "https://uat-3pa.dmotorworks.com";
//const cdkDomain = "https://uat-3pa.dmotorworks.com";
exports.default = {
// VehicleSearch: `${cdkDomain}/pip-vehicle/services/VehicleSearch?wsdl`,
HelpDataBase: `${cdkDomain}/pip-help-database-location/services/HelpDatabaseLocation?wsdl`,

File diff suppressed because it is too large Load Diff

View File

@@ -74,7 +74,7 @@ exports.default = async (req, res) => {
{
version: "1.0",
encoding: "UTF-8",
keepNullNodes: true,
//keepNullNodes: true,
},
autoHouseObject
)
@@ -110,7 +110,8 @@ exports.default = async (req, res) => {
});
}
}
res.json(allxmlsToUpload);
return;
if (process.env.NODE_ENV !== "production") {
res.sendStatus(200);
return;
@@ -184,31 +185,31 @@ const CreateRepairOrderTag = (job, errorCallback) => {
}${job.est_ct_fn ? job.est_ct_fn : ""}`,
},
CustomerInformation: {
FirstName: job.ownr_fn,
LastName: job.ownr_ln,
Street: job.ownr_addr1,
City: job.ownr_city,
State: job.ownr_st,
Zip: job.ownr_zip,
Phone1: job.ownr_ph1,
FirstName: job.ownr_fn || "",
LastName: job.ownr_ln || "",
Street: job.ownr_addr1 || "",
City: job.ownr_city || "",
State: job.ownr_st || "",
Zip: job.ownr_zip || "",
Phone1: job.ownr_ph1 || "",
Phone2: null,
Phone2Extension: null,
Phone3: null,
Phone3Extension: null,
FileComments: null,
Source: null,
Email: job.ownr_ea,
Email: job.ownr_ea || "",
RetWhsl: null,
Cat: null,
InsuredorClaimantFlag: null,
},
VehicleInformation: {
Year: job.v_model_yr,
Make: job.v_make_desc,
Model: job.v_model_desc,
VIN: job.v_vin,
Year: job.v_model_yr || "",
Make: job.v_make_desc || "",
Model: job.v_model_desc || "",
VIN: job.v_vin || "",
License: job.plate_no,
MileageIn: job.kmin,
MileageIn: job.kmin || 0,
Vehiclecolor: job.v_color,
VehicleProductionDate: null,
VehiclePaintCode: null,
@@ -218,18 +219,18 @@ const CreateRepairOrderTag = (job, errorCallback) => {
},
InsuranceInformation: {
InsuranceCo: job.ins_co_nm,
CompanyName: job.ins_co_nm,
Address: job.ins_addr1,
City: job.ins_addr1,
State: job.ins_city,
Zip: job.ins_zip,
Phone: job.ins_ph1,
Fax: null,
InsuranceCo: job.ins_co_nm || "",
CompanyName: job.ins_co_nm || "",
Address: job.ins_addr1 || "",
City: job.ins_addr1 || "",
State: job.ins_city || "",
Zip: job.ins_zip || "",
Phone: job.ins_ph1 || "",
Fax: job.ins_fax || "",
ClaimType: null,
LossType: null,
Policy: null,
Claim: job.clm_no,
LossType: job.loss_type || "",
Policy: job.policy_no || "",
Claim: job.clm_no || "",
InsuredLastName: null,
InsuredFirstName: null,
ClaimantLastName: null,
@@ -242,23 +243,28 @@ const CreateRepairOrderTag = (job, errorCallback) => {
OutsideAdjuster: null,
},
Dates: {
DateofLoss: job.loss_date && moment(job.loss_date).format(AhDateFormat),
DateofLoss:
(job.loss_date && moment(job.loss_date).format(AhDateFormat)) || "",
InitialCustomerContactDate: null,
FirstFollowUpDate: null,
ReferralDate: null,
EstimateAppointmentDate: null,
SecondFollowUpDate: null,
AssignedDate:
job.asgn_date && moment(job.asgn_date).format(AhDateFormat),
(job.asgn_date && moment(job.asgn_date).format(AhDateFormat)) || "",
EstComplete: null,
CustomerAuthorizationDate: null,
InsuranceAuthorizationDate: null,
DateOpened: job.date_open && moment(job.date_open).format(AhDateFormat),
DateOpened:
(job.date_open && moment(job.date_open).format(AhDateFormat)) || "",
ScheduledArrivalDate:
job.scheduled_in && moment(job.scheduled_in).format(AhDateFormat),
CarinShop: job.actual_in && moment(job.actual_in).format(AhDateFormat),
(job.scheduled_in && moment(job.scheduled_in).format(AhDateFormat)) ||
"",
CarinShop:
(job.actual_in && moment(job.actual_in).format(AhDateFormat)) || "",
InsInspDate: null,
StartDate: job.actual_in && moment(job.actual_in).format(AhDateFormat),
StartDate:
(job.actual_in && moment(job.actual_in).format(AhDateFormat)) || "",
PartsOrder: null,
TeardownHold: null,
SupplementSubmittedDate: null,
@@ -268,22 +274,28 @@ const CreateRepairOrderTag = (job, errorCallback) => {
AssntoPaint: null,
AssntoDetail: null,
PromiseDate:
job.scheduled_completion &&
moment(job.scheduled_completion).format(AhDateFormat),
InsuranceTargetOut: null,
(job.scheduled_completion &&
moment(job.scheduled_completion).format(AhDateFormat)) ||
"",
//InsuranceTargetOut: null,
CarComplete:
job.actual_completion &&
moment(job.actual_completion).format(AhDateFormat),
(job.actual_completion &&
moment(job.actual_completion).format(AhDateFormat)) ||
"",
DeliveryAppointmentDate:
job.scheduled_delivery &&
moment(job.scheduled_delivery).format(AhDateFormat),
(job.scheduled_delivery &&
moment(job.scheduled_delivery).format(AhDateFormat)) ||
"",
DateClosed:
job.date_invoiced && moment(job.date_invoiced).format(AhDateFormat),
(job.date_invoiced &&
moment(job.date_invoiced).format(AhDateFormat)) ||
"",
CustomerPaidInFullDate: null,
InsurancePaidInFullDate: null,
CustPickup:
job.actual_delivery &&
moment(job.actual_delivery).format(AhDateFormat),
(job.actual_delivery &&
moment(job.actual_delivery).format(AhDateFormat)) ||
"",
AccountPostedDate:
job.date_exported && moment(job.date_exported).format(AhDateFormat),
CSIProcessedDate: null,
@@ -291,85 +303,86 @@ const CreateRepairOrderTag = (job, errorCallback) => {
AdditionalFollowUpDate: null,
},
Rates: {
BodyRate: job.rate_lab,
RefinishRate: job.rate_lar,
MechanicalRate: job.rate_lam,
StructuralRate: job.rate_las,
PMRate: job.rate_mapa,
BMRate: job.rate_mash,
BodyRate: job.rate_lab || 0,
RefinishRate: job.rate_lar || 0,
MechanicalRate: job.rate_lam || 0,
StructuralRate: job.rate_las || 0,
PMRate: job.rate_mapa || 0,
BMRate: job.rate_mash || 0,
TaxRate:
job.parts_tax_rates &&
job.parts_tax_rates.PAN &&
job.parts_tax_rates.PAN.prt_tax_rt,
StorageRateperDay: null,
DaysStored: null,
},
EstimateTotals: {
BodyHours: null,
RefinishHours: null,
MechanicalHours: null,
StructuralHours: null,
PartsTotal: null,
PartsOEM: null,
PartsAM: null,
PartsReconditioned: null,
PartsRecycled: null,
PartsOther: null,
SubletTotal: null,
BodyLaborTotal: null,
RefinishLaborTotal: null,
MechanicalLaborTotal: null,
StructuralLaborTotal: null,
MiscellaneousChargeTotal: null,
PMTotal: null,
BMTotal: null,
MiscTotal: null,
TowingTotal: null,
StorageTotal: null,
DetailTotal: null,
SalesTaxTotal: null,
GrossTotal: null,
DeductibleTotal: null,
DepreciationTotal: null,
Discount: null,
CustomerPay: null,
InsurancePay: null,
Deposit: null,
AmountDue: null,
},
SupplementTotals: {
BodyHours: null,
RefinishHours: null,
MechanicalHours: null,
StructuralHours: null,
PartsTotal: null,
PartsOEM: null,
PartsAM: null,
PartsReconditioned: null,
PartsRecycled: null,
PartsOther: null,
SubletTotal: null,
BodyLaborTotal: null,
RefinishLaborTotal: null,
MechanicalLaborTotal: null,
StructuralLaborTotal: null,
MiscellaneousChargeTotal: null,
PMTotal: null,
BMTotal: null,
MiscTotal: null,
TowingTotal: null,
StorageTotal: null,
DetailTotal: null,
SalesTaxTotal: null,
GrossTotal: null,
DeductibleTotal: null,
DepreciationTotal: null,
Discount: null,
CustomerPay: null,
InsurancePay: null,
Deposit: null,
AmountDue: null,
(job.parts_tax_rates &&
job.parts_tax_rates.PAN &&
job.parts_tax_rates.PAN.prt_tax_rt) ||
0,
StorageRateperDay: 0,
DaysStored: 0,
},
// EstimateTotals: {
// BodyHours: null,
// RefinishHours: null,
// MechanicalHours: null,
// StructuralHours: null,
// PartsTotal: null,
// PartsOEM: null,
// PartsAM: null,
// PartsReconditioned: null,
// PartsRecycled: null,
// PartsOther: null,
// SubletTotal: null,
// BodyLaborTotal: null,
// RefinishLaborTotal: null,
// MechanicalLaborTotal: null,
// StructuralLaborTotal: null,
// MiscellaneousChargeTotal: null,
// PMTotal: null,
// BMTotal: null,
// MiscTotal: null,
// TowingTotal: null,
// StorageTotal: null,
// DetailTotal: null,
// SalesTaxTotal: null,
// GrossTotal: null,
// DeductibleTotal: null,
// DepreciationTotal: null,
// Discount: null,
// CustomerPay: null,
// InsurancePay: null,
// Deposit: null,
// AmountDue: null,
// },
// SupplementTotals: {
// BodyHours: null,
// RefinishHours: null,
// MechanicalHours: null,
// StructuralHours: null,
// PartsTotal: null,
// PartsOEM: null,
// PartsAM: null,
// PartsReconditioned: null,
// PartsRecycled: null,
// PartsOther: null,
// SubletTotal: null,
// BodyLaborTotal: null,
// RefinishLaborTotal: null,
// MechanicalLaborTotal: null,
// StructuralLaborTotal: null,
// MiscellaneousChargeTotal: null,
// PMTotal: null,
// BMTotal: null,
// MiscTotal: null,
// TowingTotal: null,
// StorageTotal: null,
// DetailTotal: null,
// SalesTaxTotal: null,
// GrossTotal: null,
// DeductibleTotal: null,
// DepreciationTotal: null,
// Discount: null,
// CustomerPay: null,
// InsurancePay: null,
// Deposit: null,
// AmountDue: null,
// },
RevisedTotals: {
BodyHours: job.job_totals.rates.lab.hours,
BodyRepairHours: job.joblines
@@ -441,8 +454,8 @@ const CreateRepairOrderTag = (job, errorCallback) => {
),
StructuralLaborTotalCost:
repairCosts.StructuralLaborTotalCost.toFormat(AHDineroFormat),
MiscellaneousChargeTotal: null,
MiscellaneousChargeTotalCost: null,
MiscellaneousChargeTotal: 0,
MiscellaneousChargeTotalCost: 0,
PMTotal: Dinero(job.job_totals.rates.mapa.total).toFormat(
AHDineroFormat
),
@@ -461,17 +474,17 @@ const CreateRepairOrderTag = (job, errorCallback) => {
AHDineroFormat
),
StorageTotalCost: repairCosts.StorageTotalCost.toFormat(AHDineroFormat),
DetailTotal: null,
DetailTotalCost: null,
DetailTotal: 0,
DetailTotalCost: 0,
SalesTaxTotal: Dinero(job.job_totals.totals.local_tax)
.add(Dinero(job.job_totals.totals.state_tax))
.add(Dinero(job.job_totals.totals.federal_tax))
.toFormat(AHDineroFormat),
SalesTaxTotalCost: null,
SalesTaxTotalCost: 0,
GrossTotal: Dinero(job.job_totals.totals.net_repairs).toFormat(
AHDineroFormat
),
DeductibleTotal: job.ded_amt,
DeductibleTotal: job.ded_amt || 0,
DepreciationTotal: Dinero(
job.job_totals.totals.custPayable.dep_taxes
).toFormat(AHDineroFormat),
@@ -496,8 +509,10 @@ const CreateRepairOrderTag = (job, errorCallback) => {
InsScreenCommentsLine2: null,
AssignmentCaller: null,
AssignmentDivision: null,
LocationofPrimaryImpact: "12",
LocationofSecondaryImpact: null,
LocationofPrimaryImpact:
(job.area_of_damage && job.area_of_damage.impact1) || 0,
LocationofSecondaryImpact:
(job.area_of_damage && job.area_of_damage.impact2) || 0,
PaintTechID: null,
PaintTechName: null,
ImportType: null,
@@ -517,7 +532,7 @@ const CreateRepairOrderTag = (job, errorCallback) => {
RentalDueDate: null,
RentalActRetDate: null,
RentalCompanyID: null,
CSIID: null,
// CSIID: null,
InsGroupCode: null,
},
@@ -669,36 +684,39 @@ const GenerateDetailLines = (line, statuses) => {
const ret = {
BackOrdered: line.status === statuses.default_bo ? "1" : "0",
Cost:
line.billlines[0] &&
(line.billlines[0].actual_cost * line.billlines[0].quantity).toFixed(2),
Critical: null,
Description: line.line_desc,
DiscountMarkup: null,
(line.billlines[0] &&
(line.billlines[0].actual_cost * line.billlines[0].quantity).toFixed(
2
)) ||
0,
//Critical: null,
Description: line.line_desc || "",
DiscountMarkup: line.prt_dsmk_m || "",
InvoiceNumber: line.billlines[0] && line.billlines[0].bill.invoice_number,
IOUPart: null,
LineNumber: line.line_no,
IOUPart: 0,
LineNumber: line.line_no || 0,
MarkUp: null,
OrderedOn: null,
OriginalCost: null,
OriginalInvoiceNumber: null,
PriceEach: line.billlines[0] && line.billlines[0].actual_cost,
PriceEach: (line.billlines[0] && line.billlines[0].actual_cost) || 0,
PartNumber: _.escape(line.oem_partno),
ProfitPercent: null,
PurchaseOrderNumber: null,
Qty: line.part_qty,
Status: line.status,
SupplementNumber: null,
Type: line.part_type,
Vendor: line.billlines[0] && line.billlines[0].bill.vendor.name,
Qty: line.part_qty || 0,
Status: line.status || "",
SupplementNumber: line.line_ind || "",
Type: line.part_type || "",
Vendor: (line.billlines[0] && line.billlines[0].bill.vendor.name) || "",
VendorPaid: null,
VendorPrice: line.billlines[0] && line.billlines[0].actual_price,
VendorPrice: (line.billlines[0] && line.billlines[0].actual_price) || 0,
Deleted: null,
ExpectedOn: null,
ReceivedOn: null,
OrderedBy: null,
ShipVia: null,
VendorContact: null,
EstimateAmount: line.act_price,
EstimateAmount: line.act_price || 0,
};
return ret;
};
@@ -709,9 +727,9 @@ const generateNullDetailLine = () => {
Cost: 0,
Critical: null,
Description: "No Lines on Estimate",
DiscountMarkup: null,
DiscountMarkup: 0,
InvoiceNumber: null,
IOUPart: null,
IOUPart: 0,
LineNumber: 0,
MarkUp: null,
OrderedOn: null,
@@ -722,12 +740,12 @@ const generateNullDetailLine = () => {
ProfitPercent: null,
PurchaseOrderNumber: null,
Qty: 0,
Status: null,
SupplementNumber: null,
Type: null,
Vendor: null,
Status: "",
SupplementNumber: 0,
Type: "",
Vendor: "",
VendorPaid: null,
VendorPrice: null,
VendorPrice: 0,
Deleted: null,
ExpectedOn: null,
ReceivedOn: null,

View File

@@ -74,31 +74,48 @@ exports.updateUser = (req, res) => {
});
};
exports.sendNotification = (req, res) => {
var registrationToken =
"fqIWg8ENDFyrRrMWJ1sItR:APA91bHirdZ05Zo66flMlvala97SMXoiQGwP4oCvMwd-vVrSauD_WoNim3kXHGqyP-bzENjkXwA5icyUAReFbeHn6dIaPcbpcsXuY73-eJAXvZiu1gIsrd1BOsnj3dEMT7Q4F6mTPth1";
var message = {
notification: { title: "The Title", body: "The Body" },
data: {
jobid: "1234",
},
token: registrationToken,
};
exports.sendNotification = async (req, res) => {
setTimeout(() => {
// Send a message to the device corresponding to the provided
// registration token.
admin
.messaging()
.send({
topic: "PRD_PATRICK-messaging",
notification: {
title: `ImEX Online Message - +16049992002`,
body: "Test Noti.",
//imageUrl: "https://thinkimex.com/img/io-fcm.png",
},
data: {
type: "messaging-inbound",
conversationid: "e0eb17c3-3a78-4e3f-b932-55ef35aa2297",
text: "Hello. ",
image_path: "",
phone_num: "+16049992002",
},
})
.then((response) => {
// Response is a message ID string.
console.log("Successfully sent message:", response);
})
.catch((error) => {
console.log("Error sending message:", error);
});
// Send a message to the device corresponding to the provided
// registration token.
admin
res.sendStatus(200);
}, 500);
};
exports.subscribe = async (req, res) => {
const result = await admin
.messaging()
.send(message)
.then((response) => {
// Response is a message ID string.
console.log("Successfully sent message:", response);
})
.catch((error) => {
console.log("Error sending message:", error);
});
.subscribeToTopic(
req.body.fcm_tokens,
`${req.body.imexshopid}-${req.body.type}`
);
res.sendStatus(200);
res.json(result);
};
exports.validateFirebaseIdToken = async (req, res, next) => {

View File

@@ -22,48 +22,74 @@ mutation UNARCHIVE_CONVERSATION($id: uuid!) {
exports.RECEIVE_MESSAGE = `
mutation RECEIVE_MESSAGE($msg: [messages_insert_input!]!) {
insert_messages(objects: $msg) {
insert_messages(objects: $msg) {
returning {
conversation {
id
archived
bodyshop {
associations(where: {active: {_eq: true}}) {
user {
fcmtokens
}
}
bodyshop{
imexshopid
}
created_at
updated_at
unreadcnt
phone_num
}
conversationid
created_at
id
image_path
image
isoutbound
msid
read
text
updated_at
status
userid
}
}
}
`;
exports.INSERT_MESSAGE = `
mutation INSERT_MESSAGE($msg: [messages_insert_input!]!, $conversationid: uuid!) {
update_conversations_by_pk(pk_columns: {id: $conversationid}, _set: {archived: false}) {
id
archived
}
insert_messages(objects: $msg) {
insert_messages(objects: $msg) {
returning {
conversation {
id
archived
bodyshop {
associations(where: {active: {_eq: true}}) {
user {
fcmtokens
}
}
bodyshop{
imexshopid
}
created_at
updated_at
unreadcnt
phone_num
}
conversationid
created_at
id
image_path
image
isoutbound
msid
read
text
updated_at
status
userid
}
}
}
`;
exports.UPDATE_MESSAGE_STATUS = `
@@ -253,7 +279,10 @@ query QUERY_JOBS_FOR_PBS_EXPORT($id: uuid!) {
ro_number
clm_total
clm_no
dms_allocation
invoice_allocation
kmin
kmout
ownerid
ownr_ln
ownr_fn
@@ -301,6 +330,10 @@ query QUERY_JOBS_FOR_PBS_EXPORT($id: uuid!) {
v_make_desc
v_color
ca_customer_gst
vehicle{
v_trimcode
v_makecode
}
bodyshop {
id
md_ro_statuses
@@ -492,7 +525,7 @@ exports.QUERY_EMPLOYEE_PIN = `query QUERY_EMPLOYEE_PIN($shopId: uuid!, $employee
}`;
exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshopid: uuid!) {
jobs(where: {_and: [{converted :{_eq: true}},{updated_at: {_gt: $start}}, {shopid: {_eq: $bodyshopid}}]}) {
jobs(where: {_and: [{converted: {_eq: true}}, {updated_at: {_gt: $start}}, {shopid: {_eq: $bodyshopid}}]}, limit: 50) {
id
ro_number
status
@@ -500,6 +533,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
est_ct_ln
ownr_zip
referral_source
loss_type
v_model_yr
v_model_desc
v_make_desc
@@ -574,6 +608,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
joblines(where: {removed: {_eq: false}}) {
id
line_no
line_ind
status
line_ind
db_price
@@ -643,6 +678,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
}
}
`;
exports.ENTEGRAL_EXPORT = `
@@ -1200,6 +1236,7 @@ exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
cdk_configuration
}
ro_number
dms_allocation
invoice_allocation
ins_co_id
id
@@ -1254,12 +1291,14 @@ exports.GET_CDK_ALLOCATIONS = `query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
actual_delivery
scheduled_in
actual_in
ca_bc_pvrt
timetickets {
id
actualhrs
cost_center
productivehrs
rate
ciecacode
employee {
flat_rate
}

View File

@@ -1,6 +1,7 @@
const client = require("../graphql-client/graphql-client").client;
const queries = require("../graphql-client/queries");
const path = require("path");
const logger = require("../utils/logger");
require("dotenv").config({
path: path.resolve(
@@ -10,15 +11,22 @@ require("dotenv").config({
});
exports.default = async (req, res) => {
const { operationName, time, dbevent } = req.body;
const { operationName, time, dbevent, user, imexshopid } = req.body;
try {
await client.request(queries.INSERT_IOEVENT, {
event: {
operationname: operationName,
time,
dbevent,
},
// await client.request(queries.INSERT_IOEVENT, {
// event: {
// operationname: operationName,
// time,
// dbevent,
// },
// });
console.log("IOEVENT", operationName, time, dbevent, user, imexshopid);
logger.log("ioevent", "trace", user, null, {
imexshopid,
operationName,
time,
dbevent,
});
res.sendStatus(200);

View File

@@ -9,7 +9,7 @@ require("dotenv").config({
const client = require("../graphql-client/graphql-client").client;
const queries = require("../graphql-client/queries");
const { phone } = require("phone");
const admin = require("../firebase/firebase-handler").admin;
const { admin } = require("../firebase/firebase-handler");
const logger = require("../utils/logger");
exports.receive = async (req, res) => {
//Perform request validation
@@ -78,21 +78,43 @@ exports.receive = async (req, res) => {
});
}
try {
let insertresp;
if (response.bodyshops[0].conversations[0]) {
const r3 = await client.request(queries.INSERT_MESSAGE, {
insertresp = await client.request(queries.INSERT_MESSAGE, {
msg: newMessage,
conversationid:
response.bodyshops[0].conversations[0] &&
response.bodyshops[0].conversations[0].id,
});
} else {
const r2 = await client.request(queries.RECEIVE_MESSAGE, {
insertresp = await client.request(queries.RECEIVE_MESSAGE, {
msg: newMessage,
});
}
const message = insertresp.insert_messages.returning[0];
const data = {
type: "messaging-inbound",
conversationid: message.conversationid || "",
text: message.text || "",
image_path: message.image_path || "",
image: (message.image && message.image.toString()) || "",
messageid: message.id || "",
phone_num: message.conversation.phone_num || "",
};
const fcmresp = await admin.messaging().send({
topic: `${message.conversation.bodyshop.imexshopid}-messaging`,
notification: {
title: `ImEX Online Message - ${data.phone_num}`,
body: message.image_path ? `Image ${message.text}` : message.text,
//imageUrl: "https://thinkimex.com/img/io-fcm.png",
},
data,
});
logger.log("sms-inbound-success", "DEBUG", "api", null, {
newMessage,
fcmresp,
});
res.status(200).send("");
} catch (e2) {

View File

@@ -10,6 +10,7 @@ const client = require("../graphql-client/graphql-client").client;
const queries = require("../graphql-client/queries");
const { phone } = require("phone");
const logger = require("../utils/logger");
const { admin } = require("../firebase/firebase-handler");
exports.status = (req, res) => {
const { SmsSid, SmsStatus } = req.body;
@@ -34,6 +35,23 @@ exports.status = (req, res) => {
res.sendStatus(200);
};
exports.markConversationRead = async (req, res) => {
const { conversationid, imexshopid } = req.body;
admin.messaging().send({
topic: `${imexshopid}-messaging`,
// notification: {
// title: `ImEX Online Message - ${data.phone_num}`,
// body: message.image_path ? `Image ${message.text}` : message.text,
// imageUrl: "https://thinkimex.com/img/logo512.png",
// },
data: {
type: "messaging-mark-conversation-read",
conversationid: conversationid || "",
},
});
res.send(200);
};
// Inbound Sample
// {
// "SmsSid": "SM5205ea340e06437799d9345e7283457c",

View File

@@ -5,13 +5,14 @@ const logger = new graylog2.graylog({
});
function log(message, type, user, record, object) {
console.log(message, {
type,
env: process.env.NODE_ENV || "development",
user,
record,
...object,
});
if (type !== "ioevent")
console.log(message, {
type,
env: process.env.NODE_ENV || "development",
user,
record,
...object,
});
logger.log(message, {
type,
env: process.env.NODE_ENV || "development",

View File

@@ -600,10 +600,10 @@ atob@2.1.2:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
aws-sdk@^2.1028.0:
version "2.1028.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1028.0.tgz#ce076076174afa9bd311406b8186ea90163e3331"
integrity sha512-OmR0NcpU8zsDcUOZhM+eZ6CzlUFtuaEuRyjm6mxDO0KI7lJAp7/NzB6tcellRrgWxL+NO7b5TSxi+m28qu5ocQ==
aws-sdk@^2.1043.0:
version "2.1043.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1043.0.tgz#170a5b14b3ea25df760f9a6b437bfe35c9a1578e"
integrity sha512-WysMTSLfi8ZCj6QAAitJkxObxOzGLhcu6FxoKHiEnrefvfQtSvwqUq7BbT/pIfijnF9dE/7e9XwjW8Dz/hqF4Q==
dependencies:
buffer "4.9.2"
events "1.1.1"
@@ -1004,12 +1004,12 @@ convert-source-map@^1.7.0:
dependencies:
safe-buffer "~5.1.1"
cookie-parser@^1.4.5:
version "1.4.5"
resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.5.tgz#3e572d4b7c0c80f9c61daf604e4336831b5d1d49"
integrity sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==
cookie-parser@^1.4.6:
version "1.4.6"
resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.6.tgz#3ac3a7d35a7a03bbc7e365073a26074824214594"
integrity sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==
dependencies:
cookie "0.4.0"
cookie "0.4.1"
cookie-signature "1.0.6"
cookie-signature@1.0.6:
@@ -1022,7 +1022,7 @@ cookie@0.4.0:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
cookie@~0.4.1:
cookie@0.4.1, cookie@~0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1"
integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==
@@ -1352,10 +1352,10 @@ engine.io-parser@~5.0.0:
dependencies:
base64-arraybuffer "~1.0.1"
engine.io@~6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.0.0.tgz#2b993fcd73e6b3a6abb52b40b803651cd5747cf0"
integrity sha512-Ui7yl3JajEIaACg8MOUwWvuuwU7jepZqX3BKs1ho7NQRuP4LhN4XIykXhp8bEy+x/DhA0LBZZXYSCkZDqrwMMg==
engine.io@~6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.1.0.tgz#459eab0c3724899d7b63a20c3a6835cf92857939"
integrity sha512-ErhZOVu2xweCjEfYcTdkCnEYUiZgkAcBBAhW4jbIvNG8SLU3orAqoJCiytZjYF7eTpVmmCrLDjLIEaPlUAs1uw==
dependencies:
"@types/cookie" "^0.4.1"
"@types/cors" "^2.8.12"
@@ -1976,10 +1976,10 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0:
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a"
integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==
graphql-request@^3.6.1:
version "3.6.1"
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-3.6.1.tgz#689cce1da990131b40b05651f9f32bff506a1d8e"
integrity sha512-Nm1EasrAQVZllyNTlHDLnLZjlhC6eRWnWP6KH//ytnAL08pjlLkdI2K+s6OV92p45hn5b/kUlLbDwACmRoLwrQ==
graphql-request@^3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-3.7.0.tgz#c7406e537084f8b9788541e3e6704340ca13055b"
integrity sha512-dw5PxHCgBneN2DDNqpWu8QkbbJ07oOziy8z+bK/TAXufsOLaETuVO4GkXrbs0WjhdKhBMN3BkpN/RIvUHkmNUQ==
dependencies:
cross-fetch "^3.0.6"
extract-files "^9.0.0"
@@ -2974,10 +2974,10 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
phone@^3.1.9:
version "3.1.9"
resolved "https://registry.yarnpkg.com/phone/-/phone-3.1.9.tgz#692d70061c0d7391ebcd67f30bee4364b52264e5"
integrity sha512-u5jPSlbB4lq9W2ptznEb4eBBKnr3y8xAL4Dsn4uFzUl2gWZE6QiQgxMUMelHq3VUUzFq1QM579SkTxJ+k++igg==
phone@^3.1.10:
version "3.1.10"
resolved "https://registry.yarnpkg.com/phone/-/phone-3.1.10.tgz#7e9954b1cf8dcac2cf4f45bfd1e4f55e3833dcaf"
integrity sha512-YhUCaFzvp2nGuAL/KkYZ1qDm8E51PkQswDFSzAmQ8jgNt6TU6iHMxp4KEQ2J/mFk9zco84iq6D2j5z7fm7W9Vw==
pick-util@^1.1.3:
version "1.1.3"
@@ -3525,10 +3525,10 @@ soap@^0.43.0:
uuid "^8.3.2"
xml-crypto "^2.1.3"
socket.io-adapter@~2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.3.2.tgz#039cd7c71a52abad984a6d57da2c0b7ecdd3c289"
integrity sha512-PBZpxUPYjmoogY0aoaTmo1643JelsaS1CiAwNjRVdrI0X9Seuc19Y2Wife8k88avW6haG8cznvwbubAZwH4Mtg==
socket.io-adapter@~2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.3.3.tgz#4d6111e4d42e9f7646e365b4f578269821f13486"
integrity sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==
socket.io-parser@~4.0.4:
version "4.0.4"
@@ -3539,16 +3539,16 @@ socket.io-parser@~4.0.4:
component-emitter "~1.3.0"
debug "~4.3.1"
socket.io@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.3.2.tgz#85ae0cf5cf18acbce648ac9f48aba66df8cea6bf"
integrity sha512-6S5tV4jcY6dbZ/lLzD6EkvNWI3s81JO6ABP/EpvOlK1NPOcIj3AS4khi6xXw6JlZCASq82HQV4SapfmVMMl2dg==
socket.io@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.4.0.tgz#8140a0db2c22235f88a6dceb867e4d5c9bd70507"
integrity sha512-bnpJxswR9ov0Bw6ilhCvO38/1WPtE3eA2dtxi2Iq4/sFebiDJQzgKNYA7AuVVdGW09nrESXd90NbZqtDd9dzRQ==
dependencies:
accepts "~1.3.4"
base64id "~2.0.0"
debug "~4.3.2"
engine.io "~6.0.0"
socket.io-adapter "~2.3.2"
engine.io "~6.1.0"
socket.io-adapter "~2.3.3"
socket.io-parser "~4.0.4"
socks-proxy-agent@5, socks-proxy-agent@^5.0.0:
@@ -3749,10 +3749,10 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
stripe@^8.188.0:
version "8.188.0"
resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.188.0.tgz#1d892c2f9000847c627db06a374529e7fbd2b83e"
integrity sha512-AW5IOKq4y+ENfHddJPrLL/GSvGj1MnBvUe6QMI1z27x/4pMNrU7v0ZqzRSJCihWqP0tUuCmQibSYSbsV4XJ3zA==
stripe@^8.191.0:
version "8.191.0"
resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.191.0.tgz#7bb56080dce2e2e9cc4f52dc05792626ea46bfd6"
integrity sha512-3oyuIbuW3WDsbGnMUtIZPkr+sOUJ3NEtEwghd81ZuWc+Tq09MrgWXGekbVnbxA3TMFwfKOILw6QoiPA7za4JUg==
dependencies:
"@types/node" ">=8.1.0"
qs "^6.6.0"
@@ -3916,10 +3916,10 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
twilio@^3.71.1:
version "3.71.1"
resolved "https://registry.yarnpkg.com/twilio/-/twilio-3.71.1.tgz#15bbb4b51c75d91cc07a8149378c4af330e543cc"
integrity sha512-P/KFvm33UW15EnpHJKgdTxUa1u6MlR/u+sCVnL4ie2TDRv6t7kX+ieIGQMpH7bP/z7FXkTjEt0lz4M+XJ/XWOg==
twilio@^3.71.3:
version "3.71.3"
resolved "https://registry.yarnpkg.com/twilio/-/twilio-3.71.3.tgz#a446d2b49f8c1ed60b0dd830c919921358c17203"
integrity sha512-m9eda9fvkHxMMDHRtXj8WKI0ViP4EG4xS5au5ay3ScfModhBZ1ZtyfWZ0AfWI++A7a1T1j3ZVNIZ+AMLwxSffw==
dependencies:
axios "^0.21.4"
dayjs "^1.8.29"