Revision c1f5a8f3
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/RequirementSpecOrder.pm | ||
---|---|---|
6 | 6 |
use parent qw(SL::Controller::Base); |
7 | 7 |
|
8 | 8 |
use SL::ClientJS; |
9 |
use SL::DB::Customer; |
|
9 | 10 |
use SL::DB::Part; |
10 | 11 |
use SL::DB::RequirementSpec; |
11 | 12 |
use SL::DB::RequirementSpecOrder; |
... | ... | |
14 | 15 |
|
15 | 16 |
use Rose::Object::MakeMethods::Generic |
16 | 17 |
( |
17 |
'scalar --get_set_init' => [ qw(requirement_spec js all_parts) ], |
|
18 |
'scalar --get_set_init' => [ qw(requirement_spec js all_customers all_parts) ],
|
|
18 | 19 |
); |
19 | 20 |
|
20 | 21 |
__PACKAGE__->run_before('setup'); |
... | ... | |
30 | 31 |
$self->render('requirement_spec_order/list', { layout => 0 }); |
31 | 32 |
} |
32 | 33 |
|
34 |
sub action_new { |
|
35 |
my ($self) = @_; |
|
36 |
|
|
37 |
my $html = $self->render('requirement_spec_order/new', { output => 0 }, make_part_title => sub { $_[0]->partnumber . ' ' . $_[0]->description }); |
|
38 |
$self->js->html('#ui-tabs-4', $html) |
|
39 |
->render($self); |
|
40 |
} |
|
41 |
|
|
33 | 42 |
sub action_edit_assignment { |
34 | 43 |
my ($self) = @_; |
35 | 44 |
|
... | ... | |
84 | 93 |
# helpers |
85 | 94 |
# |
86 | 95 |
|
87 |
sub init_all_parts { SL::DB::Manager::Part->get_all_sorted } |
|
96 |
sub init_all_customers { SL::DB::Manager::Customer->get_all_sorted } |
|
97 |
sub init_all_parts { SL::DB::Manager::Part->get_all_sorted } |
|
88 | 98 |
|
89 | 99 |
1; |
locale/de/all | ||
---|---|---|
592 | 592 |
'Create new department' => 'Neue Abteilung erfassen', |
593 | 593 |
'Create new payment term' => 'Neue Zahlungsbedingung anlegen', |
594 | 594 |
'Create new project type' => 'Neuen Projekttypen anlegen', |
595 |
'Create new quotation or order' => 'Neues Angebot oder neuen Auftrag anlegen', |
|
595 | 596 |
'Create new qutoation/order' => 'Neues Angebot/neuen Auftrag anlegen', |
596 | 597 |
'Create new templates from master templates' => 'Neue Druckvorlagen aus Vorlagensatz erstellen', |
597 | 598 |
'Create new version' => 'Neue Version anlegen', |
... | ... | |
1843 | 1844 |
'Record Vendor Invoice' => 'Einkaufsrechnung erfassen', |
1844 | 1845 |
'Record in' => 'Buchen auf', |
1845 | 1846 |
'Record number' => 'Belegnummer', |
1847 |
'Record type to create' => 'Anzulegender Belegtyp', |
|
1846 | 1848 |
'Recorded Tax' => 'Gespeicherte Steuern', |
1847 | 1849 |
'Recorded taxkey' => 'Gespeicherter Steuerschlüssel', |
1848 | 1850 |
'Reference' => 'Referenz', |
templates/webpages/requirement_spec_order/_assignment_form.html | ||
---|---|---|
1 | 1 |
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%] |
2 |
<div> |
|
3 |
[% LxERP.t8("Assign the following article to all sections") %]: |
|
4 |
[% 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') %] |
|
5 |
[% L.button_tag('kivi.requirement_spec.assign_order_part_id_to_all()', LxERP.t8('Assign article')) %] |
|
6 |
</div> |
|
2 |
[% SET style="width: 400px" %] |
|
3 |
|
|
4 |
<table> |
|
5 |
[% IF for_new %] |
|
6 |
<tr> |
|
7 |
<td>[% LxERP.t8("Record type to create") %]:</td> |
|
8 |
<td>[% L.select_tag('quotation', [ [ 1, LxERP.t8('Sales quotation') ], [ 0, LxERP.t8('Sales Order') ] ], style=style, no_id=1) %]</td> |
|
9 |
</tr> |
|
10 |
|
|
11 |
<tr> |
|
12 |
<td>[% LxERP.t8("Customer") %]:</td> |
|
13 |
<td>[% L.select_tag('customer_id', SELF.all_customers, default=SELF.requirement_spec.customer_id, title_key='name', style=style, no_id=1) %]</td> |
|
14 |
</tr> |
|
15 |
[% END %] |
|
16 |
|
|
17 |
<tr> |
|
18 |
<td>[% LxERP.t8("Assign the following article to all sections") %]:</td> |
|
19 |
<td> |
|
20 |
[% 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) %] |
|
21 |
[% L.button_tag('kivi.requirement_spec.assign_order_part_id_to_all()', LxERP.t8('Assign article')) %] |
|
22 |
</td> |
|
23 |
</tr> |
|
24 |
</table> |
|
7 | 25 |
|
8 | 26 |
<form id="quotations_and_orders_article_assignment_form"> |
9 | 27 |
<table style="width: 100%"> |
... | ... | |
23 | 41 |
<td>[% HTML.escape(section.fb_number) %]</td> |
24 | 42 |
<td>[% HTML.escape(section.title) %]</td> |
25 | 43 |
<td>[% HTML.escape(P.truncate(section.description)) %]</td> |
26 |
<td>[% 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) %]</td>
|
|
44 |
<td>[% 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) %]</td>
|
|
27 | 45 |
</tr> |
28 | 46 |
[% END %] |
29 | 47 |
</tbody> |
templates/webpages/requirement_spec_order/new.html | ||
---|---|---|
1 |
[%- USE LxERP -%][%- USE L -%] |
|
2 |
<div id="quotations_and_orders_new" class="quotations-and-orders-edit-assignment-context-menu"> |
|
3 |
<h2>[% LxERP.t8("Create new quotation or order") %]</h2> |
|
4 |
|
|
5 |
[% INCLUDE 'requirement_spec_order/_assignment_form.html' |
|
6 |
for_new=1 %] |
|
7 |
</div> |
Auch abrufbar als: Unified diff
Pflichtenhefte: Maske fürs Erstellen von Angeboten/Aufträgen