This commit is contained in:
Laurent Destailleur 2017-09-12 19:55:33 +02:00
parent 892ab420a7
commit d340ce6380
2 changed files with 10 additions and 10 deletions

View File

@ -103,10 +103,10 @@ function showOnlinePaymentUrl($type,$ref)
$langs->load("paybox");
$servicename='Online';
$out.=img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
$url=getOnlinePaymentUrl(0,$type,$ref);
$out.='<input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">';
$out.=ajax_autoselect("onlinepaymenturl", 0);
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
$url = getOnlinePaymentUrl(0,$type,$ref);
$out.= '<input type="text" id="onlinepaymenturl" class="quatrevingtpercent" value="'.$url.'">';
$out.= ajax_autoselect("onlinepaymenturl", 0);
return $out;
}
@ -126,6 +126,7 @@ function getOnlinePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
global $conf;
$ref=str_replace(' ','',$ref);
$out='';
if ($type == 'free')
{
@ -210,7 +211,7 @@ function getOnlinePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
}
// For multicompany
$out.="&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
if (! empty($out)) $out.="&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
return $out;
}

View File

@ -42,7 +42,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
$this->db=$db;
if (is_array($conf->modules))
{
$this->enabled=in_array('mymodule',$conf->modules);
$this->enabled=in_array('mymodule',$conf->modules)?1:0;
}
}
@ -186,15 +186,14 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
*
* @param string $filter Filter
* @param string $option Options
* @return int Nb of recipients
* @return int Nb of recipients or -1 if KO
*/
function getNbOfRecipients($filter=1,$option='')
{
$a=parent::getNbOfRecipients("select count(distinct(email)) as nb from ".MAIN_DB_PREFIX."myobject as p where email IS NOT NULL AND email != ''");
if ($a < 0 || $b < 0) return -1;
if ($option == '') return $a;
return ($a+$b);
if ($a < 0) return -1;
return $a;
}
}