X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=314f68bc1e28f290ded0330d3d195ed099842d68;hb=264b38c7465f95066b47588c2fbe85f102bd022c;hp=a043e07bb655b4bbb147502769149a3a7ecf48c6;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index a043e07bb..314f68bc1 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -31,49 +31,54 @@ # #====================================================================== - use SL::IS; use SL::PE; +use Data::Dumper; require "$form->{path}/io.pl"; require "$form->{path}/arap.pl"; - 1; -# end of main - +# end of main sub add { $lxdebug->enter_sub(); $form->{title} = $locale->text('Add Sales Invoice'); - $form->{callback} = "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&path=$form->{path}&password=$form->{password}" unless $form->{callback}; + $form->{callback} = + "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&path=$form->{path}&password=$form->{password}" + unless $form->{callback}; $form{jsscript} = "date"; - - if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR") { - $form->error("Access Denied") - } - + + if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR") + { + $form->error("Access Denied"); + } &invoice_links; &prepare_invoice; + $form->{format} ="pdf"; + &display_form; $lxdebug->leave_sub(); } - sub edit { $lxdebug->enter_sub(); $form->{title} = $locale->text('Edit Sales Invoice'); - - if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR") { - $form->error("Access Denied") - } - + + if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR") + { + $form->error("Access Denied"); + } + if ($form->{print_and_post}) { + $form->{action} = "print"; + $form->{resubmit} = 1; + } &invoice_links; &prepare_invoice; &display_form; @@ -81,14 +86,13 @@ sub edit { $lxdebug->leave_sub(); } - sub invoice_links { $lxdebug->enter_sub(); $form->{vc} = 'customer'; # create links - $form->{webdav} = $webdav; + $form->{webdav} = $webdav; $form->{lizenzen} = $lizenzen; $form->create_links("AR", \%myconfig, "customer"); @@ -100,7 +104,7 @@ sub invoice_links { } $cp_id = $form->{cp_id}; IS->get_customer(\%myconfig, \%$form); - + IS->retrieve_invoice(\%myconfig, \%$form); $form->{cp_id} = $cp_id; @@ -115,28 +119,34 @@ sub invoice_links { if ($form->{all_customer}) { $form->{customer} = "$form->{customer}--$form->{customer_id}"; - map { $form->{selectcustomer} .= "