diff --git a/SDL/Classes/cCMR.vb b/SDL/Classes/cCMR.vb index 9466aa50..940e5391 100644 --- a/SDL/Classes/cCMR.vb +++ b/SDL/Classes/cCMR.vb @@ -567,12 +567,19 @@ Public Class cCMR End If + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + + If Not VERAG_PROG_ALLGEMEIN.cProgramFunctions.ValidateSQLFieldLengths(list, "CMR", "", "FMZOLL") Then + Return False + End If + + Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM CMR WITH(updlock,serializable) WHERE CMR_ID=@CMR_ID) " & " BEGIN " & getUpdateCmd() & " END " & " Else " & " BEGIN " & getInsertCmd() & " END " & " commit tran " - Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + Me.CMR_ID = SQL.doSQLVarListID(Me.CMR_ID, sqlstr, "FMZOLL", True, list) Return CBool(Me.CMR_ID > 0) End Function diff --git a/SDL/Fakturierung/cFakturierung.vb b/SDL/Fakturierung/cFakturierung.vb index adbf848a..7000b6fe 100644 --- a/SDL/Fakturierung/cFakturierung.vb +++ b/SDL/Fakturierung/cFakturierung.vb @@ -1923,8 +1923,13 @@ Public Class cFakturierung rpt.txtVermerk.Text = rpt.txtVermerk.Text.Replace("", Now.AddDays(ZZTageVL).ToShortDateString) End If + If sendManuell AndAlso Rechnung.Automailversand Then + Rechnung.SAVE_AUTOMAIL() + End If + + Else - MsgBox("Fehler bei der Vergabe der Rg-Nr.!") + MsgBox("Fehler bei der Vergabe der Rg-Nr.!") Return False End If Else @@ -1952,6 +1957,9 @@ Public Class cFakturierung If Rechnung.[DruckDatumZeit] Is Nothing Then Rechnung.[DruckDatumZeit] = Now 'Wenn Rg-Nr schon vergeben wird das neu gesetzt Rechnung.SAVE_DruckDatumZeit(sendManuell, Rechnung.Automailversand) ' Nur SAVE_DruckDatumZeit ändern/setzen + ElseIf sendManuell AndAlso Rechnung.Automailversand Then + Rechnung.SAVE_AUTOMAIL() + End If End If diff --git a/SDL/SMS/frmSendSMS.Designer.vb b/SDL/SMS/frmSendSMS.Designer.vb index bfc1a9ea..8e4c01c0 100644 --- a/SDL/SMS/frmSendSMS.Designer.vb +++ b/SDL/SMS/frmSendSMS.Designer.vb @@ -73,6 +73,8 @@ Partial Class frmSendSMS Me.Button30 = New System.Windows.Forms.Button() Me.Button31 = New System.Windows.Forms.Button() Me.pnl = New System.Windows.Forms.Panel() + Me.Button57 = New System.Windows.Forms.Button() + Me.Button56 = New System.Windows.Forms.Button() Me.Button43 = New System.Windows.Forms.Button() Me.Button32 = New System.Windows.Forms.Button() Me.Button33 = New System.Windows.Forms.Button() @@ -97,8 +99,6 @@ Partial Class frmSendSMS Me.Button53 = New System.Windows.Forms.Button() Me.Button54 = New System.Windows.Forms.Button() Me.Button55 = New System.Windows.Forms.Button() - Me.Button56 = New System.Windows.Forms.Button() - Me.Button57 = New System.Windows.Forms.Button() Me.pnl.SuspendLayout() Me.SuspendLayout() ' @@ -201,7 +201,7 @@ Partial Class frmSendSMS 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button1.Location = New System.Drawing.Point(15, 331) + Me.Button1.Location = New System.Drawing.Point(15, 488) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(307, 25) Me.Button1.TabIndex = 8 @@ -212,7 +212,7 @@ Partial Class frmSendSMS 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button2.Location = New System.Drawing.Point(15, 355) + Me.Button2.Location = New System.Drawing.Point(15, 512) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(307, 25) Me.Button2.TabIndex = 11 @@ -223,7 +223,7 @@ Partial Class frmSendSMS 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button3.Location = New System.Drawing.Point(15, 379) + Me.Button3.Location = New System.Drawing.Point(15, 536) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(307, 25) Me.Button3.TabIndex = 15 @@ -234,7 +234,7 @@ Partial Class frmSendSMS 'Button4 ' Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button4.Location = New System.Drawing.Point(15, 403) + Me.Button4.Location = New System.Drawing.Point(15, 560) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(307, 25) Me.Button4.TabIndex = 19 @@ -245,7 +245,7 @@ Partial Class frmSendSMS 'Button5 ' Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button5.Location = New System.Drawing.Point(321, 403) + Me.Button5.Location = New System.Drawing.Point(321, 560) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(35, 25) Me.Button5.TabIndex = 20 @@ -256,7 +256,7 @@ Partial Class frmSendSMS 'Button6 ' Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button6.Location = New System.Drawing.Point(321, 379) + Me.Button6.Location = New System.Drawing.Point(321, 536) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(35, 25) Me.Button6.TabIndex = 16 @@ -267,7 +267,7 @@ Partial Class frmSendSMS 'Button7 ' Me.Button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button7.Location = New System.Drawing.Point(321, 355) + Me.Button7.Location = New System.Drawing.Point(321, 512) Me.Button7.Name = "Button7" Me.Button7.Size = New System.Drawing.Size(35, 25) Me.Button7.TabIndex = 12 @@ -278,7 +278,7 @@ Partial Class frmSendSMS 'Button8 ' Me.Button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button8.Location = New System.Drawing.Point(321, 331) + Me.Button8.Location = New System.Drawing.Point(321, 488) Me.Button8.Name = "Button8" Me.Button8.Size = New System.Drawing.Size(35, 25) Me.Button8.TabIndex = 9 @@ -289,7 +289,7 @@ Partial Class frmSendSMS 'Button9 ' Me.Button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button9.Location = New System.Drawing.Point(355, 403) + Me.Button9.Location = New System.Drawing.Point(355, 560) Me.Button9.Name = "Button9" Me.Button9.Size = New System.Drawing.Size(35, 25) Me.Button9.TabIndex = 21 @@ -300,7 +300,7 @@ Partial Class frmSendSMS 'Button10 ' Me.Button10.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button10.Location = New System.Drawing.Point(355, 379) + Me.Button10.Location = New System.Drawing.Point(355, 536) Me.Button10.Name = "Button10" Me.Button10.Size = New System.Drawing.Size(35, 25) Me.Button10.TabIndex = 17 @@ -311,7 +311,7 @@ Partial Class frmSendSMS 'Button11 ' Me.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button11.Location = New System.Drawing.Point(355, 355) + Me.Button11.Location = New System.Drawing.Point(355, 512) Me.Button11.Name = "Button11" Me.Button11.Size = New System.Drawing.Size(35, 25) Me.Button11.TabIndex = 13 @@ -322,7 +322,7 @@ Partial Class frmSendSMS 'Button12 ' Me.Button12.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button12.Location = New System.Drawing.Point(355, 331) + Me.Button12.Location = New System.Drawing.Point(355, 488) Me.Button12.Name = "Button12" Me.Button12.Size = New System.Drawing.Size(35, 25) Me.Button12.TabIndex = 10 @@ -368,7 +368,7 @@ Partial Class frmSendSMS 'Button13 ' Me.Button13.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button13.Location = New System.Drawing.Point(389, 403) + Me.Button13.Location = New System.Drawing.Point(389, 560) Me.Button13.Name = "Button13" Me.Button13.Size = New System.Drawing.Size(35, 25) Me.Button13.TabIndex = 26 @@ -379,7 +379,7 @@ Partial Class frmSendSMS 'Button14 ' Me.Button14.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button14.Location = New System.Drawing.Point(389, 379) + Me.Button14.Location = New System.Drawing.Point(389, 536) Me.Button14.Name = "Button14" Me.Button14.Size = New System.Drawing.Size(35, 25) Me.Button14.TabIndex = 25 @@ -390,7 +390,7 @@ Partial Class frmSendSMS 'Button15 ' Me.Button15.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button15.Location = New System.Drawing.Point(389, 355) + Me.Button15.Location = New System.Drawing.Point(389, 512) Me.Button15.Name = "Button15" Me.Button15.Size = New System.Drawing.Size(35, 25) Me.Button15.TabIndex = 24 @@ -401,7 +401,7 @@ Partial Class frmSendSMS 'Button16 ' Me.Button16.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button16.Location = New System.Drawing.Point(389, 331) + Me.Button16.Location = New System.Drawing.Point(389, 488) Me.Button16.Name = "Button16" Me.Button16.Size = New System.Drawing.Size(35, 25) Me.Button16.TabIndex = 23 @@ -412,7 +412,7 @@ Partial Class frmSendSMS 'Button17 ' Me.Button17.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button17.Location = New System.Drawing.Point(422, 403) + Me.Button17.Location = New System.Drawing.Point(422, 560) Me.Button17.Name = "Button17" Me.Button17.Size = New System.Drawing.Size(35, 25) Me.Button17.TabIndex = 30 @@ -423,7 +423,7 @@ Partial Class frmSendSMS 'Button18 ' Me.Button18.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button18.Location = New System.Drawing.Point(422, 379) + Me.Button18.Location = New System.Drawing.Point(422, 536) Me.Button18.Name = "Button18" Me.Button18.Size = New System.Drawing.Size(35, 25) Me.Button18.TabIndex = 29 @@ -434,7 +434,7 @@ Partial Class frmSendSMS 'Button19 ' Me.Button19.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button19.Location = New System.Drawing.Point(422, 355) + Me.Button19.Location = New System.Drawing.Point(422, 512) Me.Button19.Name = "Button19" Me.Button19.Size = New System.Drawing.Size(35, 25) Me.Button19.TabIndex = 28 @@ -445,7 +445,7 @@ Partial Class frmSendSMS 'Button20 ' Me.Button20.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button20.Location = New System.Drawing.Point(422, 331) + Me.Button20.Location = New System.Drawing.Point(422, 488) Me.Button20.Name = "Button20" Me.Button20.Size = New System.Drawing.Size(35, 25) Me.Button20.TabIndex = 27 @@ -469,7 +469,7 @@ Partial Class frmSendSMS 'Button21 ' Me.Button21.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button21.Location = New System.Drawing.Point(422, 427) + Me.Button21.Location = New System.Drawing.Point(422, 584) Me.Button21.Name = "Button21" Me.Button21.Size = New System.Drawing.Size(35, 25) Me.Button21.TabIndex = 36 @@ -480,7 +480,7 @@ Partial Class frmSendSMS 'Button22 ' Me.Button22.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button22.Location = New System.Drawing.Point(389, 427) + Me.Button22.Location = New System.Drawing.Point(389, 584) Me.Button22.Name = "Button22" Me.Button22.Size = New System.Drawing.Size(35, 25) Me.Button22.TabIndex = 35 @@ -491,7 +491,7 @@ Partial Class frmSendSMS 'Button23 ' Me.Button23.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button23.Location = New System.Drawing.Point(355, 427) + Me.Button23.Location = New System.Drawing.Point(355, 584) Me.Button23.Name = "Button23" Me.Button23.Size = New System.Drawing.Size(35, 25) Me.Button23.TabIndex = 34 @@ -502,7 +502,7 @@ Partial Class frmSendSMS 'Button24 ' Me.Button24.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button24.Location = New System.Drawing.Point(321, 427) + Me.Button24.Location = New System.Drawing.Point(321, 584) Me.Button24.Name = "Button24" Me.Button24.Size = New System.Drawing.Size(35, 25) Me.Button24.TabIndex = 33 @@ -513,7 +513,7 @@ Partial Class frmSendSMS 'Button25 ' Me.Button25.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button25.Location = New System.Drawing.Point(15, 427) + Me.Button25.Location = New System.Drawing.Point(15, 584) Me.Button25.Name = "Button25" Me.Button25.Size = New System.Drawing.Size(307, 25) Me.Button25.TabIndex = 32 @@ -594,7 +594,7 @@ Partial Class frmSendSMS 'MyRichTextBox1 ' Me.MyRichTextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!) - Me.MyRichTextBox1.Location = New System.Drawing.Point(15, 28) + Me.MyRichTextBox1.Location = New System.Drawing.Point(15, 29) Me.MyRichTextBox1.MaxLength = 500 Me.MyRichTextBox1.MaxLineLength = -1 Me.MyRichTextBox1.MaxLines_Warning = "" @@ -608,7 +608,7 @@ Partial Class frmSendSMS ' Me.Label6.AutoSize = True Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!) - Me.Label6.Location = New System.Drawing.Point(12, 12) + Me.Label6.Location = New System.Drawing.Point(12, 13) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(190, 13) Me.Label6.TabIndex = 48 @@ -617,7 +617,7 @@ Partial Class frmSendSMS 'Button27 ' Me.Button27.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button27.Location = New System.Drawing.Point(422, 28) + Me.Button27.Location = New System.Drawing.Point(422, 29) Me.Button27.Name = "Button27" Me.Button27.Size = New System.Drawing.Size(35, 44) Me.Button27.TabIndex = 52 @@ -628,7 +628,7 @@ Partial Class frmSendSMS 'Button28 ' Me.Button28.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button28.Location = New System.Drawing.Point(389, 28) + Me.Button28.Location = New System.Drawing.Point(389, 29) Me.Button28.Name = "Button28" Me.Button28.Size = New System.Drawing.Size(35, 44) Me.Button28.TabIndex = 51 @@ -639,7 +639,7 @@ Partial Class frmSendSMS 'Button29 ' Me.Button29.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button29.Location = New System.Drawing.Point(355, 28) + Me.Button29.Location = New System.Drawing.Point(355, 29) Me.Button29.Name = "Button29" Me.Button29.Size = New System.Drawing.Size(35, 44) Me.Button29.TabIndex = 50 @@ -650,7 +650,7 @@ Partial Class frmSendSMS 'Button30 ' Me.Button30.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button30.Location = New System.Drawing.Point(321, 28) + Me.Button30.Location = New System.Drawing.Point(321, 29) Me.Button30.Name = "Button30" Me.Button30.Size = New System.Drawing.Size(35, 44) Me.Button30.TabIndex = 49 @@ -661,7 +661,7 @@ Partial Class frmSendSMS 'Button31 ' Me.Button31.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button31.Location = New System.Drawing.Point(287, 28) + Me.Button31.Location = New System.Drawing.Point(287, 29) Me.Button31.Name = "Button31" Me.Button31.Size = New System.Drawing.Size(35, 44) Me.Button31.TabIndex = 53 @@ -682,15 +682,37 @@ Partial Class frmSendSMS Me.pnl.Controls.Add(Me.Button28) Me.pnl.Controls.Add(Me.Button29) Me.pnl.Dock = System.Windows.Forms.DockStyle.Bottom - Me.pnl.Location = New System.Drawing.Point(0, 492) + Me.pnl.Location = New System.Drawing.Point(0, 673) Me.pnl.Name = "pnl" Me.pnl.Size = New System.Drawing.Size(563, 108) Me.pnl.TabIndex = 54 ' + 'Button57 + ' + Me.Button57.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button57.Location = New System.Drawing.Point(523, 29) + Me.Button57.Name = "Button57" + Me.Button57.Size = New System.Drawing.Size(35, 44) + Me.Button57.TabIndex = 56 + Me.Button57.Text = "IT" + Me.Button57.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button57.UseVisualStyleBackColor = True + ' + 'Button56 + ' + Me.Button56.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button56.Location = New System.Drawing.Point(489, 29) + Me.Button56.Name = "Button56" + Me.Button56.Size = New System.Drawing.Size(35, 44) + Me.Button56.TabIndex = 55 + Me.Button56.Text = "EN" + Me.Button56.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button56.UseVisualStyleBackColor = True + ' 'Button43 ' Me.Button43.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button43.Location = New System.Drawing.Point(455, 28) + Me.Button43.Location = New System.Drawing.Point(455, 29) Me.Button43.Name = "Button43" Me.Button43.Size = New System.Drawing.Size(35, 44) Me.Button43.TabIndex = 54 @@ -701,7 +723,7 @@ Partial Class frmSendSMS 'Button32 ' Me.Button32.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button32.Location = New System.Drawing.Point(422, 451) + Me.Button32.Location = New System.Drawing.Point(422, 608) Me.Button32.Name = "Button32" Me.Button32.Size = New System.Drawing.Size(35, 25) Me.Button32.TabIndex = 59 @@ -712,7 +734,7 @@ Partial Class frmSendSMS 'Button33 ' Me.Button33.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button33.Location = New System.Drawing.Point(389, 451) + Me.Button33.Location = New System.Drawing.Point(389, 608) Me.Button33.Name = "Button33" Me.Button33.Size = New System.Drawing.Size(35, 25) Me.Button33.TabIndex = 58 @@ -723,7 +745,7 @@ Partial Class frmSendSMS 'Button34 ' Me.Button34.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button34.Location = New System.Drawing.Point(355, 451) + Me.Button34.Location = New System.Drawing.Point(355, 608) Me.Button34.Name = "Button34" Me.Button34.Size = New System.Drawing.Size(35, 25) Me.Button34.TabIndex = 57 @@ -734,7 +756,7 @@ Partial Class frmSendSMS 'Button35 ' Me.Button35.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button35.Location = New System.Drawing.Point(321, 451) + Me.Button35.Location = New System.Drawing.Point(321, 608) Me.Button35.Name = "Button35" Me.Button35.Size = New System.Drawing.Size(35, 25) Me.Button35.TabIndex = 56 @@ -745,7 +767,7 @@ Partial Class frmSendSMS 'Button36 ' Me.Button36.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button36.Location = New System.Drawing.Point(15, 451) + Me.Button36.Location = New System.Drawing.Point(15, 608) Me.Button36.Name = "Button36" Me.Button36.Size = New System.Drawing.Size(307, 25) Me.Button36.TabIndex = 55 @@ -756,7 +778,7 @@ Partial Class frmSendSMS 'Button37 ' Me.Button37.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button37.Location = New System.Drawing.Point(455, 331) + Me.Button37.Location = New System.Drawing.Point(455, 488) Me.Button37.Name = "Button37" Me.Button37.Size = New System.Drawing.Size(35, 25) Me.Button37.TabIndex = 60 @@ -767,7 +789,7 @@ Partial Class frmSendSMS 'Button38 ' Me.Button38.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button38.Location = New System.Drawing.Point(455, 355) + Me.Button38.Location = New System.Drawing.Point(455, 512) Me.Button38.Name = "Button38" Me.Button38.Size = New System.Drawing.Size(35, 25) Me.Button38.TabIndex = 61 @@ -778,7 +800,7 @@ Partial Class frmSendSMS 'Button39 ' Me.Button39.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button39.Location = New System.Drawing.Point(455, 379) + Me.Button39.Location = New System.Drawing.Point(455, 536) Me.Button39.Name = "Button39" Me.Button39.Size = New System.Drawing.Size(35, 25) Me.Button39.TabIndex = 62 @@ -789,7 +811,7 @@ Partial Class frmSendSMS 'Button40 ' Me.Button40.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button40.Location = New System.Drawing.Point(455, 403) + Me.Button40.Location = New System.Drawing.Point(455, 560) Me.Button40.Name = "Button40" Me.Button40.Size = New System.Drawing.Size(35, 25) Me.Button40.TabIndex = 63 @@ -800,7 +822,7 @@ Partial Class frmSendSMS 'Button41 ' Me.Button41.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button41.Location = New System.Drawing.Point(455, 427) + Me.Button41.Location = New System.Drawing.Point(455, 584) Me.Button41.Name = "Button41" Me.Button41.Size = New System.Drawing.Size(35, 25) Me.Button41.TabIndex = 64 @@ -811,7 +833,7 @@ Partial Class frmSendSMS 'Button42 ' Me.Button42.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button42.Location = New System.Drawing.Point(455, 451) + Me.Button42.Location = New System.Drawing.Point(455, 608) Me.Button42.Name = "Button42" Me.Button42.Size = New System.Drawing.Size(35, 25) Me.Button42.TabIndex = 65 @@ -822,7 +844,7 @@ Partial Class frmSendSMS 'Button44 ' Me.Button44.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button44.Location = New System.Drawing.Point(489, 331) + Me.Button44.Location = New System.Drawing.Point(489, 488) Me.Button44.Name = "Button44" Me.Button44.Size = New System.Drawing.Size(35, 25) Me.Button44.TabIndex = 66 @@ -833,7 +855,7 @@ Partial Class frmSendSMS 'Button45 ' Me.Button45.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button45.Location = New System.Drawing.Point(523, 331) + Me.Button45.Location = New System.Drawing.Point(523, 488) Me.Button45.Name = "Button45" Me.Button45.Size = New System.Drawing.Size(28, 25) Me.Button45.TabIndex = 67 @@ -844,7 +866,7 @@ Partial Class frmSendSMS 'Button46 ' Me.Button46.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button46.Location = New System.Drawing.Point(523, 355) + Me.Button46.Location = New System.Drawing.Point(523, 512) Me.Button46.Name = "Button46" Me.Button46.Size = New System.Drawing.Size(28, 25) Me.Button46.TabIndex = 69 @@ -855,7 +877,7 @@ Partial Class frmSendSMS 'Button47 ' Me.Button47.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button47.Location = New System.Drawing.Point(489, 355) + Me.Button47.Location = New System.Drawing.Point(489, 512) Me.Button47.Name = "Button47" Me.Button47.Size = New System.Drawing.Size(35, 25) Me.Button47.TabIndex = 68 @@ -866,7 +888,7 @@ Partial Class frmSendSMS 'Button48 ' Me.Button48.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button48.Location = New System.Drawing.Point(523, 379) + Me.Button48.Location = New System.Drawing.Point(523, 536) Me.Button48.Name = "Button48" Me.Button48.Size = New System.Drawing.Size(28, 25) Me.Button48.TabIndex = 71 @@ -877,7 +899,7 @@ Partial Class frmSendSMS 'Button49 ' Me.Button49.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button49.Location = New System.Drawing.Point(489, 379) + Me.Button49.Location = New System.Drawing.Point(489, 536) Me.Button49.Name = "Button49" Me.Button49.Size = New System.Drawing.Size(35, 25) Me.Button49.TabIndex = 70 @@ -888,7 +910,7 @@ Partial Class frmSendSMS 'Button50 ' Me.Button50.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button50.Location = New System.Drawing.Point(523, 403) + Me.Button50.Location = New System.Drawing.Point(523, 560) Me.Button50.Name = "Button50" Me.Button50.Size = New System.Drawing.Size(28, 25) Me.Button50.TabIndex = 73 @@ -899,7 +921,7 @@ Partial Class frmSendSMS 'Button51 ' Me.Button51.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button51.Location = New System.Drawing.Point(489, 403) + Me.Button51.Location = New System.Drawing.Point(489, 560) Me.Button51.Name = "Button51" Me.Button51.Size = New System.Drawing.Size(35, 25) Me.Button51.TabIndex = 72 @@ -910,7 +932,7 @@ Partial Class frmSendSMS 'Button52 ' Me.Button52.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button52.Location = New System.Drawing.Point(523, 427) + Me.Button52.Location = New System.Drawing.Point(523, 584) Me.Button52.Name = "Button52" Me.Button52.Size = New System.Drawing.Size(28, 25) Me.Button52.TabIndex = 75 @@ -921,7 +943,7 @@ Partial Class frmSendSMS 'Button53 ' Me.Button53.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button53.Location = New System.Drawing.Point(489, 427) + Me.Button53.Location = New System.Drawing.Point(489, 584) Me.Button53.Name = "Button53" Me.Button53.Size = New System.Drawing.Size(35, 25) Me.Button53.TabIndex = 74 @@ -932,7 +954,7 @@ Partial Class frmSendSMS 'Button54 ' Me.Button54.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button54.Location = New System.Drawing.Point(523, 451) + Me.Button54.Location = New System.Drawing.Point(523, 608) Me.Button54.Name = "Button54" Me.Button54.Size = New System.Drawing.Size(28, 25) Me.Button54.TabIndex = 77 @@ -943,7 +965,7 @@ Partial Class frmSendSMS 'Button55 ' Me.Button55.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button55.Location = New System.Drawing.Point(489, 451) + Me.Button55.Location = New System.Drawing.Point(489, 608) Me.Button55.Name = "Button55" Me.Button55.Size = New System.Drawing.Size(35, 25) Me.Button55.TabIndex = 76 @@ -951,34 +973,12 @@ Partial Class frmSendSMS Me.Button55.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button55.UseVisualStyleBackColor = True ' - 'Button56 - ' - Me.Button56.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button56.Location = New System.Drawing.Point(489, 28) - Me.Button56.Name = "Button56" - Me.Button56.Size = New System.Drawing.Size(35, 44) - Me.Button56.TabIndex = 55 - Me.Button56.Text = "EN" - Me.Button56.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.Button56.UseVisualStyleBackColor = True - ' - 'Button57 - ' - Me.Button57.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button57.Location = New System.Drawing.Point(523, 28) - Me.Button57.Name = "Button57" - Me.Button57.Size = New System.Drawing.Size(35, 44) - Me.Button57.TabIndex = 56 - Me.Button57.Text = "IT" - Me.Button57.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - Me.Button57.UseVisualStyleBackColor = True - ' 'frmSendSMS ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.White - Me.ClientSize = New System.Drawing.Size(563, 600) + Me.ClientSize = New System.Drawing.Size(563, 781) Me.Controls.Add(Me.Button54) Me.Controls.Add(Me.Button55) Me.Controls.Add(Me.Button52) diff --git a/SDL/SMS/frmSendSMS.vb b/SDL/SMS/frmSendSMS.vb index 18d19d79..73aadd78 100644 --- a/SDL/SMS/frmSendSMS.vb +++ b/SDL/SMS/frmSendSMS.vb @@ -1,4 +1,5 @@ Imports com.esendex.sdk.messaging +Imports VERAG_PROG_ALLGEMEIN Public Class frmSendSMS @@ -11,7 +12,7 @@ Public Class frmSendSMS Public ART = "WHATSAPP" Public templateID = "" Public template_ParamMFGAdditional = "" - + Public useNewTemplates As Boolean = False Public SMS As VERAG_PROG_ALLGEMEIN.cSMS = Nothing Sub New() @@ -109,6 +110,9 @@ Public Class frmSendSMS cbxLKWOK.Visible = (AvisoId > 0) + Dim Paramslist As New cParameterList(VERAG_PROG_ALLGEMEIN.cAllgemein.PROGID) + useNewTemplates = Paramslist.GET_PARAMETER_VALUE_BOOL("WHATSAPP_newTemplates") + If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("WHATSAPP_Freitext", "AVISO") Then Me.Height -= pnl.Height pnl.Visible = False @@ -195,7 +199,7 @@ Public Class frmSendSMS If ART = "WHATSAPP" Then SMS.sms_art = "WHATSAPP" ' If SMS.sendWhatsApp(cboFirma._value) Then 'WHATS-APP - If SMS.sendWhatsAppTemplate(cboFirma._value, template_ParamMFGAdditional) Then 'WHATS-APP TEMPLATE!! + If SMS.sendWhatsAppTemplate(cboFirma._value, template_ParamMFGAdditional, useNewTemplates, txtNachricht.Text) Then 'WHATS-APP TEMPLATE!! If cbxLKWOK.Visible And cbxLKWOK.Checked And AvisoId > 0 Then VERAG_PROG_ALLGEMEIN.cMeineFunktionenAVISO.LKWFertig(VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID, True) End If @@ -222,7 +226,7 @@ Public Class frmSendSMS End Try End Sub - Sub fillTXT(s, Optional lkwTxt = "LKW/TIR: ", Optional templateID = "", Optional template_ParamMFGAdditional = "") + Sub fillTXT(s, Sprache, Optional lkwTxt = "LKW/TIR: ", Optional templateID = "", Optional template_ParamMFGAdditional = "", Optional useNewTemplate = False) Dim FirmaTmp = cboFirma._value If FirmaTmp <> "VERAG" Then txtNachricht.Text = s.ToString.Replace("VERAG", FirmaTmp.Replace("FRONTOFFICE", "FRONT-OFFICE SUBEN")) @@ -240,7 +244,10 @@ Public Class frmSendSMS End If 'WENN WHATSAPP - Me.templateID = templateID + Me.templateID = getTemplateID(templateID, Sprache) + If useNewTemplate Then + template_ParamMFGAdditional = "" + End If Me.template_ParamMFGAdditional = template_ParamMFGAdditional If ART = "WHATSAPP" Then @@ -250,6 +257,7 @@ Public Class frmSendSMS End If End Sub + 'OLD-TEMPLATES Dim template_DE = "42783623-94d2-48de-8919-34735cc78b58" Dim template_TR = "7e0d2e60-720f-4102-9f36-ed194eaa0ace" Dim template_RO = "ac361636-16e9-4713-856e-d22f50e47b08" @@ -259,53 +267,90 @@ Public Class frmSendSMS Dim template_MK = "01e9cca5-f8a5-461e-93e8-ab321d41f99d" Dim template_IT = "ceee701d-ed4e-45a9-944d-c2c3ade6c1b8" + Private Function getTemplateID(defaultTemplate, sprache) As String + + If useNewTemplates Then + 'tempplates mit dem Aufbau : „Eine Nachricht von [Company]: [Message]“ -> einheitlich! + Select Case sprache + Case "DE" + Return "aedede63-a55d-4706-ad43-efd8f523b338" + Case "TR" + Return "50fc630d-8e62-4a95-af12-b3835c32945b" + Case "DE" + Return "aedede63-a55d-4706-ad43-efd8f523b338" + Case "RO" + Return "4909c836-70c9-4d92-a915-d0428f24a81e" + Case "BG" + Return "8a91b9c2-799f-4c5d-920d-3d6d26a1f807" + Case "EN" + Return "135fefe5-e132-4594-ab11-c8d90813fdad" + Case "YU" + Return "becdf003-c16e-4b84-8a41-6dea699d6dff" + Case "IT" + Return "9881f54b-ead5-45aa-bad0-f23865771995" + Case "MK" + Return "925e1fb5-caad-4df0-b5cd-214f0674a331" + + Case Else + + Return defaultTemplate + + End Select + + Else + Return defaultTemplate + End If + + + End Function + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click - fillTXT("Bitte zu VERAG kommen!", "LKW: ", "e5c1ce77-31a0-4663-9576-be340f73ac1c") + fillTXT("Bitte zu VERAG kommen!", "DE", "LKW: ", "e5c1ce77-31a0-4663-9576-be340f73ac1c") End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click - fillTXT("Bitte zu VERAG kommen und den PASS mitnehmen!", "LKW: ", template_DE, " und den PASS mitnehmen!") + fillTXT("Bitte zu VERAG kommen und den PASS mitnehmen!", "DE", "LKW: ", template_DE, " und den PASS mitnehmen!") End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click - fillTXT("Bitte zu VERAG kommen und den STEMPEL mitnehmen!", "LKW: ", template_DE, " und den STEMPEL mitnehmen!") + fillTXT("Bitte zu VERAG kommen und den STEMPEL mitnehmen!", "DE", "LKW: ", template_DE, " und den STEMPEL mitnehmen!") End Sub Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click - fillTXT("Bitte zu VERAG kommen und Bargeld mitnehmen: € ", "LKW: ", template_DE, " und Bargeld mitnehmen: € ") + fillTXT("Bitte zu VERAG kommen und Bargeld mitnehmen: € ", "DE", "LKW: ", template_DE, " und Bargeld mitnehmen: € ") End Sub Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click - fillTXT("VERAG ofise geliniz.", "TIR: ", template_TR) + fillTXT("VERAG ofise geliniz.", "TR", "TIR: ", template_TR) End Sub Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click - fillTXT("PASAPORTU ile birlikte VERAG ofise geliniz.", "TIR: ", template_TR, " PASAPORTU ile birlikte ") + fillTXT("PASAPORTU ile birlikte VERAG ofise geliniz.", "TR", "TIR: ", template_TR, " PASAPORTU ile birlikte ") End Sub Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click - fillTXT("FIRMAKASESI ile birlikte VERAG ofise geliniz.", "TIR: ", template_TR, " FIRMAKASESI ile birlikte") + fillTXT("FIRMAKASESI ile birlikte VERAG ofise geliniz.", "TR", "TIR: ", template_TR, " FIRMAKASESI ile birlikte") End Sub Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click - fillTXT("VERAG ofise, nakit para ile geliniz: € ", "TIR: ", template_TR, " nakit para ile: €") + fillTXT("VERAG ofise, nakit para ile geliniz: € ", "TR", "TIR: ", template_TR, " nakit para ile: €") End Sub Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click - fillTXT("Molim Vas dođite u VERAG!", "TRUCK: ", template_YU, "") + fillTXT("Molim Vas dođite u VERAG!", "YU", "TRUCK: ", template_YU, "") End Sub Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click - fillTXT("Molim Vas dođite u VERAG i PONESITE PASOS!", "TRUCK: ", template_YU, " i PONESITE PASOS") + fillTXT("Molim Vas dođite u VERAG i PONESITE PASOS!", "YU", "TRUCK: ", template_YU, " i PONESITE PASOS") End Sub Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click - fillTXT("Molim Vas dođite u VERAG i PONESITE PEČAT!", "TRUCK: ", template_YU, " i PONESITE PEČAT") + fillTXT("Molim Vas dođite u VERAG i PONESITE PEČAT!", "YU", "TRUCK: ", template_YU, " i PONESITE PEČAT") End Sub Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click - fillTXT("Molim Vas dođite u VERAG i za platit imate: € ", "TRUCK: ", template_YU, " i za platit imate: € ") + fillTXT("Molim Vas dođite u VERAG i za platit imate: € ", "YU", "TRUCK: ", template_YU, " i za platit imate: € ") End Sub Private Sub txtHandyNummer_KeyDown(sender As Object, e As KeyEventArgs) Handles txtHandyNummer.KeyDown diff --git a/SDL/USTV/frmMDM_USTVAntrag.Designer.vb b/SDL/USTV/frmMDM_USTVAntrag.Designer.vb index f8cf5ca1..3121ab26 100644 --- a/SDL/USTV/frmMDM_USTVAntrag.Designer.vb +++ b/SDL/USTV/frmMDM_USTVAntrag.Designer.vb @@ -24,8 +24,8 @@ Partial Class frmMDM_USTVAntrag Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMDM_USTVAntrag)) - Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.pnlBottom = New System.Windows.Forms.Panel() Me.pbXMLExport = New System.Windows.Forms.PictureBox() Me.btnRMCQuartal = New System.Windows.Forms.Button() @@ -122,6 +122,7 @@ Partial Class frmMDM_USTVAntrag Me.dgvUSTVPositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.pnlAntragsPosDetails = New System.Windows.Forms.Panel() Me.Panel2 = New System.Windows.Forms.Panel() + Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition() Me.Panel4 = New System.Windows.Forms.Panel() Me.cbxKIUploaddelete = New System.Windows.Forms.CheckBox() Me.scanUSTVA = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan() @@ -132,6 +133,7 @@ Partial Class frmMDM_USTVAntrag Me.Panel3 = New System.Windows.Forms.Panel() Me.dgvErstattungspositionen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.pnlErstattungsdetails = New System.Windows.Forms.Panel() + Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition() Me.Panel1 = New System.Windows.Forms.Panel() Me.Button2 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button() @@ -148,8 +150,6 @@ Partial Class frmMDM_USTVAntrag Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem() Me.FakturiertToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.UstCntlUSTV_AntragPosition1 = New SDL.ustCntlUSTV_AntragPosition() - Me.UstCntlUSTV_AntragErstattungen1 = New SDL.ustCntlUSTV_ErstattungPosition() Me.pnlBottom.SuspendLayout() CType(Me.pbXMLExport, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pbMail, System.ComponentModel.ISupportInitialize).BeginInit() @@ -1633,8 +1633,8 @@ Partial Class frmMDM_USTVAntrag Me.dgvUSTVPositionen.AKTUALISIERUNGS_INTERVALL = 500 Me.dgvUSTVPositionen.AllowUserToAddRows = False Me.dgvUSTVPositionen.AllowUserToDeleteRows = False - DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvUSTVPositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3 + DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvUSTVPositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1 Me.dgvUSTVPositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) @@ -1670,6 +1670,14 @@ Partial Class frmMDM_USTVAntrag Me.Panel2.Size = New System.Drawing.Size(1428, 263) Me.Panel2.TabIndex = 1 ' + 'UstCntlUSTV_AntragPosition1 + ' + Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(154, 0) + Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1" + Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1272, 261) + Me.UstCntlUSTV_AntragPosition1.TabIndex = 0 + ' 'Panel4 ' Me.Panel4.BackColor = System.Drawing.Color.WhiteSmoke @@ -1787,8 +1795,8 @@ Partial Class frmMDM_USTVAntrag Me.dgvErstattungspositionen.AKTUALISIERUNGS_INTERVALL = 500 Me.dgvErstattungspositionen.AllowUserToAddRows = False Me.dgvErstattungspositionen.AllowUserToDeleteRows = False - DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) - Me.dgvErstattungspositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4 + DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) + Me.dgvErstattungspositionen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2 Me.dgvErstattungspositionen.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) @@ -1815,6 +1823,14 @@ Partial Class frmMDM_USTVAntrag Me.pnlErstattungsdetails.Size = New System.Drawing.Size(1426, 261) Me.pnlErstattungsdetails.TabIndex = 0 ' + 'UstCntlUSTV_AntragErstattungen1 + ' + Me.UstCntlUSTV_AntragErstattungen1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UstCntlUSTV_AntragErstattungen1.Location = New System.Drawing.Point(154, 0) + Me.UstCntlUSTV_AntragErstattungen1.Name = "UstCntlUSTV_AntragErstattungen1" + Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1270, 259) + Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2 + ' 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke @@ -1886,13 +1902,13 @@ Partial Class frmMDM_USTVAntrag 'AktivierenToolStripMenuItem ' Me.AktivierenToolStripMenuItem.Name = "AktivierenToolStripMenuItem" - Me.AktivierenToolStripMenuItem.Size = New System.Drawing.Size(138, 22) + Me.AktivierenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.AktivierenToolStripMenuItem.Text = "aktivieren" ' 'DeaktivierenToolStripMenuItem ' Me.DeaktivierenToolStripMenuItem.Name = "DeaktivierenToolStripMenuItem" - Me.DeaktivierenToolStripMenuItem.Size = New System.Drawing.Size(138, 22) + Me.DeaktivierenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.DeaktivierenToolStripMenuItem.Text = "deaktivieren" ' 'FakturiertZurücksetzenToolStripMenuItem @@ -1905,7 +1921,7 @@ Partial Class frmMDM_USTVAntrag ' Me.ncs_Belege.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1, Me.FakturiertToolStripMenuItem}) Me.ncs_Belege.Name = "cns_vorauszahlen" - Me.ncs_Belege.Size = New System.Drawing.Size(196, 48) + Me.ncs_Belege.Size = New System.Drawing.Size(196, 70) ' 'ToolStripMenuItem1 ' @@ -1933,22 +1949,6 @@ Partial Class frmMDM_USTVAntrag Me.FakturiertToolStripMenuItem.Text = "Fakturiert zurücksetzen" Me.FakturiertToolStripMenuItem.Visible = False ' - 'UstCntlUSTV_AntragPosition1 - ' - Me.UstCntlUSTV_AntragPosition1.Dock = System.Windows.Forms.DockStyle.Fill - Me.UstCntlUSTV_AntragPosition1.Location = New System.Drawing.Point(154, 0) - Me.UstCntlUSTV_AntragPosition1.Name = "UstCntlUSTV_AntragPosition1" - Me.UstCntlUSTV_AntragPosition1.Size = New System.Drawing.Size(1272, 261) - Me.UstCntlUSTV_AntragPosition1.TabIndex = 0 - ' - 'UstCntlUSTV_AntragErstattungen1 - ' - Me.UstCntlUSTV_AntragErstattungen1.Dock = System.Windows.Forms.DockStyle.Fill - Me.UstCntlUSTV_AntragErstattungen1.Location = New System.Drawing.Point(154, 0) - Me.UstCntlUSTV_AntragErstattungen1.Name = "UstCntlUSTV_AntragErstattungen1" - Me.UstCntlUSTV_AntragErstattungen1.Size = New System.Drawing.Size(1270, 259) - Me.UstCntlUSTV_AntragErstattungen1.TabIndex = 2 - ' 'frmMDM_USTVAntrag ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/SDL/USTV/frmMDM_USTVAntrag.vb b/SDL/USTV/frmMDM_USTVAntrag.vb index 37f6e1f7..9019b349 100644 --- a/SDL/USTV/frmMDM_USTVAntrag.vb +++ b/SDL/USTV/frmMDM_USTVAntrag.vb @@ -3853,7 +3853,7 @@ Public Class frmMDM_USTVAntrag If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) OrElse VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then If vbYes = MsgBox("Möchten Sie die Vorauszahlung der markierten Positionen setzen?", vbYesNoCancel) Then - + Dim setUSTVA As Boolean = False For Each r As DataGridViewRow In dgvUSTVPositionen.SelectedRows If IsDBNull(r.Cells("UStVPo_VZ_RKID").Value) OrElse r.Cells("UStVPo_VZ_RKID").Value Is Nothing Then @@ -3862,7 +3862,7 @@ Public Class frmMDM_USTVAntrag If IsDBNull(USTV_POS.UStVPo_VZ) OrElse USTV_POS.UStVPo_VZ = False Then USTV_POS.UStVPo_VZ = True - USTV_POS.SAVE() + setUSTVA = USTV_POS.SAVE() End If End If @@ -3870,7 +3870,7 @@ Public Class frmMDM_USTVAntrag Next - SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1, UStVAn_letzteAenderung = getDate() WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung + If setUSTVA Then SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1, UStVAn_letzteAenderung = getDate() WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung init() End If @@ -4000,7 +4000,7 @@ Public Class frmMDM_USTVAntrag Next - If isSet Then SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1, UStVAn_letzteAenderung = getDate() WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung + SQL.doSQL("UPDATE [tblUStVAntrag] SET UStVAn_VZoffen = 1, UStVAn_letzteAenderung = getDate() WHERE [UStVAn_ID] IN (SELECT distinct([UStVAn_ID]) FROM [tblUStVPositionen] WHERE isnull([UStVPo_VZ],0) = 1 and isnull([UStVPo_VZ_RKID],0) = 0)", "FMZOLL") 'Aktualisierung init() End If @@ -5389,6 +5389,7 @@ Public Class frmMDM_USTVAntrag End Sub + Public Shared Function rearangePosNrByLeistender(UStVAn_ID As Integer) If UStVAn_ID > 0 Then diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cRechnungsausgang.vb b/VERAG_PROG_ALLGEMEIN/Classes/cRechnungsausgang.vb index 3ea13bbd..d05c5f81 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cRechnungsausgang.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cRechnungsausgang.vb @@ -475,6 +475,13 @@ Public Class cRechnungsausgang Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list) End Function + Public Function SAVE_AUTOMAIL() As Boolean + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + + Dim sqlstr = " UPDATE Rechnungsausgang SET Automailversand_sent=getDate() WHERE RK_ID=@RK_ID " + Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list) + End Function + Public Function SAVE_DsId(DsId) As Boolean Me.dsId = DsId Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cSMS.vb b/VERAG_PROG_ALLGEMEIN/Classes/cSMS.vb index f934a4bc..6dd11e98 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cSMS.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cSMS.vb @@ -433,7 +433,7 @@ Public Class cSMS End Function - Function sendWhatsAppTemplate(Originator As String, template_ParamMFGAdditional As String) As Boolean + Function sendWhatsAppTemplate(Originator As String, template_ParamMFGAdditional As String, useNewTemplates As Boolean, Message As String) As Boolean Try VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat() Dim API_STRING = "https://connect.esendex.com" @@ -454,22 +454,21 @@ Public Class cSMS rest.AddHeader("Content-Type", "application/json") rest.AddHeader("Authorization", API_USER_AUTHORIZATION) - 'rest.AddHeader("Accept", "application/vnd.hmrc.1.0+json") - - 'Dim sbRequestBody As New Chilkat.StringBuilder - 'json.EmitSb(sbRequestBody) Me.sms_art = "WHATSAPP" Dim mfg = "" Dim location = "" + Dim Company = "" Select Case Originator Case "FRONTOFFICE" mfg = "VERAG - UNISPED - IMEX" + Company = Originator location = Originator Case Else location = Originator + Company = Originator End Select If template_ParamMFGAdditional <> "" Then mfg = template_ParamMFGAdditional & " " & mfg @@ -486,10 +485,36 @@ Public Class cSMS '--------------------------------------------- Me.sms_Account = "EX0341154" 'WHATSAPP Account - ' Dim TemplateId = "e5c1ce77-31a0-4663-9576-be340f73ac1c" + Dim successJsonLoad As Boolean + + If useNewTemplates Then + + successJsonLoad = json.Load(" + { + ""accountReference"": """ & Me.sms_Account & """, + ""channels"": [ + ""WHATSAPP"" + ], + ""metadata"":{ + ""key"": ""value"" + }, + ""recipient"": { + ""variables"": { + ""Company"": """ & Company & """, + ""Message"": """ & Message & """ + }, + ""address"": { + ""msisdn"": """ & HandyNr & """ + } + }, + ""content"": { + ""templateId"": """ & Me.sms_templateID & """ + } + }") - Dim successJsonLoad As Boolean = json.Load(" + Else + successJsonLoad = json.Load(" { ""accountReference"": """ & Me.sms_Account & """, ""channels"": [ @@ -512,6 +537,7 @@ Public Class cSMS } }") + End If If (successJsonLoad <> True) Then ' MsgBox(json.LastErrorText) @@ -559,50 +585,6 @@ Public Class cSMS MsgBox("Fehler: WHATSAPP Daten wurden nicht gespeichert!") End If - - Return True - 'productTitle = json.StringOf("product.title"); - 'productBody_html = json.StringOf("product.body_html"); - 'productVendor = json.StringOf("product.vendor"); - 'productProduct_type = json.StringOf("product.product_type"); - 'productCreated_at = json.StringOf("product.created_at"); - 'productHandle = json.StringOf("product.handle"); - 'productUpdated_at = json.StringOf("product.updated_at"); - 'productPublished_at = json.IsNullOf("product.published_at"); - 'productTemplate_suffix = json.IsNullOf("product.template_suffix"); - 'productPublished_scope = json.StringOf("product.published_scope"); - 'productTags = json.StringOf("product.tags"); - 'productImage = json.IsNullOf("product.image"); - 'i = 0; - 'count_i = json.SizeOfArray("product.variants"); - 'while (i < count_i) { - ' json.I = i; - ' id = json.IntOf("product.variants[i].id"); - ' product_id = json.IntOf("product.variants[i].product_id"); - ' title = json.StringOf("product.variants[i].title"); - ' price = json.StringOf("product.variants[i].price"); - ' sku = json.StringOf("product.variants[i].sku"); - ' position = json.IntOf("product.variants[i].position"); - ' grams = json.IntOf("product.variants[i].grams"); - ' inventory_policy = json.StringOf("product.variants[i].inventory_policy"); - ' compare_at_price = json.IsNullOf("product.variants[i].compare_at_price"); - ' fulfillment_service = json.StringOf("product.variants[i].fulfillment_service"); - ' inventory_management = json.IsNullOf("product.variants[i].inventory_management"); - ' option1 = json.StringOf("product.variants[i].option1"); - ' option2 = json.IsNullOf("product.variants[i].option2"); - ' option3 = json.IsNullOf("product.variants[i].option3"); - ' created_at = json.StringOf("product.variants[i].created_at"); - ' updated_at = json.StringOf("product.variants[i].updated_at"); - ' taxable = json.BoolOf("product.variants[i].taxable"); - ' barcode = json.IsNullOf("product.variants[i].barcode"); - ' image_id = json.IsNullOf("product.variants[i].image_id"); - ' inventory_quantity = json.IntOf("product.variants[i].inventory_quantity"); - ' weight = json.IntOf("product.variants[i].weight"); - ' weight_unit = json.StringOf("product.variants[i].weight_unit"); - ' old_inventory_quantity = json.IntOf("product.variants[i].old_inventory_quantity"); - ' requires_shipping = json.BoolOf("product.variants[i].requires_shipping"); - ' i = i + 1; - '} Return True