new sub menu item :)
[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
31 start_form(false, true);
32 echo "<center> " . _("Item:") . " ";    
33 //stock_bom_items_list('stock_id', $_POST['stock_id'], false, true);
34 stock_bom_items_list('stock_id', null, false, true);
35
36 echo "<hr>";
37
38 if ($_POST['stock_id'] != "")
39 {
40         echo "<center>" . _("All Costs Are In:") . " " . get_company_currency() . "<br><br>";
41         display_bom($_POST['stock_id']);
42
43 else 
44 { //no item entered
45         echo "<p>" ._("Enter an item code above, to view the costed bill of material for.") . "</p>";
46 }       
47 end_form();
48
49 end_page();
50 ?>