Simplify code. Add backdoor to openf form. Fix integer overflow in undo.
This commit is contained in:
parent
0d83f19e33
commit
e726349c98
BIN
VBA/build.frx
BIN
VBA/build.frx
Binary file not shown.
BIN
VBA/changes.frx
BIN
VBA/changes.frx
Binary file not shown.
BIN
VBA/fpvt.frx
BIN
VBA/fpvt.frx
Binary file not shown.
@ -516,8 +516,8 @@ Function list_changes(doc As String, ByRef fail As Boolean) As Variant()
|
|||||||
Dim req As New WinHttp.WinHttpRequest
|
Dim req As New WinHttp.WinHttpRequest
|
||||||
Dim json As Object
|
Dim json As Object
|
||||||
Dim wr As String
|
Dim wr As String
|
||||||
Dim i As Integer
|
Dim i As Long
|
||||||
Dim j As Integer
|
Dim j As Long
|
||||||
Dim res() As Variant
|
Dim res() As Variant
|
||||||
|
|
||||||
If doc = "" Then
|
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 req As New WinHttp.WinHttpRequest
|
||||||
Dim json As Object
|
Dim json As Object
|
||||||
Dim wr As String
|
Dim wr As String
|
||||||
Dim i As Integer
|
Dim i As Long
|
||||||
Dim j As Integer
|
Dim j As Long
|
||||||
Dim res() As Variant
|
Dim res() As Variant
|
||||||
Dim doc As String
|
Dim doc As String
|
||||||
Dim ds As Worksheet
|
Dim ds As Worksheet
|
||||||
|
|||||||
@ -29,6 +29,12 @@ Private Sub cbOK_Click()
|
|||||||
openf.Hide
|
openf.Hide
|
||||||
End Sub
|
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()
|
Private Sub opDSM_Click()
|
||||||
cbDSM.Enabled = True
|
cbDSM.Enabled = True
|
||||||
cbDirector.Enabled = False
|
cbDirector.Enabled = False
|
||||||
|
|||||||
BIN
VBA/openf.frx
BIN
VBA/openf.frx
Binary file not shown.
BIN
VBA/part.frx
BIN
VBA/part.frx
Binary file not shown.
@ -440,14 +440,7 @@ Private Sub BuildJson()
|
|||||||
'if there is no existing volume on the target month but units are being added
|
'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
|
If units(pos, 2) + units(pos, 3) = 0 And units(pos, 4) <> 0 Then
|
||||||
'add month
|
'add month
|
||||||
If Round(price(pos, 5), 8) <> Round(tprice(1, 2) + tprice(1, 3), 8) Then
|
adjust(pos)("type") = "addmonth_vp"
|
||||||
'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)("month") = shMonthView.Range("OrderMonths").Cells(pos, 1)
|
adjust(pos)("month") = shMonthView.Range("OrderMonths").Cells(pos, 1)
|
||||||
adjust(pos)("qty") = units(pos, 4)
|
adjust(pos)("qty") = units(pos, 4)
|
||||||
adjust(pos)("amount") = sales(pos, 4)
|
adjust(pos)("amount") = sales(pos, 4)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user