- CT->delete(\%myconfig, \%$form);
-
- $msg = ucfirst $form->{db};
- $msg .= " deleted!";
- # saving the history
- if(!exists $form->{addition}) {
- $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
- $form->{addition} = "DELETED";
- $form->save_history($form->dbconnect(\%myconfig));
- }
- # /saving the history
- $form->redirect($locale->text($msg));
-
- $msg = "Cannot delete $form->{db}";
- $form->error($locale->text($msg));
-
- $lxdebug->leave_sub();
-}
-
-sub display {
- $lxdebug->enter_sub();
-
- &form_header();
- &form_footer();
-
- $lxdebug->leave_sub();
-}
-
-sub update {
- $lxdebug->enter_sub();
-
- &display();
- $lxdebug->leave_sub();
-}
-
-sub get_contact {
- $lxdebug->enter_sub();
-
- CT->get_contact(\%myconfig, \%$form);
-
- my $q = new CGI;
- $result = "$form->{cp_name}";
- map { $result .= "__pjx__" . $form->{$_} } qw(cp_greeting cp_title cp_givenname cp_phone1 cp_phone2 cp_email cp_abteilung cp_fax cp_mobile1 cp_mobile2 cp_satphone cp_satfax cp_project cp_privatphone cp_privatemail cp_birthday);
- print $q->header();
- print $result;
- $lxdebug->leave_sub();
-
-}
-
-sub get_shipto {
- $lxdebug->enter_sub();
-
- CT->get_shipto(\%myconfig, \%$form);
-
- my $q = new CGI;
- $result = "$form->{shiptoname}";
- map { $result .= "__pjx__" . $form->{$_} } qw(shiptodepartment_1 shiptodepartment_2 shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail);
- print $q->header();
- print $result;
- $lxdebug->leave_sub();
-
-}
-
-sub get_delivery {
- $lxdebug->enter_sub();
-
- CT->get_delivery(\%myconfig, \%$form );
-
- @column_index =
- $form->sort_columns(shiptoname,
- invnumber,
- ordnumber,
- transdate,
- description,
- qty,
- unit,
- sellprice);
-
-
-
- $column_header{shiptoname} =
- qq|<th class=listheading>| . $locale->text('Shipping Address') . qq|</th>|;
- $column_header{invnumber} =
- qq|<th class=listheading>|. $locale->text('Invoice'). qq|</th>|;
- $column_header{ordnumber} =
- qq|<th class=listheading>|. $locale->text('Order'). qq|</th>|;
- $column_header{transdate} =
- qq|<th class=listheading>| . $locale->text('Invdate') . qq|</th>|;
- $column_header{description} =
- qq|<th class=listheading>| . $locale->text('Description') . qq|</th>|;
- $column_header{qty} =
- qq|<th class=listheading>| . $locale->text('Qty') . qq|</th>|;
- $column_header{unit} =
- qq|<th class=listheading>| . $locale->text('Unit') . qq|</th>|;
- $column_header{sellprice} =
- qq|<th class=listheading>| . $locale->text('Sell Price') . qq|</th>|;
- $result .= qq|
-
-<table width=100%>
- <tr>
- <td>
- <table width=100%>
- <tr class=listheading>
-|;
-
- map { $result .= "$column_header{$_}\n" } @column_index;
-
- $result .= qq|
- </tr>
-|;
-
-
- foreach $ref (@{ $form->{DELIVERY} }) {
-
- if ($ref->{shiptoname} eq $sameshiptoname) {
- map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index;
- $column_data{shiptoname} = "<td> </td>";
- } else {
- map { $column_data{$_} = "<td>$ref->{$_} </td>" } @column_index;