my $buchungsgruppe7 = SL::DB::Manager::Buchungsgruppe->find_by(description => 'Standard 7%') || die "No accounting group for 7\%";
my $date = DateTime->new(year => 2017, month => 7, day => 19);
my $department = create_department(description => 'Kästchenweiße heiße Preise');
my $buchungsgruppe7 = SL::DB::Manager::Buchungsgruppe->find_by(description => 'Standard 7%') || die "No accounting group for 7\%";
my $date = DateTime->new(year => 2017, month => 7, day => 19);
my $department = create_department(description => 'Kästchenweiße heiße Preise');
my ($datev_csv4, $die_message3, $lines_aref);
eval {
$datev_csv4 = SL::DATEV::CSV->new(datev_lines => $datev4->generate_datev_lines,
my ($datev_csv4, $die_message3, $lines_aref);
eval {
$datev_csv4 = SL::DATEV::CSV->new(datev_lines => $datev4->generate_datev_lines,
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
- '', '', '', '', '', '', '', '', '',
- '',
+ '', '', '', '', '', '', '', '1', '',
+ '', '', '', '', '',
];
cmp_deeply $sorted[1], [ '535', 'S', 'EUR', '', '', '',
'1400', '8300', '', '1907','meine muh',
];
cmp_deeply $sorted[1], [ '535', 'S', 'EUR', '', '', '',
'1400', '8300', '', '1907','meine muh',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
- '', '', '', '', '', '', '', '', '',
- '',
+ '', '', '', '', '', '', '', '1', '',
+ '', '', '', '', '',
];
# create one haben buchung with GLTransaction today
my $expense_chart = SL::DB::Manager::Chart->find_by(accno => '4660'); # Reisekosten
my $cash_chart = SL::DB::Manager::Chart->find_by(accno => '1000'); # Kasse
];
# create one haben buchung with GLTransaction today
my $expense_chart = SL::DB::Manager::Chart->find_by(accno => '4660'); # Reisekosten
my $cash_chart = SL::DB::Manager::Chart->find_by(accno => '1000'); # Kasse
-my $tax_chart = SL::DB::Manager::Chart->find_by(accno => '1576'); # Vorsteuer
-my $tax_9 = SL::DB::Manager::Tax->find_by(taxkey => 9, rate => 0.19) || die "No tax";
-
-my @acc_trans;
-push(@acc_trans, SL::DB::AccTransaction->new(
- chart_id => $expense_chart->id,
- chart_link => $expense_chart->link,
- amount => -84.03,
- transdate => $today,
- source => '',
- taxkey => 9,
- tax_id => $tax_9->id,
- project_id => $project->id,
-));
-push(@acc_trans, SL::DB::AccTransaction->new(
- chart_id => $tax_chart->id,
- chart_link => $tax_chart->link,
- amount => -15.97,
- transdate => $today,
- source => '',
- taxkey => 9,
- tax_id => $tax_9->id,
- project_id => $project->id,
-));
-push(@acc_trans, SL::DB::AccTransaction->new(
- chart_id => $cash_chart->id,
- chart_link => $cash_chart->link,
- amount => 100,
- transdate => $today,
- source => '',
- taxkey => 0,
- tax_id => 0,
-));
-
-my $gl_transaction = SL::DB::GLTransaction->new(
+
+my $gl_transaction = create_gl_transaction(
reference => "Reise März 2018",
description => "Reisekonsten März 2018 / Ma Schmidt",
transdate => $today,
reference => "Reise März 2018",
description => "Reisekonsten März 2018 / Ma Schmidt",
transdate => $today,
my $datev2 = SL::DATEV->new(
dbh => $dbh,
trans_id => $gl_transaction->id,
my $datev2 = SL::DATEV->new(
dbh => $dbh,
trans_id => $gl_transaction->id,
'', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '',
+ '', '', '1', '', '', '', '', '', '', ]