Compare commits

..

No commits in common. "3a83430fc2543bc66beaf2006ac4a16c3e90aae6" and "acfef56c16964e0bbbfda8f6f5a34bbc0ebc6de0" have entirely different histories.

2 changed files with 21 additions and 21 deletions

View File

@ -559,7 +559,7 @@ Sub build_price_level(plev As String)
MsgBox (pln(0, 0)) MsgBox (pln(0, 0))
Exit Sub Exit Sub
End If End If
If UBound(pln, 2) > 22 Then If UBound(pln, 2) > 21 Then
segment_regex = "^F|^G|^P" segment_regex = "^F|^G|^P"
Set nnws = nwb.Sheets.Add(, nws) Set nnws = nwb.Sheets.Add(, nws)
nnws.Name = "Price List - Nursery" nnws.Name = "Price List - Nursery"
@ -1007,7 +1007,7 @@ Sub compatible(ByRef ws As Worksheet, row As Long, start_col As Long, end_col As
Set Sel = rrange(ws, row, row, start_col, end_col) Set Sel = rrange(ws, row, row, start_col, end_col)
Sel.InsertIndent 1 Sel.InsertIndent 2
End Sub End Sub

View File

@ -24,8 +24,8 @@ Sub get_options()
'----------------get the available options from all the parts setup in the item master---------------------------------------------- '----------------get the available options from all the parts setup in the item master----------------------------------------------
sql = "SELECT * FROM rlarp.get_options('" & mold & "');" sql = "SELECT * FROM rlarp.get_options('" & mold & "');"
res = x.ADOp_SelectS(0, sql, True, 10000, True, PostgreSQLODBC, "usmidsap02", False, "report", "report", "Port=5432;Database=ubm") res = x.ADOp_SelectS(0, sql, True, 100, True, PostgreSQLODBC, "usmidsap02", False, "report", "report", "Port=5432;Database=ubm")
ws.Range("P1:ZZ3500").ClearContents ws.Range("N1:ZZ3500").ClearContents
'----------------get the options already set if this item has been setup------------------------------------------------------------ '----------------get the options already set if this item has been setup------------------------------------------------------------
fpath = Sheets("env").Range("B1").value & "\" & Sheets("combine").Range("A2").value & "\options.csv" fpath = Sheets("env").Range("B1").value & "\" & Sheets("combine").Range("A2").value & "\options.csv"
@ -34,13 +34,13 @@ Sub get_options()
Call x.ARRAYp_Transpose(onfile) Call x.ARRAYp_Transpose(onfile)
'merge all the options from the item master and the saved options 'merge all the options from the item master and the saved options
merge = x.TBLp_JoinTbls(onfile, res, True, True, 2, Array(0, 1, 3), Array(0, 1, 3), Array(2)) merge = x.TBLp_JoinTbls(onfile, res, True, True, 2, Array(0, 1, 3), Array(0, 1, 3), Array(2))
Call x.SHTp_Dump(merge, ws.Name, ws.Cells(ws.Rows.Count, 16).End(xlUp).row, 16, False, True, 17) Call x.SHTp_Dump(merge, ws.Name, ws.Cells(ws.Rows.Count, 14).End(xlUp).row, 14, False, True, 15)
'loop through each result and highlight cells that only exist on the saved file and not the item master 'loop through each result and highlight cells that only exist on the saved file and not the item master
'the last column indicated if the option is on the item master 'the last column indicated if the option is on the item master
i = 1 i = 1
Do Until ws.Cells(i, 16) = "" Do Until ws.Cells(i, 14) = ""
If ws.Cells(i, 20) = "" Then If ws.Cells(i, 18) = "" Then
With ws.Cells(i, 18).Interior With ws.Cells(i, 16).Interior
.Pattern = xlSolid .Pattern = xlSolid
.PatternColorIndex = xlAutomatic .PatternColorIndex = xlAutomatic
.Color = 65535 .Color = 65535
@ -51,15 +51,15 @@ Sub get_options()
i = i + 1 i = i + 1
Loop Loop
'get rid of the column used to flag for color 'get rid of the column used to flag for color
ws.Columns(20).ClearContents ws.Columns(18).ClearContents
Else Else
Call x.SHTp_Dump(res, ws.Name, 1, 16, False, True, 17) Call x.SHTp_Dump(res, ws.Name, 1, 14, False, True, 15)
End If End If
sql = "SELECT * FROM rlarp.get_option_costs('" & mold & "') ORDER BY branding, coltier, uomp;" sql = "SELECT * FROM rlarp.get_option_costs('" & mold & "') ORDER BY branding, coltier, uomp;"
res = x.ADOp_SelectS(0, sql, True, 10000, True, PostgreSQLODBC, "usmidsap02", False, "report", "report", "Port=5432;Database=ubm") res = x.ADOp_SelectS(0, sql, True, 100, True, PostgreSQLODBC, "usmidsap02", False, "report", "report", "Port=5432;Database=ubm")
ws.Range("C1:N350").ClearContents ws.Range("C1:L350").ClearContents
Call x.SHTp_Dump(res, ws.Name, 1, 3, False, True, 9, 10, 11, 12, 13) Call x.SHTp_Dump(res, ws.Name, 1, 3, False, True, 9, 10, 11)
Call x.ADOp_CloseCon(0) Call x.ADOp_CloseCon(0)
@ -90,7 +90,7 @@ Sub combine_options()
Set ws = ActiveSheet Set ws = ActiveSheet
mold = ws.Cells(2, 1) mold = ws.Cells(2, 1)
stack = x.SHTp_GetString(ws.Range("P1")) stack = x.SHTp_GetString(ws.Range("N1"))
stack = x.TBLp_Transpose(stack) stack = x.TBLp_Transpose(stack)
stackv = x.TBLp_StringToVar(stack) stackv = x.TBLp_StringToVar(stack)
json = x.json_from_table(stackv, "", False) json = x.json_from_table(stackv, "", False)
@ -99,8 +99,8 @@ Sub combine_options()
res = x.ADOp_SelectS(0, sql, True, 5000, True, PostgreSQLODBC, "usmidsap02", False, "report", "report", "Port=5432;Database=ubm") res = x.ADOp_SelectS(0, sql, True, 5000, True, PostgreSQLODBC, "usmidsap02", False, "report", "report", "Port=5432;Database=ubm")
Call x.ADOp_CloseCon(0) Call x.ADOp_CloseCon(0)
ws.Range("U1:AC5000").ClearContents ws.Range("S1:AC5000").ClearContents
Call x.SHTp_Dump(res, ws.Name, 1, 21, False, True) Call x.SHTp_Dump(res, ws.Name, 1, 19, False, True)
End Sub End Sub
@ -127,8 +127,8 @@ Sub save_targets()
Set ws = ActiveSheet Set ws = ActiveSheet
opt = x.SHTp_Get(ws.Name, 1, 16, True) opt = x.SHTp_Get(ws.Name, 1, 14, True)
tar = x.SHTp_Get(ws.Name, 1, 21, True) tar = x.SHTp_Get(ws.Name, 1, 19, True)
path = Sheets("env").Cells(1, 2) & "\" & ActiveSheet.Cells(2, 1) & "\options.csv" path = Sheets("env").Cells(1, 2) & "\" & ActiveSheet.Cells(2, 1) & "\options.csv"
If Not x.FILEp_CreateCSV(path, opt) Then If Not x.FILEp_CreateCSV(path, opt) Then
@ -148,7 +148,7 @@ Sub save_targets()
sqlt = sqlt & sql(0, i) & vbCrLf sqlt = sqlt & sql(0, i) & vbCrLf
Next i Next i
targt = x.SQLp_build_sql_values(x.SHTp_Get(ws.Name, 1, 21, True), True, True, PostgreSQL, False, True, "N", "N", "S", "S", "S", "S", "S", "S", "N", "N", "N", "N", "N") targt = x.SQLp_build_sql_values(x.SHTp_Get(ws.Name, 1, 19, True), True, True, PostgreSQL, False, True, "N", "N", "S", "S", "S", "S", "S", "S", "N", "N", "N", "N", "N")
sqlt = Replace(sqlt, "replace_this", targt) sqlt = Replace(sqlt, "replace_this", targt)
@ -164,7 +164,7 @@ Sub save_targets()
sqlt = sqlt & sql(0, i) & vbCrLf sqlt = sqlt & sql(0, i) & vbCrLf
Next i Next i
targt = x.SQLp_build_sql_values(x.SHTp_Get(ws.Name, 1, 21, True), True, True, PostgreSQL, False, True, "N", "N", "S", "S", "S", "S", "S", "S", "N", "N", "N", "N", "N") targt = x.SQLp_build_sql_values(x.SHTp_Get(ws.Name, 1, 19, True), True, True, PostgreSQL, False, True, "N", "N", "S", "S", "S", "S", "S", "S", "N", "N", "N", "N", "N")
sqlt = Replace(sqlt, "replace_this", targt) sqlt = Replace(sqlt, "replace_this", targt)
@ -182,7 +182,7 @@ Sub save_targets()
'Foldername = Sheets("env").Cells(1, 2) & "\" & ActiveSheet.Cells(2, 1) 'Foldername = Sheets("env").Cells(1, 2) & "\" & ActiveSheet.Cells(2, 1)
'Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus 'Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus
ws.Cells(1, 16).CurrentRegion.Select ws.Cells(1, 14).CurrentRegion.Select
tbl = Selection tbl = Selection
Call wapi.ClipBoard_SetData(x.markdown_from_table(tbl)) Call wapi.ClipBoard_SetData(x.markdown_from_table(tbl))