本文整理汇总了PHP中dol_print_date函数的典型用法代码示例。如果您正苦于以下问题:PHP dol_print_date函数的具体用法?PHP dol_print_date怎么用?PHP dol_print_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dol_print_date函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: select_bookkeeping_importkey
/**
* Return select filter with date of transaction
*
* @param string $htmlname Name of select field
* @param string $selectedkey Value
* @return string HTML edit field
*/
function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '')
{
$sql = 'SELECT DISTINCT import_key from ' . MAIN_DB_PREFIX . 'accounting_bookkeeping';
$sql .= ' ORDER BY import_key DESC';
$out = '<SELECT name="' . $htmlname . '">';
dol_syslog(get_class($this) . "::select_bookkeeping_importkey sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$i = 0;
$num = $this->db->num_rows($resql);
while ($i < $num) {
$obj = $this->db->fetch_object($resql);
$selected = '';
if ($selectedkey == $obj->import_key) {
$selected = ' selected ';
}
$out .= '<OPTION value="' . $obj->import_key . '"' . $selected . '>' . dol_print_date($obj->import_key, 'dayhourtext') . '</OPTION>';
$i++;
}
} else {
$this->error = "Error " . $this->db->lasterror();
dol_syslog(get_class($this) . "::select_bookkeeping_importkey " . $this->error, LOG_ERR);
return -1;
}
$out .= '</SELECT>';
return $out;
}
示例2: report_header
/**
* Show header of a VAT report
* @param nom Name of report
* @param variante Link for alternate report
* @param period Period of report
* @param periodlink Link to switch period
* @param description Description
* @param builddate Date generation
* @param exportlink Link for export or ''
*/
function report_header($nom,$variante='',$period,$periodlink,$description,$builddate,$exportlink='')
{
global $langs;
print "\n\n<!-- debut cartouche rapport -->\n";
$h=0;
$head[$h][0] = $_SERVER["PHP_SELF"];
$head[$h][1] = $langs->trans("Report");
dol_fiche_head($head, $hselected, $societe->nom);
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<table width="100%" class="border">';
// Ligne de titre
print '<tr>';
print '<td valign="top" width="110">'.$langs->trans("ReportName").'</td>';
if (! $variante) print '<td colspan="3">';
else print '<td>';
print $nom;
if ($variante) print '</td><td colspan="2">'.$variante;
print '</td>';
print '</tr>';
// Ligne de la periode d'analyse du rapport
print '<tr>';
print '<td>'.$langs->trans("ReportPeriod").'</td>';
if (! $periodlink) print '<td colspan="3">';
else print '<td>';
if ($period) print $period;
if ($periodlink) print '</td><td colspan="2">'.$periodlink;
print '</td>';
print '</tr>';
// Ligne de description
print '<tr>';
print '<td valign="top">'.$langs->trans("ReportDescription").'</td>';
print '<td colspan="3">'.$description.'</td>';
print '</tr>';
// Ligne d'export
print '<tr>';
print '<td>'.$langs->trans("GeneratedOn").'</td>';
if (! $exportlink) print '<td colspan="3">';
else print '<td>';
print dol_print_date($builddate);
if ($exportlink) print '</td><td>'.$langs->trans("Export").'</td><td>'.$exportlink;
print '</td></tr>';
print '<tr>';
print '<td colspan="4" align="center"><input type="submit" class="button" name="submit" value="'.$langs->trans("Refresh").'"></td>';
print '</tr>';
print '</table>';
print '</form>';
print '</div>';
print "\n<!-- fin cartouche rapport -->\n\n";
}
示例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;
$langs->load("boxes");
$this->max = $max;
include_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
$thirdpartystatic = new Societe($db);
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.class.php';
$thirdpartytmp = new Fournisseur($db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedSuppliers", $max));
if ($user->rights->societe->lire) {
$sql = "SELECT s.nom as name, s.rowid as socid, s.datec, s.tms, s.status,";
$sql .= " s.code_fournisseur,";
$sql .= " s.logo";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
if (!$user->rights->societe->client->voir && !$user->societe_id) {
$sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
}
$sql .= " WHERE s.fournisseur = 1";
$sql .= " AND s.entity IN (" . getEntity('societe', 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 s.tms DESC ";
$sql .= $db->plimit($max, 0);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
$line = 0;
while ($line < $num) {
$objp = $db->fetch_object($result);
$datec = $db->jdate($objp->datec);
$datem = $db->jdate($objp->tms);
$thirdpartytmp->id = $objp->socid;
$thirdpartytmp->name = $objp->name;
$thirdpartytmp->code_client = $objp->code_client;
$thirdpartytmp->logo = $objp->logo;
$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' => dol_print_date($datem, "day"));
$this->info_box_contents[$line][] = array('td' => 'align="right" width="18"', 'text' => $thirdpartystatic->LibStatut($objp->status, 3));
$line++;
}
if ($num == 0) {
$this->info_box_contents[$line][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoRecordedSuppliers"));
}
$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"));
}
}
示例4: 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;
$langs->load("boxes");
$this->max = $max;
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
$supplierorderstatic = new CommandeFournisseur($db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleLatestSupplierOrders", $max));
if ($user->rights->fournisseur->commande->lire) {
$sql = "SELECT s.nom, s.rowid as socid,";
$sql .= " c.ref, c.tms, c.rowid,";
$sql .= " c.fk_statut";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
$sql .= ", " . MAIN_DB_PREFIX . "commande_fournisseur 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_commande DESC, c.ref DESC ";
$sql .= $db->plimit($max, 0);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
$i = 0;
while ($i < $num) {
$objp = $db->fetch_object($result);
$datem = $db->jdate($objp->tms);
$urlo = DOL_URL_ROOT . "/fourn/commande/fiche.php?id=" . $objp->rowid;
$urls = DOL_URL_ROOT . "/fourn/fiche.php?socid=" . $objp->socid;
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => $urlo);
$this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->ref, 'url' => $urlo);
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', 'url' => $urls);
$this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'url' => $urls);
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datem, 'day'));
$this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $supplierorderstatic->LibStatut($objp->fk_statut, 3));
$i++;
}
if ($num == 0) {
$this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoSupplierOrder"));
}
$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"));
}
}
示例5: select_element
/**
* Build Select List of element associable to a businesscase
*
* @param string $tablename To parse
* @param Lead $lead The lead
* @param string $htmlname Name of the component
*
* @return string HTML select list of element
*/
function select_element($tablename, $lead, $htmlname = 'elementselect')
{
global $langs, $conf;
switch ($tablename) {
case "facture":
$sql = "SELECT rowid, facnumber as ref, total as total_ht, date_valid as date_element";
break;
case "contrat":
$sql = "SELECT rowid, ref as ref, 0 as total_ht, date_contrat as date_element";
break;
case "commande":
$sql = "SELECT rowid, ref as ref, total_ht as total_ht, date_commande as date_element";
break;
default:
$sql = "SELECT rowid, ref, total_ht, datep as date_element";
break;
}
$sql .= " FROM " . MAIN_DB_PREFIX . $tablename;
//TODO Fix sourcetype can be different from tablename (exemple project/projet)
$sql .= " WHERE rowid NOT IN (SELECT fk_source FROM " . MAIN_DB_PREFIX . "element_element WHERE targettype='" . $lead->element . "' AND sourcetype='" . $tablename . "')";
// Manage filter
/*if (count($filter) > 0) {
foreach ( $filter as $key => $value ) {
if (($key == 's.fk_session_place') || ($key == 'f.rowid') || ($key == 's.type_session') || ($key == 's.status') || ($key == 'sale.fk_user_com')) {
$sql .= ' AND ' . $key . ' = ' . $value;
} else {
$sql .= ' AND ' . $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
}
}
}*/
$sql .= " AND fk_soc=" . $lead->fk_soc;
$sql .= " AND entity=" . $conf->entity;
// $sql.= " AND entity IN (".getEntity($object->element,1).")";
$sql .= " ORDER BY ref DESC";
dol_syslog(get_class($this) . "::select_element sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
$i = 0;
if ($num > 0) {
$sellist = '<select class="flat" name="' . $htmlname . '">';
while ($i < $num) {
$obj = $this->db->fetch_object($resql);
$sellist .= '<option value="' . $obj->rowid . '">' . $obj->ref . ' (' . dol_print_date($this->db->jdate($obj->date_element), 'daytextshort') . ')';
$sellist .= (empty($obj->total_ht) ? '' : '-' . price($obj->total_ht) . $langs->getCurrencySymbol($conf->currency)) . '</option>';
$i++;
}
$sellist .= '</select>';
}
return $sellist;
}
$this->db->free($resql);
return null;
}
示例6: add_to_target
/**
* This is the main function that returns the array of emails.
*
* @param int $mailing_id Id of mailing. No need to use it.
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
* @return int <0 if error, number of emails added if ok
*/
function add_to_target($mailing_id, $filtersarray = array())
{
global $conf, $langs;
$langs->load("members");
$langs->load("companies");
$cibles = array();
// Select the members from category
$sql = "SELECT a.rowid as id, a.email as email, a.lastname, null as fk_contact, a.firstname,";
$sql .= " a.datefin, a.civilite as civility_id, a.login, a.societe,";
// Other fields
if ($_POST['filter']) {
$sql .= " c.label";
} else {
$sql .= " null as label";
}
$sql .= " FROM " . MAIN_DB_PREFIX . "adherent as a";
if ($_POST['filter']) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "categorie_member as cm ON cm.fk_member = a.rowid";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "categorie as c ON c.rowid = cm.fk_categorie";
}
$sql .= " WHERE a.email != ''";
$sql .= " AND a.entity = " . $conf->entity;
if ($_POST['filter']) {
$sql .= " AND c.rowid='" . $_POST['filter'] . "'";
}
$sql .= " ORDER BY a.email";
// Stocke destinataires dans cibles
$result = $this->db->query($sql);
if ($result) {
$num = $this->db->num_rows($result);
$i = 0;
$j = 0;
dol_syslog(get_class($this) . "::add_to_target mailing " . $num . " targets found");
$old = '';
while ($i < $num) {
$obj = $this->db->fetch_object($result);
if ($old != $obj->email) {
$cibles[$j] = array('email' => $obj->email, 'fk_contact' => $obj->fk_contact, 'lastname' => $obj->lastname, 'firstname' => $obj->firstname, 'other' => $langs->transnoentities("Login") . '=' . $obj->login . ';' . ($langs->transnoentities("UserTitle") . '=' . ($obj->civility_id ? $langs->transnoentities("Civility" . $obj->civility_id) : '')) . ';' . ($langs->transnoentities("DateEnd") . '=' . dol_print_date($this->db->jdate($obj->datefin), 'day')) . ';' . ($langs->transnoentities("Company") . '=' . $obj->societe) . ';' . ($obj->label ? $langs->transnoentities("Category") . '=' . $obj->label : ''), 'source_url' => $this->url($obj->id), 'source_id' => $obj->id, 'source_type' => 'member');
$old = $obj->email;
$j++;
}
$i++;
}
} else {
dol_syslog($this->db->error());
$this->error = $this->db->error();
return -1;
}
return parent::add_to_target($mailing_id, $cibles);
}
示例7: 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 $user, $langs, $db, $conf;
$langs->load("boxes");
$this->max = $max;
include_once DOL_DOCUMENT_ROOT . "/adherents/class/adherent.class.php";
$memberstatic = new Adherent($db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedMembers", $max));
if ($user->rights->societe->lire) {
$sql = "SELECT a.rowid, a.nom as lastname, a.prenom as firstname, a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,";
$sql .= " t.cotisation";
$sql .= " FROM " . MAIN_DB_PREFIX . "adherent as a, " . MAIN_DB_PREFIX . "adherent_type as t";
$sql .= " WHERE a.entity = " . $conf->entity;
$sql .= " AND a.fk_adherent_type = t.rowid";
$sql .= " ORDER BY a.tms DESC";
$sql .= $db->plimit($max, 0);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
$i = 0;
while ($i < $num) {
$objp = $db->fetch_object($result);
$datec = $db->jdate($objp->datec);
$datem = $db->jdate($objp->tms);
$memberstatic->lastname = $objp->lastname;
$memberstatic->firstname = $objp->firstname;
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => DOL_URL_ROOT . "/adherents/fiche.php?rowid=" . $objp->rowid);
$this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $memberstatic->getFullName($langs), 'url' => DOL_URL_ROOT . "/adherents/fiche.php?rowid=" . $objp->rowid);
$this->info_box_contents[$i][2] = array('td' => 'align="right"', 'text' => dol_print_date($datem, "day"));
$this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', 'text' => $memberstatic->LibStatut($objp->status, $objp->cotisation, $db->jdate($objp->date_end_subscription), 3));
$i++;
}
if ($num == 0) {
$this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoRecordedCustomers"));
}
} 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('align' => 'left', 'text' => $langs->trans("ReadPermissionNotAllowed"));
}
}
示例8: makeSubstitution
/**
* Make substitution
*
* @param $object Adherent Object
* @return string Value of input text string with substitutions done
*/
function makeSubstitution($object)
{
global $conf, $langs;
$text = $this->body;
$birthday = dol_print_date($object->naiss, 'day');
$msgishtml = 0;
if (dol_textishtml($text, 1)) {
$msgishtml = 1;
}
$infos = '';
// Specific for Photo
$photoName = $object->photo;
$photoType = $object->_attachments->{$photoName}->content_type;
$photoBase64 = $object->getFileBase64($object->photo);
$photo = '<img src="data:' . $PhotoType . ';base64,' . $photoBase64 . '"/>';
// Substitutions
$substitutionarray = array('__DOL_MAIN_URL_ROOT__' => DOL_MAIN_URL_ROOT, '__ID__' => $msgishtml ? dol_htmlentitiesbr($object->login) : $object->login, '__CIVILITE__' => $object->getCivilityLabel($msgishtml ? 0 : 1), '__FIRSTNAME__' => $msgishtml ? dol_htmlentitiesbr($object->Firstname) : $object->Firstname, '__LASTNAME__' => $msgishtml ? dol_htmlentitiesbr($object->Lastname) : $object->Lastname, '__FULLNAME__' => $msgishtml ? dol_htmlentitiesbr($object->getFullName($langs)) : $object->getFullName($langs), '__COMPANY__' => $msgishtml ? dol_htmlentitiesbr($object->societe) : $object->societe, '__ADDRESS__' => $msgishtml ? dol_htmlentitiesbr($object->address) : $object->address, '__ZIP__' => $msgishtml ? dol_htmlentitiesbr($object->zip) : $object->zip, '__TOWN__' => $msgishtml ? dol_htmlentitiesbr($object->town) : $object->town, '__COUNTRY__' => $msgishtml ? dol_htmlentitiesbr($object->country) : $object->country, '__EMAIL__' => $msgishtml ? dol_htmlentitiesbr($object->email) : $object->email, '__NAISS__' => $msgishtml ? dol_htmlentitiesbr($birthday) : $birthday, '__PHOTO__' => $photo, '__LOGIN__' => $msgishtml ? dol_htmlentitiesbr($object->login) : $object->login, '__PASSWORD__' => $msgishtml ? dol_htmlentitiesbr($object->pass) : $object->pass, '__STATUS__' => $object->getLibStatus(), '__INFOS__' => $msgishtml ? dol_htmlentitiesbr($infos) : $infos, '__PRENOM__' => $msgishtml ? dol_htmlentitiesbr($object->Firstname) : $object->Firstname, '__NOM__' => $msgishtml ? dol_htmlentitiesbr($object->Lastname) : $object->Lastname, '__SOCIETE__' => $msgishtml ? dol_htmlentitiesbr($object->societe) : $object->societe, '__ADRESSE__' => $msgishtml ? dol_htmlentitiesbr($object->address) : $object->address, '__CP__' => $msgishtml ? dol_htmlentitiesbr($object->zip) : $object->zip, '__VILLE__' => $msgishtml ? dol_htmlentitiesbr($object->town) : $object->town, '__PAYS__' => $msgishtml ? dol_htmlentitiesbr($object->country) : $object->country);
complete_substitutions_array($substitutionarray, $langs);
$this->body = make_substitutions($text, $substitutionarray);
return 1;
}
示例9: _comments
function _comments($id, $ref, $element)
{
$element_tag = TTwiiit::getTag($element, $ref);
$PDOdb = new TPDOdb();
$r = '';
$Tab = $PDOdb->ExecuteAsArray("SELECT DISTINCT t.rowid\n\tFROM " . MAIN_DB_PREFIX . "twiiit t \n\t WHERE (t.fk_object=" . (int) $id . " AND t.type_object='" . $element . "') OR (t.comment LIKE '%" . $element_tag . "%')\n\t ORDER BY t.date_cre DESC");
foreach ($Tab as &$row) {
$twiiit = new TTwiiit();
$twiiit->load($PDOdb, $row->rowid);
$r .= '<div class="comm">';
if ($id != $twiiit->fk_object || $element != $twiiit->type_object) {
$origin_element = $twiiit->getNomUrl();
if (!empty($origin_element)) {
$r .= '<div class="object">' . $origin_element . '</div> ';
}
}
$r .= $twiiit->getComment();
$r .= '<div class="date">' . dol_print_date($twiiit->date_cre, 'dayhourtextshort') . '</div>';
$r .= '</div>';
}
return $r;
}
示例10: empty
print empty($calcproducts['value']) ? '0' : $calcproducts['value'];
print "</td></tr>";
// Last movement
$sql = "SELECT max(m.datem) as datem";
$sql .= " FROM " . MAIN_DB_PREFIX . "stock_mouvement as m";
$sql .= " WHERE m.fk_entrepot = '" . $object->id . "'";
$resqlbis = $db->query($sql);
if ($resqlbis) {
$obj = $db->fetch_object($resqlbis);
$lastmovementdate = $db->jdate($obj->datem);
} else {
dol_print_error($db);
}
print '<tr><td valign="top">' . $langs->trans("LastMovement") . '</td><td colspan="3">';
if ($lastmovementdate) {
print dol_print_date($lastmovementdate, 'dayhour') . ' ';
print '(<a href="' . DOL_URL_ROOT . '/product/stock/mouvement.php?id=' . $object->id . '">' . $langs->trans("FullList") . '</a>)';
} else {
print $langs->trans("None");
}
print "</td></tr>";
print "</table>";
print '</div>';
/* ************************************************************************** */
/* */
/* Barre d'action */
/* */
/* ************************************************************************** */
print "<div class=\"tabsAction\">\n";
$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
示例11: Entrepot
}
// Ref client
print '<tr><td>'.$langs->trans("RefCustomer").'</td>';
print '<td colspan="3">'.$delivery->ref_customer."</a></td>\n";
print '</tr>';
// Date
print '<tr><td>'.$langs->trans("DateCreation").'</td>';
print '<td colspan="3">'.dol_print_date($delivery->date_creation,'daytext')."</td>\n";
print '</tr>';
// Date delivery real / Received
// TODO Can edit this date, even if delivery validated.
print '<tr><td>'.$langs->trans("DateReceived").'</td>';
print '<td colspan="3">'.dol_print_date($delivery->date_delivery,'daytext')."</td>\n";
print '</tr>';
// Statut
print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td colspan="3">'.$delivery->getLibStatut(4)."</td>\n";
print '</tr>';
if (!$conf->expedition_bon->enabled && $conf->stock->enabled)
{
// Entrepot
$entrepot = new Entrepot($db);
$entrepot->fetch($delivery->entrepot_id);
print '<tr><td width="20%">'.$langs->trans("Warehouse").'</td>';
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/product/stock/fiche.php?id='.$entrepot->id.'">'.$entrepot->libelle.'</a></td>';
print '</tr>';
示例12: _pagehead
/**
* \brief Show header of page
* \param pdf Object PDF
* \param object Object invoice
* \param showadress 0=no, 1=yes
* \param outputlangs Object lang for output
*/
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
{
global $langs,$conf,$mysoc;
$outputlangs->load("main");
$outputlangs->load("bills");
$outputlangs->load("orders");
$outputlangs->load("companies");
$default_font_size = pdf_getPDFFontSize($outputlangs);
// Do not add the BACKGROUND as this is for suppliers
//pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
$pdf->SetTextColor(0,0,60);
$pdf->SetFont('','B', $default_font_size + 3);
$posy=$this->marge_haute;
$pdf->SetXY($this->marge_gauche,$posy);
// Logo
/*
$logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
if ($mysoc->logo)
{
if (is_readable($logo))
{
$pdf->Image($logo, $this->marge_gauche, $posy, 0, 24);
}
else
{
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('','B', $default_font_size - 2);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound",$logo), 0, 'L');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
}
}
else
{*/
$text=$this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
//}
$pdf->SetFont('','B', $default_font_size + 3);
$pdf->SetXY(100,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("SupplierInvoice")." ".$outputlangs->convToOutputCharset($object->ref), '' , 'R');
$pdf->SetFont('','', $default_font_size + 2);
$posy+=6;
$pdf->SetXY(100,$posy);
if ($object->date)
{
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,"day",false,$outputlangs,true), '', 'R');
}
else
{
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
}
if ($showadress)
{
// Receive email
$posy=42;
$hautcadre=40;
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','', $default_font_size - 2);
$pdf->SetXY($this->marge_gauche,$posy-5);
$pdf->MultiCell(66,5, $outputlangs->transnoentities("BillTo").":",0,"L");
$pdf->SetXY($this->marge_gauche,$posy);
$pdf->SetFillColor(230,230,230);
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
// Nom emetteur
$carac_emetteur_name=$outputlangs->convToOutputCharset($mysoc->name);
$pdf->SetTextColor(0,0,60);
$pdf->SetFont('','B', $default_font_size);
$pdf->SetXY($this->marge_gauche+2,$posy+3);
$pdf->MultiCell(80, 4, $carac_emetteur_name, 0, 'L');
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs,$mysoc);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY($this->marge_gauche+2,$posy+8);
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
//.........这里部分代码省略.........
示例13: dol_sanitizeFileName
}
print '</td>';
print '<td width="16" align="center" class="nobordernopadding">';
$filename = dol_sanitizeFileName($obj->ref);
$filedir = $conf->supplier_proposal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
$urlsource = $_SERVER['PHP_SELF'] . '?id=' . $obj->supplier_proposalid;
print $formfile->getDocumentsLink($supplier_proposalstatic->element, $filename, $filedir);
print '</td></tr></table>';
print "</td>";
$companystatic->id = $obj->socid;
$companystatic->name = $obj->socname;
$companystatic->client = $obj->client;
$companystatic->canvas = $obj->canvas;
print '<td align="left">' . $companystatic->getNomUrl(1, 'customer', 44) . '</td>' . "\n";
print '<td align="right">';
print dol_print_date($db->jdate($obj->dp), 'day') . '</td>' . "\n";
print '<td align="right">' . price($obj->total_ttc) . '</td>';
print '<td align="center" width="14">' . $supplier_proposalstatic->LibStatut($obj->fk_statut, 3) . '</td>' . "\n";
print '</tr>' . "\n";
$i++;
$total += $obj->total_ttc;
}
if ($num > $nbofloop) {
print '<tr class="liste_total"><td colspan="5">' . $langs->trans("XMoreLines", $num - $nbofloop) . "</td></tr>";
} else {
if ($total > 0) {
print '<tr class="liste_total"><td colspan="3">' . $langs->trans("Total") . "</td><td align=\"right\">" . price($total) . "</td><td> </td></tr>";
}
}
print "</table><br>";
}
示例14: while
print '<td align="right"><a href="' . DOL_URL_ROOT . '/product/stock/mouvement.php">' . $langs->trans("FullList") . '</a></td>';
print "</tr>\n";
$var = True;
$i = 0;
while ($i < min($num, $max)) {
$objp = $db->fetch_object($resql);
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td>' . dol_print_date($db->jdate($objp->datem), 'dayhour') . '</td>';
print "<td><a href=\"../card.php?id={$objp->rowid}\">";
print img_object($langs->trans("ShowProduct"), "product") . ' ' . $objp->produit;
print "</a></td>\n";
if (!empty($conf->productbatch->enabled)) {
print '<td>' . $objp->batch . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>';
}
print '<td><a href="card.php?id=' . $objp->entrepot_id . '">';
print img_object($langs->trans("ShowWarehouse"), "stock") . ' ' . $objp->stock;
print "</a></td>\n";
print '<td align="right">';
if ($objp->qty > 0) {
print '+';
}
print $objp->qty . '</td>';
print "</tr>\n";
$i++;
}
$db->free($resql);
print "</table>";
}
示例15: _pagehead
//.........这里部分代码省略.........
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer") . " : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
}
$objectidnext = $object->getIdReplacingInvoice('validated');
if ($object->type == 0 && $objectidnext) {
$objectreplacing = new Facture($this->db);
$objectreplacing->fetch($objectidnext);
$posy += 3;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementByInvoice") . ' : ' . $outputlangs->convToOutputCharset($objectreplacing->ref), '', 'R');
}
if ($object->type == 1) {
$objectreplaced = new Facture($this->db);
$objectreplaced->fetch($object->fk_facture_source);
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementInvoice") . ' : ' . $outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
}
if ($object->type == 2 && !empty($object->fk_facture_source)) {
$objectreplaced = new Facture($this->db);
$objectreplaced->fetch($object->fk_facture_source);
$posy += 3;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("CorrectionInvoice") . ' : ' . $outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
}
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateInvoice") . " : " . dol_print_date($object->date, "day", false, $outputlangs), '', 'R');
if ($object->type != 2) {
$posy += 3;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("DateEcheance") . " : " . dol_print_date($object->date_lim_reglement, "day", false, $outputlangs, true), '', 'R');
}
if ($object->thirdparty->code_client) {
$posy += 3;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("CustomerCode") . " : " . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
}
$posy += 1;
// Show list of linked objects
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
if ($showaddress) {
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
// Show sender
$posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
$posx = $this->marge_gauche;
if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
$posx = $this->page_largeur - $this->marge_droite - 80;
}
$hautcadre = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 38 : 40;
$widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82;
// Show sender frame
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posx, $posy - 5);
$pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom") . ":", 0, 'L');
$pdf->SetXY($posx, $posy);