add (hooks) init hooks on all tabs for supplier order

This commit is contained in:
Antonin MARCHAL 2021-05-08 11:43:46 +02:00
parent 0271645d8e
commit a6267a8ade
5 changed files with 6 additions and 1 deletions

View File

@ -45,6 +45,7 @@ if ($user->socid) {
$socid = $user->socid;
}
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
$hookmanager->initHooks(array('ordersuppliercardcontact'));
$object = new CommandeFournisseur($db);

View File

@ -70,6 +70,7 @@ if (!$sortfield) {
$sortfield = "name";
}
$hookmanager->initHooks(array('ordersuppliercarddocument'));
$object = new CommandeFournisseur($db);
if ($object->fetch($id, $ref) < 0) {

View File

@ -78,6 +78,7 @@ if (!$user->rights->fournisseur->commande->lire) {
accessforbidden();
}
$hookmanager->initHooks(array('ordersuppliercardinfo'));

View File

@ -48,6 +48,8 @@ $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'com
$object = new CommandeFournisseur($db);
$object->fetch($id, $ref);
$hookmanager->initHooks(array('ordersuppliercardnote'));
$permissionnote = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); // Used by the include of actions_setnotes.inc.php

View File

@ -2208,7 +2208,7 @@ class Product extends CommonObject
$sql .= " p.stock,";
}
if ($separatedEntityPMP) {
$sql .= " pa.pmp, p.datec, p.tms, p.import_key, p.entity, p.desiredstock, p.tobatch, p.batch_mask, p.fk_unit,";
$sql .= " ppe.pmp, p.datec, p.tms, p.import_key, p.entity, p.desiredstock, p.tobatch, p.batch_mask, p.fk_unit,";
} else {
$sql .= " p.pmp, p.datec, p.tms, p.import_key, p.entity, p.desiredstock, p.tobatch, p.batch_mask, p.fk_unit,";
}