]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Controller/SimpleSystemSetting.pm
SimpleSystemSetting: Umstellung von »Kunden-/Lieferantentypen«
[mfinanz.git] / SL / Controller / SimpleSystemSetting.pm
index 0c797627ba6b2e808cb8f98ca63ccf3eeea48c94..fe499e2bbadf117793b7ed1af8f464959b2ce65b 100644 (file)
@@ -21,6 +21,94 @@ __PACKAGE__->run_before('setup_javascript', only => [ qw(add create edit update
 # Make locales.pl happy: $self->render("simple_system_setting/_default_form")
 
 my %supported_types = (
+  bank_account => {
+    # Make locales.pl happy: $self->render("simple_system_setting/_bank_account_form")
+    class  => 'BankAccount',
+    titles => {
+      list => t8('Bank accounts'),
+      add  => t8('Add bank account'),
+      edit => t8('Edit bank account'),
+    },
+    list_attributes => [
+      { method => 'name',                                      title => t8('Name'), },
+      { method => 'iban',                                      title => t8('IBAN'), },
+      { method => 'bank',                                      title => t8('Bank'), },
+      { method => 'bank_code',                                 title => t8('Bank code'), },
+      { method => 'bic',                                       title => t8('BIC'), },
+      { method => 'reconciliation_starting_date_as_date',      title => t8('Date'),    align => 'right' },
+      { method => 'reconciliation_starting_balance_as_number', title => t8('Balance'), align => 'right' },
+    ],
+  },
+
+  business => {
+    # Make locales.pl happy: $self->render("simple_system_setting/_business_form")
+    class  => 'Business',
+    titles => {
+      list => t8('Businesses'),
+      add  => t8('Add business'),
+      edit => t8('Edit business'),
+    },
+    list_attributes => [
+      { method => 'description',         title => t8('Description'), },
+      {                                  title => t8('Discount'), formatter => sub { $_[0]->discount_as_percent . ' %' }, align => 'right' },
+      { method => 'customernumberinit',  title => t8('Customernumberinit'), },
+    ],
+  },
+
+  department => {
+    class  => 'Department',
+    titles => {
+      list => t8('Departments'),
+      add  => t8('Add department'),
+      edit => t8('Edit department'),
+    },
+  },
+
+  part_classification => {
+    # Make locales.pl happy: $self->render("simple_system_setting/_part_classification_form")
+    class  => 'PartClassification',
+    titles => {
+      list => t8('Part classifications'),
+      add  => t8('Add part classification'),
+      edit => t8('Edit part classification'),
+    },
+    list_attributes => [
+      { title => t8('Description'),       formatter => sub { t8($_[0]->description) } },
+      { title => t8('Type abbreviation'), formatter => sub { t8($_[0]->abbreviation) } },
+      { title => t8('Used for Purchase'), formatter => sub { $_[0]->used_for_purchase ? t8('yes') : t8('no') } },
+      { title => t8('Used for Sale'),     formatter => sub { $_[0]->used_for_sale     ? t8('yes') : t8('no') } },
+      { title => t8('Report separately'), formatter => sub { $_[0]->report_separate   ? t8('yes') : t8('no') } },
+    ],
+  },
+
+  parts_group => {
+    # Make locales.pl happy: $self->render("simple_system_setting/_parts_group_form")
+    class  => 'PartsGroup',
+    titles => {
+      list => t8('Partsgroups'),
+      add  => t8('Add partsgroup'),
+      edit => t8('Edit partsgroup'),
+    },
+    list_attributes => [
+      { method => 'partsgroup', title => t8('Description') },
+      { method => 'obsolete',   title => t8('Obsolete'), formatter => sub { $_[0]->obsolete ? t8('yes') : t8('no') } },
+    ],
+  },
+
+  price_factor => {
+    # Make locales.pl happy: $self->render("simple_system_setting/_price_factor_form")
+    class  => 'PriceFactor',
+    titles => {
+      list => t8('Price Factors'),
+      add  => t8('Add Price Factor'),
+      edit => t8('Edit Price Factor'),
+    },
+    list_attributes => [
+      { method => 'description',      title => t8('Description') },
+      { method => 'factor_as_number', title => t8('Factor'), align => 'right' },
+    ],
+  },
+
   pricegroup => {
     # Make locales.pl happy: $self->render("simple_system_setting/_pricegroup_form")
     class  => 'Pricegroup',