X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=30d0a072f5b7aa54ac10689162b523434af59421;hb=db68b6fd72b9f0d7d8be953746c0e7d6154f5eaf;hp=2891634f005c312023173d28fedeb389a2fb82a4;hpb=4e27e828de91b6f1252f3353f06edea72f13a0c1;p=kivitendo-erp.git
diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl
index 2891634f0..30d0a072f 100644
--- a/bin/mozilla/is.pl
+++ b/bin/mozilla/is.pl
@@ -37,6 +37,7 @@ use Data::Dumper;
require "$form->{path}/io.pl";
require "$form->{path}/arap.pl";
+require "bin/mozilla/drafts.pl";
1;
@@ -44,7 +45,9 @@ require "$form->{path}/arap.pl";
sub add {
$lxdebug->enter_sub();
-
+
+ return $lxdebug->leave_sub() if (load_draft_maybe());
+
if ($form->{type} eq "credit_note") {
$form->{title} = $locale->text('Add Credit Note');
@@ -621,7 +624,7 @@ sub form_header {
{storno}>
{storno_id}>
-
+| . ($form->{saved_message} ? qq|
$form->{saved_message}
| : "") . qq|
@@ -853,8 +856,7 @@ sub form_footer {
$tax .= qq|
- $form->{"${item}_description"} |
- . $form->{"${item}_rate"} * 100 .qq|% |
+ $form->{"${item}_description"} |
$form->{"${item}_total"} |
|;
@@ -893,8 +895,7 @@ sub form_footer {
$tax .= qq|
- Enthaltene $form->{"${item}_description"} |
- . $form->{"${item}_rate"} * 100 .qq|% |
+ Enthaltene $form->{"${item}_description"} |
$form->{"${item}_total"} |
@@ -1107,9 +1108,9 @@ if ($form->{type} eq "credit_note") {
|;
+ . $locale->text('E-mail') . qq|"> |;
print qq|| unless ($form->{storno});
+ . $locale->text('Storno') . qq|"> | unless ($form->{storno});
print qq|
|;
@@ -1150,7 +1151,9 @@ if ($form->{type} eq "credit_note") {
|;
+ . $locale->text('Post') . qq|"> | .
+ NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'),
+ '-class' => 'submit'));
}
}
@@ -1172,7 +1175,10 @@ if ($form->{type} eq "credit_note") {
{rowcount}>
-
+|
+. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
+. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
+. qq|
{path}>
{login}>
{password}>
@@ -1445,6 +1451,7 @@ sub post {
if (!(IS->post_invoice(\%myconfig, \%$form))) {
$form->error($locale->text('Cannot post invoice!'));
}
+ remove_draft() if $form->{remove_draft};
# saving the history
if(!exists $form->{addition}) {
$form->{addition} = "PRINTED AND POSTED";
@@ -1453,9 +1460,10 @@ sub post {
# /saving the history
} else {
- if (IS->post_invoice(\%myconfig, \%$form)){
+ if (IS->post_invoice(\%myconfig, \%$form)){
+ remove_draft() if $form->{remove_draft};
# saving the history
- if(!exists $form->{addition}) {
+ if(!exists $form->{addition}) {
if($form->{storno}) {
$form->{addition} = "STORNO";
}