[0004212] Work Order Entry: fixed error when voided WO refence is reused.
[fa-stable.git] / includes / inventory.inc
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 include_once($path_to_root . "/includes/db/inventory_db.inc");
13
14
15 function is_manufactured($mb_flag)
16 {
17         return ($mb_flag == 'M');
18 }
19
20 function is_purchased($mb_flag)
21 {
22         return ($mb_flag == 'B');
23 }
24
25 function is_service($mb_flag)
26 {
27         return ($mb_flag == 'D');
28 }
29
30 function is_fixed_asset($mb_flag)
31 {
32         return ($mb_flag == 'F');
33 }
34
35 function has_stock_holding($mb_flag)
36 {
37         return is_purchased($mb_flag) || is_manufactured($mb_flag);
38 }