New FWH 21.06

Re: New FWH 21.06

Postby Antonio Linares » Fri Jul 30, 2021 10:28 pm

Jose Luis,

Ya hay un nuevo build de FWH 21.06 que corrige el pintado de los bordes de los items al moverlos o redimensionarlos

https://github.com/FiveTechSoft/FWH_tools/blob/master/FWEasyReport.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FWH 21.06

Postby Silvio.Falconi » Sat Jul 31, 2021 8:48 am

Antonio Linares wrote:Silvio,

> have you ever tried to draw the boxes and lines and move them on the sheet?

Fixed. Please download and test a new FWH 21.06 build

many thanks for your feedback


Antonio,

I download this morning and tried

Image

when you move an object the dots are in the same position ok but there are still many errors to correct first of all the possibility of having a zoom of the area only,
even if I increase the xgrid does not help me to build a model exactly where I want it

then I tried the Preview and I have this

Image

Antonio
why not use the c5report classes what's the problem? c5report classes work perfectly,
we have become obsessed with ER (Otto's obsessed) just insert the c5report engine in every area of ER and we would have a powerful report designer!!!


then if i'm forced it's better to use charles' MyRpt worked better than ER
that is what I'm trying to make you understand that ER is all wrong, I have to load 20 types of fonts first, 20 colors first but why?

Er only has the good subdivision into areas
c5 report has a good graphic engine
let's combine both of them and create a powerful report designer
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Re: New FWH 21.06

Postby Antonio Linares » Sat Jul 31, 2021 9:25 am

Silvio,

Seriously, I think you are the right one to build it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FWH 21.06

Postby joseluispalma » Sat Jul 31, 2021 10:47 am

Antonio,

I still get the same error: xxx is not a valid file.
joseluispalma
 
Posts: 109
Joined: Mon Apr 30, 2012 9:10 am

Re: New FWH 21.06

Postby cnavarro » Sat Jul 31, 2021 12:11 pm

Or, you may simply have to enter the Extras - Databases option, and select the path corresponding to the location of the database in your installation.
Keep in mind that the examples that came in the original version have not been deleted to check their compatibility, which does not mean that it does not work, it is simply possible that there is an example that gives a problem like the one I described before.
Please, try another example and report the file with which you had problems to remove it from the installation
Thanks

O, es posible que simplemente tenga que entrar en la opción Extras - Databases, y seleccionar el path correspondiente a la ubicación de la base de datos en su instalación.
Tengan en cuenta que no se han borrado los ejemplos que venían en la versión original para comprobar su compatibilidad, lo que no significa que no funcione, simplemente es posible que haya algún ejemplo que dé algún problema como el que he descrito antes.
Por favor, prueben con otro ejemplo e informe del fichero con el que ha tenido problemas para eliminarlo de la instalación
Gracias
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: New FWH 21.06

Postby joseluispalma » Sat Jul 31, 2021 12:23 pm

No puedo abrir ninguno de los ejemplos, ni crear tampoco un nuevo informe.

Por favor, prueba a descargarte el fichero y lo descomprimes en c:\downloads y verás que no se puede hacer nada.

Muchas gracias.
joseluispalma
 
Posts: 109
Joined: Mon Apr 30, 2012 9:10 am

Re: New FWH 21.06

Postby cnavarro » Sat Jul 31, 2021 1:00 pm

joseluispalma wrote:No puedo abrir ninguno de los ejemplos, ni crear tampoco un nuevo informe.

Por favor, prueba a descargarte el fichero y lo descomprimes en c:\downloads y verás que no se puede hacer nada.

Muchas gracias.


Jose Luis, try to download this EXE and run the application and tell me if it works for you. Be careful, in any of the examples you will have to check in EXTRAS - DATABASES that the paths referenced by the databases that this example uses correspond to the path in which you have installed the application. If you don't change them, the reports will obviously not work. As I have also said before, examples that I have used for testing are attached so it is possible that some do not work.
https://bitbucket.org/fivetech/fivewin- ... nstall.zip
I look forward to your feedback

Jose Luis, prueba a descargar este EXE y ejecutar la aplicación y dime si te funciona. Ojo, en cualquiera de los ejemplos tendrás que comprobar en EXTRAS - DATABASES que los paths a los que hace referencia de las bases de datos que usa ese ejemplo se corresponden con el path en el que has instalado la aplicación. Si no los cambias, los reportes no funcionarán evidentemente. Como también he dicho antes, se adjuntan ejemplos que he usado para las pruebas por lo que es posible que alguno no funcione.
https://bitbucket.org/fivetech/fivewin- ... nstall.zip
Quedo a la espera de tu feedback
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: New FWH 21.06

Postby joseluispalma » Sat Jul 31, 2021 3:55 pm

Sí, esta versión funciona.

Pero el mover los objetos no sigue siendo preciso, para poder alinearlos por ejemplo.

Gracias.
joseluispalma
 
Posts: 109
Joined: Mon Apr 30, 2012 9:10 am

Re: New FWH 21.06

Postby Antonio Linares » Sat Jul 31, 2021 4:25 pm

Jose Luis,

Acabo de probar lo que comentas y se pueden alinear perfectamente, es más,
solo tienes que inspeccionar las propiedades de un item y ponerle las coordenadas exactas que quieras.

Pero que esto no hace falta para alinear un item con otro. Con el ratón es suficiente.

Si puedes poner un GIF animado para que veamos lo que comentas, ayudaría, gracias
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FWH 21.06

Postby Antonio Linares » Sat Jul 31, 2021 5:23 pm

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FWH 21.06

Postby Silvio.Falconi » Sat Jul 31, 2021 6:21 pm

Antonio, ¿un ejemplo para crear etiquetas postales con EasyReport con imágenes y códigos de barras?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Re: New FWH 21.06

Postby Silvio.Falconi » Sat Jul 31, 2021 6:26 pm

Antonio,

Image




en la factura tengo que crear además del cuerpo de los artículos tengo que construir el castillo de los ivas, tributable y generalmente en cada factura hay un castillo de cinco de cinco o seis líneas,

Image

Tengo que ingresar este resumen de IVA, el IVA para cada grupo de artículos se separa y se agrega a las cantidades imponibles del mismo código de IVA
desafortunadamente en Italia no es fácil construir una factura como la entiende, hay diferentes de su país

en la antigüedad el autor de EasyReport Timm me dijo que podría haberlo hecho,

porque un área no se puede dividir en dos áreas específicas porque en esa caja donde tengo que insertar el castillo de ivas
hay un área de bucle (do while) al lado hay otra área normal por esta razón Timm me dijo que esto no era posible y que lo crearía en el futuro




puede darme la dirección correcta.

la figura que estás viendo fue construida por mí con la clase tprinter
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Re: New FWH 21.06

Postby Otto » Sat Jul 31, 2021 7:58 pm

Hello Silvio,
here you have an example how you can handle IVA and Total.

Best regards,
Otto

Image

Image



Code: Select all  Expand view

METHOD RgFuss()
    local cKurtaxe          := ""
    local cTeilzhg          := ""
    local cAnZHG            := ""
    local cRgEnd1               := ""
    local cRgEnd2               := ""
    local nNetto                := 0
    local aID_Strings       := {}
    local aID                   := {}
    local aStrings          := {}
    local nSummeMWST            := 0
    local nSummeBrutto      := 0
    local nSummeNetto       := 0

    *----------------------------------------------------------
    
 
        nSummeNetto     :=      ::s_WERT_ERM_1 / 110 * 100  + ::s_WERT_NORM  / 120 * 100  + ::s_WERT_ERM_2 / (100 + Setup():nMWST3 ) * 100 + ::s_WERT_NULL
            nSummeBrutto    :=      ::s_WERT_ERM_1 + ::s_WERT_NORM + ::s_WERT_ERM_2 + ::s_WERT_NULL
            nSummeMWST      :=      nSummeBrutto - nSummeNetto
       
            aID_Strings := {;
               { "RGBetrag",                 101, ALLTRIM(transform( ::rgsumm,       "999,999.99" ) ) }, ;                                                            
                { "Rabatt",                  105, ALLTRIM(transform( ::rabattSumm , "999,999.99" ) ) }, ;                                                            
               { "Teilzahlung",              102, cTeilzhg }, ;                                                                                          
               { "Anzahlung",            103, cAnZHG }, ;                                                                                          
               { "Total",                    104, ALLTRIM(transform( ::rgsumm - ::nTeilZhgSumme - (::nAnZhgSumme) ,"999,999.99")) }, ;
               { "Kurtaxe",              601, cKurtaxe}, ;  
               { "Bemessungsgr 10% ",   1010, transform( ::s_WERT_ERM_1 / 110 * 100   , "999,999.99") }, ;
               { "Bemessungsgr 20%",    1020, transform( ::s_WERT_NORM  / 120 * 100   , "999,999.99") }, ;                                                              
               { "Bemessungsgr " + ALLTRIM( STR( Setup():nMWST3 ) ) + "%"1013, transform( ::s_WERT_ERM_2 / (100 + Setup():nMWST3 ) * 100   , "999,999.99") }, ;              
                { "Bemessungsgr  0%",   1000, transform( ::s_WERT_NULL   ,  "999,999.99") },;  
               { "Betrag  0%",          1100, transform( ::s_WERT_NULL , "999,999.99") } ,;                                                                                    
               { "Betrag 10% ",         1110, transform( ::s_WERT_ERM_1, "999,999.99") }, ;                                                          
               { "Betrag 20%",          1120, transform( ::s_WERT_NORM,     "999,999.99") }, ;                                                              
               { "Betrag " + ALLTRIM( STR( Setup():nMWST3 ) ) + "%",            1113, transform( ::s_WERT_ERM_2, "999,999.99") }, ;                                                            
               { "MWSt 10% ",               1310, transform( ::s_WERT_ERM_1 - ::s_WERT_ERM_1 / 110 * 100  ,"999,999.99") }, ;                                                          
               { "MWSt 20%",                1320, transform( ::s_WERT_NORM  - ::s_WERT_NORM  / 120 * 100  ,"999,999.99") }, ;                                                              
               { "MWSt " + ALLTRIM( STR( Setup():nMWST3 ) ) + "%",              1313, transform( ::s_WERT_ERM_2 - ::s_WERT_ERM_2 / (100 + Setup():nMWST3 ) * 100  ,"999,999.99") } , ;  
                { "Summe netto",            5000, transform( nSummeNetto, "999,999.99") }, ;                                                          
               { "Summe MWST",          5001, transform( nSummeMWST,    "999,999.99") }, ;                                                              
               { "Summe Brutto",            5002, transform( nSummeBrutto, "999,999.99") },;
               { "QRCode",                 888,     ::cQRDatei } }                                                                  
           
                AEval( aID_Strings, { |a|  AADD( aID, a[2] ),  AADD( aStrings, a[3] ) } )
       
                PRINTAREA 18 OF ::oVrd ;
                    ITEMIDS  aID;
                    ITEMVALUES aStrings
   

        cRgEnd1 := left(::oRechnung:cEndtext1,(len(::oRechnung:cEndtext1)-120))
        cRgEnd2 := right(::oRechnung:cEndtext1,120)

      //Print order footer on last page
      PRINTAREA 5 OF ::oVrd ;
         ITEMIDS    { 101, 102, 700 } ;
         ITEMVALUES { ALLTRIM( cRgEnd1 ),;
         ALLTRIM(cRgEnd2),;
         "ID: 200" }

 RETURN nil
//----------------------------------------------------------------------------//
 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: New FWH 21.06

Postby leandro » Sat Jul 31, 2021 11:09 pm

Buenas tardes para todos

Nos gusta muchísimo Easy Report, lo usamos para crear todos nuestros reportes, hasta el momento hemos logrado crear todos los formatos de factura que hemos necesitado; uno de los mas complejos es el de las notarias.

Es cierto que hay que hacer algunos ajustes, pero desde mi punto de vista ER es una super herramienta. Gracias Timm :D

Image

Code: Select all  Expand view

********************************************************************************
METHOD imprimeFactNotaria() CLASS cFact
local oReport,Pagina:=nLinea := 1
local vArea := 0
local aAreaItem,aAreaSeri,aAreaTota,vFactor
local vCanti:=0; local vSubto:=0; local vVrIva:=0; local vTotal:=0; local nTNtles:=0
local nTRecud:=0; local nTNtiva:=0; local nTNtsub:=0
local vEfect:=0
local cNombrePDF := ::cRutaPDF+Retorna_Caracter(::hEncabezado["numero"])+".pdf"
local aTiposRet := {}
local aValorRet := {}
local aNombrRet := {}
local nLargo := 40
local aControValFoot := {0,0,0}

*/DEFINIMOS AL AREA DE LOS ITEMS*/
local area := hash()
area["FC"] := 1
area["RM"] := 2
area["FP"] := 3

//TPrinter():lUseHaruPDF := .t.

if Empty(::cPreterminada)
    ::cPreterminada := GetDefaultPrinter()
endif

if Empty(::hOtros["rutavrd"])
    Msginfo("Falta Por Definir Ruta Reporte","Error Datos")
else

    uFec:=dtoc(date())
    uTim:=subs(time(),1,8)

    //BUSCAMOS EL NOMBRE DEL VENDEDOR
    oVnr:= cBusc():New(::oCnx,"vendedores")
    oVnr:solodatos(::hSucursal["idvendedor"])
    vTNoTer := oVnr:hRetorna["nombre"]
   
    if ::hEncabezado["fecha"]#::hEncabezado["fvence"]
        cFormaPago := "CRÉDITO"
    else
        cFormaPago := "CONTADO"
    endif
    nDias := ::hEncabezado["fvence"]-::hEncabezado["fecha"]
   
    if ::lPrevisual
        EASYREPORT oVRD NAME ::hOtros["rutavrd"] TO ::cPreterminada PREVIEW (.T.) MODAL
    else
        if ::lPdf
            EASYREPORT oVRD NAME ::hOtros["rutavrd"] TO ::cPreterminada PREVIEW (.F.) FILE cNombrePDF
        else
            EASYREPORT oVRD NAME ::hOtros["rutavrd"] TO ::cPreterminada PREVIEW (.F.)
        endif   
    endif

        IF oVRD:lDialogCancel = .T.
        RETURN( .F. )
        ENDIF
       
        //RECUPERAMOS LA INFORMACIÓN ADICIONAL TURNO DE LA FACTURA 
        oVar   :=   "SELECT * FROM "+oLamcla:tMoad+" WHERE itemfa="+cValtoChar(::hOtros["id_factura"])+;
                    " AND titulo LIKE 'Turno%'"
        oRsTu := FW_OPENRECORDSET(oCnFtr,oVar,adLockOptimistic,adOpenKeyset)       
        if oRsTu:RecordCount()!=0
            oRsTu:MoveFirst()
            cAdTur := alltrim( oRsTu:Fields( "valor" ):Value )
        else
            cAdTur := ""
        endif
        oRsTu:close()          
       
        PRINTAREA 1 OF oVRD;
        ITEMIDS    { 161,162,163,164,165,166,190,191,170,171,172,173,101,102,103,104,105,106,107,108,109,174,175,176,177,178 };
        ITEMVALUES {alltrim(oLamcla:vGnom),;
                    "NIT: "+alltrim(oLamcla:vGnit)+" - "+alltrim(oLamcla:vGdig),;
                    "REGIMEN COMUN",;
                    "Dirección: "+if(nulo(oLamcla:vDire),space(0),oLamcla:vDire),;
                    "Teléfono: "+if(nulo(oLamcla:vTele),space(0),alltrim(oLamcla:vTele)),;
                    alltrim(::hOtros["resolucion"]),;
                    alltrim(cValtoChar(::hEncabezado["numero"])) ,;
                    alltrim(::hOtros["prefijo"]),;
                    alltrim(dtoc(::hEncabezado["fecha"])),;
                    subs(time(),1,8),;
                    alltrim(dtoc(::hEncabezado["fvence"])),;
                    alltrim(cFormaPago),;
                    alltrim(cValtoChar(::hEncabezado["nit"])),;
                    alltrim(::hTercero["razonsocial"]),;
                    subs(alltrim(::hSucursal["direccion1"]),1,35),;
                    alltrim(::hSucursal["movil"]),;
                    alltrim(::hSucursal["ciudad"]),;
                    alltrim(cValtoChar(::hSucursal["idvendedor"])),;
                    alltrim(vTNoTer),;
                    alltrim(cValtoChar(::hOtros["telefono2"])),;
                    alltrim(cValtoChar(::hOtros["telefono"])),;
                    alltrim(cValtoChar(nDias)+" días"),;
                    alltrim(cValtoChar(::hOtros["ubica1"])),;
                    alltrim(::hSucursal["emailfe"]),;
                    if(!Empty(cAdTur),"TURNO : "+cAdTur,""),;
                    alltrim(cValtoChar(::hEncabezado["ordencompra"]));
                    }
       
        //PRIMERO LANZAMOS LOS DATOS DE LOS COMPARECIENTES
        oVar   :=   "SELECT CMP.*,CONCAT(TER.t_razons,' ',TER.t_prinom,' ',TER.t_segnom,' ',"+;
                    "TER.t_priape,' ',TER.t_segape) AS nombre,TER.t_tipote FROM "+oLamcla:tMocm+" CMP LEFT JOIN "+;
                    oLamcla:tTerc+" TER ON CMP.tercero=TER.t_tercer WHERE CMP.itemfa="+cValtoChar(::hOtros["id_factura"])
        oRsCm := FW_OPENRECORDSET(oCnFtr,oVar,adLockOptimistic,adOpenKeyset)       
        oRsCm:MoveFirst()
        Do While !oRsCm:Eof()
            PRINTAREA 2 OF oVRD ;
            ITEMIDS    { 201 , 202 , 203 , 204 } ;
            ITEMVALUES { alltrim(oRsCm:Fields( "nombre" ):Value),;
                         alltrim(oRsCm:Fields( "tercero" ):Value),;
                         alltrim(oRsCm:Fields( "participa" ):Value),;                      
                         alltrim(cTipoNombre( oRsCm:Fields( "t_tipote" ):Value ) );                    
                        }
            oRsCm:MoveNext()
        EndDo
        oRsCm:close()      

        //CAMBIAMOS EL ALTO DEL AREA
        oVRD:aAreaheight[2] := 3
       
        //LUEGO LA INFORMACION ADICIONAL SOBRE EL PROYECTO
        oVar   :=   "SELECT * FROM "+oLamcla:tMoad+" WHERE itemfa="+cValtoChar(::hOtros["id_factura"])+;
                    " AND titulo LIKE 'Proyecto%'"
        oRsPr := FW_OPENRECORDSET(oCnFtr,oVar,adLockOptimistic,adOpenKeyset)   
        if oRsPr:RecordCount()!=0
            oRsPr:MoveFirst()
            nCnAd := 1
            Do While !oRsPr:Eof()
           
                aIdRep := { 201 , 205 }
                aIdVal := { if(nCnAd=1,alltrim(oRsPr:Fields( "titulo" ):Value ),""),;
                             alltrim(oRsPr:Fields( "valor" ):Value);
                            }

                oVRD:AreaStart( 2 , .T. , aIdRep , aIdVal)
                oItem := oVRD:GetItem( 2, 205 )
                oItem:nColtext := 3
                oVRD:PrintArea( 2 )

                oRsPr:MoveNext()
                nCnAd++
            EndDo
        endif
        oRsPr:close()

        //LUEGO LA INFORMACION ADICIONAL SOBRE EL ACTO DEL PROYECTO
        oVar   :=   "SELECT * FROM "+oLamcla:tMoad+" WHERE itemfa="+cValtoChar(::hOtros["id_factura"])+;
                    " AND titulo LIKE 'Acto%'"
        oRsPr := FW_OPENRECORDSET(oCnFtr,oVar,adLockOptimistic,adOpenKeyset)       
        if oRsPr:RecordCount()!=0
            oRsPr:MoveFirst()
            nCnAd := 1
            Do While !oRsPr:Eof()
                PRINTAREA 2 OF oVRD ;
                ITEMIDS    { 201 , 205 } ;
                ITEMVALUES { if(nCnAd=1,alltrim(oRsPr:Fields( "titulo" ):Value ),""),;
                             alltrim(oRsPr:Fields( "valor" ):Value);
                            }
                oRsPr:MoveNext()
                nCnAd++
            EndDo
        endif
        oRsPr:close()
       
        //IMPRESION DEL AREA 3
        //SI HAY REGISTROS EN LA INFORMACION DE LOS ACTOS HACEMOS LA IMPRESIÓN DE LAS AREAS
        nActos := 0
        FOR z:=1 TO len(::detalle)
            if ::detalle[z]["es_acto"] == "S"
                nActos++
            endif
        NEXT
        if nActos!=0
       
            PRINTAREA 3 OF oVRD
            //LUEGO LANZAMOS LOS DATOS DE LOS ACTOS
            FOR i:=1 TO len(::detalle)

                if ::detalle[i]["es_acto"] == "S"

                    nTNtles := nTNtles + ::detalle[i]["subtotal"] + ::detalle[i]["iva"] 
                    nTNtiva := nTNtiva + ::detalle[i]["iva"]
                    nTNtsub := nTNtsub + ::detalle[i]["subtotal"]
               
                    PRINTAREA 4 OF oVRD ;
                    ITEMIDS    { 401 , 402 , 403 , 404 , 405 , 406 } ;
                    ITEMVALUES { alltrim( ::detalle[i]["idproducto"] ),;
                                 transform( ::detalle[i]["base"] , oLamcla:PIC7 ),;
                                 transform( ::detalle[i]["total"] , oLamcla:PIC7 ),;                       
                                 transform( ::detalle[i]["iva"] , oLamcla:PIC7 ),;                     
                                 transform( ::detalle[i]["porciva"] , oLamcla:PIC7 ),;                     
                                 transform( ::detalle[i]["subtotal"] , oLamcla:PIC7 );                     
                                }  

                endif
            NEXT
           
            nTopArea4 := oVRD:aAreaTop[3]

            //TOTALES DERECHOS NOTARIALES
            PRINTAREA 5 OF oVRD ;
            ITEMIDS    { 501 , 502 , 503 } ;
            ITEMVALUES { transform( nTNtles , oLamcla:PIC7 ),;
                         transform( nTNtiva , oLamcla:PIC7 ),;
                         transform( nTNtsub , oLamcla:PIC7 ) }

            //SI NO HAY ACTOS CAMBIAMOS EL TITULO DE LA SECCION DE ITEMS
            //SE VE REFLEJADO EN EL AREA 6 QUE SIEMPRE SE DEBE ENVIAR MINIMO UN ITEM
            cTtSinActos := "GASTOS ESCRITURACIÓN"
            cTtSinActo2 := "TOTAL ESCRIT."
        else
            cTtSinActos := "GASTOS VARIOS"
            cTtSinActo2 := "TOTAL VARIOS"
           
            nTopArea4 := oVRD:aAreaTop[3]
        endif

        //IMPRESION DEL AREA 6
        PRINTAREA 6 OF oVRD ;
        ITEMIDS { 601 } ITEMVALUES { cTtSinActos }

        //IMPRESION DE LOS GASTOS DE ESCRITURACION
        nLargo := 45
        FOR i:=1 TO len(::detalle)

            if ::detalle[i]["es_acto"] == "N"   
               
                //DESDE AQUI ES EL CODIGO DE HACE LA MAGIA DE IMPRIMIR CAMPOS "MEMO"
                //ESTO FUE LO QUE NOS ENVIO ARMANDO ESTRADA
                nLineas := MLCOUNT(ALLTRIM(::detalle[i]["nombreproducto"]),nLargo)
                FOR nLoop := 1 TO nLineas
                    cDes    := MEMOLINE(ALLTRIM(::detalle[i]["nombreproducto"]),nLargo,nLoop)
                    IF nLoop == 1
                   
                   
                        PRINTAREA 7 OF oVRD ;
                        ITEMIDS {   701,702,703,;
                                    704,705,706,;
                                    707,708,709,710,711} ;
                        ITEMVALUES  {   str(::detalle[i]["id"]),;
                                        subs(alltrim(::detalle[i]["idproducto"]),1,8),;
                                        alltrim(cDes),;
                                        transform(::detalle[i]["cantidad"],"99999"),;
                                        transform(::detalle[i]["precio"],"999,999,999"),;
                                        transform(::detalle[i]["subtotal"],"999,999,999"),;
                                        transform(::detalle[i]["iva"],"999,999,999"),;
                                        transform(::detalle[i]["total"],"999,999,999"),;
                                        transform(::detalle[i]["porcdcto"],"99")+"%",;
                                        alltrim(str(i)),;
                                        transform(::detalle[i]["porciva"],"99")+"%";
                                    }                  
               
                    ELSE
                        PRINTAREA 7 OF oVRD ;
                        ITEMIDS {703} ;
                        ITEMVALUES  { alltrim(cDes) }
                    ENDIF

                NEXT   
               
                //AQUI TERMINA LO DE ARMANDO
                vCanti := vCanti + ::detalle[i]["cantidad"]
                vSubto := vSubto + ::detalle[i]["subtotal"]
                vVrIva := vVrIva + ::detalle[i]["iva"]
                vTotal := vTotal + ::detalle[i]["subtotal"] + ::detalle[i]["iva"]
               
            endif

        NEXT
       
       
        //AREA DE LOS TOTALES
        PRINTAREA 8 OF oVRD ;
        ITEMIDS { 801,802,803,804,805} ;
        ITEMVALUES  {   transform(vCanti,"99999"),;
                        transform(vSubto,"999,999,999"),;
                        transform(vVrIva,"999,999,999"),;
                        transform(vTotal,"999,999,999"),;
                        cTtSinActo2 ;
                    }   

        //SE IMPRIME LOS RECAUDOS A TERCEROS
        oVar   :=   "SELECT MRT.*,RTC.codigo,RTC.descripcion FROM "+oLamcla:tMore+;
                    " MRT LEFT JOIN "+oLamcla:tRete+" RTC ON MRT.id_retencion=RTC.id_retencion"+;
                    " WHERE MRT.itemfa="+cValtoChar(::hOtros["id_factura"])
        oRsRt := FW_OPENRECORDSET(oCnFtr,oVar,adLockOptimistic,adOpenKeyset)
        oRsRt:MoveFirst()
        //ANTES DE IMPRIMIR LAS AREAS DE LOS RECAUDOS A TERCEROS VERIFICAMOS QUE TENGAN ALGUN VALOR
        nTRecud := 0
        nTRec := 0
        Do While !oRsRt:Eof()
            nTRec := nTRec + oRsRt:Fields( "valor" ):Value
            oRsRt:MoveNext()
        EndDo
        if nTRec != 0

            //AREA DEL TITULO DE LOS RECAUDOS A TERCEROS
            oVRD:aAreaTop[9] := nTopArea4
            PRINTAREA 9 OF oVRD
       
            oRsRt:MoveFirst()
            Do While !oRsRt:Eof()
           
                nTRecud := nTRecud + oRsRt:Fields( "valor" ):Value
           
                PRINTAREA 10 OF oVRD ;
                ITEMIDS    { 1001 , 1002 , 1003 } ;
                ITEMVALUES { alltrim( oRsRt:Fields( "descripcion" ):Value ),;
                             alltrim( oRsRt:Fields( "codigo" ):Value ),;
                             transform( oRsRt:Fields( "valor" ):Value , oLamcla:PIC7 );                    
                            }
                oRsRt:MoveNext()
            EndDo
            oRsRt:close()   

            //AREA DE LOS TOTALES DE LOS RECAUDOS A TERCEROS
            PRINTAREA 11 OF oVRD ;
            ITEMIDS { 1101} ;
            ITEMVALUES  { transform( nTRecud,oLamcla:PIC7 ) }
       
        endif

        ::hOtros["totalfctra"] := vSubto+nTRecud+nTNtsub+vVrIva+nTNtiva 

        //LOS TOTALES DE LA FACTURA Y LAS OBSERVACIONES
        vLetras := UPPER(LetrasDecimales(  ::hOtros["totalfctra"] , ::hOtros["dc_div"] ,;
                            ::hOtros["cd_div"] , ::oCnx ))
                           
        //RECUPERAMOS LA INFORMACIÓN CUANDO HAY CREDITO EN LA FACTURA 
        oVar   :=   "SELECT * FROM "+oLamcla:tMoad+" WHERE itemfa="+cValtoChar(::hOtros["id_factura"])+;
                    " AND titulo LIKE 'Cr%'"
        oRsCr := FW_OPENRECORDSET(oCnFtr,oVar,adLockOptimistic,adOpenKeyset)
        nRegFtCre := oRsCr:RecordCount()
        if nRegFtCre!=0
            aControValFoot := {}
            oRsCr:MoveFirst()
            aCrAbo := DescomponeCadena(alltrim(oRsCr:Fields( "titulo" ):Value ),":")
            cCrAbo := alltrim(aCrAbo[2])
            AADD(aControValFoot,val(cCrAbo))
            //nCrAbo := val(cCrAbo)
            cCrCre := alltrim(oRsCr:Fields( "valor" ):Value )
            AADD(aControValFoot,val(cCrCre))
            //nCrCre := val(cCrCre)
            cCrAnt := alltrim(oRsCr:Fields( "otros" ):Value )
            AADD(aControValFoot,val(cCrAnt))
            //nCrAnt := val(cCrAnt)
   
            //AJUSTAMOS LA DIFERENCIA ENTRE LO QUE VIENE Y EL VALOR TOTAL DE LA FACTURA
            nPosUlDifCero := 1
            nSumaTres := 0
            //RECOREMOS EL ARRAY PARA IDENTIFICAR SI HAY DIFERENCIA
            FOR s:=1 TO len(aControValFoot)
                if aControValFoot[s] != 0
                    nPosUlDifCero := s
                endif
                nSumaTres += aControValFoot[s]
            NEXT
   
            //SI HAY DIFERENCIA AJUSTAMOS EL VALOR TOTAL EN EL ULTUMO VALOR DIFERENTE DE 0
            if ::hOtros["totalfctra"] != nSumaTres
                nDifeTot :=  ::hOtros["totalfctra"] - nSumaTres
                nNuevoValor := aControValFoot[nPosUlDifCero] + nDifeTot
                aControValFoot[nPosUlDifCero] = nNuevoValor
            endif          
   
        else
            cCrAnt := cCrCre := cCrAbo := ""
            nCrAbo := nCrCre := nCrAnt := 0
        endif
        oRsCr:close()

                   
        PRINTAREA 12 OF oVRD ;
        ITEMIDS { 501 , 502 , 503 , 507 , 508 , 509 , 510 , 511 , 512 , 513 , 514 , 515 , 516 , 517 , 518 } ;
        ITEMVALUES  {   transform(vSubto+nTRecud+nTNtsub,oLamcla:PIC7),; //LA SUMA DE LOS SUBTOTALES Y RECAUDOS
                        transform(vVrIva+nTNtiva,oLamcla:PIC7),; //LA SUMA DE LOS IVAS
                        transform(::hOtros["totalfctra"],oLamcla:PIC7),;  //LA SUMA FINAL
                        alltrim(vLetras),; //VALOR EN LETRAS
                        transform(vSubto,oLamcla:PIC7),; //SUB TOTAL DERECHOS NOTARIALES
                        transform(nTNtsub,oLamcla:PIC7),; //SUB TOTAL GASTOS ESCRITURACION
                        transform(nTRecud,oLamcla:PIC7),; //SUB TOTAL RECAUDOS A TERCEROS
                        if(!empty(cCrAbo),transform(aControValFoot[1],oLamcla:PIC7),""),;
                        if(!empty(cCrCre),transform(aControValFoot[2],oLamcla:PIC7),""),;
                        if(!empty(cCrAnt),transform(aControValFoot[3],oLamcla:PIC7),""),;
                        if(!empty(cCrAbo),"ABONADO",""),;
                        if(!empty(cCrCre),"CREDITO",""),;
                        if(!empty(cCrAnt),"ANTICIPO",""),;
                        transform(vSubto+nTNtsub,oLamcla:PIC7),; //POR SOLICITUD USUARIO SUMA DERECHOS +  GASTOS
                        cTtSinActos ; //TITULO DESCRICION CUANDO NO HAY ACTOS
                    }          
       
        if Empty(::cCufe)
            ::cCufe := "Sin CUFE"
            ::cInfo := "Sin CUFE"
            ::cFope := space(0)
        endif

        //RECUPERAMOS LA INFORMACIÓN ADICIONAL USUARIO DEL PROYECTO   
        oVar   :=   "SELECT * FROM "+oLamcla:tMoad+" WHERE itemfa="+cValtoChar(::hOtros["id_factura"])+;
                    " AND titulo LIKE 'Usuario%'"
        oRsUs := FW_OPENRECORDSET(oCnFtr,oVar,adLockOptimistic,adOpenKeyset)       
        if oRsUs:RecordCount()!=0
            oRsUs:MoveFirst()
            cAdUsu := alltrim( oRsUs:Fields( "valor" ):Value )
        else
            cAdUsu := ""
        endif
        oRsUs:close()          
       
        PRINTAREA 13 OF oVRD;
        ITEMIDS { 701 , 702 , 703 , 704 , 705 , 706 } ;
        ITEMVALUES  {   alltrim(::hEncabezado["comentarios"]),;
                        ::cCufe,;
                        ::cInfo,;
                        ::cFope,;
                        if(!Empty(cAdUsu),"Código de Usuario : "+cAdUsu,""),;
                        alltrim(cValtoChar(::hEncabezado["ordencompra"]));
                        }          

    END EASYREPORT oVRD
endif

RETURN NIL
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: New FWH 21.06

Postby Otto » Sun Aug 01, 2021 6:32 am

Hallo Leandro,

We show the ER Preview without QR code.
After pulling the QR code from the signature unit, no more changes may be made!

That is why we print the QR code on the metafile after the print command
Code: Select all  Expand view

if lLastPage = .t.
 cDst: = Setup (): cRKSVPfad + "\" + ALLTRIM (Setup (): KassenID) + "\ QR \ qr" + ALLTRIM (oRechnung: cFLDNR_DEP) + ".bmp"
// Read the QRCode position
aQRCodePosition [1]: = VAL (GetPvProfString ("
QRCodePosition", "Top", "5000", ". \ ini \ RunTime.ini"))
aQRCodePosition [2]: = VAL (GetPVProfString ("
QRCodePosition", "Left", "100", ". \ ini \ RunTime.ini"))
aQRCodePosition [3]: = VAL (GetPVProfString ("
QRCodePosition", "nWidth", "700", ". \ ini \ RunTime.ini"))
aQRCodePosition [4]: ​​= VAL (GetPVProfString ("
QRCodePosition", "nHeight", "700", ". \ ini \ RunTime.ini"))
:: SayBitmap (aQRCodePosition [1], aQRCodePosition [2], cDst, aQRCodePosition [3], aQRCodePosition [4])
endif


We have also changed the preview for creating invoices.

Image



This is the printout

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 67 guests