[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Possible bug in [data ...] tag.
****** message to minivend-users from pro200@iae.nl ******
Hi All,
When playing around with the report page I discovered a possible bug
in the tag [data ...].
I was trying to implement inventory tracking by putting the following
code on the report page.
[snip]
[item-list]
[snip]
[tag flag write]inventory[/tag]
[data base="inventory" field="qty" key="[item-code]"
value="-[item-quantity]" op="-"]
[/item-list]
[tag export inventory][/tag] ---> Just to see the effect in
inventory.asc
[snip]
When using the named attributes with op="increment" or op="decrement"
or
op="-" the value of the qty-field in the inventory table gets set to
the
value in value="-[item-quantity]".
Example:
quantity in inventory table is 15
-[item-quantity] is -3
This will result in a value of -3 for the quantity field in the
inventory table
instead of (15 -3 =) 12.
When I use the old (positional ) tag [data ..] I get the proper result
(12).
This works: [data inventory qty [item-code] -[item-quantity]
increment]
It seems to me that the [data ..] tag does not recognize the 'op='
parameter
because it behaves exactly as if the 'op=' was not specified.
Meaning, the field qty in table inventory will be set to the value in
'value="some value"'.
Has anyone encountered the same problem?
Regards
Ton
-
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