Revision c648487a
Von Andreas Rudin vor 10 Monaten hinzugefügt
- ID c648487ad906252da91494510e501c002e429322
- Vorgänger 64ed077b
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'); |
... | ... | |
131 | 132 |
my $defaults = SL::DB::Default->get; |
132 | 133 |
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 | 134 |
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!'); |
|
135 |
my $loss_chart; |
|
136 |
if ( $defaults->yearend_method eq 'simple') { |
|
137 |
$loss_chart = $profit_chart; |
|
138 |
} else { |
|
139 |
$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!'); |
|
140 |
} |
|
135 | 141 |
|
136 | 142 |
my ($report_data, $profit_loss_sum) = _report( |
137 | 143 |
start_date => $start_date, |
... | ... | |
288 | 294 |
@{$report_data}; |
289 | 295 |
$profit_loss_sum ||= 0; |
290 | 296 |
my $pl_chart; |
291 |
if ( $profit_loss_sum > 0 ) { |
|
297 |
if ( $profit_loss_sum > 0 || $defaults->yearend_method eq 'simple') {
|
|
292 | 298 |
$pl_chart = $profit_chart; |
293 | 299 |
} else { |
294 | 300 |
$pl_chart = $loss_chart; |
... | ... | |
297 | 303 |
my $pl_debit_balance = 0; |
298 | 304 |
my $pl_credit_balance = 0; |
299 | 305 |
# 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; |
|
306 |
if ($defaults->yearend_method ne 'simple') { |
|
307 |
my $pl_cb_debit_entry = SL::DB::GLTransaction->new( |
|
308 |
employee_id => $employee_id, |
|
309 |
transdate => $cb_date, |
|
310 |
reference => 'SB ' . $cb_date->year, |
|
311 |
description => 'Automatische SB-Buchungen Erfolgskonten Soll für ' . $cb_date->year, |
|
312 |
ob_transaction => 0, |
|
313 |
cb_transaction => 1, |
|
314 |
taxincluded => 0, |
|
315 |
transactions => [], |
|
316 |
); |
|
317 |
my $pl_cb_credit_entry = SL::DB::GLTransaction->new( |
|
318 |
employee_id => $employee_id, |
|
319 |
transdate => $cb_date, |
|
320 |
reference => 'SB ' . $cb_date->year, |
|
321 |
description => 'Automatische SB-Buchungen Erfolgskonten Haben für ' . $cb_date->year, |
|
322 |
ob_transaction => 0, |
|
323 |
cb_transaction => 1, |
|
324 |
taxincluded => 0, |
|
325 |
transactions => [], |
|
326 |
); |
|
326 | 327 |
|
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 |
); |
|
328 |
foreach my $profit_loss_account ( @profit_loss_accounts ) { |
|
329 |
# $main::lxdebug->message(0, sprintf("found chart %s with balance %s", $profit_loss_account->{accno}, $profit_loss_account->{amount_with_cb})); |
|
330 |
my $chart = $charts_by_id{ $profit_loss_account->{chart_id} }; |
|
331 |
|
|
332 |
next if $profit_loss_account->{amount_with_cb} == 0; |
|
333 |
|
|
334 |
if ( $profit_loss_account->{amount_with_cb} < 0 ) { |
|
335 |
$pl_debit_balance -= $profit_loss_account->{amount_with_cb}; |
|
336 |
$pl_cb_debit_entry->add_chart_booking( |
|
337 |
chart => $chart, |
|
338 |
tax_id => 0, |
|
339 |
credit => - $profit_loss_account->{amount_with_cb}, |
|
340 |
); |
|
341 |
} else { |
|
342 |
$pl_credit_balance += $profit_loss_account->{amount_with_cb}; |
|
343 |
$pl_cb_credit_entry->add_chart_booking( |
|
344 |
chart => $chart, |
|
345 |
tax_id => 0, |
|
346 |
debit => $profit_loss_account->{amount_with_cb}, |
|
347 |
); |
|
348 |
}; |
|
341 | 349 |
}; |
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 | 350 |
|
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; |
|
351 |
# $main::lxdebug->message(0, "pl_debit_balance = $pl_debit_balance"); |
|
352 |
# $main::lxdebug->message(0, "pl_credit_balance = $pl_credit_balance"); |
|
352 | 353 |
|
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;
|
|
354 |
$pl_cb_debit_entry->add_chart_booking(
|
|
355 |
chart => $pl_chart,
|
|
356 |
tax_id => 0,
|
|
357 |
debit => $pl_debit_balance,
|
|
358 |
) if $pl_debit_balance;
|
|
358 | 359 |
|
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 }; |
|
360 |
$pl_cb_credit_entry->add_chart_booking( |
|
361 |
chart => $pl_chart, |
|
362 |
tax_id => 0, |
|
363 |
credit => $pl_credit_balance, |
|
364 |
) if $pl_credit_balance; |
|
361 | 365 |
|
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;
|
|
366 |
# printf("debit : %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_debit_entry->transactions };
|
|
367 |
# printf("credit: %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $pl_cb_credit_entry->transactions };
|
|
364 | 368 |
|
369 |
$pl_cb_debit_entry->post if scalar @{ $pl_cb_debit_entry->transactions } > 1; |
|
370 |
$pl_cb_credit_entry->post if scalar @{ $pl_cb_credit_entry->transactions } > 1; |
|
371 |
}; |
|
365 | 372 |
######### profit-loss transfer ######### |
366 | 373 |
# and finally transfer the new balance of the profit-loss account via the carry-over account |
367 | 374 |
# we want to use profit_loss_sum with cb! |
368 | 375 |
|
369 | 376 |
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 |
); |
|
377 |
my $carry_over_cb_entry; |
|
378 |
if ($defaults->yearend_method ne 'simple') { |
|
379 |
$carry_over_cb_entry = SL::DB::GLTransaction->new( |
|
380 |
employee_id => $employee_id, |
|
381 |
transdate => $cb_date, |
|
382 |
reference => 'SB ' . $cb_date->year, |
|
383 |
description => sprintf('Automatische SB-Buchung für %s %s', |
|
384 |
$profit_loss_sum >= 0 ? 'Gewinnvortrag' : 'Verlustvortrag', |
|
385 |
$cb_date->year, |
|
386 |
), |
|
387 |
ob_transaction => 0, |
|
388 |
cb_transaction => 1, |
|
389 |
taxincluded => 0, |
|
390 |
transactions => [], |
|
391 |
); |
|
392 |
}; |
|
384 | 393 |
my $carry_over_ob_entry = SL::DB::GLTransaction->new( |
385 | 394 |
employee_id => $employee_id, |
386 | 395 |
transdate => $ob_date, |
... | ... | |
404 | 413 |
$amount2 = 'debit'; |
405 | 414 |
}; |
406 | 415 |
|
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 |
); |
|
416 |
if ($defaults->yearend_method ne 'simple') { |
|
417 |
$carry_over_cb_entry->add_chart_booking( |
|
418 |
chart => $carry_over_chart, |
|
419 |
tax_id => 0, |
|
420 |
$amount1 => abs($profit_loss_sum), |
|
421 |
); |
|
422 |
$carry_over_cb_entry->add_chart_booking( |
|
423 |
chart => $pl_chart, |
|
424 |
tax_id => 0, |
|
425 |
$amount2 => abs($profit_loss_sum), |
|
426 |
); |
|
427 |
}; |
|
417 | 428 |
$carry_over_ob_entry->add_chart_booking( |
418 | 429 |
chart => $carry_over_chart, |
419 | 430 |
tax_id => 0, |
... | ... | |
428 | 439 |
# printf("debit : %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $carry_over_ob_entry->transactions }; |
429 | 440 |
# printf("credit: %s -> %s\n", $_->chart->displayable_name, $_->amount) foreach @{ $carry_over_ob_entry->transactions }; |
430 | 441 |
|
431 |
$carry_over_cb_entry->post if scalar @{ $carry_over_cb_entry->transactions } > 1; |
|
442 |
if ($defaults->yearend_method ne 'simple') { |
|
443 |
$carry_over_cb_entry->post if scalar @{ $carry_over_cb_entry->transactions } > 1; |
|
444 |
}; |
|
432 | 445 |
$carry_over_ob_entry->post if scalar @{ $carry_over_ob_entry->transactions } > 1; |
433 | 446 |
}; |
434 | 447 |
|
... | ... | |
512 | 525 |
sub init_ob_date { $::locale->parse_date_to_object($::form->{ob_date}) } |
513 | 526 |
sub init_cb_startdate { $::locale->parse_date_to_object($::form->{cb_startdate}) } |
514 | 527 |
sub init_cb_date { $::locale->parse_date_to_object($::form->{cb_date}) } |
515 |
|
|
528 |
sub init_defaults { SL::DB::Default->get } |
|
516 | 529 |
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' }, |
|
240 | 241 |
); |
241 | 242 |
|
242 | 243 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
locale/de/all | ||
---|---|---|
2889 | 2889 |
'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)', |
2890 | 2890 |
'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:', |
2891 | 2891 |
'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!', |
2892 |
'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!', |
|
2892 | 2893 |
'Please contact your administrator or a service provider.' => 'Bitte kontaktieren Sie Ihren Administrator oder einen Dienstleister.', |
2893 | 2894 |
'Please contact your administrator.' => 'Bitte wenden Sie sich an Ihren Administrator.', |
2894 | 2895 |
'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.', |
... | ... | |
3058 | 3059 |
'Profit and loss accounts' => 'Erfolgskonten', |
3059 | 3060 |
'Profit carried forward account' => 'Gewinnvortragskonto', |
3060 | 3061 |
'Profit determination' => 'Gewinnermittlung', |
3062 |
'Profit or loss carried forward account' => 'Konto zum Verbuchen des Jahresgewinns oder -verlusts', |
|
3061 | 3063 |
'Proforma Invoice' => 'Proformarechnung', |
3062 | 3064 |
'Program' => 'Programm', |
3063 | 3065 |
'Project' => 'Projekt', |
... | ... | |
4425 | 4427 |
'This option controls the inventory system.' => 'Dieser Parameter legt die Warenbuchungsmethode fest.', |
4426 | 4428 |
'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', |
4427 | 4429 |
'This option controls the method used for profit determination.' => 'Dieser Parameter legt die Berechnungsmethode für die Gewinnermittlung fest.', |
4430 |
'This option controls the method used for the automated year-end bookings.' => 'Dieser Parameter legt die Methode für die automatischen Jahresabschluss-Buchungen fest.', |
|
4428 | 4431 |
'This option controls the posting and calculation behavior for the accounting method.' => 'Dieser Parameter steuert die Buchungs- und Berechnungsmethoden für die Versteuerungsart.', |
4429 | 4432 |
'This order has already a final invoice.' => 'Dieser Auftrag hat schon eine Schlussrechnung.', |
4430 | 4433 |
'This part has already been added.' => 'Dieser Artikel wurde schon hinzugefügt', |
... | ... | |
4864 | 4867 |
'Year' => 'Jahr', |
4865 | 4868 |
'Year-end bookings were successfully completed!' => 'Die Jahresabschlußbuchungen wurden erfolgreich durchgeführt!', |
4866 | 4869 |
'Year-end closing' => 'Jahresabschluß', |
4870 |
'Year-end closing account' => 'Jahresabschluss-Konto', |
|
4867 | 4871 |
'Year-end date' => 'Jahresabschlußdatum', |
4868 | 4872 |
'Year-end date missing' => 'Jahresabschlußdatum fehlt', |
4873 |
'Year-end method' => 'Jahresabschluss-Methode', |
|
4869 | 4874 |
'Yearly' => 'jährlich', |
4870 | 4875 |
'Yearly taxreport not yet implemented' => 'Jährlicher Steuerreport für dieses Ausgabeformat noch nicht implementiert', |
4871 | 4876 |
'Yes' => 'Ja', |
... | ... | |
4999 | 5004 |
'cp_greeting to cp_gender migration' => 'Datenumwandlung von Titel nach Geschlecht (cp_greeting to cp_gender)', |
5000 | 5005 |
'customer_list' => 'kundenliste', |
5001 | 5006 |
'dated' => 'datiert', |
5007 |
'default' => 'Standard', |
|
5002 | 5008 |
'default exchange rate' => 'Tageskurs', |
5003 | 5009 |
'delete' => 'Löschen', |
5004 | 5010 |
'delete item' => 'Position löschen', |
... | ... | |
5207 | 5213 |
'service_list' => 'dienstleistungsliste', |
5208 | 5214 |
'shipped' => 'verschickt', |
5209 | 5215 |
'shipped_br' => 'Verschk.', |
5216 |
'simple' => 'Einfach', |
|
5210 | 5217 |
'singular first char' => 'S', |
5211 | 5218 |
'sort items' => 'Positionen sortieren', |
5212 | 5219 |
'start upload' => 'Hochladen beginnt', |
locale/en/all | ||
---|---|---|
2888 | 2888 |
'Please choose for which categories the taxes should be displayed (otherwise remove the ticks):' => '', |
2889 | 2889 |
'Please choose the action to be processed for your target quantity:' => '', |
2890 | 2890 |
'Please configure the carry over and profit and loss accounts for year-end closing in the client configuration!' => '', |
2891 |
'Please configure the year-end closing and the profit or loss carried forward accounts for year-end closing in the client configuration!' => '', |
|
2891 | 2892 |
'Please contact your administrator or a service provider.' => '', |
2892 | 2893 |
'Please contact your administrator.' => '', |
2893 | 2894 |
'Please correct the settings and try again or deactivate that client.' => '', |
... | ... | |
3057 | 3058 |
'Profit and loss accounts' => '', |
3058 | 3059 |
'Profit carried forward account' => '', |
3059 | 3060 |
'Profit determination' => '', |
3061 |
'Profit or loss carried forward account' => '', |
|
3060 | 3062 |
'Proforma Invoice' => '', |
3061 | 3063 |
'Program' => '', |
3062 | 3064 |
'Project' => '', |
... | ... | |
4423 | 4425 |
'This option controls the inventory system.' => '', |
4424 | 4426 |
'This option controls the method used for determining the startdate for the balance report.' => '', |
4425 | 4427 |
'This option controls the method used for profit determination.' => '', |
4428 |
'This option controls the method used for the automated year-end bookings.' => '', |
|
4426 | 4429 |
'This option controls the posting and calculation behavior for the accounting method.' => '', |
4427 | 4430 |
'This order has already a final invoice.' => '', |
4428 | 4431 |
'This part has already been added.' => '', |
... | ... | |
4862 | 4865 |
'Year' => '', |
4863 | 4866 |
'Year-end bookings were successfully completed!' => '', |
4864 | 4867 |
'Year-end closing' => '', |
4868 |
'Year-end closing account' => '', |
|
4865 | 4869 |
'Year-end date' => '', |
4866 | 4870 |
'Year-end date missing' => '', |
4871 |
'Year-end method' => '', |
|
4867 | 4872 |
'Yearly' => '', |
4868 | 4873 |
'Yearly taxreport not yet implemented' => '', |
4869 | 4874 |
'Yes' => '', |
... | ... | |
4997 | 5002 |
'cp_greeting to cp_gender migration' => '', |
4998 | 5003 |
'customer_list' => '', |
4999 | 5004 |
'dated' => '', |
5005 |
'default' => '', |
|
5000 | 5006 |
'default exchange rate' => '', |
5001 | 5007 |
'delete' => '', |
5002 | 5008 |
'delete item' => '', |
... | ... | |
5205 | 5211 |
'service_list' => '', |
5206 | 5212 |
'shipped' => '', |
5207 | 5213 |
'shipped_br' => 'shipped', |
5214 |
'simple' => '', |
|
5208 | 5215 |
'singular first char' => '', |
5209 | 5216 |
'sort items' => '', |
5210 | 5217 |
'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; |
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
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