Skip to content

Commit

Permalink
Debug contact by default
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 7, 2019
1 parent c6c498f commit c83f40f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion htdocs/comm/propal/card.php
Expand Up @@ -1595,7 +1595,7 @@

if ($socid > 0)
{
// Contacts (ask contact only if thirdparty already defined). TODO do this also into order and invoice.
// Contacts (ask contact only if thirdparty already defined).
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td>';
$form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist);
print '</td></tr>';
Expand Down
4 changes: 3 additions & 1 deletion htdocs/commande/card.php
Expand Up @@ -70,6 +70,7 @@
$cancel = GETPOST('cancel', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$lineid = GETPOST('lineid', 'int');
$contactid = GETPOST('contactid', 'int');
$projectid = GETPOST('projectid', 'int');
$origin = GETPOST('origin', 'alpha');
$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
Expand Down Expand Up @@ -1646,8 +1647,9 @@

// Contact of order
if ($socid > 0) {
// Contacts (ask contact only if thirdparty already defined).
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td>';
$form->select_contacts($soc->id, $setcontact, 'contactid', 1, $srccontactslist, '', 1);
$form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1);
print '</td></tr>';

// Ligne info remises tiers
Expand Down
14 changes: 7 additions & 7 deletions htdocs/contact/card.php
Expand Up @@ -371,7 +371,7 @@
$object->priv = GETPOST("priv", 'int');
$object->note_public = GETPOST("note_public", 'none');
$object->note_private = GETPOST("note_private", 'none');
$object->roles = GETPOST("roles", 'array');
$object->roles = GETPOST("roles", 'array');

// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
Expand Down Expand Up @@ -725,9 +725,9 @@
print "</td></tr>";
}

//Role
// Contact by default
if (!empty($socid)) {
print '<tr><td>' . $langs->trans("Role") . '</td>';
print '<tr><td>' . $langs->trans("ContactByDefaultFor") . '</td>';
print '<td colspan="3">';
$contactType = $object->listeTypeContacts('external', '', 1);
print $form->multiselectarray('roles', $contactType);
Expand Down Expand Up @@ -1050,9 +1050,9 @@
print "</td></tr>";
}

//Role
// Contact by default
if (!empty($object->socid)) {
print '<tr><td>' . $langs->trans("Role") . '</td>';
print '<tr><td>' . $langs->trans("ContactByDefaultFor") . '</td>';
print '<td colspan="3">';
print $formcompany->showRoles("roles", $object, 'edit', $object->roles);
print '</td></tr>';
Expand Down Expand Up @@ -1206,7 +1206,7 @@
print $object->getCivilityLabel();
print '</td></tr>';

// Role
// Job / position
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td>'.$object->poste.'</td></tr>';

// Email
Expand Down Expand Up @@ -1257,7 +1257,7 @@
}

if (!empty($object->socid)) {
print '<tr><td class="titlefield">' . $langs->trans("Roles") . '</td>';
print '<tr><td class="titlefield">' . $langs->trans("ContactByDefaultFor") . '</td>';
print '<td colspan="3">';
print $formcompany->showRoles("roles", $object, 'view');
print '</td></tr>';
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/companies.lang
Expand Up @@ -298,6 +298,7 @@ FromContactName=Name:
NoContactDefinedForThirdParty=No contact defined for this third party
NoContactDefined=No contact defined
DefaultContact=Default contact/address
ContactByDefaultFor=Default contact/address for
AddThirdParty=Create third party
DeleteACompany=Delete a company
PersonalInformations=Personal data
Expand Down

0 comments on commit c83f40f

Please sign in to comment.