Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision bf6510a2

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID bf6510a20da3a14553c8cb041b488b5b1b2b9d11
  • Vorgänger 8ef7fee7
  • Nachfolger 57717cbb

Mandantenkonfiguration: Pflichtenheftstandardartikel mit Partpicker auswählen

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
19 19
__PACKAGE__->run_before('check_auth');
20 20

  
21 21
use Rose::Object::MakeMethods::Generic (
22
  'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates all_parts_time_unit
22
  'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates h_unit_name
23 23
                                  posting_options payment_options accounting_options inventory_options profit_options accounts balance_startdate_method_options) ],
24 24
);
25 25

  
......
143 143
sub init_all_currencies  { SL::DB::Manager::Currency->get_all_sorted                                                     }
144 144
sub init_all_weightunits { my $unit = SL::DB::Manager::Unit->find_by(name => 'kg'); $unit ? $unit->convertible_units : [] }
145 145
sub init_all_templates   { +{ SL::Template->available_templates }                                                        }
146

  
147
sub init_all_parts_time_unit {
148
  my $h_unit = first { $_ } map { SL::DB::Manager::Unit->find_by(name => $_) } qw(Std h Stunde);
149
  return [] unless $h_unit;
150

  
151
  my @convertible_unit_names = map { $_->name } @{ $h_unit->convertible_units };
152

  
153
  return SL::DB::Manager::Part->get_all_sorted(where => [ unit => \@convertible_unit_names ]);
154
}
146
sub init_h_unit_name     { first { SL::DB::Manager::Unit->find_by(name => $_) } qw(Std h Stunde)                         };
155 147

  
156 148
sub init_posting_options {
157 149
  [ { title => t8("never"),           value => 0           },
......
226 218
sub edit_form {
227 219
  my ($self) = @_;
228 220

  
221
  $::request->layout->use_javascript("${_}.js") for qw(autocomplete_part);
222

  
229 223
  $self->render('client_config/form', title => t8('Client Configuration'),
230 224
                make_chart_title     => sub { $_[0]->accno . '--' . $_[0]->description },
231 225
                make_templates_value => sub { 'templates/' . $_[0] },
232
                make_part_title      => sub { $_[0]->partnumber . ' ' . $_[0]->description },
233 226
              );
234 227
}
235 228

  
locale/de/all
993 993
  'Error: Name missing'         => 'Fehler: Name fehlt',
994 994
  'Error: Part not found'       => 'Fehler: Artikel nicht gefunden',
995 995
  'Error: Unit missing or invalid' => 'Fehler: Einheit fehlt oder ungültig',
996
  'Error: this feature requires that articles with a time-based unit (e.g. \'h\' or \'min\') exist.' => 'Fehler: dieses Feature setzt voraus, dass Artikel mit einer Zeit-basierenden Einheit (z.B. "Std") existieren.',
996 997
  'Errors'                      => 'Fehler',
997 998
  'Ertrag'                      => 'Ertrag',
998 999
  'Ertrag prozentual'           => 'Ertrag prozentual',
templates/webpages/client_config/_features.html
1
[%- USE LxERP -%][%- USE L -%]
1
[%- USE LxERP -%][%- USE L -%][%- USE P -%]
2 2
<div id="features">
3 3
 <table>
4 4
  <tr><td class="listheading" colspan="4">[% LxERP.t8("WebDAV") %]</td></tr>
......
61 61

  
62 62
  <tr>
63 63
   <td align="right">[% LxERP.t8('Default article for converting into quotations and orders') %]</td>
64
   <td>[% L.select_tag('defaults.requirement_spec_section_order_part_id', SELF.all_parts_time_unit, default=SELF.defaults.requirement_spec_section_order_part_id, with_empty=1, title_sub=\make_part_title) %]</td>
64
   <td>
65
    [% IF SELF.h_unit_name %]
66
     [% P.part_picker('defaults.requirement_spec_section_order_part_id', SELF.defaults.requirement_spec_section_order_part_id, convertible_unit=SELF.h_unit_name, style=style) %]
67
    [% ELSE %]
68
     [% LxERP.t8("Error: this feature requires that articles with a time-based unit (e.g. 'h' or 'min') exist.") %]
69
    [% END %]
70
   </td>
65 71
   <td>[% LxERP.t8('When converting a requirement spec into a quotation or an oder each section gets converted into a line position in the new record. This is the article used by default for this conversion.') %]</td>
66 72
  </tr>
67 73
 </table>

Auch abrufbar als: Unified diff