Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 728f5827

Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt

  • ID 728f5827cddfd7e7ca7bd7c36a3d40a9ba311d16
  • Vorgänger 9e3dbc2a
  • Nachfolger 9c3eecdf

BankTransaction: Spaltennamen von CamelCase in snake_case umbenannt

kivitendo nutzt rein lower-case-Spaltennamen mit Unterstrichen als
Worttrenner, kein CamelCase. Betrifft Spalten transactioncode und
transactiontext in bank_transfers.

Unterschiede anzeigen:

SL/Controller/BankTransaction.pm
160 160
    if ( $self->is_collective_transaction($bt) ) {
161 161
      foreach ( keys  %sepa_exports) {
162 162
        #$main::lxdebug->message(LXDebug->DEBUG2(),"Exp ID=".$_." compare sum amount ".($sepa_exports{$_}->{amount} *1) ." == ".($bt->amount * 1));
163
        if ( $bt->transactioncode eq '191' && abs(($sepa_exports{$_}->{amount} * 1) - ($bt->amount * 1)) < 0.01 ) {
163
        if ( $bt->transaction_code eq '191' && abs(($sepa_exports{$_}->{amount} * 1) - ($bt->amount * 1)) < 0.01 ) {
164 164
          ## jupp
165 165
          $bt->{proposals} = $sepa_exports{$_}->{invoices} ;
166 166
          $bt->{agreement}    = 20;
......
540 540

  
541 541
sub is_collective_transaction {
542 542
  my ($self, $bt) = @_;
543
  return $bt->transactioncode eq "191";
543
  return $bt->transaction_code eq "191";
544 544
}
545 545

  
546 546
sub save_single_bank_transaction {
SL/DB/Helper/Payment.pm
640 640
  if ( $open_amount &&                   # invoice amount not 0
641 641
       $self->skonto_date &&             # check whether skonto applies
642 642
       ( abs(abs($self->amount_less_skonto) - abs($bt->amount)) < 0.01 ||
643
        ( $bt->transactioncode eq "191" && abs($self->amount_less_skonto) < abs($bt->amount) )) &&
643
        ( $bt->transaction_code eq "191" && abs($self->amount_less_skonto) < abs($bt->amount) )) &&
644 644
       $self->check_skonto_configuration) {
645 645
         if ( $self->within_skonto_period($bt->transdate) ) {
646 646
           push(@options, { payment_type => 'without_skonto', display => t8('without skonto') });
SL/DB/MetaSetup/BankTransaction.pm
20 20
  remote_account_number => { type => 'text' },
21 21
  remote_bank_code      => { type => 'text' },
22 22
  remote_name           => { type => 'text' },
23
  transaction_code      => { type => 'text' },
23 24
  transaction_id        => { type => 'integer' },
24
  transactioncode       => { type => 'text' },
25
  transactiontext       => { type => 'text' },
25
  transaction_text      => { type => 'text' },
26 26
  transdate             => { type => 'date', not_null => 1 },
27 27
  valutadate            => { type => 'date', not_null => 1 },
28 28
);
sql/Pg-upgrade2/bank_transactions_type.sql
2 2
-- @description: Erweitern der Tabelle bank_transactions mit Typ der Transaktion.
3 3
-- @depends: bank_transactions
4 4

  
5
ALTER TABLE bank_transactions ADD COLUMN transactionCode TEXT;
6
ALTER TABLE bank_transactions ADD COLUMN transactionText TEXT;
5
ALTER TABLE bank_transactions ADD COLUMN transactioncode TEXT;
6
ALTER TABLE bank_transactions ADD COLUMN transactiontext TEXT;
sql/Pg-upgrade2/bank_transactions_type2.sql
1
-- @tag: bank_transactions_type2
2
-- @description: Spalten für Transaktions-Code und -Typen etwas besser benennen
3
-- @depends: bank_transactions_type
4

  
5
ALTER TABLE bank_transactions RENAME transactioncode TO transaction_code;
6
ALTER TABLE bank_transactions RENAME transactiontext TO transaction_text;
templates/webpages/bank_transactions/tabs/all.html
102 102
     <td align=right>[% LxERP.format_amount(bt.invoice_amount, 2) %]</td>
103 103
     <td>[% HTML.escape(bt.remote_name) %]</td>
104 104
     <td>[% HTML.escape(bt.purpose) %]</td>
105
     <td>[% HTML.escape(bt.transactiontext) %]</td>
105
     <td>[% HTML.escape(bt.transaction_text) %]</td>
106 106
     <td>[% HTML.escape(bt.remote_account_number) %]</td>
107 107
     <td>[% HTML.escape(bt.remote_bank_code) %]</td>
108 108
     <td align=right>[% bt.valutadate_as_date %]</td>
templates/webpages/bank_transactions/tabs/automatic.html
33 33
            [% L.checkbox_tag('proposal_ids[]', checked=0, value=proposal.id) %]
34 34
          </td>
35 35

  
36
          <td>[% HTML.escape(proposal.transactiontext) %]</td>
36
          <td>[% HTML.escape(proposal.transaction_text) %]</td>
37 37
          <td>[% proposal.id %]</td>
38 38
          <td>[% proposal.transdate_as_date %]</td>
39 39
          <td align="right">[% LxERP.format_amount(proposal.amount,2) %]</td>

Auch abrufbar als: Unified diff