Skip to content

Commit

Permalink
FIX group by qty in product margin tab (#29853)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvessiller-opendsi authored Jun 6, 2024
1 parent 7249e3a commit bd23133
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/margin/tabs/productMargins.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
}
if (!empty($socid)) {
$sql .= " AND f.fk_soc = $socid";
$sql .= " AND f.fk_soc = ".((int) $socid);
}
$sql .= " AND d.buy_price_ht IS NOT NULL";
// We should not use this here. Option ForceBuyingPriceIfNull should have effect only when inserting data. Once data is recorded, it must be used as it is for report.
Expand Down Expand Up @@ -198,7 +198,7 @@
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&id=".$object->id, '', $sortfield, $sortorder, 'left ');
print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("BuyingPrice", $_SERVER["PHP_SELF"], "buying_price", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "qty", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
if (!empty($conf->global->DISPLAY_MARGIN_RATES)) {
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, '', $sortfield, $sortorder, 'right ');
Expand Down

0 comments on commit bd23133

Please sign in to comment.