Revision f358c83e
Von Kivitendo Admin vor etwa 10 Jahren hinzugefügt
t/db_helper/acts_as_list.t | ||
---|---|---|
6 | 6 |
use lib 't'; |
7 | 7 |
use utf8; |
8 | 8 |
|
9 |
use Carp; |
|
9 | 10 |
use Data::Dumper; |
10 | 11 |
use Support::TestSetup; |
12 |
use SL::DB::TaxZone; |
|
11 | 13 |
|
12 | 14 |
eval { |
13 | 15 |
require SL::DB::RequirementSpec; |
... | ... | |
24 | 26 |
plan tests => 48; |
25 | 27 |
} |
26 | 28 |
|
27 |
my ($customer, $status, $type, $r_spec, @items); |
|
29 |
my ($customer, $taxzone, $status, $type, $r_spec, @items); |
|
30 |
|
|
28 | 31 |
|
29 | 32 |
sub init { |
30 |
$customer = SL::DB::Customer->new(name => 'Test Customer', currency_id => $::instance_conf->get_currency_id)->save; |
|
33 |
$taxzone = SL::DB::Manager::TaxZone->find_by( description => 'Inland') || croak "No taxzone"; |
|
34 |
$customer = SL::DB::Customer->new(name => 'Test Customer', currency_id => $::instance_conf->get_currency_id, taxzone_id => $taxzone->id)->save; |
|
31 | 35 |
$status = SL::DB::Manager::RequirementSpecStatus->find_by(name => '', description => '') || |
32 | 36 |
SL::DB::RequirementSpecStatus->new(name => '', description => '', position => 0)->save; |
33 | 37 |
$type = SL::DB::Manager::RequirementSpecType->find_by(description => '') || |
t/db_helper/price_tax_calculator.t | ||
---|---|---|
17 | 17 |
use SL::DB::Invoice; |
18 | 18 |
use SL::DB::Part; |
19 | 19 |
use SL::DB::Unit; |
20 |
use SL::DB::TaxZone; |
|
20 | 21 |
|
21 | 22 |
my ($customer, $currency_id, @parts, $buchungsgruppe, $buchungsgruppe7, $unit, $employee, $tax, $tax7, $taxzone); |
22 | 23 |
|
... | ... | |
42 | 43 |
$customer = SL::DB::Customer->new( |
43 | 44 |
name => 'Test Customer', |
44 | 45 |
currency_id => $currency_id, |
46 |
taxzone_id => $taxzone->id, |
|
45 | 47 |
%{ $params{customer} } |
46 | 48 |
)->save; |
47 | 49 |
|
t/db_helper/record_links.t | ||
---|---|---|
45 | 45 |
$customer = SL::DB::Customer->new( |
46 | 46 |
name => 'Test Customer', |
47 | 47 |
currency_id => $currency_id, |
48 |
taxzone_id => $taxzone->id, |
|
48 | 49 |
%{ $params{customer} } |
49 | 50 |
)->save; |
50 | 51 |
|
51 | 52 |
$vendor = SL::DB::Vendor->new( |
52 | 53 |
name => 'Test Vendor', |
53 | 54 |
currency_id => $currency_id, |
55 |
taxzone_id => $taxzone->id, |
|
54 | 56 |
%{ $params{vendor} } |
55 | 57 |
)->save; |
56 | 58 |
} |
Auch abrufbar als: Unified diff
Steuerzone - neue Customer/Vendor-Objekte brauchen Steuerzone
Durch den not-NULL Constraint bei Kunden und Lieferanten muß
beim Anlegen eines neuen Objekts nun zwingend die Steuerzone mit
übergeben werden, ähnlich wie bei der Währung.
Dies wurde bei einigen automatischen Tests nachgeholt.