From: Moritz Bunkus Date: Wed, 10 Jul 2013 13:47:06 +0000 (+0200) Subject: Pflichtenhefte: Maske fürs Erstellen von Angeboten/Aufträgen X-Git-Tag: release-3.2.0beta~467^2~129 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c1f5a8f3f28952c290edb35ee3c0a37f5621ef69;p=kivitendo-erp.git Pflichtenhefte: Maske fürs Erstellen von Angeboten/Aufträgen --- diff --git a/SL/Controller/RequirementSpecOrder.pm b/SL/Controller/RequirementSpecOrder.pm index 1822e2be3..696b862b4 100644 --- a/SL/Controller/RequirementSpecOrder.pm +++ b/SL/Controller/RequirementSpecOrder.pm @@ -6,6 +6,7 @@ use utf8; use parent qw(SL::Controller::Base); use SL::ClientJS; +use SL::DB::Customer; use SL::DB::Part; use SL::DB::RequirementSpec; use SL::DB::RequirementSpecOrder; @@ -14,7 +15,7 @@ use SL::Locale::String; use Rose::Object::MakeMethods::Generic ( - 'scalar --get_set_init' => [ qw(requirement_spec js all_parts) ], + 'scalar --get_set_init' => [ qw(requirement_spec js all_customers all_parts) ], ); __PACKAGE__->run_before('setup'); @@ -30,6 +31,14 @@ sub action_list { $self->render('requirement_spec_order/list', { layout => 0 }); } +sub action_new { + my ($self) = @_; + + my $html = $self->render('requirement_spec_order/new', { output => 0 }, make_part_title => sub { $_[0]->partnumber . ' ' . $_[0]->description }); + $self->js->html('#ui-tabs-4', $html) + ->render($self); +} + sub action_edit_assignment { my ($self) = @_; @@ -84,6 +93,7 @@ sub init_js { # helpers # -sub init_all_parts { SL::DB::Manager::Part->get_all_sorted } +sub init_all_customers { SL::DB::Manager::Customer->get_all_sorted } +sub init_all_parts { SL::DB::Manager::Part->get_all_sorted } 1; diff --git a/locale/de/all b/locale/de/all index 205709872..d1cefb9ff 100755 --- a/locale/de/all +++ b/locale/de/all @@ -592,6 +592,7 @@ $self->{texts} = { 'Create new department' => 'Neue Abteilung erfassen', 'Create new payment term' => 'Neue Zahlungsbedingung anlegen', 'Create new project type' => 'Neuen Projekttypen anlegen', + 'Create new quotation or order' => 'Neues Angebot oder neuen Auftrag anlegen', 'Create new qutoation/order' => 'Neues Angebot/neuen Auftrag anlegen', 'Create new templates from master templates' => 'Neue Druckvorlagen aus Vorlagensatz erstellen', 'Create new version' => 'Neue Version anlegen', @@ -1843,6 +1844,7 @@ $self->{texts} = { 'Record Vendor Invoice' => 'Einkaufsrechnung erfassen', 'Record in' => 'Buchen auf', 'Record number' => 'Belegnummer', + 'Record type to create' => 'Anzulegender Belegtyp', 'Recorded Tax' => 'Gespeicherte Steuern', 'Recorded taxkey' => 'Gespeicherter Steuerschlüssel', 'Reference' => 'Referenz', diff --git a/templates/webpages/requirement_spec_order/_assignment_form.html b/templates/webpages/requirement_spec_order/_assignment_form.html index cee29d0f0..f32e71524 100644 --- a/templates/webpages/requirement_spec_order/_assignment_form.html +++ b/templates/webpages/requirement_spec_order/_assignment_form.html @@ -1,9 +1,27 @@ [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%] -
- [% LxERP.t8("Assign the following article to all sections") %]: - [% L.select_tag('quotations_and_orders_dummy', SELF.all_parts, default=INSTANCE_CONF.get_requirement_spec_section_order_part_id, title_sub=\make_part_title, id='quoations_and_orders_order_id') %] - [% L.button_tag('kivi.requirement_spec.assign_order_part_id_to_all()', LxERP.t8('Assign article')) %] -
+[% SET style="width: 400px" %] + + +[% IF for_new %] + + + + + + + + + +[% END %] + + + + + +
[% LxERP.t8("Record type to create") %]:[% L.select_tag('quotation', [ [ 1, LxERP.t8('Sales quotation') ], [ 0, LxERP.t8('Sales Order') ] ], style=style, no_id=1) %]
[% LxERP.t8("Customer") %]:[% L.select_tag('customer_id', SELF.all_customers, default=SELF.requirement_spec.customer_id, title_key='name', style=style, no_id=1) %]
[% LxERP.t8("Assign the following article to all sections") %]: + [% L.select_tag('quotations_and_orders_dummy', SELF.all_parts, default=INSTANCE_CONF.get_requirement_spec_section_order_part_id, title_sub=\make_part_title, id='quoations_and_orders_order_id', style=style) %] + [% L.button_tag('kivi.requirement_spec.assign_order_part_id_to_all()', LxERP.t8('Assign article')) %] +
@@ -23,7 +41,7 @@ - + [% END %] diff --git a/templates/webpages/requirement_spec_order/new.html b/templates/webpages/requirement_spec_order/new.html new file mode 100644 index 000000000..7aaabd7e8 --- /dev/null +++ b/templates/webpages/requirement_spec_order/new.html @@ -0,0 +1,7 @@ +[%- USE LxERP -%][%- USE L -%] +
+

[% LxERP.t8("Create new quotation or order") %]

+ + [% INCLUDE 'requirement_spec_order/_assignment_form.html' + for_new=1 %] +
[% HTML.escape(section.fb_number) %] [% HTML.escape(section.title) %] [% HTML.escape(P.truncate(section.description)) %][% L.select_tag('sections[].order_part_id', SELF.all_parts, default=section.order_part_id, with_empty=1, title_sub=\make_part_title, no_id=1) %][% L.select_tag('sections[].order_part_id', SELF.all_parts, default=section.order_part_id, with_empty=!for_new, title_sub=\make_part_title, style=style, no_id=1) %]