Look: On utilise picto selon type facture.
This commit is contained in:
parent
bcd2cfe371
commit
2fc12bc192
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,8 +67,9 @@ class box_factures extends ModeleBoxes {
|
|||||||
|
|
||||||
if ($user->rights->facture->lire)
|
if ($user->rights->facture->lire)
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,";
|
$sql = "SELECT f.rowid as facid, f.facnumber, f.type, f.amount, ".$db->pdate("f.datef")." as df,";
|
||||||
$sql.= " f.paye, f.fk_statut, f.rowid as facid";
|
$sql.= " f.paye, f.fk_statut,";
|
||||||
|
$sql.= " s.nom, s.idp";
|
||||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
|
||||||
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
@ -94,8 +94,12 @@ class box_factures extends ModeleBoxes {
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
|
$picto='bill';
|
||||||
|
if ($objp->type == 1) $picto.='r';
|
||||||
|
if ($objp->type == 2) $picto.='a';
|
||||||
|
|
||||||
$this->info_box_contents[$i][0] = array('align' => 'left',
|
$this->info_box_contents[$i][0] = array('align' => 'left',
|
||||||
'logo' => $this->boximg,
|
'logo' => $picto,
|
||||||
'text' => $objp->facnumber,
|
'text' => $objp->facnumber,
|
||||||
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);
|
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);
|
||||||
|
|
||||||
@ -111,6 +115,12 @@ class box_factures extends ModeleBoxes {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->info_box_contents[0][0] = array( 'align' => 'left',
|
||||||
|
'maxlength'=>500,
|
||||||
|
'text' => ($db->error().' sql='.$sql));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user