Lines 1346-1352
sub ModOrder {
Link Here
|
1346 |
foreach my $orderinfokey (grep(!/ordernumber/, keys %$orderinfo)){ |
1346 |
foreach my $orderinfokey (grep(!/ordernumber/, keys %$orderinfo)){ |
1347 |
# ... and skip hash entries that are not in the aqorders table |
1347 |
# ... and skip hash entries that are not in the aqorders table |
1348 |
# FIXME : probably not the best way to do it (would be better to have a correct hash) |
1348 |
# FIXME : probably not the best way to do it (would be better to have a correct hash) |
1349 |
next unless grep(/^$orderinfokey$/, @$colnames); |
1349 |
next unless grep { $_ eq $orderinfokey } @$colnames; |
1350 |
$query .= "$orderinfokey=?, "; |
1350 |
$query .= "$orderinfokey=?, "; |
1351 |
push(@params, $orderinfo->{$orderinfokey}); |
1351 |
push(@params, $orderinfo->{$orderinfokey}); |
1352 |
} |
1352 |
} |
Lines 2702-2708
sub GetInvoices {
Link Here
|
2702 |
|
2702 |
|
2703 |
if($args{order_by}) { |
2703 |
if($args{order_by}) { |
2704 |
my ($column, $direction) = split / /, $args{order_by}; |
2704 |
my ($column, $direction) = split / /, $args{order_by}; |
2705 |
if(grep /^$column$/, @columns) { |
2705 |
if(grep { $_ eq $column } @columns) { |
2706 |
$direction ||= 'ASC'; |
2706 |
$direction ||= 'ASC'; |
2707 |
$query .= " ORDER BY $column $direction"; |
2707 |
$query .= " ORDER BY $column $direction"; |
2708 |
} |
2708 |
} |
Lines 2826-2832
sub AddInvoice {
Link Here
|
2826 |
my @set_strs; |
2826 |
my @set_strs; |
2827 |
my @set_args; |
2827 |
my @set_args; |
2828 |
foreach my $key (keys %invoice) { |
2828 |
foreach my $key (keys %invoice) { |
2829 |
if(0 < grep(/^$key$/, @columns)) { |
2829 |
if(0 < grep { $_ eq $key } @columns) { |
2830 |
push @set_strs, "$key = ?"; |
2830 |
push @set_strs, "$key = ?"; |
2831 |
push @set_args, ($invoice{$key} || undef); |
2831 |
push @set_args, ($invoice{$key} || undef); |
2832 |
} |
2832 |
} |
Lines 2876-2882
sub ModInvoice {
Link Here
|
2876 |
my @set_strs; |
2876 |
my @set_strs; |
2877 |
my @set_args; |
2877 |
my @set_args; |
2878 |
foreach my $key (keys %invoice) { |
2878 |
foreach my $key (keys %invoice) { |
2879 |
if(0 < grep(/^$key$/, @columns)) { |
2879 |
if(0 < grep { $_ eq $key } @columns) { |
2880 |
push @set_strs, "$key = ?"; |
2880 |
push @set_strs, "$key = ?"; |
2881 |
push @set_args, ($invoice{$key} || undef); |
2881 |
push @set_args, ($invoice{$key} || undef); |
2882 |
} |
2882 |
} |