Skip to content

Commit

Permalink
Schweizer QR-Rechnung: Kreditor Adressdaten validieren
Browse files Browse the repository at this point in the history
- Übersetzungen + locales lauf de/en
  • Loading branch information
rebootl committed Oct 17, 2023
1 parent 14db961 commit cf8581e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions SL/Template/OpenDocument.pm
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,17 @@ sub generate_qr_code {
currency => $form->{currency},
);

# validate address data
if (!$form->{'street'}) {
$::form->error($::locale->text('No street given.'));
}
if ($form->{'zipcode'} !~ m/^\d{4,}$/) {
$::form->error($::locale->text('Zipcode missing or wrong format.'));
}
if (!$form->{'city'}) {
$::form->error($::locale->text('No city given.'));
}

if (!$form->{qrbill_customer_countrycode}) {
$::form->error($::locale->text('Error mapping customer countrycode.'));
}
Expand Down
3 changes: 3 additions & 0 deletions locale/de/all
Original file line number Diff line number Diff line change
Expand Up @@ -2459,6 +2459,7 @@ $ ./scripts/installation_check.pl',
'No business selected or found!' => 'Kein Kunden-/Lieferantentyp ausgewählt oder gefunden!',
'No carry-over chart configured!' => 'Kein Saldenvortragskonto konfiguriert!',
'No changes since previous version.' => 'Keine Änderungen seit der letzten Version.',
'No city given.' => 'Stadt fehlt.',
'No clients have been created yet.' => 'Es wurden noch keine Mandanten angelegt.',
'No contact selected to delete' => 'Keine Ansprechperson zum Löschen ausgewählt',
'No contra account selected!' => 'Kein Gegenkonto ausgewählt!',
Expand Down Expand Up @@ -2514,6 +2515,7 @@ $ ./scripts/installation_check.pl',
'No shipto selected to delete' => 'Keine Lieferadresse zum Löschen ausgewählt',
'No start date given, setting to #1' => 'Kein Startdatum gegeben, setze Startdatum auf #1',
'No stock to transfer' => 'Keine Lagerbewegungen vorhanden',
'No street given.' => 'Straße fehlt.',
'No such job #1 in the database.' => 'Hintergrund-Job #1 existiert nicht mehr.',
'No summary account' => 'Kein Sammelkonto',
'No superuser credentials were entered.' => 'Es wurden keine Super-Benutzer-Anmeldedaten eingegeben.',
Expand Down Expand Up @@ -4840,6 +4842,7 @@ $ ./scripts/installation_check.pl',
'Zipcode' => 'PLZ',
'Zipcode (Shipping)' => 'PLZ (Lieferung)',
'Zipcode and city' => 'PLZ und Stadt',
'Zipcode missing or wrong format.' => 'Postleitzahl fehlt oder falsches Format.',
'[email]' => '[email]',
'absolute' => 'absolut',
'account' => 'konto',
Expand Down
3 changes: 3 additions & 0 deletions locale/en/all
Original file line number Diff line number Diff line change
Expand Up @@ -2458,6 +2458,7 @@ $self->{texts} = {
'No business selected or found!' => '',
'No carry-over chart configured!' => '',
'No changes since previous version.' => '',
'No city given.' => '',
'No clients have been created yet.' => '',
'No contact selected to delete' => '',
'No contra account selected!' => '',
Expand Down Expand Up @@ -2513,6 +2514,7 @@ $self->{texts} = {
'No shipto selected to delete' => '',
'No start date given, setting to #1' => '',
'No stock to transfer' => '',
'No street given.' => '',
'No such job #1 in the database.' => '',
'No summary account' => '',
'No superuser credentials were entered.' => '',
Expand Down Expand Up @@ -4838,6 +4840,7 @@ $self->{texts} = {
'Zipcode' => '',
'Zipcode (Shipping)' => '',
'Zipcode and city' => '',
'Zipcode missing or wrong format.' => '',
'[email]' => '',
'absolute' => '',
'account' => '',
Expand Down

0 comments on commit cf8581e

Please sign in to comment.