From 9ca4a7c57ec14a815bd6dd317e9e12b39561ba20 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 24 Jul 2025 14:10:44 -0400 Subject: [PATCH] comment out math, parse numbers for truckloads, set json to [] if the options file is empty --- TargetGroups.bas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TargetGroups.bas b/TargetGroups.bas index bc3dd96..ad04854 100644 --- a/TargetGroups.bas +++ b/TargetGroups.bas @@ -404,7 +404,7 @@ Sub BuildPricingPath() End If ' === 1. Call Postgres NEW FUNCTION === - sql = "SELECT stlc, ds, chan, tier, vol, price FROM pricequote.build_pricing_path(" & _ + sql = "SELECT stlc, ds, chan, tier, vol, price/*, math*/ FROM pricequote.build_pricing_path(" & _ "'" & Replace(optionsJSON, "'", "''") & "') WHERE lastflag" res = x.ADOp_SelectS(0, sql, True, 50000, True, PostgreSQLODBC, _ @@ -470,6 +470,7 @@ Sub BuildOptionsAndCosts() onfile = x.FILEp_GetCSV(fpath) csvTable = onfile optionsJSON = x.json_from_table(csvTable, "", True) + If trim(optionsJSON) = "" Then optionsJSON = "[]" Else optionsJSON = "[]" End If @@ -544,7 +545,7 @@ Sub GetProductInfo() qry.Range("A:ZZ").ClearContents ' === Dump results starting at column A === - Call x.SHTp_Dump(res, qry.Name, 1, 1, False, True, 4, 5) + Call x.SHTp_Dump(res, qry.Name, 1, 1, False, True, 4, 5, 19) qry.Activate