X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fct.pl;h=35f10647579d90a420962ed80b4ac0837751870f;hb=c2d72edadd2639c4dd854a3ad4daf29ebd4c4f2b;hp=c1bd16e2106096c2ffbf554b6427ef3195cc2c93;hpb=195883fdfd3b10f329036767f027baa6e7c402b9;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index c1bd16e21..35f106475 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -36,8 +36,24 @@ # $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"; 1; @@ -46,13 +62,12 @@ use SL::CT; sub add { $lxdebug->enter_sub(); - $form->{title} = "Add"; + $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}; + $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; @@ -63,374 +78,163 @@ sub add { sub search { $lxdebug->enter_sub(); - $label = ucfirst $form->{db}; - $form->{title} = $locale->text($label . "s"); + $auth->assert('customer_vendor_edit'); - if ($form->{db} eq 'vendor') { - $gifi = qq| -