my $date = DateTime->new(year => 2017, month => 1, day => 1);
my $payment_date = DateTime->new(year => 2017, month => 1, day => 5);
my $gldate = DateTime->new(year => 2017, month => 2, day => 9); # simulate bookings for Jan being made in Feb
+my $department = create_department(description => 'Kostenstelle DATEV-Schnittstelle 2018');
+my $project = create_project(projectnumber => 2017, description => 'Crowd-Funding September 2017');
my $part1 = new_part(partnumber => '19', description => 'Part 19%')->save;
my $part2 = new_part(
transdate => $date,
invoiceitems => [ create_invoice_item(part => $part1, qty => 3, sellprice => 70),
create_invoice_item(part => $part2, qty => 10, sellprice => 50),
- ]
+ ],
+ department_id => $department->id,
+ globalproject_id => $project->id,
);
$invoice->pay_invoice(chart_id => $bank->id,
amount => $invoice->open_amount,
trans_id => $invoice->id,
);
$datev1->generate_datev_data;
-my $kne_lines1 = $datev1->generate_datev_lines;
cmp_bag $datev1->generate_datev_lines, [
{
'belegfeld1' => '1 sales invoice',
'datum' => '01.01.2017',
'gegenkonto' => '8400',
'konto' => '1400',
+ 'kost1' => 'Kostenstelle DATEV-Schnittstelle 2018',
+ 'kost2' => 'Crowd-Funding September 2017',
'umsatz' => '249.9',
'waehrung' => 'EUR'
},
'datum' => '01.01.2017',
'gegenkonto' => '8300',
'konto' => '1400',
+ 'kost1' => 'Kostenstelle DATEV-Schnittstelle 2018',
+ 'kost2' => 'Crowd-Funding September 2017',
'umsatz' => 535,
'waehrung' => 'EUR'
},
'datum' => '05.01.2017',
'gegenkonto' => '1400',
'konto' => '1200',
+ 'kost1' => 'Kostenstelle DATEV-Schnittstelle 2018',
+ 'kost2' => 'Crowd-Funding September 2017',
'umsatz' => '784.9',
'waehrung' => 'EUR'
},
SL::DB::Manager::Invoice->delete_all( all => 1);
SL::DB::Manager::Customer->delete_all( all => 1);
SL::DB::Manager::Part->delete_all( all => 1);
+ SL::DB::Manager::Project->delete_all( all => 1);
+ SL::DB::Manager::Department->delete_all( all => 1);
};
1;