Skip to content

Commit

Permalink
fix margin reports bugs (wrong group by + jquery syntax error)
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/margin/customerMargins.php
	htdocs/margin/productMargins.php
  • Loading branch information
altairis-tof authored and simnandez committed Aug 23, 2013
1 parent 376b281 commit 24b28d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion htdocs/margin/agentMargins.php
Expand Up @@ -160,7 +160,7 @@
if ($agentid > 0)
$sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname, f.type";
else
$sql.= " GROUP BY u.rowid, s.nom, s.rowid, s.code_client, s.client, u.login, u.lastname, u.firstname, f.type ";
$sql.= " GROUP BY u.rowid";
$sql.= " ORDER BY $sortfield $sortorder ";
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/margin/customerMargins.php
Expand Up @@ -178,7 +178,7 @@
if ($client)
$sql.= " GROUP BY f.rowid, s.rowid, s.nom, s.code_client, s.client, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.type ";
else
$sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.rowid, f.type ";
$sql.= " GROUP BY s.rowid";
$sql.= " ORDER BY $sortfield $sortorder ";
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
Expand Down Expand Up @@ -293,7 +293,7 @@
<script type="text/javascript">
$(document).ready(function() {

$("div.fiche form input.button['type=submit']").hide();
$("div.fiche form input.button[type=submit]").hide();

$("#socid").change(function() {
$("div.fiche form").submit();
Expand Down
3 changes: 2 additions & 1 deletion htdocs/margin/productMargins.php
Expand Up @@ -182,7 +182,8 @@
if ($id > 0)
$sql.= " GROUP BY f.rowid, d.fk_product, p.label, p.rowid, p.fk_product_type, p.ref, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.type";
else
$sql.= " GROUP BY d.fk_product, p.label, p.rowid, p.fk_product_type, p.ref, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.rowid, f.type";
$sql.= " GROUP BY d.fk_product";

$sql.= " ORDER BY $sortfield $sortorder ";
// TODO: calculate total to display then restore pagination
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
Expand Down

0 comments on commit 24b28d6

Please sign in to comment.