Logo Connect Son Bakiye Kuralı

Kural Kodu

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" )
App.Doc.WriteStartElement "ADDITIONALDOCUMENTS/ADDITIONALDOCUMENT"
App.Doc.WriteElementString "ID",Replace(cstr(BAKIYE),",",".")
App.Doc.WriteElementString "ISSUEDATE", Year(Date) & "-" & Right("0" & Month(Date),2) & "-" & Right("0" & Day(Date), 2)
App.Doc.WriteElementString "DOCUMENTTYPE", "BAKIYE"
App.Doc.WriteEndElement
App.Doc.SaveData
end sub

Xslt Kodu

<br />
<xsl:for-each select="//n1:Invoice/cac:AdditionalDocumentReference">
<xsl:if test ="cbc:DocumentType = 'BAKIYE'">
<b>Son Cari Hesap Bakiyesi : </b>
<b>
<xsl:value-of select="cbc:ID"/>
</b>
<b> TL </b>
</xsl:if>

Logo Connect Faturayı Oluşturan Kullanıcı Kuralı

sub ProcessEvent(App)
strDBUser = "..."
strDBPass = "..."
strDBServer = "..."
strDBName = "..."
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
UserRef = App.Doc.FieldAsInteger("CREATED_BY")
strQuery = "SELECT USERNAME +SPACE(1)+ USERSURNAME FROM L_CAPIUSER WHERE LOGICALREF = " ++cstr( UserRef)
rs.Open strQuery, conn
do while (rs.EOF = false)
AdiSoyadi = rs.Fields(0).value
rs.MoveNext()
loop
rs.close
conn.close
Foo = "Faturayı Oluşturan: " + AdiSoyadi
App.Doc.ModifyData "NOTES5", Foo
App.Doc.SaveData
end sub

Logo Connect Satır / Ürün Açıklamasını Yer Değiştirme Kuralı

sub ProcessEvent(App)
StokSatirlari=App.Doc.FirstChild("TRANSACTIONS.TRANSACTION")
  while StokSatirlari
   ManuelAciklama = App.Doc.FieldAsString("TRANSACTIONS.TRANSACTION.DESCRIPTION")
   if ManuelAciklama <> Empty then
    App.Doc.ModifyData "TRANSACTIONS.TRANSACTION.MASTER_DEF", ManuelAciklama
   end if
   StokSatirlari=App.Doc.NextChild
   wend
App.Doc.SaveData
end sub

Logo Connect Servkiyat Açıklaması Kural Kodu

Kural Kodu

sub ProcessEvent(App)
SEVKIYATACIKLAMA = App.Doc.FieldAsString("SHIPLOC_DEF")
if SEVKIYATACIKLAMA <> Empty Then
App.Doc.WriteStartElement "ADDITIONALDOCUMENTS/ADDITIONALDOCUMENT"
App.Doc.WriteElementString "ID", SEVKIYATACIKLAMA
App.Doc.WriteElementString "ISSUEDATE", Year(Date) & "-" & Right("0" & Month(Date), 2) & "-" & Right("0" & Day(Date), 2)
App.Doc.WriteElementString "DOCUMENTTYPE", "SEVKIYATACIKLAMA"
App.Doc.WriteEndElement App.Doc.SaveData
end if
end sub

Xslt Kodu

<xsl:for-each select="//n1:Invoice/cac:AdditionalDocumentReference">
<xsl:if test ="cbc:DocumentType = 'SEVKIYATACIKLAMA'">
<p style='margin-left: 40px;'>
<b>SEVKİYAT BİLGİSİ : </b>
<b>
<xsl:value-of select="cbc:ID"/>
</b>
</p>
</xsl:if>
</xsl:for-each>

Logo Kredi Kartı Fiş Listesi

Logo Kredi Kartı fiş listesi
Logoda Cari hesap fiş listesini aldığımızda kredi kartının detayını vermiyor
aşağıdaki sql size kredi fişinin satırlarınıda listeler


SELECT DISTINCT 

                         CTRNS.DATE_, CLCARD.CODE AS CLCARD_CODE, CLCARD.DEFINITION_ AS CLCARD_DEFINITION_, CTRNS.AMOUNT, CTRNS.LINEEXP, BANKACC.CODE AS BANKACC_CODE, 

                         BANKACC.DEFINITION_ AS BANKACC_DEFINITION_, CLFICHE.FICHENO

FROM            LG_999_01_CLFLINE AS CTRNS LEFT OUTER JOIN

                             (SELECT        LOGICALREF, FICHENO

                               FROM            LG_999_01_CLFICHE) AS CLFICHE ON CTRNS.SOURCEFREF = CLFICHE.LOGICALREF LEFT OUTER JOIN

                             (SELECT        LOGICALREF, CODE, DEFINITION_

                               FROM            LG_999_BANKACC) AS BANKACC ON CTRNS.BANKACCREF = BANKACC.LOGICALREF LEFT OUTER JOIN

                             (SELECT        LOGICALREF, CODE, DEFINITION_

                               FROM            LG_999_CLCARD) AS CLCARD ON CTRNS.CLIENTREF = CLCARD.LOGICALREF

WHERE        (CTRNS.TRCODE = 70) AND (CTRNS.MODULENR = 5) AND (CTRNS.CANCELLED = 0)