-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `kns_legal`
--

-- --------------------------------------------------------

--
-- Structure for view `stock_quotation_list`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `stock_quotation_list`  AS  select `sqc`.`stock_quotation_id` AS `quote_id`,`sqc`.`stock_quotation_indent_id` AS `material_id`,`sqc`.`stock_quotation_indent_id` AS `indent_id`,`sqc`.`stock_quotation_amount` AS `quote_amount`,`sqc`.`stock_quotation_no` AS `user_quote_no`,`sqc`.`stock_quotation_received_date` AS `recieved_date`,`sqc`.`stock_quote_no` AS `system_quote_no`,`sqc`.`stock_quotation_vendor` AS `quote_venor_id`,`sqc`.`stock_quotation_quantity` AS `quote_qty`,`sqc`.`stock_quotation_po_qty` AS `po_qty`,`sqc`.`stock_quotation_project` AS `quote_project`,`sqc`.`stock_quotation_status` AS `quote_status`,`sqc`.`stock_quotation_doc` AS `quote_doc`,`sqc`.`stock_quotation_remarks` AS `quote_remarks`,`sqc`.`stock_quotation_active` AS `quote_active`,`sqc`.`stock_quotation_approved_by` AS `approved_by`,`sqc`.`stock_quotation_approved_on` AS `approved_on`,`sqc`.`stock_quotation_added_by` AS `added_by`,`sqc`.`stock_quotation_added_on` AS `added_on`,`u`.`user_id` AS `user_id`,`u`.`user_name` AS `user_name`,`svm`.`stock_vendor_name` AS `stock_vendor_name`,`smm`.`stock_material_code` AS `stock_material_code`,`smm`.`stock_material_name` AS `stock_material_name`,`smm`.`stock_material_price` AS `stock_material_price`,`slm`.`stock_project_name` AS `stock_project_name`,`uom`.`stock_unit_name` AS `stock_unit_name`,`si`.`stock_indent_no` AS `system_indent_no` from ((((((`stock_quotation_compare` `sqc` left join `users` `u` on((`u`.`user_id` = `sqc`.`stock_quotation_added_by`))) join `stock_vendor_master` `svm` on((`svm`.`stock_vendor_id` = `sqc`.`stock_quotation_vendor`))) join `stock_material_master` `smm` on((`sqc`.`stock_quotation_material_id` = `smm`.`stock_material_id`))) left join `stock_indent` `si` on((`sqc`.`stock_quotation_indent_id` = `si`.`stock_indent_id`))) left join `stock_project` `slm` on((`slm`.`stock_project_id` = `sqc`.`stock_quotation_project`))) join `stock_unit_measure_master` `uom` on((`uom`.`stock_unit_id` = `smm`.`stock_material_unit_of_measure`))) ;

--
-- VIEW  `stock_quotation_list`
-- Data: None
--

COMMIT;

