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


PHP Contrat::getLibStatut方法代码示例

本文整理汇总了PHP中Contrat::getLibStatut方法的典型用法代码示例。如果您正苦于以下问题:PHP Contrat::getLibStatut方法的具体用法?PHP Contrat::getLibStatut怎么用?PHP Contrat::getLibStatut使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Contrat的用法示例。


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

示例1: while

         $i = 0;
         while ($i < $num && $i < $MAXLIST) {
             $contrat = new Contrat($db);
             $objp = $db->fetch_object($resql);
             $var = !$var;
             print "<tr {$bc[$var]}>";
             print '<td nowrap="nowrap">';
             $contrat->id = $objp->id;
             $contrat->ref = $objp->ref ? $objp->ref : $objp->id;
             print $contrat->getNomUrl(1, 12);
             print "</td>\n";
             print '<td align="right" width="80">' . dol_print_date($db->jdate($objp->dc), 'day') . "</td>\n";
             print '<td width="20">&nbsp;</td>';
             print '<td align="right" nowrap="nowrap">';
             $contrat->fetch_lines();
             print $contrat->getLibStatut(4);
             print "</td>\n";
             print '</tr>';
             $i++;
         }
         $db->free($resql);
     } else {
         dol_print_error($db);
     }
     print "</table>";
 }
 /*
  * Last interventions
  */
 if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) {
     print '<table class="noborder" width="100%">';
开发者ID:netors,项目名称:dolibarr,代码行数:31,代码来源:fiche.php

示例2: loadBox

 /**
  *  Load data for box to show them later
  *
  *  @param	int		$max        Maximum number of records to load
  *  @return	void
  */
 function loadBox($max = 5)
 {
     global $user, $langs, $db, $conf;
     $this->max = $max;
     include_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
     $contractstatic = new Contrat($db);
     $this->info_box_head = array('text' => $langs->trans("BoxTitleLastContracts", $max));
     if ($user->rights->contrat->lire) {
         $sql = "SELECT s.nom, s.rowid as socid,";
         $sql .= " c.rowid, c.ref, c.statut as fk_statut, c.date_contrat, c.datec, c.fin_validite, c.date_cloture";
         $sql .= " FROM " . MAIN_DB_PREFIX . "societe as s, " . MAIN_DB_PREFIX . "contrat as c";
         if (!$user->rights->societe->client->voir && !$user->societe_id) {
             $sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
         }
         $sql .= " WHERE c.fk_soc = s.rowid";
         $sql .= " AND c.entity = " . $conf->entity;
         if (!$user->rights->societe->client->voir && !$user->societe_id) {
             $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . $user->id;
         }
         if ($user->societe_id) {
             $sql .= " AND s.rowid = " . $user->societe_id;
         }
         $sql .= " ORDER BY c.date_contrat DESC, c.ref DESC ";
         $sql .= $db->plimit($max, 0);
         $resql = $db->query($sql);
         if ($resql) {
             $num = $db->num_rows($resql);
             $now = dol_now();
             $i = 0;
             while ($i < $num) {
                 $objp = $db->fetch_object($resql);
                 $datec = $db->jdate($objp->datec);
                 $dateterm = $db->jdate($objp->fin_validite);
                 $dateclose = $db->jdate($objp->date_cloture);
                 $late = '';
                 $contractstatic->statut = $objp->fk_statut;
                 $contractstatic->id = $objp->rowid;
                 $result = $contractstatic->fetch_lines();
                 // fin_validite is no more on contract but on services
                 // if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); }
                 $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => DOL_URL_ROOT . "/contrat/fiche.php?id=" . $objp->rowid);
                 $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->ref ? $objp->ref : $objp->rowid, 'text2' => $late, 'url' => DOL_URL_ROOT . "/contrat/fiche.php?id=" . $objp->rowid);
                 $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', 'url' => DOL_URL_ROOT . "/comm/fiche.php?socid=" . $objp->socid);
                 $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => dol_trunc($objp->nom, 40), 'url' => DOL_URL_ROOT . "/comm/fiche.php?socid=" . $objp->socid);
                 $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec, 'day'));
                 $this->info_box_contents[$i][5] = array('td' => 'align="right" class="nowrap"', 'text' => $contractstatic->getLibStatut(6), 'asis' => 1);
                 $i++;
             }
             if ($num == 0) {
                 $this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoRecordedContracts"));
             }
             $db->free($resql);
         } else {
             $this->info_box_contents[0][0] = array('td' => 'align="left"', 'maxlength' => 500, 'text' => $db->error() . ' sql=' . $sql);
         }
     } else {
         $this->info_box_contents[0][0] = array('td' => 'align="left"', 'text' => $langs->trans("ReadPermissionNotAllowed"));
     }
 }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:65,代码来源:box_contracts.php

示例3: Product

 $documentstatic->paye = $objp->paid;
 if (is_object($documentstaticline)) {
     $documentstaticline->statut = $objp->status;
 }
 $var = !$var;
 print "<tr " . $bc[$var] . ">";
 print '<td class="nobordernopadding nowrap" width="100">';
 print $documentstatic->getNomUrl(1);
 print '</td>';
 print '<td align="center" width="80">' . dol_print_date($db->jdate($objp->dateprint), 'day') . '</td>';
 // Status
 print '<td align="center">';
 if ($type_element == 'contract') {
     print $documentstaticline->getLibStatut(2);
 } else {
     print $documentstatic->getLibStatut(2);
 }
 print '</td>';
 print '<td>';
 // Define text, description and type
 $text = '';
 $description = '';
 $type = 0;
 // Code to show product duplicated from commonobject->printObjectLine
 if ($objp->fk_product > 0) {
     $product_static = new Product($db);
     $product_static->type = $objp->fk_product_type;
     $product_static->id = $objp->fk_product;
     $product_static->ref = $objp->ref;
     $text = $product_static->getNomUrl(1);
 }
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:consumption.php


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