Loeschen in diesem Fall heisst den Eintrag verwaisen, d.h. der Eintrag ist noch im System, aber keinem Kunden zugeordnet.
$main::lxdebug->leave_sub();
}
+sub delete_shipto {
+ $main::lxdebug->enter_sub();
+
+ my $self = shift;
+ my $shipto_id = shift;
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $dbh = $form->get_standard_dbh(\%myconfig);
+
+ do_query($form, $dbh, qq|UPDATE shipto SET trans_id = NULL WHERE shipto_id = ?|, $shipto_id);
+
+ $dbh->commit();
+
+ $main::lxdebug->leave_sub();
+}
+
1;
$lxdebug->leave_sub();
}
+sub delete_shipto {
+ $main::lxdebug->enter_sub();
+
+ $auth->assert('customer_vendor_edit');
+
+ CT->delete_shipto($form->{shipto_id});
+
+ @$form{ grep /^shipto/, keys %$form } = undef;
+
+ display();
+
+ $main::lxdebug->leave_sub();
+}
+
sub continue { call_sub($form->{nextsub}); }
'Delete' => 'Löschen',
'Delete Account' => 'Konto löschen',
'Delete Dataset' => 'Datenbank löschen',
- 'Delete Shipto' => 'Lieferadresse löschen',
+ 'Delete Shipto' => 'Lieferadresse löschen',
'Delete delivery order' => 'Lieferschein löschen',
'Delete drafts' => 'Entwürfe löschen',
'Delete group' => 'Gruppe löschen',
'continue' => 'continue',
'cov_selection_internal' => 'cov_selection_internal',
'delete' => 'delete',
+ 'delete_shipto' => 'delete_shipto',
'delivery_customer_selection' => 'delivery_customer_selection',
'display' => 'display',
'edit' => 'edit',
'erfassen' => 'add',
'weiter' => 'continue',
'löschen' => 'delete',
- 'lieferadresse_löschen' => 'delete_shipto',
+ 'lieferadresse_löschen' => 'delete_shipto',
'neue_ware' => 'new_part',
'speichern' => 'save',
'speichern_und_debitorenbuchung_erfassen' => 'save_and_ar_transaction',
</tr>
</table>
- <input type="submit" id="delete_shipto" name="delete_shipto" value="Lieferadresse löschen" disabled>
+ <input type="submit" id="delete_shipto" name="action" value="Lieferadresse löschen" disabled>
<br style="clear: left" />
</div>
</tr>
</table>
- <input type="submit" id="delete_shipto" name="delete_shipto" value="<translate>Delete Shipto</translate>" disabled>
+ <input type="submit" id="delete_shipto" name="action" value="<translate>Delete Shipto</translate>" disabled>
<br style="clear: left" />
</div>