Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git] / SL / DB / Helper / Mappings.pm
index 35845a8..f0b8be9 100644 (file)
@@ -3,6 +3,8 @@ package SL::DB::Helper::Mappings;
 use utf8;
 use strict;
 
+use SL::Util qw(camelify);
+
 require Exporter;
 our @ISA       = qw(Exporter);
 our @EXPORT_OK = qw(get_table_for_package get_package_for_table get_package_names);
@@ -53,6 +55,7 @@ my %lxoffice_package_names = (
   csv_import_reports             => 'csv_import_report',
   csv_import_report_rows         => 'csv_import_report_row',
   csv_import_report_status       => 'csv_import_report_status',
+  currencies                     => 'currency',
   custom_variable_configs        => 'custom_variable_config',
   custom_variables               => 'custom_variable',
   custom_variables_validity      => 'custom_variable_validity',
@@ -157,18 +160,6 @@ sub db {
   die "Can't resolve '$string' as a database model, sorry. Did you perhaps forgot to load it?";
 }
 
-sub camelify {
-  my ($str) = @_;
-  $str =~ s/_+(.)/uc($1)/ge;
-  ucfirst $str;
-}
-
-sub snakify {
-  my ($str) = @_;
-  $str =~ s/(?<!^)\u(.)/'_' . lc($1)/ge;
-  lcfirst $str;
-}
-
 sub plurify {
   my ($str) = @_;
   $str . 's';