Önceki Bakiye Kuralı 2

Önceki Bakiye Kuralı (Site takipçimden)

sub ProcessEvent(App)
strDBUser = ".." ' SQL Server kullanıcı adı
strDBPass = "..*" ' SQL Server kullanıcısının şifresi
strDBServer = ".." ' SQL Server
strDBName = ".." ' Veritabanı adı
Set conn = CreateObject("ADODB.Connection")
conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" + strDBUser + ";Password=" + strDBPass + ";Initial Catalog=" + strDBName+ ";Data Source=" + strDBServer
conn.Open
Set rs = CreateObject("adodb.recordset")
rs.ActiveConnection = conn

ST_CariId = App.Doc.FieldAsString("ARP_LOGICALREF")
ST_DocNumber = App.Doc.FieldAsString("NUMBER")
ST_strQuery = "SELECT (SELECT SUM(DEBIT)-SUM(CREDIT) FROM LV_022_01_GNTOTCL WITH(NOLOCK) WHERE (CARDREF =" + ST_CariId + "AND TOTTYP = 1)) - NETTOTAL FROM LG_022_01_INVOICE WHERE FICHENO='" + ST_DocNumber+ "'"
rs.Open ST_strQuery, conn
oncekibakiye = rs.Fields(0).value

App.Doc.WriteStartElement "ADDITIONALDOCUMENTS/ADDITIONALDOCUMENT"
App.Doc.WriteElementString "ID",Replace(cstr(oncekibakiye),",",".")
App.Doc.WriteElementString "ISSUEDATE", Year(Date) & "-" & Right("0" & Month(Date),2) & "-" & Right("0" & Day(Date), 2)
App.Doc.WriteElementString "DOCUMENTTYPE", "ONCEKIBAKIYE"
App.Doc.WriteEndElement

rs.close
conn.close
App.Doc.SaveData

end sub

Önceki Bakiye Kuralı 1

Önceki Bakiye Kuralı

sub ProcessEvent(App)

ST_ClRef = App.Doc.FieldAsInteger("ARP_LOGICALREF")
ST_CHRRef = CStr(ST_ClRef)
BAKIYE = App.UQUERY_GETFLD(60,"SUM(DEBIT)-SUM(CREDIT)",24,6,FALSE,"CARDREF ="+ST_CHRRef+" AND TOTTYP = 1" )
ST_DocNumber=App.Doc.FieldAsString("NUMBER")
St_Toplam = App.UQUERY_GETFLD(14,"NETTOTAL",24,6,FALSE,"FICHENO ='"+ST_DocNumber+"'" )

ONCEKIBAKIYE= ( CDbl(BAKIYE) - CDbl( St_Toplam)) /100

App.Doc.WriteStartElement "ADDITIONALDOCUMENTS/ADDITIONALDOCUMENT"
App.Doc.WriteElementString "ID",Replace(cstr(ONCEKIBAKIYE),",",".")
App.Doc.WriteElementString "ISSUEDATE", Year(Date) & "-" & Right("0" & Month(Date),2) & "-" & Right("0" & Day(Date), 2)
App.Doc.WriteElementString "DOCUMENTTYPE", "ONCEKIBAKIYE"
App.Doc.WriteEndElement
App.Doc.SaveData
end sub

Windows 10 L2TP VPN Sunucusuna bağlanmıyor

L2TP VPN  sunucusuna diğer tüm cihazlar bağlanmasına rağmen windows 10 (sanırım 2009 ve üzeri sürümler) bağlanmıyor

Çözümü

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f

komutunu çalıştırın ve pcyi yeniden başlatım

sorun çözülecektir.

çözülmezse aşağıdaki makeleyi okuya bilirsiniz

https://www.howto-connect.com/fix-the-l2tp-connection-attempt-failed-error-windows-10/

https://social.technet.microsoft.com/Forums/en-US/15e056a2-5f59-4f73-b448-732bcfd03a82/assumeudpencapsulationcontextonsendrule-registry-setting-not-working?forum=winserverNIS

 

 

Genel kategorisine gönderildi