separatista_com_control
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| separatista_com_control [2015/02/20 21:15] – created okkel | separatista_com_control [2018/01/02 13:27] (current) – okkel | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Separatista COM Control ==== | ==== Separatista COM Control ==== | ||
| === Examples === | === Examples === | ||
| + | == Separatista CustomerDirectDebitInitiation == | ||
| + | <code vb CustomerDirectDebitInitiation> | ||
| + | Dim qdef As QueryDef | ||
| + | Dim rst As dao.Recordset | ||
| + | Dim qupdef As QueryDef | ||
| + | Dim doc As Separatista.SeparatistaDocument | ||
| + | Dim frstpmtinf As Separatista.Element | ||
| + | Dim rcurpmtinf As Separatista.Element | ||
| + | Dim txinf As Separatista.Element | ||
| + | Dim cstmrdrctdbtinitn As Separatista.Element | ||
| + | | ||
| + | Dim vdate As String | ||
| + | Dim periode As String | ||
| + | | ||
| + | vdate = InputBox(" | ||
| + | If vdate = "" | ||
| + | | ||
| + | ' Get data from Database | ||
| + | Set qdef = CurrentDb.QueryDefs(" | ||
| + | qdef.Parameters(" | ||
| + | Set rst = qdef.OpenRecordset | ||
| + | | ||
| + | ' Personal information | ||
| + | reknaam = DLookup(" | ||
| + | reknummer = DLookup(" | ||
| + | reknummerbic = DLookup(" | ||
| + | incassocode = DLookup(" | ||
| + | periode = DLookup(" | ||
| + | | ||
| + | Set doc = New Separatista.SeparatistaDocument | ||
| + | doc.EnableAutoMagic = True | ||
| + | doc.Namespace = PAIN_008_001_02 | ||
| + | | ||
| + | Set cstmrdrctdbtinitn = doc.RootElement.CreateElementByTagName(" | ||
| + | | ||
| + | With cstmrdrctdbtinitn.CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | End With | ||
| + | | ||
| + | ' Create PaymentInformation for first sequencetype | ||
| + | Set frstpmtinf = cstmrdrctdbtinitn.CreateElementByTagName(" | ||
| + | With frstpmtinf | ||
| + | .CreateElementByTagName(" | ||
| + | | ||
| + | .CreateElementByTagName(" | ||
| + | With .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | End With | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | With .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | End With | ||
| + | End With | ||
| + | | ||
| + | ' Create PaymentInformation for recurring sequencetype | ||
| + | Set rcurpmtinf = cstmrdrctdbtinitn.CreateElementByTagName(" | ||
| + | With rcurpmtinf | ||
| + | .CreateElementByTagName(" | ||
| + | | ||
| + | .CreateElementByTagName(" | ||
| + | With .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | End With | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | With .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | End With | ||
| + | End With | ||
| + | | ||
| + | ' Create and add all DirectDebitTransactionInformations | ||
| + | If Not rst.BOF Then rst.MoveFirst | ||
| + | Do Until rst.EOF | ||
| + | If IsNull(rst![iban]) Or IsNull(rst![bic]) Then | ||
| + | msg = " | ||
| + | MsgBox msg, vbCritical + vbOKOnly, "No IBAN" | ||
| + | Else | ||
| + | ' Add to the right PaymentInformation | ||
| + | If rst![teller] = 0 Then | ||
| + | Set txinf = frstpmtinf.CreateElementByTagName(" | ||
| + | Else | ||
| + | Set txinf = rcurpmtinf.CreateElementByTagName(" | ||
| + | End If | ||
| + | With txinf | ||
| + | .CreateElementByTagName(" | ||
| + | With .CreateElementByTagName(" | ||
| + | .CurrencyValue = rst![bedrag] | ||
| + | .SetAttributeValue " | ||
| + | End With | ||
| + | With .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | End With | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | With .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | .CreateElementByTagName(" | ||
| + | End With | ||
| + | End With | ||
| + | End If | ||
| + | rst.MoveNext | ||
| + | Loop | ||
| + | | ||
| + | ' Remove empty PaymentInformations | ||
| + | If frstpmtinf.GetElementByTagName(" | ||
| + | If rcurpmtinf.GetElementByTagName(" | ||
| + | | ||
| + | doc.Save Me.Hwnd | ||
| + | </ | ||
| + | |||
| == MT940SDocument == | == MT940SDocument == | ||
| <code vb SeparatistaControl.vbs> | <code vb SeparatistaControl.vbs> | ||
separatista_com_control.1424463331.txt.gz · Last modified: 2015/02/20 21:15 by okkel