1 # Copyright 2002-2007 Interchange Development Group and others
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version. See the LICENSE file for details.
8 # $Id: price.coretag,v 1.10 2007-03-30 23:40:49 pajamian Exp $
10 UserTag price Order code
12 UserTag price attrAlias base mv_ib
13 UserTag price attrAlias space discount_space
14 UserTag price PosNumber 1
15 UserTag price Version $Revision: 1.10 $
16 UserTag price Routine <<EOR
18 my ($code, $ref) = @_;
19 $ref->{code} ||= $code;
22 $oldspace = Vend::Interpolate::switch_discount_space($ref->{discount_space})
23 if defined $ref->{discount_space};
25 my $amount = Vend::Data::item_price($ref);
26 $amount = discount_price($code, $amount, $ref->{quantity})
28 Vend::Interpolate::switch_discount_space($oldspace) if defined $oldspace;
29 return currency( $amount, $ref->{noformat}, undef, $ref );