Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6532a6e8

Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt

  • ID 6532a6e8ddfa2a9d21485600516611eda31155a1
  • Vorgänger 758efd36
  • Nachfolger b9b39882

Kunden/Lieferanten: UStId/Steuernr. eindeutig: Prüfung im Controller

Unterschiede anzeigen:

SL/Controller/CustomerVendor.pm
185 185
      }
186 186
    }
187 187

  
188
    $self->{cv}->ustid(    trim($self->{cv}->ustid))     if $self->{cv}->ustid;
189
    $self->{cv}->taxnumber(trim($self->{cv}->taxnumber)) if $self->{cv}->taxnumber;
190

  
191
    if ( $self->is_vendor() && $::instance_conf->get_vendor_ustid_taxnummer_unique) {
192
      $::form->error(t8('VAT ID and/or taxnumber must be given.')) if !($self->{cv}->ustid || $self->{cv}->taxnumber);
193

  
194
      my $count;
195
      $count += SL::DB::Manager::Vendor->get_all_count(query => ['!id' => $self->{cv}->id, ustid     => $self->{cv}->ustid])     if $self->{cv}->ustid;
196
      $count += SL::DB::Manager::Vendor->get_all_count(query => ['!id' => $self->{cv}->id, taxnumber => $self->{cv}->taxnumber]) if $self->{cv}->taxnumber;
197

  
198
      $::form->error(t8('A vendor with the same VAT ID or taxnumber already exists.')) if $count;
199
    }
200
    if ($self->is_customer() && $::instance_conf->get_customer_ustid_taxnummer_unique) {
201
      $::form->error(t8('VAT ID and/or taxnumber must be given.')) if !($self->{cv}->ustid || $self->{cv}->taxnumber);
202

  
203
      my $count;
204
      $count += SL::DB::Manager::Customer->get_all_count(query => ['!id' => $self->{cv}->id, ustid     => $self->{cv}->ustid])     if $self->{cv}->ustid;
205
      $count += SL::DB::Manager::Customer->get_all_count(query => ['!id' => $self->{cv}->id, taxnumber => $self->{cv}->taxnumber]) if $self->{cv}->taxnumber;
206

  
207
      $::form->error(t8('A customer with the same VAT ID or taxnumber already exists.')) if $count;
208
    }
209

  
188 210
    $self->{cv}->save(cascade => 1);
189 211

  
190 212
    SL::DB::Greeting->new(description => $self->{cv}->greeting)->save if $save_greeting;
locale/de/all
55 55
  'A canceled general ledger transaction cannot be deleted.' => 'Eine stornierte Dialogbuchung kann nicht gelöscht werden.',
56 56
  'A canceled general ledger transaction cannot be posted.' => 'Eine stornierte Dialogbuchung kann nicht mehr gebucht werden.',
57 57
  'A canceled invoice cannot be posted.' => 'Eine stornierte Rechnung kann nicht mehr gebucht werden.',
58
  'A customer with the same VAT ID or taxnumber already exists.' => 'Ein Kunde mit der gleichen UStId oder Steuernummer existiert bereits.',
58 59
  'A digit is required.'        => 'Eine Ziffer ist vorgeschrieben.',
59 60
  'A directory with the name for the new print templates exists already.' => 'Ein Verzeichnis mit dem selben Namen wie die neuen Druckvorlagen existiert bereits.',
60 61
  'A lot of the usability of kivitendo has been enhanced with javascript. Although it is currently possible to use every aspect of kivitendo without javascript, we strongly recommend it. In a future version this may change and javascript may be necessary to access advanced features.' => 'Die Bedienung von kivitendo wurde an vielen Stellen mit Javascript verbessert. Obwohl es derzeit möglich ist, jeden Aspekt von kivitendo auch ohne Javascript zu benutzen, empfehlen wir es. In einer zukünftigen Version wird Javascript eventuell notwendig sein um weitergehende Features zu benutzen.',
......
67 68
  'A valid taxkey is missing!'  => 'Ein gültiger Steuerschlüssel fehlt!',
68 69
  'A variable marked as \'Deactivate by default\' isn\'t automatically added to all articles, and has to be explicitly added for each desired article in its master data tab. Only then can the variable be used for that article in the records.' => 'Eine als \'Deaktiviert als Voreinstellung\' markierte Variable wird nicht automatisch bei allen Artikeln hinzugefügt, sondern muß explizit für jeden gewünschten Artikel in den Stammdaten aktiviert werden. Erst danach ist die Variable für den Artikel in Belegen bearbeitbar.',
69 70
  'A variable marked as \'editable\' can be changed in each quotation, order, invoice etc.' => 'Eine als \'editierbar\' markierte Variable kann in jedem Angebot, Auftrag, jeder Rechnung etc für jede Position geändert werden.',
71
  'A vendor with the same VAT ID or taxnumber already exists.' => 'Ein Lieferant mit der gleichen UStId oder Steuernummer existiert bereits.',
70 72
  'ADDED'                       => 'Hinzugefügt',
71 73
  'AP'                          => 'Einkauf',
72 74
  'AP Aging'                    => 'Offene Verbindlichkeiten',
......
3924 3926
  'Usually the delivery date of an order is the next working day. If a value is set here this value will be added to the delivery date of the sales order. The resulting date will be adjusted to the next working day if it ends up on a weekend.' => 'Standardmäßig ist das vorausgewählte Lieferdatum der nächste Arbeitstag. Falls hier ein Wert gesetzt ist, wird dieser zum eigentlichen Lieferdatum hinzuaddiert. Fällt das daraus resultierende Datum auf ein Wochenende, so wird der nächste Werktag genommen.',
3925 3927
  'Usually the sales quotation is valid until the next working day. If a value is set here then the quotation will be valid for at least that many days. The resulting date will be adjusted to the next working day if it ends up on a weekend.' => 'Standardmäßig ist ein Verkaufsangebot bis zum nächsten Werktag gültig. Ist hier ein Wert angegeben, so ist ein Angebot mindestens so viele Tage gültig. Sollte das dabei herauskommende Datum auf ein Wochenende fallen, so wird statt dessen der nachfolgende Arbeitstag genommen.',
3926 3928
  'VAT ID'                      => 'USt-IdNr.',
3929
  'VAT ID and/or taxnumber must be given.' => 'UStId und/oder Steuernummer muss angegeben werden.',
3927 3930
  'VN'                          => 'Kred.-Nr.',
3928 3931
  'Valid'                       => 'Gültig',
3929 3932
  'Valid from'                  => 'Gültig ab',
locale/en/all
55 55
  'A canceled general ledger transaction cannot be deleted.' => '',
56 56
  'A canceled general ledger transaction cannot be posted.' => '',
57 57
  'A canceled invoice cannot be posted.' => '',
58
  'A customer with the same VAT ID or taxnumber already exists.' => '',
58 59
  'A digit is required.'        => '',
59 60
  'A directory with the name for the new print templates exists already.' => '',
60 61
  'A lot of the usability of kivitendo has been enhanced with javascript. Although it is currently possible to use every aspect of kivitendo without javascript, we strongly recommend it. In a future version this may change and javascript may be necessary to access advanced features.' => '',
......
67 68
  'A valid taxkey is missing!'  => '',
68 69
  'A variable marked as \'Deactivate by default\' isn\'t automatically added to all articles, and has to be explicitly added for each desired article in its master data tab. Only then can the variable be used for that article in the records.' => '',
69 70
  'A variable marked as \'editable\' can be changed in each quotation, order, invoice etc.' => '',
71
  'A vendor with the same VAT ID or taxnumber already exists.' => '',
70 72
  'ADDED'                       => '',
71 73
  'AP'                          => 'Purchases',
72 74
  'AP Aging'                    => 'Creditor Aging',
......
3923 3925
  'Usually the delivery date of an order is the next working day. If a value is set here this value will be added to the delivery date of the sales order. The resulting date will be adjusted to the next working day if it ends up on a weekend.' => '',
3924 3926
  'Usually the sales quotation is valid until the next working day. If a value is set here then the quotation will be valid for at least that many days. The resulting date will be adjusted to the next working day if it ends up on a weekend.' => '',
3925 3927
  'VAT ID'                      => '',
3928
  'VAT ID and/or taxnumber must be given.' => '',
3926 3929
  'VN'                          => '',
3927 3930
  'Valid'                       => '',
3928 3931
  'Valid from'                  => '',

Auch abrufbar als: Unified diff