home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
tema
/
SW602
/
Winbase
/
EShop_start
/
WWW_POPIS.PGM
< prev
next >
Wrap
Text File
|
2000-03-21
|
3KB
|
108 lines
{$$3220786601 . }//Program www-popis
var
popis: string[2000];
{$I I_wbinet}
procedure chybacgi(pomstr:string[200]);
/*********************************************************************/
begin
log_write(pomstr);
/* if rp then SetSTWError(pomstr)
else*/ SetUserError(pomstr);
Halt;
end;
procedure nahrad_pismeno(pismenoS,pismenoN:string[2]);
/*********************************************************************/
var
wend: short;
begin
wend:=1;
while wend<>0 do
begin
wend:=strpos(pismenoS,popis);
if wend>0 then popis[wend]:=pismenoN;
end;
end;
procedure zrus_cestinu();
/*********************************************************************/
var
wend: short;
begin
nahrad_pismeno("Φ","c");
nahrad_pismeno("╚","C");
nahrad_pismeno("∞","e");
nahrad_pismeno("╠","E");
nahrad_pismeno("Θ","E");
nahrad_pismeno("╔","E");
nahrad_pismeno("Ü","s");
nahrad_pismeno("è","S");
nahrad_pismeno("°","r");
nahrad_pismeno("╪","R");
nahrad_pismeno("₧","z");
nahrad_pismeno("Ä","Z");
nahrad_pismeno("²","y");
nahrad_pismeno("▌","Y");
nahrad_pismeno("ß","a");
nahrad_pismeno("┴","A");
nahrad_pismeno("φ","i");
nahrad_pismeno("═","I");
nahrad_pismeno("·","u");
nahrad_pismeno("┌","U");
nahrad_pismeno("∙","u");
nahrad_pismeno("┘","U");
end;
procedure sestav_popis(id_obj:integer);
/*********************************************************************/
var
i,pocet:integer;
co, odkud, podminka, pom: string[254];
curs:cursor;
pom1, pom2:string[50];
begin //0
co:= "Info_provozovatel.nazev1,Obj_header.cis_eob,Obj_header.datum,Obj_header.k_uhrade,Obj_polozky.nazev_vl,Obj_polozky.cena_summn";
odkud:= " Obj_header, Obj_polozky, Info_provozovatel " ;
podminka:= " Obj_polozky.id_dobj=Obj_header.id_dobj AND (Obj_header.id_dobj="+int2str(id_obj)+" )";
if not Open_SQL_parts(curs,co, odkud, podminka,"") then
begin {otev°enφ prom∞nnΘho kurzoru curs}//1
Rec_cnt(curs, pocet);
if pocet>0 then
begin //2
// pom1:=int2str(id_obj);
// pom:="Platba cislo: "+pom1+"; %0A%0D ";
// strinsert(pom,popis,1);
pom1:=curs[0].cis_eob;
pom2:=curs[0].nazev1;
pom:="Objednavka cislo "+pom1+" ze dne "+date2str(curs[0].datum,1)+ " u "+ pom2+ "; %0A%0D ";
strinsert(pom,popis,strlength(popis)+1);
for i:=0 to pocet-1 do
begin //3
pom1:=curs[i].nazev_vl;
pom2:=curs[i].cena_summn;
pom:=pom1+"......"+pom2+ " CZK; %0A%0D ";
strinsert(pom,popis,strlength(popis)+1);
end; //3
pom1:=curs[0].k_uhrade;
pom:="-------------------------------------------- %0A%0D Celkem vcetne DPH......"+pom1+" CZK";
strinsert(pom,popis,strlength(popis)+1);
end; //2
zrus_cestinu();
close_cursor(curs);
end //1
else chybacgi("Chyba p°i b∞hu procedury sestav popis");
end;
begin
end.