Hello,
today I made a report modul for my DOS Clipper Fibu (Accounting System) in mod Harbour.
Best regards
Otto
/*
****************************************************************************
* Aplicacion: Test jQuery DataTable con Ajax para mod_harbour *
* Fuente: data1.prg *
* Autor: Joaquim Ferrer Godoy *
* Inicio: 06-08-2019 *
****************************************************************************
*/
function main()
local hData := {=>}
local hItem
USE ( hb_GetEnv( "PRGPATH" ) + "/../data/aj.dbf" ) ALIAS "data" SHARED
set order to tag ktonr
hData['data'] := {}
if rlock()
do while !eof()
hItem := {=>}
hItem['beldat'] := data->beldat
hItem['konto'] := rtrim(data->ktonr)
hItem['text'] := convertXML( data->text )
if data->S_H = 1
hItem['soll'] := data->betrag
hItem['haben'] := 0
else
hItem['soll'] := 0
hItem['haben'] := data->betrag
endif
hItem['gg_ktonr'] := data->gg_ktonr
aadd( hData['data'], hItem )
dbskip()
enddo
dbunlock()
endif
CLOSE
AP_SetContentType( "application/json" )
?? hb_jsonEncode( hData, .T. ) // T=pretty
return NIL
function convertXML( cVData )
local I := 0
*----------------------------------------------------------
cVData := STRTRAN(cVData, chr(228), "ä" )
cVData := STRTRAN(cVData, chr(246), "ö" )
cVData := STRTRAN(cVData, chr(252), "ü" )
cVData := STRTRAN(cVData, chr(142), "Ä" )
cVData := STRTRAN(cVData, chr(153), "Ö" )
cVData := STRTRAN(cVData, chr(154), "Ü" )
cVData := STRTRAN(cVData, chr(223), "ß" )
return (cVData)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 42 guests