Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9e3dbc2a

Von Martin Helmling vor etwa 8 Jahren hinzugefügt

  • ID 9e3dbc2a089a0206df834496c158ced368a459d8
  • Vorgänger cfb460aa
  • Nachfolger 728f5827

MT940-Import: Darstellungskorrekturen und fehlender Push eines Vorschlags

Unterschiede anzeigen:

SL/Controller/BankTransaction.pm
124 124
    foreach ( @{$all_open_sepa_export_items}) {
125 125
      if ( $_->ap_id == $open_invoice->id ||  $_->ar_id == $open_invoice->id ) {
126 126
        my $factor = ( $_->ar_id == $open_invoice->id>0?1:-1);
127
        $open_invoice->{realamount}  = $::form->format_amount(\%::myconfig,$open_invoice->amount*$factor,2);
128
        $main::lxdebug->message(LXDebug->DEBUG2(),"exitem=".$_->id." for invoice ".$open_invoice->id." factor=".$factor);
127
        #$main::lxdebug->message(LXDebug->DEBUG2(),"exitem=".$_->id." for invoice ".$open_invoice->id." factor=".$factor);
129 128
        $open_invoice->{sepa_export_item} = $_ ;
130 129
        $open_invoice->{skonto_type} = $_->payment_type;
131 130
        $sepa_exports{$_->sepa_export_id} ||= { count => 0, is_ar => 0, amount => 0, proposed => 0, invoices => [], item => $_ };
......
161 160
    if ( $self->is_collective_transaction($bt) ) {
162 161
      foreach ( keys  %sepa_exports) {
163 162
        #$main::lxdebug->message(LXDebug->DEBUG2(),"Exp ID=".$_." compare sum amount ".($sepa_exports{$_}->{amount} *1) ." == ".($bt->amount * 1));
164
        if ( $bt->transactioncode eq '191' && ($sepa_exports{$_}->{amount} * 1) eq ($bt->amount * 1) ) {
163
        if ( $bt->transactioncode eq '191' && abs(($sepa_exports{$_}->{amount} * 1) - ($bt->amount * 1)) < 0.01 ) {
165 164
          ## jupp
166 165
          $bt->{proposals} = $sepa_exports{$_}->{invoices} ;
167 166
          $bt->{agreement}    = 20;
......
184 183
          $_->amount($_->amount*1);
185 184
          #$main::lxdebug->message(LXDebug->DEBUG2(),"remote account '".$bt->{remote_account_number}."' bt_amount=". ($bt->amount * $factor));
186 185
          #$main::lxdebug->message(LXDebug->DEBUG2(),"compare with   '".$_->vc_iban."'    amount=".$_->amount);
187
          if ( $bt->{remote_account_number} eq $_->vc_iban && $_->amount eq ($bt->amount * $factor)) {
186
          if ( $bt->{remote_account_number} eq $_->vc_iban && abs(( $_->amount *1 ) - ($bt->amount * $factor)) < 0.01 ) {
188 187
            push ($bt->{proposals},$open_invoice );
189 188
            $bt->{agreement}    = 20;
190 189
            $bt->{rule_matches} = 'sepa_export_item(20)';
191 190
            #$main::lxdebug->message(LXDebug->DEBUG2(),"found invoice");
191
            push(@proposals, $bt);
192 192
            @all_sepa_invoices = grep { $_ != $open_invoice } @all_sepa_invoices;
193 193
            last;
194 194
          }
......
672 672
          };
673 673
        }
674 674
      }
675

  
676 675
      # Record a record link from the bank transaction to the invoice
677 676
      my @props = (
678 677
        from_table => 'bank_transactions',
templates/webpages/bank_transactions/tabs/all.html
98 98
      [% END %]
99 99
     </td>
100 100
     <td align=right>[% bt.transdate_as_date %]</td>
101
     <td align=right>[% bt.amount_as_number %]</td>
102
     <td align=right>[% bt.invoice_amount_as_number %]</td>
101
     <td align=right>[% LxERP.format_amount(bt.amount, 2) %]</td>
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 105
     <td>[% HTML.escape(bt.transactiontext) %]</td>
templates/webpages/bank_transactions/tabs/automatic.html
36 36
          <td>[% HTML.escape(proposal.transactiontext) %]</td>
37 37
          <td>[% proposal.id %]</td>
38 38
          <td>[% proposal.transdate_as_date %]</td>
39
          <td align="right">[% proposal.amount_as_number %]</td>
39
          <td align="right">[% LxERP.format_amount(proposal.amount,2) %]</td>
40 40
          <td></td>
41 41
          <td>[% HTML.escape(proposal.purpose) %]</td>
42 42
          <td>[% HTML.escape(proposal.remote_name) %]</td>

Auch abrufbar als: Unified diff