X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fct.pl;h=63aa8313f7a15b5ccf3f5bf430b3ddcdea63c8fa;hb=624c53dc0cb5056d2c259aec6f815e69b8313ae0;hp=95c6e3315ba1843ca2a5cdf8be286bc859064498;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 95c6e3315..63aa8313f 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -36,1032 +36,699 @@ # $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; -1; -# end of main +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(); + + $main::auth->assert('customer_vendor_edit'); + my $form = $main::form; + my %myconfig = %main::myconfig; - $form->{title} = "Add"; + $form->{title} = "Add"; + $form->{callback} = "$form->{script}?action=add&db=$form->{db}" unless $form->{callback}; - $form->{callback} = "$form->{script}?action=add&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}" unless $form->{callback}; + CT->populate_drop_down_boxes(\%myconfig, \%$form); - CT->taxaccounts(\%myconfig, \%$form); - &form_header; &form_footer; - - $lxdebug->leave_sub(); -} + $main::lxdebug->leave_sub(); +} sub search { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + $main::auth->assert('customer_vendor_edit'); - $label = ucfirst $form->{db}; - $form->{title} = $locale->text($label."s"); + my $form = $main::form; + my $locale = $main::locale; - if ($form->{db} eq 'vendor') { - $gifi = qq| -