Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 680c7f12

Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt

  • ID 680c7f127081e472405768fa4f8715b27c7b15c2
  • Vorgänger cdd9fe3f
  • Nachfolger 822fc676

Gültigkeitstoken: Debitorenbuchung

Unterschiede anzeigen:

bin/mozilla/ar.pl
use SL::DB::InvoiceItem;
use SL::DB::RecordTemplate;
use SL::DB::Tax;
use SL::DB::ValidityToken;
use SL::Helper::Flash qw(flash flash_later);
use SL::Locale::String qw(t8);
use SL::Presenter::Tag;
......
flash('info', $::locale->text("The record template '#1' has been loaded.", $template->template_name));
$::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_SALES_INVOICE_POST())->token;
update(
keep_rows_without_amount => 1,
dont_add_new_row => 1,
......
$form->{"AR_amount_chart_id_1"} = $last_used_ar_chart->id if $last_used_ar_chart;
}
if (!$form->{form_validity_token}) {
$form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_SALES_INVOICE_POST())->token;
}
&display_form;
$main::lxdebug->leave_sub();
}
......
sub show_draft {
$::form->{transdate} = DateTime->today_local->to_kivitendo if !$::form->{transdate};
$::form->{gldate} = $::form->{transdate} if !$::form->{gldate};
$::form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_SALES_INVOICE_POST())->token;
update();
}
......
$form->mtime_ischanged('ar');
my $validity_token;
if (!$form->{id}) {
$validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token(
scope => SL::DB::ValidityToken::SCOPE_SALES_INVOICE_POST(),
token => $form->{form_validity_token},
);
$form->error($::locale->text('The form is not valid anymore.')) if !$validity_token;
}
my ($datepaid);
# check if there is an invoice number, invoice and due date
......
$form->{id} = 0 if $form->{postasnew};
$form->error($locale->text('Cannot post transaction!')) unless AR->post_transaction(\%myconfig, \%$form);
$validity_token->delete if $validity_token;
delete $form->{form_validity_token};
# saving the history
if(!exists $form->{addition} && $form->{id} ne "") {
$form->{snumbers} = "invnumber_$form->{invnumber}";
......
$form->{duedate} = $payment_terms->calc_date(reference_date => $today)->to_kivitendo if $payment_terms;
}
$form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_SALES_INVOICE_POST())->token;
&update;
$main::lxdebug->leave_sub();
templates/design40_webpages/ar/form_header.html
[% L.hidden_tag('follow_up_rowcount', 1) %]
<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
[% IF !id %]
[% L.hidden_tag('form_validity_token', form_validity_token) %]
[% END %]
[% IF saved_message %]<p class="message message_info">[% saved_message | html %]</p>[% END %]
<div class="tabwidget">
templates/webpages/ar/form_header.html
[% L.hidden_tag('follow_up_rowcount', 1) %]
<input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
[% IF !id %]
[% L.hidden_tag('form_validity_token', form_validity_token) %]
[% END %]
[%- IF saved_message %]<p>[% saved_message | html %]</p>[% END %]
<div class="tabwidget">

Auch abrufbar als: Unified diff