comment out math, parse numbers for truckloads, set json to [] if the options file is empty

This commit is contained in:
Paul Trowbridge 2025-07-24 14:10:44 -04:00
parent 232c0a07dd
commit 9ca4a7c57e

View File

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