Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c21b3764

Von Jan Büren vor mehr als 7 Jahren hinzugefügt

  • ID c21b3764b068d8b895f66ebd953cfb7fa28c8ca9
  • Vorgänger b9e792cc
  • Nachfolger fec48603

Testfall datev erweitert: datev_data kost1 und kost2

Unterschiede anzeigen:

t/datev/invoices.t
23 23
my $date            = DateTime->new(year => 2017, month =>  1, day => 1);
24 24
my $payment_date    = DateTime->new(year => 2017, month =>  1, day => 5);
25 25
my $gldate          = DateTime->new(year => 2017, month =>  2, day => 9); # simulate bookings for Jan being made in Feb
26
my $department      = create_department(description => 'Kostenstelle DATEV-Schnittstelle 2018');
27
my $project         = create_project(projectnumber => 2017, description => 'Crowd-Funding September 2017');
26 28

  
27 29
my $part1 = new_part(partnumber => '19', description => 'Part 19%')->save;
28 30
my $part2 = new_part(
......
40 42
  transdate    => $date,
41 43
  invoiceitems => [ create_invoice_item(part => $part1, qty =>  3, sellprice => 70),
42 44
                    create_invoice_item(part => $part2, qty => 10, sellprice => 50),
43
                  ]
45
                  ],
46
  department_id    => $department->id,
47
  globalproject_id => $project->id,
44 48
);
45 49
$invoice->pay_invoice(chart_id      => $bank->id,
46 50
                      amount        => $invoice->open_amount,
......
53 57
  trans_id   => $invoice->id,
54 58
);
55 59
$datev1->generate_datev_data;
56
my $kne_lines1 = $datev1->generate_datev_lines;
57 60
cmp_bag $datev1->generate_datev_lines, [
58 61
                                         {
59 62
                                           'belegfeld1'   => '1 sales invoice',
......
61 64
                                           'datum'        => '01.01.2017',
62 65
                                           'gegenkonto'   => '8400',
63 66
                                           'konto'        => '1400',
67
                                           'kost1'        => 'Kostenstelle DATEV-Schnittstelle 2018',
68
                                           'kost2'        => 'Crowd-Funding September 2017',
64 69
                                           'umsatz'       => '249.9',
65 70
                                           'waehrung'     => 'EUR'
66 71
                                         },
......
70 75
                                           'datum'        => '01.01.2017',
71 76
                                           'gegenkonto'   => '8300',
72 77
                                           'konto'        => '1400',
78
                                           'kost1'        => 'Kostenstelle DATEV-Schnittstelle 2018',
79
                                           'kost2'        => 'Crowd-Funding September 2017',
73 80
                                           'umsatz'       => 535,
74 81
                                           'waehrung'     => 'EUR'
75 82
                                         },
......
79 86
                                           'datum'        => '05.01.2017',
80 87
                                           'gegenkonto'   => '1400',
81 88
                                           'konto'        => '1200',
89
                                           'kost1'        => 'Kostenstelle DATEV-Schnittstelle 2018',
90
                                           'kost2'        => 'Crowd-Funding September 2017',
82 91
                                           'umsatz'       => '784.9',
83 92
                                           'waehrung'     => 'EUR'
84 93
                                         },
......
150 159
  SL::DB::Manager::Invoice->delete_all(       all => 1);
151 160
  SL::DB::Manager::Customer->delete_all(      all => 1);
152 161
  SL::DB::Manager::Part->delete_all(          all => 1);
162
  SL::DB::Manager::Project->delete_all(       all => 1);
163
  SL::DB::Manager::Department->delete_all(    all => 1);
153 164
};
154 165

  
155 166
1;

Auch abrufbar als: Unified diff