MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: me, bugs and 3.14



******    message to minivend-users from "Christian J. =?iso-8859-1?Q?M=FCller?=" <cmueller@polinet.ch>     ******

Thomas 'Balu' Walter wrote:
> 
> ******    message to minivend-users from "Thomas 'Balu' Walter" <tw@iTreff.DE>     ******
> 
> After upgrading from 3.11 to 3.14 I have the following
> Problems...
> 
> ======================================================================
> Using my euro-locales
> 
> ##### from catalog.cfg
> Locale eur_EUR PriceDivide         1.95583
> Locale eur_EUR p_cs_precedes       0
> Locale eur_EUR currency_symbol     "<IMG src="euro.gif" border="0" align="bottom">"
> Locale eur_EUR p_sep_by_space      2
> Locale eur_EUR mon_decimal_point   ,
> Locale de_DE
> Locale de_DE p_cs_precedes  0
> Locale de_DE p_sep_by_space 2
> #####
> 
> the code to display the price in euro does not work anymore (the price
> displayed is the same as in DM):
> 
> [item-field price]<br>
> [setlocale eur_EUR]
>   [currency convert=1][item-field price][/currency]<br>
> [setlocale]
> 
> I noticed that there was a bug fixed in [setlocale], but don't understand
> why the old code doesn't work anymore.
> 
> ======================================================================
> 
> I used the following code to calculate a tax of the subtotal (which has to
> be displayed on the receipt in germany) of 16% - it just displays 0,00 DM.
> As I am no perl-programmer I can not find any mistakes in here. The code was
> on the mailinglist once - and I used it.
> 
> [currency][perl interpolate=1]
>  $endbetrag = '[subtotal]';
>  $endbetrag =~ s/\.//g;
>  $endbetrag =~ s/,/\./;
>  $endbetrag =~ s/[a-zA-Z]//g;
>  $endbetrag = $endbetrag-($endbetrag/1.16);
>  $endbetrag
> [/perl][/currency]<br>
> 
> I've just tried to shorten this a little using [subtotal noformat=1] and
> [calc] instead of [perl], but then I realized that I was not able to use
> values like 1.16 (1,16 did not work either) - it seems that MV ignores the
> floating-point-values?
> 
> Note: The calculation I was going to use was:
> [currency]
> [calc]'[subtotal noformat=1]'-('[subtotal noformat=1]'/1.16)[/calc]
> [/currency]
> 
> This should work, shouldn't it?

Try to remove the quotes. Perl is expecting a string, not a number if
you use quotes.
Chris

> 
> ======================================================================
> 
> I always had the problem that the [setlocale] does not seem to switch back
> to the defaultlocale:
> 
> Gesamt: [subtotal]<br>
> [comment] This seems to make problems...
>   [setlocale eur_EUR]
>     [subtotal]<br>
>   [setlocale]
> [/comment]
> 
> Or am I doing something wrong here?
> 
>      Balu (thats it for today - I hope ;-)
> -
> 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
-
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


Search for: Match: Format: Sort by: