Add in ID_PRO_NAM to integration.
This commit is contained in:
@@ -54,6 +54,7 @@ async function DecodeEstimate(filePath, includeFilePathInReturnJob = false, clos
|
||||
...(await DecodeLinFile(extensionlessFilePath, close_date)),
|
||||
...(await DecodePflFile(extensionlessFilePath,)),
|
||||
...(await DecodePfmFile(extensionlessFilePath,)),
|
||||
...(await DecodePfhFile(extensionlessFilePath,)),
|
||||
...(await DecodeStlFile(extensionlessFilePath,)),
|
||||
...(includeFilePathInReturnJob ? { filePath } : {})
|
||||
};
|
||||
@@ -255,6 +256,21 @@ async function DecodeAd2File(extensionlessFilePath) {
|
||||
}
|
||||
|
||||
async function DecodeVehFile(extensionlessFilePath) {
|
||||
let dbf;
|
||||
try {
|
||||
dbf = await DBFFile.open(`${extensionlessFilePath}.PFH`);
|
||||
} catch (error) {
|
||||
log.error("Error opening PFH File.", error);
|
||||
} finally {
|
||||
if (!dbf) return {};
|
||||
let records = await dbf.readRecords(1);
|
||||
return _.pick(records[0], [
|
||||
"ID_PRO_NAM"
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
async function DecodePfhFile(extensionlessFilePath) {
|
||||
let dbf;
|
||||
try {
|
||||
dbf = await DBFFile.open(`${extensionlessFilePath}V.VEH`);
|
||||
|
||||
Reference in New Issue
Block a user