[ic] log_transaction question
DB
DB at M-and-D.com
Thu Oct 7 17:43:24 UTC 2010
>>
>> 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]
> ...
> ?
correct
> I suppose you tried:
> paid: 1
yes, works
> 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.
good info - I'll try it - thanks!
> 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