Belge İşlemleri

CreateDocumentNoUI

  • Dönüş Tipi: COM Object (Document)
  • Parametreler:
  • - docType (String): Belge tipi
  • - voucherNo (String): Fiş numarası
  • Açıklama: UI olmadan yeni belge oluşturur

Örnek Kullanım:

Sub Makro1()
    Dim YeniDoc, DocType, FisNo
    DocType = "STOK40"
    FisNo = "FIS001"
    
    Set YeniDoc = Doc.CreateDocumentNoUI(DocType, FisNo)
    
    If Not YeniDoc Is Nothing Then
        YeniDoc.SetFieldValue "STOK40T", "KOD", 0, "STOK001"
        YeniDoc.SetFieldValue "STOK40T", "MIKTAR", 0, 100
        YeniDoc.Save_Voucher()
        Doc.MsgBox "Belge oluşturuldu ve kaydedildi"
        Set YeniDoc = Nothing
    End If
End Sub

CreateDocumentNoUI2

  • Dönüş Tipi: COM Object (Document)
  • Parametreler:
  • - docType (String): Belge tipi
  • - voucherNo (String): Fiş numarası
  • - firmCode (String): Firma kodu
  • Açıklama: UI olmadan yeni belge oluşturur (firma kodu ile)

Örnek Kullanım:

Sub Makro1()
    Dim YeniDoc, DocType, FisNo, FirmaKodu
    DocType = "STOK40"
    FisNo = "FIS001"
    FirmaKodu = "01"
    
    Set YeniDoc = Doc.CreateDocumentNoUI2(DocType, FisNo, FirmaKodu)
    
    If Not YeniDoc Is Nothing Then
        YeniDoc.SetFieldValue "STOK40T", "KOD", 0, "STOK001"
        YeniDoc.Save_Voucher()
        Set YeniDoc = Nothing
    End If
End Sub

GetDocumentNoUI

  • Dönüş Tipi: COM Object (Document)
  • Parametreler:
  • - docType (String): Belge tipi
  • - voucherNo (String): Fiş numarası
  • Açıklama: UI olmadan mevcut belgeyi yükler

Örnek Kullanım:

Sub Makro1()
    Dim MevcutDoc, DocType, FisNo
    DocType = "STOK40"
    FisNo = "FIS001"
    
    Set MevcutDoc = Doc.GetDocumentNoUI(DocType, FisNo)
    
    If Not MevcutDoc Is Nothing Then
        Dim StokKodu
        StokKodu = MevcutDoc.GetFieldValue("STOK40T", "KOD", 0)
        Doc.MsgBox "Stok Kodu: " & StokKodu
        Set MevcutDoc = Nothing
    End If
End Sub

GetDocumentNoUI2

  • Dönüş Tipi: COM Object (Document)
  • Parametreler:
  • - docType (String): Belge tipi
  • - voucherNo (String): Fiş numarası
  • - firmCode (String): Firma kodu
  • Açıklama: UI olmadan mevcut belgeyi yükler (firma kodu ile)

Örnek Kullanım:

Sub Makro1()
    Dim MevcutDoc, DocType, FisNo, FirmaKodu
    DocType = "STOK40"
    FisNo = "FIS001"
    FirmaKodu = "01"
    
    Set MevcutDoc = Doc.GetDocumentNoUI2(DocType, FisNo, FirmaKodu)
    
    If Not MevcutDoc Is Nothing Then
        Doc.MsgBox "Belge yüklendi"
        Set MevcutDoc = Nothing
    End If
End Sub

DeleteDocumentNoUI

  • Dönüş Tipi: Void
  • Parametreler:
  • - docType (String): Belge tipi
  • - voucherNo (String): Fiş numarası
  • Açıklama: UI olmadan belgeyi siler

Örnek Kullanım:

Sub Makro1()
    Dim DocType, FisNo
    DocType = "STOK40"
    FisNo = "FIS001"
    
    Doc.DeleteDocumentNoUI DocType, FisNo
    Doc.MsgBox "Belge silindi"
End Sub

DeleteDocumentNoUI2

  • Dönüş Tipi: Void
  • Parametreler:
  • - docType (String): Belge tipi
  • - voucherNo (String): Fiş numarası
  • - firmCode (String): Firma kodu
  • Açıklama: UI olmadan belgeyi siler (firma kodu ile)

Örnek Kullanım:

Sub Makro1()
    Dim DocType, FisNo, FirmaKodu
    DocType = "STOK40"
    FisNo = "FIS001"
    FirmaKodu = "01"
    
    Doc.DeleteDocumentNoUI2 DocType, FisNo, FirmaKodu
    Doc.MsgBox "Belge silindi"
End Sub

CreateDocumentUI

  • Dönüş Tipi: COM Object (Document)
  • Parametreler:
  • - docType (String): Belge tipi
  • - voucherNo (String): Fiş numarası
  • Açıklama: UI ile yeni belge oluşturur

Örnek Kullanım:

Sub Makro1()
    Dim YeniDoc, DocType, FisNo
    DocType = "STOK40"
    FisNo = "FIS001"
    
    Set YeniDoc = Doc.CreateDocumentUI(DocType, FisNo)
    
    If Not YeniDoc Is Nothing Then
        Doc.MsgBox "UI ile belge oluşturuldu"
        Set YeniDoc = Nothing
    End If
End Sub

---