Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a9937c85

Von Bernd Blessmann vor mehr als 13 Jahren hinzugefügt

  • ID a9937c8511f6adec85906257afba39990c42ced7
  • Vorgänger 83560c63
  • Nachfolger 3a11de06

Vorauswahl der Sprache fuer Kunden in defaults

Unterschiede anzeigen:

SL/AM.pm
1065 1065
        pdonumber          = ?,
1066 1066
        curr               = ?,
1067 1067
        businessnumber     = ?,
1068
        weightunit         = ?|;
1068
        weightunit         = ?,
1069
        language_id        = ?|;
1069 1070
  my @values = ($accnos{inventory_accno}, $accnos{income_accno}, $accnos{expense_accno},
1070 1071
                $accnos{fxgain_accno},    $accnos{fxloss_accno}, $accnos{ar_paid_accno},
1071 1072
                $form->{invnumber},       $form->{cnnumber},
......
1075 1076
                $form->{articlenumber},   $form->{servicenumber},
1076 1077
                $form->{sdonumber},       $form->{pdonumber},
1077 1078
                $currency,
1078
                $form->{businessnumber},  $form->{weightunit});
1079
                $form->{businessnumber},  $form->{weightunit},
1080
                $form->{language_id});
1079 1081
  do_query($form, $dbh, $query, @values);
1080 1082

  
1081 1083
  $dbh->commit();
SL/DB/MetaSetup/Default.pm
46 46
    accounting_method          => { type => 'text' },
47 47
    inventory_system           => { type => 'text' },
48 48
    profit_determination       => { type => 'text' },
49
    language_id                => { type => 'integer' },
49 50
  ],
50 51

  
51 52
  primary_key_columns => [ 'id' ],
bin/mozilla/am.pl
1549 1549

  
1550 1550
  map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} };
1551 1551

  
1552
  # default language
1553
  my @ALL_LANGUAGES = SL::DB::Manager::Language->get_all;
1554

  
1552 1555
# EÜR = cash, Bilanzierung = accrual 
1553 1556

  
1554 1557
  foreach my $key (keys %{ $form->{IC} }) {
......
1568 1571
  $form->{title} = $locale->text('Ranges of numbers and default accounts');
1569 1572

  
1570 1573
  $form->header();
1571
  print $form->parse_html_template('am/edit_defaults');
1574
  print $form->parse_html_template('am/edit_defaults',
1575
                                   { ALL_LANGUAGES => @ALL_LANGUAGES, });
1572 1576

  
1573 1577
  $main::lxdebug->leave_sub();
1574 1578
}
bin/mozilla/ct.pl
50 50
use SL::CT;
51 51
use SL::CVar;
52 52
use SL::DB::Business;
53
use SL::DB::Default;
53 54
use SL::ReportGenerator;
54 55

  
55 56
require "bin/mozilla/common.pl";
......
336 337

  
337 338
  $form->{NOTES} ||= [ ];
338 339

  
340
  if (!$form->{'language_id'}) {
341
    my $l_id = SL::DB::Default->get->{'language_id'};
342
    if ($l_id) {
343
      $form->{'default_language_id'} = $l_id;
344
    }
345
  }
346

  
339 347
  $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'CT', 'trans_id' => $form->{id});
340 348

  
341 349
  CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}) if (scalar @{ $form->{CUSTOM_VARIABLES} });
sql/Pg-upgrade2/defaults_add_language_id.sql
1
-- @tag: defaults_add_language_id
2
-- @description: Id der Standardsprache in defaults speichern
3
-- @depends: release_2_6_2
4
-- @charset: utf-8
5
ALTER TABLE defaults ADD COLUMN language_id integer;
templates/webpages/am/edit_defaults.html
156 156
      </td>
157 157
    </tr>
158 158

  
159
    <tr>
160
     <th align="right">[% 'Language' | $T8 %]</th>
161
     <td>
162
      [%- INCLUDE 'generic/multibox.html'
163
           name          = 'language_id',
164
           default       = defaults_language_id,
165
           style         = 'size:20; maxength:5',
166
           DATA          = ALL_LANGUAGES,
167
           id_key        = 'id',
168
           label_key     = 'description',
169
           -%]
170
      </td>
171
    </tr>
172

  
159 173
    <tr class="listheading">
160 174
     <th colspan="4">[% 'Configuration' | $T8 %]</th>
161 175
    </tr>
templates/webpages/ct/form_header.html
231 231
      <td>
232 232
       [%- INCLUDE generic/multibox.html
233 233
             name       = 'language_id',
234
             default    = default_language_id,
234 235
             DATA       = languages,
235 236
             show_empty = 1,
236 237
             id_key     = 'id',

Auch abrufbar als: Unified diff