X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fct.pl;h=10ff70675c38e89ff7e58405168decfa233f7c0b;hb=2dacd2790bb5e0990ec5fe89a9d59370b018c25c;hp=aa8459d7d7e8c53b598e9fdd9e6e797edb3b3bb6;hpb=72539cb39a3d19f930a8e0e41e46bf41afe9a8f1;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index aa8459d7d..10ff70675 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -36,415 +36,234 @@ # $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| -