E-Bussines Tables (WEB-PROFESSIONAL)

Total Page:16

File Type:pdf, Size:1020Kb

E-Bussines Tables (WEB-PROFESSIONAL)

E-bussines tables (WEB-PROFESSIONAL)

Rules:

Each table where you want to insert records requires a text file with the same name as the table and extension “.txt”. (e.g. : tbl_objects.txt for table tbl_objects).

Module: products A product can have name, description, pictures and other details in many languages. For a product with 'xxx' code to be seen in the public area, a record with code='xxx' must be inserted in tbl_objects and tbl_objects_lng must contain a record with code='xxx' and code_lng=language code for the site (e.g.: EN, IT). Module: categories The main way of accessing the products is by categorization. The hierarchy of categories is one of the type 'one to many'. A category can be a descendent of many father categories. The position inside the father category is given by the "position" field from tbl_categories. A product is included in a certain category by a link in tbl_cat_objects. Certain details must be specified: the code of the product, the code of the category and the position of the product within the category. Obs: Category code should not be a 0 value! Module: prices The prices can be of 3 types: 1. generic prices (applied to all the clients) : in this case the field pricelist from tbl_prices should contain the value 1 and the cust_code field 0 or NULL. 2. particular prices on pricelists (applied to the clients belonging to the specified pricelist) . A price of this type should have as cust_code value 0 or NULL and as pricelist a value different from 0 or 1. 3. particular prices on clients (applied to a specified client). The rule in this case is that the field pricelist is equal to 0 and cust_code should contain the identifier of the client to whom the price is applied. Module: products with variants Steps for inserting a product with variants:

1. in tbl_vari insert generic variant types ; the name of a type inherited in this way will be visible for all the variants with this criterion of variation. If a product variant has a type which is not specified in this table, it will appear as "type: x" in the public area. 2. in tbl_valvari you can, optionally, insert the values of variants for each type from tbl_vari. These values are also generic. 3. in tbl_artroot insert a record with codroot = code of the root product, numliv = number of levels; from 1 to numliv specify the lungvar for the values of the variant type (the lungvar for a level will be the maximum length allowed for the codes of variants for that type). This is one of the most important settings related to the variants structure. 4. in tbl_varliv you can set, for each variant type (for a code root), one of the existing types from tbl_vari. The types are identified by the level number. 5. the main step while creating a variant is to insert into tbl_objects and tbl_objects_lng records for every new variant of the root product. The rules are: o in the codroot field insert the code of the root product o for every variant value complete the code of variant value (field codvarX), optionally from tbl_artvar.

If in tbl_artvar there is no record with this codvar, the public area will display the value from codvarX. When inserting the record in tbl_objects, you also have to complete the tbl_objects_lng following the rules described in the module - products. tbl_objects -- List of all products (module: products) Field Field default Field name Field name key required Observation type size value code Product code varchar 100 yes yes For a product to be seen on the site, it must exist in tbl_objects_lng; for a variant product, the code is obtained from concat(codroot, codvar1, codvar2, codvar3). code_alt Alternative code varchar 20 descr_short_obj Administrative varchar 255 short description descr_long_obj Administrative text long description vat VAT value double 20 yes 0 qty_available Available double 20 0 quantity in stock qty_low Low quantity in double 20 stock qty_high High quantity in double 20 stock UNSPSC UNSPSC varchar 50 code_disc_class Code article int 10 yes 0 The code class discount class (different from 0) must exist in tbl_disc_class with type='o'. weight weight double 20 dim_l length double 20 dim_w width double 20 dim_h height double 20 f_txt1 -unused field; text reserved for future implementations - f_txt2 -unused field; text reserved for future implementations - f_txt3 -unused field; text reserved for future implementations - f_int1 -unused field; tinyint 3 reserved for future implementations - f_int2 -unused field; int 10 reserved for future implementations - f_txt3 -unused field; int 10 reserved for future implementations - special_offer_all =1 if the product tinyint 3 is seted as special offer for the entire e-business codroot The root code for varchar 12 For the products the variant which are not product variants, this field is NULL, otherwise this is the code of the root; linked to another code from tbl_objects. codvar1 variant code for varchar 8 linked to codvar level 1 from tbl_artvar with the same codroot and livello=1 codvar2 variant code for varchar 8 linked to codvar level 2 from tbl_artvar with the same codroot and livello=2 codvar3 variant code for varchar 8 linked to codvar level 3 from tbl_artvar with the same codroot and livello=3 tbl_objects_lng -- Contains the description in various languages for each product (module: products) Field Field default Field name Field name key required Observation type size value code Product code varchar 100 yes yes Linked to code from tbl_objects code_lng Language code (e.g.: {IT, char 2 yes yes IT Code lng is EN, FR, DE, ES, RO}) represented by the first 2 letters of the English name of the language (uppercases) descr_short_lng Title product for language varchar 255 yes ??? specified in “code_lng” descr_long_lng Detailed description for text language (may contain HTML code) notes Notes (may contain text HTML code) image_file Product image name (e.g.: varchar 255 The image needs to "myimg.gif") for list be uploaded on the presentation server image_file1 Product image name (e.g.: varchar 255 The image needs to "myimg.gif") for detailed be uploaded on the presentation server file_obj File name associated to varchar 255 The file needs to be product (e.g.: uploaded on the "mydocument.doc") server link_obj Link for the product (e.g.: varchar 255 "www.othersite.com") unit_label Unit label (e.g.: kg, m) varchar 20 show_obj Flag for hiding the product char 1 Needs to be 1 to on the public site (0 or 1) show the product f_txt1 -unused field; reserved for text future implementations - f_txt2 -unused field; reserved for text future implementations - f_txt3 -unused field; reserved for text future implementations - f_int1 -unused field; reserved for tinyint 3 future implementations - f_int2 -unused field; reserved for tinyint 3 future implementations - f_txt3 -unused field; reserved for tinyint 3 future implementations - tbl_objects_fields -- Contains the list of all custom fields for each product (module: products) Field Field default Field name Field name key required Observation type size value code Product code varchar 100 yes yes Linked to code from tbl_objects code_field Field code int 50 yes yes 0 Identifier of the custom field for each product code_lng Language code char 2 yes yes IT Code lng is {IT, EN, FR, represented by the DE, ES, RO} first 2 letters of the English name of the language (uppercases) fieldname Field name varchar 50 value Field value varchar 255 unit_of_mesure Unit of varchar 50 measurement tbl_categories -- Contains the list of all available categories (module: categories) Field Field default Field name Field name key required Observation type size value code_cat Code category int 10 yes yes 0 Code different of 0 code_father Code of the category int 10 yes yes 0 For the categories father from the first level let code_father = 0 position_cat Position inside int 10 yes 1 father category code_lng Language code {IT, char 2 yes yes IT Code lng is EN, FR, DE, ES, represented by the first RO} 2 letters of the English name of the language (uppercases) descr_short_cat Name of category varchar 50 yes ? descr_long_cat Long description text (may contain HTML code) type_cat Type of the category int 10 0 Linked to type_cat from tbl_cat_type picture_cat Picture of category varchar 255 The picture needs to be shown together with uploaded on the server description when accessing the category picture_cat_default Name of common varchar 255 The picture needs to be picture for products uploaded on the server with missing picture from this category icon_cat Category icon for varchar 255 the categories tree icon_over_cat Category icon in varchar 255 mouse over for the categories tree show_cat Flag for hiding the char 1 1 Needs to be 1 to show product on the the category public site (0 or 1) cat_link Category link varchar 255 e.g.: www.mylink.com cat_file Category file varchar 255 e.g.: myfile.doc; the file needs to be uploaded on the server UNSPS UNSPSC varchar 8 f_txt1 -unused field; text reserved for future implementations - f_txt2 -unused field; text reserved for future implementations - f_txt3 -unused field; text reserved for future implementations - f_int1 -unused field; tinyint 3 reserved for future implementations - f_int2 -unused field; int 10 reserved for future implementations - f_txt3 -unused field; int 10 reserved for future implementations - tbl_cat_objects -- Defines the categories an article belongs to (module: categories) Field Field default Field name Field name key required Observation type size value code_cat Category code int 10 yes yes 0 Linked to code_cat from tbl_categories code Product code varchar 100 yes yes 0 Linked to code from tbl_objects position_obj Product position int 10 yes 0 in category cat_special_offer Flag for special tinyint 3 0 =1 if the product offer for the is special offer category for the category “code_cat” tbl_disc_class -- List of discount classes (module: discounts) Field Field default Field name Field name key required Observation type size value code_disc_class Code discount class int 10 yes yes 0 type_class Class type: o - char 1 yes yes c article discount; c - client discount title_class Class title varchar 50 yes untitled title, description, notes are only administrative information descr_class Class description varchar 200 notes_class Class notes varchar 255 f_txt1 -unused field; text reserved for future implementations - f_txt2 -unused field; text reserved for future implementations - f_txt3 -unused field; text reserved for future implementations - f_int1 -unused field; tinyint 3 reserved for future implementations - f_int2 -unused field; tinyint 3 reserved for future implementations - f_txt3 -unused field; tinyint 3 reserved for future implementations - tbl_discounts -- Discounts for products, discount classes, customers (module: discounts) Field Field Field name Field name key required default value Observation type size code Product code varchar 100 yes yes 0 Linked to code from tbl_objects code_disc_class Code article int 10 yes yes 0 Linked to discount class code_disc_class from tbl_disc_class where type_class=o code_client_class Code client int 3 yes yes 0 Linked to discount class code_disc_class from tbl_disc_class where type_class=c cust_code Customer code bigint 20 yes yes 0 Linked to u_id from tbl_users date_start The start date to date 10 yes yes 2000-01-01 validate discount date_end The end date to date 10 yes 2100-01-01 validate discount qty_from The start double 20 yes yes 0 quantity to validate discount qty_to The end double 20 yes 9999999999999 quantity to validate discount discount_1 Discount 1 double 20 value between 0 and 100 discount_2 Discount 2 double 20 value between 0 and 100 discount_3 Discount 3 double 20 value between 0 and 100 discount_4 Discount 4 double 20 value between 0 and 100 discount_5 Discount 5 double 20 value between 0 and 100 codtpro Promotion code smallint 2 - feature not implemented tbl_pricelist -- Price lists (module: prices) Field Field default Field name Field name key required Observation type size value code_pricelist Price list code int 20 yes yes 0 title_pricelist Price list name varchar 50 Name, description, notes are only administrative information descr_pricelist Price list varchar 200 description notes Price list note varchar 255 flag1 -unused field; char 2 reserved for future implementations - flag2 -unused field; char 2 reserved for future implementations - flag3 -unused field; char 2 reserved for future implementations - field1 -unused field; text reserved for future implementations - field2 -unused field; text reserved for future implementations - tbl_prices -- Prices (module: prices) Field Field Field Field name key required default value Observation name type size code Product code varchar 100 yes yes 0 Linked to code from tbl_objects code_cust Customer code varchar 20 yes yes 0 Linked to u_id from tbl_users; if you fill this field, let pricelist=0 pricelist Price list code int 10 yes yes 0 Linked to code_pricelist from tbl_pricelist codtpro Promotion code smallint 2 yes yes 0 Linked to tb_codtpro from tbl_promotions qty_from The start quantity double 20 yes yes 0 to validate price qty_to The end quantity double 20 yes 999999999999999 to validate price date_start The start date to date 10 yes yes 2000-01-01 validate price date_end The end date to date 10 yes 2100-01-01 validate price price Price value double 20 codlavo Code lavoro smallint 2 yes 0 -feature not implemented- codvalu Code currency – smallint 2 yes 0 feature not implemented - unmis Unit mesurement char 3 yes 0 – feature not implemented tbl_agents -- Defines relations between customers and associated agents (module: agents) Field Field default Field name Field name key required Observation type size value cust_code Customer varchar 20 yes yes 0 This value is from code tbl_users field: u_id agent_code Agent code varchar 20 yes yes 0 This value is from tbl_users field: u_id tbl_users -- List of users (module: users) Field Field default Field name Field name key required Observation type size value u_id User bigint 20 yes yes 0 identifier u_alt User varchar 100 alternative code u_type User type: varchar 10 client Insert one of the values: {staff, client, staff, client, agent (an agent} agent is automatically a staff member) u_login User's login varchar 20 yes The login must be (public area) unique and is required for authentication to the site u_passwd User's varchar 20 Required for entering the password authenticated site (public area) u_fname First name varchar 30 u_lname Last name varchar 30 company Company varchar 50 name u_email Email varchar 150 u_phone Phone varchar 30 number u_fax FAX varchar 30 u_url URL: web varchar 100 address pricelist Price list int 10 yes 0 Linked to code_pricelist code from tbl_pricelist code_disc_class Code client int 10 yes 0 Linked to discount code_disc_class from class tbl_disc_class with type='c' addr_street Address- varchar 50 street addr_number Address- varchar 50 street number addr_city Address-city varchar 50 addr_zip Address-zip varchar 50 addr_state Address- varchar 50 state addr_country Address- varchar 50 country ship_street Shipping varchar 50 address- street ship_number Shipping varchar 50 address- street number ship_city Shipping varchar 50 address-city ship_zip Shipping varchar 50 address-zip ship_state Shipping varchar 50 address-state ship_country Shipping varchar 50 address- country vat_no VAT number varchar 25 code_fiscale Code fiscale varchar 30 u_nrint Interior varchar 100 number tbl_usersdest -- Contains the different destinations for users (module:users) Field Field default Field name Field name key required Observation type size value d_userid Id of the user bigint 20 yes yes Linked to u_id from tbl_users d_coddest Destination code varchar 20 yes yes d_nomdest Name of the varchar 30 destination d_inddest Address varchar 30 d_capdest Postale code varchar 20 d_locdest City varchar 28 d_prodest State/Region varchar 30 d_country Country varchar 30 d_phone Phone number varchar 30 d_fax Fax number varchar 30 d_codfis Fiscale number varchar 30 d_pariva VAT number varchar 30 d_email Email address varchar 30 tbl_vari -- Variant types (module: products with variants) Field Field default Field name Field type key required Observation name size value codvari Variant VARCHAR 4 yes yes type code code_lng Language CHAR 2 yes yes IT Code lng is represented code by the first 2 letters of the English name of the language (uppercases) desvari Type name VARCHAR 30 e.g.: colour lung Length of SMALLINT 2 yes 0 values code tbl_valvari -- Variant values (module: products with variants) Field Field default Field name Field type key required Observation name size value codvari Variant type VARCHAR 4 yes yes Linked to codvari from code tbl_vari code_lng Language CHAR 2 yes yes IT Code lng is represented code by the first 2 letters of the English name of the language (uppercases) valvari Variant value VARCHAR 8 yes yes code desvvar Name of the VARCHAR 40 e.g.: red, blue variant value file File or colour VARCHAR 20 could be the name of of the variant an image (myImg.gif) value or a colour (#777777) tbl_artroot -- Contains the generic information of the variants types and associated values (module: products with variants) Field Field default Field name Field type key required Observation name size value codroot Code of the root VARCHAR 12 yes yes Linked to codroot from tbl_objects code_lng Language code CHAR 2 yes yes IT Code lng is represented by the first 2 letters of the English name of the language (uppercases) descr Description of the VARCHAR 40 yes root numliv Number of levels for SMALLINT 2 yes 0 the root lungroot Length of the root SMALLINT 2 lungvar1 Length of the code SMALLINT 2 yes 0 for the level variant 1 lungvar2 Length of the code SMALLINT 2 yes 0 for the level variant 2 lungvar3 Length of the code SMALLINT 2 yes 0 for the level variant 3 prevar1 Flag for prices VARCHAR 1 yes N administration (one of the values: 'N' - common prices for all variants, 'S' - different prices) tbl_artvar -- Contains the values of variant for every codroot (module: products with variants) Field Field default Field name Field type key required Observation name size value codroot Code of the VARCHAR 12 yes yes Linked to codroot from root tbl_objects code_lng Language CHAR 2 yes yes IT Code lng is represented code by the first 2 letters of the English name of the language (uppercases) livello Variant level SMALLINT 2 yes yes 0 codvar Variant value VARCHAR 8 yes linked to codvar1 from code tbl_objects if livello = 1; codvar2 for livello=2; codvar3 for livello=3 descr Variant value VARCHAR 40 description file Variant file varchar 255 File must be uploaded on the server tbl_varliv -- Relates the variant level to the type name (module: products with variants) Field Field default Field name Field type key required Observation name size value codroot Code of the VARCHAR 12 yes yes 0 Linked to codroot root from tbl_objects livello Variant SMALLINT 2 yes yes 1 level codvari Variant type VARCHAR 8 yes Linked to codvari code from tbl_vari tbl_payment_condition -- List of payment conditions (module: payment conditions) Field Field default Field name Field name key required Observation type size value code_payment Code payment int 10 yes yes 0 condition pay_description Payment varchar 255 condition descripion start_after_days Start after int 3 number of days number_rates Number of rates int 3 days_betw_rates Number of days int 3 between rates discount Discount double 20 value between 0 and 100 expenses Expenses - fixed varchar 255 amount perc_expenses Percentage double 20 value between expenses 0 and 100 tbl_payment_cust -- Relates the customer to payment conditions (module: payment conditions) Field Field default Field name Field name key required Observation type size value code_cust Customer varchar 20 yes yes 0 Linked to u_id from tbl_users code code_payment Code int 10 yes yes 0 Linked to code_payment payment from condition tbl_payment_condition tbl_relations -- List of sparepart relations for languages (module: spareparts) Field Field Field default Field name key required Observation name type size value code_rel Code of relation int 10 yes yes 0 code_lng Language code char 2 yes yes IT The first 2 letters of the {IT, EN, FR, DE, English name of the ES, RO} language (uppercases) descr_rel Title of relation varchar 255 yes ??? note_rel Description of varchar 255 relation tbl_rel_objects -- Associates two products in a relation (module: spareparts) Field Field Field default Field name key required Observation name type size value code Code of the product varchar 100 yes yes 0 Linked to code which will be the from tbl_objects sparepart product code_rel Relation code int 10 yes yes 0 Linked to code_rel from tbl_relations code Code of the parent varchar 100 yes yes 0 Linked to code product from tbl_objects tbl_orders_heads -- Orders heads (module: orders) Field Field default Field name Field name key required Observation type size value ordernumber Order number bigint 20 yes yes 0 tipork Type of the record char 1 yes yes R R means Web Orders and Q - offers anno Year of the order int 10 yes yes 0 serie Serie char 2 yes yes * numord Order number from int 10 yes 0 other database – used for synchronise with other programs(Business) cust_code Customer code varchar 20 yes 0 Linked to u_id from tbl_users agent_code Agent code varchar 20 Linked to u_id from tbl_users order_datetime Order date/time date 10 yes 0000- 00-00 price_list Code price list int 10 yes 0 Linked to code_pricelist from tbl_pricelist note Order note varchar 255 completed flag if the order is char 1 yes 0 completed or not(1 if the order is completed) code_payment Payment code int 10 0 Linked to code_payment from tbl_payment_condition validate 0 if the order is char 1 yes 0 validated or not, and 1 if the order is validated payc_discount Discount from float 10 0 value between 0 and payment condition 100 payc_expenses Fixed amount float 10 0 expenses from payment condition payc_percexpenses Percentage of float 10 0 value between 0 and expenses from 100 payment condition coddest Destination code varchar 20 Linked to d_coddest from tbl_usersdest data_cons Shipping preview datetime date flag1_int -unused field; int 10 reserved for future implementations - flag2_int -unused field; int 10 reserved for future implementations - flag3 -unused field; varchar 255 reserved for future implementations - flag4 -unused field; varchar 255 reserved for future implementations - cc_method Method of int 3 payment(credit card) cc_payd Flag if the order is varchar 255 payd with the credit card method cc_name Name of method of varchar 255 payment order_url Url set by the varchar 255 administrator site for the user to see in the public area at this order order_file Same as utl_order, varchar 255 but the file must be uploaded on the server tbl_orders_details -- Orders details (module: orders) Field Field default Field name Field name key required Observation type size value ordernumber Order number bigint 20 yes yes 0 Linked to ordernumber from tbl_orders_heads tipork Type of record char 1 yes yes R R means Web Orders and Q - offers anno Year int yes yes 0 serie Order series char 2 yes yes * riga Row number int 4 yes 0 incremental value for each ordernumber numord Order identifier int 10 yes 0 from other database (used for synchronisation with other programs ) code Product code varchar 100 yes yes 0 linked to code_obj from tbl_objects price Product price per double 20 yes 0 unit quantity Requested quantity double 20 yes 0 qty_approved Approved quantity double 20 completed If the row order is char 1 completed or not flag_appr If the approved char 1 quantity is used flag2_int VAT int 10 value between 0 and 100 qty_evasa Sent quantity double 20 unit Unit label varchar 20 discount1 Discount 1 per double 20 product discount2 Discount2 per double 20 product discount3 Discount 3 per double 20 product discount4 Discount 4 per double 20 product discount5 Discount 5 per double 20 product prod_title Product name varchar 255 total Row total float 10 data_cons Shipping preview datetime date – feature not implemented flag1_int -unused field; int 10 reserved for future implementations - flag3 -unused field; varchar 255 reserved for future implementations - flag4 -unused field; varchar 255 reserved for future implementations - tbl_orders_shippings_heads -- Invoices heads (module: invoices) Field Field default Field name Field name key required Observation type size value numdoc Invoice number int 10 yes yes 0 anno Year int 4 yes yes 0 serie Series char 1 yes yes * tipork Invoice type char 1 yes yes R R for web orders datdoc Invoice date date 10 yes 0000- 00-00 conto User code varchar 20 Linked to u_id from tbl_users codpaga Payment code smallint 2 0 Linked to code_payment from tbl_payment_condition courier Courier varchar 255 yes 0 payc_expenses Expenses (fixed float 10 0 amount) from payment condition payc_discount Discount from float 10 0 value between 0 and 100 payment condition payc_percexpenses Percentage of float 10 0 value between 0 and 100 expenses from payment condition totalvat Total document float 10 yes 0 vat totdoc Total document float 10 yes 0 including vat coddest Destination varchar 20 Linked to d_coddest code from tbl_destinations tbl_orders_shippings -- Invoices rows (module: invoices) Field Field default Field name Field name key required Observation type size value numdoc Invoice int 10 yes 0 Linked to numdoc from number tbl_orders_shippings_heads rigadoc Invoice row int 10 yes 0 incremental value for each numdoc anno Year int 4 yes 0 ordernumber Order bigint 20 0 Could be a value linked to ordernumber number from tbl_orders_heads or 0 for rows that are not related to an order code Product code varchar 100 Linked to code from tbl_objects shipped_quantity Shipped double 20 0 quantity orriga Order row int 3 yes the corresponding row from tbl_orders_details prezzo Unit price double 20 0 vat Vat float 10 value between 0 and 100 percentage unit Unit label varchar 20 discount1 Discount 1 float 10 0 value between 0 and 100 from product discount2 Discount 2 float 10 0 value between 0 and 100 from product discount3 Discount 3 float 10 0 value between 0 and 100 from product discount4 Discount 4 float 10 0 value between 0 and 100 from product discount5 Discount 5 float 10 0 value between 0 and 100 from product total Total row float 10 yes 0 without vat tbl_promotions -- Defines types of promotion (module: promotions) Field Field default Field name Field name key required Observation type size value tb_codtpro Promotion smallint 2 yes yes 0 code tb_destpro Description varchar 3 type tb_classe Promotion smallint 2 yes 0 1 - type NxM, 2 - per cent class discount, 3 - discount in value for every N pieces, 4 - discount of N pieces for total price, 5 - discount of % for total prices, 6 - discount in value for total price tb_enne Quantity N float 10 yes 0 Only for type 1 tb_emme Quantity M float 10 yes 0 Only for type 1 tb_valsco Discount float 10 yes 0 Only for types 3 and 6 value tb_perc1 Discount float 10 yes 0 Only for types 2 and 5 percentage (1) tb_perc2 Discount float 10 yes 0 Only for types 2 and 5 percentage (2) tb_qtasco Number of float 10 yes 0 Only for type 4 pieces in discount tb_implim Maximum float 10 yes 0 Only for types 4, 5 and 6 digits tb_qtalim Maximum float 10 yes 0 Only for types 2 and 3 number of pieces

Recommended publications