Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20231017 fix qrbill addr validation #209

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 3 additions & 1 deletion 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 Expand Up @@ -4996,7 +4999,6 @@ $ ./scripts/installation_check.pl',
'missing' => 'Fehlbestand',
'missing file for action import' => 'Es wurde keine Datei zum Hochladen ausgewählt',
'missing_br' => 'Fehl.',
'mobile version' => 'Mobil-Version',
'month' => 'Monatliche Abgabe',
'monthly' => 'monatlich',
'more' => 'mehr',
Expand Down
4 changes: 3 additions & 1 deletion 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 Expand Up @@ -4994,7 +4997,6 @@ $self->{texts} = {
'missing' => '',
'missing file for action import' => '',
'missing_br' => 'missing',
'mobile version' => '',
'month' => '',
'monthly' => '',
'more' => '',
Expand Down