Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9e3dbc2a

Von Martin Helmling vor mehr als 7 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',

Auch abrufbar als: Unified diff