Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision bdab7dfa

Von Moritz Bunkus vor fast 11 Jahren hinzugefügt

  • ID bdab7dfad504caf6fc26f5b4939acaea5436e38f
  • Vorgänger 15cfd696
  • Nachfolger aff32344

SL::DB::Helper::TransNumberGenerator: immer Lücken füllen

Siehe #2010.

Unterschiede anzeigen:

SL/DB/Helper/TransNumberGenerator.pm
22 22
  SL::DB::Manager::Part->type_filter($_[0]);
23 23
}
24 24

  
25
my %specs = ( ar                      => { number_column => 'invnumber',                                                                        fill_holes_in_range => 1 },
26
              sales_quotation         => { number_column => 'quonumber',      number_range_column => 'sqnumber',       scoping => \&oe_scoping,                          },
27
              sales_order             => { number_column => 'ordnumber',      number_range_column => 'sonumber',       scoping => \&oe_scoping,                          },
28
              request_quotation       => { number_column => 'quonumber',      number_range_column => 'rfqnumber',      scoping => \&oe_scoping,                          },
29
              purchase_order          => { number_column => 'ordnumber',      number_range_column => 'ponumber',       scoping => \&oe_scoping,                          },
30
              sales_delivery_order    => { number_column => 'donumber',       number_range_column => 'sdonumber',      scoping => \&do_scoping, fill_holes_in_range => 1 },
31
              purchase_delivery_order => { number_column => 'donumber',       number_range_column => 'pdonumber',      scoping => \&do_scoping, fill_holes_in_range => 1 },
32
              customer                => { number_column => 'customernumber', number_range_column => 'customernumber',                                                   },
33
              vendor                  => { number_column => 'vendornumber',   number_range_column => 'vendornumber',                                                     },
34
              part                    => { number_column => 'partnumber',     number_range_column => 'articlenumber',  scoping => \&parts_scoping                        },
35
              service                 => { number_column => 'partnumber',     number_range_column => 'servicenumber',  scoping => \&parts_scoping                        },
36
              assembly                => { number_column => 'partnumber',     number_range_column => 'assemblynumber', scoping => \&parts_scoping                        },
25
my %specs = ( ar                      => { number_column => 'invnumber',                                                                           },
26
              sales_quotation         => { number_column => 'quonumber',      number_range_column => 'sqnumber',       scoping => \&oe_scoping,    },
27
              sales_order             => { number_column => 'ordnumber',      number_range_column => 'sonumber',       scoping => \&oe_scoping,    },
28
              request_quotation       => { number_column => 'quonumber',      number_range_column => 'rfqnumber',      scoping => \&oe_scoping,    },
29
              purchase_order          => { number_column => 'ordnumber',      number_range_column => 'ponumber',       scoping => \&oe_scoping,    },
30
              sales_delivery_order    => { number_column => 'donumber',       number_range_column => 'sdonumber',      scoping => \&do_scoping,    },
31
              purchase_delivery_order => { number_column => 'donumber',       number_range_column => 'pdonumber',      scoping => \&do_scoping,    },
32
              customer                => { number_column => 'customernumber', number_range_column => 'customernumber',                             },
33
              vendor                  => { number_column => 'vendornumber',   number_range_column => 'vendornumber',                               },
34
              part                    => { number_column => 'partnumber',     number_range_column => 'articlenumber',  scoping => \&parts_scoping, },
35
              service                 => { number_column => 'partnumber',     number_range_column => 'servicenumber',  scoping => \&parts_scoping, },
36
              assembly                => { number_column => 'partnumber',     number_range_column => 'assemblynumber', scoping => \&parts_scoping, },
37 37
            );
38 38

  
39 39
sub get_next_trans_number {
......
46 46
  my $number              = $self->$number_column;
47 47
  my $number_range_column = $spec->{number_range_column} || $number_column;
48 48
  my $scoping_conditions  = $spec->{scoping};
49
  my $fill_holes_in_range = $spec->{fill_holes_in_range};
49
  my $fill_holes_in_range = !$spec->{keep_holes_in_range};
50 50

  
51 51
  return $number if $self->id && $number;
52 52

  

Auch abrufbar als: Unified diff