# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
#======================================================================
#
# Warehouse module
"partnumber" => "p.partnumber",
"partdescription" => "p.description",
"classification_id" => "p.classification_id",
- "assembly" => "p.assembly",
- "inventory_accno_id" => "p.inventory_accno_id",
+ "part_type" => "p.part_type",
"bindescription" => "b.description",
"chargenumber" => "i1.chargenumber",
"bestbefore" => "i1.bestbefore",
};
$form->{l_classification_id} = 'Y';
- $form->{l_assembly} = 'Y';
- $form->{l_inventory_accno_id} = 'Y';
$form->{l_invoice_id} = $form->{l_oe_id} if $form->{l_oe_id};
# build the select clauses.
"partnumber" => "p.partnumber",
"partdescription" => "p.description",
"classification_id" => "p.classification_id",
- "assembly" => "p.assembly",
- "inventory_accno_id" => "p.inventory_accno_id",
+ "part_type" => "p.part_type",
"bindescription" => "b.description",
"binid" => "b.id",
"chargenumber" => "i.chargenumber",
"stock_value" => "p.lastcost / COALESCE(pfac.factor, 1)",
);
$form->{l_classification_id} = 'Y';
- $form->{l_assembly} = 'Y';
- $form->{l_inventory_accno_id} = 'Y';
+ $form->{l_part_type} = 'Y';
+
my $select_clause = join ', ', map { +/^l_/; "$select_tokens{$'} AS $'" }
( grep( { !/qty/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form),
qw(l_parts_id l_qty l_partunit) );