Interchange Developer Resource
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

[ic] decrement inventory in an additional table



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.



Search for: Sort by: