]> wagnertech.de Git - mfinanz.git/blobdiff - scripts/rose_auto_create_model.pl
kivitendo 3.9.2-0.2
[mfinanz.git] / scripts / rose_auto_create_model.pl
index 5d311c18e93c8d8e2a4943733b12026c09991bbf..9db191d04fc11f837ca4ab7735162a9cfa03fac0 100755 (executable)
@@ -7,7 +7,6 @@ BEGIN {
 
   unshift(@INC, $FindBin::Bin . '/../modules/override'); # Use our own versions of various modules (e.g. YAML).
   push   (@INC, $FindBin::Bin . '/..');                  # '.' will be removed from @INC soon.
-  push   (@INC, $FindBin::Bin . '/../modules/fallback'); # Only use our own versions of modules if there's no system version.
 }
 
 use CGI qw( -no_xhtml);
@@ -73,9 +72,10 @@ our %foreign_key_name_map     = (
     ap                        => { payment_id => 'payment_terms', },
 
     orderitems                => { parts_id => 'part', trans_id => 'order', },
+    reclamation_items         => { parts_id => 'part' },
     delivery_order_items      => { parts_id => 'part' },
     invoice                   => { parts_id => 'part' },
-    follow_ups                => { created_for_user => 'created_for_employee', created_by => 'created_by_employee', },
+    follow_ups                => { created_by => 'created_by_employee', },
     follow_up_access          => { who => 'with_access', what => 'to_follow_ups_by', },
 
     periodic_invoices_configs => { oe_id => 'order', email_recipient_contact_id => 'email_recipient_contact' },
@@ -83,6 +83,8 @@ our %foreign_key_name_map     = (
 
     assembly                  => { parts_id => 'part', id => 'assembly_part' },
     assortment_items          => { parts_id => 'part' },
+
+    dunning                   => { trans_id => 'invoice', fee_interest_ar_id => 'fee_interest_invoice' },
   },
 );
 
@@ -430,8 +432,6 @@ sub drop_and_create_test_database {
     $auth_dbh->disconnect;
 
     dbh_do($dbh_template, "DROP DATABASE \"" . $db_cfg->{db} . "\"", message => "Database could not be dropped");
-
-    $::auth->reset;
   }
 
   notice("Creating database");
@@ -466,6 +466,8 @@ sub drop_and_create_test_database {
 
   apply_upgrades(auth => 1, dbh => $dbh);
 
+  $::auth->reset;
+
   notice("Creating client, user, group and employee");
 
   dbh_do($dbh, qq|DELETE FROM auth.clients|);
@@ -489,7 +491,6 @@ sub drop_and_create_test_database {
     signature                => '',
     hide_cvar_search_options => '',
     numberformat             => '1.000,00',
-    vclimit                  => 0,
     favorites                => '',
     copies                   => '',
     menustyle                => 'v3',