print '</td></tr>';
 print '<tr><td>' . $langs->trans("NoteReason") . '</td>';
 print '<td><input type="text" size="60" name="desc" value="' . $_POST["desc"] . '"></td></tr>';
 print "</table>";
 print '<center>';
 print '<input type="submit" class="button" name="submit" value="' . $langs->trans("AddGlobalDiscount") . '">';
 if (!empty($backtopage)) {
     print '&nbsp; &nbsp; ';
     print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
 }
 print '</center>';
 print '</form>';
 dol_fiche_end();
 print '<br>';
 if ($_GET['action'] == 'remove') {
     print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $objsoc->id . '&remid=' . $_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
 }
 /*
  * Liste remises fixes restant en cours (= liees a acune facture ni ligne de facture)
  */
 $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
 $sql .= " rc.datec as dc, rc.description,";
 $sql .= " rc.fk_facture_source,";
 $sql .= " u.login, u.rowid as user_id,";
 $sql .= " fa.facnumber as ref, fa.type as type";
 $sql .= " FROM  " . MAIN_DB_PREFIX . "user as u, " . MAIN_DB_PREFIX . "societe_remise_except as rc";
 $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as fa ON rc.fk_facture_source = fa.rowid";
 $sql .= " WHERE rc.fk_soc =" . $objsoc->id;
 $sql .= " AND u.rowid = rc.fk_user";
 $sql .= " AND (rc.fk_facture_line IS NULL AND rc.fk_facture IS NULL)";
 $sql .= " ORDER BY rc.datec DESC";
$savepath = ini_get("session.save_path");
$openbasedir = ini_get("open_basedir");
$phparray = phpinfo_array();
$suhosin = empty($phparray['suhosin']["suhosin.session.encrypt"]["local"]) ? '' : $phparray['suhosin']["suhosin.session.encrypt"]["local"];
print '<b>' . $langs->trans("SessionSaveHandler") . '</b>: ' . $savehandler . '<br>';
print '<b>' . $langs->trans("SessionSavePath") . '</b>: ' . $savepath . '<br>';
if ($openbasedir) {
    print '<b>' . $langs->trans("OpenBaseDir") . '</b>: ' . $openbasedir . '<br>';
}
if ($suhosin) {
    print '<b>' . $langs->trans("SuhosinSessionEncrypt") . '</b>: ' . $suhosin . '<br>';
}
print '<br>';
if ($action == 'purge') {
    $formquestion = array();
    print $form->formconfirm($_SERVER["PHP_SELF"] . '?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'), 'confirm_purge', $formquestion, 'no', 2);
} else {
    if ($action == 'lock') {
        $formquestion = array();
        print $form->formconfirm($_SERVER["PHP_SELF"] . '?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions', $user->login), 'confirm_lock', $formquestion, 'no', 1);
    }
}
if ($savehandler == 'files') {
    print '<table class="liste" width="100%">';
    print '<tr class="liste_titre">';
    print_liste_field_titre($langs->trans("Login"), $_SERVER["PHP_SELF"], "login", "", "", 'align="left"', $sortfield, $sortorder);
    print_liste_field_titre($langs->trans("SessionId"), $_SERVER["PHP_SELF"], "id", "", "", 'align="left"', $sortfield, $sortorder);
    print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "datec", "", "", 'align="left"', $sortfield, $sortorder);
    print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "datem", "", "", 'align="left"', $sortfield, $sortorder);
    print_liste_field_titre($langs->trans("Age"), $_SERVER["PHP_SELF"], "age", "", "", 'align="left"', $sortfield, $sortorder);
    print_liste_field_titre($langs->trans("Raw"), $_SERVER["PHP_SELF"], "raw", "", "", 'align="left"', $sortfield, $sortorder);
 */
$form = new Form($db);
if ($object->id) {
    llxHeader("", "", $langs->trans("CardProduct" . $object->type));
    /*
     *  En mode visu
     */
    $head = product_prepare_head($object, $user);
    $titre = $langs->trans("CardProduct" . $object->type);
    $picto = $object->type == 1 ? 'service' : 'product';
    dol_fiche_head($head, 'photos', $titre, 0, $picto);
    /*
     * Confirmation de la suppression de photo
     */
    if ($action == 'delete') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&file=' . $_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
    }
    print $mesg;
    print '<table class="border" width="100%">';
    // Reference
    print '<tr>';
    print '<td width="15%">' . $langs->trans("Ref") . '</td><td colspan="2">';
    print $form->showrefnav($object, 'ref', '', 1, 'ref');
    print '</td>';
    print '</tr>';
    // Libelle
    print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="2">' . $object->libelle . '</td>';
    print '</tr>';
    // Status (to sell)
    print '<tr><td>' . $langs->trans("Status") . ' (' . $langs->trans("Sell") . ')</td><td>';
    print $object->getLibStatut(2, 0);
Example #4
0
        $object->author = $tmpuser;
    }
    if ($object->usermodid > 0) {
        $tmpuser = new User($db);
        $res = $tmpuser->fetch($object->usermodid);
        $object->usermod = $tmpuser;
    }
    /*
     * Show tabs
     */
    $head = actions_prepare_head($object);
    $now = dol_now();
    $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;
    // Confirmation suppression action
    if ($action == 'delete') {
        print $form->formconfirm("card.php?id=" . $id, $langs->trans("DeleteAction"), $langs->trans("ConfirmDeleteAction"), "confirm_delete", '', '', 1);
    }
    if ($action == 'edit') {
        if (!empty($conf->use_javascript_ajax)) {
            print "\n" . '<script type="text/javascript">';
            print '$(document).ready(function () {
	            		function setdatefields()
	            		{
	            			if ($("#fullday:checked").val() == null) {
	            				$(".fulldaystarthour").removeAttr("disabled");
	            				$(".fulldaystartmin").removeAttr("disabled");
	            				$(".fulldayendhour").removeAttr("disabled");
	            				$(".fulldayendmin").removeAttr("disabled");
	            			} else {
								$(".fulldaystarthour").prop("disabled", true).val("00");
								$(".fulldaystartmin").prop("disabled", true).val("00");
Example #5
0
             print '<a class="butAction" href="' . DOL_URL_ROOT . '/compta/bank/rappro.php?account=' . $object->id . ($vline ? '&amp;vline=' . $vline : '') . '">' . $langs->trans("Conciliate") . '</a>';
         } else {
             print '<a class="butActionRefused" title="' . $langs->trans("NotEnoughPermissions") . '" href="#">' . $langs->trans("Conciliate") . '</a>';
         }
     }
     print '</div>';
 }
 print '<br>';
 /**
  * Search form
  */
 $param .= '&amp;account=' . $object->id . '&amp;vline=' . $vline;
 // Confirmation delete
 if ($action == 'delete') {
     $text = $langs->trans('ConfirmDeleteTransaction');
     print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;rowid=' . GETPOST("rowid"), $langs->trans('DeleteTransaction'), $text, 'confirm_delete');
 }
 // Define transaction list navigation string
 print '<form action="' . $_SERVER["PHP_SELF"] . '" name="newpage" method="POST">';
 print '<input type="hidden" name="token"        value="' . $_SESSION['newtoken'] . '">';
 print '<input type="hidden" name="action"       value="add">';
 print '<input type="hidden" name="vline"        value="' . $vline . '">';
 print '<input type="hidden" name="paiementtype" value="' . $paiementtype . '">';
 print '<input type="hidden" name="req_nb"       value="' . $req_nb . '">';
 print '<input type="hidden" name="req_desc"     value="' . $req_desc . '">';
 print '<input type="hidden" name="req_debit"    value="' . $req_debit . '">';
 print '<input type="hidden" name="req_credit"   value="' . $req_credit . '">';
 print '<input type="hidden" name="thirdparty"   value="' . $thirdparty . '">';
 print '<input type="hidden" name="nbpage"       value="' . $totalPages . '">';
 print '<input type="hidden" name="id"           value="' . $object->id . '">';
 print '<input type="hidden" name="req_stdtmonth"     value="' . $req_stdtmonth . '">';
        exit;
    }
    $h = 0;
    $head[$h][0] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
    $head[$h][1] = $langs->trans("CheckReceipt");
    $hselected = $h;
    $h++;
    //  $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/cheque/info.php?id='.$object->id;
    //  $head[$h][1] = $langs->trans("Info");
    //  $h++;
    dol_fiche_head($head, $hselected, $langs->trans("Cheques"), 0, 'payment');
    /*
     * Confirmation de la suppression du bordereau
     */
    if ($action == 'delete') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete', '', '', 1);
    }
    /*
     * Confirmation de la validation du bordereau
     */
    if ($action == 'valide') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide', '', '', 1);
    }
}
dol_htmloutput_errors($mesg);
$accounts = array();
if ($action == 'new') {
    $lines = array();
    $now = dol_now();
    print $langs->trans("SelectChequeTransactionAndGenerate") . '<br><br>' . "\n";
    print '<form class="nocellnopadd" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
Example #7
0
llxHeader();
$titre = $langs->trans("DictionarySetup");
$linkback = '';
if ($id) {
    $titre .= ' - ' . $langs->trans($tablib[$id]);
    $linkback = '<a href="' . $_SERVER['PHP_SELF'] . '">' . $langs->trans("BackToDictionaryList") . '</a>';
}
print load_fiche_titre($titre, $linkback, 'title_setup');
if (empty($id)) {
    print $langs->trans("DictionaryDesc");
    print " " . $langs->trans("OnlyActiveElementsAreShown") . "<br>\n";
}
print "<br>\n";
// Confirmation de la suppression de la ligne
if ($action == 'delete') {
    print $form->formconfirm($_SERVER["PHP_SELF"] . '?' . ($page ? 'page=' . $page . '&' : '') . 'sortfield=' . $sortfield . '&sortorder=' . $sortorder . '&rowid=' . $rowid . '&code=' . $_GET["code"] . '&id=' . $id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1);
}
//var_dump($elementList);
/*
 * Show a dictionary
 */
if ($id) {
    // Complete requete recherche valeurs avec critere de tri
    $sql = $tabsql[$id];
    if ($sortfield) {
        // If sort order is "country", we use country_code instead
        if ($sortfield == 'country') {
            $sortfield = 'country_code';
        }
        $sql .= " ORDER BY " . $sortfield;
        if ($sortorder) {
Example #8
0
    print '<table class="border centpercent">' . "\n";
    // print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>';
    // LIST_OF_TD_LABEL_FIELDS_EDIT
    print '</table>';
    dol_fiche_end();
    print '<div class="center"><input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '">';
    print ' &nbsp; <input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
    print '</div>';
    print '</form>';
}
// Part to show record
if ($id && (empty($action) || $action == 'view' || $action == 'delete')) {
    print load_fiche_titre($langs->trans("MyModule"));
    dol_fiche_head();
    if ($action == 'delete') {
        $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1);
        print $formconfirm;
    }
    print '<table class="border centpercent">' . "\n";
    // print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>';
    // LIST_OF_TD_LABEL_FIELDS_VIEW
    print '</table>';
    dol_fiche_end();
    // Buttons
    print '<div class="tabsAction">' . "\n";
    $parameters = array();
    $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
    // Note that $action and $object may have been modified by hook
    if ($reshook < 0) {
        setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
    }
} else {
    /*
     * Fiche societe en mode visu
     */
    $result = $object->fetch_lines($socid);
    if ($result < 0) {
        dol_print_error($db, $object->error);
        exit;
    }
    $societe = new Societe($db);
    $societe->fetch($object->socid);
    $head = societe_prepare_head($societe);
    dol_fiche_head($head, 'customer', $societe->nom);
    // Confirmation delete
    if ($action == 'delete') {
        print $form->formconfirm($_SERVER['PHP_SELF'] . "?socid=" . $object->socid . "&amp;id=" . $id, $langs->trans("DeleteAddress"), $langs->trans("ConfirmDeleteAddress"), "confirm_delete");
    }
    $nblines = count($object->lines);
    if ($nblines) {
        for ($i = 0; $i < $nblines; $i++) {
            print '<table class="border" width="100%">';
            print '<tr><td width="20%">' . $langs->trans('AddressLabel') . '</td><td colspan="3">' . $object->lines[$i]->label . '</td>';
            print '<td valign="top" colspan="2" width="50%" rowspan="6">' . $langs->trans('Note') . ' :<br>' . nl2br($object->lines[$i]->note) . '</td></tr>';
            print '<tr><td width="20%">' . $langs->trans('Name') . '</td><td colspan="3">' . $object->lines[$i]->name . '</td></tr>';
            print "<tr><td valign=\"top\">" . $langs->trans('Address') . "</td><td colspan=\"3\">" . nl2br($object->lines[$i]->address) . "</td></tr>";
            print '<tr><td width="25%">' . $langs->trans('Zip') . '</td><td width="25%">' . $object->lines[$i]->zip . "</td></tr>";
            print '<tr><td width="25%">' . $langs->trans('Town') . '</td><td width="25%">' . $object->lines[$i]->town . "</td></tr>";
            print '<tr><td>' . $langs->trans('Country') . '</td><td colspan="3">' . $object->lines[$i]->country . '</td>';
            print '<tr><td>' . $langs->trans('Phone') . '</td><td>' . dol_print_phone($object->lines[$i]->phone, $object->lines[$i]->country_code, 0, $object->socid, 'AC_TEL') . '</td></tr>';
            print '<tr><td>' . $langs->trans('Fax') . '</td><td>' . dol_print_phone($object->lines[$i]->fax, $object->lines[$i]->country_code, 0, $object->socid, 'AC_FAX') . '</td></tr>';
            print '</td></tr>';
Example #10
0
     dol_print_error($db);
 }
 // fetch optionals attributes and labels
 $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
 /*
  *	View card
  */
 $head = facturefourn_prepare_head($object);
 $titre = $langs->trans('SupplierInvoice');
 dol_fiche_head($head, 'card', $titre, 0, 'bill');
 // Clone confirmation
 if ($action == 'clone') {
     // Create an array for form
     $formquestion = array();
     // Paiement incomplet. On demande si motif = escompte ou autre
     $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
 }
 // Confirmation de la validation
 if ($action == 'valid') {
     // on verifie si l'objet est en numerotation provisoire
     $objectref = substr($object->ref, 1, 4);
     if ($objectref == 'PROV') {
         $savdate = $object->date;
         if (!empty($conf->global->FAC_FORCE_DATE_VALIDATION)) {
             $object->date = dol_now();
             //TODO: Possibly will have to control payment information into suppliers
             //$object->date_lim_reglement=$object->calculate_date_lim_reglement();
         }
         $numref = $object->getNextNumRef($societe);
     } else {
         $numref = $object->ref;
Example #11
0
$h++;
$head[$h][0] = DOL_URL_ROOT . "/admin/menus/other.php";
$head[$h][1] = $langs->trans("Miscellaneous");
$head[$h][2] = 'misc';
$h++;
dol_fiche_head($head, 'editor', $langs->trans("Menus"));
print $langs->trans("MenusEditorDesc") . "<br>\n";
print "<br>\n";
// Confirmation for remove menu entry
if ($action == 'delete') {
    $sql = "SELECT m.titre";
    $sql .= " FROM " . MAIN_DB_PREFIX . "menu as m";
    $sql .= " WHERE m.rowid = " . $_GET['menuId'];
    $result = $db->query($sql);
    $obj = $db->fetch_object($result);
    print $form->formconfirm("index.php?menu_handler=" . $menu_handler . "&menuId=" . $_GET['menuId'], $langs->trans("DeleteMenu"), $langs->trans("ConfirmDeleteMenu", $obj->titre), "confirm_delete");
}
print '<form name="newmenu" class="nocellnopadd" action="' . $_SERVER["PHP_SELF"] . '">';
print '<input type="hidden" action="change_menu_handler">';
print $langs->trans("MenuHandler") . ': ';
print $formadmin->select_menu_families($menu_handler . (preg_match('/_menu/', $menu_handler) ? '' : '_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone));
print ' &nbsp; <input type="submit" class="button" value="' . $langs->trans("Refresh") . '">';
print '</form>';
print '<br>';
print '<table class="border" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("TreeMenuPersonalized") . '</td>';
print '<td align="right"><div id="iddivjstreecontrol"><a href="#">' . img_picto('', 'object_category') . ' ' . $langs->trans("UndoExpandAll") . '</a>';
print ' | <a href="#">' . img_picto('', 'object_category-expanded') . ' ' . $langs->trans("ExpandAll") . '</a></div></td>';
print '</tr>';
print '<tr>';
Example #12
0
 if ($action == 'create_thirdparty') {
     $name = $object->getFullName($langs);
     if (!empty($name)) {
         if ($object->morphy == 'mor' && !empty($object->societe)) {
             $name = $object->societe . ' (' . $name . ')';
         } else {
             if ($object->societe) {
                 $name .= ' (' . $object->societe . ')';
             }
         }
     } else {
         $name = $object->societe;
     }
     // Create a form array
     $formquestion = array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
     print $form->formconfirm($_SERVER["PHP_SELF"] . "?rowid=" . $object->id, $langs->trans("CreateDolibarrThirdParty"), $langs->trans("ConfirmCreateThirdParty"), "confirm_create_thirdparty", $formquestion, 1);
 }
 print '<form name="cotisation" method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
 print '<input type="hidden" name="action" value="cotisation">';
 print '<input type="hidden" name="rowid" value="' . $rowid . '">';
 print '<input type="hidden" name="memberlabel" id="memberlabel" value="' . dol_escape_htmltag($object->getFullName($langs)) . '">';
 print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="' . dol_escape_htmltag($object->societe) . '">';
 dol_fiche_head('');
 print "<table class=\"border\" width=\"100%\">\n";
 print '<tbody>';
 $today = dol_now();
 $datefrom = 0;
 $dateto = 0;
 $paymentdate = -1;
 // Date payment
Example #13
0
                                    $textifempty = $section ? $langs->trans("NoFileFound") : ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("ECMSelectASection"));
                                    $formfile->list_of_documents($filearray, '', 'ecm', $param, 1, $relativepath, $user->rights->ecm->upload, 1, $textifempty, $maxlengthname, '', $url);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) {
    if ($section) {
        $param .= ($param ? '?' : '') . preg_replace('/^&/', '', $param);
        require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
        $useglobalvars = 1;
        $form = new Form($db);
        $formquestion = array('urlfile' => array('type' => 'hidden', 'value' => '', 'name' => 'urlfile'));
        print $form->formconfirm($url, $langs->trans("DeleteFile"), $langs->trans("ConfirmDeleteFile"), 'confirm_deletefile', $formquestion, "no", 'deletefile');
        // Enable jquery handlers on new generated HTML objects
        print '<script type="text/javascript">' . "\n";
        print 'jQuery(document).ready(function() {' . "\n";
        print 'jQuery(".deletefilelink").click(function(e) { jQuery("#urlfile").val(jQuery(this).attr("rel")); jQuery("#dialog-confirm-deletefile").dialog("open"); return false; });' . "\n";
        print '});' . "\n";
        print '</script>' . "\n";
    }
}
// Close db if mode is not noajax
if ((!isset($mode) || $mode != 'noajax') && is_object($db)) {
    $db->close();
}
Example #14
0
     $h++;
     $stepoffset++;
 }
 $head[$h][0] = DOL_URL_ROOT . '/exports/export.php?step=4&datatoexport=' . $datatoexport;
 $head[$h][1] = $langs->trans("Step") . " " . (3 + $stepoffset);
 $h++;
 $head[$h][0] = DOL_URL_ROOT . '/exports/export.php?step=5&datatoexport=' . $datatoexport;
 $head[$h][1] = $langs->trans("Step") . " " . (4 + $stepoffset);
 $hselected = $h;
 $h++;
 dol_fiche_head($head, $hselected, $langs->trans("NewExport"));
 /*
  * Confirmation suppression fichier
  */
 if ($action == 'remove_file') {
     print $form->formconfirm($_SERVER["PHP_SELF"] . '?step=5&datatoexport=' . $datatoexport . '&file=' . urlencode(GETPOST("file")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
 }
 print '<table width="100%" class="border">';
 // Module
 print '<tr><td width="25%">' . $langs->trans("Module") . '</td>';
 print '<td>';
 //print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_module[0]->picto).' ';
 print $objexport->array_export_module[0]->getName();
 print '</td></tr>';
 // Lot de donnees a exporter
 print '<tr><td width="25%">' . $langs->trans("DatasetToExport") . '</td>';
 print '<td>';
 $icon = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]);
 print img_object($objexport->array_export_module[0]->getName(), $icon) . ' ';
 print $objexport->array_export_label[0];
 print '</td></tr>';
Example #15
0
     print '</table>';
     dol_fiche_end();
     print '<div align="center">';
     print '<input type="submit" class="button" name="update" value="' . $langs->trans("Modify") . '"> &nbsp; ';
     print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
     print '<div>';
     print '</form>';
 } else {
     /*
      * Fiche tache en mode visu
      */
     $param = $withproject ? '&withproject=1' : '';
     $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
     dol_fiche_head($head, 'task_task', $langs->trans("Task"), 0, 'projecttask');
     if ($action == 'delete') {
         print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $_GET["id"] . '&withproject=' . $withproject, $langs->trans("DeleteATask"), $langs->trans("ConfirmDeleteATask"), "confirm_delete");
     }
     print '<table class="border" width="100%">';
     // Ref
     print '<tr><td width="30%">';
     print $langs->trans("Ref");
     print '</td><td colspan="3">';
     if (!GETPOST('withproject') || empty($projectstatic->id)) {
         $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $mine, 1);
         $object->next_prev_filter = " fk_projet in (" . $projectsListId . ")";
     } else {
         $object->next_prev_filter = " fk_projet = " . $projectstatic->id;
     }
     print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param);
     print '</td>';
     print '</tr>';
Example #16
0
    $account->fetch(0, $soc->id);
} else {
    $account->fetch($id);
}
if (empty($account->socid)) {
    $account->socid = $soc->id;
}
/* ************************************************************************** */
/*                                                                            */
/* Visu et edition                                                            */
/*                                                                            */
/* ************************************************************************** */
if ($socid && $action != 'edit' && $action != "create") {
    // Confirm delete third party
    if ($action == 'delete') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . "?socid=" . $soc->id . "&ribid=" . ($ribid ? $ribid : $id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1);
    }
    print_titre($langs->trans("DefaultRIB"));
    print '<table class="border" width="100%">';
    print '<tr><td>' . $langs->trans("LabelRIB") . '</td>';
    print '<td colspan="4">' . $account->label . '</td></tr>';
    print '<tr><td valign="top" width="35%">' . $langs->trans("BankName") . '</td>';
    print '<td colspan="4">' . $account->bank . '</td></tr>';
    // Show fields of bank account
    $fieldlists = 'BankCode DeskCode AccountNumber BankAccountNumberKey';
    if (!empty($conf->global->BANK_SHOW_ORDER_OPTION)) {
        if (is_numeric($conf->global->BANK_SHOW_ORDER_OPTION)) {
            if ($conf->global->BANK_SHOW_ORDER_OPTION == '1') {
                $fieldlists = 'BankCode DeskCode BankAccountNumberKey AccountNumber';
            }
        } else {
Example #17
0
 */
llxHeader();
$thirdpartystatic = new Societe($db);
$result = $object->fetch($id);
if ($result <= 0) {
    dol_print_error($db, 'Payement ' . $id . ' not found in database');
    exit;
}
$form = new Form($db);
$head = payment_prepare_head($object);
dol_fiche_head($head, 'payment', $langs->trans("PaymentCustomerInvoice"), 0, 'payment');
/*
 * Confirmation de la suppression du paiement
 */
if ($action == 'delete') {
    print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete', '', 0, 2);
}
/*
 * Confirmation de la validation du paiement
 */
if ($action == 'valide') {
    $facid = $_GET['facid'];
    print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;facid=' . $facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide', '', 0, 2);
}
print '<table class="border" width="100%">';
// Ref
print '<tr><td valign="top" width="20%">' . $langs->trans('Ref') . '</td><td colspan="3">' . $object->id . '</td></tr>';
// Date payment
print '<tr><td valign="top">' . $form->editfieldkey("Date", 'datep', $object->date, $object, $user->rights->facture->paiement) . '</td><td colspan="3">';
print $form->editfieldval("Date", 'datep', $object->date, $object, $user->rights->facture->paiement, 'datepicker', '', null, $langs->trans('PaymentDateUpdateSucceeded'));
print '</td></tr>';
     print '<tr><td>' . $langs->trans("DateStart") . '</td><td>';
     print dol_print_date($projectstatic->date_start, 'day');
     print '</td></tr>';
     // Date end
     print '<tr><td>' . $langs->trans("DateEnd") . '</td><td>';
     print dol_print_date($projectstatic->date_end, 'day');
     print '</td></tr>';
     print '</table>';
     dol_fiche_end();
     print '<br>';
 }
 $head = task_prepare_head($object);
 dol_fiche_head($head, 'task_time', $langs->trans("Task"), 0, 'projecttask');
 dol_htmloutput_mesg($mesg);
 if ($action == 'deleteline') {
     print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $object->id . '&lineid=' . $_GET["lineid"] . ($withproject ? '&withproject=1' : ''), $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_delete", '', '', 1);
 }
 print '<table class="border" width="100%">';
 $param = $withproject ? '&withproject=1' : '';
 $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
 // Ref
 print '<tr><td width="30%">';
 print $langs->trans("Ref");
 print '</td><td colspan="3">';
 if (!GETPOST('withproject') || empty($projectstatic->id)) {
     $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $mine, 1);
     $object->next_prev_filter = " fk_projet in (" . $projectsListId . ")";
 } else {
     $object->next_prev_filter = " fk_projet = " . $projectstatic->id;
 }
 print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param);
Example #19
0
    }
    print '</div>';
    print '</form>';
} else {
    /*
     * Show or edit
     */
    $res = $object->fetch_optionals($object->id, $extralabels);
    // To verify role of users
    $userAccess = $object->restrictedProjectArea($user, 'read');
    $userWrite = $object->restrictedProjectArea($user, 'write');
    $userDelete = $object->restrictedProjectArea($user, 'delete');
    //print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
    // Confirmation validation
    if ($action == 'validate') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProject'), $langs->trans('ConfirmValidateProject'), 'confirm_validate', '', 0, 1);
    }
    // Confirmation close
    if ($action == 'close') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $object->id, $langs->trans("CloseAProject"), $langs->trans("ConfirmCloseAProject"), "confirm_close", '', '', 1);
    }
    // Confirmation reopen
    if ($action == 'reopen') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $object->id, $langs->trans("ReOpenAProject"), $langs->trans("ConfirmReOpenAProject"), "confirm_reopen", '', '', 1);
    }
    // Confirmation delete
    if ($action == 'delete') {
        $text = $langs->trans("ConfirmDeleteAProject");
        $task = new Task($db);
        $taskarray = $task->getTasksArray(0, 0, $object->id, 0, 0);
        $nboftask = count($taskarray);
if (empty($action) || $action == 'delete_section') {
    //***********************
    // List
    //***********************
    print_fiche_titre($langs->trans("ECMSectionOfDocuments"));
    print '<br>';
    /*
    	$ecmdir->ref=$ecmdir->label;
    	print $langs->trans("ECMSection").': ';
    	print img_picto('','object_dir').' ';
    	print '<a href="'.DOL_URL_ROOT.'/ecm/docdir.php">'.$langs->trans("ECMRoot").'</a>';
    	//print ' -> <b>'.$ecmdir->getNomUrl(1).'</b><br>';
    	print "<br><br>";
    */
    // Confirmation de la suppression d'une ligne categorie
    if ($action == 'delete_section') {
        print $form->formconfirm($_SERVER["PHP_SELF"] . '?section=' . $section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $ecmdir->label), 'confirm_deletesection');
    }
    // Construit fiche  rubrique
    // Actions buttons
    print '<div class="tabsAction">';
    if ($user->rights->ecm->setup) {
        print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=delete_section">' . $langs->trans('Delete') . '</a>';
    } else {
        print '<a class="butActionRefused" href="#" title="' . $langs->trans("NotAllowed") . '">' . $langs->trans('Delete') . '</a>';
    }
    print '</div>';
}
// End of page
llxFooter();
$db->close();
Example #21
0
     $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
     // Note that $action and $object may have been modified by hook
     print '</table>';
     print '<br><div class="center">';
     print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
     print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
     print '<input type="submit" name="cancel" class="button" value="' . $langs->trans("Cancel") . '">';
     print '</div>';
     print '</form>';
     print '</div>';
 } else {
     /*
      * Confirm delete trip 
      */
     if ($action == 'delete') {
         print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteTrip"), $langs->trans("ConfirmDeleteTrip"), "confirm_delete");
     }
     $soc = new Societe($db);
     if ($object->socid) {
         $soc->fetch($object->socid);
     }
     print '<table class="border" width="100%">';
     $linkback = '<a href="' . DOL_URL_ROOT . '/compta/deplacement/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
     // Ref
     print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td>';
     print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
     print '</td></tr>';
     $form->load_cache_types_fees();
     // Type
     print '<tr><td>';
     print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer, 'select:types_fees');
Example #22
0
 }
 $nbofservices = count($object->lines);
 $author = new User($db);
 $author->fetch($object->user_author_id);
 $commercial_signature = new User($db);
 $commercial_signature->fetch($object->commercial_signature_id);
 $commercial_suivi = new User($db);
 $commercial_suivi->fetch($object->commercial_suivi_id);
 $head = contract_prepare_head($object);
 $hselected = 0;
 dol_fiche_head($head, $hselected, $langs->trans("Contract"), 0, 'contract');
 /*
  * Confirmation de la suppression du contrat
  */
 if ($action == 'delete') {
     print $form->formconfirm($_SERVER['PHP_SELF'] . "?id=" . $object->id, $langs->trans("DeleteAContract"), $langs->trans("ConfirmDeleteAContract"), "confirm_delete", '', 0, 1);
 }
 /*
  * Confirmation de la validation
  */
 if ($action == 'valid') {
     $ref = substr($object->ref, 1, 4);
     if ($ref == 'PROV' && !empty($modCodeContract->code_auto)) {
         $numref = $object->getNextNumRef($object->thirdparty);
     } else {
         $numref = $object->ref;
     }
     $text = $langs->trans('ConfirmValidateContract', $numref);
     print $form->formconfirm($_SERVER['PHP_SELF'] . "?id=" . $object->id, $langs->trans("ValidateAContract"), $text, "confirm_valid", '', 0, 1);
 }
 /*
Example #23
0
 $absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount);
 $absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote);
 $absolute_discount = price2num($absolute_discount, 'MT');
 $absolute_creditnote = price2num($absolute_creditnote, 'MT');
 $author = new User($db);
 if ($object->user_author) {
     $author->fetch($object->user_author);
 }
 $objectidnext = $object->getIdReplacingInvoice();
 $head = facture_prepare_head($object);
 dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), 0, 'bill');
 $formconfirm = '';
 // Confirmation de la conversion de l'avoir en reduc
 if ($action == 'converttoreduc') {
     $text = $langs->trans('ConfirmConvertToReduc');
     $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2);
 }
 // Confirmation to delete invoice
 if ($action == 'delete') {
     $text = $langs->trans('ConfirmDeleteBill', $object->ref);
     $formquestion = array();
     $qualified_for_stock_change = 0;
     if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
         $qualified_for_stock_change = $object->hasProductsOrServices(2);
     } else {
         $qualified_for_stock_change = $object->hasProductsOrServices(1);
     }
     if ($object->type != Facture::TYPE_DEPOSIT && !empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut >= 1) {
         $langs->load("stocks");
         require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
         $formproduct = new FormProduct($db);
/* *************************************************************************** */
/*                                                                             */
/* Mode fiche                                                                  */
/*                                                                             */
/* *************************************************************************** */
if ($id > 0) {
    $object = new ChargeSociales($db);
    $result = $object->fetch($id);
    if ($result > 0) {
        dol_htmloutput_mesg($mesg);
        $head = tax_prepare_head($object);
        dol_fiche_head($head, 'card', $langs->trans("SocialContribution"), 0, 'bill');
        // Confirmation de la suppression de la charge
        if ($action == 'paid') {
            $text = $langs->trans('ConfirmPaySocialContribution');
            print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $object->id, $langs->trans('PaySocialContribution'), $text, "confirm_paid", '', '', 2);
        }
        if ($action == 'delete') {
            $text = $langs->trans('ConfirmDeleteSocialContribution');
            print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('DeleteSocialContribution'), $text, 'confirm_delete', '', '', 2);
        }
        if ($action == 'edit') {
            print "<form name=\"charge\" action=\"charges.php?id={$object->id}&amp;action=update\" method=\"post\">";
            print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
        }
        print '<table class="border" width="100%">';
        // Ref
        print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="2">';
        print $form->showrefnav($object, 'id');
        print "</td></tr>";
        // Label
Example #25
0
} elseif ($type == Categorie::TYPE_CUSTOMER) {
    $title = $langs->trans("CustomersCategoryShort");
} elseif ($type == Categorie::TYPE_MEMBER) {
    $title = $langs->trans("MembersCategoryShort");
} elseif ($type == Categorie::TYPE_CONTACT) {
    $title = $langs->trans("ContactCategoriesShort");
} else {
    $title = $langs->trans("Category");
}
$head = categories_prepare_head($object, $type);
dol_fiche_head($head, 'card', $title, 0, 'category');
/*
 * Confirmation suppression
 */
if ($action == 'delete') {
    print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;type=' . $type, $langs->trans('DeleteCategory'), $langs->trans('ConfirmDeleteCategory'), 'confirm_delete');
}
print '<table border="0" width="100%" class="border">';
// Path of category
print '<tr><td width="20%" class="notopnoleft">';
$ways = $object->print_all_ways();
print $langs->trans("Ref") . '</td><td>';
print '<a href="' . DOL_URL_ROOT . '/categories/index.php?leftmenu=cat&type=' . $type . '">' . $langs->trans("Root") . '</a> >> ';
foreach ($ways as $way) {
    print $way . "<br>\n";
}
print '</td></tr>';
// Description
print '<tr><td class="notopnoleft">';
print $langs->trans("Description") . '</td><td>';
print dol_htmlentitiesbr($object->description);
Example #26
0
 if ($object->id > 0) {
     if (!empty($object->origin)) {
         $typeobject = $object->origin;
         $origin = $object->origin;
         $object->fetch_origin();
     }
     $soc = new Societe($db);
     $soc->fetch($object->socid);
     $res = $object->fetch_optionals($object->id, $extralabels);
     $head = shipping_prepare_head($object);
     dol_fiche_head($head, 'shipping', $langs->trans("Shipment"), 0, 'sending');
     /*
      * Confirmation de la suppression
      */
     if ($action == 'delete') {
         print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('DeleteSending'), $langs->trans("ConfirmDeleteSending", $object->ref), 'confirm_delete', '', 0, 1);
     }
     /*
      * Confirmation de la validation
      */
     if ($action == 'valid') {
         $objectref = substr($object->ref, 1, 4);
         if ($objectref == 'PROV') {
             $numref = $object->getNextNumRef($soc);
         } else {
             $numref = $object->ref;
         }
         $text = $langs->trans("ConfirmValidateSending", $numref);
         if (!empty($conf->notification->enabled)) {
             require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
             $notify = new Notify($db);
Example #27
0
$helptext1 = '';
$helptext2 = '';
$helptext1 .= $langs->trans("ECMAreaDesc");
$helptext1 .= $langs->trans("ECMAreaDesc2");
$helptext2 .= $langs->trans("ECMAreaDesc");
$helptext2 .= $langs->trans("ECMAreaDesc2");
/*
print '<div class="hideonsmartphone">';
print $langs->trans("ECMAreaDesc")."<br>";
print $langs->trans("ECMAreaDesc2")."<br>";
print "<br>\n";
print '</div>';
*/
// Confirm remove file (for non javascript users)
if ($action == 'delete' && empty($conf->use_javascript_ajax)) {
    print $form->formconfirm($_SERVER["PHP_SELF"] . '?section=' . $section . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 1);
}
if (!empty($conf->use_javascript_ajax)) {
    $classviewhide = 'hidden';
} else {
    $classviewhide = 'visible';
}
if (empty($conf->dol_use_jmobile)) {
    $head = ecm_prepare_dasboard_head('');
    dol_fiche_head($head, 'index_auto', '', 1, '');
}
// Start container of all panels
?>
<div id="containerlayout"> <!-- begin div id="containerlayout" -->
<div id="ecm-layout-north" class="toolbar largebutton">
<?php 
Example #28
0
if ($result) {
    $i = 0;
    $total = 0;
    if ($db->num_rows($result)) {
        $objp = $db->fetch_object($result);
        $total = $total + $objp->amount;
        $acct = new Account($db);
        $acct->fetch($objp->fk_account);
        $account = $acct->id;
        $bankline = new AccountLine($db);
        $bankline->fetch($rowid, $ref);
        $links = $acct->get_url($rowid);
        $bankline->load_previous_next_ref('', 'rowid');
        // Confirmations
        if ($action == 'delete_categ') {
            print $form->formconfirm($_SERVER['PHP_SELF'] . "?rowid=" . $rowid . "&cat1=" . GETPOST("fk_categ") . "&orig_account=" . $orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
        }
        print '<form name="update" method="POST" action="' . $_SERVER['PHP_SELF'] . '?rowid=' . $rowid . '">';
        print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
        print '<input type="hidden" name="action" value="update">';
        print '<input type="hidden" name="orig_account" value="' . $orig_account . '">';
        print '<input type="hidden" name="id" value="' . $acct->id . '">';
        print '<table class="border" width="100%">';
        $linkback = '<a href="' . DOL_URL_ROOT . '/compta/bank/search.php">' . $langs->trans("BackToList") . '</a>';
        // Ref
        print '<tr><td width="20%">' . $langs->trans("Ref") . "</td>";
        print '<td colspan="4">';
        print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid');
        print '</td>';
        print '</tr>';
        $i++;
 if ($id) {
     dol_htmloutput_mesg($mesg);
     $object = new Entrepot($db);
     $result = $object->fetch($id);
     if ($result < 0) {
         dol_print_error($db);
     }
     /*
      * Affichage fiche
      */
     if ($action != 'edit' && $action != 're-edit') {
         $head = stock_prepare_head($object);
         dol_fiche_head($head, 'card', $langs->trans("Warehouse"), 0, 'stock');
         // Confirm delete third party
         if ($action == 'delete') {
             print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $object->id, $langs->trans("DeleteAWarehouse"), $langs->trans("ConfirmDeleteWarehouse", $object->libelle), "confirm_delete", '', 0, 2);
         }
         print '<table class="border" width="100%">';
         $linkback = '<a href="' . DOL_URL_ROOT . '/product/stock/liste.php">' . $langs->trans("BackToList") . '</a>';
         // Ref
         print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">';
         print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'libelle');
         print '</td>';
         print '<tr><td>' . $langs->trans("LocationSummary") . '</td><td colspan="3">' . $object->lieu . '</td></tr>';
         // Description
         print '<tr><td valign="top">' . $langs->trans("Description") . '</td><td colspan="3">' . nl2br($object->description) . '</td></tr>';
         // Address
         print '<tr><td>' . $langs->trans('Address') . '</td><td colspan="3">';
         print $object->address;
         print '</td></tr>';
         // Town
Example #30
0
 dol_htmloutput_mesg($mesg, $mesgs);
 $product_static = new Product($db);
 $result = $object->fetch($id, $ref);
 if ($result > 0) {
     $soc = new Societe($db);
     $soc->fetch($object->socid);
     $author = new User($db);
     $author->fetch($object->user_author_id);
     $head = commande_prepare_head($object);
     dol_fiche_head($head, 'order', $langs->trans("CustomerOrder"), 0, 'order');
     $formconfirm = '';
     /*
      * Confirmation de la suppression de la commande
      */
     if ($action == 'delete') {
         $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1);
     }
     /*
      * Confirmation de la validation
      */
     if ($action == 'validate') {
         // on verifie si l'objet est en numerotation provisoire
         $ref = substr($object->ref, 1, 4);
         if ($ref == 'PROV') {
             $numref = $object->getNextNumRef($soc);
         } else {
             $numref = $object->ref;
         }
         $text = $langs->trans('ConfirmValidateOrder', $numref);
         if ($conf->notification->enabled) {
             require_once DOL_DOCUMENT_ROOT . "/core/class/notify.class.php";