Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
499810c822
@ -20,6 +20,7 @@ WARNING:
|
|||||||
|
|
||||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
* The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product
|
* The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product
|
||||||
|
* Trigger ORDER_SUPPLIER_DISPATCH is removed, use ORDER_SUPPLIER_RECEIVE and/or LINEORDER_SUPPLIER_DISPATCH instead.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 16.0.0 compared to 15.0.0 *****
|
***** ChangeLog for 16.0.0 compared to 15.0.0 *****
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
* \brief Home accounting module
|
* \brief Home accounting module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||||
|
|||||||
@ -29,6 +29,8 @@
|
|||||||
* \brief Page of a member
|
* \brief Page of a member
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
@ -44,9 +46,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "bills", "members", "users", "other", "paypal"));
|
$langs->loadLangs(array("companies", "bills", "members", "users", "other", "paypal"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|||||||
@ -27,19 +27,24 @@
|
|||||||
* \brief Home page of membership module
|
* \brief Home page of membership module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("companies", "members"));
|
||||||
|
|
||||||
|
|
||||||
$hookmanager = new HookManager($db);
|
$hookmanager = new HookManager($db);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||||
$hookmanager->initHooks(array('membersindex'));
|
$hookmanager->initHooks(array('membersindex'));
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array("companies", "members"));
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$result = restrictedArea($user, 'adherent');
|
$result = restrictedArea($user, 'adherent');
|
||||||
|
|||||||
@ -27,14 +27,20 @@
|
|||||||
* \brief Page to list all members of foundation
|
* \brief Page to list all members of foundation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("members", "companies"));
|
$langs->loadLangs(array("members", "companies"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$massaction = GETPOST('massaction', 'alpha');
|
$massaction = GETPOST('massaction', 'alpha');
|
||||||
$show_files = GETPOST('show_files', 'int');
|
$show_files = GETPOST('show_files', 'int');
|
||||||
@ -42,6 +48,8 @@ $confirm = GETPOST('confirm', 'alpha');
|
|||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'memberslist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'memberslist'; // To manage different context of search
|
||||||
|
|
||||||
|
|
||||||
|
// Search fields
|
||||||
$search = GETPOST("search", 'alpha');
|
$search = GETPOST("search", 'alpha');
|
||||||
$search_ref = GETPOST("search_ref", 'alpha');
|
$search_ref = GETPOST("search_ref", 'alpha');
|
||||||
$search_lastname = GETPOST("search_lastname", 'alpha');
|
$search_lastname = GETPOST("search_lastname", 'alpha');
|
||||||
|
|||||||
@ -23,25 +23,34 @@
|
|||||||
* \brief Tab for note of a member
|
* \brief Tab for note of a member
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "members", "bills"));
|
$langs->loadLangs(array("companies", "members", "bills"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alphanohtml');
|
$ref = GETPOST('ref', 'alphanohtml');
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
|
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
$result = $adht->fetch($object->typeid);
|
$result = $adht->fetch($object->typeid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$permissionnote = $user->rights->adherent->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->adherent->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
// Fetch object
|
// Fetch object
|
||||||
|
|||||||
@ -487,6 +487,7 @@ $typeid = $type;
|
|||||||
|
|
||||||
// List of products or services (type is type of category)
|
// List of products or services (type is type of category)
|
||||||
if ($type == Categorie::TYPE_PRODUCT) {
|
if ($type == Categorie::TYPE_PRODUCT) {
|
||||||
|
if ($user->hasRight("product", "read")) {
|
||||||
$permission = ($user->rights->produit->creer || $user->rights->service->creer);
|
$permission = ($user->rights->produit->creer || $user->rights->service->creer);
|
||||||
|
|
||||||
$prods = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
$prods = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||||
@ -560,10 +561,15 @@ if ($type == Categorie::TYPE_PRODUCT) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("ProductsAndServices"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'products');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of customers
|
// List of customers
|
||||||
if ($type == Categorie::TYPE_CUSTOMER) {
|
if ($type == Categorie::TYPE_CUSTOMER) {
|
||||||
|
if ($user->hasRight("societe", "read")) {
|
||||||
$permission = $user->rights->societe->creer;
|
$permission = $user->rights->societe->creer;
|
||||||
|
|
||||||
$socs = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
$socs = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||||
@ -635,10 +641,15 @@ if ($type == Categorie::TYPE_CUSTOMER) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Customers"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'companies');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of suppliers
|
// List of suppliers
|
||||||
if ($type == Categorie::TYPE_SUPPLIER) {
|
if ($type == Categorie::TYPE_SUPPLIER) {
|
||||||
|
if ($user->hasRight("fournisseur", "read")) {
|
||||||
$permission = $user->rights->societe->creer;
|
$permission = $user->rights->societe->creer;
|
||||||
|
|
||||||
$socs = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
$socs = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||||
@ -711,10 +722,15 @@ if ($type == Categorie::TYPE_SUPPLIER) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Suppliers"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'companies');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of members
|
// List of members
|
||||||
if ($type == Categorie::TYPE_MEMBER) {
|
if ($type == Categorie::TYPE_MEMBER) {
|
||||||
|
if ($user->hasRight("adherent", "read")) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
|
|
||||||
$permission = $user->rights->adherent->creer;
|
$permission = $user->rights->adherent->creer;
|
||||||
@ -790,10 +806,15 @@ if ($type == Categorie::TYPE_MEMBER) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Member"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'members');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of contacts
|
// List of contacts
|
||||||
if ($type == Categorie::TYPE_CONTACT) {
|
if ($type == Categorie::TYPE_CONTACT) {
|
||||||
|
if ($user->hasRight("societe", "read")) {
|
||||||
$permission = $user->rights->societe->creer;
|
$permission = $user->rights->societe->creer;
|
||||||
|
|
||||||
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||||
@ -872,10 +893,15 @@ if ($type == Categorie::TYPE_CONTACT) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Contact"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'contact');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of bank accounts
|
// List of bank accounts
|
||||||
if ($type == Categorie::TYPE_ACCOUNT) {
|
if ($type == Categorie::TYPE_ACCOUNT) {
|
||||||
|
if ($user->hasRight("banque", "read")) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$permission = $user->rights->banque->creer;
|
$permission = $user->rights->banque->creer;
|
||||||
@ -949,10 +975,15 @@ if ($type == Categorie::TYPE_ACCOUNT) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Banque"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'bank');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of Project
|
// List of Project
|
||||||
if ($type == Categorie::TYPE_PROJECT) {
|
if ($type == Categorie::TYPE_PROJECT) {
|
||||||
|
if ($user->hasRight("project", "read")) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
$permission = $user->rights->projet->creer;
|
$permission = $user->rights->projet->creer;
|
||||||
@ -1027,10 +1058,15 @@ if ($type == Categorie::TYPE_PROJECT) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Project"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'project');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of users
|
// List of users
|
||||||
if ($type == Categorie::TYPE_USER && $user->hasRight("user", "user", "read")) {
|
if ($type == Categorie::TYPE_USER) {
|
||||||
|
if ($user->hasRight("user", "user", "read")) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
|
|
||||||
$users = $object->getObjectsInCateg($type);
|
$users = $object->getObjectsInCateg($type);
|
||||||
@ -1103,10 +1139,12 @@ if ($type == Categorie::TYPE_USER && $user->hasRight("user", "user", "read")) {
|
|||||||
print_barre_liste($langs->trans("Users"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'user');
|
print_barre_liste($langs->trans("Users"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'user');
|
||||||
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// List of warehouses
|
// List of warehouses
|
||||||
if ($type == Categorie::TYPE_WAREHOUSE) {
|
if ($type == Categorie::TYPE_WAREHOUSE) {
|
||||||
|
if ($user->hasRight("warehouse", "read")) {
|
||||||
$permission = $user->rights->stock->creer;
|
$permission = $user->rights->stock->creer;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||||
@ -1161,10 +1199,15 @@ if ($type == Categorie::TYPE_WAREHOUSE) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Warehouse"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'stock');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of tickets
|
// List of tickets
|
||||||
if ($type == Categorie::TYPE_TICKET) {
|
if ($type == Categorie::TYPE_TICKET) {
|
||||||
|
if ($user->hasRight("ticket", "read")) {
|
||||||
$permission = ($user->rights->categorie->creer || $user->rights->categorie->creer);
|
$permission = ($user->rights->categorie->creer || $user->rights->categorie->creer);
|
||||||
|
|
||||||
$tickets = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
$tickets = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||||
@ -1235,6 +1278,10 @@ if ($type == Categorie::TYPE_TICKET) {
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print_barre_liste($langs->trans("Ticket"), null, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'ticket');
|
||||||
|
accessforbidden($langs->trans("NotEnoughPermissions"), 0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class AgendaEvents extends DolibarrApi
|
|||||||
if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) {
|
if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) {
|
||||||
$search_sale = DolibarrApiAccess::$user->id;
|
$search_sale = DolibarrApiAccess::$user->id;
|
||||||
}
|
}
|
||||||
if (empty($conf->societe->enabled)) {
|
if (!isModEnabled('societe')) {
|
||||||
$search_sale = 0; // If module thirdparty not enabled, sale representative is something that does not exists
|
$search_sale = 0; // If module thirdparty not enabled, sale representative is something that does not exists
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,8 @@
|
|||||||
* \brief Home page of customer order module
|
* \brief Home page of customer order module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
||||||
@ -32,6 +34,11 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('orders', 'bills'));
|
||||||
|
|
||||||
|
|
||||||
if (!$user->rights->commande->lire) {
|
if (!$user->rights->commande->lire) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
@ -41,8 +48,6 @@ $hookmanager = new HookManager($db);
|
|||||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||||
$hookmanager->initHooks(array('ordersindex'));
|
$hookmanager->initHooks(array('ordersindex'));
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array('orders', 'bills'));
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
|
|||||||
@ -236,7 +236,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers
|
|||||||
// case 'ORDER_SUPPLIER_REFUSE':
|
// case 'ORDER_SUPPLIER_REFUSE':
|
||||||
// case 'ORDER_SUPPLIER_CANCEL':
|
// case 'ORDER_SUPPLIER_CANCEL':
|
||||||
// case 'ORDER_SUPPLIER_SENTBYMAIL':
|
// case 'ORDER_SUPPLIER_SENTBYMAIL':
|
||||||
// case 'ORDER_SUPPLIER_DISPATCH':
|
// case 'ORDER_SUPPLIER_RECEIVE':
|
||||||
// case 'LINEORDER_SUPPLIER_DISPATCH':
|
// case 'LINEORDER_SUPPLIER_DISPATCH':
|
||||||
// case 'LINEORDER_SUPPLIER_CREATE':
|
// case 'LINEORDER_SUPPLIER_CREATE':
|
||||||
// case 'LINEORDER_SUPPLIER_UPDATE':
|
// case 'LINEORDER_SUPPLIER_UPDATE':
|
||||||
|
|||||||
@ -460,7 +460,7 @@ if ($action == 'create') {
|
|||||||
print $form->selectyesno("public", $public_donation, 1);
|
print $form->selectyesno("public", $public_donation, 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
if (empty($conf->societe->enabled) || empty($conf->global->DONATION_USE_THIRDPARTIES)) {
|
if (!isModEnabled('societe') || empty($conf->global->DONATION_USE_THIRDPARTIES)) {
|
||||||
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" value="'.dol_escape_htmltag(GETPOST("societe")).'" class="maxwidth200"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" value="'.dol_escape_htmltag(GETPOST("societe")).'" class="maxwidth200"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" value="'.dol_escape_htmltag(GETPOST("lastname")).'" class="maxwidth200"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" value="'.dol_escape_htmltag(GETPOST("lastname")).'" class="maxwidth200"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" value="'.dol_escape_htmltag(GETPOST("firstname")).'" class="maxwidth200"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" value="'.dol_escape_htmltag(GETPOST("firstname")).'" class="maxwidth200"></td></tr>';
|
||||||
|
|||||||
@ -314,7 +314,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
|||||||
$rowspan++; $sectionauto[] = array('position'=>10, 'level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || isModEnabled("service")), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts"));
|
$rowspan++; $sectionauto[] = array('position'=>10, 'level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || isModEnabled("service")), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts"));
|
||||||
}
|
}
|
||||||
if (isModEnabled("societe")) {
|
if (isModEnabled("societe")) {
|
||||||
$rowspan++; $sectionauto[] = array('position'=>20, 'level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties")));
|
$rowspan++; $sectionauto[] = array('position'=>20, 'level'=>1, 'module'=>'company', 'test'=>isModEnabled('societe'), 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties")));
|
||||||
}
|
}
|
||||||
if (isModEnabled("propal")) {
|
if (isModEnabled("propal")) {
|
||||||
$rowspan++; $sectionauto[] = array('position'=>30, 'level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
$rowspan++; $sectionauto[] = array('position'=>30, 'level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
||||||
|
|||||||
@ -117,7 +117,7 @@ if (isModEnabled("product") || isModEnabled("service")) {
|
|||||||
$langs->load("products"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || isModEnabled("service")), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts"));
|
$langs->load("products"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'product', 'test'=>(isModEnabled("product") || isModEnabled("service")), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts"));
|
||||||
}
|
}
|
||||||
if (isModEnabled("societe")) {
|
if (isModEnabled("societe")) {
|
||||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties")));
|
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'company', 'test'=>isModEnabled('societe'), 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ThirdParties")));
|
||||||
}
|
}
|
||||||
if (isModEnabled("propal")) {
|
if (isModEnabled("propal")) {
|
||||||
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
$rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Proposals")));
|
||||||
|
|||||||
@ -373,19 +373,6 @@ if ($action == 'dispatch' && $permissiontoreceive) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
|
||||||
global $conf, $langs, $user;
|
|
||||||
// Call trigger
|
|
||||||
|
|
||||||
$result = $object->call_trigger('ORDER_SUPPLIER_DISPATCH', $user);
|
|
||||||
// End call triggers
|
|
||||||
|
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($result >= 0 && !$error) {
|
if ($result >= 0 && !$error) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
|
|||||||
@ -177,7 +177,7 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers
|
|||||||
//case 'ORDER_SUPPLIER_REFUSE':
|
//case 'ORDER_SUPPLIER_REFUSE':
|
||||||
//case 'ORDER_SUPPLIER_CANCEL':
|
//case 'ORDER_SUPPLIER_CANCEL':
|
||||||
//case 'ORDER_SUPPLIER_SENTBYMAIL':
|
//case 'ORDER_SUPPLIER_SENTBYMAIL':
|
||||||
//case 'ORDER_SUPPLIER_DISPATCH':
|
//case 'ORDER_SUPPLIER_RECEIVE':
|
||||||
//case 'LINEORDER_SUPPLIER_DISPATCH':
|
//case 'LINEORDER_SUPPLIER_DISPATCH':
|
||||||
//case 'LINEORDER_SUPPLIER_CREATE':
|
//case 'LINEORDER_SUPPLIER_CREATE':
|
||||||
//case 'LINEORDER_SUPPLIER_UPDATE':
|
//case 'LINEORDER_SUPPLIER_UPDATE':
|
||||||
|
|||||||
@ -41,6 +41,8 @@
|
|||||||
* \brief Page to show product
|
* \brief Page to show product
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';
|
||||||
@ -88,6 +90,7 @@ $mesg = ''; $error = 0; $errors = array();
|
|||||||
|
|
||||||
$refalreadyexists = 0;
|
$refalreadyexists = 0;
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'alpha') : null);
|
$ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'alpha') : null);
|
||||||
$type = (GETPOSTISSET('type') ? GETPOST('type', 'int') : Product::TYPE_PRODUCT);
|
$type = (GETPOSTISSET('type') ? GETPOST('type', 'int') : Product::TYPE_PRODUCT);
|
||||||
@ -107,6 +110,7 @@ $accountancy_code_buy_intra = GETPOST('accountancy_code_buy_intra', 'alpha');
|
|||||||
$accountancy_code_buy_export = GETPOST('accountancy_code_buy_export', 'alpha');
|
$accountancy_code_buy_export = GETPOST('accountancy_code_buy_export', 'alpha');
|
||||||
|
|
||||||
$checkmandatory = GETPOST('accountancy_code_buy_export', 'alpha');
|
$checkmandatory = GETPOST('accountancy_code_buy_export', 'alpha');
|
||||||
|
|
||||||
// by default 'alphanohtml' (better security); hidden conf MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML allows basic html
|
// by default 'alphanohtml' (better security); hidden conf MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML allows basic html
|
||||||
$label_security_check = empty($conf->global->MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML) ? 'alphanohtml' : 'restricthtml';
|
$label_security_check = empty($conf->global->MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML) ? 'alphanohtml' : 'restricthtml';
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,8 @@
|
|||||||
* \brief Page des documents joints sur les produits
|
* \brief Page des documents joints sur les produits
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
@ -38,9 +40,12 @@ if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL)) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('other', 'products'));
|
$langs->loadLangs(array('other', 'products'));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
@ -74,7 +79,7 @@ if (!$sortfield) {
|
|||||||
$sortfield = "position_name";
|
$sortfield = "position_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
$result = $object->fetch($id, $ref);
|
$result = $object->fetch($id, $ref);
|
||||||
@ -93,6 +98,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$modulepart = 'produit';
|
$modulepart = 'produit';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,8 @@
|
|||||||
* \brief Homepage products and services
|
* \brief Homepage products and services
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
@ -47,6 +49,7 @@ $langs->loadLangs(array('products', 'stocks'));
|
|||||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
|
||||||
$hookmanager->initHooks(array('productindex'));
|
$hookmanager->initHooks(array('productindex'));
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$product_static = new Product($db);
|
$product_static = new Product($db);
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -33,6 +33,8 @@
|
|||||||
* \brief Page to list products and services
|
* \brief Page to list products and services
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||||
@ -51,12 +53,15 @@ if (!empty($conf->productbatch->enabled)) {
|
|||||||
$langs->load("productbatch");
|
$langs->load("productbatch");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$massaction = GETPOST('massaction', 'alpha');
|
$massaction = GETPOST('massaction', 'alpha');
|
||||||
$show_files = GETPOST('show_files', 'int');
|
$show_files = GETPOST('show_files', 'int');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
|
|
||||||
|
// Search Criterias
|
||||||
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||||
$search_id = GETPOST("search_id", 'alpha');
|
$search_id = GETPOST("search_id", 'alpha');
|
||||||
$search_ref = GETPOST("search_ref", 'alpha');
|
$search_ref = GETPOST("search_ref", 'alpha');
|
||||||
|
|||||||
@ -199,7 +199,7 @@ foreach ($object->fields as $key => $val) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||||
|
|
||||||
// Add non object fields to fields for list
|
// Add non object fields to fields for list
|
||||||
$arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>21, 'enabled'=>(empty($conf->societe->enabled) ? 0 : 1));
|
$arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>21, 'enabled'=>(!isModEnabled('societe') ? 0 : 1));
|
||||||
$arrayfields['s.name_alias'] = array('label'=>"AliasNameShort", 'checked'=>0, 'position'=>22);
|
$arrayfields['s.name_alias'] = array('label'=>"AliasNameShort", 'checked'=>0, 'position'=>22);
|
||||||
$arrayfields['commercial'] = array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0, 'position'=>23);
|
$arrayfields['commercial'] = array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0, 'position'=>23);
|
||||||
$arrayfields['c.assigned'] = array('label'=>$langs->trans("AssignedTo"), 'checked'=>-1, 'position'=>120);
|
$arrayfields['c.assigned'] = array('label'=>$langs->trans("AssignedTo"), 'checked'=>-1, 'position'=>120);
|
||||||
|
|||||||
@ -34,6 +34,8 @@
|
|||||||
* \brief Third party card page
|
* \brief Third party card page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
@ -62,7 +64,10 @@ if (! empty($conf->eventorganization->enabled)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
|
||||||
$langs->loadLangs(array("companies", "commercial", "bills", "banks", "users"));
|
$langs->loadLangs(array("companies", "commercial", "bills", "banks", "users"));
|
||||||
|
|
||||||
if (!empty($conf->adherent->enabled)) {
|
if (!empty($conf->adherent->enabled)) {
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
}
|
}
|
||||||
@ -81,6 +86,8 @@ if (!empty($conf->accounting->enabled)) {
|
|||||||
|
|
||||||
$error = 0; $errors = array();
|
$error = 0; $errors = array();
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view');
|
$action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
@ -96,6 +103,7 @@ if ($user->socid) {
|
|||||||
if (empty($socid) && $action == 'view') {
|
if (empty($socid) && $action == 'view') {
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = $socid;
|
$id = $socid;
|
||||||
|
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
@ -128,6 +136,7 @@ if (!empty($canvas)) {
|
|||||||
$objcanvas->getCanvas('thirdparty', 'card', $canvas);
|
$objcanvas->getCanvas('thirdparty', 'card', $canvas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permissions
|
||||||
$permissiontoread = $user->rights->societe->lire;
|
$permissiontoread = $user->rights->societe->lire;
|
||||||
$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
$permissiontodelete = $user->rights->societe->supprimer || ($permissiontoadd && isset($object->status) && $object->status == 0);
|
$permissiontodelete = $user->rights->societe->supprimer || ($permissiontoadd && isset($object->status) && $object->status == 0);
|
||||||
|
|||||||
@ -550,7 +550,7 @@ class Thirdparties extends DolibarrApi
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (empty($conf->societe->enabled)) {
|
if (!isModEnabled('societe')) {
|
||||||
throw new RestException(501, 'Module "Thirdparties" needed for this request');
|
throw new RestException(501, 'Module "Thirdparties" needed for this request');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,12 +26,18 @@
|
|||||||
* \brief Add a tab on thirdparty view to list all products/services bought or sells by thirdparty
|
* \brief Add a tab on thirdparty view to list all products/services bought or sells by thirdparty
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require "../main.inc.php";
|
require "../main.inc.php";
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products"));
|
||||||
|
|
||||||
|
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist';
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist';
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -78,12 +84,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||||||
$year = '';
|
$year = '';
|
||||||
$month = '';
|
$month = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Customer or supplier selected in drop box
|
// Customer or supplier selected in drop box
|
||||||
$thirdTypeSelect = GETPOST("third_select_id", 'az09');
|
$thirdTypeSelect = GETPOST("third_select_id", 'az09');
|
||||||
$type_element = GETPOST('type_element') ? GETPOST('type_element') : '';
|
$type_element = GETPOST('type_element') ? GETPOST('type_element') : '';
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products"));
|
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('consumptionthirdparty', 'globalcard'));
|
$hookmanager->initHooks(array('consumptionthirdparty', 'globalcard'));
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
* \brief Page of contacts of thirdparties
|
* \brief Page of contacts of thirdparties
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
@ -46,7 +47,9 @@ if (!empty($conf->adherent->enabled)) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "commercial", "bills", "banks", "users"));
|
$langs->loadLangs(array("companies", "commercial", "bills", "banks", "users"));
|
||||||
|
|
||||||
if (!empty($conf->categorie->enabled)) {
|
if (!empty($conf->categorie->enabled)) {
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
}
|
}
|
||||||
@ -59,18 +62,23 @@ if (!empty($conf->notification->enabled)) {
|
|||||||
|
|
||||||
$mesg = ''; $error = 0; $errors = array();
|
$mesg = ''; $error = 0; $errors = array();
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view');
|
$action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
||||||
|
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($socid) && $action == 'view') {
|
if (empty($socid) && $action == 'view') {
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
|||||||
@ -26,27 +26,33 @@
|
|||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "other"));
|
$langs->loadLangs(array("companies", "other"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'));
|
$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'));
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
|
|
||||||
// Get parameters
|
|
||||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
|
|
||||||
if (empty($page) || $page == -1) {
|
if (empty($page) || $page == -1) {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
} // If $page is not defined, or '' or -1
|
} // If $page is not defined, or '' or -1
|
||||||
|
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
@ -65,6 +71,7 @@ if (!$sortfield) {
|
|||||||
$sortfield = "position_name";
|
$sortfield = "position_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
$result = $object->fetch($id, $ref);
|
$result = $object->fetch($id, $ref);
|
||||||
|
|||||||
@ -27,16 +27,21 @@
|
|||||||
* \brief Home page for third parties area
|
* \brief Home page for third parties area
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
|
|
||||||
$hookmanager = new HookManager($db);
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
|
||||||
|
$hookmanager = new HookManager($db);
|
||||||
$hookmanager->initHooks(array('thirdpartiesindex'));
|
$hookmanager->initHooks(array('thirdpartiesindex'));
|
||||||
|
|
||||||
$langs->load("companies");
|
|
||||||
|
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
@ -51,6 +56,7 @@ $thirdparty_static = new Societe($db);
|
|||||||
if (!isset($form) || !is_object($form)) {
|
if (!isset($form) || !is_object($form)) {
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load $resultboxes
|
// Load $resultboxes
|
||||||
$resultboxes = FormOther::getBoxesArea($user, "3");
|
$resultboxes = FormOther::getBoxesArea($user, "3");
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,8 @@
|
|||||||
* \brief Page to show list of third parties
|
* \brief Page to show list of third parties
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
@ -42,8 +44,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "commercial", "customers", "suppliers", "bills", "compta", "categories", "cashdesk"));
|
$langs->loadLangs(array("companies", "commercial", "customers", "suppliers", "bills", "compta", "categories", "cashdesk"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$massaction = GETPOST('massaction', 'alpha');
|
$massaction = GETPOST('massaction', 'alpha');
|
||||||
$show_files = GETPOST('show_files', 'int');
|
$show_files = GETPOST('show_files', 'int');
|
||||||
@ -51,11 +57,14 @@ $confirm = GETPOST('confirm', 'alpha');
|
|||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist';
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist';
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
|
|
||||||
if ($contextpage == 'poslist') {
|
if ($contextpage == 'poslist') {
|
||||||
$optioncss = 'print';
|
$optioncss = 'print';
|
||||||
}
|
}
|
||||||
|
|
||||||
$mode = GETPOST("mode", 'alpha');
|
$mode = GETPOST("mode", 'alpha');
|
||||||
|
|
||||||
|
// search fields
|
||||||
$search_all = trim(GETPOST('search_all', 'alphanohtml') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
$search_all = trim(GETPOST('search_all', 'alphanohtml') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||||
$search_cti = preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars
|
$search_cti = preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars
|
||||||
|
|
||||||
@ -98,6 +107,7 @@ $search_stcomm = GETPOST('search_stcomm', 'int');
|
|||||||
$search_import_key = trim(GETPOST("search_import_key", "alpha"));
|
$search_import_key = trim(GETPOST("search_import_key", "alpha"));
|
||||||
$search_parent_name = trim(GETPOST('search_parent_name', 'alpha'));
|
$search_parent_name = trim(GETPOST('search_parent_name', 'alpha'));
|
||||||
|
|
||||||
|
|
||||||
$type = GETPOST('type', 'alpha');
|
$type = GETPOST('type', 'alpha');
|
||||||
$place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant
|
$place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant
|
||||||
|
|
||||||
|
|||||||
@ -26,20 +26,28 @@
|
|||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$id = GETPOST('id') ?GETPOST('id', 'int') : GETPOST('socid', 'int');
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
|
$id = GETPOST('id') ?GETPOST('id', 'int') : GETPOST('socid', 'int');
|
||||||
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permissions
|
||||||
$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
@ -50,6 +58,7 @@ if ($user->socid > 0) {
|
|||||||
unset($action);
|
unset($action);
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = restrictedArea($user, 'societe', $object->id, '&societe');
|
$result = restrictedArea($user, 'societe', $object->id, '&societe');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,8 @@
|
|||||||
* \brief Tab of payment modes for the customer
|
* \brief Tab of payment modes for the customer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||||
@ -40,8 +42,11 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "commercial", "banks", "bills", 'paypal', 'stripe', 'withdrawals'));
|
$langs->loadLangs(array("companies", "commercial", "banks", "bills", 'paypal', 'stripe', 'withdrawals'));
|
||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST("socid", "int");
|
$socid = GETPOST("socid", "int");
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
@ -49,12 +54,15 @@ if ($user->socid) {
|
|||||||
}
|
}
|
||||||
$result = restrictedArea($user, 'societe', '', '');
|
$result = restrictedArea($user, 'societe', '', '');
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$id = GETPOST("id", "int");
|
$id = GETPOST("id", "int");
|
||||||
$source = GETPOST("source", "alpha"); // source can be a source or a paymentmode
|
$source = GETPOST("source", "alpha"); // source can be a source or a paymentmode
|
||||||
$ribid = GETPOST("ribid", "int");
|
$ribid = GETPOST("ribid", "int");
|
||||||
$action = GETPOST("action", 'alpha', 3);
|
$action = GETPOST("action", 'alpha', 3);
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
$object->fetch($socid);
|
$object->fetch($socid);
|
||||||
|
|
||||||
@ -70,6 +78,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
|||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('thirdpartybancard', 'globalcard'));
|
$hookmanager->initHooks(array('thirdpartybancard', 'globalcard'));
|
||||||
|
|
||||||
|
// Permissions
|
||||||
$permissiontoread = $user->rights->societe->lire;
|
$permissiontoread = $user->rights->societe->lire;
|
||||||
$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_builddoc.inc.php
|
$permissiontoadd = $user->rights->societe->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_builddoc.inc.php
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,8 @@
|
|||||||
* \brief Page to show product prices by customer
|
* \brief Page to show product prices by customer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
@ -38,8 +40,12 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
|
|||||||
$prodcustprice = new Productcustomerprice($db);
|
$prodcustprice = new Productcustomerprice($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("products", "companies", "bills"));
|
$langs->loadLangs(array("products", "companies", "bills"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$search_prod = GETPOST('search_prod', 'alpha');
|
$search_prod = GETPOST('search_prod', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
@ -54,6 +60,7 @@ if ($user->socid) {
|
|||||||
}
|
}
|
||||||
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
|||||||
@ -28,11 +28,14 @@
|
|||||||
* \brief Page of third party projects
|
* \brief Page of third party projects
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
$langs->loadLangs(array("companies", "projects"));
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('companies', 'projects'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
|
|||||||
@ -26,14 +26,18 @@
|
|||||||
* \brief Onglet de gestion des contacts additionnel d'une société
|
* \brief Onglet de gestion des contacts additionnel d'une société
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
|
||||||
$langs->loadLangs(array("orders", "companies"));
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('companies', 'orders'));
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('socid', 'int');
|
$id = GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('socid', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
@ -62,6 +66,8 @@ if ($user->socid) {
|
|||||||
}
|
}
|
||||||
$result = restrictedArea($user, 'societe', $id, '');
|
$result = restrictedArea($user, 'societe', $id, '');
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
|||||||
@ -28,6 +28,8 @@
|
|||||||
* \brief Page of web sites accounts
|
* \brief Page of web sites accounts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
@ -35,8 +37,12 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "website"));
|
$langs->loadLangs(array("companies", "website"));
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||||
$show_files = GETPOST('show_files', 'int');
|
$show_files = GETPOST('show_files', 'int');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search
|
||||||
|
|||||||
@ -21,11 +21,12 @@
|
|||||||
* \brief Page with events on ticket
|
* \brief Page with events on ticket
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT."/core/lib/company.lib.php";
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
@ -64,6 +65,7 @@ if (GETPOST('actioncode', 'array')) {
|
|||||||
} else {
|
} else {
|
||||||
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
||||||
}
|
}
|
||||||
|
|
||||||
$search_agenda_label = GETPOST('search_agenda_label');
|
$search_agenda_label = GETPOST('search_agenda_label');
|
||||||
|
|
||||||
$object = new Ticket($db);
|
$object = new Ticket($db);
|
||||||
|
|||||||
@ -30,6 +30,7 @@ if (!defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1);
|
|||||||
|
|
||||||
//header('X-XSS-Protection:0'); // Disable XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated.
|
//header('X-XSS-Protection:0'); // Disable XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated.
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
@ -45,8 +46,10 @@ require_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("admin", "other", "website", "errors"));
|
$langs->loadLangs(array("admin", "other", "website", "errors"));
|
||||||
|
|
||||||
|
// Security check
|
||||||
if (!$user->rights->website->read) {
|
if (!$user->rights->website->read) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,6 +68,7 @@ if (empty($action) && empty($id) && empty($ref)) {
|
|||||||
//if ($user->socid > 0) $socid = $user->socid;
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
//$result = restrictedArea($user, 'website', $id);
|
//$result = restrictedArea($user, 'website', $id);
|
||||||
|
|
||||||
|
// Permissions
|
||||||
$permissionnote = $user->rights->websiteaccount->write; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->websiteaccount->write; // Used by the include of actions_setnotes.inc.php
|
||||||
$permissiondellink = $user->rights->websiteaccount->write; // Used by the include of actions_dellink.inc.php
|
$permissiondellink = $user->rights->websiteaccount->write; // Used by the include of actions_dellink.inc.php
|
||||||
$permissiontoadd = $user->rights->websiteaccount->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
$permissiontoadd = $user->rights->websiteaccount->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user