Revision ab3fab97
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
983 | 983 |
'form_defaults.paid_1_suggestion' => $::form->format_amount(\%::myconfig, -1 * $self->transaction->amount, 2), |
984 | 984 |
'form_defaults.AP_paid_1_suggestion' => $self->transaction->local_bank_account->chart->accno, |
985 | 985 |
'form_defaults.callback' => $self->callback, |
986 |
'form_defaults.notes' => $self->convert_purpose_for_template($template, $self->transaction->purpose), |
|
986 | 987 |
); |
987 | 988 |
} |
988 | 989 |
|
... | ... | |
998 | 999 |
'form_defaults.callback' => $self->callback, |
999 | 1000 |
'form_defaults.bt_id' => $self->transaction->id, |
1000 | 1001 |
'form_defaults.bt_chart_id' => $self->transaction->local_bank_account->chart->id, |
1001 |
'form_defaults.description' => $self->transaction->purpose,
|
|
1002 |
'form_defaults.description' => $self->convert_purpose_for_template($template, $self->transaction->purpose),
|
|
1002 | 1003 |
); |
1003 | 1004 |
} |
1004 | 1005 |
|
1006 |
sub convert_purpose_for_template { |
|
1007 |
my ($self, $template, $purpose) = @_; |
|
1008 |
|
|
1009 |
# enter custom code here |
|
1010 |
|
|
1011 |
return $purpose; |
|
1012 |
} |
|
1013 |
|
|
1005 | 1014 |
sub setup_search_action_bar { |
1006 | 1015 |
my ($self, %params) = @_; |
1007 | 1016 |
|
... | ... | |
1119 | 1128 |
|
1120 | 1129 |
TODO: we still rely on linked_records for the check boxes |
1121 | 1130 |
|
1131 |
=item C<convert_purpose_for_template> |
|
1132 |
|
|
1133 |
This method can be used to parse, filter and convert the bank transaction's |
|
1134 |
purpose string before it will be assigned to the description field of a |
|
1135 |
gl transaction or to the notes field of an ap transaction. |
|
1136 |
You have to write your own custom code. |
|
1137 |
|
|
1122 | 1138 |
=back |
1123 | 1139 |
|
1124 | 1140 |
=head1 AUTHOR |
Auch abrufbar als: Unified diff
BankTransaction: Vorlagen: Verwendungszweck als Bemerkung in Kreditorenbuchung
Mit der Möglichkeit, projektbezogenen Code für eine Konvertierung der
Verwendungszwecks einzubauen.