X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fct.pl;h=a04cf5e5bdc08699dd00722eac1f6533e2789863;hb=eaf4d4830c5b449170dbef0d0ad5f88863f1e8bd;hp=923a18a1aed5a97f3d40f49eac24d2e80c2951e4;hpb=e7214232350249fdab6da3445442ff85891a0d7c;p=kivitendo-erp.git diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 923a18a1a..a04cf5e5b 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -543,14 +543,8 @@ sub list_names { {password}> |; + . $locale->text('Add') . qq|"> - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq| @@ -675,6 +669,7 @@ sub form_header { my $pjy = new CGI::Ajax( 'get_shipto' => $get_shipto_url ); $form->{selectshipto} = ""; + $form->{selectshipto} .= ""; if (@{ $form->{SHIPTO} }) { foreach $item (@{ $form->{SHIPTO} }) { if ($item->{shipto_id} == $form->{shipto_id}) { @@ -863,6 +858,7 @@ sub form_header { # $locale->text('Customer Number') # $locale->text('Vendor Number') $form->{fokus} = "ct.greeting"; + $form->{jsscript} = 1; $form->header; print qq| @@ -953,9 +949,9 @@ sub form_header { | . $locale->text('Credit Limit') . qq| - | . $locale->text('Terms: Net') . qq| - | - . $locale->text('days') . qq| + + | . $locale->text('Payment Terms') . qq| + | . $locale->text('Discount') . qq| % @@ -964,7 +960,7 @@ sub form_header { | . $locale->text('Tax Number / SSN') . qq| | . $locale->text('USt-IdNr.') . qq| - + $customer @@ -991,9 +987,6 @@ sub form_header { | . $locale->text('Obsolete') . qq| {obsolete}> - | . $locale->text('Payment Terms') . qq| - $taxzone @@ -1167,9 +1160,11 @@ $shipto $delivery | . $locale->text('From') . qq| - - | . $locale->text('Bis') . qq| - + + + | . $locale->text('To (time)') . qq| + + @@ -1182,7 +1177,8 @@ $shipto -|; +| . $form->write_trigger(\%myconfig, 2, "fromB", "BL", "trigger_from", + "toB", "BL", "trigger_to"); $lxdebug->leave_sub(); } @@ -1247,11 +1243,6 @@ $update_button . qq|">\n|; } - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - print qq| @@ -1380,8 +1371,16 @@ sub save { if ($vertreter && $form->{db} eq "customer") { $form->isblank("salesman_id", $locale->text("Salesman missing!")); } - print(STDERR "SHIPTO in sub save $form->{shipto_id}\n"); - &{"CT::save_$form->{db}"}("", \%myconfig, \%$form); + + my $res = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form); + + if (3 == $res) { + if ($form->{"db"} eq "customer") { + $form->error($locale->text('This customer number is already in use.')); + } else { + $form->error($locale->text('This vendor number is already in use.')); + } + } &edit; exit;