#LOCAL("DocType", #Class.Alias) #LOCAL("DocName", #Class.NameOrAlias) #LOCAL("Connector", "_") #IF(#DocType EQ "CustomerOrder")#SET("EMail",#BillingAddress.EMail)#ELSE #SET("EMail",#Address.EMail)#ENDIF
#REM #ENDREM #LOCAL("DispayedOrderNo","") #LOCAL("DispayedCreationDate","") #IF(#FUNCTION("INSTANCEOF",#Object,"OrderDocument")) #SET("DispayedOrderNo", #Parent.Parent.Alias) #SET("DispayedCreationDate", #Parent.Parent.CreationDate[date]) #ELSE #SET("DispayedOrderNo", #Alias) #SET("DispayedCreationDate", #CreationDate[date]) #ENDIF #ENDLOCAL #ENDLOCAL
{To} {MandatoryStar}
{Cc} {MandatoryStar}
{Bcc} {MandatoryStar}
{Subject} {MandatoryStar}
{Attachment} {MandatoryStar} #LOCAL("OrderDocumentType", "") #IF(#DocType EQ "CustomerOrder") #LOOP(#SORT(#GREP(#Documents, "Class.Alias", #INPUT.Doc, "EQ"),"CreationDate",1),0,0) #Class.NameOrAlias#Connector#Alias #ENDLOOP #SET("OrderDocumentType", #INPUT.Doc) #ELSE #Class.NameOrAlias#Connector#Alias #SET("OrderDocumentType", #DocType) #ENDIF #LOCAL("ShowCustomerInformationPDF", 0) #WITH(#Shop)#SET("ShowCustomerInformationPDF", #GET("OrderDocumentsAttachCustomerInformationPDFTo" . #OrderDocumentType . "Email"))#ENDWITH #LOCAL("PDFWebFileName", #CustomerInformationPDFWebFileName(#Shop.Object, #LineItemContainer.LanguageID)) #IF(#ShowCustomerInformationPDF AND #DEFINED(#PDFWebFileName)) {CustomerInformation}.pdf #ENDIF #ENDLOCAL #ENDLOCAL #ENDLOCAL
#ENDLOCAL #ENDLOCAL #ENDLOCAL