Revision c1f5a8f3
Von Moritz Bunkus vor fast 11 Jahren hinzugefügt
SL/Controller/RequirementSpecOrder.pm | ||
---|---|---|
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;
|
||
... | ... | |
|
||
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');
|
||
... | ... | |
$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) = @_;
|
||
|
||
... | ... | |
# 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;
|
locale/de/all | ||
---|---|---|
'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',
|
||
... | ... | |
'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',
|
templates/webpages/requirement_spec_order/_assignment_form.html | ||
---|---|---|
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%]
|
||
<div>
|
||
[% 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')) %]
|
||
</div>
|
||
[% SET style="width: 400px" %]
|
||
|
||
<table>
|
||
[% IF for_new %]
|
||
<tr>
|
||
<td>[% LxERP.t8("Record type to create") %]:</td>
|
||
<td>[% L.select_tag('quotation', [ [ 1, LxERP.t8('Sales quotation') ], [ 0, LxERP.t8('Sales Order') ] ], style=style, no_id=1) %]</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>[% LxERP.t8("Customer") %]:</td>
|
||
<td>[% L.select_tag('customer_id', SELF.all_customers, default=SELF.requirement_spec.customer_id, title_key='name', style=style, no_id=1) %]</td>
|
||
</tr>
|
||
[% END %]
|
||
|
||
<tr>
|
||
<td>[% LxERP.t8("Assign the following article to all sections") %]:</td>
|
||
<td>
|
||
[% 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')) %]
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<form id="quotations_and_orders_article_assignment_form">
|
||
<table style="width: 100%">
|
||
... | ... | |
<td>[% HTML.escape(section.fb_number) %]</td>
|
||
<td>[% HTML.escape(section.title) %]</td>
|
||
<td>[% HTML.escape(P.truncate(section.description)) %]</td>
|
||
<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>
|
||
<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>
|
||
</tr>
|
||
[% END %]
|
||
</tbody>
|
templates/webpages/requirement_spec_order/new.html | ||
---|---|---|
[%- USE LxERP -%][%- USE L -%]
|
||
<div id="quotations_and_orders_new" class="quotations-and-orders-edit-assignment-context-menu">
|
||
<h2>[% LxERP.t8("Create new quotation or order") %]</h2>
|
||
|
||
[% INCLUDE 'requirement_spec_order/_assignment_form.html'
|
||
for_new=1 %]
|
||
</div>
|
Auch abrufbar als: Unified diff
Pflichtenhefte: Maske fürs Erstellen von Angeboten/Aufträgen