@measurequick/measurequick-report-generator 1.5.126 → 1.5.127

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measurequick/measurequick-report-generator",
3
- "version": "1.5.126",
3
+ "version": "1.5.127",
4
4
  "description": "Generates PDF documents for various measureQuick applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1006,7 +1006,11 @@ export async function getReport(payload, _test) {
1006
1006
  ).toFixed(0);
1007
1007
  }
1008
1008
 
1009
- if (test_data.capacity_total_system && test_data.capacity_total) {
1009
+ if (
1010
+ test_data.capacity_total_system !== undefined &&
1011
+ test_data.capacity_total !== undefined &&
1012
+ test_data.capacity_total !== 0
1013
+ ) {
1010
1014
  const totalDuctLoss =
1011
1015
  +test_data.capacity_total - +test_data.capacity_total_system;
1012
1016
  const totalDuctLossString = totalDuctLoss.toFixed(0);
@@ -1015,10 +1019,16 @@ export async function getReport(payload, _test) {
1015
1019
  .setText(totalDuctLossString ? totalDuctLossString : "N/A");
1016
1020
 
1017
1021
  const pctBtuLoss =
1018
- (1 - test_data.capaicty_total_system / test_data.capacity_total) * 100;
1022
+ (
1023
+ (1 - test_data.capacity_total_system / test_data.capacity_total) *
1024
+ 100
1025
+ ).toFixed(0) + "%";
1019
1026
  form
1020
1027
  .getTextField("DuctPercentBTULoss")
1021
1028
  .setText(pctBtuLoss ? pctBtuLoss : "N/A");
1029
+ } else {
1030
+ form.getTextField("TotalDuctLoss").setText("N/A");
1031
+ form.getTextField("DuctPercentBTULoss").setText("N/A");
1022
1032
  }
1023
1033
 
1024
1034
  /*