[ic] log_transaction question
Mike Heins
mike at perusion.com
Wed Sep 29 19:10:34 UTC 2010
Quoting DB (DB at M-and-D.com):
> > DB wrote:
> >> I wish to set the value of the "payment_due" field of my transactions
> >> table to "1" whenever an order is placed as a purchase order.
> >>
> >> I see this section in my log_transaction file
> >>
> >> [if value mv_payment_mode eq purchase_order]
> >> set credit_limit: [seti credit_limit][data
> >> table=userdb
> >> col=credit_limit
> >> key="[data session username]"
> >> value="-[scratch total_cost]"
> >> increment=1
> >> ][/seti]
> >> [/if]
> >>
> >>
> >> Can I add something like an [import]....[/import] statement to this
> >> section to accomplish my goal
> >
> > Hi DB,
> >
> > If "payment_due" is a column in the "transactions" table you will need
> > to add the field between the import tags which log values to this table.
> > Look for an import tag similar to the one below in etc/log_transaction
> >
> > [import table=transactions type=LINE continue=NOTES]
> > ...
> > [/import]
> >
> > Hope this helps,
> > Chris
>
> Hi - am I able to stuff an "if" condition within the [import] tag such as:
>
> [import table=transactions type=LINE continue=NOTES]
> ...
>
> [if value mv_payment_mode eq purchase_order]
> paid: 1
> [/if]
>
> [/import]
It's better to put it in the data portion only:
paid: [if value mv_payment_mode eq purchase_order]1[/if]
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.328.4479 <mike at perusion.com>
I used to think the whole world stank. Then I found out I had poop
on my mustache. -- Anonymous
More information about the interchange-users
mailing list