forked from Wavyzz/dolibarr
Fix typing hints (#28676)
This commit is contained in:
@@ -6890,7 +6890,7 @@ function get_product_vat_for_country($idprod, $thirdpartytouse, $idprodfournpric
|
||||
if (($mysoc->country_code == $thirdpartytouse->country_code)
|
||||
|| (in_array($mysoc->country_code, array('FR', 'MC')) && in_array($thirdpartytouse->country_code, array('FR', 'MC')))
|
||||
|| (in_array($mysoc->country_code, array('MQ', 'GP')) && in_array($thirdpartytouse->country_code, array('MQ', 'GP')))
|
||||
) {
|
||||
) {
|
||||
// If country of thirdparty to consider is ours
|
||||
if ($idprodfournprice > 0) { // We want vat for product for a "supplier" object
|
||||
$result = $product->get_buyprice($idprodfournprice, 0, 0, 0);
|
||||
@@ -9756,13 +9756,13 @@ function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid =
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a variable with name $var start with $text.
|
||||
* Check if a variable with name $var startx with $text.
|
||||
* Can be used to forge dol_eval() conditions.
|
||||
*
|
||||
* @param $var string Variable
|
||||
* @param $regextext string Text that must be a valid regex string
|
||||
* @param $matchrule int 1=Test if start with, 0=Test if equal
|
||||
* @return boolean|string True or False, text if bad use.
|
||||
* @param string $var Variable
|
||||
* @param string $regextext Text that must be a valid regex string
|
||||
* @param int $matchrule 1=Test if start with, 0=Test if equal
|
||||
* @return boolean|string True or False, text if bad usage.
|
||||
*/
|
||||
function isStringVarMatching($var, $regextext, $matchrule = 1)
|
||||
{
|
||||
@@ -13078,6 +13078,8 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
|
||||
}
|
||||
|
||||
$histo = array();
|
||||
'@phan-var-force array<int,array{type:string,tododone:string,id:string,datestart:int|string,dateend:int|string,note:string,message:string,percent:string,userid:string,login:string,userfirstname:string,userlastname:string,userphoto:string,msg_from?:string,contact_id?:string,socpeopleassigned?:int[],lastname?:string,firstname?:string,fk_element?:int,elementtype?:string,acode:string,alabel?:string,libelle?:string,apicto?:string}> $histo';
|
||||
|
||||
$numaction = 0;
|
||||
$now = dol_now();
|
||||
|
||||
@@ -13157,7 +13159,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
|
||||
}
|
||||
|
||||
$sql .= " WHERE a.entity IN (".getEntity('agenda').")";
|
||||
if ($force_filter_contact === false) {
|
||||
if (!$force_filter_contact) {
|
||||
if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) {
|
||||
$sql .= " AND a.fk_soc = ".((int) $filterobj->id);
|
||||
} elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) {
|
||||
@@ -13285,6 +13287,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
|
||||
while ($i < $imaxinloop) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
'@phan-var-force array{apicto:string,contact_id:string,dp:string,dp2:string,firstname:string,label:string,message:string,msg_from:string,ref:string,type:string,user_lastname:string} $obj';
|
||||
if ($obj->type == 'action') {
|
||||
$contactaction = new ActionComm($db);
|
||||
$contactaction->id = $obj->id;
|
||||
|
||||
Reference in New Issue
Block a user