home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
tema
/
SW602
/
Winbase
/
EShop_demo
/
INFONUV.WWW
< prev
next >
Wrap
Text File
|
2000-03-16
|
5KB
|
113 lines
{$$3220260365 . }Template: pokladna.htw
ErrorTemplate: err.htw
RequiredValues: heslo jmeno objednavka
BeginProgram: www_login
w_defuziv();
EndProgram;
GetVariable: w_id:=wd_id
GetVariable: w_obch:=wd_obch
GetVariable: w_deal:=wd_deal
;GetVariable: w_typ:=wd_typ
SQLStatement: Novy_zak
#if w_intr_pswd<>""
+ INSERT INTO obchodni_partneri (id, deal_sk, typ, id_obchodnika,nazev1, dic,kont_osoba,fax,ico,cislo_uctu, ulice, penezni_ustav,
+ psc, mesto, intr_pswd, mail_adres, telef, poznamka)
+ VALUES (%w_id%,%w_deal%,%w_typ%,%w_obch%,"%w_nazev1%", "%w_dic%", "%w_kont_osoba%", "%w_fax%", "%w_ico%", "%w_cislo_uctu%",
+ "%w_ulice%", "%w_penezni_ustav%", "%w_psc%", "%w_mesto%", "%w_intr_pswd%", "%w_mail_adres%", "%w_telef%","%w_prip%")
#else
+ INSERT INTO obchodni_partneri (id, deal_sk, typ, id_obchodnika,nazev1, dic,kont_osoba,fax,ico,cislo_uctu, ulice, penezni_ustav,
+ psc, mesto, intr_pswd, mail_adres, telef, poznamka)
+ VALUES (%w_id%, %w_deal%,%w_typ%,%w_obch%,"%w_nazev1%", "%w_dic%", "%w_kont_osoba%", "%w_fax%", "%w_ico%", "%w_cislo_uctu%",
+ "%w_ulice%", "%w_penezni_ustav%", "%w_psc%", "%w_mesto%", int2str(%w_id%), "%w_mail_adres%", "%w_telef%","%w_prip%")
#endif
BeginProgram:
w_cis_uziv(%objednavka%,"%w_nazev1%","%w_intr_pswd%", %w_id%);
EndProgram;
SQLStatement: detail_obj
#ifexists
+ 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
+ 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
#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,
+ 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,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)
#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