home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
tema
/
SW602
/
Winbase
/
EShop_start
/
POKLADNAWBC.WWW
< prev
next >
Wrap
Text File
|
2000-03-21
|
4KB
|
107 lines
{$$3220255771 . }Template: pokladna.htw
ErrorTemplate: err.htw
RequiredValues: heslo jmeno objednavka
SQLStatement: Ulozenip
#ifexists
+ SELECT Obj_header.id_dobj
+ FROM OBJ_HEADER
+ WHERE OBJ_HEADER.id_dobj=%objednavka%
#then
+ UPDATE obj_header
+ SET obj_header.POZN="%w_pozn%"
+ WHERE OBJ_HEADER.id_dobj=%objednavka%
#endif
BeginProgram: www_obj
w_doprava("%w_zpusob%",%objednavka%);
EndProgram;
BeginProgram:
w_testdatum(str2date("%w_datum_d%"),%objednavka%);
EndProgram;
BeginProgram:
zjisti_postovne(%objednavka%);
EndProgram;
SQLStatement: detail_obj
#ifexists
+ SELECT a.ID_DOBJ
+ FROM obj_header a, obj_polozky b, cenik, S_doprava
+ WHERE a.id_dobj=b.id_dobj AND
+ a.id_dobj=str2int("%objednavka%") AND b.id_cnk=cenik.id_cenik AND a.doprav=S_doprava.KOD
#then
+ SELECT a.ID_DOBJ, a.ID_ORG, a.CIS_EOB, a.DATUM, a.DATUM_D, a.POTVRZENA, a.STORNO_DAT, a.STORNO, a.ZPRACOVANA, a.SUM_CENA, a.DOPRAV, a.pozn, a.DPH_SUM, a.Z_ROZDIL,
+ b.ID_POL, b.ID_CNK, b.MNOZSTVI, b.CENA_SUM, b.NAZEV_VL, b.CENA_SUMMN, cenik.jednotka, S_doprava.ZPUSOB AS zpdopr
+ FROM obj_header a, obj_polozky b, cenik, S_doprava
+ WHERE a.id_dobj=b.id_dobj AND
+ a.id_dobj=str2int("%objednavka%") AND b.id_cnk=cenik.id_cenik AND a.doprav=S_doprava.KOD
+ ORDER BY b.ID_POL
#else
+ SELECT a.ID_DOBJ, a.ID_ORG, a.CIS_EOB, a.DATUM, a.DATUM_D, a.POTVRZENA, a.STORNO_DAT, a.STORNO, a.ZPRACOVANA, a.SUM_CENA, a.DOPRAV AS zpdopr, a.pozn,, a.DPH_SUM, a.Z_ROZDIL,
+ b.ID_POL, b.ID_CNK, b.MNOZSTVI, b.CENA_SUM, b.NAZEV_VL, b.CENA_SUMMN, cenik.jednotka
+ FROM obj_header a, obj_polozky b, cenik
+ WHERE a.id_dobj=b.id_dobj AND
+ a.id_dobj=str2int("%objednavka%") AND b.id_cnk=cenik.id_cenik
+ ORDER BY b.ID_POL
#endif
SQLStatement: odberatel
#ifexists
+ SELECT Obj_header.id_dobj
+ FROM OBJ_HEADER
+ WHERE OBJ_HEADER.id_dobj=%objednavka%
#then
+ SELECT id, int2str(id) AS sid,intr_pswd, NAZEV1, KONT_OSOBA, ULICE, PSC, MESTO, TELEF, FAX, ICO, DIC, DEAL_SK, MAIL_ADRES, CISLO_UCTU, PENEZNI_USTAV, POZNAMKA
+ FROM OBCHODNI_PARTNERI,obj_header
+ WHERE ((OBCHODNI_PARTNERI.id=obj_header.id_org) AND (obj_header.id_dobj=str2int("%objednavka%")))
#endif
SQLStatement: prodejce
+ SELECT nazev1, KONT_OSOBA, ULICE, PSC, MESTO, TELEF, FAX, ICO, DIC, MAIL_ADRES, CISLO_UCTU, PENEZNI_USTAV, KONST_SYMB, today+14 AS kdy
+ FROM info_provozovatel
SQLStatement: celkem
#ifexists
+ SELECT sum_cena
+ FROM obj_header
+ WHERE id_dobj=str2int("%objednavka%") AND sum_cena>0
#then
+ SELECT sum_cena, ob_sleva, sum_obj, SUMVAHA, K_UHRADE, POSTOVNE, 0.00 AS nula, (ob_sleva/sum_cena) AS w_sleva
+ FROM obj_header
+ WHERE id_dobj=str2int("%objednavka%")
#else
+ SELECT sum_cena, ob_sleva, sum_obj, SUMVAHA, K_UHRADE, POSTOVNE, 0.00 AS nula, (0.00) AS w_sleva
+ FROM obj_header
+ WHERE id_dobj=str2int("%objednavka%")
#endif
SQLStatement: novy
#ifexists
+ SELECT S_typ_uziv.id_typ
+ FROM Obj_header, Obchodni_partneri, S_typ_uziv
+ WHERE (Obchodni_partneri.id=Obj_header.id_org) AND (id_dobj=%objednavka%)
+ AND (Obchodni_partneri.intr_user<>"") AND (S_typ_uziv.id_typ=Obchodni_partneri.typ)
#then
+ SELECT S_typ_uziv.id_typ,S_typ_uziv.nazev_typ, Obchodni_partneri.intr_user
+ FROM Obj_header, Obchodni_partneri, S_typ_uziv
+ WHERE (Obchodni_partneri.id=Obj_header.id_org) AND (id_dobj=%objednavka%)
+ AND (Obchodni_partneri.intr_user<>"") AND (S_typ_uziv.id_typ=Obchodni_partneri.typ)
#else
+ SELECT DEFAULT_HODNOTY.TYP_UZIV, "" AS intr_user
+ FROM DEFAULT_HODNOTY
#endif
SQLStatement: formul
+ SELECT S_platba.id, S_platba.nazev AS CO
+ FROM obj_header, S_doprava, S_platba
+ WHERE (OBJ_HEADER.id_dobj=%objednavka%) AND (obj_header.doprav=S_doprava.kod) AND (S_doprava.platba=S_platba.id)
SQLStatement: sys_par
+ SELECT round_sum FROM Sys_par