if ( $self->is_collective_transaction($bt) ) {
foreach ( keys %sepa_exports) {
#$main::lxdebug->message(LXDebug->DEBUG2(),"Exp ID=".$_." compare sum amount ".($sepa_exports{$_}->{amount} *1) ." == ".($bt->amount * 1));
- if ( $bt->transactioncode eq '191' && abs(($sepa_exports{$_}->{amount} * 1) - ($bt->amount * 1)) < 0.01 ) {
+ if ( $bt->transaction_code eq '191' && abs(($sepa_exports{$_}->{amount} * 1) - ($bt->amount * 1)) < 0.01 ) {
## jupp
$bt->{proposals} = $sepa_exports{$_}->{invoices} ;
$bt->{agreement} = 20;
sub is_collective_transaction {
my ($self, $bt) = @_;
- return $bt->transactioncode eq "191";
+ return $bt->transaction_code eq "191";
}
sub save_single_bank_transaction {
if ( $open_amount && # invoice amount not 0
$self->skonto_date && # check whether skonto applies
( abs(abs($self->amount_less_skonto) - abs($bt->amount)) < 0.01 ||
- ( $bt->transactioncode eq "191" && abs($self->amount_less_skonto) < abs($bt->amount) )) &&
+ ( $bt->transaction_code eq "191" && abs($self->amount_less_skonto) < abs($bt->amount) )) &&
$self->check_skonto_configuration) {
if ( $self->within_skonto_period($bt->transdate) ) {
push(@options, { payment_type => 'without_skonto', display => t8('without skonto') });
remote_account_number => { type => 'text' },
remote_bank_code => { type => 'text' },
remote_name => { type => 'text' },
+ transaction_code => { type => 'text' },
transaction_id => { type => 'integer' },
- transactioncode => { type => 'text' },
- transactiontext => { type => 'text' },
+ transaction_text => { type => 'text' },
transdate => { type => 'date', not_null => 1 },
valutadate => { type => 'date', not_null => 1 },
);
-- @description: Erweitern der Tabelle bank_transactions mit Typ der Transaktion.
-- @depends: bank_transactions
-ALTER TABLE bank_transactions ADD COLUMN transactionCode TEXT;
-ALTER TABLE bank_transactions ADD COLUMN transactionText TEXT;
+ALTER TABLE bank_transactions ADD COLUMN transactioncode TEXT;
+ALTER TABLE bank_transactions ADD COLUMN transactiontext TEXT;
--- /dev/null
+-- @tag: bank_transactions_type2
+-- @description: Spalten für Transaktions-Code und -Typen etwas besser benennen
+-- @depends: bank_transactions_type
+
+ALTER TABLE bank_transactions RENAME transactioncode TO transaction_code;
+ALTER TABLE bank_transactions RENAME transactiontext TO transaction_text;
<td align=right>[% LxERP.format_amount(bt.invoice_amount, 2) %]</td>
<td>[% HTML.escape(bt.remote_name) %]</td>
<td>[% HTML.escape(bt.purpose) %]</td>
- <td>[% HTML.escape(bt.transactiontext) %]</td>
+ <td>[% HTML.escape(bt.transaction_text) %]</td>
<td>[% HTML.escape(bt.remote_account_number) %]</td>
<td>[% HTML.escape(bt.remote_bank_code) %]</td>
<td align=right>[% bt.valutadate_as_date %]</td>
[% L.checkbox_tag('proposal_ids[]', checked=0, value=proposal.id) %]
</td>
- <td>[% HTML.escape(proposal.transactiontext) %]</td>
+ <td>[% HTML.escape(proposal.transaction_text) %]</td>
<td>[% proposal.id %]</td>
<td>[% proposal.transdate_as_date %]</td>
<td align="right">[% LxERP.format_amount(proposal.amount,2) %]</td>