use SL::IO;
use SL::MoreCommon;
use SL::DB::Default;
+use SL::DB::Draft;
use SL::Util qw(trim);
use SL::DB;
use Data::Dumper;
IO->set_datepaid(table => 'ap', id => $form->{id}, dbh => $dbh);
+ if ($form->{draft_id}) {
+ SL::DB::Manager::Draft->delete_all(where => [ id => delete($form->{draft_id}) ]);
+ }
+
# safety check datev export
if ($::instance_conf->get_datev_check_on_ap_transaction) {
my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
use Data::Dumper;
use SL::DATEV qw(:CONSTANTS);
use SL::DBUtils;
+use SL::DB::Draft;
use SL::IO;
use SL::MoreCommon;
use SL::DB::Default;
IO->set_datepaid(table => 'ar', id => $form->{id}, dbh => $dbh);
+ if ($form->{draft_id}) {
+ SL::DB::Manager::Draft->delete_all(where => [ id => delete($form->{draft_id}) ]);
+ }
+
# safety check datev export
if ($::instance_conf->get_datev_check_on_ar_transaction) {
my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
$self->js
->flash('info', t8("Draft saved."))
->dialog->close('#save_draft')
+ ->val('#draft_id', $draft->id)
->render;
}
}
use SL::DATEV qw(:CONSTANTS);
use SL::DBUtils;
use SL::DB::Chart;
+use SL::DB::Draft;
use SL::Util qw(trim);
use SL::DB;
do_query($form, $dbh, qq|UPDATE gl SET storno = 't' WHERE id = ?|, conv_i($form->{storno_id}));
}
+ if ($form->{draft_id}) {
+ SL::DB::Manager::Draft->delete_all(where => [ id => delete($form->{draft_id}) ]);
+ }
+
# safety check datev export
if ($::instance_conf->get_datev_check_on_gl_transaction) {
my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
use SL::CVar;
use SL::DATEV qw(:CONSTANTS);
use SL::DBUtils;
+use SL::DB::Draft;
use SL::DO;
use SL::GenericTranslations;
use SL::HTML::Restrict;
do_query($form, $dbh, $query, @orphaned_ids);
}
+ if ($form->{draft_id}) {
+ SL::DB::Manager::Draft->delete_all(where => [ id => delete($form->{draft_id}) ]);
+ }
+
# safety check datev export
if ($::instance_conf->get_datev_check_on_purchase_invoice) {
# if we need department for kostenstelle in DATEV check
use SL::IO;
use SL::TransNumber;
use SL::DB::Default;
+use SL::DB::Draft;
use SL::DB::Tax;
use SL::DB::TaxZone;
use SL::TransNumber;
do_query($form, $dbh, $query, @orphaned_ids);
}
+ if ($form->{draft_id}) {
+ SL::DB::Manager::Draft->delete_all(where => [ id => delete($form->{draft_id}) ]);
+ }
+
# safety check datev export
if ($::instance_conf->get_datev_check_on_sales_invoice) {
my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef;
[%- USE T8 %]
[%- USE HTML %]
[%- USE L %]
-[%- USE LxERP %]
+[%- USE LxERP %][%- USE P -%]
[%- IF (num_follow_ups && num_due) %]
<p>[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', num_follow_ups, num_due) %]</p>
<input name=callback type=hidden value="[% callback | html %]">
<input name=gldate type=hidden value="[% gldate | html %]">
-<input type=hidden name=draft_id value="[% draft_id %]">
-<input type=hidden name=draft_description value="[% draft_description | html %]">
+[% P.hidden_tag('draft_id', draft_id) %]
+[% P.hidden_tag('draft_description', draft_description) %]
<br>
[% USE LxERP %]
[% USE T8 %]
-[% USE L %]
+[% USE L %][%- USE P -%]
[% IF ( follow_up_length && follow_up_due_length ) %]
[% LxERP.t8('There are #1 unfinished follow-ups of which #2 are due.', follow_up_length , follow_up_due_length) %]
<input type="hidden" name="gldate" value="[% gldate | html %]">
<input type="hidden" name="callback" value="[% callback | html %]">
- <input type="hidden" name="draft_id" value="[% draft_id | html %]">
- <input type="hidden" name="draft_description" value="[% draft_description | html %]">
+ [% P.hidden_tag('draft_id', draft_id) %]
+ [% P.hidden_tag('draft_description', draft_description) %]
<br>
[%- USE T8 %]
[%- USE HTML %]
[%- USE LxERP %]
-[%- USE L %]
+[%- USE L %][%- USE P -%]
<tr>
<td>
<table width="100%">
<input type="hidden" name="rowcount" value="[% rowcount %]">
<input type="hidden" name="callback" value="[% callback %]">
-<input type="hidden" name="draft_id" value="[% draft_id %]">
-<input type="hidden" name="draft_description" value="[% draft_description %]">
+[% P.hidden_tag('draft_id', draft_id) %]
+[% P.hidden_tag('draft_description', draft_description) %]
<input type="hidden" name="vendor_discount" value="[% vendor_discount %]">
</form>
<input type="hidden" name="rowcount" value="[% rowcount %]">
<input type="hidden" name="callback" value="[% callback | html %]">
-<input type="hidden" name="draft_id" value="[% draft_id %]">
-<input type="hidden" name="draft_description" value="[% draft_description %]">
+[% P.hidden_tag('draft_id', draft_id) %]
+[% P.hidden_tag('draft_description', draft_description) %]
<input type="hidden" name="customer_discount" value="[% customer_discount %]">
<input type="hidden" name="gldate" value="[% gldate %]">
</form>