Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5384e5cb

Von Sven Schöling vor etwa 10 Jahren hinzugefügt

  • ID 5384e5cb7568d04e61bb5c712d7953df046f3a2c
  • Vorgänger cf63992e
  • Nachfolger 392e0365

PriceSource: Konfiguration

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
14 14
use SL::DB::Unit;
15 15
use SL::Helper::Flash;
16 16
use SL::Locale::String qw(t8);
17
use SL::PriceSource::ALL;
17 18
use SL::Template;
18 19

  
19 20
__PACKAGE__->run_before('check_auth');
20 21

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

  
......
36 37
  my $defaults             = delete($::form->{defaults}) || {};
37 38
  my $entered_currencies   = delete($::form->{currencies}) || [];
38 39
  my $original_currency_id = $self->defaults->currency_id;
40
  $defaults->{disabled_price_sources} ||= [];
39 41

  
40 42
  # undef several fields if an empty value has been selected.
41 43
  foreach (qw(warehouse_id bin_id warehouse_id_ignore_onhand bin_id_ignore_onhand)) {
......
203 205
  return \%accounts;
204 206
}
205 207

  
208
sub init_all_price_sources {
209
  my @classes = SL::PriceSource::ALL->all_price_sources;
210

  
211
  [ map { [ $_->name, $_->description ] } @classes ];
212
}
213

  
206 214
#
207 215
# filters
208 216
#
......
218 226
sub edit_form {
219 227
  my ($self) = @_;
220 228

  
229
  $::request->layout->use_javascript("${_}.js") for qw(jquery.selectboxes jquery.multiselect2side);
230

  
221 231
  $self->render('client_config/form', title => t8('Client Configuration'),
222 232
                make_chart_title     => sub { $_[0]->accno . '--' . $_[0]->description },
223 233
                make_templates_value => sub { 'templates/' . $_[0] },
SL/DB/MetaSetup/Default.pm
42 42
  datev_check_on_sales_invoice              => { type => 'boolean', default => 'true' },
43 43
  delivery_plan_calculate_transferred_do    => { type => 'boolean', default => 'false', not_null => 1 },
44 44
  delivery_plan_show_value_of_goods         => { type => 'boolean', default => 'false', not_null => 1 },
45
  disabled_price_sources                    => { type => 'array' },
45 46
  dunning_ar                                => { type => 'integer' },
46 47
  dunning_ar_amount_fee                     => { type => 'integer' },
47 48
  dunning_ar_amount_interest                => { type => 'integer' },
SL/PriceSource.pm
16 16

  
17 17
  return map {
18 18
    $_->new(record_item => $self->record_item, record => $self->record)
19
  } SL::PriceSource::ALL->all_price_sources
19
  } SL::PriceSource::ALL->all_enabled_price_sources
20 20
}
21 21

  
22 22
sub price_from_source {
SL/PriceSource/ALL.pm
17 17
  makemodel
18 18
);
19 19

  
20
sub all_enabled_price_sources {
21
  my %disabled = map { $_ => 1 } @{ $::instance_conf->get_disabled_price_sources };
22

  
23
  map { $price_sources_by_name{$_} } grep { !$disabled{$_} } @price_sources_order;
24
}
25

  
20 26
sub all_price_sources {
21 27
  map { $price_sources_by_name{$_} } @price_sources_order;
22 28
}
locale/de/all
205 205
  'All groups'                  => 'Alle Gruppen',
206 206
  'All of the exports you have selected were already closed.' => 'Alle von Ihnen ausgewählten Exporte sind bereits abgeschlossen.',
207 207
  'All partsgroups'             => 'Alle Warengruppen',
208
  'All price sources'           => 'Alle Preisquellen',
208 209
  'All reports'                 => 'Alle Berichte (Kontenübersicht, Summen- u. Saldenliste, GuV, BWA, Bilanz, Projektbuchungen)',
209 210
  'All the other clients will start with an empty set of WebDAV folders.' => 'Alle anderen Mandanten werden mit einem leeren Satz von WebDAV-Ordnern ausgestattet.',
210 211
  'All the selected exports have already been closed, or all of their items have already been executed.' => 'Alle ausgewählten Exporte sind als abgeschlossen markiert, oder für alle Einträge wurden bereits Zahlungen verbucht.',
......
829 830
  'Difference'                  => 'Differenz',
830 831
  'Dimensions'                  => 'Abmessungen',
831 832
  'Directory'                   => 'Verzeichnis',
833
  'Disabled Price Sources'      => 'Deaktivierte Preisquellen',
832 834
  'Discard duplicate entries in CSV file' => 'Doppelte Einträge in CSV-Datei verwerfen',
833 835
  'Discard entries with duplicates in database or CSV file' => 'Einträge aus CSV-Datei verwerfen, die es bereits in der Datenbank oder der CSV-Datei gibt',
834 836
  'Discount'                    => 'Rabatt',
......
1837 1839
  'Price Factor'                => 'Preisfaktor',
1838 1840
  'Price Factors'               => 'Preisfaktoren',
1839 1841
  'Price Source'                => 'Preisquelle',
1842
  'Price Sources to be disabled in this client' => 'Preisquellen die in diesem Mandanten deaktiviert werden sollen',
1840 1843
  'Price factor (database ID)'  => 'Preisfaktor (Datenbank-ID)',
1841 1844
  'Price factor (name)'         => 'Preisfaktor (Name)',
1842 1845
  'Price factor deleted!'       => 'Preisfaktor gelöscht.',
......
1844 1847
  'Price group (database ID)'   => 'Preisgruppe (Datenbank-ID)',
1845 1848
  'Price group (name)'          => 'Preisgruppe (Name) ',
1846 1849
  'Price information'           => 'Preisinformation',
1850
  'Price sources deactivated in this client' => 'Preisquellen die in diesem Mandanten deaktiviert sind',
1847 1851
  'Pricegroup'                  => 'Preisgruppe',
1848 1852
  'Pricegroup deleted!'         => 'Preisgruppe gelöscht!',
1849 1853
  'Pricegroup missing!'         => 'Preisgruppe fehlt!',
sql/Pg-upgrade2/price_source_client_config.sql
1
-- @tag: price_source_client_config
2
-- @description: Preisquellen: Preisquellen ausschaltbar per Mandant
3
-- @depends: release_3_1_0
4
-- @encoding: utf-8
5

  
6
ALTER TABLE defaults ADD disabled_price_sources TEXT[];
templates/webpages/client_config/_features.html
124 124
  <td>[% L.part_picker('defaults.transport_cost_reminder_article_number_id', SELF.defaults.transport_cost_reminder_article_number_id, style=style) %]</td>
125 125
   <td>[% LxERP.t8('Before saving a sales order, this article will be checked and a warning is generated.') %]</td>
126 126
 </tr>
127

  
128
 <tr><td class="listheading" colspan="4">[% LxERP.t8("Disabled Price Sources") %]</td></tr>
129
 <tr>
130
   <td align="right">[% 'Price Sources to be disabled in this client' | $T8 %]</td>
131
   <td colspan=2>
132
     <div class="clearfix">
133
      [% L.select_tag("defaults.disabled_price_sources[]", SELF.all_price_sources, id="defaults_price_sources", multiple=1, default=SELF.defaults.disabled_price_sources) %]
134
      [% L.multiselect2side("defaults_price_sources", labelsx=LxERP.t8("All price sources"), labeldx=LxERP.t8("Price sources deactivated in this client")) %]
135
     </div>
136
   </td>
137
 </tr>
138

  
127 139
 </table>
128 140
</div>

Auch abrufbar als: Unified diff