Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cffbc700

Von Cem Aydin vor etwa 1 Jahr hinzugefügt

  • ID cffbc7000834fa9af818c6c7a2a56b8538058eb4
  • Vorgänger cf8581ed

Schweizer QR-Rechnung: Adressen auf Adresstyp S umstellen

- innerhalb des QR-Code Adresstyp S verwenden
- Validierung angepasst: Strasse und Hausnummer können leer sein
- changelog Eintrag
- locale update

Unterschiede anzeigen:

SL/Template/OpenDocument.pm
13 13
use SL::Template::OpenDocument::Styles;
14 14

  
15 15
use SL::Helper::QrBill;
16
use SL::Helper::QrBillFunctions qw(get_ref_number_formatted get_iban_formatted get_amount_formatted);
16
use SL::Helper::QrBillFunctions qw(
17
  get_ref_number_formatted get_iban_formatted get_amount_formatted
18
  get_street_name_from_address_line get_building_number_from_address_line
19
);
17 20

  
18 21
use Cwd;
19 22
# use File::Copy;
......
492 495
    $::form->error($::locale->text('Error mapping biller countrycode.'));
493 496
  }
494 497
  my %biller_data = (
495
    address_type => 'K',
498
    address_type => 'S',
496 499
    company => $::instance_conf->get_company(),
497
    address_row1 => $::instance_conf->get_address_street1(),
498
    address_row2 => $::instance_conf->get_address_zipcode() . ' ' . $::instance_conf->get_address_city(),
500
    street => get_street_name_from_address_line($::instance_conf->get_address_street1()),
501
    street_no => get_building_number_from_address_line($::instance_conf->get_address_street1()),
502
    postalcode => $::instance_conf->get_address_zipcode(),
503
    city => $::instance_conf->get_address_city(),
499 504
    countrycode => $form->{qrbill_biller_countrycode},
500 505
  );
501 506

  
......
518 523
    currency => $form->{currency},
519 524
  );
520 525

  
526
  # get address data from billing address if given, otherwise from invoice
527
  my $street_name = get_street_name_from_address_line($form->{billing_address_id} ?
528
      $form->{billing_address_street} :
529
      $form->{street});
530
  my $building_number = get_building_number_from_address_line($form->{billing_address_id} ?
531
      $form->{billing_address_street} :
532
      $form->{street});
533
  my $postalcode = $form->{billing_address_id} ?
534
      $form->{billing_address_zipcode} :
535
      $form->{zipcode};
536
  my $city = $form->{billing_address_id} ?
537
      $form->{billing_address_city} :
538
      $form->{city};
539

  
521 540
  # validate address data
522
  if (!$form->{'street'}) {
523
    $::form->error($::locale->text('No street given.'));
524
  }
525
  if ($form->{'zipcode'} !~ m/^\d{4,}$/) {
541
  if ($postalcode !~ m/^\d{4,}$/) {
526 542
    $::form->error($::locale->text('Zipcode missing or wrong format.'));
527 543
  }
528
  if (!$form->{'city'}) {
544
  if (!$city) {
529 545
    $::form->error($::locale->text('No city given.'));
530 546
  }
531

  
532 547
  if (!$form->{qrbill_customer_countrycode}) {
533 548
    $::form->error($::locale->text('Error mapping customer countrycode.'));
534 549
  }
535 550

  
536 551
  my %invoice_recipient_data = (
537
    address_type => 'K',
552
    address_type => 'S',
538 553
    name => $form->{billing_address_id} ?
539 554
              $form->{billing_address_name} :
540 555
              $form->{name},
541
    address_row1 => $form->{billing_address_id} ?
542
                      $form->{billing_address_street} :
543
                      $form->{street},
544
    address_row2 => $form->{billing_address_id} ?
545
                      $form->{billing_address_zipcode} . ' ' . $form->{billing_address_city} :
546
                      $form->{zipcode} . ' ' . $form->{city},
556
    street => $street_name,
557
    street_no => $building_number,
558
    postalcode => $postalcode,
559
    city => $city,
547 560
    countrycode => $form->{qrbill_customer_countrycode},
548 561
  );
549 562

  
doc/changelog
88 88

  
89 89
Kleinere neue Features und Detailverbesserungen:
90 90

  
91
  - Schweizer QR-Rechnungen: Bei der Erzeugung via OpenDocument, innerhalb des QR-Code
92
    Adresstyp S anstatt K verwenden
91 93
  - Bei den Bankkonten Auswahlmöglichkeit hinzugefügt, ob das Konto für den Bankimport
92 94
    verwendet (und somit für manuelle Buchungen gesperrt) werden soll
93 95
    (Standardwert und für bestehende Mandanten: Ja)
locale/de/all
2515 2515
  'No shipto selected to delete' => 'Keine Lieferadresse zum Löschen ausgewählt',
2516 2516
  'No start date given, setting to #1' => 'Kein Startdatum gegeben, setze Startdatum auf #1',
2517 2517
  'No stock to transfer'        => 'Keine Lagerbewegungen vorhanden',
2518
  'No street given.'            => 'Straße fehlt.',
2519 2518
  'No such job #1 in the database.' => 'Hintergrund-Job #1 existiert nicht mehr.',
2520 2519
  'No summary account'          => 'Kein Sammelkonto',
2521 2520
  'No superuser credentials were entered.' => 'Es wurden keine Super-Benutzer-Anmeldedaten eingegeben.',
locale/en/all
2514 2514
  'No shipto selected to delete' => '',
2515 2515
  'No start date given, setting to #1' => '',
2516 2516
  'No stock to transfer'        => '',
2517
  'No street given.'            => '',
2518 2517
  'No such job #1 in the database.' => '',
2519 2518
  'No summary account'          => '',
2520 2519
  'No superuser credentials were entered.' => '',

Auch abrufbar als: Unified diff