Compare commits
No commits in common. "7182502669544800d39ae5fca9bf3d3fc47d7c70" and "7e57d4621fcaaedcdce7e25535ec91ddc192cb7f" have entirely different histories.
7182502669
...
7e57d4621f
@ -2188,7 +2188,7 @@ Public Function json_from_table(ByRef tbl() As Variant, ByRef array_label As Str
|
|||||||
|
|
||||||
End Function
|
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
|
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 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
|
'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
|
'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 & "]"
|
ajson = "[" & ajson & "]"
|
||||||
If array_label <> "" Then
|
If array_label <> "" Then
|
||||||
ajson = """" & array_label & """:" & ajson
|
ajson = """" & array_label & """:" & ajson
|
||||||
|
54
fpvt.frm
54
fpvt.frm
@ -4,7 +4,7 @@ Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} fpvt
|
|||||||
ClientHeight = 8445.001
|
ClientHeight = 8445.001
|
||||||
ClientLeft = 120
|
ClientLeft = 120
|
||||||
ClientTop = 465
|
ClientTop = 465
|
||||||
ClientWidth = 8805.001
|
ClientWidth = 9285.001
|
||||||
OleObjectBlob = "fpvt.frx":0000
|
OleObjectBlob = "fpvt.frx":0000
|
||||||
StartUpPosition = 1 'CenterOwner
|
StartUpPosition = 1 'CenterOwner
|
||||||
End
|
End
|
||||||
@ -97,9 +97,8 @@ Private Sub butAdjust_Click()
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Case Else
|
Case Else
|
||||||
doc = tbAPI.text
|
MsgBox ("not on an adjustable tab")
|
||||||
'MsgBox ("not on an adjustable tab")
|
Exit Sub
|
||||||
'Exit Sub
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Call handler.request_adjust(doc, fail)
|
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_TransposeVar(vSwap)
|
||||||
vtable = x.ARRAYp_zerobased_addheader(vtable, "original", "sales", "replace", "fit")
|
vtable = x.ARRAYp_zerobased_addheader(vtable, "original", "sales", "replace", "fit")
|
||||||
vtable = x.ARRAYp_TransposeVar(vtable)
|
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)
|
Set jswap("swap") = JsonConverter.ParseJson(ptable)
|
||||||
|
|
||||||
jswap("scenario")("version") = handler.plan
|
jswap("scenario")("version") = handler.plan
|
||||||
@ -270,7 +269,7 @@ Private Sub dbGETSWAP_Click()
|
|||||||
vtable = x.ARRAYp_TransposeVar(vSwap)
|
vtable = x.ARRAYp_TransposeVar(vSwap)
|
||||||
vtable = x.ARRAYp_zerobased_addheader(vtable, "original", "sales", "replace", "fit")
|
vtable = x.ARRAYp_zerobased_addheader(vtable, "original", "sales", "replace", "fit")
|
||||||
vtable = x.ARRAYp_TransposeVar(vtable)
|
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)
|
Set jswap("swap") = JsonConverter.ParseJson(ptable)
|
||||||
|
|
||||||
jswap("scenario")("version") = handler.plan
|
jswap("scenario")("version") = handler.plan
|
||||||
@ -435,35 +434,10 @@ End Sub
|
|||||||
|
|
||||||
Private Sub opPlugPrice_Click()
|
Private Sub opPlugPrice_Click()
|
||||||
calc_val
|
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
|
End Sub
|
||||||
|
|
||||||
Private Sub opPlugVol_Click()
|
Private Sub opPlugVol_Click()
|
||||||
calc_val
|
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
|
End Sub
|
||||||
|
|
||||||
Private Sub sbpd_Change()
|
Private Sub sbpd_Change()
|
||||||
@ -759,22 +733,10 @@ Private Sub UserForm_Activate()
|
|||||||
'--------reset swap tab-------------------------------
|
'--------reset swap tab-------------------------------
|
||||||
lbSWAP.clear
|
lbSWAP.clear
|
||||||
pickSWAP.value = ""
|
pickSWAP.value = ""
|
||||||
pickSWAP.text = Mid(sp("package")("basket")(1)("part_descr"), 1, 8)
|
pickSWAP.text = ""
|
||||||
pickSWAP.list = Application.transpose(Worksheets("mdata").Range("F2:F1112"))
|
pickSWAP.list = Application.transpose(Worksheets("mdata").Range("F2:F1672"))
|
||||||
Call x.frmListBoxHeader(Me.lbSWAPH, Me.lbSWAP, "Original", "Sales", "Replacement", "Fit")
|
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)
|
Call handler.month_tosheet(month, basket)
|
||||||
Application.StatusBar = False
|
Application.StatusBar = False
|
||||||
|
|
||||||
@ -809,7 +771,7 @@ Sub crunch_array()
|
|||||||
|
|
||||||
ReDim mload(UBound(month, 1), 5)
|
ReDim mload(UBound(month, 1), 5)
|
||||||
For i = 0 To UBound(month, 1)
|
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, 1) = Format(month(i, 1), "#,###")
|
||||||
mload(i, 2) = Format(month(i, 4), "#,###")
|
mload(i, 2) = Format(month(i, 4), "#,###")
|
||||||
mload(i, 3) = Format(month(i, 5), "#,###")
|
mload(i, 3) = Format(month(i, 5), "#,###")
|
||||||
|
Loading…
Reference in New Issue
Block a user