From: Moritz Bunkus Date: Thu, 11 Jul 2013 15:49:11 +0000 (+0200) Subject: Pflichtenhefte: Löschen von Aufträgen/Angeboten X-Git-Tag: release-3.2.0beta~467^2~126 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e142cf7d27b16c1cab36fa28d4fca6e81e3ed816;p=kivitendo-erp.git Pflichtenhefte: Löschen von Aufträgen/Angeboten --- diff --git a/SL/Controller/RequirementSpecOrder.pm b/SL/Controller/RequirementSpecOrder.pm index 6dfab604b..e444a7cc9 100644 --- a/SL/Controller/RequirementSpecOrder.pm +++ b/SL/Controller/RequirementSpecOrder.pm @@ -154,6 +154,20 @@ sub action_save_assignment { ->render($self); } +sub action_delete { + my ($self) = @_; + + my $order = $self->rs_order->order; + + $order->delete; + $self->init_requirement_spec; + + my $html = $self->render('requirement_spec_order/list', { output => 0 }); + $self->js->html('#' . TAB_ID(), $html) + ->flash('info', $order->quotation ? t8('Sales quotation #1 has been deleted.', $order->quonumber) : t8('Sales order #1 has been deleted.', $order->ordnumber)) + ->render($self); +} + sub action_cancel { my ($self) = @_; diff --git a/js/requirement_spec.js b/js/requirement_spec.js index 6ea5329ca..160240df4 100644 --- a/js/requirement_spec.js +++ b/js/requirement_spec.js @@ -344,6 +344,12 @@ ns.standard_quotation_order_ajax_call = function(key, opt) { return true; }; +ns.ask_delete_quotation_order = function(key, opt) { + if (confirm(kivi.t8("Are you sure?"))) + ns.standard_quotation_order_ajax_call(key, opt); + return true; +}; + ns.disable_edit_quotation_order_commands = function(key, opt) { return ns.find_quotation_order_id(opt.$trigger) == undefined; }; diff --git a/locale/de/all b/locale/de/all index af60767a2..71e9ba0ee 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1955,11 +1955,13 @@ $self->{texts} = { 'Sales margin %' => 'Marge prozentual', 'Sales net amount' => 'VK-Betrag', 'Sales order #1 has been created.' => 'Kundenauftrag #1 wurde angelegt.', + 'Sales order #1 has been deleted.' => 'Kundenauftrag #1 wurde gelöscht.', 'Sales order #1 has been updated.' => 'Kundenauftrag #1 wurde aktualisiert.', 'Sales price' => 'VK-Preis', 'Sales price total' => 'VK-Betrag', 'Sales quotation' => 'Angebot', 'Sales quotation #1 has been created.' => 'Angebot #1 wurde angelegt.', + 'Sales quotation #1 has been deleted.' => 'Angebot #1 wurde gelöscht.', 'Sales quotation #1 has been updated.' => 'Angebot #1 wurde aktualisiert.', 'Salesman' => 'Verkäufer/in', 'Salesman (database ID)' => 'Verkäufer (Datenbank-ID)',