e484ea9f3a3a9c48edd00740b35688cf79b52b25
[fa-stable.git] / manufacturing / inquiry / bom_cost_inquiry.php
1 <?php
2 /**********************************************************************
3     Copyright (C) FrontAccounting, LLC.
4         Released under the terms of the GNU General Public License, GPL, 
5         as published by the Free Software Foundation, either version 3 
6         of the License, or (at your option) any later version.
7     This program is distributed in the hope that it will be useful,
8     but WITHOUT ANY WARRANTY; without even the implied warranty of
9     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
10     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
12 $page_security = 2;
13 $path_to_root="../..";
14 include_once($path_to_root . "/includes/session.inc");
15
16 page(_("Costed Bill Of Material Inquiry"));
17
18 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
19 include_once($path_to_root . "/includes/manufacturing.inc");
20 include_once($path_to_root . "/includes/ui.inc");
21 include_once($path_to_root . "/includes/banking.inc");
22 include_once($path_to_root . "/includes/data_checks.inc");
23
24 check_db_has_bom_stock_items(_("There are no manufactured or kit items defined in the system."));
25
26 if (isset($_GET['stock_id']))
27 {
28         $_POST['stock_id'] = $_GET['stock_id'];
29
30 if (list_updated('stock_id'))
31                 $Ajax->activate('_page_body');
32
33 start_form(false, true);
34     start_table("class='tablestyle_noborder'");
35         start_row();
36         echo '<td>';
37         stock_bom_items_list('stock_id', null, false, true);
38         echo '</td>';
39         end_table();
40         
41         echo "<hr>";
42
43         display_heading(_("All Costs Are In:") . " " . get_company_currency());
44         display_bom($_POST['stock_id']);
45
46 end_form();
47
48 end_page();
49 ?>