Compare commits

..

No commits in common. "7182502669544800d39ae5fca9bf3d3fc47d7c70" and "7e57d4621fcaaedcdce7e25535ec91ddc192cb7f" have entirely different histories.

3 changed files with 10 additions and 48 deletions

View File

@ -2188,7 +2188,7 @@ Public Function json_from_table(ByRef tbl() As Variant, ByRef array_label As Str
End Function
Public Function json_from_table_zb(ByRef tbl() As Variant, ByRef array_label As String, ByVal force_array As Boolean, Optional strip_braces As Boolean) As String
Public Function json_from_table_zb(ByRef tbl() As Variant, ByRef array_label As String, Optional strip_braces As Boolean) As String
Dim ajson As String
@ -2234,7 +2234,7 @@ Public Function json_from_table_zb(ByRef tbl() As Variant, ByRef array_label As
'if theres more the one record, include brackets for array
'if an array_label is given give the array a key and the array become the value
'then if the array is labeled with a key it should have braces unless specified otherwise
If r > 2 Or force_array Then
If r > 2 Then
ajson = "[" & ajson & "]"
If array_label <> "" Then
ajson = """" & array_label & """:" & ajson

View File

@ -4,7 +4,7 @@ Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} fpvt
ClientHeight = 8445.001
ClientLeft = 120
ClientTop = 465
ClientWidth = 8805.001
ClientWidth = 9285.001
OleObjectBlob = "fpvt.frx":0000
StartUpPosition = 1 'CenterOwner
End
@ -97,9 +97,8 @@ Private Sub butAdjust_Click()
Exit Sub
End If
Case Else
doc = tbAPI.text
'MsgBox ("not on an adjustable tab")
'Exit Sub
MsgBox ("not on an adjustable tab")
Exit Sub
End Select
Call handler.request_adjust(doc, fail)
@ -230,7 +229,7 @@ Private Sub cbPLIST_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift
vtable = x.ARRAYp_TransposeVar(vSwap)
vtable = x.ARRAYp_zerobased_addheader(vtable, "original", "sales", "replace", "fit")
vtable = x.ARRAYp_TransposeVar(vtable)
ptable = x.json_from_table_zb(vtable, "rows", True, False)
ptable = x.json_from_table_zb(vtable, "rows", False)
Set jswap("swap") = JsonConverter.ParseJson(ptable)
jswap("scenario")("version") = handler.plan
@ -270,7 +269,7 @@ Private Sub dbGETSWAP_Click()
vtable = x.ARRAYp_TransposeVar(vSwap)
vtable = x.ARRAYp_zerobased_addheader(vtable, "original", "sales", "replace", "fit")
vtable = x.ARRAYp_TransposeVar(vtable)
ptable = x.json_from_table_zb(vtable, "rows", True, False)
ptable = x.json_from_table_zb(vtable, "rows", False)
Set jswap("swap") = JsonConverter.ParseJson(ptable)
jswap("scenario")("version") = handler.plan
@ -435,35 +434,10 @@ End Sub
Private Sub opPlugPrice_Click()
calc_val
If opPlugPrice.value = True Then
opPlugPrice.BackColor = -2147483624
Else
opPlugPrice.BackColor = -2147483644
End If
If opPlugVol.value = True Then
opPlugVol.BackColor = -2147483624
Else
opPlugVol.BackColor = -2147483644
End If
End Sub
Private Sub opPlugVol_Click()
calc_val
If opPlugVol.value = True Then
opPlugVol.BackColor = -2147483624
Else
opPlugVol.BackColor = -2147483644
End If
If opPlugPrice.value = True Then
opPlugPrice.BackColor = -2147483624
Else
opPlugPrice.BackColor = -2147483644
End If
End Sub
Private Sub pickSWAP_Change()
End Sub
Private Sub sbpd_Change()
@ -759,22 +733,10 @@ Private Sub UserForm_Activate()
'--------reset swap tab-------------------------------
lbSWAP.clear
pickSWAP.value = ""
pickSWAP.text = Mid(sp("package")("basket")(1)("part_descr"), 1, 8)
pickSWAP.list = Application.transpose(Worksheets("mdata").Range("F2:F1112"))
pickSWAP.text = ""
pickSWAP.list = Application.transpose(Worksheets("mdata").Range("F2:F1672"))
Call x.frmListBoxHeader(Me.lbSWAPH, Me.lbSWAP, "Original", "Sales", "Replacement", "Fit")
'---------price volume radio button colors----------
If opPlugPrice.value = True Then
opPlugPrice.BackColor = -2147483624
Else
opPlugPrice.BackColor = -2147483644
End If
If opPlugVol.value = True Then
opPlugVol.BackColor = -2147483624
Else
opPlugVol.BackColor = -2147483644
End If
Call handler.month_tosheet(month, basket)
Application.StatusBar = False
@ -809,7 +771,7 @@ Sub crunch_array()
ReDim mload(UBound(month, 1), 5)
For i = 0 To UBound(month, 1)
mload(i, 0) = month(i, 0)
mload(i, 0) = Format(month(i, 0), "#,###")
mload(i, 1) = Format(month(i, 1), "#,###")
mload(i, 2) = Format(month(i, 4), "#,###")
mload(i, 3) = Format(month(i, 5), "#,###")

BIN
fpvt.frx

Binary file not shown.