Zieltabellen

Die Zieltabellen dienen der Speicherung der anfallenden Daten und müssen in der folgenden Form vorhanden sein.Die Tabellen sind nach ihrer Verwendung in Funktionen geordnet.


-- Allgemein

insert into FormatListStamm ( "FormLstKennung","FormLstBesitzer","FormLstBeschreib","FormLstKeineSprache","creator","FormLstReservieren","FormLstReserviertBis")  

values  ('bf_flagmde',1,'Flag vom MDE',0,'TPS-IT',0,0);

insert into FormatList ( "FormLstKennung","SprachNummer","FormLstWert","FormLstBezeich","FormLstBemerk","FormLstBesitzer","FormLstAktiv")  

values  ('bf_flagmde',0,0,'---','and (p_hinweis = 0)',1,1)

        ,('bf_flagmde',0,1,'EAN doppelt','and (p_hinweis = 1)',1,1)

        ,('bf_flagmde',0,2,'EAN nicht vorhanden','and (p_hinweis = 2)',1,1)

        ,('bf_flagmde',0,3,'EAN im Sortiment','and (p_hinweis = 3)',1,1)

        ,('bf_flagmde',0,99,'egal','and 1 = 1',1,1);


-- Inventur

alter table MDEUebergabe add p_Bemerkung char(100)  NULL  default null;

alter table MDEUebergabe add p_Hinweis integer  NULL  default 0;

alter table MDEUebergabe add p_User char(20)  NULL  default null;


FIELD Bemerkung,p_bemerkung,char,30

FIELD Hinweis, p_hinweis, FS bf_flagmde,18,COLOR=(f_hinweis,1=BLAU/GELB,2=SCHWARZ/ROT)

FIELD User,p_user,char,12

, if (isnull(p_hinweis,0) = 0) then 0 else if(isnull(p_hinweis,0) = 1) then 1 else 2 endif endif f_hinweis


-- Bestellung

alter table ImportVorgPosition add p_bemerkung char(100)  NULL  default null;

alter table ImportVorgPosition add p_hinweis integer  NULL  default 0;


FIELD Bemerkung,p_bemerkung,char,30

FIELD Hinweis, p_hinweis, FS bf_flagmde,18,COLOR=(f_hinweis,1=BLAU/GELB,2=SCHWARZ/ROT)

, if (isnull(p_hinweis,0) = 0) then 0 else if(isnull(p_hinweis,0) = 1) then 1 else 2 endif endif f_hinweis


-- Preisabfrage

create table admin.p_T_Scanner_Etiketten ( 

ident integer NOT NULL default autoincrement,

bemerkung char( 100) NULL,

ean char(  40) NOT NULL,

lagernummer integer NOT NULL,

p_hinweis integer NULL default 0,

typ char(  10) NULL,

wann timestamp NULL default current timestamp

, primary key( ident  )  );

create  index pi1_ean on p_T_Scanner_Etiketten ( ean ASC );

create  index pi2_lager on p_T_Scanner_Etiketten ( lagernummer ASC );

create  index pi2_ean_lager on p_T_Scanner_Etiketten ( ean ASC,lagernummer ASC );


alter table p_T_Scanner_Etiketten add bemerkung char(100)  NULL  default null;

alter table p_T_Scanner_Etiketten add p_hinweis integer  NULL  default 0;



FIELD Bemerkung,pe.bemerkung,char,30

FIELD Hinweis, p_hinweis, FS bf_flagmde,18,COLOR=(f_hinweis,1=BLAU/GELB,2=SCHWARZ/ROT)

, if (isnull(p_hinweis,0) = 0) then 0 else if(isnull(p_hinweis,0) = 1) then 1 else 2 endif endif f_hinweis


-- Aktionspreise

create table admin.p_T_Scanner_Individualpreise ( 

id integer NOT NULL default autoincrement,

artikelnummer char(  20) NULL,

bemerkung char( 100) NULL,

ean char(  20) NULL,

lager integer NULL default 0,

p_hinweis integer NULL default 0,

preis numeric(  12,   2) NULL

, primary key( id  )  );


create table admin.p_T_MdeAktionPreis ( 

BedienerId integer NOT NULL default 0,

PreisDatumBis date NULL,

PreisDatumVon date NULL

, primary key( BedienerId  )  );


create table admin.p_T_MdeAktionPreisProtokoll ( 

Id integer NOT NULL default autoincrement,

Artikelnummer varchar( 255) NULL,

ArtiLisPrGrupVK integer NULL default 0,

BedienerId integer NULL default 0,

Preis numeric(  12,   2) NULL default 0,

PreisDatumBis date NULL,

PreisDatumVon date NULL,

Zeit timestamp NULL default "now"()

, primary key( Id  )  );


-- Regalauszeichnung

create table admin.p_T_Artikel_Regal_Fehler ( 

ident integer NOT NULL default autoincrement,

bemerkung char( 100) NULL,

device char(  10) NULL,

ean char(  20) NULL,

flag integer NULL,

lagernr integer NULL,

regalfach integer NULL,

regalnr integer NULL,

regalpos integer NULL

, primary key( ident  )  );


alter table ArtikelAddOn add RegalFach integer  NULL  default 0;

alter table ArtikelAddOn add RegalNr integer  NULL  default 0;

alter table ArtikelAddOn add RegalPos integer  NULL  default 0;

insert into AmicInfoSysStamm ( "AISGruppe","AISTabCardName","AISMakroName","AISMakroExit","AISMakroEntry","AISMakroInsertEntry","AISHerkunft","AISLetzteAenderung","AISScreenMakroName","AISMakroValid")  

values  ('AIS_Artikel_Markt',NULL,'',NULL,'',NULL,NULL,NULL,NULL,NULL);

insert into AmicInfoSysMskZuord ( "AISMaskenName","AISGruppe","BedienerKlasse","AISIdentFeld","AnwId","AnwVarID","OptBoxFeldName","OptBoxHide","AISOnTabDeck","AISIdentFeldTestWert","AISMaskWidth","AISMaskHeight","AISHauptTabelle","AISTabCardName","AISIdentFeld2","AISIdentFeld3","AISIdentFeld4","AISIdentFeldTestWert2","AISIdentFeldTestWert3","AISIdentFeldTestWert4","AISSortierung","AISSaveOnLastField","AISBeschreibung","AISDeleteOption","AISNoDialog","AISStandAlone","OptBoxId","AISMaskTitel")  

values  ('DHARTNEU','AIS_Artikel_Markt','-9999','h.ArtikelId$',NULL,NULL,NULL,0,1,'0',NULL,NULL,'ArtikelAddOn','Markt',NULL,NULL,NULL,NULL,NULL,NULL,0.000000,NULL,NULL,NULL,0,0,NULL,NULL);

insert into AmicInfoSysPosition ( "AISGruppe","AISPFeldName","AISPFeldTyp","AISPFeldFormat","AISPFormLstKennung","AISPZeile","AISPSpalte","AISPLaenge","AISPMaxLaenge","AISPHoehe","AISPTiptext","AISPIstEingabeFeld","AISPEingabeZwang","AISPClearingProt","AISPItemBox","AISPItemBoxInfo","AISPMakroEntry","AISPMakroExit","AISPMakroValid","AISPDatenHerkunft","AISPAktionsArt","AISPAktion","AISPAnwVarID","AISPSQL","AISPRelation","AISPIdentFeld","AISPSortierung","AISPRefresh","AISPFavorit","AISPJVarsName","AISPDirektstart","AISPFontDescriptor","AISPBGColor","AISPFGColor","AISPGruppe","AISPRelationHandel","AISPBisSpalte","AISPBisZeile","AISPHidden","AISLockingId","AISPDatumsPruefung","AISPTastNum","AISPIdentFeld2","AISPIdentFeld3","AISPIdentFeld4","AISPIstNULLFeld","AISPItemBoxEindeutig","AISPReadOnly","AISPFeldExistiert","AISPGridVersion","AISPSysValidation")  

values  ('AIS_Artikel_Markt','RegalFachPos',0,1,NULL,'3','1',21,255,1,NULL,0,0,0,NULL,NULL,NULL,NULL,NULL,99,0,NULL,NULL,NULL,NULL,NULL,0.000000,0,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)

        ,('AIS_Artikel_Markt','RegalNr',1,4,NULL,'3','20',8,8,1,NULL,1,0,0,NULL,NULL,NULL,NULL,'',0,0,NULL,NULL,NULL,'ArtikelAddOn','ArtikelId',3.000000,0,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)

        ,('AIS_Artikel_Markt','RegalFach',1,4,NULL,'3','30',8,8,1,NULL,1,0,0,NULL,NULL,NULL,NULL,'',0,0,NULL,NULL,NULL,'ArtikelAddOn','ArtikelId',4.000000,0,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)

        ,('AIS_Artikel_Markt','RegalPos',1,4,NULL,'3','40',8,8,1,NULL,1,0,0,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,'ArtikelAddOn','ArtikelId',6.000000,0,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

insert into AmicInfoSysPosLabel ( "AISGruppe","AISPFeldName","AISPPosZaehler","AISPLabel")  

values  ('AIS_Artikel_Markt','RegalFachPos',1,'Regal/Fach/Ebene/Pos:');


Zwischenspeichertabellen

Die Zwischenspeichertabellen sollten in der folgenden Form vorliegen.


create table admin.p_T_MDE_devices ( 

id char(  25) NOT NULL,

increment_id integer NOT NULL default autoincrement,

lager integer NOT NULL default '0',

last_action timestamp NULL,

last_login timestamp NULL,

password char(  50) NULL,

state integer NOT NULL default '0'

, primary key( id  )  );

create  index p1_MDE_devices_increment_id on p_T_MDE_devices ( increment_id ASC );

insert into p_T_MDE_devices ( "id","increment_id","lager","state","last_login","last_action","password")  values 

('MDE01',1,0,0,NULL,NULL,NULL);


create table admin.p_T_MDE_etikett ( 

id integer NOT NULL,

description char( 100) NULL

, primary key( id  )  );

insert into p_T_MDE_etikett ( "id","description")  values 

(1,'Regaletikett'),

(2,'Klebetikett m. Preis'),

(3,'Klebetikett o. Preis');


create table admin.p_T_MDE_aktionspreise ( 

id integer NOT NULL default autoincrement,

artikel_nummer varchar(  20) NULL,

bemerkung varchar(  50) NULL,

beschreibung varchar(  50) NULL,

device_id varchar(  25) NULL,

ean varchar(  50) NULL,

flag integer NULL,

lager integer NULL,

price double NULL,

zeit_rein timestamp NULL default current timestamp

, primary key( id  )  );


create table admin.p_T_MDE_vorgaenge ( 

increment_id integer NOT NULL default autoincrement,

artikel_nummer char(  50) NULL default '',

bemerkung char( 200) NULL default '0',

beschreibung char( 200) NULL default '0',

device_id char(  20) NOT NULL default '0',

ean char(  50) NOT NULL default '0',

flag integer NULL,

lager integer NOT NULL,

menge integer NOT NULL default '0',

lieferant integer NOT NULL default -1,

vorgang integer NOT NULL,

bestell_nr integer NOT NULL default -1,

zeit_rein timestamp NULL default current timestamp

, primary key( increment_id  )  );

create  index p1_MDE_Bestellung_mde_id on p_T_MDE_vorgaenge ( device_id ASC );

create  index p2_MDE_Bestellung_ean on p_T_MDE_vorgaenge ( ean ASC );


create table admin.p_T_MDE_inventur ( 

increment_id integer NOT NULL default autoincrement,

artikel_nummer char(  50) NULL default '',

bemerkung char( 255) NULL,

beschreibung char( 200) NULL,

device_id char(  50) NOT NULL,

ean char(  50) NOT NULL,

flag integer NOT NULL default '0',

lager integer NOT NULL,

menge integer NOT NULL default '1',

zeit_rein timestamp NULL default current timestamp

, primary key( increment_id  )  );

create  index p1_MDE_inventur_ean on p_T_MDE_inventur ( ean ASC );

create  index p2_MDE_inventur_mde_id on p_T_MDE_inventur ( device_id ASC );


create table admin.p_T_MDE_preisabfrage ( 

id integer NOT NULL default autoincrement,

artikelnummer char(  50) NULL,

bemerkung char( 100) NULL,

device_id char(  50) NULL,

ean char(  50) NULL,

flag integer NULL,

lager integer NULL,

price double NULL,

type integer NULL,

zeit_rein timestamp NULL default current timestamp

, primary key( id  )  );

create  index p1_p_T_MDE_aktionspreise on p_T_MDE_preisabfrage ( device_id ASC );

create  index p2_p_T_MDE_aktionspreise on p_T_MDE_preisabfrage ( ean ASC );

create  index p1_p_T_MDE_regalauszeichnung on p_T_MDE_preisabfrage ( device_id ASC );

create  index p2_p_T_MDE_regalauszeichnung on p_T_MDE_preisabfrage ( ean ASC );

create  index p1_MDE_preisabfrage_mde_id on p_T_MDE_preisabfrage ( device_id ASC );

create  index p2_MDE_preisabfrage_ean on p_T_MDE_preisabfrage ( ean ASC );


create table admin.p_T_MDE_regalauszeichnung ( 

id integer NOT NULL default autoincrement,

artikelnummer varchar(  50) NULL,

bemerkung varchar(  50) NULL,

device_id varchar(  25) NULL,

ean varchar(  20) NULL,

fach integer NULL default '0',

flag integer NULL,

lager integer NULL,

position integer NULL default '0',

regal integer NULL,

zeit_rein timestamp NULL default current timestamp

, primary key( id  )  );


Datenbankbefehle in der _conf.php

Für jedes Modul gibt es einen SQL-Befehl um die richtigen Daten aus der Datenbank zu bekommen. Die Befehle müssen eventuell an die vorliegenden Tabellen angepasst werden. Klärung der Inputparameter (durch ? im Befehl gekennzeichnet) in richtige Reihenfolge, Output


  • SQL_INVENTUR_GETPRODUCTDATA_BY_EAN
    • Inputparameter: Lagernummer, EAN
    • Output: Artikelbezeichnung (description), Bestand (description_addition), EAN, Artikelnummer, ArtikelID, Menge


  • SQL_BESTELLUNG_GETPRODUCTDATA_BY_EAN
    • Inputparameter: Lagernummer, EAN
    • Output: Artikelbezeichnung (description), VE und Bestand (description_addition), EAN, Artikelnummer, ArtikelID, Menge


  • SQL_LIEFERSCHEIN_GETPRODUCTDATA_BY_EAN
    • Inputparameter: Lagernummer, EAN
    • Output: Artikelbezeichnung (description), VE und Bestand (description_addition), EAN, Artikelnummer, ArtikelID, Menge


  • SQL_PREISABFRAGE_GETPRODUCTDATA_BY_EAN
    • Inputparameter: Lagernummer, EAN
    • Output: Artikelbezeichnung (description), Bestand (description_addition), Preis, EAN, Artikelnummer, ArtikelID


  • SQL_AKTOINSPREIS_GETPRODUCTDATA_BY_EAN
    • Inputparameter: Lagernummer, EAN
    • Output: Artikelbezeichnung (description), Bestand, Preis (description_addition), EAN, Artikelnummer, ArtikelID


  • SQL_REGALAUSZEICHNUNG_GETPRODUCTDATA_BY_EAN
    • Inputparameter: EAN, Lagernummer
    • Output: Artikelbezeichnung (description), (description_addition), Preis, EAN, Artikelnummer