X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fct.pl;h=5c76ae36f78748d9c2f2a4b056098dd5ae5056f7;hb=0e5b1ea3ee6a7ad8ec9b735971eb894c850c5a64;hp=e20efd2b9b4c90114584540179d1dcf39dfc091d;hpb=0576299f2aa98125991c4ffcd2f75073ea583d7d;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index e20efd2b9..5c76ae36f 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,15 @@ use SL::CT; sub add { $lxdebug->enter_sub(); + $auth->assert('customer_vendor_edit'); + $form->{title} = "Add"; $form->{callback} = - "$form->{script}?action=add&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}" + "$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,390 +81,152 @@ 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| -