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


PHP Commande::hasDelay方法代码示例

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


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

示例1:

             $text_icon = img_picto('', 'error');
             $text_info = $langs->trans('NonShippable') . '<br>' . $text_info;
         }
     }
     print '<td>';
     if ($nbprod) {
         print $form->textwithtooltip('', $text_info, 2, 1, $text_icon, '', 2);
     }
     if ($warning) {
         print $form->textwithtooltip('', $langs->trans('NotEnoughForAllOrders') . '<br>' . $text_warning, 2, 1, img_picto('', 'error'), '', 2);
     }
     print '</td>';
 }
 // Warning late icon
 print '<td class="nobordernopadding nowrap">';
 if ($generic_commande->hasDelay()) {
     print img_picto($langs->trans("Late"), "warning");
 }
 if (!empty($objp->note_private)) {
     print ' <span class="note">';
     print '<a href="' . DOL_URL_ROOT . '/commande/note.php?id=' . $objp->rowid . '">' . img_picto($langs->trans("ViewPrivateNote"), 'object_generic') . '</a>';
     print '</span>';
 }
 print '</td>';
 print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
 $filename = dol_sanitizeFileName($objp->ref);
 $filedir = $conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
 $urlsource = $_SERVER['PHP_SELF'] . '?id=' . $objp->rowid;
 print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir);
 print '</td>';
 print '</tr></table>';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:list.php

示例2: IN

 /**
  *	Load indicators for dashboard (this->nbtodo and this->nbtodolate)
  *
  *	@param		User	$user   Object user
  *	@return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
  */
 function load_board($user)
 {
     global $conf, $user, $langs;
     $clause = " WHERE";
     $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut";
     $sql .= " FROM " . MAIN_DB_PREFIX . "commande as c";
     if (!$user->rights->societe->client->voir && !$user->societe_id) {
         $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_commerciaux as sc ON c.fk_soc = sc.fk_soc";
         $sql .= " WHERE sc.fk_user = " . $user->id;
         $clause = " AND";
     }
     $sql .= $clause . " c.entity IN (" . getEntity('commande', 1) . ")";
     //$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0";
     $sql .= " AND ((c.fk_statut IN (" . self::STATUS_VALIDATED . "," . self::STATUS_ACCEPTED . ")) OR (c.fk_statut = " . self::STATUS_CLOSED . " AND c.facture = 0))";
     // If status is 2 and facture=1, it must be selected
     if ($user->societe_id) {
         $sql .= " AND c.fk_soc = " . $user->societe_id;
     }
     $resql = $this->db->query($sql);
     if ($resql) {
         $response = new WorkboardResponse();
         $response->warning_delay = $conf->commande->client->warning_delay / 60 / 60 / 24;
         $response->label = $langs->trans("OrdersToProcess");
         $response->url = DOL_URL_ROOT . '/commande/list.php?viewstatut=-3';
         $response->img = img_object($langs->trans("Orders"), "order");
         $generic_commande = new Commande($this->db);
         while ($obj = $this->db->fetch_object($resql)) {
             $response->nbtodo++;
             $generic_commande->statut = $obj->fk_statut;
             $generic_commande->date_livraison = $obj->delivery_date;
             if ($generic_commande->hasDelay()) {
                 $response->nbtodolate++;
             }
         }
         return $response;
     } else {
         $this->error = $this->db->error();
         return -1;
     }
 }
开发者ID:Albertopf,项目名称:prueba,代码行数:46,代码来源:commande.class.php


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