12345678910111213141516171819 |
- CREATE VIEW `view_invoices` AS
- select
- `a`.`invoice_number` AS `invoice_number`,
- `a`.`project_id` AS `project_id`,
- `a`.`pos_id` AS `pos_id`,
- `a`.`invoice_date` AS `invoice_date`,
- `a`.`cashier` AS `cashier`,
- `a`.`line_count` AS `line_count`,
- `a`.`total` AS `total`,
- `b`.`line_number` AS `line_number`,
- `b`.`item` AS `item`,
- `b`.`seller_id` AS `seller_id`,
- `b`.`item_id` AS `item_id`,
- `b`.`price` AS `price`
- from (
- `view_invoice_header` `a`
- left join `invoice_details` `b` on (`a`.`invoice_number` = `b`.`invoice_number`)
- );
|