[ic] log_transaction question

ic at 3edge.com ic at 3edge.com
Thu Oct 7 17:06:43 UTC 2010


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of DB
> Sent: Thursday, October 07, 2010 7:52 PM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] log_transaction question
> 
> > Sorry, I really haven't been following this close, but I see the
> following
> > in my log_transaction:
> >
> >
> > [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]
> >
> > We implement the purchase order option in IC along with credit limits
> - what
> > are you trying to do?
> >
> > Steve
> 
> I'm still fighting with this seemingly simple issue. My goal is to set
> the database field transactions.paid to a value of 1 anytime an order
> is
> placed by purchase order.
> 
> Ive tried both
> 
> paid: [if value mv_payment eq 'purchase_order']1[/if]
> 
> and
> 
> paid: [if value mv_payment_mode eq purchase_order]1[/if]
> 
> as suggested by others but still no luck.
> 
> Now that I think about it, I'd like to have this field set to 1 for any
> payment method other than credit card. Would this have any hope of
> working:
> 
> paid: [if value mv_payment !=~ /credit.*card/i]1[/if]

You are trying to add this to a section like:
....
Add main order [value mv_order_number] to transactions:
[import table=transactions type=LINE continue=NOTES no-commit=1]
code: [value mv_order_number]
store_id: __STORE_ID__
....
[/import]
...
?

I suppose you tried:
paid: 1

and found this to be '1' in the database? If not, try that to be sure that
works at all.
Next, I notice that at one point in my log_transaction it has a 'calc'
block, perhaps that works?

paid: [calc] ($Values->{mv_payment} !~ /credit.*card/i)? '1':'' [/calc]

In any case you have !=~  in your paid: ... line  ... the = I think should
not be there.

And of course you can check with some debug statements if you should use the
mv_payment or mv_payment_mode ... Always confusing enough :)

CU,

Gert














More information about the interchange-users mailing list