本文整理匯總了PHP中Facture::getNomUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Facture::getNomUrl方法的具體用法?PHP Facture::getNomUrl怎麽用?PHP Facture::getNomUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Facture
的用法示例。
在下文中一共展示了Facture::getNomUrl方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
$facturefournstatic->ref = $ref;
$facturefournstatic->id = $obj->objid;
$facturefournstatic->type = $obj->type;
$ref = $facturefournstatic->getNomUrl(1, '');
$societestatic->id = $obj->socid;
$societestatic->name = $obj->name;
$refcomp = $societestatic->getNomUrl(1, '', 24);
$paiement = -1 * $facturefournstatic->getSommePaiement();
// Payment already done
}
}
if ($obj->family == 'invoice') {
$facturestatic->ref = $obj->ref;
$facturestatic->id = $obj->objid;
$facturestatic->type = $obj->type;
$ref = $facturestatic->getNomUrl(1, '');
$societestatic->id = $obj->socid;
$societestatic->name = $obj->name;
$refcomp = $societestatic->getNomUrl(1, '', 24);
$paiement = $facturestatic->getSommePaiement();
// Payment already done
}
if ($obj->family == 'social_contribution') {
$socialcontribstatic->ref = $obj->ref;
$socialcontribstatic->id = $obj->objid;
$socialcontribstatic->lib = $obj->type;
$ref = $socialcontribstatic->getNomUrl(1, 24);
$paiement = -1 * $socialcontribstatic->getSommePaiement();
// Payment already done
}
$total_ttc = $obj->total_ttc;
示例2: while
print '<td>' . $langs->trans("ThirdParty") . '</td>';
print '<td>' . $langs->trans("RIB") . '</td>';
print '<td>' . $langs->trans("RUM") . '</td>';
print '<td align="right">' . $langs->trans("AmountTTC") . '</td>';
print '<td align="right">' . $langs->trans("DateRequest") . '</td>';
print '</tr>';
if ($num) {
$var = True;
while ($i < $num && $i < 20) {
$obj = $db->fetch_object($resql);
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>';
$invoicestatic->id = $obj->rowid;
$invoicestatic->ref = $obj->facnumber;
print $invoicestatic->getNomUrl(1, 'withdraw');
print '</td>';
// Thirdparty
print '<td>';
$thirdpartystatic->fetch($obj->socid);
print $thirdpartystatic->getNomUrl(1, 'card');
print '</td>';
// RIB
print '<td>';
print $thirdpartystatic->display_rib();
print '</td>';
// RUM
print '<td>';
print $thirdpartystatic->display_rib('rum');
print '</td>';
// Amount
示例3: while
if ($num > 0) {
$var = True;
while ($i < $num) {
$objp = $db->fetch_object($resql);
$var = !$var;
print '<tr ' . $bc[$var] . '>';
$invoice = new Facture($db);
$invoice->fetch($objp->facid);
$paiement = $invoice->getSommePaiement();
$creditnotes = $invoice->getSumCreditNotesUsed();
$deposits = $invoice->getSumDepositsUsed();
$alreadypayed = price2num($paiement + $creditnotes + $deposits, 'MT');
$remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT');
// Invoice
print '<td>';
print $invoice->getNomUrl(1);
print "</td>\n";
// Third party
print '<td>';
$thirdpartystatic->id = $objp->socid;
$thirdpartystatic->name = $objp->name;
print $thirdpartystatic->getNomUrl(1);
print '</td>';
// Expected to pay
print '<td align="right">' . price($objp->total_ttc) . '</td>';
// Amount payed
print '<td align="right">' . price($objp->amount) . '</td>';
// Remain to pay
print '<td align="right">' . price($remaintopay) . '</td>';
// Status
print '<td align="right">' . $invoice->getLibStatut(5, $alreadypayed) . '</td>';
示例4: array
$twiiit->load($PDOdb, $obj->rowid);
$Tab[] = array('link' => $twiiit->getNomUrl(), 'text' => $twiiit->getComment());
}
} else {
if ($type_tag == 'hashtag') {
$res = $db->query("SELECT rowid FROM " . MAIN_DB_PREFIX . "propal WHERE ref = '" . $db->escape($tag) . "'");
while ($obj = $db->fetch_object($res)) {
$o = new Propal($db);
$o->fetch($obj->rowid);
$Tab[] = array('link' => $o->getNomUrl(1), 'link0' => $o->getNomUrl(0), 'type' => 'user');
}
$res = $db->query("SELECT rowid FROM " . MAIN_DB_PREFIX . "facture WHERE facnumber = '" . $db->escape($tag) . "'");
while ($obj = $db->fetch_object($res)) {
$o = new Facture($db);
$o->fetch($obj->rowid);
$Tab[] = array('link' => $o->getNomUrl(1), 'link0' => $o->getNomUrl(0), 'type' => 'societe');
}
$res = $db->query("SELECT rowid FROM " . MAIN_DB_PREFIX . "product WHERE ref = '" . $db->escape($tag) . "'");
while ($obj = $db->fetch_object($res)) {
$o = new Product($db);
$o->fetch($obj->rowid);
$Tab[] = array('link' => $o->getNomUrl(1), 'link0' => $o->getNomUrl(0), 'type' => 'societe');
}
} else {
}
}
}
if (count($Tab) == 1) {
preg_match_all('/<a[^>]+href=([\'"])(.+?)\\1[^>]*>/i', $Tab[0]['link0'], $match);
if (!empty($match[2][0])) {
header('location:' . $match[2][0]);
示例5: foreach
$i=0;
foreach($facidavoir as $id)
{
if ($i==0) print ' ';
else print ',';
$facavoir=new Facture($db);
$facavoir->fetch($id);
print $facavoir->getNomUrl(1);
}
print ')';
}
if ($facidnext > 0)
{
$facthatreplace=new Facture($db);
$facthatreplace->fetch($facidnext);
print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
}
print '</td></tr>';
// Discounts
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="5">';
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
else print $langs->trans("CompanyHasNoRelativeDiscount");
print '. ';
if ($absolute_discount > 0)
{
if ($fac->statut > 0 || $fac->type == 2 || $fac->type == 3)
{
if ($fac->statut == 0)
{
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie)).'. ';
示例6: Facture
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$invoice = new Facture($db);
while ($i < $num) {
$obj = $db->fetch_object($resql);
$invoice->fetch($obj->fk_facture_source);
print '<tr><td colspan="' . $nbcols . '" align="right">';
if ($invoice->type == Facture::TYPE_CREDIT_NOTE) {
print $langs->trans("CreditNote") . ' ';
}
if ($invoice->type == Facture::TYPE_DEPOSIT) {
print $langs->trans("Deposit") . ' ';
}
print $invoice->getNomUrl(0);
print ' :</td>';
print '<td align="right">' . price($obj->amount_ttc) . '</td>';
print '<td align="right">';
print '<a href="' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&action=unlinkdiscount&discountid=' . $obj->rowid . '">' . img_delete() . '</a>';
print '</td></tr>';
$i++;
if ($invoice->type == Facture::TYPE_CREDIT_NOTE) {
$creditnoteamount += $obj->amount_ttc;
}
if ($invoice->type == Facture::TYPE_DEPOSIT) {
$depositamount += $obj->amount_ttc;
}
}
} else {
dol_print_error($db);
示例7: Societe
$var = false;
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3">' . $langs->trans("CustomersDraftInvoices") . ($num ? ' (' . $num . ')' : '') . '</td></tr>';
if ($num) {
$companystatic = new Societe($db);
$i = 0;
$tot_ttc = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
print '<tr ' . $bc[$var] . '><td class="nowrap">';
$facturestatic->ref = $obj->facnumber;
$facturestatic->id = $obj->rowid;
$facturestatic->type = $obj->type;
print $facturestatic->getNomUrl(1, '');
print '</td>';
print '<td class="nowrap">';
$companystatic->id = $obj->socid;
$companystatic->nom = $obj->nom;
$companystatic->client = 1;
print $companystatic->getNomUrl(1, '', 16);
print '</td>';
print '<td align="right" class="nowrap">' . price($obj->total_ttc) . '</td>';
print '</tr>';
$tot_ttc += $obj->total_ttc;
$i++;
$var = !$var;
}
print '<tr class="liste_total"><td align="left">' . $langs->trans("Total") . '</td>';
print '<td colspan="2" align="right">' . price($tot_ttc) . '</td>';
示例8: Facture
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$invoicestatic = new Facture($db);
$companystatic = new Client($db);
foreach ($tabfac as $key => $val) {
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$invoicestatic->type = $val["type"];
$date = dol_print_date($db->jdate($val["date"]), 'day');
// Third party
foreach ($tabttc[$key] as $k => $mt) {
print "<tr " . $bc[$var] . ">";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
print "<td>" . length_accounta($k);
print "</td><td>" . $langs->trans("ThirdParty");
print ' (' . $companystatic->getNomUrl(0, 'customer', 16) . ')';
print "</td><td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
print "<td align='right'>" . ($mt < 0 ? price(-$mt) : '') . "</td>";
}
print "</tr>";
// Product / Service
foreach ($tabht[$key] as $k => $mt) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k);
if ($mt) {
示例9: 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 . '/compta/facture/class/facture.class.php';
include_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
$facturestatic = new Facture($db);
$societestatic = new Societe($db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpaidCustomerBills", $max));
if ($user->rights->facture->lire) {
$sql = "SELECT s.nom as name, s.rowid as socid,";
$sql .= " s.code_client,";
$sql .= " s.logo,";
$sql .= " f.facnumber, f.date_lim_reglement as datelimite,";
$sql .= " f.type,";
$sql .= " f.amount, f.datef as df,";
$sql .= " f.total as total_ht,";
$sql .= " f.tva as total_tva,";
$sql .= " f.total_ttc,";
$sql .= " f.paye, f.fk_statut, f.rowid as facid";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s," . MAIN_DB_PREFIX . "facture 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 f.datef DESC, f.facnumber DESC ";
$sql .= " ORDER BY datelimite ASC, f.facnumber ASC ";
$sql .= $db->plimit($max, 0);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
$now = dol_now();
$line = 0;
$l_due_date = $langs->trans('Late') . ' (' . strtolower($langs->trans('DateEcheance')) . ': %s)';
while ($line < $num) {
$objp = $db->fetch_object($result);
$datelimite = $db->jdate($objp->datelimite);
$facturestatic->id = $objp->facid;
$facturestatic->ref = $objp->facnumber;
$facturestatic->type = $objp->type;
$facturestatic->total_ht = $objp->total_ht;
$facturestatic->total_tva = $objp->total_tva;
$facturestatic->total_ttc = $objp->total_ttc;
$societestatic->id = $objp->socid;
$societestatic->name = $objp->name;
$societestatic->client = 1;
$societestatic->code_client = $objp->code_client;
$societestatic->logo = $objp->logo;
$late = '';
if ($datelimite < $now - $conf->facture->client->warning_delay) {
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day')));
}
$this->info_box_contents[$line][] = array('td' => 'align="left"', 'text' => $facturestatic->getNomUrl(1), 'text2' => $late, 'asis' => 1);
$this->info_box_contents[$line][] = array('td' => 'align="left"', 'text' => $societestatic->getNomUrl(1, '', 44), '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'));
$this->info_box_contents[$line][] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 3));
$line++;
}
if ($num == 0) {
$this->info_box_contents[$line][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoUnpaidCustomerBills"));
}
$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"));
}
}
示例10: Create
/**
* Create a withdraw
* TODO delete params banque and agence when not necesary
*
* @param int $banque dolibarr mysoc bank
* @param int $agence dolibarr mysoc bank office (guichet)
* @param string $mode real=do action, simu=test only
* @return int <0 if KO, nbre of invoice withdrawed if OK
*/
function Create($banque = 0, $agence = 0, $mode = 'real')
{
global $conf, $langs;
dol_syslog(get_class($this) . "::Create banque={$banque} agence={$agence}");
require_once DOL_DOCUMENT_ROOT . "/compta/facture/class/facture.class.php";
require_once DOL_DOCUMENT_ROOT . "/societe/class/societe.class.php";
$error = 0;
$datetimeprev = time();
$month = strftime("%m", $datetimeprev);
$year = strftime("%Y", $datetimeprev);
$puser = new User($this->db, $conf->global->PRELEVEMENT_USER);
/*
* Read invoices
*/
$factures = array();
$factures_prev = array();
$factures_result = array();
$factures_prev_id = array();
$factures_errors = array();
if (!$error) {
$sql = "SELECT f.rowid, pfd.rowid as pfdrowid, f.fk_soc";
$sql .= ", pfd.code_banque, pfd.code_guichet, pfd.number, pfd.cle_rib";
$sql .= ", pfd.amount";
$sql .= ", s.nom as name";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
$sql .= ", " . MAIN_DB_PREFIX . "societe as s";
$sql .= ", " . MAIN_DB_PREFIX . "prelevement_facture_demande as pfd";
//if ($banque || $agence) $sql.= ", ".MAIN_DB_PREFIX."societe_rib as sr";
$sql .= " WHERE f.rowid = pfd.fk_facture";
$sql .= " AND f.entity = " . $conf->entity;
$sql .= " AND s.rowid = f.fk_soc";
//if ($banque || $agence) $sql.= " AND s.rowid = sr.fk_soc";
$sql .= " AND f.fk_statut = 1";
$sql .= " AND f.paye = 0";
$sql .= " AND pfd.traite = 0";
$sql .= " AND f.total_ttc > 0";
//if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
//if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
dol_syslog(get_class($this) . "::Create", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num) {
$row = $this->db->fetch_row($resql);
$factures[$i] = $row;
// All fields
$i++;
}
$this->db->free($resql);
dol_syslog($i . " invoices to withdraw");
} else {
$error = 1;
dol_syslog("Erreur -1");
dol_syslog($this->db->error());
}
}
if (!$error) {
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
$soc = new Societe($this->db);
// Check RIB
$i = 0;
dol_syslog("Start RIB check");
if (count($factures) > 0) {
foreach ($factures as $key => $fac) {
$fact = new Facture($this->db);
if ($fact->fetch($fac[0]) >= 0) {
if ($soc->fetch($fact->socid) >= 0) {
$bac = new CompanyBankAccount($this->db);
$bac->fetch(0, $soc->id);
if ($bac->verif() >= 1) {
$factures_prev[$i] = $fac;
/* second tableau necessaire pour BonPrelevement */
$factures_prev_id[$i] = $fac[0];
$i++;
} else {
dol_syslog("Error on default bank number RIB/IBAN for thirdparty reported by verif() " . $fact->socid . " " . $soc->name, LOG_ERR);
$this->invoice_in_error[$fac[0]] = "Error on default bank number RIB/IBAN for invoice " . $fact->getNomUrl(0) . " for thirdparty (reported by function verif) " . $soc->name;
}
} else {
dol_syslog("Failed to read company", LOG_ERR);
}
} else {
dol_syslog("Failed to read invoice", LOG_ERR);
}
}
} else {
dol_syslog("No invoice to process");
}
}
$ok = 0;
//.........這裏部分代碼省略.........
示例11: show_actions_done
//.........這裏部分代碼省略.........
if ((!empty($object->id) || !empty($objcon->id)) && $permok) {
$out .= '<a href="' . DOL_URL_ROOT . '/comm/action/fiche.php?action=create';
if (get_class($object) == 'Societe') {
$out .= '&socid=' . $object->id;
}
$out .= (!empty($objcon->id) ? '&contactid=' . $objcon->id : '') . '&backtopage=1&percentage=-1">';
$out .= $langs->trans("AddAnAction") . ' ';
$out .= img_picto($langs->trans("AddAnAction"), 'filenew');
$out .= "</a>";
}
$out .= '</td>';
$out .= '</tr>';
foreach ($histo as $key => $value) {
$var = !$var;
$out .= "<tr " . $bc[$var] . ">";
// Champ date
$out .= '<td width="120" class="nowrap">';
if ($histo[$key]['date']) {
$out .= dol_print_date($histo[$key]['date'], 'dayhour');
} else {
if ($histo[$key]['datestart']) {
$out .= dol_print_date($histo[$key]['datestart'], 'dayhour');
}
}
$out .= "</td>\n";
// Picto
$out .= '<td width="16"> </td>';
// Action
$out .= '<td>';
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') {
$actionstatic->type_code = $histo[$key]['acode'];
$transcode = $langs->trans("Action" . $histo[$key]['acode']);
$libelle = $transcode != "Action" . $histo[$key]['acode'] ? $transcode : $histo[$key]['libelle'];
//$actionstatic->libelle=$libelle;
$actionstatic->libelle = $histo[$key]['note'];
$actionstatic->id = $histo[$key]['id'];
$out .= $actionstatic->getNomUrl(1, 40);
}
if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') {
$out .= '<a href="' . DOL_URL_ROOT . '/comm/mailing/fiche.php?id=' . $histo[$key]['id'] . '">' . img_object($langs->trans("ShowEMailing"), "email") . ' ';
$transcode = $langs->trans("Action" . $histo[$key]['acode']);
$libelle = $transcode != "Action" . $histo[$key]['acode'] ? $transcode : 'Send mass mailing';
$out .= dol_trunc($libelle, 40);
}
$out .= '</td>';
// Title of event
//$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>';
// Objet lie
// TODO uniformize
$out .= '<td>';
if (isset($histo[$key]['elementtype'])) {
if ($histo[$key]['elementtype'] == 'propal' && !empty($conf->propal->enabled)) {
$propalstatic->ref = $langs->trans("ProposalShort");
$propalstatic->id = $histo[$key]['fk_element'];
$out .= $propalstatic->getNomUrl(1);
} elseif ($histo[$key]['elementtype'] == 'commande' && !empty($conf->commande->enabled)) {
$orderstatic->ref = $langs->trans("Order");
$orderstatic->id = $histo[$key]['fk_element'];
$out .= $orderstatic->getNomUrl(1);
} elseif ($histo[$key]['elementtype'] == 'facture' && !empty($conf->facture->enabled)) {
$facturestatic->ref = $langs->trans("Invoice");
$facturestatic->id = $histo[$key]['fk_element'];
$facturestatic->type = $histo[$key]['ftype'];
$out .= $facturestatic->getNomUrl(1, 'compta');
} else {
$out .= ' ';
}
} else {
$out .= ' ';
}
$out .= '</td>';
// Contact pour cette action
if (!empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0) {
$contactstatic->lastname = $histo[$key]['lastname'];
$contactstatic->firstname = $histo[$key]['firstname'];
$contactstatic->id = $histo[$key]['contact_id'];
$out .= '<td width="120">' . $contactstatic->getNomUrl(1, '', 10) . '</td>';
} else {
$out .= '<td> </td>';
}
// Auteur
$out .= '<td class="nowrap" width="80">';
$userstatic->id = $histo[$key]['userid'];
$userstatic->login = $histo[$key]['login'];
$out .= $userstatic->getLoginUrl(1);
$out .= '</td>';
// Statut
$out .= '<td class="nowrap" width="20">' . $actionstatic->LibStatut($histo[$key]['percent'], 3) . '</td>';
$out .= "</tr>\n";
$i++;
}
$out .= "</table>\n";
$out .= "<br>\n";
}
if ($noprint) {
return $out;
} else {
print $out;
}
}
示例12: array
$x_both[$my_coll_rate]['coll']['detail'][] = array(
'id' =>$x_coll[$my_coll_rate]['facid'][$id],
'descr' =>$x_coll[$my_coll_rate]['descr'][$id],
'pid' =>$x_coll[$my_coll_rate]['pid'][$id],
'pref' =>$x_coll[$my_coll_rate]['pref'][$id],
'ptype' =>$x_coll[$my_coll_rate]['ptype'][$id],
'payment_id'=>$x_coll[$my_coll_rate]['payment_id'][$id],
'payment_amount'=>$x_coll[$my_coll_rate]['payment_amount'][$id],
'ftotal_ttc'=>$x_coll[$my_coll_rate]['ftotal_ttc'][$id],
'dtotal_ttc'=>$x_coll[$my_coll_rate]['dtotal_ttc'][$id],
'dtype' =>$x_coll[$my_coll_rate]['dtype'][$id],
'ddate_start'=>$x_coll[$my_coll_rate]['ddate_start'][$id],
'ddate_end' =>$x_coll[$my_coll_rate]['ddate_end'][$id],
'totalht' =>$x_coll[$my_coll_rate]['totalht_list'][$id],
'vat' =>$x_coll[$my_coll_rate]['vat_list'][$id],
'link' =>$invoice_customer->getNomUrl(1,'',12));
}
}
// tva paid
foreach(array_keys($x_paye) as $my_paye_rate){
$x_both[$my_paye_rate]['paye']['totalht'] = $x_paye[$my_paye_rate]['totalht'];
$x_both[$my_paye_rate]['paye']['vat'] = $x_paye[$my_paye_rate]['vat'];
if(!isset($x_both[$my_paye_rate]['coll']['totalht'])){
$x_both[$my_paye_rate]['coll']['totalht'] = 0;
$x_both[$my_paye_rate]['coll']['vat'] = 0;
}
$x_both[$my_paye_rate]['paye']['links'] = '';
$x_both[$my_paye_rate]['paye']['detail'] = array();
foreach($x_paye[$my_paye_rate]['facid'] as $id=>$dummy)
{
示例13: Facture
if ($resql) {
$var = true;
$num = $db->num_rows($resql);
// Boucle sur chaque facture
for ($i = 0; $i < $num; $i++) {
$objf = $db->fetch_object($resql);
$fac = new Facture($db);
$ret = $fac->fetch($objf->facid);
if ($ret < 0) {
print $fac->error . "<br>";
continue;
}
$totalpaye = $fac->getSommePaiement();
$userstatic->id = $objf->userid;
$userstatic->login = $objf->login;
$TData[] = array('date' => $fac->date, 'link' => $fac->getNomUrl(1), 'status' => $fac->getLibStatut(2, $totalpaye), 'amount' => $fac->total_ttc, 'author' => $userstatic->getLoginUrl(1));
$TDataSort[] = $fac->date;
// Paiements
$sql = "SELECT p.rowid, p.datep as dp, pf.amount, p.statut,";
$sql .= " p.fk_user_creat, u.login, u.rowid as userid";
$sql .= " FROM " . MAIN_DB_PREFIX . "paiement_facture as pf,";
$sql .= " " . MAIN_DB_PREFIX . "paiement as p";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as u ON p.fk_user_creat = u.rowid";
$sql .= " WHERE pf.fk_paiement = p.rowid";
$sql .= " AND p.entity = " . $conf->entity;
$sql .= " AND pf.fk_facture = " . $fac->id;
$sql .= " ORDER BY p.datep ASC";
$resqlp = $db->query($sql);
if ($resqlp) {
$nump = $db->num_rows($resqlp);
$j = 0;
示例14: foreach
$facusing->fetch($object->fk_facture_source);
print ' (' . $langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)) . ')';
}
$facidavoir = $object->getListIdAvoirFromInvoice();
if (count($facidavoir) > 0) {
print ' (' . $langs->transnoentities("InvoiceHasAvoir");
$i = 0;
foreach ($facidavoir as $id) {
if ($i == 0) {
print ' ';
} else {
print ',';
}
$facavoir = new Facture($db);
$facavoir->fetch($id);
print $facavoir->getNomUrl(1);
}
print ')';
}
/*
if ($facidnext > 0)
{
$facthatreplace=new Facture($db);
$facthatreplace->fetch($facidnext);
print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
}
*/
print '</td></tr>';
// Discounts
print '<tr><td>' . $langs->trans('Discounts') . '</td><td colspan="5">';
if ($object->thirdparty->remise_percent) {
示例15: while
$tableaushown = 1;
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>' . $langs->trans("LastCustomersBills", $num <= $MAXLIST ? "" : $MAXLIST) . '</td><td align="right"><a href="' . DOL_URL_ROOT . '/compta/facture.php?socid=' . $objsoc->id . '">' . $langs->trans("AllBills") . ' (' . $num . ')</a></td>';
print '<td width="20px" align="right"><a href="' . DOL_URL_ROOT . '/compta/facture/stats/index.php?socid=' . $objsoc->id . '">' . img_picto($langs->trans("Statistics"), 'stats') . '</a></td>';
print '</tr></table></td>';
print '</tr>';
}
while ($i < $num && $i < $MAXLIST) {
$objp = $db->fetch_object($resql);
$var = !$var;
print "<tr {$bc[$var]}>";
print '<td>';
$facturestatic->id = $objp->facid;
$facturestatic->ref = $objp->facnumber;
$facturestatic->type = $objp->type;
print $facturestatic->getNomUrl(1);
print '</td>';
if ($objp->df > 0) {
print "<td align=\"right\">" . dol_print_date($db->jdate($objp->df), 'day') . "</td>\n";
} else {
print "<td align=\"right\"><b>!!!</b></td>\n";
}
print "<td align=\"right\">" . price($objp->total_ttc) . "</td>\n";
print '<td align="right" nowrap="nowrap">' . $facturestatic->LibStatut($objp->paye, $objp->statut, 5, $objp->am) . "</td>\n";
print "</tr>\n";
$i++;
}
$db->free($resql);
} else {
dol_print_error($db);
}