diff --git a/VBA/build.frx b/VBA/build.frx index c85abb2..648a461 100644 Binary files a/VBA/build.frx and b/VBA/build.frx differ diff --git a/VBA/changes.frx b/VBA/changes.frx index d1202a7..85522b7 100644 Binary files a/VBA/changes.frx and b/VBA/changes.frx differ diff --git a/VBA/fpvt.frx b/VBA/fpvt.frx index 5930f72..55e75a6 100644 Binary files a/VBA/fpvt.frx and b/VBA/fpvt.frx differ diff --git a/VBA/handler.bas b/VBA/handler.bas index aa99c66..2df22ff 100644 --- a/VBA/handler.bas +++ b/VBA/handler.bas @@ -85,7 +85,7 @@ Sub pg_main_workset(catg As String, rep As String) Dim res() As Variant doc = "{""scenario"":{""" & catg & """:""" & rep & """}}" - + Application.StatusBar = "Querying for " & rep & "'s pool of data..." With req .Option(WinHttpRequestOption_SslErrorIgnoreFlags) = SslErrorFlag_Ignore_All @@ -516,8 +516,8 @@ Function list_changes(doc As String, ByRef fail As Boolean) As Variant() Dim req As New WinHttp.WinHttpRequest Dim json As Object Dim wr As String - Dim i As Integer - Dim j As Integer + Dim i As Long + Dim j As Long Dim res() As Variant If doc = "" Then @@ -570,8 +570,8 @@ Function undo_changes(ByVal logid As Integer, ByRef fail As Boolean) As Variant( Dim req As New WinHttp.WinHttpRequest Dim json As Object Dim wr As String - Dim i As Integer - Dim j As Integer + Dim i As Long + Dim j As Long Dim res() As Variant Dim doc As String Dim ds As Worksheet diff --git a/VBA/openf.frm b/VBA/openf.frm index 0f6ca9d..9c5062c 100644 --- a/VBA/openf.frm +++ b/VBA/openf.frm @@ -29,6 +29,12 @@ Private Sub cbOK_Click() openf.Hide End Sub +Private Sub cbOK_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) + If Button = 2 And Shift = 2 Then + shConfig.Range("debug_mode") = Not shConfig.Range("debug_mode") + End If +End Sub + Private Sub opDSM_Click() cbDSM.Enabled = True cbDirector.Enabled = False diff --git a/VBA/openf.frx b/VBA/openf.frx index 42b20ba..a749ad5 100644 Binary files a/VBA/openf.frx and b/VBA/openf.frx differ diff --git a/VBA/part.frx b/VBA/part.frx index 7d15813..4919787 100644 Binary files a/VBA/part.frx and b/VBA/part.frx differ diff --git a/VBA/shMonthView.cls b/VBA/shMonthView.cls index 9e28a11..149e60b 100644 --- a/VBA/shMonthView.cls +++ b/VBA/shMonthView.cls @@ -440,14 +440,7 @@ Private Sub BuildJson() 'if there is no existing volume on the target month but units are being added If units(pos, 2) + units(pos, 3) = 0 And units(pos, 4) <> 0 Then 'add month - If Round(price(pos, 5), 8) <> Round(tprice(1, 2) + tprice(1, 3), 8) Then - 'if the target price is diferent from the average and a month is being added - adjust(pos)("type") = "addmonth_vp" - Else - 'if the target price is the same as average and a month is being added - '--ignore above comment and always use add month_vp - adjust(pos)("type") = "addmonth_vp" - End If + adjust(pos)("type") = "addmonth_vp" adjust(pos)("month") = shMonthView.Range("OrderMonths").Cells(pos, 1) adjust(pos)("qty") = units(pos, 4) adjust(pos)("amount") = sales(pos, 4)