X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fct.pl;h=e5ba1ddf8ff48d4fe44667b360a374b20a20699b;hb=12c4c658bc579890462f96832d918337c2b2d484;hp=6c119be5d3916836e9534f5e9e902234410503a2;hpb=40782548cf82ac1e4c0fe417113a4cb3072e9390;p=kivitendo-erp.git
diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl
index 6c119be5d..e5ba1ddf8 100644
--- a/bin/mozilla/ct.pl
+++ b/bin/mozilla/ct.pl
@@ -54,7 +54,7 @@ sub add {
$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}&login=$form->{login}&password=$form->{password}"
unless $form->{callback};
CT->populate_drop_down_boxes(\%myconfig, \%$form);
@@ -199,7 +199,6 @@ sub search {
-{path}>
{login}>
{password}>
@@ -313,7 +312,6 @@ sub search_delivery {
-{path}>
{login}>
{password}>
@@ -334,7 +332,7 @@ sub list_names {
CT->search(\%myconfig, \%$form);
$callback =
- "$form->{script}?action=list_names&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}&obsolete=$form->{obsolete}";
+ "$form->{script}?action=list_names&db=$form->{db}&login=$form->{login}&password=$form->{password}&status=$form->{status}&obsolete=$form->{obsolete}";
$href = $callback;
@columns =
@@ -496,7 +494,7 @@ sub list_names {
(invnumber, ordnumber, quonumber);
$column_data{name} =
- "
{script}?action=edit&id=$ref->{id}&db=$form->{db}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}&callback=$callback>$ref->{name} | ";
+ "{script}?action=edit&id=$ref->{id}&db=$form->{db}&login=$form->{login}&password=$form->{password}&status=$form->{status}&callback=$callback>$ref->{name} | ";
if ($ref->{email}) {
$email = $ref->{email};
@@ -511,17 +509,17 @@ sub list_names {
if ($ref->{formtype} eq 'invoice') {
$column_data{invnumber} =
- "{module}.pl?action=edit&id=$ref->{invid}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber} | ";
+ "{module}.pl?action=edit&id=$ref->{invid}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{invnumber} | ";
}
if ($ref->{formtype} eq 'order') {
$column_data{ordnumber} =
- "{module}.pl?action=edit&id=$ref->{invid}&type=$ordertype&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber} | ";
+ "{module}.pl?action=edit&id=$ref->{invid}&type=$ordertype&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{ordnumber} | ";
}
if ($ref->{formtype} eq 'quotation') {
$column_data{quonumber} =
- "{module}.pl?action=edit&id=$ref->{invid}&type=$quotationtype&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber} | ";
+ "{module}.pl?action=edit&id=$ref->{invid}&type=$quotationtype&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{quonumber} | ";
}
$i++;
@@ -555,7 +553,6 @@ sub list_names {
{db}>
-{path}>
{login}>
{password}>
@@ -601,7 +598,8 @@ sub edit {
sub form_header {
$lxdebug->enter_sub();
- $form->get_lists("employees" => "ALL_SALESMEN");
+ $form->get_lists("employees" => "ALL_SALESMEN",
+ "taxzones" => "ALL_TAXZONES");
$form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
$form->{creditlimit} =
@@ -644,27 +642,23 @@ sub form_header {
}
}
- if (@{ $form->{TAXZONE} }) {
- foreach $item (@{ $form->{TAXZONE} }) {
- if ($item->{id} == $form->{taxzone_id}) {
- $form->{selecttaxzone} .=
- "";
@@ -688,7 +682,7 @@ sub form_header {
|;
$get_shipto_url =
- "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_shipto";
+ "$form->{script}?login=$form->{login}&password=$form->{password}&action=get_shipto";
my $pjy = new CGI::Ajax( 'get_shipto' => $get_shipto_url );
$form->{selectshipto} = "";
@@ -716,7 +710,7 @@ sub form_header {
$get_delivery_url =
- "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_delivery";
+ "$form->{script}?login=$form->{login}&password=$form->{password}&action=get_delivery";
my $pjz = new CGI::Ajax( 'get_delivery' => $get_delivery_url );
@@ -1198,7 +1192,6 @@ sub form_footer {
-{path}>
{login}>
{password}>
@@ -1272,7 +1265,7 @@ sub add_transaction {
$name = $form->escape("$form->{name}", 1);
$form->{callback} =
- "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&callback=$form->{callback}";
+ "$form->{script}?login=$form->{login}&password=$form->{password}&action=add&vc=$form->{db}&$form->{db}_id=$form->{id}&$form->{db}=$name&type=$form->{type}&callback=$form->{callback}";
$form->redirect;
$lxdebug->leave_sub();
@@ -1284,6 +1277,7 @@ sub save_and_ap_transaction {
$form->{script} = "ap.pl";
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1298,6 +1292,7 @@ sub save_and_ar_transaction {
$form->{script} = "ar.pl";
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1313,6 +1308,7 @@ sub save_and_invoice {
$form->{type} = "invoice";
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1328,6 +1324,7 @@ sub save_and_rfq {
$form->{type} = "request_quotation";
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1343,6 +1340,7 @@ sub save_and_quotation {
$form->{type} = "sales_quotation";
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1359,6 +1357,7 @@ sub save_and_order {
($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1387,7 +1386,8 @@ sub save_and_close {
}
# saving the history
if(!exists $form->{addition}) {
- $form->{addition} = "SAVED";
+ $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
+ $form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
# /saving the history
@@ -1411,7 +1411,7 @@ sub save {
if ($form->{"db"} eq "customer") {
$res = CT->save_customer(\%myconfig, \%$form);
} else {
- $res = CT->save_customer(\%myconfig, \%$form);
+ $res = CT->save_vendor(\%myconfig, \%$form);
}
if (3 == $res) {
@@ -1423,6 +1423,7 @@ sub save {
}
# saving the history
if(!exists $form->{addition}) {
+ $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
$form->{addition} = "SAVED";
$form->save_history($form->dbconnect(\%myconfig));
}
@@ -1446,6 +1447,7 @@ sub delete {
$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));
}