Modif html
This commit is contained in:
parent
dc91f910a2
commit
1d90f34e3a
@ -91,17 +91,19 @@ function pt ($db, $sql, $date)
|
|||||||
$bc[1]="class=\"impair\"";
|
$bc[1]="class=\"impair\"";
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) {
|
if ($result)
|
||||||
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0; $total = 0 ;
|
$i = 0; $total = 0 ;
|
||||||
print '<TABLE border="1" width="100%" cellspacing="0" cellpadding="3">';
|
print '<table class="border" width="100%" cellspacing="0" cellpadding="3">';
|
||||||
print "<TR class=\"liste_titre\">";
|
print "<TR class=\"liste_titre\">";
|
||||||
print "<TD width=\"60%\">$date</TD>";
|
print "<TD width=\"60%\">$date</TD>";
|
||||||
print "<TD align=\"right\">Montant</TD>";
|
print "<TD align=\"right\">Montant</TD>";
|
||||||
print "<td> </td>\n";
|
print "<td> </td>\n";
|
||||||
print "</TR>\n";
|
print "</TR>\n";
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num) {
|
while ($i < $num)
|
||||||
|
{
|
||||||
$obj = $db->fetch_object( $i);
|
$obj = $db->fetch_object( $i);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<TR $bc[$var]>";
|
print "<TR $bc[$var]>";
|
||||||
@ -113,7 +115,7 @@ function pt ($db, $sql, $date)
|
|||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="total"><td align="right">Total :</td><td align="right"><b>'.price($total).'</b></td><td>euros HT</td></tr>';
|
print '<tr class="total"><td align="right">Total :</td><td align="right"><b>'.price($total).'</b></td><td>'.MAIN_MONNAIE.' HT</td></tr>';
|
||||||
|
|
||||||
print "</TABLE>";
|
print "</TABLE>";
|
||||||
$db->free();
|
$db->free();
|
||||||
|
|||||||
@ -35,7 +35,7 @@ if ($user->societe_id > 0)
|
|||||||
$socidp = $user->societe_id;
|
$socidp = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_titre("Chiffres d'affaires en euros HT");
|
print_titre("Chiffres d'affaires (".MAIN_MONNAIE." HT)");
|
||||||
|
|
||||||
$sql = "SELECT sum(f.total) as amount , date_format(f.datef,'%Y-%m') as dm";
|
$sql = "SELECT sum(f.total) as amount , date_format(f.datef,'%Y-%m') as dm";
|
||||||
$sql .= " FROM llx_facture as f WHERE f.paye = 1";
|
$sql .= " FROM llx_facture as f WHERE f.paye = 1";
|
||||||
@ -59,7 +59,7 @@ if ($result)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table width="100%" border="1" cellspacing="0" cellpadding="3">';
|
print '<table width="100%" class="border" cellspacing="0" cellpadding="3">';
|
||||||
print '<tr class="liste_titre"><td> </td>';
|
print '<tr class="liste_titre"><td> </td>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@ if ($user->societe_id > 0)
|
|||||||
function pt ($db, $sql, $title) {
|
function pt ($db, $sql, $title) {
|
||||||
global $bc;
|
global $bc;
|
||||||
|
|
||||||
print '<TABLE border="1" width="100%" cellspacing="0" cellpadding="4">';
|
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
print "<TR class=\"liste_titre\">";
|
print '<tr class="liste_titre">';
|
||||||
print "<TD>$title</TD>";
|
print "<TD>$title</TD>";
|
||||||
print "<TD align=\"right\">Montant</TD>";
|
print "<TD align=\"right\">Montant</TD>";
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ function pt ($db, $sql, $title) {
|
|||||||
$total = $total + $obj->amount;
|
$total = $total + $obj->amount;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "<tr class=\"total\"><td colspan=\"2\" align=\"right\"><b>Total : ".price($total)."</b> euros HT</td></tr>";
|
print "<tr class=\"total\"><td colspan=\"2\" align=\"right\"><b>Total : ".price($total)."</b> ".MAIN_MONNAIE." HT</td></tr>";
|
||||||
|
|
||||||
$db->free();
|
$db->free();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,6 +69,17 @@ class Product
|
|||||||
*/
|
*/
|
||||||
Function create($user)
|
Function create($user)
|
||||||
{
|
{
|
||||||
|
$sql = "SELECT count(*)";
|
||||||
|
$sql .= " FROM llx_product WHERE ref = '" .trim($this->ref)."'";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql) ;
|
||||||
|
|
||||||
|
if ( $result )
|
||||||
|
{
|
||||||
|
$row = $this->db->fetch_array();
|
||||||
|
if ($row[0] == 0)
|
||||||
|
{
|
||||||
|
|
||||||
if (strlen($this->price)==0)
|
if (strlen($this->price)==0)
|
||||||
{
|
{
|
||||||
$this->price = 0;
|
$this->price = 0;
|
||||||
@ -102,6 +113,8 @@ class Product
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -198,7 +211,6 @@ class Product
|
|||||||
*/
|
*/
|
||||||
Function fetch ($id)
|
Function fetch ($id)
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "SELECT rowid, ref, label, description, price, tva_tx, envente, nbvente, fk_product_type, duration";
|
$sql = "SELECT rowid, ref, label, description, price, tva_tx, envente, nbvente, fk_product_type, duration";
|
||||||
$sql .= " FROM llx_product WHERE rowid = $id";
|
$sql .= " FROM llx_product WHERE rowid = $id";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user