X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fct.pl;h=33b0c83329fbd605887c1a28048cb8d04b1d554e;hb=d4a434e1deba2695ef4d4a3fc0d51ac1b2044fb0;hp=e20efd2b9b4c90114584540179d1dcf39dfc091d;hpb=ee072e4f077213bf6f8792ca8f0a1afebbb6282f;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index e20efd2b9..33b0c8332 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -36,1138 +36,731 @@ # $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 POSIX qw(strftime); use SL::CT; +use SL::CVar; +use SL::DB::Business; +use SL::DB::Default; +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; - CT->taxaccounts(\%myconfig, \%$form); + $form->{title} = "Add"; + $form->{callback} = "$form->{script}?action=add&db=$form->{db}" unless $form->{callback}; + + 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| -