[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: Problems with discount formula
****** message to minivend-users from Joe Hourcle <oneiros@dcr.net> ******
On Fri, 15 Jan 1999, Mike Lerley wrote:
> ****** message to minivend-users from Mike Lerley <mike@bfent.com> ******
>
> Will somebody please tell me why the following code, modeled after the
> docs, does not work correctly:
>
> [calc]
> [item-list]
> $totalq{"[item-field category]"} += [item-quantity];
> [/item-list]
> return '';
> [/calc]
> [discount ALL_ITEMS]
> return $s if "[item-field category]" == "Cold Bay Seafood";
> return 17*$q*5 if $totalq{"Hanson Bros."} >= 10;
> return (27-$q)*5*$q;
> [/discount]
as I think [discount] passes everything to perl, you may want to try using
'eq' inplace of '==' as it's a string comparison, not a number comparison.
-----
Joe Hourcle
Digital Crescent, Inc.
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list