Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2e2873a4

Von Werner Hahn vor etwa 1 Jahr hinzugefügt

FIX: 'Buchen auf' in EK/VK Rechnungen richtig vorbelegen

Behebt #363

Unterschiede anzeigen:

bin/mozilla/ir.pl
38 38
use SL::IR;
39 39
use SL::IS;
40 40
use SL::DB::BankTransactionAccTrans;
41
use SL::DB::Chart;
41 42
use SL::DB::Default;
42 43
use SL::DB::Department;
43 44
use SL::DB::Project;
......
206 207

  
207 208
  $form->{paidaccounts} = 1 unless (exists $form->{paidaccounts});
208 209

  
210
  foreach my $ref (@{ $form->{AP_links}{AP} } ) {
211
    if ( $ref->{chart_id} == $::instance_conf->get_ap_chart_id ) {
212
      $form->{AP_1} = "$ref->{accno}--$ref->{description}";
213
    }
214
  }
209 215
  $form->{AP} = $form->{AP_1} unless $form->{id};
216
  my ($chart_accno)      = split /--/, $form->{AP};
217
  $form->{AP_chart_id} = $form->{id} ? SL::DB::Manager::Chart->find_by( accno => $chart_accno)->id : $::instance_conf->get_ap_chart_id ;
210 218

  
211 219
  $form->{locked} =
212 220
    ($form->datetonum($form->{invdate}, \%myconfig) <=
......
916 924
    }
917 925
  }
918 926

  
919
  ($form->{AP})      = split /--/, $form->{AP};
927
  $form->{AP}      = SL::DB::Manager::Chart->find_by( id => $form->{AP_chart_id} )->accno;
920 928
  ($form->{AP_paid}) = split /--/, $form->{AP_paid};
921 929
  if (IR->post_payment(\%myconfig, \%$form)){
922 930
    if (!exists $form->{addition} && $form->{id} ne "") {
......
1022 1030
    }
1023 1031
  }
1024 1032

  
1025
  ($form->{AP})      = split /--/, $form->{AP};
1033
  $form->{AP}      = SL::DB::Manager::Chart->find_by( id => $form->{AP_chart_id} )->accno;
1026 1034
  ($form->{AP_paid}) = split /--/, $form->{AP_paid};
1027 1035
  $form->{storno}  ||= 0;
1028 1036

  

Auch abrufbar als: Unified diff