appel de librairie
This commit is contained in:
parent
1cee84b8ed
commit
fe3b690c9b
@ -20,46 +20,7 @@
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
|
||||
function get_ca_propal ($db, $year, $socidp)
|
||||
{
|
||||
|
||||
$sql = "SELECT sum(f.price - f.remise) as sum FROM llx_propal as f WHERE fk_statut in (1,2) AND date_format(f.datep, '%Y') = $year ";
|
||||
if ($socidp)
|
||||
{
|
||||
$sql .= " AND f.fk_soc = $socidp";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result)
|
||||
{
|
||||
return $db->result (0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
function get_ca ($db, $year, $socidp)
|
||||
{
|
||||
$sql = "SELECT sum(f.amount) as sum FROM llx_facture as f WHERE f.paye = 1 AND date_format(f.datef , '%Y') = $year ";
|
||||
if ($socidp)
|
||||
{
|
||||
$sql .= " AND f.fk_soc = $socidp";
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
return $db->result ( 0, 0);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
require("./lib.inc.php");
|
||||
|
||||
|
||||
function propals ($db, $year, $month) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user