From 988f72996a88a45dd4ebc948a2e5a293905d083a Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Tue, 18 Feb 2020 17:04:03 -0500 Subject: [PATCH] accomodate tagging --- changes.frm | 4 +++- changes.frx | Bin 3096 -> 3096 bytes fpvt.frm | 9 +++++++++ fpvt.frx | Bin 21016 -> 21016 bytes handler.bas | 23 ++++++++++++----------- months.cls | 36 +++++++++++++++++++++++++----------- 6 files changed, 49 insertions(+), 23 deletions(-) diff --git a/changes.frm b/changes.frm index 130229f..808ad72 100644 --- a/changes.frm +++ b/changes.frm @@ -29,7 +29,7 @@ Private Sub cbUndo_Click() For i = 0 To Me.lbHist.ListCount - 1 If Me.lbHist.Selected(i) Then - Call handler.undo_changes(x(i, 5), fail) + Call handler.undo_changes(x(i, 6), fail) If fail Then MsgBox ("undo did not work") Exit Sub @@ -39,6 +39,8 @@ Private Sub cbUndo_Click() Sheets("Orders").PivotTables("PivotTable1").PivotCache.Refresh + Me.Hide + End Sub diff --git a/changes.frx b/changes.frx index 4b8b8ae7ee0060d0386d02e2e67bd98817d583ad..8199186a4fdb3bf68c787e638198ad4a5df78944 100644 GIT binary patch delta 109 zcmbOsF+*ZQ3k&Oq_9~O*n>$%vGTSgPFsLv*Wn^GrXJBYx0`e??n2|x8p(H7wC^N5w z;cqBVfPqPZL6MQ60mPK{XjlVMxL9)XI*utK$`C=G1|4Q5HlS7}hGij}!#EEy0RVh% B7dQX_ delta 109 zcmbOsF+*ZQ3kz$&vJLE7n>$%vGTU@BFsLv*Wn^GrXJBYxVqjpf0AfZ4afXtlfTGO2 z5(a5^pa27t1cM?YLj#B@?a{CXq_9=044N_nmX@ zXD(jn7q9b5k5Cw6=oc=o{}+aZb^ZNIUSo5~S0H zt(Hse^i*Y!Ib(vcQkBTfER3@-J5iX+fxsRK@D;7*#a6}?bi7@^GAj^pB zyLIZ|LH9L^FWv7^Q)O$n$3iSo@B7rFPihffuVT_Ls&9Yxt_f=4M!>^^So8HNS^9eB z^K(r$`1>r*eX}3s&4m*NW2Xz|0ycbJ6nb4-3#UIk_34bkkcqi*r#H;|p*dXG)we{- z=vx&=5y}1!IFn|76R(jL6cv}X0J%IL=@hdJ8(Ie?HwTim5zV^JHLRtgaQYpj(28e) zrrI-dCITT;eBFo**x%YCJr9-#@_Zil!7C!q(3NPFcLo=^GCh{Ak|Q_jz>{PEchhZn z6-nWh*43iX4(()KS|KZ~QmqI)Pwo{%4297ka%Z~5TntTdJdCKKXrK~F;6_j- zx9iF1CS4bP3YYNkzzFWA{F|<~;n(PHoB97%bva0?CX+QW9{U38x(k2B8fYZe_(_G4 z@1^+HVy0?;lE9^eN90ZURYDb54*2BnsT5b{3|02*|3g7G>cjr@w_-Yk3y~@ElvEgX zvJ#9dx10a07G1r16xk=^hfZ-Ccx8Bn;;|9G-N>`Q-(~EKzHZC#78kvQ0*2V?~sqc|xhDfs&dqi5t6LO(eW0f^)ttcce+5JYoa+o{V=narwHk$v zW!Ue&hiAfxf(W3qaf&*MjqB-J#)@?w3*UmUcLVRoQL+s1dP_Gnd*66xZGD;Ev_6sv z$(Zofa|N@$7O8LW2;TercqluKHGa3nIe4l!r;iL|6n1J*A3>p|4mH{adtaizd+2z7 zhUik78xLCAkkuMdy=jcgz@}S*fjXUdWg0|UaBBhbC+ImcG&QZpuOz{!8qAQID$|%RzU;|e%9}AJ4 z2-f4k&R7W}@+zd|CS*ISFex{QoQ_s|H6}yvI5S4oLmbbyj+e%Xh4C<<;bQPGn!}3O zGZU{8X&G0;2d$z1H&;kLrClKVBGiDN+G1WrMdYM3kZHkK97ym6Zhc^x0}-c{0<|sYlsv7-0mB+vNUt?jPxtFd`RO=kQ;HzyPLEn*FZMM50eUeqg#Z8m diff --git a/handler.bas b/handler.bas index e3be28c..7e44f7a 100644 --- a/handler.bas +++ b/handler.bas @@ -137,8 +137,8 @@ Sub pg_main_workset(rep As String) res(i, 28) = json("x")(i)("version") res(i, 29) = json("x")(i)("iter") res(i, 30) = json("x")(i)("logid") - res(i, 31) = json("x")(i)("comment") - res(i, 32) = json("x")(i)("module") + res(i, 31) = json("x")(i)("tag") + res(i, 32) = json("x")(i)("comment") Next i res(0, 0) = "bill_cust_descr" @@ -172,8 +172,8 @@ Sub pg_main_workset(rep As String) res(0, 28) = "version" res(0, 29) = "iter" res(0, 30) = "logid" - res(0, 31) = "comment" - res(0, 32) = "module" + res(0, 31) = "tag" + res(0, 32) = "comment" Set json = Nothing @@ -283,8 +283,8 @@ Function request_adjust(doc As String, ByRef fail As Boolean) As Object res(i - 1, 28) = json("x")(i)("version") res(i - 1, 29) = json("x")(i)("iter") res(i - 1, 30) = json("x")(i)("logid") - res(i - 1, 31) = json("x")(i)("comment") - res(i - 1, 32) = json("x")(i)("module") + res(i - 1, 31) = json("x")(i)("tag") + res(i - 1, 32) = json("x")(i)("comment") Next i Set json = Nothing @@ -505,16 +505,17 @@ Function list_changes(doc As String, ByRef fail As Boolean) As Variant() Exit Function End If - ReDim res(json("x").Count - 1, 6) + ReDim res(json("x").Count - 1, 7) For i = 0 To UBound(res, 1) res(i, 0) = json("x")(i + 1)("user") res(i, 1) = json("x")(i + 1)("quota_rep_descr") res(i, 2) = json("x")(i + 1)("stamp") - res(i, 3) = json("x")(i + 1)("comment") - res(i, 4) = json("x")(i + 1)("sales") - res(i, 5) = json("x")(i + 1)("id") - res(i, 6) = json("x")(i + 1)("def") + res(i, 3) = json("x")(i + 1)("tag") + res(i, 4) = json("x")(i + 1)("comment") + res(i, 5) = json("x")(i + 1)("sales") + res(i, 6) = json("x")(i + 1)("id") + res(i, 7) = json("x")(i + 1)("def") Next i list_changes = res diff --git a/months.cls b/months.cls index 17c11da..c4309b4 100644 --- a/months.cls +++ b/months.cls @@ -29,20 +29,11 @@ Private showbasket As Boolean Private np As Object 'json dedicated to new part scenario Private b() As Variant 'holds basket -Private Sub SpinButton1_Change() - -End Sub -Private Sub ComboBox1_Change() - -End Sub Private Sub cbMTAG_Change() - Dim i As Long - For i = 2 To 13 - Next i End Sub @@ -52,12 +43,18 @@ Private Sub sbMPP_Change() Application.ScreenUpdating = False + dumping = True + Set m = Sheets("month") m.Cells(19, 11) = sbMPP.value / 100 For i = 6 To 17 m.Cells(i, 11) = (m.Cells(i, 9)) * m.Cells(19, 11) Next i + Me.mvp_adj + + dumping = False + Application.ScreenUpdating = True End Sub @@ -68,6 +65,8 @@ Private Sub sbMPV_Change() Application.ScreenUpdating = False + dumping = True + Set m = Sheets("month") m.Cells(19, 5) = sbMPV.value / 100 For i = 6 To 17 @@ -76,6 +75,11 @@ Private Sub sbMPV_Change() End If Next i + dumping = False + + Call Me.mvp_adj + + Application.ScreenUpdating = True End Sub @@ -843,14 +847,24 @@ Sub post_adjust() Dim i As Long Dim fail As Boolean + Dim adjust As Object + Dim jdoc As String If Me.newpart Then - Call handler.request_adjust(Sheets("_month").Cells(2, 16), fail) + Set adjust = JsonConverter.ParseJson(Sheets("_month").Cells(2, 16)) + adjust("message") = Me.tbMCOM.text + adjust("tag") = Me.cbMTAG.text + jdoc = JsonConverter.ConvertToJson(adjust) + Call handler.request_adjust(jdoc, fail) If fail Then Exit Sub Else For i = 2 To 13 If Sheets("_month").Cells(i, 16) <> "" Then - Call handler.request_adjust(Sheets("_month").Cells(i, 16), fail) + Set adjust = JsonConverter.ParseJson(Sheets("_month").Cells(i, 16)) + adjust("message") = Me.tbMCOM.text + adjust("tag") = Me.cbMTAG.text + jdoc = JsonConverter.ConvertToJson(adjust) + Call handler.request_adjust(jdoc, fail) If fail Then Exit Sub End If Next i