| Lines 1347-1353
          sub ModOrder {
      
      
        Link Here | 
        
          | 1347 |     foreach my $orderinfokey (grep(!/ordernumber/, keys %$orderinfo)){ | 1347 |     foreach my $orderinfokey (grep(!/ordernumber/, keys %$orderinfo)){ | 
        
          | 1348 |         # ... and skip hash entries that are not in the aqorders table | 1348 |         # ... and skip hash entries that are not in the aqorders table | 
        
          | 1349 |         # FIXME : probably not the best way to do it (would be better to have a correct hash) | 1349 |         # FIXME : probably not the best way to do it (would be better to have a correct hash) | 
          
            
              | 1350 |         next unless grep(/^$orderinfokey$/, @$colnames); | 1350 |         next unless grep { $_ eq $orderinfokey } @$colnames; | 
        
          | 1351 |             $query .= "$orderinfokey=?, "; | 1351 |             $query .= "$orderinfokey=?, "; | 
        
          | 1352 |             push(@params, $orderinfo->{$orderinfokey}); | 1352 |             push(@params, $orderinfo->{$orderinfokey}); | 
        
          | 1353 |     } | 1353 |     } | 
  
    | Lines 2682-2688
          sub GetInvoices {
      
      
        Link Here | 
        
          | 2682 |  | 2682 |  | 
        
          | 2683 |     if($args{order_by}) { | 2683 |     if($args{order_by}) { | 
        
          | 2684 |         my ($column, $direction) = split / /, $args{order_by}; | 2684 |         my ($column, $direction) = split / /, $args{order_by}; | 
          
            
              | 2685 |         if(grep /^$column$/, @columns) { | 2685 |         if(grep  { $_ eq $column } @columns) { | 
        
          | 2686 |             $direction ||= 'ASC'; | 2686 |             $direction ||= 'ASC'; | 
        
          | 2687 |             $query .= " ORDER BY $column $direction"; | 2687 |             $query .= " ORDER BY $column $direction"; | 
        
          | 2688 |         } | 2688 |         } | 
  
    | Lines 2806-2812
          sub AddInvoice {
      
      
        Link Here | 
        
          | 2806 |     my @set_strs; | 2806 |     my @set_strs; | 
        
          | 2807 |     my @set_args; | 2807 |     my @set_args; | 
        
          | 2808 |     foreach my $key (keys %invoice) { | 2808 |     foreach my $key (keys %invoice) { | 
          
            
              | 2809 |         if(0 < grep(/^$key$/, @columns)) { | 2809 |         if(0 < grep { $_ eq $key } @columns) { | 
        
          | 2810 |             push @set_strs, "$key = ?"; | 2810 |             push @set_strs, "$key = ?"; | 
        
          | 2811 |             push @set_args, ($invoice{$key} || undef); | 2811 |             push @set_args, ($invoice{$key} || undef); | 
        
          | 2812 |         } | 2812 |         } | 
  
    | Lines 2856-2862
          sub ModInvoice {
      
      
        Link Here | 
        
          | 2856 |     my @set_strs; | 2856 |     my @set_strs; | 
        
          | 2857 |     my @set_args; | 2857 |     my @set_args; | 
        
          | 2858 |     foreach my $key (keys %invoice) { | 2858 |     foreach my $key (keys %invoice) { | 
          
            
              | 2859 |         if(0 < grep(/^$key$/, @columns)) { | 2859 |         if(0 < grep { $_ eq $key } @columns) { | 
        
          | 2860 |             push @set_strs, "$key = ?"; | 2860 |             push @set_strs, "$key = ?"; | 
        
          | 2861 |             push @set_args, ($invoice{$key} || undef); | 2861 |             push @set_args, ($invoice{$key} || undef); | 
        
          | 2862 |         } | 2862 |         } |