X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d7f060429e809653d45e93e86b3c5c8d7129e0a9..fb4d2ffa6aae03b36e4db77be10c3d9dce4413f8:/bin/mozilla/is.pl diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index e2b99cb74..992235701 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -83,7 +83,7 @@ sub edit { # show history button $form->{javascript} = qq||; #/show hhistory button - + if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR") { $form->error("Access Denied"); @@ -288,13 +288,13 @@ sub form_header { if ($form->{type} eq "credit_note") { $form->{title} = $locale->text('Edit Credit Note'); - + if ($form->{storno}) { $form->{title} = $locale->text('Edit Storno Credit Note'); } } else { $form->{title} = $locale->text('Edit Sales Invoice'); - + if ($form->{storno}) { $form->{title} = $locale->text('Edit Storno Invoice'); } @@ -379,14 +379,15 @@ sub form_header { my $customers = qq| | . $locale->text('Customer') . qq| - | . - (($myconfig{vclimit} <= scalar(@values)) - ? qq|| - : (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer}, + | . + (($myconfig{vclimit} <= scalar(@values)) + ? qq|| + : (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer}, '-onChange' => 'document.getElementById(\'update_button\').click();', '-values' => \@values, '-labels' => \%labels)))) . qq| + |; - + %labels = (); @values = (""); foreach my $item (@{ $form->{"ALL_SHIPTO"} }) { @@ -412,7 +413,7 @@ sub form_header { push(@values, $item); $labels{$item} = $item; } - + $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; my $currencies; if (scalar @values) { @@ -493,7 +494,7 @@ sub form_header { #substitute \n and \r to \s (bug 543) $form->{selectcustomer} =~ s/[\n\r]/ /g; - + if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) { $creditwarning = 1; } else { @@ -623,6 +624,7 @@ sub form_header { } $form->{"javascript"} .= qq||; + $form->{javascript} .= qq||; $jsscript .= $form->write_trigger(\%myconfig, 2, @@ -642,8 +644,8 @@ sub form_header {
| ; -map({print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});} - qw(id action type media format queued printed emailed title vc discount +map({print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});} + qw(id action type media format queued printed emailed title vc discount creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id)) ; print ($form->{saved_message} ? qq|

$form->{saved_message}

| : "") ; print qq| @@ -787,20 +789,20 @@ print qq| -| . +| . $jsscript . qq| | ; -map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } +map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2)); print qq| |; -map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } +map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(message email subject cc bcc taxaccounts)); print qq||; foreach $item (split(/ /, $form->{taxaccounts})) { - map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } + map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } ("${item}_rate", "${item}_description", "${item}_taxnumber")); } $lxdebug->leave_sub(); @@ -822,7 +824,7 @@ sub form_footer { qq||; $intnotes = qq||; - + $form->{taxincluded} = ($form->{taxincluded} ? "checked" : ""); $taxincluded = ""; @@ -1061,7 +1063,7 @@ if ($form->{type} eq "credit_note") { push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i"); } - map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(paidaccounts selectAR_paid oldinvtotal)); + map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(paidaccounts selectAR_paid oldinvtotal)); print qq| @@ -1161,7 +1163,7 @@ if ($form->{type} eq "credit_note") { | . -$cgi->hidden("-name" => "callback", "-value" => $form->{callback}) +$cgi->hidden("-name" => "callback", "-value" => $form->{callback}) . $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}]) . $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]); map({ print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});} qw(login password)); @@ -1185,7 +1187,7 @@ sub update { $form->{print_and_post} = 0; } - + if($form->{taxincluded}) { $taxincluded = "checked"; } @@ -1454,7 +1456,7 @@ sub post { "POSTED"; $form->save_history($form->dbconnect(\%myconfig)); } - + $form->redirect( $form->{label} . " $form->{invnumber} " . $locale->text('posted!')) unless $print_post; @@ -1586,7 +1588,7 @@ sub credit_note { $form->{script} = 'is.pl'; $script = "is"; $buysell = 'buy'; - + # bo creates the id, reset it map { delete $form->{$_} } @@ -1629,12 +1631,12 @@ sub yes { if (IS->delete_invoice(\%myconfig, \%$form, $spool)) { # saving the history if(!exists $form->{addition}) { - $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; + $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; $form->{addition} = "DELETED"; $form->save_history($form->dbconnect(\%myconfig)); } - # /saving the history - $form->redirect($locale->text('Invoice deleted!')); + # /saving the history + $form->redirect($locale->text('Invoice deleted!')); } $form->error($locale->text('Cannot delete invoice!'));