Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 33aaaaac

Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt

  • ID 33aaaaac8e542303c06da3305c79322d80a3e0cf
  • Vorgänger 6bb6fe53
  • Nachfolger c45ceef8

Kosmetik: Ausrichtung

Unterschiede anzeigen:

SL/DB/Helper/TransNumberGenerator.pm
27 27
 # SL::DB::Manager::Part->type_filter($_[0]);
28 28
}
29 29

  
30
my %specs = ( ar                      => { number_column => 'invnumber',                                                                           },
31
              sales_quotation         => { number_column => 'quonumber',      number_range_column => 'sqnumber',       scoping => \&oe_scoping,    },
32
              sales_order_intake      => { number_column => 'ordnumber',      number_range_column => 'soinumber',      scoping => \&oe_scoping,    },
33
              sales_order             => { number_column => 'ordnumber',      number_range_column => 'sonumber',       scoping => \&oe_scoping,    },
34
              request_quotation       => { number_column => 'quonumber',      number_range_column => 'rfqnumber',      scoping => \&oe_scoping,    },
35
              purchase_quotation_intake => { number_column => 'quonumber',    number_range_column => 'pqinumber',      scoping => \&oe_scoping,    },
36
              purchase_order          => { number_column => 'ordnumber',      number_range_column => 'ponumber',       scoping => \&oe_scoping,    },
37
              sales_delivery_order    => { number_column => 'donumber',       number_range_column => 'sdonumber',      scoping => \&do_scoping,    },
38
              purchase_delivery_order => { number_column => 'donumber',       number_range_column => 'pdonumber',      scoping => \&do_scoping,    },
39
              supplier_delivery_order => { number_column => 'donumber',       number_range_column => 'sudonumber',     scoping => \&do_scoping,    },
40
              rma_delivery_order      => { number_column => 'donumber',       number_range_column => 'rdonumber',      scoping => \&do_scoping,    },
41
              sales_reclamation       => { number_column => 'record_number',  number_range_column => 's_reclamation_record_number',scoping => \&rec_scoping,   },
42
              purchase_reclamation    => { number_column => 'record_number',  number_range_column => 'p_reclamation_record_number',scoping => \&rec_scoping,   },
43
              customer                => { number_column => 'customernumber', number_range_column => 'customernumber',                             },
44
              vendor                  => { number_column => 'vendornumber',   number_range_column => 'vendornumber',                               },
45
              part                    => { number_column => 'partnumber',     number_range_column => 'articlenumber',                              },
46
              service                 => { number_column => 'partnumber',     number_range_column => 'servicenumber',                              },
47
              assembly                => { number_column => 'partnumber',     number_range_column => 'assemblynumber',                             },
48
              assortment              => { number_column => 'partnumber',     number_range_column => 'assortmentnumber',                           },
30
my %specs = ( ar                        => { number_column => 'invnumber',                                                                           },
31
              sales_quotation           => { number_column => 'quonumber',      number_range_column => 'sqnumber',       scoping => \&oe_scoping,    },
32
              sales_order_intake        => { number_column => 'ordnumber',      number_range_column => 'soinumber',      scoping => \&oe_scoping,    },
33
              sales_order               => { number_column => 'ordnumber',      number_range_column => 'sonumber',       scoping => \&oe_scoping,    },
34
              request_quotation         => { number_column => 'quonumber',      number_range_column => 'rfqnumber',      scoping => \&oe_scoping,    },
35
              purchase_quotation_intake => { number_column => 'quonumber',      number_range_column => 'pqinumber',      scoping => \&oe_scoping,    },
36
              purchase_order            => { number_column => 'ordnumber',      number_range_column => 'ponumber',       scoping => \&oe_scoping,    },
37
              sales_delivery_order      => { number_column => 'donumber',       number_range_column => 'sdonumber',      scoping => \&do_scoping,    },
38
              purchase_delivery_order   => { number_column => 'donumber',       number_range_column => 'pdonumber',      scoping => \&do_scoping,    },
39
              supplier_delivery_order   => { number_column => 'donumber',       number_range_column => 'sudonumber',     scoping => \&do_scoping,    },
40
              rma_delivery_order        => { number_column => 'donumber',       number_range_column => 'rdonumber',      scoping => \&do_scoping,    },
41
              sales_reclamation         => { number_column => 'record_number',  number_range_column => 's_reclamation_record_number',scoping => \&rec_scoping,   },
42
              purchase_reclamation      => { number_column => 'record_number',  number_range_column => 'p_reclamation_record_number',scoping => \&rec_scoping,   },
43
              customer                  => { number_column => 'customernumber', number_range_column => 'customernumber',                             },
44
              vendor                    => { number_column => 'vendornumber',   number_range_column => 'vendornumber',                               },
45
              part                      => { number_column => 'partnumber',     number_range_column => 'articlenumber',                              },
46
              service                   => { number_column => 'partnumber',     number_range_column => 'servicenumber',                              },
47
              assembly                  => { number_column => 'partnumber',     number_range_column => 'assemblynumber',                             },
48
              assortment                => { number_column => 'partnumber',     number_range_column => 'assortmentnumber',                           },
49 49
            );
50 50

  
51 51
sub get_next_trans_number {
SL/DB/Manager/Order.pm
28 28
  my $type   = lc(shift || '');
29 29
  my $prefix = shift || '';
30 30

  
31
  return (and => [ "!${prefix}customer_id" => undef,         "${prefix}quotation" => 1                       ]) if $type eq 'sales_quotation';
32
  return (and => [ "!${prefix}vendor_id"   => undef,         "${prefix}quotation" => 1, "${prefix}intake" => 0 ]) if $type eq 'request_quotation';
33
  return (and => [ "!${prefix}customer_id" => undef,         "${prefix}intake"    => 1                       ]) if $type eq 'sales_order_intake';
34
  return (and => [ "!${prefix}vendor_id"   => undef,         "${prefix}intake"    => 1, "${prefix}quotation" => 1 ]) if $type eq 'purchase_quotation_intake';
31
  return (and => [ "!${prefix}customer_id" => undef,         "${prefix}quotation" => 1                                                          ]) if $type eq 'sales_quotation';
32
  return (and => [ "!${prefix}vendor_id"   => undef,         "${prefix}quotation" => 1, "${prefix}intake"    => 0                               ]) if $type eq 'request_quotation';
33
  return (and => [ "!${prefix}customer_id" => undef,         "${prefix}intake"    => 1                                                          ]) if $type eq 'sales_order_intake';
34
  return (and => [ "!${prefix}vendor_id"   => undef,         "${prefix}intake"    => 1, "${prefix}quotation" => 1                               ]) if $type eq 'purchase_quotation_intake';
35 35
  return (and => [ "!${prefix}customer_id" => undef, or => [ "${prefix}quotation" => 0, "${prefix}quotation" => undef ], "${prefix}intake" => 0 ]) if $type eq 'sales_order';
36
  return (and => [ "!${prefix}vendor_id"   => undef, or => [ "${prefix}quotation" => 0, "${prefix}quotation" => undef ] ]) if $type eq 'purchase_order';
36
  return (and => [ "!${prefix}vendor_id"   => undef, or => [ "${prefix}quotation" => 0, "${prefix}quotation" => undef ]                         ]) if $type eq 'purchase_order';
37 37

  
38 38
  die "Unknown type $type";
39 39
}

Auch abrufbar als: Unified diff