Commit 2865df92 authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

handle setting TxnCFs to 0 (zero)

parent c4d5de44
......@@ -568,9 +568,10 @@ sub GetCurrentUser {
while ( my $cf = $custom_fields->Next ) {
my $cmd = 'TransactionCustomField{'. $cf->Name .'}';
my @values = ($cmds{ lc $cmd });
next unless @values && $values[0];
@values = @{ $values[0] } if ref $values[0] eq 'ARRAY';
@values = grep defined && length, @values;
next unless @values;
foreach my $value ( @values ) {
my ($status, $msg) = $transaction->AddCustomFieldValue(
Field => $cf->Name, Value => $value,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment