Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 81860c0c

Von Andreas Rudin vor 10 Monaten hinzugefügt

  • ID 81860c0c3e6f404fbd37c964a04e9552077b217f
  • Vorgänger 486e5c7c
  • Nachfolger 94fb7330

Vereinfachte Methode beim Jahresabschluss

- Nur 2 statt 3 Konten bei den Jahresabschluss-Standardkonten:
Jahresabschluss-Konto und
Konto zum Verbuchen des Jahresgewinns oder verlusts
Keine Abschlussbuchungen bei den Erfolgskonten
- Auswahl der Methode in der Mandantenkonfiguration unter Buchungskonfiguration
- Alle Konten als Abschlusskonten auswählbar
- Verbuchen des Jahresgewinns oder -verlusts nur bei den Eröffnungsbuchungen

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
30 30
use Rose::Object::MakeMethods::Generic (
31 31
  '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
32 32
                                  all_project_statuses all_project_types zugferd_settings
33
                                  posting_options payment_options accounting_options inventory_options profit_options balance_startdate_method_options
33
                                  posting_options payment_options accounting_options inventory_options profit_options balance_startdate_method_options yearend_options
34 34
                                  displayable_name_specs_by_module available_documents_with_no_positions) ],
35 35
);
36 36

  
......
208 208
  return SL::DB::Helper::AccountingPeriod::get_balance_startdate_method_options;
209 209
}
210 210

  
211
sub init_yearend_options {
212
  [ { title => t8("default"),         value => "default"   },
213
    { title => t8("simple"),          value => "simple"    }, ]
214
}
215

  
211 216
sub init_all_price_sources {
212 217
  my @classes = SL::PriceSource::ALL->all_price_sources;
213 218

  
SL/Controller/YearEndTransactions.pm
12 12
use Data::Dumper;
13 13
use List::Util qw(sum);
14 14
use SL::ClientJS;
15
use SL::DB::Default;
15 16

  
16 17
use SL::DB::Chart;
17 18
use SL::DB::GLTransaction;
......
20 21
use SL::DB::Helper::AccountingPeriod qw(get_balance_starting_date get_balance_startdate_method_options);
21 22

  
22 23
use Rose::Object::MakeMethods::Generic (
23
  'scalar --get_set_init' => [ qw(cb_date cb_startdate ob_date) ],
24
  'scalar --get_set_init' => [ qw(cb_date cb_startdate ob_date defaults) ],
24 25
);
25 26

  
26 27
__PACKAGE__->run_before('check_auth');
......
30 31

  
31 32
  $self->cb_startdate($::locale->parse_date_to_object($self->get_balance_starting_date($self->cb_date)));
32 33

  
33
  my $defaults         = SL::DB::Default->get;
34
  my $carry_over_chart = SL::DB::Manager::Chart->find_by( id => $defaults->carry_over_account_chart_id     );
35
  my $profit_chart     = SL::DB::Manager::Chart->find_by( id => $defaults->profit_carried_forward_chart_id );
36
  my $loss_chart       = SL::DB::Manager::Chart->find_by( id => $defaults->loss_carried_forward_chart_id   );
34
  my $carry_over_chart = SL::DB::Manager::Chart->find_by( id => $self->defaults->carry_over_account_chart_id     );
35
  my $profit_chart     = SL::DB::Manager::Chart->find_by( id => $self->defaults->profit_carried_forward_chart_id );
36
  my $loss_chart       = SL::DB::Manager::Chart->find_by( id => $self->defaults->loss_carried_forward_chart_id   );
37 37

  
38 38
  $self->render('yearend/form',
39 39
                title                            => t8('Year-end closing'),
......
50 50
  $self->_parse_form;
51 51

  
52 52
  eval {
53
    _year_end_bookings( start_date => $self->cb_startdate,
53
    $self->_year_end_bookings( start_date => $self->cb_startdate,
54 54
                        cb_date    => $self->cb_date,
55 55
                      );
56 56
    1;
......
59 59
    return $self->js->render;
60 60
  };
61 61

  
62
  my ($report_data, $profit_loss_sum) = _report(
62
  my ($report_data, $profit_loss_sum) = $self->_report(
63 63
                                                cb_date    => $self->cb_date,
64 64
                                                start_date => $self->cb_startdate,
65 65
                                               );
......
98 98

  
99 99
  $self->_parse_form;
100 100

  
101
  my ($report_data, $profit_loss_sum) = _report(
101
  my ($report_data, $profit_loss_sum) = $self->_report(
102 102
                                                cb_date   => $self->cb_date,
103 103
                                                start_date => $self->cb_startdate,
104 104
                                               );
......
123 123
}
124 124

  
125 125
sub _year_end_bookings {
126
  my (%params) = @_;
126
  my ($self, %params) = @_;
127 127

  
128 128
  my $start_date = delete $params{start_date};
129 129
  my $cb_date    = delete $params{cb_date};
130 130

  
131
  my $defaults         = SL::DB::Default->get;
132
  my $carry_over_chart = SL::DB::Manager::Chart->find_by( id => $defaults->carry_over_account_chart_id     ) // die t8('No carry-over chart configured!');
133
  my $profit_chart     = SL::DB::Manager::Chart->find_by( id => $defaults->profit_carried_forward_chart_id ) // die t8('No profit carried forward chart configured!');
134
  my $loss_chart       = SL::DB::Manager::Chart->find_by( id => $defaults->loss_carried_forward_chart_id   ) // die t8('No profit and loss carried forward chart configured!');
131
  my $carry_over_chart = SL::DB::Manager::Chart->find_by( id => $self->defaults->carry_over_account_chart_id     ) // die t8('No carry-over chart configured!');
132
  my $profit_chart     = SL::DB::Manager::Chart->find_by( id => $self->defaults->profit_carried_forward_chart_id ) // die t8('No profit carried forward chart configured!');
133
  my $loss_chart;
134
  if ( $self->defaults->yearend_method eq 'simple' ) {
135
    $loss_chart       = $profit_chart;
136
  } else {
137
    $loss_chart     = SL::DB::Manager::Chart->find_by( id => $self->defaults->loss_carried_forward_chart_id   ) // die t8('No profit and loss carried forward chart configured!');
138
  }
135 139

  
136
  my ($report_data, $profit_loss_sum) = _report(
140
  my ($report_data, $profit_loss_sum) = $self->_report(
137 141
                                                start_date => $start_date,
138 142
                                                cb_date    => $cb_date,
139 143
                                               );
......
288 292
                              @{$report_data};
289 293
    $profit_loss_sum ||= 0;
290 294
    my $pl_chart;
291
    if ( $profit_loss_sum > 0 ) {
295
    if ( $profit_loss_sum > 0 || $self->defaults->yearend_method eq 'simple' ) {
292 296
      $pl_chart = $profit_chart;
293 297
    } else {
294 298
      $pl_chart = $loss_chart;
......
297 301
    my $pl_debit_balance  = 0;
298 302
    my $pl_credit_balance = 0;
299 303
    # soll = debit, haben = credit
300
    my $pl_cb_debit_entry = SL::DB::GLTransaction->new(
301
      employee_id    => $employee_id,
302
      transdate      => $cb_date,
303
      reference      => 'SB ' . $cb_date->year,
304
      description    => 'Automatische SB-Buchungen Erfolgskonten Soll für ' . $cb_date->year,
305
      ob_transaction => 0,
306
      cb_transaction => 1,
307
      taxincluded    => 0,
308
      transactions   => [],
309
    );
310
    my $pl_cb_credit_entry = SL::DB::GLTransaction->new(
311
      employee_id    => $employee_id,
312
      transdate      => $cb_date,
313
      reference      => 'SB ' . $cb_date->year,
314
      description    => 'Automatische SB-Buchungen Erfolgskonten Haben für ' . $cb_date->year,
315
      ob_transaction => 0,
316
      cb_transaction => 1,
317
      taxincluded    => 0,
318
      transactions   => [],
319
    );
320

  
321
    foreach my $profit_loss_account ( @profit_loss_accounts ) {
322
      # $main::lxdebug->message(0, sprintf("found chart %s with balance %s", $profit_loss_account->{accno}, $profit_loss_account->{amount_with_cb}));
323
      my $chart = $charts_by_id{ $profit_loss_account->{chart_id} };
324

  
325
      next if $profit_loss_account->{amount_with_cb} == 0;
304
    if ( $self->defaults->yearend_method ne 'simple' ) {
305
      my $pl_cb_debit_entry = SL::DB::GLTransaction->new(
306
        employee_id    => $employee_id,
307
        transdate      => $cb_date,
308
        reference      => 'SB ' . $cb_date->year,
309
        description    => 'Automatische SB-Buchungen Erfolgskonten Soll für ' . $cb_date->year,
310
        ob_transaction => 0,
311
        cb_transaction => 1,
312
        taxincluded    => 0,
313
        transactions   => [],
314
      );
315
      my $pl_cb_credit_entry = SL::DB::GLTransaction->new(
316
        employee_id    => $employee_id,
317
        transdate      => $cb_date,
318
        reference      => 'SB ' . $cb_date->year,
319
        description    => 'Automatische SB-Buchungen Erfolgskonten Haben für ' . $cb_date->year,
320
        ob_transaction => 0,
321
        cb_transaction => 1,
322
        taxincluded    => 0,
323
        transactions   => [],
324
      );
326 325

  
327
      if ( $profit_loss_account->{amount_with_cb} < 0 ) {
328
        $pl_debit_balance -= $profit_loss_account->{amount_with_cb};
329
        $pl_cb_debit_entry->add_chart_booking(
330
          chart  => $chart,
331
          tax_id => 0,
332
          credit => - $profit_loss_account->{amount_with_cb},
333
        );
334
      } else {
335
        $pl_credit_balance += $profit_loss_account->{amount_with_cb};
336
        $pl_cb_credit_entry->add_chart_booking(
337
          chart  => $chart,
338
          tax_id => 0,
339
          debit  => $profit_loss_account->{amount_with_cb},
340
        );
326
      foreach my $profit_loss_account ( @profit_loss_accounts ) {
327
        # $main::lxdebug->message(0, sprintf("found chart %s with balance %s", $profit_loss_account->{accno}, $profit_loss_account->{amount_with_cb}));
328
        my $chart = $charts_by_id{ $profit_loss_account->{chart_id} };
329

  
330
        next if $profit_loss_account->{amount_with_cb} == 0;
331

  
332
        if ( $profit_loss_account->{amount_with_cb} < 0 ) {
333
          $pl_debit_balance -= $profit_loss_account->{amount_with_cb};
334
          $pl_cb_debit_entry->add_chart_booking(
335
            chart  => $chart,
336
            tax_id => 0,
337
            credit => - $profit_loss_account->{amount_with_cb},
338
          );
339
        } else {
340
          $pl_credit_balance += $profit_loss_account->{amount_with_cb};
341
          $pl_cb_credit_entry->add_chart_booking(
342
            chart  => $chart,
343
            tax_id => 0,
344
            debit  => $profit_loss_account->{amount_with_cb},
345
          );
346
        };
341 347
      };
342
    };
343

  
344
    # $main::lxdebug->message(0, "pl_debit_balance  = $pl_debit_balance");
345
    # $main::lxdebug->message(0, "pl_credit_balance = $pl_credit_balance");
346 348

  
347
    $pl_cb_debit_entry->add_chart_booking(
348
      chart  => $pl_chart,
349
      tax_id => 0,
350
      debit  => $pl_debit_balance,
351
    ) if $pl_debit_balance;
349
      # $main::lxdebug->message(0, "pl_debit_balance  = $pl_debit_balance");
350
      # $main::lxdebug->message(0, "pl_credit_balance = $pl_credit_balance");
352 351

  
353
    $pl_cb_credit_entry->add_chart_booking(
354
      chart  => $pl_chart,
355
      tax_id => 0,
356
      credit => $pl_credit_balance,
357
    ) if $pl_credit_balance;
352
      $pl_cb_debit_entry->add_chart_booking(
353
        chart  => $pl_chart,
354
        tax_id => 0,
355
        debit  => $pl_debit_balance,
356
      ) if $pl_debit_balance;
358 357

  
359
    # printf("debit : %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_debit_entry->transactions };
360
    # printf("credit: %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_credit_entry->transactions };
358
      $pl_cb_credit_entry->add_chart_booking(
359
        chart  => $pl_chart,
360
        tax_id => 0,
361
        credit => $pl_credit_balance,
362
      ) if $pl_credit_balance;
361 363

  
362
    $pl_cb_debit_entry->post  if scalar @{ $pl_cb_debit_entry->transactions }  > 1;
363
    $pl_cb_credit_entry->post if scalar @{ $pl_cb_credit_entry->transactions } > 1;
364
      # printf("debit : %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_debit_entry->transactions };
365
      # printf("credit: %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_credit_entry->transactions };
364 366

  
367
      $pl_cb_debit_entry->post  if scalar @{ $pl_cb_debit_entry->transactions }  > 1;
368
      $pl_cb_credit_entry->post if scalar @{ $pl_cb_credit_entry->transactions } > 1;
369
    };
365 370
    ######### profit-loss transfer #########
366 371
    # and finally transfer the new balance of the profit-loss account via the carry-over account
367 372
    # we want to use profit_loss_sum with cb!
368 373

  
369 374
    if ( $profit_loss_sum != 0 ) {
370

  
371
      my $carry_over_cb_entry = SL::DB::GLTransaction->new(
372
        employee_id    => $employee_id,
373
        transdate      => $cb_date,
374
        reference      => 'SB ' . $cb_date->year,
375
        description    => sprintf('Automatische SB-Buchung für %s %s',
376
                                  $profit_loss_sum >= 0 ? 'Gewinnvortrag' : 'Verlustvortrag',
377
                                  $cb_date->year,
378
                                 ),
379
        ob_transaction => 0,
380
        cb_transaction => 1,
381
        taxincluded    => 0,
382
        transactions   => [],
383
      );
375
      my $carry_over_cb_entry;
376
      if ($self->defaults->yearend_method ne 'simple') {
377
        $carry_over_cb_entry = SL::DB::GLTransaction->new(
378
          employee_id    => $employee_id,
379
          transdate      => $cb_date,
380
          reference      => 'SB ' . $cb_date->year,
381
          description    => sprintf('Automatische SB-Buchung für %s %s',
382
                                    $profit_loss_sum >= 0 ? 'Gewinnvortrag' : 'Verlustvortrag',
383
                                    $cb_date->year,
384
                                   ),
385
          ob_transaction => 0,
386
          cb_transaction => 1,
387
          taxincluded    => 0,
388
          transactions   => [],
389
        );
390
      };
384 391
      my $carry_over_ob_entry = SL::DB::GLTransaction->new(
385 392
        employee_id    => $employee_id,
386 393
        transdate      => $ob_date,
......
404 411
        $amount2 = 'debit';
405 412
      };
406 413

  
407
      $carry_over_cb_entry->add_chart_booking(
408
        chart    => $carry_over_chart,
409
        tax_id   => 0,
410
        $amount1 => abs($profit_loss_sum),
411
      );
412
      $carry_over_cb_entry->add_chart_booking(
413
        chart    => $pl_chart,
414
        tax_id   => 0,
415
        $amount2 => abs($profit_loss_sum),
416
      );
414
      if ($self->defaults->yearend_method ne 'simple') {
415
        $carry_over_cb_entry->add_chart_booking(
416
          chart    => $carry_over_chart,
417
          tax_id   => 0,
418
          $amount1 => abs($profit_loss_sum),
419
        );
420
        $carry_over_cb_entry->add_chart_booking(
421
          chart    => $pl_chart,
422
          tax_id   => 0,
423
          $amount2 => abs($profit_loss_sum),
424
        );
425
      };
417 426
      $carry_over_ob_entry->add_chart_booking(
418 427
        chart    => $carry_over_chart,
419 428
        tax_id   => 0,
......
428 437
      # printf("debit : %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $carry_over_ob_entry->transactions };
429 438
      # printf("credit: %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $carry_over_ob_entry->transactions };
430 439

  
431
      $carry_over_cb_entry->post if scalar @{ $carry_over_cb_entry->transactions } > 1;
440
      if ($self->defaults->yearend_method ne 'simple') {
441
        $carry_over_cb_entry->post if scalar @{ $carry_over_cb_entry->transactions } > 1;
442
      };
432 443
      $carry_over_ob_entry->post if scalar @{ $carry_over_ob_entry->transactions } > 1;
433 444
    };
434 445

  
......
449 460
}
450 461

  
451 462
sub _report {
452
  my (%params) = @_;
463
  my ($self, %params) = @_;
453 464

  
454 465
  my $start_date = delete $params{start_date};
455 466
  my $cb_date    = delete $params{cb_date};
456 467

  
457
  my $defaults = SL::DB::Default->get;
458 468
  die "no carry over account defined"
459
    unless defined $defaults->carry_over_account_chart_id
460
           and $defaults->carry_over_account_chart_id > 0;
469
    unless defined $self->defaults->carry_over_account_chart_id
470
           and $self->defaults->carry_over_account_chart_id > 0;
461 471

  
462 472
  my $salden_query = <<SQL;
463 473
select c.id as chart_id,
......
486 496
  my $report = selectall_hashref_query($::form, $dbh, $salden_query,
487 497
                                       $start_date,
488 498
                                       $cb_date,
489
                                       $defaults->carry_over_account_chart_id,
499
                                       $self->defaults->carry_over_account_chart_id,
490 500
                                      );
491 501
  # profit_loss_sum is the actual profit/loss for the year, without cb, use "amount_without_cb")
492 502
  my $profit_loss_sum = sum map { $_->{amount_without_cb} }
......
512 522
sub init_ob_date        { $::locale->parse_date_to_object($::form->{ob_date})      }
513 523
sub init_cb_startdate   { $::locale->parse_date_to_object($::form->{cb_startdate}) }
514 524
sub init_cb_date        { $::locale->parse_date_to_object($::form->{cb_date})      }
515

  
525
sub init_defaults       { SL::DB::Default->get }
516 526
1;
SL/DB/MetaSetup/Default.pm
237 237
  webdav_sync_extern_url                    => { type => 'text' },
238 238
  weightunit                                => { type => 'varchar', length => 5 },
239 239
  workflow_po_ap_chart_id                   => { type => 'integer' },
240
  yearend_method                            => { type => 'text', default => 'default', not_null => 1 },
240 241
);
241 242

  
242 243
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
doc/changelog
92 92
    verschiedenen Lagerplätzen oder mit verschiedenen Chargen, so können diese
93 93
    gewählt ausgewählt werden. Das Mindeshaltbarkeitsdatum wird dabei (noch
94 94
    nicht) berücksichtigt.
95
  - Beim Jahresabschluss besteht neu die Möglichkeit, zwischen den Methoden Einfach und Standard
96
    zu wählen. Die Methode Einfach berücksichtigt nur die Bestandskonten und verwendet das
97
    gleiche Konto für die Verbuchung von Gewinn oder Verlust.
95 98

  
96 99
Kleinere neue Features und Detailverbesserungen:
97 100

  
locale/de/all
2891 2891
  'Please choose for which categories the taxes should be displayed (otherwise remove the ticks):' => 'Bitte wählen Sie für welche Kontoart die Steuer angezeigt werden soll (ansonsten einfach die Häkchen entfernen)',
2892 2892
  'Please choose the action to be processed for your target quantity:' => 'Bitte wählen Sie eine Aktion, die mit Ihrer gezählten Zielmenge durchgeführt werden soll:',
2893 2893
  'Please configure the carry over and profit and loss accounts for year-end closing in the client configuration!' => 'Bitte konfigurieren Sie in der Mandantenkonfiguration das Saldenvortragskonto, das Gewinnvortragskonto und das Verlustvortragskonto!',
2894
  'Please configure the year-end closing and the profit or loss carried forward accounts for year-end closing in the client configuration!' => 'Bitte konfigurieren Sie in der Mandantenkonfiguration das Jahresabschluss-Konto und das Konto zum Verbuchen des Jahresgewinns oder -verlusts!',
2894 2895
  'Please contact your administrator or a service provider.' => 'Bitte kontaktieren Sie Ihren Administrator oder einen Dienstleister.',
2895 2896
  'Please contact your administrator.' => 'Bitte wenden Sie sich an Ihren Administrator.',
2896 2897
  'Please correct the settings and try again or deactivate that client.' => 'Bitte korrigieren Sie die Einstellungen und versuchen Sie es erneut, oder deaktivieren Sie diesen Mandanten.',
......
3060 3061
  'Profit and loss accounts'    => 'Erfolgskonten',
3061 3062
  'Profit carried forward account' => 'Gewinnvortragskonto',
3062 3063
  'Profit determination'        => 'Gewinnermittlung',
3064
  'Profit or loss carried forward account' => 'Konto zum Verbuchen des Jahresgewinns oder -verlusts',
3063 3065
  'Proforma Invoice'            => 'Proformarechnung',
3064 3066
  'Program'                     => 'Programm',
3065 3067
  'Project'                     => 'Projekt',
......
4426 4428
  'This option controls the inventory system.' => 'Dieser Parameter legt die Warenbuchungsmethode fest.',
4427 4429
  'This option controls the method used for determining the startdate for the balance report.' => 'Diese Option bestimmt, wie das Startdatum für den Bilanzbericht ermittelt wird',
4428 4430
  'This option controls the method used for profit determination.' => 'Dieser Parameter legt die Berechnungsmethode für die Gewinnermittlung fest.',
4431
  'This option controls the method used for the automated year-end bookings.' => 'Dieser Parameter legt die Methode für die automatischen Jahresabschluss-Buchungen fest.',
4429 4432
  'This option controls the posting and calculation behavior for the accounting method.' => 'Dieser Parameter steuert die Buchungs- und Berechnungsmethoden für die Versteuerungsart.',
4430 4433
  'This order has already a final invoice.' => 'Dieser Auftrag hat schon eine Schlussrechnung.',
4431 4434
  'This part has already been added.' => 'Dieser Artikel wurde schon hinzugefügt',
......
4866 4869
  'Year'                        => 'Jahr',
4867 4870
  'Year-end bookings were successfully completed!' => 'Die Jahresabschlußbuchungen wurden erfolgreich durchgeführt!',
4868 4871
  'Year-end closing'            => 'Jahresabschluß',
4872
  'Year-end closing account'    => 'Jahresabschluss-Konto',
4869 4873
  'Year-end date'               => 'Jahresabschlußdatum',
4870 4874
  'Year-end date missing'       => 'Jahresabschlußdatum fehlt',
4875
  'Year-end method'             => 'Jahresabschluss-Methode',
4871 4876
  'Yearly'                      => 'jährlich',
4872 4877
  'Yearly taxreport not yet implemented' => 'Jährlicher Steuerreport für dieses Ausgabeformat noch nicht implementiert',
4873 4878
  'Yes'                         => 'Ja',
......
5001 5006
  'cp_greeting to cp_gender migration' => 'Datenumwandlung von Titel nach Geschlecht (cp_greeting to cp_gender)',
5002 5007
  'customer_list'               => 'kundenliste',
5003 5008
  'dated'                       => 'datiert',
5009
  'default'                     => 'Standard',
5004 5010
  'default exchange rate'       => 'Tageskurs',
5005 5011
  'delete'                      => 'Löschen',
5006 5012
  'delete item'                 => 'Position löschen',
......
5208 5214
  'service_list'                => 'dienstleistungsliste',
5209 5215
  'shipped'                     => 'verschickt',
5210 5216
  'shipped_br'                  => 'Verschk.',
5217
  'simple'                      => 'Einfach',
5211 5218
  'singular first char'         => 'S',
5212 5219
  'sort items'                  => 'Positionen sortieren',
5213 5220
  'start upload'                => 'Hochladen beginnt',
locale/en/all
2890 2890
  'Please choose for which categories the taxes should be displayed (otherwise remove the ticks):' => '',
2891 2891
  'Please choose the action to be processed for your target quantity:' => '',
2892 2892
  'Please configure the carry over and profit and loss accounts for year-end closing in the client configuration!' => '',
2893
  'Please configure the year-end closing and the profit or loss carried forward accounts for year-end closing in the client configuration!' => '',
2893 2894
  'Please contact your administrator or a service provider.' => '',
2894 2895
  'Please contact your administrator.' => '',
2895 2896
  'Please correct the settings and try again or deactivate that client.' => '',
......
3059 3060
  'Profit and loss accounts'    => '',
3060 3061
  'Profit carried forward account' => '',
3061 3062
  'Profit determination'        => '',
3063
  'Profit or loss carried forward account' => '',
3062 3064
  'Proforma Invoice'            => '',
3063 3065
  'Program'                     => '',
3064 3066
  'Project'                     => '',
......
3095 3097
  'Purchase Credit Notes'       => '',
3096 3098
  'Purchase Delivery Order'     => '',
3097 3099
  'Purchase Delivery Orders'    => '',
3098
  'Purchase Delivery Orders deleteable' => '',
3099 3100
  'Purchase Invoice'            => '',
3100 3101
  'Purchase Invoices'           => '',
3101 3102
  'Purchase Order'              => '',
......
3103 3104
  'Purchase Order Confirmations' => '',
3104 3105
  'Purchase Orders'             => '',
3105 3106
  'Purchase Orders Services are deliverable' => '',
3106
  'Purchase Orders deleteable'  => '',
3107 3107
  'Purchase Price Rules'        => '',
3108 3108
  'Purchase Price Rules '       => '',
3109 3109
  'Purchase Quotation Intake'   => '',
3110 3110
  'Purchase Quotation Intakes'  => '',
3111 3111
  'Purchase Reclamation'        => '',
3112 3112
  'Purchase Reclamations'       => '',
3113
  'Purchase Reclamations deleteable' => '',
3114 3113
  'Purchase basket'             => '',
3115 3114
  'Purchase basket item not existing any more for position(s): #1.' => '',
3116 3115
  'Purchase delivery order'     => '',
......
3370 3369
  'Sales (typeabbreviation)'    => 'S',
3371 3370
  'Sales Delivery Order'        => '',
3372 3371
  'Sales Delivery Orders'       => '',
3373
  'Sales Delivery Orders deleteable' => '',
3374 3372
  'Sales Invoice'               => '',
3375 3373
  'Sales Invoices'              => '',
3376 3374
  'Sales Order'                 => '',
......
3381 3379
  'Sales Orders'                => '',
3382 3380
  'Sales Orders Advance'        => '',
3383 3381
  'Sales Orders Services are deliverable' => '',
3384
  'Sales Orders deleteable'     => '',
3385 3382
  'Sales Price Rules'           => '',
3386 3383
  'Sales Price Rules '          => '',
3387 3384
  'Sales Price information'     => '',
......
3389 3386
  'Sales Quotations'            => '',
3390 3387
  'Sales Reclamation'           => '',
3391 3388
  'Sales Reclamations'          => '',
3392
  'Sales Reclamations deleteable' => '',
3393 3389
  'Sales Report'                => '',
3394 3390
  'Sales and purchase invoices with inventory transactions with taxkeys' => '',
3395 3391
  'Sales delivery order'        => '',
......
3663 3659
  'Show custom variable search inputs' => '',
3664 3660
  'Show delete button in purchase delivery orders?' => '',
3665 3661
  'Show delete button in purchase orders?' => '',
3666
  'Show delete button in purchase reclamations?' => '',
3667 3662
  'Show delete button in sales delivery orders?' => '',
3668 3663
  'Show delete button in sales orders?' => '',
3669
  'Show delete button in sales reclamations?' => '',
3670 3664
  'Show delivery plan'          => '',
3671 3665
  'Show delivery value report'  => '',
3672 3666
  'Show detail informationen'   => '',
......
4424 4418
  'This option controls the inventory system.' => '',
4425 4419
  'This option controls the method used for determining the startdate for the balance report.' => '',
4426 4420
  'This option controls the method used for profit determination.' => '',
4421
  'This option controls the method used for the automated year-end bookings.' => '',
4427 4422
  'This option controls the posting and calculation behavior for the accounting method.' => '',
4428 4423
  'This order has already a final invoice.' => '',
4429 4424
  'This part has already been added.' => '',
......
4864 4859
  'Year'                        => '',
4865 4860
  'Year-end bookings were successfully completed!' => '',
4866 4861
  'Year-end closing'            => '',
4862
  'Year-end closing account'    => '',
4867 4863
  'Year-end date'               => '',
4868 4864
  'Year-end date missing'       => '',
4865
  'Year-end method'             => '',
4869 4866
  'Yearly'                      => '',
4870 4867
  'Yearly taxreport not yet implemented' => '',
4871 4868
  'Yes'                         => '',
......
4999 4996
  'cp_greeting to cp_gender migration' => '',
5000 4997
  'customer_list'               => '',
5001 4998
  'dated'                       => '',
4999
  'default'                     => '',
5002 5000
  'default exchange rate'       => '',
5003 5001
  'delete'                      => '',
5004 5002
  'delete item'                 => '',
......
5206 5204
  'service_list'                => '',
5207 5205
  'shipped'                     => '',
5208 5206
  'shipped_br'                  => 'shipped',
5207
  'simple'                      => '',
5209 5208
  'singular first char'         => '',
5210 5209
  'sort items'                  => '',
5211 5210
  'start upload'                => '',
sql/Pg-upgrade2/defaults_yearend_method.sql
1
-- @tag: defaults_yearend_method
2
-- @description: method used for the automated year-end bookings
3
-- @depends: release_3_8_0
4

  
5
ALTER TABLE defaults ADD COLUMN yearend_method TEXT NOT NULL DEFAULT 'default';
templates/design40_webpages/client_config/_default_accounts.html
67 67
<table class="tbl-horizontal">
68 68
  <caption>[% LxERP.t8("Year-end closing") %]</caption>
69 69
  <tbody>
70
    [% IF SELF.defaults.yearend_method == 'simple' %] [% THEN %]
71
    <tr>
72
      <th>[% LxERP.t8("Year-end closing account") %]</th>
73
      <td>[% P.chart.picker('defaults.carry_over_account_chart_id', SELF.defaults.carry_over_account_chart_id, choose=1, style=style) %]</td>
74
    </tr>
75
    <tr>
76
      <th>[% LxERP.t8("Profit or loss carried forward account") %]</th>
77
      <td>[% P.chart.picker('defaults.profit_carried_forward_chart_id', SELF.defaults.profit_carried_forward_chart_id, choose=1, style=style) %]</td>
78
    </tr>
79
    [% ELSE %]
70 80
    <tr>
71 81
      <th>[% LxERP.t8("Carry over account for year-end closing") %]</th>
72 82
      <td>[% P.chart.picker('defaults.carry_over_account_chart_id', SELF.defaults.carry_over_account_chart_id, category='A', choose=1, style=style) %]</td>
......
79 89
      <th>[% LxERP.t8("Loss carried forward account") %]</th>
80 90
      <td>[% P.chart.picker('defaults.loss_carried_forward_chart_id', SELF.defaults.loss_carried_forward_chart_id, category='A', choose=1, style=style) %]</td>
81 91
    </tr>
92
    [% END %]
82 93
    <tr>
83 94
   <th>[% LxERP.t8("Transit Items account") %]</th>
84 95
   <td>[% P.chart.picker('defaults.transit_items_chart_id', SELF.defaults.transit_items_chart_id , category='A', choose=1, style=style) %]<td>
templates/design40_webpages/client_config/_posting_configuration.html
131 131
      <td>[% L.select_tag('defaults.balance_startdate_method', SELF.balance_startdate_method_options, value_key = 'value', title_key = 'title', default = SELF.defaults.balance_startdate_method, class='wi-morewide') %]</td>
132 132
      <td class="longdesc">[% LxERP.t8('This option controls the method used for determining the startdate for the balance report.') %]</td>
133 133
    </tr>
134
    <tr>
135
      <th>[% LxERP.t8('Year-end method') %]</th>
136
      <td>[% L.select_tag('defaults.yearend_method', SELF.yearend_options, value_key = 'value', title_key = 'title', default = SELF.defaults.yearend_method, class='wi-morewide') %]</td>
137
      <td class="longdesc">[% LxERP.t8('This option controls the method used for the automated year-end bookings.') %]</td>
138
    </tr>
134 139
    <tr>
135 140
      <th>[% LxERP.t8('Set valid until date for Sales Quotation') %]</th>
136 141
      <td>[% L.yes_no_tag('defaults.reqdate_on', SELF.defaults.reqdate_on) %]</td>
templates/design40_webpages/yearend/form.html
9 9

  
10 10
<div class="wrapper">
11 11

  
12
[% IF carry_over_chart AND profit_chart AND loss_chart %] [% THEN %]
12
[% IF carry_over_chart AND profit_chart AND (loss_chart OR SELF.defaults.yearend_method == 'simple') %] [% THEN %]
13 13
<form id="filter" name="filter" method="post" action="controller.pl">
14 14
<table class="tbl-horizontal">
15 15
  <tr>
......
24 24
    <td>[% 'Start date' | $T8 %]</td>
25 25
    <td>[% L.date_tag('cb_startdate', '', readonly=1) %]</td>
26 26
  </tr>
27
  [% IF SELF.defaults.yearend_method == 'simple' %] [% THEN %]
28
  <tr>
29
    <td>[% 'Year-end closing account' | $T8 %]</td>
30
    <td>[% carry_over_chart.displayable_name | html %]</td>
31
  </tr>
32
  <tr>
33
    <td>[% 'Profit or loss carried forward account' | $T8 %]</td>
34
    <td>[% profit_chart.displayable_name | html %]</td>
35
  </tr>
36
  [% ELSE %]
27 37
  <tr>
28 38
    <td>[% 'Carry over account for year-end closing' | $T8 %]</td>
29 39
    <td>[% carry_over_chart.displayable_name | html %]</td>
......
36 46
    <td>[% 'Loss carried forward account' | $T8 %]</td>
37 47
    <td>[% loss_chart.displayable_name | html %]</td>
38 48
  </tr>
49
  [% END %]
39 50
</table>
40 51
</form>
52
[% ELSIF SELF.defaults.yearend_method == 'simple' %]
53
  [% 'Please configure the year-end closing and the profit or loss carried forward accounts for year-end closing in the client configuration!' | $T8 %]
41 54
[% ELSE %]
42 55
  [% 'Please configure the carry over and profit and loss accounts for year-end closing in the client configuration!' | $T8 %]
43 56
[% END %]
templates/webpages/client_config/_default_accounts.html
68 68
  <tr>
69 69
    <th align="right">[% LxERP.t8("Year-end closing") %]</th>
70 70
  </tr>
71
  [% IF SELF.defaults.yearend_method == 'simple' %] [% THEN %]
72
  <tr>
73
    <td>[% LxERP.t8("Year-end closing account") %]</td>
74
    <td>[% P.chart.picker('defaults.carry_over_account_chart_id', SELF.defaults.carry_over_account_chart_id, choose=1, style=style) %]</td>
75
  </tr>
76
  <tr>
77
    <td>[% LxERP.t8("Profit or loss carried forward account") %]</td>
78
    <td>[% P.chart.picker('defaults.profit_carried_forward_chart_id', SELF.defaults.profit_carried_forward_chart_id, choose=1, style=style) %]</td>
79
  </tr>
80
  [% ELSE %]
71 81
  <tr>
72 82
   <td align="right">[% LxERP.t8("Carry over account for year-end closing") %]</td>
73 83
   <td>[% P.chart.picker('defaults.carry_over_account_chart_id', SELF.defaults.carry_over_account_chart_id, category='A', choose=1, style=style) %]<td>
......
82 92
   <td align="right">[% LxERP.t8("Loss carried forward account") %]</td>
83 93
   <td>[% P.chart.picker('defaults.loss_carried_forward_chart_id', SELF.defaults.loss_carried_forward_chart_id, category='A', choose=1, style=style) %]<td>
84 94
  </tr>
95
  [% END %]
85 96
  <tr>
86 97
   <td align="right">[% LxERP.t8("Transit Items account") %]</td>
87 98
   <td>[% P.chart.picker('defaults.transit_items_chart_id', SELF.defaults.transit_items_chart_id , category='A', choose=1, style=style) %]<td>
templates/webpages/client_config/_posting_configuration.html
113 113
   <td>[% L.select_tag('defaults.balance_startdate_method', SELF.balance_startdate_method_options, value_key = 'value', title_key = 'title', default = SELF.defaults.balance_startdate_method) %]</td>
114 114
   <td>[% LxERP.t8('This option controls the method used for determining the startdate for the balance report.') %]</td>
115 115
  </tr>
116
  <tr>
117
    <td align="right">[% LxERP.t8('Year-end method') %]</td>
118
    <td>[% L.select_tag('defaults.yearend_method', SELF.yearend_options, value_key = 'value', title_key = 'title', default = SELF.defaults.yearend_method, class='wi-morewide') %]</td>
119
    <td>[% LxERP.t8('This option controls the method used for the automated year-end bookings.') %]</td>
120
  </tr>
116 121
  <tr>
117 122
   <td align="right">[% LxERP.t8('Set valid until date for Sales Quotation') %]</td>
118 123
   <td>[% L.yes_no_tag('defaults.reqdate_on', SELF.defaults.reqdate_on) %]</td>
templates/webpages/yearend/form.html
7 7

  
8 8
[%- INCLUDE 'common/flash.html' %]
9 9

  
10
[% IF carry_over_chart AND profit_chart AND loss_chart %] [% THEN %]
10
[% IF carry_over_chart AND profit_chart AND (loss_chart OR SELF.defaults.yearend_method == 'simple') %] [% THEN %]
11 11
<form id="filter" name="filter" method="post" action="controller.pl">
12 12
<table>
13 13
  <tr>
......
22 22
    <td align="right">[% 'Start date' | $T8 %]</td>
23 23
    <td>[% L.date_tag('cb_startdate', '', readonly=1) %]</td>
24 24
  </tr>
25
  [% IF SELF.defaults.yearend_method == 'simple' %] [% THEN %]
26
  <tr>
27
    <td align="right">[% 'Year-end closing account' | $T8 %]</td>
28
    <td>[% carry_over_chart.displayable_name | html %]</td>
29
  </tr>
30
  <tr>
31
    <td align="right">[% 'Profit or loss carried forward account' | $T8 %]</td>
32
    <td>[% profit_chart.displayable_name | html %]</td>
33
  </tr>
34
  [% ELSE %]
25 35
  <tr>
26 36
    <td align="right">[% 'Carry over account for year-end closing' | $T8 %]</td>
27 37
    <td>[% carry_over_chart.displayable_name | html %]</td>
......
34 44
    <td align="right">[% 'Loss carried forward account' | $T8 %]</td>
35 45
    <td>[% loss_chart.displayable_name | html %]</td>
36 46
  </tr>
47
  [% END %]
37 48
</table>
38 49
</form>
50
[% ELSIF SELF.defaults.yearend_method == 'simple' %]
51
  [% 'Please configure the year-end closing and the profit or loss carried forward accounts for year-end closing in the client configuration!' | $T8 %]
39 52
[% ELSE %]
40 53
  [% 'Please configure the carry over and profit and loss accounts for year-end closing in the client configuration!' | $T8 %]
41 54
[% END %]

Auch abrufbar als: Unified diff