Revision c648487a
Von Andreas Rudin vor etwa 1 Jahr hinzugefügt
- ID c648487ad906252da91494510e501c002e429322
- Vorgänger 64ed077b
| SL/Controller/ClientConfig.pm | ||
|---|---|---|
| use Rose::Object::MakeMethods::Generic (
 | ||
|   '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
 | ||
|                                   all_project_statuses all_project_types zugferd_settings
 | ||
|                                   posting_options payment_options accounting_options inventory_options profit_options balance_startdate_method_options
 | ||
|                                   posting_options payment_options accounting_options inventory_options profit_options balance_startdate_method_options yearend_options
 | ||
|                                   displayable_name_specs_by_module available_documents_with_no_positions) ],
 | ||
| );
 | ||
|  | ||
| ... | ... | |
|   return SL::DB::Helper::AccountingPeriod::get_balance_startdate_method_options;
 | ||
| }
 | ||
|  | ||
| sub init_yearend_options {
 | ||
|   [ { title => t8("default"),         value => "default"   },
 | ||
|     { title => t8("simple"),          value => "simple"    }, ]
 | ||
| }
 | ||
|  | ||
| sub init_all_price_sources {
 | ||
|   my @classes = SL::PriceSource::ALL->all_price_sources;
 | ||
|  | ||
| SL/Controller/YearEndTransactions.pm | ||
|---|---|---|
| use Data::Dumper;
 | ||
| use List::Util qw(sum);
 | ||
| use SL::ClientJS;
 | ||
| use SL::DB::Default;
 | ||
|  | ||
| use SL::DB::Chart;
 | ||
| use SL::DB::GLTransaction;
 | ||
| ... | ... | |
| use SL::DB::Helper::AccountingPeriod qw(get_balance_starting_date get_balance_startdate_method_options);
 | ||
|  | ||
| use Rose::Object::MakeMethods::Generic (
 | ||
|   'scalar --get_set_init' => [ qw(cb_date cb_startdate ob_date) ],
 | ||
|   'scalar --get_set_init' => [ qw(cb_date cb_startdate ob_date defaults) ],
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->run_before('check_auth');
 | ||
| ... | ... | |
|   my $defaults         = SL::DB::Default->get;
 | ||
|   my $carry_over_chart = SL::DB::Manager::Chart->find_by( id => $defaults->carry_over_account_chart_id     ) // die t8('No carry-over chart configured!');
 | ||
|   my $profit_chart     = SL::DB::Manager::Chart->find_by( id => $defaults->profit_carried_forward_chart_id ) // die t8('No profit carried forward chart configured!');
 | ||
|   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!');
 | ||
|   my $loss_chart;
 | ||
|   if ( $defaults->yearend_method eq 'simple') {
 | ||
|     $loss_chart       = $profit_chart;
 | ||
|   } else {
 | ||
|     $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!');
 | ||
|   }
 | ||
|  | ||
|   my ($report_data, $profit_loss_sum) = _report(
 | ||
|                                                 start_date => $start_date,
 | ||
| ... | ... | |
|                               @{$report_data};
 | ||
|     $profit_loss_sum ||= 0;
 | ||
|     my $pl_chart;
 | ||
|     if ( $profit_loss_sum > 0 ) {
 | ||
|     if ( $profit_loss_sum > 0 || $defaults->yearend_method eq 'simple') {
 | ||
|       $pl_chart = $profit_chart;
 | ||
|     } else {
 | ||
|       $pl_chart = $loss_chart;
 | ||
| ... | ... | |
|     my $pl_debit_balance  = 0;
 | ||
|     my $pl_credit_balance = 0;
 | ||
|     # soll = debit, haben = credit
 | ||
|     my $pl_cb_debit_entry = SL::DB::GLTransaction->new(
 | ||
|       employee_id    => $employee_id,
 | ||
|       transdate      => $cb_date,
 | ||
|       reference      => 'SB ' . $cb_date->year,
 | ||
|       description    => 'Automatische SB-Buchungen Erfolgskonten Soll für ' . $cb_date->year,
 | ||
|       ob_transaction => 0,
 | ||
|       cb_transaction => 1,
 | ||
|       taxincluded    => 0,
 | ||
|       transactions   => [],
 | ||
|     );
 | ||
|     my $pl_cb_credit_entry = SL::DB::GLTransaction->new(
 | ||
|       employee_id    => $employee_id,
 | ||
|       transdate      => $cb_date,
 | ||
|       reference      => 'SB ' . $cb_date->year,
 | ||
|       description    => 'Automatische SB-Buchungen Erfolgskonten Haben für ' . $cb_date->year,
 | ||
|       ob_transaction => 0,
 | ||
|       cb_transaction => 1,
 | ||
|       taxincluded    => 0,
 | ||
|       transactions   => [],
 | ||
|     );
 | ||
|  | ||
|     foreach my $profit_loss_account ( @profit_loss_accounts ) {
 | ||
|       # $main::lxdebug->message(0, sprintf("found chart %s with balance %s", $profit_loss_account->{accno}, $profit_loss_account->{amount_with_cb}));
 | ||
|       my $chart = $charts_by_id{ $profit_loss_account->{chart_id} };
 | ||
|  | ||
|       next if $profit_loss_account->{amount_with_cb} == 0;
 | ||
|     if ($defaults->yearend_method ne 'simple') {
 | ||
|       my $pl_cb_debit_entry = SL::DB::GLTransaction->new(
 | ||
|         employee_id    => $employee_id,
 | ||
|         transdate      => $cb_date,
 | ||
|         reference      => 'SB ' . $cb_date->year,
 | ||
|         description    => 'Automatische SB-Buchungen Erfolgskonten Soll für ' . $cb_date->year,
 | ||
|         ob_transaction => 0,
 | ||
|         cb_transaction => 1,
 | ||
|         taxincluded    => 0,
 | ||
|         transactions   => [],
 | ||
|       );
 | ||
|       my $pl_cb_credit_entry = SL::DB::GLTransaction->new(
 | ||
|         employee_id    => $employee_id,
 | ||
|         transdate      => $cb_date,
 | ||
|         reference      => 'SB ' . $cb_date->year,
 | ||
|         description    => 'Automatische SB-Buchungen Erfolgskonten Haben für ' . $cb_date->year,
 | ||
|         ob_transaction => 0,
 | ||
|         cb_transaction => 1,
 | ||
|         taxincluded    => 0,
 | ||
|         transactions   => [],
 | ||
|       );
 | ||
|  | ||
|       if ( $profit_loss_account->{amount_with_cb} < 0 ) {
 | ||
|         $pl_debit_balance -= $profit_loss_account->{amount_with_cb};
 | ||
|         $pl_cb_debit_entry->add_chart_booking(
 | ||
|           chart  => $chart,
 | ||
|           tax_id => 0,
 | ||
|           credit => - $profit_loss_account->{amount_with_cb},
 | ||
|         );
 | ||
|       } else {
 | ||
|         $pl_credit_balance += $profit_loss_account->{amount_with_cb};
 | ||
|         $pl_cb_credit_entry->add_chart_booking(
 | ||
|           chart  => $chart,
 | ||
|           tax_id => 0,
 | ||
|           debit  => $profit_loss_account->{amount_with_cb},
 | ||
|         );
 | ||
|       foreach my $profit_loss_account ( @profit_loss_accounts ) {
 | ||
|         # $main::lxdebug->message(0, sprintf("found chart %s with balance %s", $profit_loss_account->{accno}, $profit_loss_account->{amount_with_cb}));
 | ||
|         my $chart = $charts_by_id{ $profit_loss_account->{chart_id} };
 | ||
|  | ||
|         next if $profit_loss_account->{amount_with_cb} == 0;
 | ||
|  | ||
|         if ( $profit_loss_account->{amount_with_cb} < 0 ) {
 | ||
|           $pl_debit_balance -= $profit_loss_account->{amount_with_cb};
 | ||
|           $pl_cb_debit_entry->add_chart_booking(
 | ||
|             chart  => $chart,
 | ||
|             tax_id => 0,
 | ||
|             credit => - $profit_loss_account->{amount_with_cb},
 | ||
|           );
 | ||
|         } else {
 | ||
|           $pl_credit_balance += $profit_loss_account->{amount_with_cb};
 | ||
|           $pl_cb_credit_entry->add_chart_booking(
 | ||
|             chart  => $chart,
 | ||
|             tax_id => 0,
 | ||
|             debit  => $profit_loss_account->{amount_with_cb},
 | ||
|           );
 | ||
|         };
 | ||
|       };
 | ||
|     };
 | ||
|  | ||
|     # $main::lxdebug->message(0, "pl_debit_balance  = $pl_debit_balance");
 | ||
|     # $main::lxdebug->message(0, "pl_credit_balance = $pl_credit_balance");
 | ||
|  | ||
|     $pl_cb_debit_entry->add_chart_booking(
 | ||
|       chart  => $pl_chart,
 | ||
|       tax_id => 0,
 | ||
|       debit  => $pl_debit_balance,
 | ||
|     ) if $pl_debit_balance;
 | ||
|       # $main::lxdebug->message(0, "pl_debit_balance  = $pl_debit_balance");
 | ||
|       # $main::lxdebug->message(0, "pl_credit_balance = $pl_credit_balance");
 | ||
|  | ||
|     $pl_cb_credit_entry->add_chart_booking(
 | ||
|       chart  => $pl_chart,
 | ||
|       tax_id => 0,
 | ||
|       credit => $pl_credit_balance,
 | ||
|     ) if $pl_credit_balance;
 | ||
|       $pl_cb_debit_entry->add_chart_booking(
 | ||
|         chart  => $pl_chart,
 | ||
|         tax_id => 0,
 | ||
|         debit  => $pl_debit_balance,
 | ||
|       ) if $pl_debit_balance;
 | ||
|  | ||
|     # printf("debit : %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_debit_entry->transactions };
 | ||
|     # printf("credit: %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_credit_entry->transactions };
 | ||
|       $pl_cb_credit_entry->add_chart_booking(
 | ||
|         chart  => $pl_chart,
 | ||
|         tax_id => 0,
 | ||
|         credit => $pl_credit_balance,
 | ||
|       ) if $pl_credit_balance;
 | ||
|  | ||
|     $pl_cb_debit_entry->post  if scalar @{ $pl_cb_debit_entry->transactions }  > 1;
 | ||
|     $pl_cb_credit_entry->post if scalar @{ $pl_cb_credit_entry->transactions } > 1;
 | ||
|       # printf("debit : %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_debit_entry->transactions };
 | ||
|       # printf("credit: %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_credit_entry->transactions };
 | ||
|  | ||
|       $pl_cb_debit_entry->post  if scalar @{ $pl_cb_debit_entry->transactions }  > 1;
 | ||
|       $pl_cb_credit_entry->post if scalar @{ $pl_cb_credit_entry->transactions } > 1;
 | ||
|     };
 | ||
|     ######### profit-loss transfer #########
 | ||
|     # and finally transfer the new balance of the profit-loss account via the carry-over account
 | ||
|     # we want to use profit_loss_sum with cb!
 | ||
|  | ||
|     if ( $profit_loss_sum != 0 ) {
 | ||
|  | ||
|       my $carry_over_cb_entry = SL::DB::GLTransaction->new(
 | ||
|         employee_id    => $employee_id,
 | ||
|         transdate      => $cb_date,
 | ||
|         reference      => 'SB ' . $cb_date->year,
 | ||
|         description    => sprintf('Automatische SB-Buchung für %s %s',
 | ||
|                                   $profit_loss_sum >= 0 ? 'Gewinnvortrag' : 'Verlustvortrag',
 | ||
|                                   $cb_date->year,
 | ||
|                                  ),
 | ||
|         ob_transaction => 0,
 | ||
|         cb_transaction => 1,
 | ||
|         taxincluded    => 0,
 | ||
|         transactions   => [],
 | ||
|       );
 | ||
|       my $carry_over_cb_entry;
 | ||
|       if ($defaults->yearend_method ne 'simple') {
 | ||
|         $carry_over_cb_entry = SL::DB::GLTransaction->new(
 | ||
|           employee_id    => $employee_id,
 | ||
|           transdate      => $cb_date,
 | ||
|           reference      => 'SB ' . $cb_date->year,
 | ||
|           description    => sprintf('Automatische SB-Buchung für %s %s',
 | ||
|                                     $profit_loss_sum >= 0 ? 'Gewinnvortrag' : 'Verlustvortrag',
 | ||
|                                     $cb_date->year,
 | ||
|                                    ),
 | ||
|           ob_transaction => 0,
 | ||
|           cb_transaction => 1,
 | ||
|           taxincluded    => 0,
 | ||
|           transactions   => [],
 | ||
|         );
 | ||
|       };
 | ||
|       my $carry_over_ob_entry = SL::DB::GLTransaction->new(
 | ||
|         employee_id    => $employee_id,
 | ||
|         transdate      => $ob_date,
 | ||
| ... | ... | |
|         $amount2 = 'debit';
 | ||
|       };
 | ||
|  | ||
|       $carry_over_cb_entry->add_chart_booking(
 | ||
|         chart    => $carry_over_chart,
 | ||
|         tax_id   => 0,
 | ||
|         $amount1 => abs($profit_loss_sum),
 | ||
|       );
 | ||
|       $carry_over_cb_entry->add_chart_booking(
 | ||
|         chart    => $pl_chart,
 | ||
|         tax_id   => 0,
 | ||
|         $amount2 => abs($profit_loss_sum),
 | ||
|       );
 | ||
|       if ($defaults->yearend_method ne 'simple') {
 | ||
|         $carry_over_cb_entry->add_chart_booking(
 | ||
|           chart    => $carry_over_chart,
 | ||
|           tax_id   => 0,
 | ||
|           $amount1 => abs($profit_loss_sum),
 | ||
|         );
 | ||
|         $carry_over_cb_entry->add_chart_booking(
 | ||
|           chart    => $pl_chart,
 | ||
|           tax_id   => 0,
 | ||
|           $amount2 => abs($profit_loss_sum),
 | ||
|         );
 | ||
|       };
 | ||
|       $carry_over_ob_entry->add_chart_booking(
 | ||
|         chart    => $carry_over_chart,
 | ||
|         tax_id   => 0,
 | ||
| ... | ... | |
|       # printf("debit : %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $carry_over_ob_entry->transactions };
 | ||
|       # printf("credit: %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $carry_over_ob_entry->transactions };
 | ||
|  | ||
|       $carry_over_cb_entry->post if scalar @{ $carry_over_cb_entry->transactions } > 1;
 | ||
|       if ($defaults->yearend_method ne 'simple') {
 | ||
|         $carry_over_cb_entry->post if scalar @{ $carry_over_cb_entry->transactions } > 1;
 | ||
|       };
 | ||
|       $carry_over_ob_entry->post if scalar @{ $carry_over_ob_entry->transactions } > 1;
 | ||
|     };
 | ||
|  | ||
| ... | ... | |
| sub init_ob_date        { $::locale->parse_date_to_object($::form->{ob_date})      }
 | ||
| sub init_cb_startdate   { $::locale->parse_date_to_object($::form->{cb_startdate}) }
 | ||
| sub init_cb_date        { $::locale->parse_date_to_object($::form->{cb_date})      }
 | ||
|  | ||
| sub init_defaults       { SL::DB::Default->get }
 | ||
| 1;
 | ||
| SL/DB/MetaSetup/Default.pm | ||
|---|---|---|
|   webdav_sync_extern_url                    => { type => 'text' },
 | ||
|   weightunit                                => { type => 'varchar', length => 5 },
 | ||
|   workflow_po_ap_chart_id                   => { type => 'integer' },
 | ||
|   yearend_method                            => { type => 'text' },
 | ||
| );
 | ||
|  | ||
| __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 | ||
| locale/de/all | ||
|---|---|---|
|   '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)',
 | ||
|   '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:',
 | ||
|   '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!',
 | ||
|   '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!',
 | ||
|   'Please contact your administrator or a service provider.' => 'Bitte kontaktieren Sie Ihren Administrator oder einen Dienstleister.',
 | ||
|   'Please contact your administrator.' => 'Bitte wenden Sie sich an Ihren Administrator.',
 | ||
|   '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.',
 | ||
| ... | ... | |
|   'Profit and loss accounts'    => 'Erfolgskonten',
 | ||
|   'Profit carried forward account' => 'Gewinnvortragskonto',
 | ||
|   'Profit determination'        => 'Gewinnermittlung',
 | ||
|   'Profit or loss carried forward account' => 'Konto zum Verbuchen des Jahresgewinns oder -verlusts',
 | ||
|   'Proforma Invoice'            => 'Proformarechnung',
 | ||
|   'Program'                     => 'Programm',
 | ||
|   'Project'                     => 'Projekt',
 | ||
| ... | ... | |
|   'This option controls the inventory system.' => 'Dieser Parameter legt die Warenbuchungsmethode fest.',
 | ||
|   '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',
 | ||
|   'This option controls the method used for profit determination.' => 'Dieser Parameter legt die Berechnungsmethode für die Gewinnermittlung fest.',
 | ||
|   'This option controls the method used for the automated year-end bookings.' => 'Dieser Parameter legt die Methode für die automatischen Jahresabschluss-Buchungen fest.',
 | ||
|   'This option controls the posting and calculation behavior for the accounting method.' => 'Dieser Parameter steuert die Buchungs- und Berechnungsmethoden für die Versteuerungsart.',
 | ||
|   'This order has already a final invoice.' => 'Dieser Auftrag hat schon eine Schlussrechnung.',
 | ||
|   'This part has already been added.' => 'Dieser Artikel wurde schon hinzugefügt',
 | ||
| ... | ... | |
|   'Year'                        => 'Jahr',
 | ||
|   'Year-end bookings were successfully completed!' => 'Die Jahresabschlußbuchungen wurden erfolgreich durchgeführt!',
 | ||
|   'Year-end closing'            => 'Jahresabschluß',
 | ||
|   'Year-end closing account'    => 'Jahresabschluss-Konto',
 | ||
|   'Year-end date'               => 'Jahresabschlußdatum',
 | ||
|   'Year-end date missing'       => 'Jahresabschlußdatum fehlt',
 | ||
|   'Year-end method'             => 'Jahresabschluss-Methode',
 | ||
|   'Yearly'                      => 'jährlich',
 | ||
|   'Yearly taxreport not yet implemented' => 'Jährlicher Steuerreport für dieses Ausgabeformat noch nicht implementiert',
 | ||
|   'Yes'                         => 'Ja',
 | ||
| ... | ... | |
|   'cp_greeting to cp_gender migration' => 'Datenumwandlung von Titel nach Geschlecht (cp_greeting to cp_gender)',
 | ||
|   'customer_list'               => 'kundenliste',
 | ||
|   'dated'                       => 'datiert',
 | ||
|   'default'                     => 'Standard',
 | ||
|   'default exchange rate'       => 'Tageskurs',
 | ||
|   'delete'                      => 'Löschen',
 | ||
|   'delete item'                 => 'Position löschen',
 | ||
| ... | ... | |
|   'service_list'                => 'dienstleistungsliste',
 | ||
|   'shipped'                     => 'verschickt',
 | ||
|   'shipped_br'                  => 'Verschk.',
 | ||
|   'simple'                      => 'Einfach',
 | ||
|   'singular first char'         => 'S',
 | ||
|   'sort items'                  => 'Positionen sortieren',
 | ||
|   'start upload'                => 'Hochladen beginnt',
 | ||
| locale/en/all | ||
|---|---|---|
|   'Please choose for which categories the taxes should be displayed (otherwise remove the ticks):' => '',
 | ||
|   'Please choose the action to be processed for your target quantity:' => '',
 | ||
|   'Please configure the carry over and profit and loss accounts for year-end closing in the client configuration!' => '',
 | ||
|   'Please configure the year-end closing and the profit or loss carried forward accounts for year-end closing in the client configuration!' => '',
 | ||
|   'Please contact your administrator or a service provider.' => '',
 | ||
|   'Please contact your administrator.' => '',
 | ||
|   'Please correct the settings and try again or deactivate that client.' => '',
 | ||
| ... | ... | |
|   'Profit and loss accounts'    => '',
 | ||
|   'Profit carried forward account' => '',
 | ||
|   'Profit determination'        => '',
 | ||
|   'Profit or loss carried forward account' => '',
 | ||
|   'Proforma Invoice'            => '',
 | ||
|   'Program'                     => '',
 | ||
|   'Project'                     => '',
 | ||
| ... | ... | |
|   'This option controls the inventory system.' => '',
 | ||
|   'This option controls the method used for determining the startdate for the balance report.' => '',
 | ||
|   'This option controls the method used for profit determination.' => '',
 | ||
|   'This option controls the method used for the automated year-end bookings.' => '',
 | ||
|   'This option controls the posting and calculation behavior for the accounting method.' => '',
 | ||
|   'This order has already a final invoice.' => '',
 | ||
|   'This part has already been added.' => '',
 | ||
| ... | ... | |
|   'Year'                        => '',
 | ||
|   'Year-end bookings were successfully completed!' => '',
 | ||
|   'Year-end closing'            => '',
 | ||
|   'Year-end closing account'    => '',
 | ||
|   'Year-end date'               => '',
 | ||
|   'Year-end date missing'       => '',
 | ||
|   'Year-end method'             => '',
 | ||
|   'Yearly'                      => '',
 | ||
|   'Yearly taxreport not yet implemented' => '',
 | ||
|   'Yes'                         => '',
 | ||
| ... | ... | |
|   'cp_greeting to cp_gender migration' => '',
 | ||
|   'customer_list'               => '',
 | ||
|   'dated'                       => '',
 | ||
|   'default'                     => '',
 | ||
|   'default exchange rate'       => '',
 | ||
|   'delete'                      => '',
 | ||
|   'delete item'                 => '',
 | ||
| ... | ... | |
|   'service_list'                => '',
 | ||
|   'shipped'                     => '',
 | ||
|   'shipped_br'                  => 'shipped',
 | ||
|   'simple'                      => '',
 | ||
|   'singular first char'         => '',
 | ||
|   'sort items'                  => '',
 | ||
|   'start upload'                => '',
 | ||
| sql/Pg-upgrade2/defaults_yearend_method.sql | ||
|---|---|---|
| -- @tag: defaults_yearend_method
 | ||
| -- @description: method used for the automated year-end bookings
 | ||
| -- @depends: release_3_8_0
 | ||
|  | ||
| ALTER TABLE defaults ADD COLUMN yearend_method TEXT;
 | ||
| templates/design40_webpages/client_config/_default_accounts.html | ||
|---|---|---|
| <table class="tbl-horizontal">
 | ||
|   <caption>[% LxERP.t8("Year-end closing") %]</caption>
 | ||
|   <tbody>
 | ||
|     [% IF SELF.defaults.yearend_method == 'simple' %] [% THEN %]
 | ||
|     <tr>
 | ||
|       <th>[% LxERP.t8("Year-end closing account") %]</th>
 | ||
|       <td>[% P.chart.picker('defaults.carry_over_account_chart_id', SELF.defaults.carry_over_account_chart_id, choose=1, style=style) %]</td>
 | ||
|     </tr>
 | ||
|     <tr>
 | ||
|       <th>[% LxERP.t8("Profit or loss carried forward account") %]</th>
 | ||
|       <td>[% P.chart.picker('defaults.profit_carried_forward_chart_id', SELF.defaults.profit_carried_forward_chart_id, choose=1, style=style) %]</td>
 | ||
|     </tr>
 | ||
|     [% ELSE %]
 | ||
|     <tr>
 | ||
|       <th>[% LxERP.t8("Carry over account for year-end closing") %]</th>
 | ||
|       <td>[% P.chart.picker('defaults.carry_over_account_chart_id', SELF.defaults.carry_over_account_chart_id, category='A', choose=1, style=style) %]</td>
 | ||
| ... | ... | |
|       <th>[% LxERP.t8("Loss carried forward account") %]</th>
 | ||
|       <td>[% P.chart.picker('defaults.loss_carried_forward_chart_id', SELF.defaults.loss_carried_forward_chart_id, category='A', choose=1, style=style) %]</td>
 | ||
|     </tr>
 | ||
|     [% END %]
 | ||
|     <tr>
 | ||
|    <th>[% LxERP.t8("Transit Items account") %]</th>
 | ||
|    <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 | ||
|---|---|---|
|       <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>
 | ||
|       <td class="longdesc">[% LxERP.t8('This option controls the method used for determining the startdate for the balance report.') %]</td>
 | ||
|     </tr>
 | ||
|     <tr>
 | ||
|       <th>[% LxERP.t8('Year-end method') %]</th>
 | ||
|       <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>
 | ||
|       <td class="longdesc">[% LxERP.t8('This option controls the method used for the automated year-end bookings.') %]</td>
 | ||
|     </tr>
 | ||
|     <tr>
 | ||
|       <th>[% LxERP.t8('Set valid until date for Sales Quotation') %]</th>
 | ||
|       <td>[% L.yes_no_tag('defaults.reqdate_on', SELF.defaults.reqdate_on) %]</td>
 | ||
| templates/design40_webpages/yearend/form.html | ||
|---|---|---|
|  | ||
| <div class="wrapper">
 | ||
|  | ||
| [% IF carry_over_chart AND profit_chart AND loss_chart %] [% THEN %]
 | ||
| [% IF carry_over_chart AND profit_chart AND (loss_chart OR SELF.defaults.yearend_method == 'simple') %] [% THEN %]
 | ||
| <form id="filter" name="filter" method="post" action="controller.pl">
 | ||
| <table class="tbl-horizontal">
 | ||
|   <tr>
 | ||
| ... | ... | |
|     <td>[% 'Start date' | $T8 %]</td>
 | ||
|     <td>[% L.date_tag('cb_startdate', '', readonly=1) %]</td>
 | ||
|   </tr>
 | ||
|   [% IF SELF.defaults.yearend_method == 'simple' %] [% THEN %]
 | ||
|   <tr>
 | ||
|     <td>[% 'Year-end closing account' | $T8 %]</td>
 | ||
|     <td>[% carry_over_chart.displayable_name | html %]</td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td>[% 'Profit or loss carried forward account' | $T8 %]</td>
 | ||
|     <td>[% profit_chart.displayable_name | html %]</td>
 | ||
|   </tr>
 | ||
|   [% ELSE %]
 | ||
|   <tr>
 | ||
|     <td>[% 'Carry over account for year-end closing' | $T8 %]</td>
 | ||
|     <td>[% carry_over_chart.displayable_name | html %]</td>
 | ||
| ... | ... | |
|     <td>[% 'Loss carried forward account' | $T8 %]</td>
 | ||
|     <td>[% loss_chart.displayable_name | html %]</td>
 | ||
|   </tr>
 | ||
|   [% END %]
 | ||
| </table>
 | ||
| </form>
 | ||
| [% ELSIF SELF.defaults.yearend_method == 'simple' %]
 | ||
|   [% 'Please configure the year-end closing and the profit or loss carried forward accounts for year-end closing in the client configuration!' | $T8 %]
 | ||
| [% ELSE %]
 | ||
|   [% 'Please configure the carry over and profit and loss accounts for year-end closing in the client configuration!' | $T8 %]
 | ||
| [% END %]
 | ||
| templates/webpages/client_config/_default_accounts.html | ||
|---|---|---|
|   <tr>
 | ||
|     <th align="right">[% LxERP.t8("Year-end closing") %]</th>
 | ||
|   </tr>
 | ||
|   [% IF SELF.defaults.yearend_method == 'simple' %] [% THEN %]
 | ||
|   <tr>
 | ||
|     <td>[% LxERP.t8("Year-end closing account") %]</td>
 | ||
|     <td>[% P.chart.picker('defaults.carry_over_account_chart_id', SELF.defaults.carry_over_account_chart_id, choose=1, style=style) %]</td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td>[% LxERP.t8("Profit or loss carried forward account") %]</td>
 | ||
|     <td>[% P.chart.picker('defaults.profit_carried_forward_chart_id', SELF.defaults.profit_carried_forward_chart_id, choose=1, style=style) %]</td>
 | ||
|   </tr>
 | ||
|   [% ELSE %]
 | ||
|   <tr>
 | ||
|    <td align="right">[% LxERP.t8("Carry over account for year-end closing") %]</td>
 | ||
|    <td>[% P.chart.picker('defaults.carry_over_account_chart_id', SELF.defaults.carry_over_account_chart_id, category='A', choose=1, style=style) %]<td>
 | ||
| ... | ... | |
|    <td align="right">[% LxERP.t8("Loss carried forward account") %]</td>
 | ||
|    <td>[% P.chart.picker('defaults.loss_carried_forward_chart_id', SELF.defaults.loss_carried_forward_chart_id, category='A', choose=1, style=style) %]<td>
 | ||
|   </tr>
 | ||
|   [% END %]
 | ||
|   <tr>
 | ||
|    <td align="right">[% LxERP.t8("Transit Items account") %]</td>
 | ||
|    <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 | ||
|---|---|---|
|    <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>
 | ||
|    <td>[% LxERP.t8('This option controls the method used for determining the startdate for the balance report.') %]</td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td align="right">[% LxERP.t8('Year-end method') %]</td>
 | ||
|     <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>
 | ||
|     <td>[% LxERP.t8('This option controls the method used for the automated year-end bookings.') %]</td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|    <td align="right">[% LxERP.t8('Set valid until date for Sales Quotation') %]</td>
 | ||
|    <td>[% L.yes_no_tag('defaults.reqdate_on', SELF.defaults.reqdate_on) %]</td>
 | ||
| templates/webpages/yearend/form.html | ||
|---|---|---|
|  | ||
| [%- INCLUDE 'common/flash.html' %]
 | ||
|  | ||
| [% IF carry_over_chart AND profit_chart AND loss_chart %] [% THEN %]
 | ||
| [% IF carry_over_chart AND profit_chart AND (loss_chart OR SELF.defaults.yearend_method == 'simple') %] [% THEN %]
 | ||
| <form id="filter" name="filter" method="post" action="controller.pl">
 | ||
| <table>
 | ||
|   <tr>
 | ||
| ... | ... | |
|     <td align="right">[% 'Start date' | $T8 %]</td>
 | ||
|     <td>[% L.date_tag('cb_startdate', '', readonly=1) %]</td>
 | ||
|   </tr>
 | ||
|   [% IF SELF.defaults.yearend_method == 'simple' %] [% THEN %]
 | ||
|   <tr>
 | ||
|     <td align="right">[% 'Year-end closing account' | $T8 %]</td>
 | ||
|     <td>[% carry_over_chart.displayable_name | html %]</td>
 | ||
|   </tr>
 | ||
|   <tr>
 | ||
|     <td align="right">[% 'Profit or loss carried forward account' | $T8 %]</td>
 | ||
|     <td>[% profit_chart.displayable_name | html %]</td>
 | ||
|   </tr>
 | ||
|   [% ELSE %]
 | ||
|   <tr>
 | ||
|     <td align="right">[% 'Carry over account for year-end closing' | $T8 %]</td>
 | ||
|     <td>[% carry_over_chart.displayable_name | html %]</td>
 | ||
| ... | ... | |
|     <td align="right">[% 'Loss carried forward account' | $T8 %]</td>
 | ||
|     <td>[% loss_chart.displayable_name | html %]</td>
 | ||
|   </tr>
 | ||
|   [% END %]
 | ||
| </table>
 | ||
| </form>
 | ||
| [% ELSIF SELF.defaults.yearend_method == 'simple' %]
 | ||
|   [% 'Please configure the year-end closing and the profit or loss carried forward accounts for year-end closing in the client configuration!' | $T8 %]
 | ||
| [% ELSE %]
 | ||
|   [% 'Please configure the carry over and profit and loss accounts for year-end closing in the client configuration!' | $T8 %]
 | ||
| [% END %]
 | ||
Auch abrufbar als: Unified diff
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