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


PHP FactureFournisseur::hasDelay方法代码示例

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


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

示例1: WorkboardResponse

 /**
  *	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, $langs;
     $sql = 'SELECT ff.rowid, ff.date_lim_reglement as datefin, ff.fk_statut';
     $sql .= ' FROM ' . MAIN_DB_PREFIX . 'facture_fourn as ff';
     if (!$user->rights->societe->client->voir && !$user->societe_id) {
         $sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
     }
     $sql .= ' WHERE ff.paye=0';
     $sql .= ' AND ff.fk_statut > 0';
     $sql .= " AND ff.entity = " . $conf->entity;
     if ($user->societe_id) {
         $sql .= ' AND ff.fk_soc = ' . $user->societe_id;
     }
     if (!$user->rights->societe->client->voir && !$user->societe_id) {
         $sql .= " AND ff.fk_soc = sc.fk_soc AND sc.fk_user = " . $user->id;
     }
     $resql = $this->db->query($sql);
     if ($resql) {
         $langs->load("bills");
         $now = dol_now();
         $response = new WorkboardResponse();
         $response->warning_delay = $conf->facture->fournisseur->warning_delay / 60 / 60 / 24;
         $response->label = $langs->trans("SupplierBillsToPay");
         $response->url = DOL_URL_ROOT . '/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0';
         $response->img = img_object($langs->trans("Bills"), "bill");
         $facturestatic = new FactureFournisseur($this->db);
         while ($obj = $this->db->fetch_object($resql)) {
             $response->nbtodo++;
             $facturestatic->date_echeance = $this->db->jdate($obj->datefin);
             $facturestatic->statut = $obj->fk_statut;
             if ($facturestatic->hasDelay()) {
                 $response->nbtodolate++;
             }
         }
         $this->db->free($resql);
         return $response;
     } else {
         dol_print_error($this->db);
         $this->error = $this->db->error();
         return -1;
     }
 }
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:49,代码来源:fournisseur.facture.class.php

示例2: while

 while ($i < $num) {
     $objp = $db->fetch_object($resql);
     $facturestatic->statut = $objp->fk_statut;
     $facturestatic->date_echeance = $db->jdate($objp->datelimite);
     $var = !$var;
     print "<tr " . $bc[$var] . ">";
     $classname = "impayee";
     print '<td class="nowrap">';
     $facturestatic->id = $objp->facid;
     $facturestatic->ref = $objp->ref;
     print $facturestatic->getNomUrl(1);
     print "</td>\n";
     print '<td class="nowrap">' . dol_trunc($objp->ref_supplier, 12) . '</td>';
     print '<td class="nowrap" align="center">' . dol_print_date($db->jdate($objp->df), 'day') . "</td>\n";
     print '<td class="nowrap" align="center">' . dol_print_date($db->jdate($objp->datelimite), 'day');
     if ($facturestatic->hasDelay()) {
         print img_warning($langs->trans("Late"));
     }
     print "</td>\n";
     print '<td>';
     $companystatic->id = $objp->socid;
     $companystatic->name = $objp->name;
     print $companystatic->getNomUrl(1, 'supplier', 32);
     print '</td>';
     print "<td align=\"right\">" . price($objp->total_ht) . "</td>";
     print "<td align=\"right\">" . price($objp->total_ttc) . "</td>";
     print "<td align=\"right\">" . price($objp->am) . "</td>";
     // Show invoice status
     print '<td align="right" class="nowrap">';
     print $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 5, $objp->am);
     print '</td>';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:impayees.php

示例3: loadBox

 /**
  *  Load data into info_box_contents array to show array later.
  *
  *  @param	int		$max        Maximum number of records to load
  *  @return	void
  */
 function loadBox($max = 5)
 {
     global $conf, $user, $langs, $db;
     $this->max = $max;
     include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
     $facturestatic = new FactureFournisseur($db);
     include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.class.php';
     $thirdpartytmp = new Fournisseur($db);
     $this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpaidSupplierBills", $max));
     if ($user->rights->fournisseur->facture->lire) {
         $sql = "SELECT s.nom as name, s.rowid as socid,";
         $sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.date_lim_reglement as datelimite,";
         $sql .= " f.amount, f.datef as df,";
         $sql .= " f.total_ht as total_ht,";
         $sql .= " f.tva as total_tva,";
         $sql .= " f.total_ttc,";
         $sql .= " f.paye, f.fk_statut, f.type";
         $sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
         $sql .= "," . MAIN_DB_PREFIX . "facture_fourn as f";
         if (!$user->rights->societe->client->voir && !$user->societe_id) {
             $sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
         }
         $sql .= " WHERE f.fk_soc = s.rowid";
         $sql .= " AND f.entity = " . $conf->entity;
         $sql .= " AND f.paye=0";
         $sql .= " AND fk_statut = 1";
         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 datelimite DESC, f.ref_supplier DESC ";
         $sql .= $db->plimit($max, 0);
         $result = $db->query($sql);
         if ($result) {
             $num = $db->num_rows($result);
             $line = 0;
             $l_due_date = $langs->trans('Late') . ' (' . $langs->trans('DateEcheance') . ': %s)';
             $facturestatic = new FactureFournisseur($db);
             while ($line < $num) {
                 $objp = $db->fetch_object($result);
                 $datelimite = $db->jdate($objp->datelimite);
                 $date = $db->jdate($objp->df);
                 $datem = $db->jdate($objp->tms);
                 $facturestatic->id = $objp->facid;
                 $facturestatic->ref = $objp->ref;
                 $facturestatic->total_ht = $objp->total_ht;
                 $facturestatic->total_tva = $objp->total_tva;
                 $facturestatic->total_ttc = $objp->total_ttc;
                 $facturestatic->date_echeance = $datelimite;
                 $facturestatic->statut = $objp->fk_statut;
                 $thirdpartytmp->id = $objp->socid;
                 $thirdpartytmp->name = $objp->name;
                 $thirdpartytmp->fournisseur = 1;
                 $thirdpartytmp->code_fournisseur = $objp->code_fournisseur;
                 $thirdpartytmp->logo = $objp->logo;
                 $late = '';
                 if ($facturestatic->hasDelay()) {
                     $late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day')));
                 }
                 $tooltip = $langs->trans('SupplierInvoice') . ': ' . ($objp->ref ? $objp->ref : $objp->facid) . '<br>' . $langs->trans('RefSupplier') . ': ' . $objp->ref_supplier;
                 $this->info_box_contents[$line][] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'tooltip' => $tooltip, 'url' => DOL_URL_ROOT . "/fourn/facture/card.php?facid=" . $objp->facid);
                 $this->info_box_contents[$line][] = array('td' => 'align="left"', 'text' => $facturestatic->getNomUrl(1), 'text2' => $late, 'asisi' => 1);
                 $this->info_box_contents[$line][] = array('td' => 'align="left"', 'text' => $thirdpartytmp->getNomUrl(1, '', 40), 'asis' => 1);
                 $this->info_box_contents[$line][] = array('td' => 'align="right"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency));
                 $this->info_box_contents[$line][] = array('td' => 'align="right"', 'text' => dol_print_date($datelimite, 'day'));
                 $fac = new FactureFournisseur($db);
                 $fac->fetch($objp->facid);
                 $alreadypaid = $fac->getSommePaiement();
                 $this->info_box_contents[$line][] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 3, $alreadypaid, $objp->type));
                 $line++;
             }
             if ($num == 0) {
                 $this->info_box_contents[$line][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoUnpaidSupplierBills"));
             }
             $db->free($result);
         } 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:Samara94,项目名称:dolibarr,代码行数:90,代码来源:box_factures_fourn_imp.php


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