[ic] decrement inventory in an additional table

Andrei Gologan interchange-users@icdevgroup.org
Sun Aug 25 19:10:03 2002


Hi,
 I need to decrement the inventory  in an additional table besides
inventory. In log_transaction I copied the code:

[if variable DECREMENT_INVENTORY]Inventory of [item-code] now:
        [data
                table=menge
                col=quantity
                key="[item-code]"
                increment=1
                value="-[item-quantity]"
        ]
[/if]

but it does not work ... it might be because my table "menge" has 2 keys
defined , i am not sure. In the log it only shows up with "-the number" I
ordered but no change to the quantity column.

How can I do this ? I tried directly with mysql but it just wrote the code
to the log or it just didnīt do anything .....

menge is a table with following columns: sku, username, quantity - here the
quantity i supposed to be decreased on order, here and in the inventory
table. keys are sku and username (to eliminate duplicates)
I have IC 4.8

Thank you for any help
Andrei G.