$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;
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});
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' ],
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__
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
$::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;
}
# /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|">|;
}
'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 "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',
'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 "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',
'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 "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' => '',
--- /dev/null
+-- @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;
[%- 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>
<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>
[%#- 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 %]">
[% 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 %]">