Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 049677eb

Von Jan Büren vor fast 7 Jahren hinzugefügt

  • ID 049677eb435b63595b0ffb748f26618fc7f6f479
  • Vorgänger dafa4bed
  • Nachfolger 26952628

Kontoauszug verbuchen -> Buchung erstellen erweitert

a) Filter erweitert, um nach Vorlagenname zu suchen
b) Filter korrekt in <form> gepackt, um submit und reset form
wie gewohnt zu unterstützen
c) Buchungsmöglichkeit um gl_transactions (Dialogbuchungsvorlagen)
erweitert, dass heißt in der Auswahlliste der Vorlagen werden
jetzt Dialogbuchungsvorlagen angezeigt, falls ein Buchungskonto
mit dem aktuellem Bankkonto übereinstimmt:
(bank_accounts.chart_id == record_template_items.chart_id)
d) Filter erweitert, um nach Referenz (nur in gl_transactions)
zu suchen
e) gl.pl erweitert, sodass die Metadaten der Vorlage geladen werden
und mit den sinnvollen Vorgaben aus bank_transactions gefüllt werden

Unterschiede anzeigen:

bin/mozilla/gl.pl
49 49
use SL::Webdav;
50 50
use SL::Locale::String qw(t8);
51 51
use SL::Helper::GlAttachments qw(count_gl_attachments);
52

  
52
use Carp;
53 53
require "bin/mozilla/common.pl";
54 54
require "bin/mozilla/reportgenerator.pl";
55 55

  
......
94 94
  die "invalid template type" unless $template->template_type eq 'gl_transaction';
95 95

  
96 96
  $template->substitute_variables;
97

  
97
  my $payment_suggestion =  $::form->{form_defaults}->{amount_1};
98
  # croak ("hier" . $payment_suggestion);
98 99
  # Clean the current $::form before rebuilding it from the template.
99 100
  my $form_defaults = delete $::form->{form_defaults};
100 101
  delete @{ $::form }{ grep { !m{^(?:script|login)$}i } keys %{ $::form } };
......
133 134

  
134 135
    $::form->{"accno_id_${row}"}          = $item->chart_id;
135 136
    $::form->{"previous_accno_id_${row}"} = $item->chart_id;
136
    $::form->{"debit_${row}"}             = $::form->format_amount(\%::myconfig, $item->amount1, 2) if $item->amount1 * 1;
137
    $::form->{"credit_${row}"}            = $::form->format_amount(\%::myconfig, $item->amount2, 2) if $item->amount2 * 1;
137
    $::form->{"debit_${row}"}             = $::form->format_amount(\%::myconfig, ($payment_suggestion ? $payment_suggestion : $item->amount1), 2) if $item->amount1 * 1;
138
    $::form->{"credit_${row}"}            = $::form->format_amount(\%::myconfig, ($payment_suggestion ? $payment_suggestion : $item->amount2), 2) if $item->amount2 * 1;
138 139
    $::form->{"taxchart_${row}"}          = $item->tax_id . '--' . $tax->rate;
139 140
    $::form->{"${_}_${row}"}              = $item->$_ for qw(source memo project_id);
140 141
  }
......
1317 1318

  
1318 1319
    $form->error($err[$errno]);
1319 1320
  }
1320
  undef($form->{callback});
1321 1321
  # saving the history
1322 1322
  if(!exists $form->{addition} && $form->{id} ne "") {
1323 1323
    $form->{snumbers} = qq|gltransaction_| . $form->{id};
......
1327 1327
  }
1328 1328
  # /saving the history
1329 1329

  
1330
  if ($form->{callback} =~ /BankTransaction/) {
1331
    print $form->redirect_header($form->{callback});
1332
    $form->redirect($locale->text('GL transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id});
1333
  }
1334
  # remove or clarify
1335
  undef($form->{callback});
1330 1336
  $main::lxdebug->leave_sub();
1331 1337
}
1332 1338

  

Auch abrufbar als: Unified diff