mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-27 20:01:26 +01:00
Merge branch 'develop' into extrafields_object_filter
This commit is contained in:
@@ -3024,30 +3024,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../htdocs/bom/tpl/objectline_title.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access property \$db on mixed\.$#'
|
||||
identifier: property.nonObject
|
||||
count: 2
|
||||
path: ../../htdocs/bom/tpl/objectline_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access property \$id on mixed\.$#'
|
||||
identifier: property.nonObject
|
||||
count: 4
|
||||
path: ../../htdocs/bom/tpl/objectline_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access property \$status on mixed\.$#'
|
||||
identifier: property.nonObject
|
||||
count: 1
|
||||
path: ../../htdocs/bom/tpl/objectline_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Cannot access property \$total_cost on mixed\.$#'
|
||||
identifier: property.nonObject
|
||||
count: 1
|
||||
path: ../../htdocs/bom/tpl/objectline_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Property CommonDict\:\:\$label \(string\) in isset\(\) is not nullable\.$#'
|
||||
identifier: isset.property
|
||||
@@ -3060,12 +3036,6 @@ parameters:
|
||||
count: 2
|
||||
path: ../../htdocs/bom/tpl/objectline_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$this might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 8
|
||||
path: ../../htdocs/bom/tpl/objectline_view.tpl.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
@@ -3114,36 +3084,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../htdocs/bookcal/availabilities_card.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
count: 1
|
||||
path: ../../htdocs/bookcal/availabilities_contact.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always false\.$#'
|
||||
identifier: booleanNot.alwaysFalse
|
||||
count: 1
|
||||
path: ../../htdocs/bookcal/availabilities_contact.php
|
||||
|
||||
-
|
||||
message: '#^Right side of && is always true\.$#'
|
||||
identifier: booleanAnd.rightAlwaysTrue
|
||||
count: 2
|
||||
path: ../../htdocs/bookcal/availabilities_contact.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
count: 1
|
||||
path: ../../htdocs/bookcal/availabilities_document.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always false\.$#'
|
||||
identifier: booleanNot.alwaysFalse
|
||||
count: 1
|
||||
path: ../../htdocs/bookcal/availabilities_document.php
|
||||
|
||||
-
|
||||
message: '#^Empty array passed to foreach\.$#'
|
||||
identifier: foreach.emptyArray
|
||||
@@ -3168,18 +3108,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../htdocs/bookcal/availabilities_list.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
count: 1
|
||||
path: ../../htdocs/bookcal/availabilities_note.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always false\.$#'
|
||||
identifier: booleanNot.alwaysFalse
|
||||
count: 1
|
||||
path: ../../htdocs/bookcal/availabilities_note.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
@@ -21156,102 +21084,12 @@ parameters:
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Left side of && is always true\.$#'
|
||||
identifier: booleanAnd.leftAlwaysTrue
|
||||
count: 2
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\<mixed\>\|string given\.$#'
|
||||
identifier: argument.type
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$formquestion might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$i might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$moreforfilter might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$multicurrency_creditnotes might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$multicurrency_deposits might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$multicurrency_payment might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$multicurrency_remaintopay might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$objcanvas might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$ref might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$sign might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$text might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../htdocs/fourn/facture/paiement.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$obj might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
@@ -28506,72 +28344,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../htdocs/public/clicktodial/cidlookup.php
|
||||
|
||||
-
|
||||
message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
count: 1
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
count: 1
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always false\.$#'
|
||||
identifier: booleanNot.alwaysFalse
|
||||
count: 1
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$conf might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$db might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 11
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$ext in empty\(\) always exists and is always falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$hookmanager might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 4
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$langs might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 23
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$object might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$php_self might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$user might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 4
|
||||
path: ../../htdocs/public/company/new.php
|
||||
|
||||
-
|
||||
message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
@@ -28812,36 +28584,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../htdocs/public/members/public_list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$conf might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 3
|
||||
path: ../../htdocs/public/members/public_list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$db might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 12
|
||||
path: ../../htdocs/public/members/public_list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$langs might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 6
|
||||
path: ../../htdocs/public/members/public_list.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$db might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../htdocs/public/notice.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$langs might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../htdocs/public/notice.php
|
||||
|
||||
-
|
||||
message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#'
|
||||
identifier: function.alreadyNarrowedType
|
||||
|
||||
@@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
||||
@@ -526,7 +526,7 @@ if ($type == Categorie::TYPE_PRODUCT) {
|
||||
$permission = ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer'));
|
||||
$showclassifyform = ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer'));
|
||||
|
||||
$prods = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||
$prods = $object->getObjectsInCateg($type, 0, $limit, $offset, 'ref');
|
||||
if ($prods < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
} else {
|
||||
@@ -606,7 +606,7 @@ if ($type == Categorie::TYPE_CUSTOMER) {
|
||||
$permission = $user->hasRight('societe', 'creer');
|
||||
$showclassifyform = $user->hasRight('societe', 'creer');
|
||||
|
||||
$socs = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||
$socs = $object->getObjectsInCateg($type, 0, $limit, $offset, 'nom');
|
||||
if ($socs < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
} else {
|
||||
@@ -686,7 +686,7 @@ if ($type == Categorie::TYPE_SUPPLIER) {
|
||||
$permission = $user->hasRight('societe', 'creer');
|
||||
$showclassifyform = $user->hasRight('societe', 'creer');
|
||||
|
||||
$socs = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||
$socs = $object->getObjectsInCateg($type, 0, $limit, $offset, 'nom');
|
||||
|
||||
if ($socs < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
@@ -770,7 +770,7 @@ if ($type == Categorie::TYPE_MEMBER) {
|
||||
$permission = $user->hasRight('adherent', 'creer');
|
||||
$showclassifyform = $user->hasRight('adherent', 'creer');
|
||||
|
||||
$members = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||
$members = $object->getObjectsInCateg($type, 0, $limit, $offset, 'lastname');
|
||||
if ($members < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
} else {
|
||||
@@ -852,7 +852,7 @@ if ($type == Categorie::TYPE_CONTACT) {
|
||||
$permission = $user->hasRight('societe', 'creer');
|
||||
$showclassifyform = $user->hasRight('societe', 'creer');
|
||||
|
||||
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset);
|
||||
$contacts = $object->getObjectsInCateg($type, 0, $limit, $offset, 'lastname');
|
||||
if (is_numeric($contacts) && $contacts < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
} else {
|
||||
@@ -1103,7 +1103,7 @@ if ($type == Categorie::TYPE_USER) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
$showclassifyform = $user->hasRight("user", "user", "creer");
|
||||
|
||||
$users = $object->getObjectsInCateg($type);
|
||||
$users = $object->getObjectsInCateg($type, 0, 0, 0, 'lastname');
|
||||
if ($users < 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
} else {
|
||||
|
||||
@@ -163,12 +163,23 @@ function getMultidirOutput($object, $module = '', $forobject = 0, $mode = 'outpu
|
||||
$s .= ($mode != 'outputrel' ? '/' : '').get_exdir(0, 0, 0, 0, $object);
|
||||
}
|
||||
return $s;
|
||||
} elseif (isset($conf->$module) && property_exists($conf->$module, 'dir_output')) {
|
||||
$s = '';
|
||||
if ($mode != 'outputrel') {
|
||||
$s = $conf->$module->dir_output;
|
||||
}
|
||||
if ($forobject && $object->id > 0) {
|
||||
$s .= ($mode != 'outputrel' ? '/' : '').get_exdir(0, 0, 0, 0, $object);
|
||||
}
|
||||
return $s;
|
||||
} else {
|
||||
return 'error-diroutput-not-defined-for-this-object='.$module;
|
||||
}
|
||||
} elseif ($mode == 'temp') {
|
||||
if (isset($conf->$module) && property_exists($conf->$module, 'multidir_temp')) {
|
||||
return $conf->$module->multidir_temp[(empty($object->entity) ? $conf->entity : $object->entity)];
|
||||
} elseif (isset($conf->$module) && property_exists($conf->$module, 'dir_temp')) {
|
||||
return $conf->$module->dir_temp;
|
||||
} else {
|
||||
return 'error-dirtemp-not-defined-for-this-object='.$module;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ class modCommande extends DolibarrModules
|
||||
$this->export_label[$r] = 'CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_permission[$r] = array(array("commande", "commande", "export"));
|
||||
$this->export_fields_array[$r] = array(
|
||||
's.rowid' => "IdCompany", 's.nom' => 'CompanyName', 'ps.nom' => 'ParentCompany', 's.code_client' => 'CustomerCode', 's.address' => 'Address', 's.zip' => 'Zip', 's.town' => 'Town', 'd.nom' => 'State', 'co.label' => 'Country',
|
||||
's.rowid' => "IdCompany", 's.nom' => 'CompanyName', 's.name_alias' => 'AliasNameShort', 'ps.nom' => 'ParentCompany', 's.code_client' => 'CustomerCode', 's.address' => 'Address', 's.zip' => 'Zip', 's.town' => 'Town', 'd.nom' => 'State', 'co.label' => 'Country',
|
||||
'co.code' => "CountryCode", 's.phone' => 'Phone', 's.siren' => 'ProfId1', 's.siret' => 'ProfId2', 's.ape' => 'ProfId3', 's.idprof4' => 'ProfId4', 'c.rowid' => "Id",
|
||||
'c.ref' => "Ref", 'c.ref_client' => "RefCustomer", 'c.fk_soc' => "IdCompany", 'c.date_creation' => "DateCreation", 'c.date_commande' => "OrderDate",
|
||||
'c.date_livraison' => "DateDeliveryPlanned", 'c.amount_ht' => "Amount", 'c.total_ht' => "TotalHT",
|
||||
@@ -236,7 +236,7 @@ class modCommande extends DolibarrModules
|
||||
// 'p.rowid'=>'List:product:ref','p.ref'=>'Text','p.label'=>'Text'
|
||||
//);
|
||||
$this->export_TypeFields_array[$r] = array(
|
||||
's.nom' => 'Text', 'ps.nom' => 'Text', 's.code_client' => 'Text', 's.address' => 'Text', 's.zip' => 'Text', 's.town' => 'Text', 'co.label' => 'List:c_country:label:label', 'co.code' => 'Text', 's.phone' => 'Text',
|
||||
's.nom' => 'Text', 'ps.nom' => 'Text', 's.name_alias' => 'Text', 's.code_client' => 'Text', 's.address' => 'Text', 's.zip' => 'Text', 's.town' => 'Text', 'co.label' => 'List:c_country:label:label', 'co.code' => 'Text', 's.phone' => 'Text',
|
||||
's.siren' => 'Text', 's.siret' => 'Text', 's.ape' => 'Text', 's.idprof4' => 'Text', 'c.ref' => "Text", 'c.ref_client' => "Text", 'c.date_creation' => "Date",
|
||||
'c.date_commande' => "Date", 'c.date_livraison' => "Date", 'sm.code' => "Text", 'c.amount_ht' => "Numeric", 'c.total_ht' => "Numeric",
|
||||
'c.total_ttc' => "Numeric", 'c.facture' => "Boolean", 'c.fk_statut' => 'Status', 'c.note_public' => "Text", 'pj.ref' => 'Text',
|
||||
@@ -246,7 +246,7 @@ class modCommande extends DolibarrModules
|
||||
'cir.label'=>'Text',
|
||||
);
|
||||
$this->export_entities_array[$r] = array(
|
||||
's.rowid' => "company", 's.nom' => 'company', 'ps.nom' => 'company', 's.code_client' => 'company', 's.address' => 'company', 's.zip' => 'company', 's.town' => 'company', 'd.nom' => 'company', 'co.label' => 'company',
|
||||
's.rowid' => "company", 's.nom' => 'company', 's.name_alias' => 'company', 'ps.nom' => 'company', 's.code_client' => 'company', 's.address' => 'company', 's.zip' => 'company', 's.town' => 'company', 'd.nom' => 'company', 'co.label' => 'company',
|
||||
'co.code' => 'company', 's.phone' => 'company', 's.siren' => 'company', 's.ape' => 'company', 's.idprof4' => 'company', 's.siret' => 'company', 'c.rowid' => "order",
|
||||
'c.ref' => "order", 'c.ref_client' => "order", 'c.fk_soc' => "order", 'c.date_creation' => "order", 'c.date_commande' => "order", 'c.amount_ht' => "order",
|
||||
'c.total_ht' => "order", 'c.total_ttc' => "order", 'c.facture' => "order", 'c.fk_statut' => "order", 'c.note' => "order",
|
||||
|
||||
@@ -513,7 +513,7 @@ class modFacture extends DolibarrModules
|
||||
$this->export_permission[$r] = array(array("facture", "facture", "export", "other"));
|
||||
|
||||
$this->export_fields_array[$r] = array(
|
||||
's.rowid' => "IdCompany", 's.nom' => 'CompanyName', 'ps.nom' => 'ParentCompany', 's.code_client' => 'CustomerCode', 's.address' => 'Address', 's.zip' => 'Zip', 's.town' => 'Town', 'c.code' => 'CountryCode', 'cd.nom' => 'State',
|
||||
's.rowid' => "IdCompany", 's.nom' => 'CompanyName', 's.name_alias' => 'AliasNameShort', 'ps.nom' => 'ParentCompany', 's.code_client' => 'CustomerCode', 's.address' => 'Address', 's.zip' => 'Zip', 's.town' => 'Town', 'c.code' => 'CountryCode', 'cd.nom' => 'State',
|
||||
's.phone' => 'Phone',
|
||||
's.siren' => 'ProfId1', 's.siret' => 'ProfId2', 's.ape' => 'ProfId3', 's.idprof4' => 'ProfId4',
|
||||
's.code_compta' => 'CustomerAccountancyCode',
|
||||
@@ -585,7 +585,7 @@ class modFacture extends DolibarrModules
|
||||
}
|
||||
|
||||
$this->export_TypeFields_array[$r] = array(
|
||||
's.rowid' => 'Numeric', 's.nom' => 'Text', 'ps.nom' => 'Text', 's.code_client' => 'Text', 's.address' => 'Text', 's.zip' => 'Text', 's.town' => 'Text', 'c.code' => 'Text', 'cd.nom' => 'Text', 's.phone' => 'Text', 's.siren' => 'Text',
|
||||
's.rowid' => 'Numeric', 's.nom' => 'Text', 's.name_alias' => 'Text', 'ps.nom' => 'Text', 's.code_client' => 'Text', 's.address' => 'Text', 's.zip' => 'Text', 's.town' => 'Text', 'c.code' => 'Text', 'cd.nom' => 'Text', 's.phone' => 'Text', 's.siren' => 'Text',
|
||||
's.siret' => 'Text', 's.ape' => 'Text', 's.idprof4' => 'Text', 's.code_compta' => 'Text', 's.code_compta_fournisseur' => 'Text', 's.tva_intra' => 'Text',
|
||||
't.libelle' => "Text", // 'ce.code'=>"List:c_effectif:libelle:code", "cfj.libelle"=>"Text",
|
||||
'f.rowid' => 'Numeric', 'f.ref' => "Text", 'f.ref_client' => 'Text', 'f.fk_facture_source' => 'Numeric', 'f.type' => "Numeric", 'f.datec' => "Date", 'f.datef' => "Date", 'f.date_lim_reglement' => "Date",
|
||||
@@ -608,7 +608,7 @@ class modFacture extends DolibarrModules
|
||||
'f.multicurrency_tx' => 'Number', 'f.multicurrency_total_ht' => 'Number', 'f.multicurrency_total_tva' => 'Number', 'f.multicurrency_total_ttc' => 'Number'
|
||||
);
|
||||
$this->export_entities_array[$r] = array(
|
||||
's.rowid' => "company", 's.nom' => 'company', 'ps.nom' => 'company', 's.code_client' => 'company', 's.address' => 'company', 's.zip' => 'company', 's.town' => 'company', 'c.code' => 'company', 'cd.nom' => 'company', 's.phone' => 'company',
|
||||
's.rowid' => "company", 's.nom' => 'company', 's.name_alias' => 'company', 'ps.nom' => 'company', 's.code_client' => 'company', 's.address' => 'company', 's.zip' => 'company', 's.town' => 'company', 'c.code' => 'company', 'cd.nom' => 'company', 's.phone' => 'company',
|
||||
's.siren' => 'company', 's.siret' => 'company', 's.ape' => 'company', 's.idprof4' => 'company', 's.code_compta' => 'company', 's.code_compta_fournisseur' => 'company', 's.tva_intra' => 'company',
|
||||
't.libelle' => 'company', // 'ce.code'=>'company', 'cfj.libelle'=>'company'
|
||||
'pj.ref' => 'project', 'pj.title' => 'project', 'fd.rowid' => 'invoice_line', 'fd.description' => "invoice_line",
|
||||
@@ -675,7 +675,7 @@ class modFacture extends DolibarrModules
|
||||
$this->export_icon[$r] = 'invoice';
|
||||
$this->export_permission[$r] = array(array("facture", "facture", "export"));
|
||||
$this->export_fields_array[$r] = array(
|
||||
's.rowid' => "IdCompany", 's.nom' => 'CompanyName', 's.code_client' => 'CustomerCode', 's.address' => 'Address', 's.zip' => 'Zip', 's.town' => 'Town', 'c.code' => 'CountryCode', 'cd.nom' => 'State',
|
||||
's.rowid' => "IdCompany", 's.nom' => 'CompanyName', 's.name_alias' => 'AliasNameShort', 's.code_client' => 'CustomerCode', 's.address' => 'Address', 's.zip' => 'Zip', 's.town' => 'Town', 'c.code' => 'CountryCode', 'cd.nom' => 'State',
|
||||
's.phone' => 'Phone',
|
||||
's.siren' => 'ProfId1', 's.siret' => 'ProfId2', 's.ape' => 'ProfId3', 's.idprof4' => 'ProfId4', 's.code_compta' => 'CustomerAccountancyCode',
|
||||
's.code_compta_fournisseur' => 'SupplierAccountancyCode', 's.tva_intra' => 'VATIntra',
|
||||
@@ -710,7 +710,7 @@ class modFacture extends DolibarrModules
|
||||
$this->export_fields_array[$r]['f.pos_source'] = 'POSTerminal';
|
||||
}
|
||||
$this->export_TypeFields_array[$r] = array(
|
||||
's.rowid' => 'Numeric', 's.nom' => 'Text', 's.code_client' => 'Text', 's.address' => 'Text', 's.zip' => 'Text', 's.town' => 'Text', 'c.code' => 'Text', 'cd.nom' => 'Text', 's.phone' => 'Text', 's.siren' => 'Text',
|
||||
's.rowid' => 'Numeric', 's.nom' => 'Text', 's.name_alias' => 'Text', 's.code_client' => 'Text', 's.address' => 'Text', 's.zip' => 'Text', 's.town' => 'Text', 'c.code' => 'Text', 'cd.nom' => 'Text', 's.phone' => 'Text', 's.siren' => 'Text',
|
||||
's.siret' => 'Text', 's.ape' => 'Text', 's.idprof4' => 'Text', 's.code_compta' => 'Text', 's.code_compta_fournisseur' => 'Text', 's.tva_intra' => 'Text',
|
||||
'f.rowid' => "Numeric", 'f.ref' => "Text", 'f.ref_client' => 'Text', 'f.fk_facture_source' => 'Numeric', 'f.type' => "Numeric", 'f.datec' => "Date", 'f.datef' => "Date", 'f.date_lim_reglement' => "Date",
|
||||
'f.fk_cond_reglement' => 'Numeric', 'f.fk_mode_reglement' => 'Numeric',
|
||||
@@ -725,7 +725,7 @@ class modFacture extends DolibarrModules
|
||||
$this->export_fields_array[$r]['f.pos_source'] = 'POSTerminal';
|
||||
}
|
||||
$this->export_entities_array[$r] = array(
|
||||
's.rowid' => "company", 's.nom' => 'company', 's.code_client' => 'company', 's.address' => 'company', 's.zip' => 'company', 's.town' => 'company', 'c.code' => 'company', 'cd.nom' => 'company', 's.phone' => 'company',
|
||||
's.rowid' => "company", 's.nom' => 'company', 's.name_alias' => 'company', 's.code_client' => 'company', 's.address' => 'company', 's.zip' => 'company', 's.town' => 'company', 'c.code' => 'company', 'cd.nom' => 'company', 's.phone' => 'company',
|
||||
's.siren' => 'company', 's.siret' => 'company', 's.ape' => 'company', 's.idprof4' => 'company', 's.code_compta' => 'company', 's.code_compta_fournisseur' => 'company',
|
||||
's.tva_intra' => 'company', 'pj.ref' => 'project', 'pj.title' => 'project', 'p.rowid' => 'payment', 'p.ref' => 'payment', 'p.amount' => 'payment', 'pf.amount' => 'payment', 'p.datep' => 'payment',
|
||||
'p.num_paiement' => 'payment', 'pt.code' => 'payment', 'pt.libelle' => 'payment', 'p.note' => 'payment', 'f.fk_user_author' => 'user', 'uc.login' => 'user',
|
||||
|
||||
@@ -50,6 +50,7 @@ $langs->loadLangs(array("bills", "other", "companies"));
|
||||
$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid'));
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$socid = GETPOSTINT('socid');
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
|
||||
@@ -157,17 +157,18 @@ if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
|
||||
$formquestion = array();
|
||||
if (empty($reshook)) {
|
||||
if (($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm == 'yes')) && $permissiontoadd) {
|
||||
$datepaye = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||
$datepaye = GETPOSTDATE('re', '12:00:00');
|
||||
$paiement_id = 0;
|
||||
$totalpayment = 0;
|
||||
$atleastonepaymentnotnull = 0;
|
||||
$multicurrency_totalpayment = 0;
|
||||
$formquestion = array();
|
||||
|
||||
// Generate payment array and check if there is payment higher than invoice and payment date before invoice date
|
||||
$tmpinvoice = new FactureFournisseur($db);
|
||||
$i = 0;
|
||||
foreach ($_POST as $key => $value) {
|
||||
if (substr($key, 0, 7) == 'amount_') {
|
||||
$cursorfacid = substr($key, 7);
|
||||
@@ -187,7 +188,7 @@ if (empty($reshook)) {
|
||||
$amountsresttopay[$cursorfacid] = price2num($tmpinvoice->total_ttc - $tmpinvoice->getSommePaiement());
|
||||
if ($amounts[$cursorfacid]) {
|
||||
// Check amount
|
||||
if ($amounts[$cursorfacid] && (abs((float) $amounts[$cursorfacid]) > abs((float) $amountsresttopay[$cursorfacid]))) {
|
||||
if ((abs((float) $amounts[$cursorfacid]) > abs((float) $amountsresttopay[$cursorfacid]))) {
|
||||
$addwarning = 1;
|
||||
$formquestion['text'] = img_warning($langs->trans("PaymentHigherThanReminderToPaySupplier")).' '.$langs->trans("HelpPaymentHigherThanReminderToPaySupplier");
|
||||
}
|
||||
@@ -214,7 +215,7 @@ if (empty($reshook)) {
|
||||
$multicurrency_amountsresttopay[$cursorfacid] = price2num($tmpinvoice->multicurrency_total_ttc - $tmpinvoice->getSommePaiement(1));
|
||||
if ($multicurrency_amounts[$cursorfacid]) {
|
||||
// Check amount
|
||||
if ($multicurrency_amounts[$cursorfacid] && (abs((float) $multicurrency_amounts[$cursorfacid]) > abs((float) $multicurrency_amountsresttopay[$cursorfacid]))) {
|
||||
if ((abs((float) $multicurrency_amounts[$cursorfacid]) > abs((float) $multicurrency_amountsresttopay[$cursorfacid]))) {
|
||||
$addwarning = 1;
|
||||
$formquestion['text'] = img_warning($langs->trans("PaymentHigherThanReminderToPaySupplier")).' '.$langs->trans("HelpPaymentHigherThanReminderToPaySupplier");
|
||||
}
|
||||
@@ -304,10 +305,6 @@ if (empty($reshook)) {
|
||||
$multicurrency_tx[$key] = $tmpinvoice->multicurrency_tx;
|
||||
}
|
||||
|
||||
//var_dump($amounts);
|
||||
//var_dump($multicurrency_amounts);
|
||||
//exit;
|
||||
|
||||
if (!$error) {
|
||||
$db->begin();
|
||||
|
||||
@@ -334,7 +331,6 @@ if (empty($reshook)) {
|
||||
$paiement->note_private = GETPOST('comment', 'alpha');
|
||||
$paiement->fk_account = GETPOSTINT('accountid');
|
||||
|
||||
if (!$error) {
|
||||
// Create payment and update this->multicurrency_amounts if this->amounts filled or
|
||||
// this->amounts if this->multicurrency_amounts filled.
|
||||
// This also set ->amount and ->multicurrency_amount
|
||||
@@ -343,7 +339,6 @@ if (empty($reshook)) {
|
||||
setEventMessages($paiement->error, $paiement->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$result = $paiement->addPaymentToBank($user, 'payment_supplier', '(SupplierInvoicePayment)', $accountid, GETPOST('chqemetteur'), GETPOST('chqbank'));
|
||||
@@ -543,8 +538,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '</table>';
|
||||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
$parameters = array('facid' => $facid, 'ref' => $ref, 'objcanvas' => $objcanvas);
|
||||
$parameters = array(
|
||||
'facid' => $facid,
|
||||
// 'ref' => $ref,
|
||||
// 'objcanvas' => $objcanvas,
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('paymentsupplierinvoices', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
$error = $hookmanager->error;
|
||||
$errors = $hookmanager->errors;
|
||||
@@ -639,6 +637,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
$remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT');
|
||||
|
||||
// Multicurrency Price
|
||||
$multicurrency_payment = 0;
|
||||
$multicurrency_creditnotes = 0;
|
||||
$multicurrency_deposits = 0;
|
||||
$multicurrency_remaintopay = 0;
|
||||
if (isModEnabled("multicurrency")) {
|
||||
$multicurrency_payment = $invoice->getSommePaiement(1);
|
||||
$multicurrency_creditnotes = $invoice->getSumCreditNotesUsed(1);
|
||||
@@ -801,8 +803,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<td> </td>';
|
||||
print '<td class="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
||||
}
|
||||
print '<td class="right"><b>'.price($sign * $total_ttc).'</b></td>';
|
||||
print '<td class="right"><b>'.price($sign * $totalrecu);
|
||||
print '<td class="right"><b>'.price($total_ttc).'</b></td>';
|
||||
print '<td class="right"><b>'.price($totalrecu);
|
||||
if ($totalrecucreditnote) {
|
||||
print '+'.price($totalrecucreditnote);
|
||||
}
|
||||
@@ -810,7 +812,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '+'.price($totalrecudeposits);
|
||||
}
|
||||
print '</b></td>';
|
||||
print '<td class="right"><b>'.price($sign * (float) price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
||||
print '<td class="right"><b>'.price((float) price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits, 'MT')).'</b></td>';
|
||||
print '<td class="center" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
||||
print "</tr>\n";
|
||||
}
|
||||
@@ -838,6 +840,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
$preselectedchoice = $addwarning ? 'no' : 'yes';
|
||||
|
||||
print '<br>';
|
||||
$text = '';
|
||||
if (!empty($totalpayment)) {
|
||||
$text = $langs->trans('ConfirmSupplierPayment', price($totalpayment), $langs->transnoentitiesnoconv("Currency".$conf->currency));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Servitux Servicios Informaticos <info@servitux.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -51,7 +52,10 @@ if (!defined('USESUFFIXINLOG')) {
|
||||
}
|
||||
|
||||
include '../../main.inc.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
*/
|
||||
$phone = GETPOST('phone');
|
||||
$securitykey = GETPOST('securitykey');
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ if (!defined('NOBROWSERNOTIF')) {
|
||||
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
|
||||
// Because 2 entities can have the same ref
|
||||
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||
if (is_numeric($entity)) {
|
||||
// if (is_numeric($entity)) { // value is casted to int so always numeric
|
||||
define("DOLENTITY", $entity);
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
// Load Dolibarr environment
|
||||
@@ -63,6 +63,14 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/public.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
// Init vars
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
@@ -132,7 +140,7 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
||||
print '<header class="center">';
|
||||
|
||||
// Output html code for logo
|
||||
if ($urllogo) {
|
||||
// if ($urllogo) { // test always true
|
||||
print '<div class="backgreypublicpayment">';
|
||||
print '<div class="logopublicpayment">';
|
||||
print '<img id="dolpaymentlogo" src="' . $urllogo . '">';
|
||||
@@ -141,7 +149,7 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
||||
print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">' . $langs->trans("PoweredBy") . '<br><img class="poweredbyimg" src="' . DOL_URL_ROOT . '/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||
}
|
||||
print '</div>';
|
||||
}
|
||||
// }
|
||||
|
||||
if (getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION')) {
|
||||
print '<div class="backimagepublicregistration">';
|
||||
@@ -163,15 +171,13 @@ function llxFooterVierge()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$ext = '';
|
||||
|
||||
print '</div>';
|
||||
|
||||
printCommonFooter('public');
|
||||
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print "\n" . '<!-- Includes JS Footer of Dolibarr -->' . "\n";
|
||||
print '<script src="' . DOL_URL_ROOT . '/core/js/lib_foot.js.php?lang=' . $langs->defaultlang . (!empty($ext) ? '&' . $ext : '') . '"></script>' . "\n";
|
||||
print '<script src="' . DOL_URL_ROOT . '/core/js/lib_foot.js.php?lang=' . $langs->defaultlang . '"></script>' . "\n";
|
||||
}
|
||||
|
||||
print "</body>\n";
|
||||
@@ -429,7 +435,7 @@ if (isModEnabled('mailing') && getDolGlobalString('THIRDPARTY_SUGGEST_ALSO_ADDRE
|
||||
print '</tr><tr>';
|
||||
}
|
||||
print '<td class="individualline noemail">' . $form->editfieldkey($langs->trans('No_Email') . ' (' . $langs->trans('Contact') . ')', 'contact_no_email', '', $objectsoc, 0) . '</td>';
|
||||
print '<td class="individualline" ' . (($conf->browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '') . '>' . $form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($objectsoc->no_email) ? 0 : 1)), 1, false, 1) . '</td>';
|
||||
print '<td class="individualline" ' . (($conf->browser->layout == 'phone') /* || !isModEnabled('mailing') */ ? ' colspan="3"' : '') . '>' . $form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($objectsoc->no_email) ? 0 : 1)), 1, false, 1) . '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
@@ -460,7 +466,7 @@ if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA')) {
|
||||
print '</span>';
|
||||
print '<span class="nowrap inline-block">';
|
||||
print '<img class="inline-block valignmiddle" src="' . DOL_URL_ROOT . '/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" />';
|
||||
print '<a class="inline-block valignmiddle" href="' . $php_self . '" tabindex="4" data-role="button">' . img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"') . '</a>';
|
||||
print '<a class="inline-block valignmiddle" href="' . $_SERVER['PHP_SELF'] . '" tabindex="4" data-role="button">' . img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"') . '</a>';
|
||||
print '</span>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -69,8 +70,12 @@ require '../../main.inc.php';
|
||||
|
||||
// cron jobs library
|
||||
dol_include_once("/cron/class/cronjob.class.php");
|
||||
|
||||
global $langs, $conf;
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
*/
|
||||
global $langs, $conf, $db;
|
||||
|
||||
// Language Management
|
||||
$langs->loadLangs(array("admin", "cron", "dict"));
|
||||
|
||||
@@ -39,7 +39,12 @@ if (!defined('NOIPCHECK')) {
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once '../../core/lib/functions2.lib.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
*/
|
||||
$langs->loadLangs(array("main", "install", "other"));
|
||||
|
||||
$conf->dol_hide_topmenu = GETPOSTINT('dol_hide_topmenu');
|
||||
|
||||
@@ -91,7 +91,9 @@ function llxFooter($comment = '', $zone = 'private', $disabledoutputofmessages =
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
|
||||
/**
|
||||
* @var DoliDB $db
|
||||
*/
|
||||
$mtid = GETPOST('mtid');
|
||||
$email = GETPOST('email');
|
||||
$tag = GETPOST('tag');
|
||||
|
||||
@@ -56,8 +56,10 @@ if (! defined('NOREQUIREAJAX')) {
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
|
||||
global $user, $conf, $langs;
|
||||
/**
|
||||
* @var DoliDB $db
|
||||
*/
|
||||
global $user, $conf, $db, $langs;
|
||||
|
||||
$langs->loadLangs(array("main", "mails"));
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ if (!defined('NOBROWSERNOTIF')) {
|
||||
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
|
||||
// Because 2 entities can have the same ref.
|
||||
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||
if (is_numeric($entity)) {
|
||||
// if (is_numeric($entity)) { // $entity is casted to int
|
||||
define("DOLENTITY", $entity);
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
||||
@@ -43,9 +43,9 @@ if (!defined('NOBROWSERNOTIF')) {
|
||||
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
|
||||
// Because 2 entities can have the same ref.
|
||||
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||
if (is_numeric($entity)) {
|
||||
// if (is_numeric($entity)) { // $entity is casted to int
|
||||
define("DOLENTITY", $entity);
|
||||
}
|
||||
// }
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
|
||||
@@ -42,12 +42,17 @@ if (!defined('NOBROWSERNOTIF')) {
|
||||
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
|
||||
// Because 2 entities can have the same ref.
|
||||
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||
if (is_numeric($entity)) {
|
||||
// if (is_numeric($entity)) { // $entity is casted to int
|
||||
define("DOLENTITY", $entity);
|
||||
}
|
||||
// }
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
*/
|
||||
|
||||
// Security check
|
||||
if (!isModEnabled('member')) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -41,7 +42,10 @@ if (!defined('NOBROWSERNOTIF')) {
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
/**
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
*/
|
||||
|
||||
/**
|
||||
* View
|
||||
|
||||
Reference in New Issue
Block a user