[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: Germans plse. read, was Re: Newbie: how to implement a germansales tax ?
****** message to minivend-users from Frank Miedreich <miedreich@acm.org> ******
>****** message to minivend-users from Holm Tiffe <holm@freibergnet.de>
>******
>
>Chris Müller wrote:
>
>[..]
>> > >
>> > > ==> [currency][calc][item-price] + ([item-price]*[item-field vat] /
>> > > 100)[/calc][/currency]
>> > >
>> >
>> > Yea this is the theory, but this doesn't work here,
>> > (I have 3.11 on FreeBSD 4.0-current).
>> > I've played with souch things a litte, [item-price] is always
>>evaluated to 0 !
>> > Even a [currency][item-price][/currency] and a [item-price] alone
>> > generates a 0.00 price.
>> >
>>
>> [item-price] is returned as a string. You need to specify [item-price
>>noformat=1] to get a number.
>
>[item-price] with or without noformat=1 is returning always 0 at this time.
>The access to the database seems to work but it seems that I can't get even
>the [item-code] right here. No difference in 3.12beta.
>Are the [item-*] things defined for use with CommonAdjust ?
>
>> >
>> > If I reference [item-field vat] minivend simply hangs forever.
>> > The deamon takes all of the CPU time. I have to kill the cgi and the
>>minivend
>> > daemon.
>>
>> There may be various reasons, why this does not work.
>
>The reason seems that I've forgot to set single quotes around the square
>brackets.
>With quotes it is returning ( what?! ) --> 0.
>
>It seems that there is no way to get the prices properly calculated here.
>
>CommonAdjust '[data "products" code="00-001" name="price"]' displays
>properly
>the $40 (sample) for all artikles, but
>
>CommonAdjust '[data base="products" code=[item-code] name="price"]'
>gernerates those zeros again.
>
Take the following steps:
Don't mess with commonAdjust and vat if item-price does not work. Get
[item-price] to work first.
set the price field in catalog.cfg, check that this is identical with the
field in products.asc.
Make sure you do not use comma as the decimal point in the database, use a
period. You should not have anything but numbers in your price field. (plus
possibly a decimal point of course)
Restart minivend.
Check whether [item-price] works now. If it does not, check error logs,
recheck the configuration, but unless this works, nothing else will.
Next step is to consider whether you really need minivend to compute salestax.
This makes sense if you use quantity pricing or any other price
adjustments. Otherwise compute the price incl. VAT in advance and forget
about any additional configuration. If you use a database (or spreadsheet)
to generate products.asc I suggest you introduce a field net-price and let
the db or spreadsheet do the calculation
Should you decide you do not want to do this try [item-price noformat=1]. I
seem to remember this didn't work in some versions. If the output is ok,
add the calc stuff. Check again, you may need an interpolate=1. Once this
works add currency.
In general, if you run into problems don't try to do everything at once,
take it step by step.
Good luck, Frank
--
Frank Miedreich
Max-Planck-Institut fuer psychologische Forschung
-
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