Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 76383e4b

Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt

  • ID 76383e4bd057a778acc2b3be2f2db278448dfe77
  • Vorgänger 1fad5626
  • Nachfolger 0ff43ab4

DisplayableNamePrefs: Mandantenkonfiguration

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
12 12
use SL::DB::Language;
13 13
use SL::DB::Part;
14 14
use SL::DB::Unit;
15
use SL::DB::Customer;
15 16
use SL::Helper::Flash;
16 17
use SL::Locale::String qw(t8);
17 18
use SL::PriceSource::ALL;
......
24 25
use Rose::Object::MakeMethods::Generic (
25 26
  'scalar --get_set_init' => [ qw(defaults all_warehouses all_weightunits all_languages all_currencies all_templates all_price_sources h_unit_name available_quick_search_modules available_shipped_qty_item_identity_fields
26 27
                                  all_project_statuses all_project_types
27
                                  posting_options payment_options accounting_options inventory_options profit_options balance_startdate_method_options) ],
28
                                  posting_options payment_options accounting_options inventory_options profit_options balance_startdate_method_options
29
                                  displayable_name_specs_by_module) ],
28 30
);
29 31

  
30 32
sub action_edit {
......
131 133
    $self->defaults->templates('templates/' . $::form->{new_templates});
132 134
  }
133 135

  
136
  # Displayable name preferences
137
  foreach my $specs (@{ $::form->{displayable_name_specs} }) {
138
    $self->displayable_name_specs_by_module->{$specs->{module}}->{prefs}->store_default($specs->{default});
139
  }
140

  
134 141
  # Finally save defaults.
135 142
  $self->defaults->save;
136 143

  
......
202 209
  [ SL::Helper::ShippedQty->new->available_item_identity_fields ];
203 210
}
204 211

  
212
sub init_displayable_name_specs_by_module {
213
  +{
214
     'SL::DB::Customer' => {
215
       specs => SL::DB::Customer->displayable_name_specs,
216
       prefs => SL::DB::Customer->displayable_name_prefs,
217
     },
218
     'SL::DB::Vendor' => {
219
       specs => SL::DB::Vendor->displayable_name_specs,
220
       prefs => SL::DB::Vendor->displayable_name_prefs,
221
     },
222
     'SL::DB::Part' => {
223
       specs => SL::DB::Part->displayable_name_specs,
224
       prefs => SL::DB::Part->displayable_name_prefs,
225
     },
226
  };
227
}
228

  
205 229
#
206 230
# filters
207 231
#
templates/webpages/client_config/_features.html
343 343
  <td>[% LxERP.t8('Only applies if the previous is set to true. When filling up unlinked positions, consider them matches if ALL of these fields match. For example, in a business with variants that are defined by a special description, description needs to be part of the identity. If delivering several similar order positions by delivery date is common, reqdate should be included in the identity. Serialnumber is useful when the serialnumber in the order and delivery order has to match.') %]</td>
344 344
 </tr>
345 345

  
346
 <tr><td class="listheading" colspan="4">[% 'Displayable Name Preferences' | $T8 %]</td></tr>
347
 [% FOREACH module=SELF.displayable_name_specs_by_module.keys.sort %]
348
 [%- SET spec=SELF.displayable_name_specs_by_module.$module -%]
349
  <tr>
350
    <td align="right">[% spec.specs.title %]</td>
351
    <td>
352
      <table>
353
        <tr>
354
          <th align="left" class="listheading">[% 'Option' | $T8 %]</th>
355
          <th align="left" class="listheading">[% 'Name'   | $T8 %]</th>
356
        </tr>
357
        [% FOREACH option=spec.specs.options %]
358
        <tr>
359
          <td>[% option.title %]</td>
360
          <td>[% option.name  %]</td>
361
        </tr>
362
        [% END %]
363
        <tr>
364
          <th align="left">[% 'Display' | $T8 %]:</th>
365
          <td>
366
            [% L.hidden_tag("displayable_name_specs[+].module", module) %]
367
            [% L.input_tag("displayable_name_specs[].default", spec.prefs.get_default, size=50) %]
368
          </td>
369
        </tr>
370
      </table>
371
    </td>
372
    [% IF loop.first %]
373
    <td>[% 'The display of (mainly) picker results can be configured. To insert the value of one option use <%Name%>.' | $T8 %]<br>
374
        [% 'E.g. "<%customernumber%> <%name%>"' | $T8 %]
375
    </td>
376
    [% END %]
377
  </tr>
378
  [% END %]
379

  
346 380

  
347 381
</table>
348 382
</div>

Auch abrufbar als: Unified diff