Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 049677eb

Von Jan Büren vor fast 8 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
use SL::Webdav;
use SL::Locale::String qw(t8);
use SL::Helper::GlAttachments qw(count_gl_attachments);
use Carp;
require "bin/mozilla/common.pl";
require "bin/mozilla/reportgenerator.pl";
......
die "invalid template type" unless $template->template_type eq 'gl_transaction';
$template->substitute_variables;
my $payment_suggestion = $::form->{form_defaults}->{amount_1};
# croak ("hier" . $payment_suggestion);
# Clean the current $::form before rebuilding it from the template.
my $form_defaults = delete $::form->{form_defaults};
delete @{ $::form }{ grep { !m{^(?:script|login)$}i } keys %{ $::form } };
......
$::form->{"accno_id_${row}"} = $item->chart_id;
$::form->{"previous_accno_id_${row}"} = $item->chart_id;
$::form->{"debit_${row}"} = $::form->format_amount(\%::myconfig, $item->amount1, 2) if $item->amount1 * 1;
$::form->{"credit_${row}"} = $::form->format_amount(\%::myconfig, $item->amount2, 2) if $item->amount2 * 1;
$::form->{"debit_${row}"} = $::form->format_amount(\%::myconfig, ($payment_suggestion ? $payment_suggestion : $item->amount1), 2) if $item->amount1 * 1;
$::form->{"credit_${row}"} = $::form->format_amount(\%::myconfig, ($payment_suggestion ? $payment_suggestion : $item->amount2), 2) if $item->amount2 * 1;
$::form->{"taxchart_${row}"} = $item->tax_id . '--' . $tax->rate;
$::form->{"${_}_${row}"} = $item->$_ for qw(source memo project_id);
}
......
$form->error($err[$errno]);
}
undef($form->{callback});
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = qq|gltransaction_| . $form->{id};
......
}
# /saving the history
if ($form->{callback} =~ /BankTransaction/) {
print $form->redirect_header($form->{callback});
$form->redirect($locale->text('GL transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id});
}
# remove or clarify
undef($form->{callback});
$main::lxdebug->leave_sub();
}

Auch abrufbar als: Unified diff