Skip to content

Commit a0206f6

Browse files
committed
- Make sure a client cannot be deleted if he has records in the billing module.
1 parent 22903ac commit a0206f6

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

interface/lib/classes/tform_actions.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ function onDelete() {
313313
$this->dataRecord = $app->tform->getDataRecord($this->id);
314314

315315
$this->onBeforeDelete();
316-
316+
$app->plugin->raiseEvent($_SESSION['s']['module']['name'].':'.$app->tform->formDef['name'].':'.'on_before_delete',$this);
317+
317318
// Saving record to datalog when db_history enabled
318319
if($app->tform->formDef["db_history"] == 'yes') {
319320
//$old_data_record = $app->tform->getDataRecord($this->id);

interface/lib/lang/de.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,5 @@ $wb['no_destination_perm'] = 'Sie haben keine Berechtigung für dieses Ziel.';
136136
$wb['client_you_are_locked'] = 'Sie haben keine Berechtigung, Einstellungen zu verändern.';
137137
$wb['gender_m_txt'] = 'Herr';
138138
$wb['gender_f_txt'] = 'Frau';
139+
$wb['client_cannot_be_deleted_because_of_billing_module_txt'] = 'Für den Kunden existieren Einträge im Billing-Modul, daher kann er nicht gelöscht werden.';
139140
?>

interface/lib/lang/en.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,5 @@ $wb["no_destination_perm"] = 'You have no permission for this destination.';
138138
$wb['client_you_are_locked'] = 'You have no permission to change any settings.';
139139
$wb['gender_m_txt'] = 'Mr.';
140140
$wb['gender_f_txt'] = 'Ms.';
141+
$wb['client_cannot_be_deleted_because_of_billing_module_txt'] = 'This client has records in the billing module, therefore he cannot be deleted.';
141142
?>

0 commit comments

Comments
 (0)