Merge pull request #14692 from RomainDeschamps/patch-3

Fix ToSell/ToBuy tag in supplier products list
This commit is contained in:
Laurent Destailleur 2020-09-09 19:09:19 +02:00 committed by GitHub
commit a5c0aa06bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions =
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
$sql = "SELECT p.rowid, p.label, p.ref, p.fk_product_type, p.entity,";
$sql = "SELECT p.rowid, p.label, p.ref, p.fk_product_type, p.entity, tosell, tobuy,";
$sql .= " ppf.fk_soc, ppf.ref_fourn, ppf.price as price, ppf.quantity as qty, ppf.unitprice,";
$sql .= " s.rowid as socid, s.nom as name";
// Add fields to SELECT from hooks
@ -296,6 +296,8 @@ if ($resql)
$productstatic->ref = $objp->ref;
$productstatic->type = $objp->fk_product_type;
$productstatic->entity = $objp->entity;
$productstatic->status = $objp->tosell;
$productstatic->status_buy = $objp->tobuy;
print $productstatic->getNomUrl(1, 'supplier');
print '</td>';