print '</td></tr>'; } // Parent company if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) { // Payment term print '<tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; print $langs->trans('ParentCompany'); print '</td>'; if ($action != 'editparentcompany') { print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editparentcompany&socid=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a></td>'; } print '</tr></table>'; print '</td><td colspan="3">'; if ($action == 'editparentcompany') { $form->form_thirdparty($_SERVER['PHP_SELF'] . '?socid=' . $object->id, $object->parent, 'editparentcompany', 's.rowid <> ' . $object->id, 1); } else { $form->form_thirdparty($_SERVER['PHP_SELF'] . '?socid=' . $object->id, $object->parent, 'none', 's.rowid <> ' . $object->id, 1); } print '</td>'; print '</tr>'; } // Sales representative include DOL_DOCUMENT_ROOT . '/societe/tpl/linesalesrepresentative.tpl.php'; // Module Adherent if (!empty($conf->adherent->enabled)) { $langs->load("members"); print '<tr><td width="25%" valign="top">' . $langs->trans("LinkedToDolibarrMember") . '</td>'; print '<td colspan="3">'; $adh = new Adherent($db); $result = $adh->fetch('', '', $object->id);
} else { print $object->ref_client; } print '</td></tr>'; // Third party print '<tr><td>'; print '<table class="nobordernopadding" width="100%">'; print '<tr><td>' . $langs->trans('Company') . '</td>'; print '</td><td colspan="5">'; if (!empty($conf->global->FACTURE_CHANGE_THIRDPARTY) && $action != 'editthirdparty' && $object->brouillon && $user->rights->facture->creer) { print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editthirdparty&facid=' . $object->id . '">' . img_edit($langs->trans('SetLinkToAnotherThirdParty'), 1) . '</a></td>'; } print '</tr></table>'; print '</td><td colspan="5">'; if ($action == 'editthirdparty') { $form->form_thirdparty($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, 'socid'); } else { print ' ' . $soc->getNomUrl(1, 'compta'); print ' '; print '(<a href="' . DOL_URL_ROOT . '/compta/facture/list.php?socid=' . $object->socid . '">' . $langs->trans('OtherBills') . '</a>'; // Outstanding Bill $outstandingBills = $soc->get_OutstandingBill(); print ' - ' . $langs->trans('CurrentOutstandingBill') . ': '; print price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency); if ($soc->outstanding_limit != '') { if ($outstandingBills > $soc->outstanding_limit) { print img_warning($langs->trans("OutstandingBillReached")); } print ' / ' . price($soc->outstanding_limit); } print ')';
dol_fiche_head($head, 'customerMargins', $titre, 0, $picto); print '<form method="post" name="sel">'; print '<table class="border" width="100%">'; $client = false; if ($socid > 0) { $soc = new Societe($db, $socid); $soc->fetch($socid); if ($soc->client) { print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>'; print '<td colspan="4">'; $form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$socid,$socid,'socid','client=1',1,0,1); print '</td></tr>'; $client = true; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="f.datef"; } } else { print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>'; print '<td colspan="4">'; $form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$socid,null,'socid','client=1',1,0,1); print '</td></tr>'; } // Start date