X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;h=5c76ae36f78748d9c2f2a4b056098dd5ae5056f7;hb=a295ff26c39f57d4b36a4115309e5a68b08fbee2;hp=6968de1871da7d6782e4d4b24d6e57ad655c22c9;hpb=d66df20dae09592c6326d8376be0816caa30542d;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 6968de187..5c76ae36f 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -565,7 +565,7 @@ sub get_contact { CT->get_contact(\%myconfig, \%$form); print $cgi->header(), join '__pjx__', map $form->{"cp_$_"}, - qw(name greeting title givenname phone1 phone2 email abteilung fax mobile1 mobile2 satphone satfax project privatphone privatemail birthday); + qw(name greeting title givenname phone1 phone2 email abteilung fax mobile1 mobile2 satphone satfax project privatphone privatemail birthday used); $lxdebug->leave_sub(); } @@ -577,7 +577,7 @@ sub get_shipto { CT->get_shipto(\%myconfig, \%$form); print $cgi->header(), join '__pjx__', map $form->{"shipto$_"}, - qw(name department_1 department_2 street zipcode city country contact phone fax email); + qw(name department_1 department_2 street zipcode city country contact phone fax email used); $lxdebug->leave_sub(); } @@ -594,4 +594,38 @@ sub get_delivery { $lxdebug->leave_sub(); } +sub delete_shipto { + $main::lxdebug->enter_sub(); + + $auth->assert('customer_vendor_edit'); + + CT->get_shipto(\%myconfig, \%$form); + + unless ($form->{shiptoused}) { + CT->delete_shipto($form->{shipto_id}); + @$form{ grep /^shipto/, keys %$form } = undef; + } + + edit(); + + $main::lxdebug->leave_sub(); +} + +sub delete_contact { + $main::lxdebug->enter_sub(); + + $auth->assert('customer_vendor_edit'); + + CT->get_contact(\%myconfig, \%$form); + + unless ($form->{cp_used}) { + CT->delete_shipto($form->{cp_id}); + @$form{ grep /^cp_/, keys %$form } = undef; + } + + edit(); + + $main::lxdebug->leave_sub(); +} + sub continue { call_sub($form->{nextsub}); }