select log('B2BLOG','[$username$]','showBIG:[$artbez$]','[$remoteHostname$]', '[$mandant$]');
select distinct on (artbez) pgf_artikel.artbez,'
', doif(artwg ='','', '('||artwg ||') ' ||wgktext||'
'||wgltext), '

Beschreibung:

', -- pgfencode(convert(pgf_Artikel.arttext using utf8_to_iso_8859_4)), pgfencode(pgf_Artikel.arttext ), doif(bestand=0,'
[$vergriffen$]',''), doif(bestand=-1,'
[$ausgelaufen$]',''), doif(bestand<-1,'
[$baldwieder$]',''), '
', trunc(pgf_Artikel.vpreis::numeric,2),' EUR ', 'VPE: ',pgf_Artikel.vpe,' ', doif('[$shop$]'='JA',' ',''),'
', '
' from pgf_Artikel,pgf_wg where pgf_Artikel.oid=[$oid$] and pgf_Artikel.man='[$mandant$]' and pgf_wg.man=pgf_artikel.man and position(wg in pgf_artikel.artwg )>0 ;;