} $objectsrc->fetch_thirdparty(); $biensid = !empty($objectsrc->fk_project) ? $objectsrc->fk_project : ''; $soc = $objectsrc->client; $note_private = !empty($objectsrc->note_private) ? $objectsrc->note_private : ''; $note_public = !empty($objectsrc->note_public) ? $objectsrc->note_public : ''; // Object source contacts list $srccontactslist = $objectsrc->liste_contact(-1, 'external', 1); } } else { $projectid = GETPOST('projectid', 'int'); $note_private = GETPOST("note_private"); $note_public = GETPOST("note_public"); } $object->date_contrat = dol_now(); $numct = $object->getNextNumRef($soc); print '<form name="form_contract" action="' . $_SERVER["PHP_SELF"] . '" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="socid" value="' . $soc->id . '">' . "\n"; print '<input type="hidden" name="remise_percent" value="0">'; print '<table class="border" width="100%">'; // Ref print '<tr><td class="fieldrequired">' . $langs->trans('Ref') . '</td><td colspan="2">' . $langs->trans("Draft") . '</td></tr>'; // Customer print '<tr>'; print '<td class="fieldrequired">' . $langs->trans('Customer') . '</td>'; if ($socid > 0) { print '<td colspan="2">'; print $soc->getNomUrl(1); print '<input type="hidden" name="socid" value="' . $soc->id . '">';