FIX dolibarize fk_soc socid

This commit is contained in:
ptibogxiv 2019-02-26 18:45:02 +01:00 committed by GitHub
parent 3a2a1b4a56
commit aa6e18f66f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,7 +154,7 @@ if ($action == 'add')
if (! $error) if (! $error)
{ {
$object->fk_soc = GETPOST("fk_soc", 'int'); $object->socid = GETPOST("socid", 'int');
$object->firstname = GETPOST("firstname", 'alpha'); $object->firstname = GETPOST("firstname", 'alpha');
$object->lastname = GETPOST("lastname", 'alpha'); $object->lastname = GETPOST("lastname", 'alpha');
$object->societe = GETPOST("societe", 'alpha'); $object->societe = GETPOST("societe", 'alpha');
@ -531,10 +531,10 @@ if (! empty($id) && $action == 'edit')
print "</td>"; print "</td>";
print "</tr>\n"; print "</tr>\n";
if ( $object->fk_soc && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) { if ( $object->socid && ! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES) ) {
$company=new Societe($db); $company=new Societe($db);
$result=$company->fetch($object->fk_soc); $result=$company->fetch($object->socid);
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2">'.$company->getNomUrl(1).'</td></tr>'; print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2">'.$company->getNomUrl(1).'</td></tr>';
} else { } else {
@ -693,10 +693,10 @@ if (! empty($id) && $action != 'edit')
print yn($object->public); print yn($object->public);
print '</td></tr>'; print '</td></tr>';
if ($object->fk_soc) { if ($object->socid) {
$company=new Societe($db); $company=new Societe($db);
$result=$company->fetch($object->fk_soc); $result=$company->fetch($object->socid);
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2">'.$company->getNomUrl(1).'</td></tr>'; print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2">'.$company->getNomUrl(1).'</td></tr>';
} else { } else {