Merge branch 'erzeugnisnummern'
[kivitendo-erp.git] / SL / Common.pm
index 371bb8a..159609d 100644 (file)
@@ -43,7 +43,7 @@ sub unique_id {
 }
 
 sub tmpname {
-  return "/tmp/lx-office-tmp-" . unique_id();
+  return "/tmp/kivitendo-tmp-" . unique_id();
 }
 
 sub retrieve_parts {
@@ -441,6 +441,9 @@ sub get_vc_details {
   $query = qq|SELECT * FROM contacts WHERE (cp_cv_id = ?)|;
   $form->{CONTACTS} = selectall_hashref_query($form, $dbh, $query, $vc_id);
 
+  # Only show default pricegroup for customer, not vendor, which is why this is outside the main query
+  ($form->{pricegroup}) = selectrow_query($form, $dbh, qq|SELECT pricegroup FROM pricegroup WHERE id = ?|, $form->{klass});
+
   $dbh->disconnect();
 
   $main::lxdebug->leave_sub();