| View arcasys.sales_all | Generated by SchemaSpy |
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: