X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fct.pl;h=63aa8313f7a15b5ccf3f5bf430b3ddcdea63c8fa;hb=624c53dc0cb5056d2c259aec6f815e69b8313ae0;hp=0e1df522a0b0ba12d3903b13d1b948cf28f2d6fc;hpb=7337082ff889409364ee0959aac2e53633974694;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 0e1df522a..63aa8313f 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -36,431 +36,235 @@ # $locale->text('Vendors') # $locale->text('Add Customer') # $locale->text('Add Vendor') +# $locale->text('Edit Customer') +# $locale->text('Edit Vendor') +# $locale->text('Customer saved!') +# $locale->text('Vendor saved!') +# $locale->text('Customer deleted!') +# $locale->text('Cannot delete customer!') +# $locale->text('Vendor deleted!') +# $locale->text('Cannot delete vendor!') + +use CGI::Ajax; +use POSIX qw(strftime); use SL::CT; +use SL::CVar; +use SL::ReportGenerator; +require "bin/mozilla/common.pl"; +require "bin/mozilla/reportgenerator.pl"; + +use strict; 1; # end of main sub add { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); - $form->{title} = "Add"; + $main::auth->assert('customer_vendor_edit'); - $form->{callback} = - "$form->{script}?action=add&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; + my $form = $main::form; + my %myconfig = %main::myconfig; + + $form->{title} = "Add"; + $form->{callback} = "$form->{script}?action=add&db=$form->{db}" unless $form->{callback}; - CT->taxaccounts(\%myconfig, \%$form); + CT->populate_drop_down_boxes(\%myconfig, \%$form); &form_header; &form_footer; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } sub search { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); - $label = ucfirst $form->{db}; - $form->{title} = $locale->text($label . "s"); + $main::auth->assert('customer_vendor_edit'); - if ($form->{db} eq 'vendor') { - $gifi = qq| -