当前位置: 首页>>代码示例>>PHP>>正文


PHP societe_prepare_head函数代码示例

本文整理汇总了PHP中societe_prepare_head函数的典型用法代码示例。如果您正苦于以下问题:PHP societe_prepare_head函数的具体用法?PHP societe_prepare_head怎么用?PHP societe_prepare_head使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了societe_prepare_head函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Form

include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php';
// Must be include, not includ_once
/*
 *	View
 */
$form = new Form($db);
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('', $langs->trans("ThirdParty") . ' - ' . $langs->trans("Notes"), $help_url);
if ($id > 0) {
    /*
     * Affichage onglets
     */
    if (!empty($conf->notification->enabled)) {
        $langs->load("mails");
    }
    $head = societe_prepare_head($object);
    dol_fiche_head($head, 'note', $langs->trans("ThirdParty"), 0, 'company');
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="border" width="100%">';
    print '<tr><td width="25%">' . $langs->trans('ThirdPartyName') . '</td>';
    print '<td colspan="3">';
    print $form->showrefnav($object, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
    print '</td></tr>';
    // Alias names (commercial, trademark or alias names)
    print '<tr><td>' . $langs->trans('AliasNames') . '</td><td colspan="3">';
    print $object->name_alias;
    print "</td></tr>";
    if (!empty($conf->global->SOCIETE_USEPREFIX)) {
        print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
    }
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:note.php

示例2: setEventMessage

    } else {
        setEventMessage($langs->trans('Save'), 'mesgs');
    }
    $action = '';
}
/*
 * View
 */
$form = new Form($db);
$soc = new Societe($db);
$result = $soc->fetch($socid);
llxHeader("", $langs->trans("ThirdParty") . '-' . $langs->trans('PriceByCustomer'));
if (!empty($conf->notification->enabled)) {
    $langs->load("mails");
}
$head = societe_prepare_head($soc);
dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), 0, 'company');
print '<table class="border" width="100%">';
print '<tr><td width="25%">' . $langs->trans("ThirdPartyName") . '</td><td colspan="3">';
print $form->showrefnav($soc, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
print '</td></tr>';
if (!empty($conf->global->SOCIETE_USEPREFIX)) {
    print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $soc->prefix_comm . '</td></tr>';
}
if ($soc->client) {
    print '<tr><td>';
    print $langs->trans('CustomerCode') . '</td><td colspan="3">';
    print $soc->code_client;
    if ($soc->check_codeclient() != 0) {
        print ' <font class="error">(' . $langs->trans("WrongCustomerCode") . ')</font>';
    }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:price.php

示例3: Form

/*
 * View
 */
$form = new Form($db);
llxHeader();
/*********************************************************************************
 *
 * Mode fiche
 *
 *********************************************************************************/
if ($socid > 0) {
    // On recupere les donnees societes par l'objet
    $objsoc = new Societe($db);
    $objsoc->id = $socid;
    $objsoc->fetch($socid);
    $head = societe_prepare_head($objsoc);
    print '<form method="POST" action="remise.php?id=' . $objsoc->id . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="setremise">';
    print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
    dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"), 0, 'company');
    print '<table class="border" width="100%">';
    // Name
    print '<tr><td colspan="2" width="25%">' . $langs->trans('Name') . '</td>';
    print '<td colspan="2">';
    print $form->showrefnav($objsoc, 'id', '', 1, 'rowid', 'nom');
    print '</td></tr>';
    // Remise
    print '<tr><td colspan="2" width="25%">';
    print $langs->trans("CustomerRelativeDiscount") . '</td><td colspan="2">' . price2num($objsoc->remise_percent) . "%</td></tr>";
    print '</table>';
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:remise.php

示例4: getHeadForObject

 static function getHeadForObject($tab_object, $fk_object)
 {
     global $db, $conf, $langs, $user;
     $head = array();
     if (empty($tab_object)) {
         return $head;
     }
     if ($tab_object === 'product') {
         dol_include_once('/product/class/product.class.php');
         dol_include_once('/core/lib/product.lib.php');
         $object = new Product($db);
         $object->fetch($fk_object);
         $head = product_prepare_head($object);
     } else {
         if ($tab_object === 'thirdparty') {
             dol_include_once('/societe/class/societe.class.php');
             dol_include_once('/core/lib/company.lib.php');
             $object = new Societe($db);
             $object->fetch($fk_object);
             $head = societe_prepare_head($object);
         } else {
             if ($tab_object === 'contact') {
                 dol_include_once('/contact/class/contact.class.php');
                 dol_include_once('/core/lib/contact.lib.php');
                 $object = new Contact($db);
                 $object->fetch($fk_object);
                 $head = contact_prepare_head($object);
             } else {
                 if ($tab_object === 'user') {
                     dol_include_once('/user/class/user.class.php');
                     dol_include_once('/core/lib/usergroups.lib.php');
                     $object = new User($db);
                     $object->fetch($fk_object);
                     $head = user_prepare_head($object);
                 } else {
                     if ($tab_object === 'group') {
                         dol_include_once('/user/class/usergroup.class.php');
                         dol_include_once('/lib/usergroups.lib.php');
                         $object = new UserGroup($db);
                         $object->fetch($fk_object);
                         $head = group_prepare_head($object);
                     } else {
                         if ($tab_object === 'project') {
                             dol_include_once('/projet/class/project.class.php');
                             dol_include_once('/core/lib/project.lib.php');
                             $object = new Project($db);
                             $object->fetch($fk_object);
                             $head = project_prepare_head($object);
                         }
                     }
                 }
             }
         }
     }
     return $head;
 }
开发者ID:ATM-Consulting,项目名称:dolibarr_module_query,代码行数:56,代码来源:query.class.php

示例5: assign_values


//.........这里部分代码省略.........
            } else {
                $this->tpl['select_state'] = $countrynotdefined;
            }
            // Language
            if (!empty($conf->global->MAIN_MULTILANGS)) {
                $this->tpl['select_lang'] = $formadmin->select_language($this->object->default_lang ? $this->object->default_lang : $conf->global->MAIN_LANG_DEFAULT, 'default_lang', 0, 0, 1);
            }
            // VAT
            $this->tpl['yn_assujtva'] = $form->selectyesno('assujtva_value', $this->tpl['tva_assuj'], 1);
            // Assujeti par defaut en creation
            // Select users
            $this->tpl['select_users'] = $form->select_dolusers($this->object->commercial_id, 'commercial_id', 1);
            // Local Tax
            // TODO mettre dans une classe propre au pays
            if ($mysoc->country_code == 'ES') {
                $this->tpl['localtax'] = '';
                if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
                    $this->tpl['localtax'] .= '<tr><td>' . $langs->trans("LocalTax1IsUsedES") . '</td><td>';
                    $this->tpl['localtax'] .= $form->selectyesno('localtax1assuj_value', $this->object->localtax1_assuj, 1);
                    $this->tpl['localtax'] .= '</td><td>' . $langs->trans("LocalTax2IsUsedES") . '</td><td>';
                    $this->tpl['localtax'] .= $form->selectyesno('localtax2assuj_value', $this->object->localtax1_assuj, 1);
                    $this->tpl['localtax'] .= '</td></tr>';
                } elseif ($mysoc->localtax1_assuj == "1") {
                    $this->tpl['localtax'] .= '<tr><td>' . $langs->trans("LocalTax1IsUsedES") . '</td><td colspan="3">';
                    $this->tpl['localtax'] .= $form->selectyesno('localtax1assuj_value', $this->object->localtax1_assuj, 1);
                    $this->tpl['localtax'] .= '</td><tr>';
                } elseif ($mysoc->localtax2_assuj == "1") {
                    $this->tpl['localtax'] .= '<tr><td>' . $langs->trans("LocalTax2IsUsedES") . '</td><td colspan="3">';
                    $this->tpl['localtax'] .= $form->selectyesno('localtax2assuj_value', $this->object->localtax1_assuj, 1);
                    $this->tpl['localtax'] .= '</td><tr>';
                }
            }
        } else {
            $head = societe_prepare_head($this->object);
            $this->tpl['showhead'] = dol_get_fiche_head($head, 'card', '', 0, 'company');
            $this->tpl['showend'] = dol_get_fiche_end();
            $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
            $this->tpl['checkcustomercode'] = $this->object->check_codeclient();
            $this->tpl['checksuppliercode'] = $this->object->check_codefournisseur();
            $this->tpl['address'] = dol_nl2br($this->object->address);
            $img = picto_from_langcode($this->object->country_code);
            if ($this->object->isInEEC()) {
                $this->tpl['country'] = $form->textwithpicto(($img ? $img . ' ' : '') . $this->object->country, $langs->trans("CountryIsInEEC"), 1, 0);
            }
            $this->tpl['country'] = ($img ? $img . ' ' : '') . $this->object->country;
            $this->tpl['phone'] = dol_print_phone($this->object->phone, $this->object->country_code, 0, $this->object->id, 'AC_TEL');
            $this->tpl['fax'] = dol_print_phone($this->object->fax, $this->object->country_code, 0, $this->object->id, 'AC_FAX');
            $this->tpl['email'] = dol_print_email($this->object->email, 0, $this->object->id, 'AC_EMAIL');
            $this->tpl['url'] = dol_print_url($this->object->url);
            $this->tpl['tva_assuj'] = yn($this->object->tva_assuj);
            // Third party type
            $arr = $formcompany->typent_array(1);
            $this->tpl['typent'] = $arr[$this->object->typent_code];
            if (!empty($conf->global->MAIN_MULTILANGS)) {
                require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
                //$s=picto_from_langcode($this->default_lang);
                //print ($s?$s.' ':'');
                $langs->load("languages");
                $this->tpl['default_lang'] = $this->default_lang ? $langs->trans('Language_' . $this->object->default_lang) : '';
            }
            $this->tpl['image_edit'] = img_edit();
            $this->tpl['display_rib'] = $this->object->display_rib();
            // Sales representatives
            $this->tpl['sales_representatives'] = '';
            $listsalesrepresentatives = $this->object->getSalesRepresentatives($user);
            $nbofsalesrepresentative = count($listsalesrepresentatives);
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:67,代码来源:actions_card_common.class.php

示例6: dol_fiche_end

         // Title
         print '<tr><td>' . $langs->trans("Title") . '</td><td colspan="3">' . $act->label . '</td></tr>';
         print '</table>';
         dol_fiche_end();
     }
 }
 /*
  * Specific to thirdparty module
  */
 if ($element_id && $element == 'societe') {
     $socstatic = fetchObjectByElement($element_id, $element);
     if (is_object($socstatic)) {
         $savobject = $object;
         $object = $socstatic;
         require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
         $head = societe_prepare_head($socstatic);
         dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), 0, 'company');
         dol_banner_tab($socstatic, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
         print '<div class="fichecenter">';
         print '<div class="underbanner clearboth"></div>';
         print '<table class="border" width="100%">';
         // Alias name (commercial, trademark or alias name)
         print '<tr><td class="titelfield">' . $langs->trans('AliasNames') . '</td><td colspan="3">';
         print $socstatic->name_alias;
         print "</td></tr>";
         print '</table>';
         print '</div>';
         dol_fiche_end();
         $object = $savobject;
     }
 }
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:element_resource.php


注:本文中的societe_prepare_head函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。