Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 56ad461a

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

  • ID 56ad461a3b6d156319ac904cb794e49d5b5eec70
  • Vorgänger 667dbd3d
  • Nachfolger 7ff16e6c

Auftrags-Eingang: DB und Nummernkreis

Unterschiede anzeigen:

SL/BackgroundJob/SetNumberRange.pm
29 29

  
30 30
  my $defaults   = SL::DB::Default->get;
31 31

  
32
  foreach (qw(invnumber cnnumber sonumber ponumber sqnumber rfqnumber sdonumber pdonumber)) {
32
  foreach (qw(invnumber cnnumber soinumber sonumber ponumber sqnumber rfqnumber sdonumber pdonumber)) {
33 33
    my $current_number = SL::PrefixedNumber->new(number => $defaults->{$_});
34 34
    $current_number->set_to($next_year * $multiplier);
35 35
    $defaults->{$_} = $current_number->get_current;
SL/DB/Helper/TransNumberGenerator.pm
29 29

  
30 30
my %specs = ( ar                      => { number_column => 'invnumber',                                                                           },
31 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,    },
32 33
              sales_order             => { number_column => 'ordnumber',      number_range_column => 'sonumber',       scoping => \&oe_scoping,    },
33 34
              request_quotation       => { number_column => 'quonumber',      number_range_column => 'rfqnumber',      scoping => \&oe_scoping,    },
34 35
              purchase_order          => { number_column => 'ordnumber',      number_range_column => 'ponumber',       scoping => \&oe_scoping,    },
SL/DB/Manager/Order.pm
30 30

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

  
SL/DB/MetaSetup/Default.pm
198 198
  show_longdescription_select_item          => { type => 'boolean', default => 'false' },
199 199
  show_weight                               => { type => 'boolean', default => 'false', not_null => 1 },
200 200
  signature                                 => { type => 'text' },
201
  soinumber                                 => { type => 'text' },
201 202
  sonumber                                  => { type => 'text' },
202 203
  sqnumber                                  => { type => 'text' },
203 204
  stocktaking_bin_id                        => { type => 'integer' },
SL/DB/MetaSetup/Order.pm
26 26
  expected_billing_date   => { type => 'date' },
27 27
  globalproject_id        => { type => 'integer' },
28 28
  id                      => { type => 'integer', not_null => 1, sequence => 'id' },
29
  intake                  => { type => 'boolean', default => 'false', not_null => 1 },
29 30
  intnotes                => { type => 'text' },
30 31
  itime                   => { type => 'timestamp', default => 'now()' },
31 32
  language_id             => { type => 'integer' },
SL/TransNumber.pm
17 17
);
18 18

  
19 19
my @SUPPORTED_TYPES = (
20
  qw(invoice invoice_for_advance_payment final_invoice credit_note customer vendor sales_delivery_order purchase_delivery_order sales_order purchase_order sales_quotation request_quotation part service assembly assortment letter),
20
  qw(invoice invoice_for_advance_payment final_invoice credit_note customer vendor sales_delivery_order purchase_delivery_order sales_order_intake sales_order purchase_order sales_quotation request_quotation part service assembly assortment letter),
21 21
  @{ SL::DB::DeliveryOrder::TypeData::valid_types() },
22 22
);
23 23

  
......
65 65
    $filters{where}         = 'NOT COALESCE(quotation, FALSE)';
66 66
    $filters{where}        .= $type =~ /^sales/ ? ' AND (customer_id IS NOT NULL)' : ' AND (vendor_id IS NOT NULL)';
67 67

  
68
  } elsif ($type =~ /^sales_order_intake$/) {
69
    $filters{trans_number}  = "ordnumber";
70
    $filters{numberfield}   = "soinumber";
71
    $filters{table}         = "oe";
72
    $filters{where}         = 'NOT COALESCE(quotation, FALSE)';
73
    $filters{where}        .= $type =~ /^sales/ ? ' AND (customer_id IS NOT NULL)' : ' AND (vendor_id IS NOT NULL)';
74

  
68 75
  } elsif ($type =~ /_quotation$/) {
69 76
    $filters{trans_number}  = "quonumber";
70 77
    $filters{numberfield}   = $type eq 'sales_quotation' ? "sqnumber" : "rfqnumber";
sql/Pg-upgrade2/oe_sales_order_intake_type.sql
1
-- @tag: oe_sales_order_intake_type
2
-- @description: Neuer Auftragsbeleg: Auftrags-Eingang (sales_order_intake)
3
-- @depends: release_3_6_0
4

  
5
ALTER TABLE oe ADD COLUMN intake BOOLEAN NOT NULL DEFAULT FALSE;
6
ALTER TABLE defaults ADD soinumber TEXT;
templates/webpages/client_config/_ranges_of_numbers.html
19 19
   <td>[% L.input_tag("defaults.p_reclamation_record_number", SELF.defaults.p_reclamation_record_number, size="15") %]</td>
20 20
  </tr>
21 21

  
22
  <tr>
23
   <td align="right" nowrap>[% LxERP.t8('Last Sales Order Intake Number') %]</td>
24
   <td>[% L.input_tag("defaults.soinumber", SELF.defaults.soinumber, size="15") %]</td>
25
  </tr>
26

  
22 27
  <tr>
23 28
   <td align="right" nowrap>[% LxERP.t8('Last Sales Order Number') %]</td>
24 29
   <td>[% L.input_tag("defaults.sonumber", SELF.defaults.sonumber, size="15") %]</td>

Auch abrufbar als: Unified diff