;** ET_0260 ********************************************************************
;** Imprime Etiqueta Personalizada                         ** UAI TEXTIL **    *
;*******************************************************************************
;Autor           : Vise Informatica (VISERP)
;Desenvolvido  em: 09/11/2011 por Bruno Carvalho
;Alterado      em:   /  /     por 
;Motivo Alteracao: 

;*******************************************************************************
;* Rotina para Impressao do Relatorio                                          *
;*******************************************************************************
Proc IMPETIQUETA()
Private Wh

If VSDGQUAN = blanknum()
   Then VSDGQUAN = 1
EndIf

For Wh From 1 To VSDGQUAN

    Print File ARQIMP CI_10CPP
    Print File ARQIMP "\n\n"
    Print File ARQIMP "\014" 
    
    Print File ARQIMP "\014" 
    Print File ARQIMP "\027E"+" COD: "+"\027F"+VSDGCOD+Spaces(01)+   
                      "\027E"+"PRECO: "+"\027F"+"\n" ;Substr(Format("W9.2,EIC",VSDGPRECO),1,9)+"\n" 
    
    Print File ARQIMP "\014" 
    Print File ARQIMP "\027E"+" ART: "+"\027F"+VSDGITEM+Spaces(01)+"\n"
     
    Print File ARQIMP "\014" 
    Print File ARQIMP "\027E"+"COMP: "+"\027F"+SubStr(VSDGNOMITEM,1,16)+"\n"
    Print File ARQIMP "\014"  
    Print File ARQIMP Spaces(06)+SubStr(VSDGNOMITEM,17,Len(VSDGNOMITEM))+"\n" 

    Print File ARQIMP "\014"  
    Print File ARQIMP "\027E"+"NOME: "+"\027F"+SubStr(VSDGNOME,1,16)+"\n"    
    Print File ARQIMP "\014" 
    Print File ARQIMP Spaces(06)+SubStr(VSDGNOME,17,Len(VSDGNOME))+"\n" 

    Print File ARQIMP "\014"  
    Print File ARQIMP "\027E"+" REN: "  +"\027F"+Substr(VSDGREND,1,5)+"KG"+"\n" 
                      
    Print File ARQIMP "\014"                    
    Print File ARQIMP "\027E"+" PCA: "+"\027F"+Substr(VSDGPEC,1,5)+"MT"+
                      "\027E"+" LAR: "+"\027F"+Substr(VSDGLARG,1,4)+"\n" 

    Print File ARQIMP CI_10CPP
    Print File ARQIMP CI_6LPP    
    
    If Wh = VSDGQUAN
       Then QuitLoop
       Else Print File ARQIMP "\n\n\n\n\n\n\n\n"
    EndIf
    
EndFor

EndProc ;IMPETIQUETA()
;*******************************************************************************
;* Rotina Principal                                                            *
;*******************************************************************************
ARQIMP=PrivDir()+"ET_0260.Txt"
If IsFile(ARQIMP)
   Then Deleta_Arquivo(ARQIMP)
EndIf
AGUARDE("Imprimindo Etiqueta ...")

IMPETIQUETA()

;---- Imprime Arquivo Impressao ------------------------------------------------
ImpriArq(ARQIMP)

Release Vars VALOR
Release Procs IMPETIQUETA

LIMPAGUARDE()