1 Then Msgbox "Selecioanar un documento a la vez", 64, "Attencion" Exit Sub End If Set doc=coll.GetFirstDocument If doc.O_Preventivo(0)="SI" Then Msgbox "Esto no es un pedido, no puedo generar la factura.", 64, "ATTENCION !" Exit Sub End If If doc.O_Evaso(0)="SI" Then Msgbox "Pedido ja Facturado. ", 64, "ATTENCION !" Exit Sub End If Set doc2=db.createdocument doc2.Form="Fattura" Call doc.CopyAllItems( doc2 ) doc2.Codice_1="" Set uidoc = ws.EditDocument( True , doc2) Call uidoc.refresh End Sub HELP PLEASE.">
> |  
LS HELP
Zeus
So che siamo in vacanza o quasi (io no :-( ) , ma vi chiedo per favore un aiutone...che chissa\' per voi sia un aiutino (sviluppare non e\' il mio campo)

allora...: il seguente script duplica un documento (ordine) , lo numera , salva e lancia un secondo script che genera la fattura "creafattrect"

Sicuramente pero\' lo script creafactrect contiene un errore nelle dichiarazioni dim o qualcosa di simile. (infatti lo script originale , selezionando il documento dalla vista, funziona)

Sub Click(Source As Button)
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim coll As NotesDocumentCollection
Dim doc As NotesDocument
Dim doc2 As NotesDocument
Dim uidoc As NotesUIDocument

Set db=s.CurrentDatabase
Set coll=db.UnprocessedDocuments
Set doc=coll.GetFirstDocument
Set doc2=db.createdocument
doc2.Form="Ordine"

Call doc.CopyAllItems( doc2 )
doc2.Codice_1=""
doc2.O_Data=Today()
doc2.O_Evaso="NO"
doc2.O_RECT="SI"
Set uidoc = ws.EditDocument( True , doc2)
Call uidoc.refresh
Call uidoc.save

Call facturarectif

\'Call uidoc.close


End Sub

il secondo "errato !!! " :

Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim coll As NotesDocumentCollection
Dim doc As NotesDocument
Dim doc2 As NotesDocument
Dim uidoc As NotesUIDocument

Stop

Set db=s.CurrentDatabase
Set coll=db.UnprocessedDocuments

If coll.count>1 Then
Msgbox "Selecioanar un documento a la vez", 64, "Attencion"
Exit Sub
End If
Set doc=coll.GetFirstDocument

If doc.O_Preventivo(0)="SI" Then
Msgbox "Esto no es un pedido, no puedo generar la factura.", 64, "ATTENCION !"
Exit Sub
End If

If doc.O_Evaso(0)="SI" Then
Msgbox "Pedido ja Facturado. ", 64, "ATTENCION !"
Exit Sub
End If


Set doc2=db.createdocument
doc2.Form="Fattura"

Call doc.CopyAllItems( doc2 )
doc2.Codice_1=""
Set uidoc = ws.EditDocument( True , doc2)
Call uidoc.refresh
End Sub

HELP PLEASE.

Zeus


You are here LS HELP - Zeus -
    re : LS HELP - Zeus -
    re : LS HELP - cyberflaz -
        re... : LS HELP - Zeus -
    re : LS HELP - Zeus -
    re : LS HELP - Zeus -
    re : LS HELP - cyberflaz -