@measurequick/measurequick-report-generator 1.5.225 → 1.5.226

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/util.js +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measurequick/measurequick-report-generator",
3
- "version": "1.5.225",
3
+ "version": "1.5.226",
4
4
  "description": "Generates PDF documents for various measureQuick applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -370,6 +370,16 @@ export function getElectricalData(test, suffix, embeddedIcons) {
370
370
  vDisplay = (+test.data[`voltage_l1`]).toFixed(1);
371
371
  aDisplay = (+test.data[`amperage_l1`]).toFixed(1);
372
372
  }
373
+
374
+ // Fallback: If vDisplay/aDisplay not set but data exists, use the data directly
375
+ // This handles cases like Power_HAC mode or other capture types that don't fit standard conditions
376
+ if (!vDisplay && test.data && test.data[`voltage_l1${suffix}`]) {
377
+ vDisplay = (+test.data[`voltage_l1${suffix}`]).toFixed(1);
378
+ }
379
+ if (!aDisplay && test.data && test.data[`amperage_l1${suffix}`]) {
380
+ aDisplay = (+test.data[`amperage_l1${suffix}`]).toFixed(1);
381
+ }
382
+
373
383
  // Build the source key with suffix for AHU support
374
384
  // Note: for ph_to_gnd cases, src already includes the suffix, so don't add it again
375
385
  const suffixAlreadyInSrc = src.includes(suffix) && suffix !== "";
@@ -384,11 +394,17 @@ export function getElectricalData(test, suffix, embeddedIcons) {
384
394
 
385
395
  // Get voltage source with fallback chain
386
396
  let vSource = test.source[vSourceKey];
397
+ // Direct fallback for HAC/DL599 - check voltage_l1 directly for condenser, voltage_l1_ahu for AHU
398
+ if (!vSource && suffix === "") vSource = test.source["voltage_l1"];
399
+ if (!vSource && suffix === "_ahu") vSource = test.source["voltage_l1_ahu"];
387
400
  if (!vSource) vSource = test.source[vMultimeterKey];
388
401
  if (!vSource) vSource = test.source["voltage_multimeter"];
389
402
 
390
403
  // Get amperage source with fallback chain
391
404
  let aSource = test.source[aSourceKey];
405
+ // Direct fallback for HAC/DL599 - check amperage_l1 directly for condenser, amperage_l1_ahu for AHU
406
+ if (!aSource && suffix === "") aSource = test.source["amperage_l1"];
407
+ if (!aSource && suffix === "_ahu") aSource = test.source["amperage_l1_ahu"];
392
408
  if (!aSource) aSource = test.source[aMultimeterKey];
393
409
  if (!aSource) aSource = test.source["amperage_multimeter"];
394
410