X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4f7837d76dff9243196ac8fb3c4099215e32c514..0dc0e521ea541e810af80d4fd828dc6755d9fd01:/t/db_helper/record_links.t diff --git a/t/db_helper/record_links.t b/t/db_helper/record_links.t index e063b33a1..edfcf72fd 100644 --- a/t/db_helper/record_links.t +++ b/t/db_helper/record_links.t @@ -20,8 +20,9 @@ use SL::DB::Order; use SL::DB::DeliveryOrder; use SL::DB::Part; use SL::DB::Unit; +use SL::DB::TaxZone; -my ($customer, $currency_id, $buchungsgruppe, $employee, $vendor); +my ($customer, $currency_id, $buchungsgruppe, $employee, $vendor, $taxzone); my ($link, $links, $o1, $o2, $d, $i); sub reset_state { @@ -37,18 +38,21 @@ sub reset_state { $buchungsgruppe = SL::DB::Manager::Buchungsgruppe->find_by(description => 'Standard 19%', %{ $params{buchungsgruppe} }) || croak "No accounting group"; $employee = SL::DB::Manager::Employee->current || croak "No employee"; + $taxzone = SL::DB::Manager::TaxZone->find_by( description => 'Inland') || croak "No taxzone"; $currency_id = $::instance_conf->get_currency_id; $customer = SL::DB::Customer->new( name => 'Test Customer', currency_id => $currency_id, + taxzone_id => $taxzone->id, %{ $params{customer} } )->save; $vendor = SL::DB::Vendor->new( name => 'Test Vendor', currency_id => $currency_id, + taxzone_id => $taxzone->id, %{ $params{vendor} } )->save; } @@ -61,7 +65,7 @@ sub new_order { currency_id => $currency_id, employee_id => $employee->id, salesman_id => $employee->id, - taxzone_id => 0, + taxzone_id => $taxzone->id, quotation => 0, %params, )->save; @@ -75,7 +79,7 @@ sub new_delivery_order { currency_id => $currency_id, employee_id => $employee->id, salesman_id => $employee->id, - taxzone_id => 0, + taxzone_id => $taxzone->id, %params, )->save; } @@ -89,8 +93,8 @@ sub new_invoice { employee_id => $employee->id, salesman_id => $employee->id, gldate => DateTime->today_local->to_kivitendo, - taxzone_id => 0, invoice => 1, + taxzone_id => $taxzone->id, type => 'invoice', %params, )->save;