mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW : Update warehouse product list to add another sorting option (#30971)
* Update warehouse product list to add another sorting option Add the ability to sort product list by average buying price to identify high cost laying products in stock. * Fix variable typo * Update card.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
ae59ed2c97
commit
a7dcfab8a2
|
|
@ -648,7 +648,7 @@ if ($action == 'create') {
|
|||
print_liste_field_titre($form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")), "", "p.pmp", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
print_liste_field_titre("EstimatedStockValueShort", "", "", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("EstimatedStockValueShort", "", "svalue", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'totalvalue';
|
||||
$totalarray['type'][$totalarray['nbfield']] = '';
|
||||
|
|
@ -705,6 +705,7 @@ if ($action == 'create') {
|
|||
if (getDolGlobalString('PRODUCT_USE_UNITS')) {
|
||||
$sql .= ",fk_unit";
|
||||
}
|
||||
$sql .= ", (ps.reel * p.pmp) as svalue";
|
||||
// Add fields from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user