]> wagnertech.de Git - kivitendo-erp.git/commitdiff
"als bezahlt markieren"-Knopf anzeigen in Mandantenkonfiguration einstellbar.
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 5 Nov 2012 15:46:59 +0000 (16:46 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 5 Nov 2012 15:46:59 +0000 (16:46 +0100)
13 files changed:
SL/Controller/ClientConfig.pm
SL/DB/MetaSetup/Default.pm
SL/InstanceConfiguration.pm
bin/mozilla/ap.pl
bin/mozilla/ar.pl
locale/de/all
locale/de_DE/all
locale/en/all
sql/Pg-upgrade2/defaults_show_mark_as_paid_config.sql [new file with mode: 0644]
templates/webpages/ap/form_footer.html
templates/webpages/client_config/form.html
templates/webpages/ir/form_footer.html
templates/webpages/is/form_footer.html

index 0e424de69c8142e341f5098a0891a4cd3aab0762..6f23b96da5b858b976f4dd71ae8d0b0a2f2b6628 100644 (file)
@@ -29,6 +29,8 @@ sub action_edit {
 
   $self->{payments_changeable} = SL::DB::Default->get->payments_changeable;
 
 
   $self->{payments_changeable} = SL::DB::Default->get->payments_changeable;
 
+  map { $self->{$_} = SL::DB::Default->get->$_ } qw(is_show_mark_as_paid ir_show_mark_as_paid ar_show_mark_as_paid ap_show_mark_as_paid);
+
   map { $self->{$_} = SL::DB::Default->get->$_ } qw(accounting_method inventory_system profit_determination);
 
   $self->{show_bestbefore}     = SL::DB::Default->get->show_bestbefore;
   map { $self->{$_} = SL::DB::Default->get->$_ } qw(accounting_method inventory_system profit_determination);
 
   $self->{show_bestbefore}     = SL::DB::Default->get->show_bestbefore;
@@ -50,6 +52,8 @@ sub action_save {
 
   SL::DB::Default->get->update_attributes('payments_changeable' => $::form->{payments_changeable});
 
 
   SL::DB::Default->get->update_attributes('payments_changeable' => $::form->{payments_changeable});
 
+  map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(is_show_mark_as_paid ir_show_mark_as_paid ar_show_mark_as_paid ap_show_mark_as_paid);
+
   map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(accounting_method inventory_system profit_determination);
 
   SL::DB::Default->get->update_attributes('show_bestbefore'     => $::form->{show_bestbefore});
   map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(accounting_method inventory_system profit_determination);
 
   SL::DB::Default->get->update_attributes('show_bestbefore'     => $::form->{show_bestbefore});
index 2e543fcc46201c44a38eecbbaa686b8af120945e..f66abac98a6647f18730a1c857f8177d22c7d35b 100644 (file)
@@ -59,6 +59,10 @@ __PACKAGE__->meta->setup(
     ar_changeable                   => { type => 'integer', default => 2, not_null => 1 },
     ap_changeable                   => { type => 'integer', default => 2, not_null => 1 },
     gl_changeable                   => { type => 'integer', default => 2, not_null => 1 },
     ar_changeable                   => { type => 'integer', default => 2, not_null => 1 },
     ap_changeable                   => { type => 'integer', default => 2, not_null => 1 },
     gl_changeable                   => { type => 'integer', default => 2, not_null => 1 },
+    is_show_mark_as_paid            => { type => 'boolean', default => 'true' },
+    ir_show_mark_as_paid            => { type => 'boolean', default => 'true' },
+    ar_show_mark_as_paid            => { type => 'boolean', default => 'true' },
+    ap_show_mark_as_paid            => { type => 'boolean', default => 'true' },
   ],
 
   primary_key_columns => [ 'id' ],
   ],
 
   primary_key_columns => [ 'id' ],
index 0f364086f22a9c37f106f0103997c730c81eb060..65b7b7a3d66da83f8fb452c50c871908ea6ad8c6 100644 (file)
@@ -104,6 +104,26 @@ sub get_show_bestbefore {
   return $self->{data}->{show_bestbefore};
 }
 
   return $self->{data}->{show_bestbefore};
 }
 
+sub get_is_show_mark_as_paid {
+  my ($self) = @_;
+  return $self->{data}->{is_show_mark_as_paid};
+}
+
+sub get_ir_show_mark_as_paid {
+  my ($self) = @_;
+  return $self->{data}->{ir_show_mark_as_paid};
+}
+
+sub get_ar_show_mark_as_paid {
+  my ($self) = @_;
+  return $self->{data}->{ar_show_mark_as_paid};
+}
+
+sub get_ap_show_mark_as_paid {
+  my ($self) = @_;
+  return $self->{data}->{ap_show_mark_as_paid};
+}
+
 1;
 
 __END__
 1;
 
 __END__
@@ -194,6 +214,17 @@ Returns true if datev check should be performed on gl transactions
 
 Returns the default behavior for showing best before date, true or false
 
 
 Returns the default behavior for showing best before date, true or false
 
+=item C<get_is_show_mark_as_paid>
+
+=item C<get_ir_show_mark_as_paid>
+
+=item C<get_ar_show_mark_as_paid>
+
+=item C<get_ap_show_mark_as_paid>
+
+Returns the default behavior for showing the mark as paid button for the
+corresponding record type (true or false).
+
 =back
 
 =head1 BUGS
 =back
 
 =head1 BUGS
index f5f518e07945109c4b8fe2dca3c64ebae5373e09..732eaed5ed4092ea8da3abebd33254ff3247d8f3 100644 (file)
@@ -855,10 +855,10 @@ sub form_footer {
 
   $::form->header;
   print $::form->parse_html_template('ap/form_footer', {
 
   $::form->header;
   print $::form->parse_html_template('ap/form_footer', {
-    num_due         => $num_due,
-    num_follow_ups  => $num_follow_ups,
-    show_post_draft => ($transdate > $closedto) && !$::form->{id},
-    show_storno     => $storno,
+    num_due           => $num_due,
+    num_follow_ups    => $num_follow_ups,
+    show_post_draft   => ($transdate > $closedto) && !$::form->{id},
+    show_storno       => $storno,
   });
 
   $::lxdebug->leave_sub;
   });
 
   $::lxdebug->leave_sub;
index 834e1b18e405f0f2d7a46b4cc2cc712207f39ef9..be080ea6ac6692d95b4dbd020436912f87071882 100644 (file)
@@ -533,7 +533,7 @@ $follow_ups_block
   }
   # /button for saving history
   # mark_as_paid button
   }
   # /button for saving history
   # mark_as_paid button
-  if($form->{id} ne "") {
+  if(($form->{id} ne "") && $::instance_conf->get_ar_show_mark_as_paid) {
     print qq|<input type="submit" class="submit" name="action" value="|
           . $locale->text('mark as paid') . qq|">|;
   }
     print qq|<input type="submit" class="submit" name="action" value="|
           . $locale->text('mark as paid') . qq|">|;
   }
index 76497b5daba602d688021d56012f348d9aeca500..8e9a59158808e3ce28ee173655e2193d0eec5071 100644 (file)
@@ -1711,7 +1711,15 @@ $self->{texts} = {
   'Should payments be and when should they be changeable after posting?' => 'Sollen Zahlungen nach dem Buchen änderbar sein, und wenn ja, wann?',
   'Should purchase invoices be and when should they be deleteable after posting?' => 'Sollen Einkaufsrechnungen nach der Buchung zu löschen sein?',
   'Should sales invoices be and when should they be changeable or deleteable after posting?' => 'Sollen Verkaufrechnung nach der Buchung zu ändern oder zu löschen sein?',
   'Should payments be and when should they be changeable after posting?' => 'Sollen Zahlungen nach dem Buchen änderbar sein, und wenn ja, wann?',
   'Should purchase invoices be and when should they be deleteable after posting?' => 'Sollen Einkaufsrechnungen nach der Buchung zu löschen sein?',
   'Should sales invoices be and when should they be changeable or deleteable after posting?' => 'Sollen Verkaufrechnung nach der Buchung zu ändern oder zu löschen sein?',
+  'Should the "mark as paid" button showed in ap transactions?' => 'Soll der Knopf "als bezahlt markieren" bei Kreditorenbuchungen angezeigt werden?',
+  'Should the "mark as paid" button showed in ar transactions?' => 'Soll der Knopf "als bezahlt markieren" bei Debitorenbuchungen angezeigt werden?',
+  'Should the "mark as paid" button showed in purchase invoices?' => 'Soll der Knopf "als bezahlt markieren" bei Einkaufsrechnungen angezeigt werden?',
+  'Should the "mark as paid" button showed on sales invoices?' => 'Soll der Knopf "als bezahlt markieren" bei Verkaufsrechnungen angezeigt werden?',
   'Show'                        => 'Zeigen',
   'Show'                        => 'Zeigen',
+  'Show "mark as paid" in ap transactions' => '"als bezahlt markieren" bei Kreditorenbuchungen anzeigen',
+  'Show "mark as paid" in ar transactions' => '"als bezahlt markieren" bei Debitorenbuchungen anzeigen',
+  'Show "mark as paid" in purchase invoices' => '"als bezahlt markieren" bei Einkaufsrechnungen anzeigen',
+  'Show "mark as paid" in sales invoices' => '"als bezahlt markieren" bei Verkaufsrechnungen anzeigen',
   'Show Bestbefore'             => 'Mindesthaltbarkeit anzeigen',
   'Show Filter'                 => 'Filter zeigen',
   'Show Salesman'               => 'Verkäufer anzeigen',
   'Show Bestbefore'             => 'Mindesthaltbarkeit anzeigen',
   'Show Filter'                 => 'Filter zeigen',
   'Show Salesman'               => 'Verkäufer anzeigen',
index 7509719996283f5b8bfe53b8a429c86134f7260a..f24032bef235e261028b35b21a8b8c97efe03118 100644 (file)
@@ -1666,7 +1666,15 @@ $self->{texts} = {
   'Should payments be and when should they be changeable after posting?' => 'Sollen Zahlungen nach dem Buchen änderbar sein, und wenn ja, wann?',
   'Should purchase invoices be and when should they be deleteable after posting?' => 'Sollen Einkaufsrechnungen nach der Buchung zu löschen sein?',
   'Should sales invoices be and when should they be changeable or deleteable after posting?' => 'Sollen Verkaufrechnung nach der Buchung zu ändern oder zu löschen sein?',
   'Should payments be and when should they be changeable after posting?' => 'Sollen Zahlungen nach dem Buchen änderbar sein, und wenn ja, wann?',
   'Should purchase invoices be and when should they be deleteable after posting?' => 'Sollen Einkaufsrechnungen nach der Buchung zu löschen sein?',
   'Should sales invoices be and when should they be changeable or deleteable after posting?' => 'Sollen Verkaufrechnung nach der Buchung zu ändern oder zu löschen sein?',
+  'Should the "mark as paid" button showed in ap transactions?' => 'Soll der Knopf "als bezahlt markieren" bei Kreditorenbuchungen angezeigt werden?',
+  'Should the "mark as paid" button showed in ar transactions?' => 'Soll der Knopf "als bezahlt markieren" bei Debitorenbuchungen angezeigt werden?',
+  'Should the "mark as paid" button showed in purchase invoices?' => 'Soll der Knopf "als bezahlt markieren" bei Einkaufsrechnungen angezeigt werden?',
+  'Should the "mark as paid" button showed on sales invoices?' => 'Soll der Knopf "als bezahlt markieren" bei Verkaufsrechnungen angezeigt werden?',
   'Show'                        => 'Zeigen',
   'Show'                        => 'Zeigen',
+  'Show "mark as paid" in ap transactions' => '"als bezahlt markieren" bei Kreditorenbuchungen anzeigen',
+  'Show "mark as paid" in ar transactions' => '"als bezahlt markieren" bei Debitorenbuchungen anzeigen',
+  'Show "mark as paid" in purchase invoices' => '"als bezahlt markieren" bei Einkaufsrechnungen anzeigen',
+  'Show "mark as paid" in sales invoices' => '"als bezahlt markieren" bei Verkaufsrechnungen anzeigen',
   'Show Bestbefore'             => 'Mindesthaltbarkeit anzeigen',
   'Show Salesman'               => 'Verkäufer anzeigen',
   'Show TODO list'              => 'Meine Aufgaben',
   'Show Bestbefore'             => 'Mindesthaltbarkeit anzeigen',
   'Show Salesman'               => 'Verkäufer anzeigen',
   'Show TODO list'              => 'Meine Aufgaben',
index faca27b58baef097ad111d081096fc49d3eb64c2..7f1d0cb284987ae25dbb42aeac6e30d2c7bf52d5 100644 (file)
@@ -1688,7 +1688,15 @@ $self->{texts} = {
   'Should payments be and when should they be changeable after posting?' => '',
   'Should purchase invoices be and when should they be deleteable after posting?' => '',
   'Should sales invoices be and when should they be changeable or deleteable after posting?' => '',
   'Should payments be and when should they be changeable after posting?' => '',
   'Should purchase invoices be and when should they be deleteable after posting?' => '',
   'Should sales invoices be and when should they be changeable or deleteable after posting?' => '',
+  'Should the "mark as paid" button showed in ap transactions?' => '',
+  'Should the "mark as paid" button showed in ar transactions?' => '',
+  'Should the "mark as paid" button showed in purchase invoices?' => '',
+  'Should the "mark as paid" button showed on sales invoices?' => '',
   'Show'                        => '',
   'Show'                        => '',
+  'Show "mark as paid" in ap transactions' => '',
+  'Show "mark as paid" in ar transactions' => '',
+  'Show "mark as paid" in purchase invoices' => '',
+  'Show "mark as paid" in sales invoices' => '',
   'Show Bestbefore'             => '',
   'Show Filter'                 => '',
   'Show Salesman'               => '',
   'Show Bestbefore'             => '',
   'Show Filter'                 => '',
   'Show Salesman'               => '',
diff --git a/sql/Pg-upgrade2/defaults_show_mark_as_paid_config.sql b/sql/Pg-upgrade2/defaults_show_mark_as_paid_config.sql
new file mode 100644 (file)
index 0000000..8635763
--- /dev/null
@@ -0,0 +1,9 @@
+-- @tag: defaults_show_mark_as_paid_config
+-- @description: Einstellung, ob der "als bezahlt markieren"-Knopf angezeigt wird.
+-- @depends: release_2_7_0
+-- @charset: utf-8
+
+ALTER TABLE defaults ADD COLUMN is_show_mark_as_paid boolean DEFAULT TRUE;
+ALTER TABLE defaults ADD COLUMN ir_show_mark_as_paid boolean DEFAULT TRUE;
+ALTER TABLE defaults ADD COLUMN ar_show_mark_as_paid boolean DEFAULT TRUE;
+ALTER TABLE defaults ADD COLUMN ap_show_mark_as_paid boolean DEFAULT TRUE;
index 8ac37eca60211c60603615fdb97f6282342d5b79..2408d52456175608fd868c103fc9a89c3588945d 100644 (file)
@@ -42,7 +42,9 @@
 
 [%- IF id %]
   <input type="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
 
 [%- IF id %]
   <input type="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
-  <input type="submit" name="action" value="[% 'mark as paid' | $T8 %]">
+  [% IF INSTANCE_CONF.get_ap_show_mark_as_paid %]
+    <input type="submit" name="action" value="[% 'mark as paid' | $T8 %]">
+  [% END %]
 [%- END %]
 
 </form>
 [%- END %]
 
 </form>
index 2a70a83a75054ef35330d3c42f47de3d0ab1ada3..f772d3e7f3a1b2d09757c42db1bcf2a3220dd439 100644 (file)
  <tr> </tr>
  <tr> </tr>
 
  <tr> </tr>
  <tr> </tr>
 
+ <tr>
+   <td align="right">[% 'Show "mark as paid" in sales invoices' | $T8 %]</td>
+   <td>[% L.yes_no_tag('is_show_mark_as_paid', SELF.is_show_mark_as_paid) %]</td>
+   <td>[% 'Should the "mark as paid" button showed on sales invoices?' | $T8 %]</td>
+ </tr>
+ <tr>
+   <td align="right">[% 'Show "mark as paid" in purchase invoices' | $T8 %]</td>
+   <td>[% L.yes_no_tag('ir_show_mark_as_paid', SELF.ir_show_mark_as_paid) %]</td>
+   <td>[% 'Should the "mark as paid" button showed in purchase invoices?' | $T8 %]</td>
+ </tr>
+ <tr>
+   <td align="right">[% 'Show "mark as paid" in ar transactions' | $T8 %]</td>
+   <td>[% L.yes_no_tag('ar_show_mark_as_paid', SELF.ar_show_mark_as_paid) %]</td>
+   <td>[% 'Should the "mark as paid" button showed in ar transactions?' | $T8 %]</td>
+ </tr>
+ <tr>
+   <td align="right">[% 'Show "mark as paid" in ap transactions' | $T8 %]</td>
+   <td>[% L.yes_no_tag('ap_show_mark_as_paid', SELF.ap_show_mark_as_paid) %]</td>
+   <td>[% 'Should the "mark as paid" button showed in ap transactions?' | $T8 %]</td>
+ </tr>
+
+ <tr> </tr>
+ <tr> </tr>
+
  <tr>
    <td align="right">[% 'Accounting method' | $T8 %]</td>
    <td>[% L.select_tag('accounting_method', SELF.accounting_options, value_key => 'value', title_key => 'title', default => SELF.accounting_method) %]</td>
  <tr>
    <td align="right">[% 'Accounting method' | $T8 %]</td>
    <td>[% L.select_tag('accounting_method', SELF.accounting_options, value_key => 'value', title_key => 'title', default => SELF.accounting_method) %]</td>
index 2f255f78826accce820552dd14d046938f73c80b..b2732a7ce61326b2d8d57fa69348483afb5d667e 100644 (file)
       [%#- button for saving history %]
       <input type="button" class="submit" onclick="set_history_window([% id | html %]);" name="history" id="history" value="[% 'history' | $T8 %]">
 
       [%#- button for saving history %]
       <input type="button" class="submit" onclick="set_history_window([% id | html %]);" name="history" id="history" value="[% 'history' | $T8 %]">
 
-      <input type="submit" class="submit" name="action" value="[% 'mark as paid' | $T8 %]">
+      [% IF INSTANCE_CONF.get_ir_show_mark_as_paid %]
+          <input type="submit" class="submit" name="action" value="[% 'mark as paid' | $T8 %]">
+      [% END %]
   [% END %]
 
 <input type="hidden" name="rowcount" value="[% rowcount %]">
   [% END %]
 
 <input type="hidden" name="rowcount" value="[% rowcount %]">
index 6cbcd4ef1db7c0fbe133914807380387473e9f5b..ee093dc95d5de01c1f8f7c3a66e23f8d32333a60 100644 (file)
   [% IF id %]
       [%#- button for saving history %]
       <input type="button" class="submit" onclick="set_history_window([% id | html %]);" name="history" id="history" value="[% 'history' | $T8 %]">
   [% IF id %]
       [%#- button for saving history %]
       <input type="button" class="submit" onclick="set_history_window([% id | html %]);" name="history" id="history" value="[% 'history' | $T8 %]">
-
-      <input type="submit" class="submit" name="action" value="[% 'mark as paid' | $T8 %]">
+      [% IF INSTANCE_CONF.get_is_show_mark_as_paid %]
+          <input type="submit" class="submit" name="action" value="[% 'mark as paid' | $T8 %]">
+      [% END %]
   [% END %]
 
 <input type="hidden" name="rowcount" value="[% rowcount %]">
   [% END %]
 
 <input type="hidden" name="rowcount" value="[% rowcount %]">