Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3f9f158f

Von Kivitendo Admin vor mehr als 10 Jahren hinzugefügt

  • ID 3f9f158f2b1adbb6ad47906d16776331d7cf9993
  • Vorgänger c40b4003
  • Nachfolger 2b69a6ac

Nachtrag Steuerzone - Tests angepasst

Unterschiede anzeigen:

t/db_helper/price_tax_calculator.t
129 129
  is($invoice->marge_percent,   17.4358974358974, "${title}: marge_percent");
130 130

  
131 131
  is_deeply(\%data, {
132
    allocated                            => {},
133
    amounts                              => {
134
      $buchungsgruppe->income_accno_id_0 => {
135
        amount                           => 5.85,
136
        tax_id                           => $tax->id,
137
        taxkey                           => 3,
132
    allocated                                    => {},
133
    amounts                                      => {
134
      $buchungsgruppe->income_accno_id($taxzone) => {
135
        amount                                   => 5.85,
136
        tax_id                                   => $tax->id,
137
        taxkey                                   => 3,
138 138
      },
139 139
    },
140
    amounts_cogs                         => {},
141
    assembly_items                       => [
140
    amounts_cogs                                 => {},
141
    assembly_items                               => [
142 142
      [],
143 143
    ],
144
    exchangerate                         => 1,
145
    taxes                                => {
146
      $tax->chart_id                     => 1.11,
144
    exchangerate                                 => 1,
145
    taxes                                        => {
146
      $tax->chart_id                             => 1.11,
147 147
    },
148 148
  }, "${title}: calculated data");
149 149
}
......
193 193
  is($invoice->marge_percent,    34.8943460879497, "${title}: marge_percent");
194 194

  
195 195
  is_deeply(\%data, {
196
    allocated                             => {},
197
    amounts                               => {
198
      $buchungsgruppe->income_accno_id_0  => {
199
        amount                            => 5.85,
200
        tax_id                            => $tax->id,
201
        taxkey                            => 3,
196
    allocated                                     => {},
197
    amounts                                       => {
198
      $buchungsgruppe->income_accno_id($taxzone)  => {
199
        amount                                    => 5.85,
200
        tax_id                                    => $tax->id,
201
        taxkey                                    => 3,
202 202
      },
203
      $buchungsgruppe7->income_accno_id_0 => {
204
        amount                            => 11.66,
205
        tax_id                            => $tax7->id,
206
        taxkey                            => 2,
203
      $buchungsgruppe7->income_accno_id($taxzone) => {
204
        amount                                    => 11.66,
205
        tax_id                                    => $tax7->id,
206
        taxkey                                    => 2,
207 207
      },
208 208
    },
209
    amounts_cogs                          => {},
210
    assembly_items                        => [
209
    amounts_cogs                                  => {},
210
    assembly_items                                => [
211 211
      [], [],
212 212
    ],
213
    exchangerate                          => 1,
214
    taxes                                 => {
215
      $tax->chart_id                      => 1.11,
216
      $tax7->chart_id                     => 0.82,
213
    exchangerate                                  => 1,
214
    taxes                                         => {
215
      $tax->chart_id                              => 1.11,
216
      $tax7->chart_id                             => 0.82,
217 217
    },
218 218
  }, "${title}: calculated data");
219 219
}
......
295 295
  is($invoice->marge_percent,    62.007874015748,    "${title}: marge_percent");
296 296

  
297 297
  is_deeply(\%data, {
298
    allocated                             => {},
299
    amounts                               => {
300
      $buchungsgruppe->income_accno_id_0  => {
301
        amount                            => 15.24,
302
        tax_id                            => $tax->id,
303
        taxkey                            => 3,
298
    allocated                                    => {},
299
    amounts                                      => {
300
      $buchungsgruppe->income_accno_id($taxzone) => {
301
        amount                                   => 15.24,
302
        tax_id                                   => $tax->id,
303
        taxkey                                   => 3,
304 304
      },
305 305
    },
306
    amounts_cogs                          => {},
307
    assembly_items                        => [
306
    amounts_cogs                                 => {},
307
    assembly_items                               => [
308 308
      [], [], [],
309 309
    ],
310
    exchangerate                          => 1,
311
    taxes                                 => {
312
      $tax->chart_id                      => 2.9,
310
    exchangerate                                 => 1,
311
    taxes                                        => {
312
      $tax->chart_id                             => 2.9,
313 313
    },
314 314
  }, "${title}: calculated data");
315 315
}
t/db_helper/record_links.t
20 20
use SL::DB::DeliveryOrder;
21 21
use SL::DB::Part;
22 22
use SL::DB::Unit;
23
use SL::DB::TaxZone;
23 24

  
24
my ($customer, $currency_id, $buchungsgruppe, $employee, $vendor);
25
my ($customer, $currency_id, $buchungsgruppe, $employee, $vendor, $taxzone);
25 26
my ($link, $links, $o1, $o2, $d, $i);
26 27

  
27 28
sub reset_state {
......
37 38

  
38 39
  $buchungsgruppe  = SL::DB::Manager::Buchungsgruppe->find_by(description => 'Standard 19%', %{ $params{buchungsgruppe} }) || croak "No accounting group";
39 40
  $employee        = SL::DB::Manager::Employee->current                                                                    || croak "No employee";
41
  $taxzone         = SL::DB::Manager::TaxZone->find_by( description => 'Inland')                                           || croak "No taxzone";
40 42

  
41 43
  $currency_id     = $::instance_conf->get_currency_id;
42 44

  
......
61 63
    currency_id => $currency_id,
62 64
    employee_id => $employee->id,
63 65
    salesman_id => $employee->id,
64
    taxzone_id  => 0,
66
    taxzone_id  => $taxzone->id,
65 67
    quotation   => 0,
66 68
    %params,
67 69
  )->save;
......
75 77
    currency_id => $currency_id,
76 78
    employee_id => $employee->id,
77 79
    salesman_id => $employee->id,
78
    taxzone_id  => 0,
80
    taxzone_id  => $taxzone->id,
79 81
    %params,
80 82
  )->save;
81 83
}
......
89 91
    employee_id => $employee->id,
90 92
    salesman_id => $employee->id,
91 93
    gldate      => DateTime->today_local->to_kivitendo,
92
    taxzone_id  => 0,
93 94
    invoice     => 1,
95
    taxzone_id  => $taxzone->id,
94 96
    type        => 'invoice',
95 97
    %params,
96 98
  )->save;

Auch abrufbar als: Unified diff