View arcasys.sales_all Generated by
SchemaSpy
Legend: SourceForge.net
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
CHOST varchar 30  √  null Defines the register the ticket belongs to.
ZNR int unsigned 10  √  null Gapless number for register periods by host.
ZCLOSE datetime 19  √  null End of register period.
RECEIPT int 10  √  null Serial number for closed sales tickets
PRODUCT_ID varchar 255  √  null -
TIMECLOSE datetime 19  √  null -
DATECLOSE varchar 10  √  null
LINENR int 10  √  null Line order number used by Hibernate
CATEGORY varchar 255  √  null -
DESCRIPTION varchar 255 Product description
AMOUNT double 22 Number of items sold
ACCOUNTING_FLAGS int 10  √  0 various propertiy flags
ACCLEVEL int 10  √  0 Bit mask
LINETOTAL double 19,2 0.00
TAXRATE double 22 Decimal tax rate 0..1 at time of sales
TICKETCUSTNAME varchar 255  √  null
TICKETDEPARTMNT varchar 255  √  null -
TYPE varchar 10  √  null
CARDCUSTNAME varchar 255  √  null
CARDDEPARTMNT varchar 255  √  null -

Analyzed at Do Apr 25 17:50 MESZ 2019

View Definition:
select `t`.`host` AS `CHOST`,`cr`.`serialnr` AS `ZNR`,`cr`.`dateClose` AS `ZCLOSE`,`t`.`number` AS `RECEIPT`,`tl`.`product_id` AS `PRODUCT_ID`,`t`.`dateClose` AS `TIMECLOSE`,date_format(`t`.`dateClose`,'%d.%c.%Y') AS `DATECLOSE`,`tl`.`line_index` AS `LINENR`,`c`.`category_name` AS `CATEGORY`,`tl`.`description` AS `DESCRIPTION`,`tl`.`amount` AS `AMOUNT`,`p`.`flags` AS `ACCOUNTING_FLAGS`,`p`.`accountingLevel` AS `ACCLEVEL`,round(((`tl`.`amount` * `tl`.`priceSell`) * (1 + `tl`.`taxRate`)),2) AS `LINETOTAL`,`tl`.`taxRate` AS `TAXRATE`,`cu`.`name` AS `TICKETCUSTNAME`,`cu`.`department` AS `TICKETDEPARTMNT`,`ma`.`trans_type` AS `TYPE`,`ccu`.`name` AS `CARDCUSTNAME`,`ccu`.`department` AS `CARDDEPARTMNT` from (((((((`arcasys`.`posper_ticketline` `tl` left join `arcasys`.`posper_product` `p` on((`tl`.`product_id` = `p`.`id`))) join `arcasys`.`posper_ticket` `t` on((`t`.`id` = `tl`.`ticket_ticketline`))) join `arcasys`.`posper_cashregister` `cr` on((`cr`.`id` = `t`.`parent_id`))) left join `arcasys`.`posper_category` `c` on((`p`.`category_id` = `c`.`id`))) left join `arcasys`.`posper_customer` `cu` on((`cu`.`id` = `t`.`customer_id`))) left join `arcasys`.`memberaccounts` `ma` on((`ma`.`transaction_id` = `t`.`id`))) left join `arcasys`.`posper_customer` `ccu` on((`ccu`.`id` = `ma`.`customer_id`))) where (((not((`p`.`id` like 'TOPUP%'))) or isnull(`p`.`id`)) and (`t`.`parent_id` is not null) and (not((`t`.`parent_id` like 'CANCELLED%')))) order by `t`.`number` desc
 
Possibly Referenced Tables/Views: