コード例 #1
0
ファイル: fiche.php プロジェクト: remyyounes/dolibarr
 * Mode creation
 *
 *********************************************************************/
if ($action == 'create')
{
    dol_fiche_head($head, $a, $langs->trans("AddContract"), 0, 'contract');

    dol_htmloutput_errors($mesg,'');

    $soc = new Societe($db);
    $soc->fetch($socid);

	$object->date_contrat = dol_now();
	if ($contratid) $result=$object->fetch($contratid);

	$numct = $object->getNextNumRef($soc);

    print '<form name="contrat" 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>'.$langs->trans("Ref").'</td>';
    print '<td><input type="text" maxlength="30" name="ref" size="20" value="'.$numct.'"></td></tr>';

    // Customer