fix merge
This commit is contained in:
commit
7a0c19485e
@ -58,18 +58,17 @@ env:
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
- php: nightly
|
||||
# We exclude some combinations not usefull to save Travis CPU
|
||||
exclude:
|
||||
- php: '5.5'
|
||||
env: DB=mysql
|
||||
env: DB=mariadb
|
||||
- php: '5.6'
|
||||
env: DB=mysql
|
||||
env: DB=mariadb
|
||||
- php: '7.0'
|
||||
env: DB=mysql
|
||||
env: DB=mariadb
|
||||
- php: '7.1'
|
||||
env: DB=mysql
|
||||
env: DB=mariadb
|
||||
- php: '5.5'
|
||||
env: DB=postgresql
|
||||
- php: '5.6'
|
||||
|
||||
@ -238,9 +238,9 @@
|
||||
<!--<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>-->
|
||||
<!--<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>-->
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
|
||||
|
||||
|
||||
@ -55,14 +55,12 @@ if ($action == 'update')
|
||||
$amount=GETPOST('MEMBER_NEWFORM_AMOUNT');
|
||||
$editamount=GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||
$payonline=GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||
$email=GETPOST('MEMBER_PAYONLINE_SENDEMAIL');
|
||||
$forcetype=GETPOST('MEMBER_NEWFORM_FORCETYPE');
|
||||
$forcetype=GETPOST('MEMBER_NEWFORM_FORCETYPE');
|
||||
|
||||
$res=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$public,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$amount,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$editamount,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$payonline,'chaine',0,'',$conf->entity);
|
||||
$res=dolibarr_set_const($db, "MEMBER_PAYONLINE_SENDEMAIL",$email,'chaine',0,'',$conf->entity);
|
||||
if ($forcetype < 0) $res=dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE",$conf->entity);
|
||||
else $res=dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE",$forcetype,'chaine',0,'',$conf->entity);
|
||||
|
||||
@ -211,13 +209,6 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
||||
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Jump to an online payment page
|
||||
print '<tr class="oddeven" id="tremail"><td>';
|
||||
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
|
||||
print '</td><td align="right">';
|
||||
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center>';
|
||||
|
||||
@ -1362,7 +1362,7 @@ class Adherent extends CommonObject
|
||||
* @param string $num_chq Numero cheque (if Id bank account provided)
|
||||
* @param string $emetteur_nom Name of cheque writer
|
||||
* @param string $emetteur_banque Name of bank of cheque
|
||||
* @param string $autocreatethirdparty Auto create new thirdparty if member not linked to a thirdparty and we request an option that generate invoice.
|
||||
* @param string $autocreatethirdparty Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice.
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom='', $emetteur_banque='', $autocreatethirdparty=0)
|
||||
|
||||
@ -105,7 +105,7 @@ print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Browser")."</td></tr>\n";
|
||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("UserAgent")."</td><td>" .$_SERVER["HTTP_USER_AGENT"]."</td></tr>\n";
|
||||
print "<tr $bc[1]><td width=\"280\">".$langs->trans("Smartphone")."</td><td>".(empty($conf->browser->phone)?$langs->trans("No"):$conf->browser->phone)."</td></tr>\n";
|
||||
print "<tr $bc[1]><td width=\"280\">".$langs->trans("Smartphone")."</td><td>".(($conf->browser->layout != 'phone')?$langs->trans("No"):$langs->trans("Yes"))."</td></tr>\n";
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -185,38 +185,32 @@ class ActionCommReminder extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
$prefix='';
|
||||
if ($status == 1) return $langs->trans('Done');
|
||||
if ($status == 0) return $langs->trans('ToDo');
|
||||
}
|
||||
if ($mode == 1)
|
||||
if ($mode == 0 || $mode == 1)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Done');
|
||||
if ($status == 0) return $langs->trans('ToDo');
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Done'),'statut4').' '.$langs->trans('Done');
|
||||
if ($status == 0) return img_picto($langs->trans('ToDo'),'statut5').' '.$langs->trans('ToDo');
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Done'),'statut4');
|
||||
if ($status == 0) return img_picto($langs->trans('ToDo'),'statut5');
|
||||
}
|
||||
if ($mode == 4)
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status == 1) return img_picto($langs->trans('Done'),'statut4').' '.$langs->trans('Done');
|
||||
if ($status == 0) return img_picto($langs->trans('ToDo'),'statut5').' '.$langs->trans('ToDo');
|
||||
}
|
||||
if ($mode == 5)
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Done').' '.img_picto($langs->trans('Done'),'statut4');
|
||||
if ($status == 0) return $langs->trans('ToDo').' '.img_picto($langs->trans('ToDo'),'statut5');
|
||||
}
|
||||
if ($mode == 6)
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($status == 1) return $langs->trans('Done').' '.img_picto($langs->trans('Done'),'statut4');
|
||||
if ($status == 0) return $langs->trans('ToDo').' '.img_picto($langs->trans('ToDo'),'statut5');
|
||||
|
||||
@ -32,8 +32,33 @@ if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel
|
||||
{
|
||||
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
|
||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_public', 'none'), ENT_QUOTES),'_public');
|
||||
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
||||
$result_update=$object->update_note(dol_html_entity_decode(GETPOST('note_public', 'none'), ENT_QUOTES),'_public');
|
||||
|
||||
if ($result_update < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
elseif (in_array($object->table_element, array('supplier_proposal', 'propal', 'commande_fournisseur', 'commande', 'facture_fourn', 'facture')))
|
||||
{
|
||||
// Define output language
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang = GETPOST('lang_id','aZ09');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
$hidedetails = (GETPOST('hidedetails','int') ? GETPOST('hidedetails','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
||||
$hidedesc = (GETPOST('hidedesc','int') ? GETPOST('hidedesc','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0));
|
||||
$hideref = (GETPOST('hideref','int') ? GETPOST('hideref','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0));
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Set public note
|
||||
else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel','alpha'))
|
||||
|
||||
@ -51,12 +51,12 @@ class Form
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
|
||||
var $num;
|
||||
|
||||
// Cache arrays
|
||||
@ -1141,8 +1141,9 @@ class Form
|
||||
if (count($scrit) > 1) $sql.=")";
|
||||
if (! empty($conf->barcode->enabled))
|
||||
{
|
||||
$sql .= " OR s.barcode LIKE '".$this->db->escape($filterkey)."%'";
|
||||
$sql .= " OR s.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'";
|
||||
}
|
||||
$sql.= " OR s.code_client LIKE '".$this->db->escape($prefix.$filterkey)."%' OR s.code_fournisseur LIKE '".$this->db->escape($prefix.$filterkey)."%'";
|
||||
$sql.=")";
|
||||
}
|
||||
$sql.=$this->db->order("nom","ASC");
|
||||
@ -4956,7 +4957,6 @@ class Form
|
||||
if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) {
|
||||
$usecalendar = ((empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == 'eldy')?'jquery':$conf->global->MAIN_POPUP_CALENDAR);
|
||||
}
|
||||
//if (! empty($conf->browser->phone)) $usecalendar='combo';
|
||||
|
||||
if ($d)
|
||||
{
|
||||
|
||||
@ -40,7 +40,7 @@ class FormFile
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error;
|
||||
|
||||
|
||||
public $numoffiles;
|
||||
public $infofiles; // Used to return informations by function getDocumentsLink
|
||||
|
||||
@ -678,7 +678,7 @@ class FormFile
|
||||
$formadmin=new FormAdmin($this->db);
|
||||
$defaultlang=$codelang?$codelang:$langs->getDefaultLang();
|
||||
$morecss='maxwidth150';
|
||||
if (! empty($conf->browser->phone)) $morecss='maxwidth100';
|
||||
if ($conf->browser->layout == 'phone') $morecss='maxwidth100';
|
||||
$out.= $formadmin->select_language($defaultlang, 'lang_id', 0, 0, 0, 0, 0, $morecss);
|
||||
}
|
||||
else
|
||||
@ -1318,7 +1318,7 @@ class FormFile
|
||||
|
||||
if (empty($disablemove))
|
||||
{
|
||||
if ($nboffiles > 1 && empty($conf->browser->phone)) {
|
||||
if ($nboffiles > 1 && $conf->browser->layout != 'phone') {
|
||||
print '<td align="center" class="linecolmove tdlineupdown">';
|
||||
if ($i > 0) {
|
||||
print '<a class="lineupdown" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id.'">'.img_up('default',0,'imgupforline').'</a>';
|
||||
@ -1329,7 +1329,7 @@ class FormFile
|
||||
print '</td>';
|
||||
}
|
||||
else {
|
||||
print '<td align="center"'.((empty($conf->browser->phone) && empty($disablemove)) ?' class="linecolmove tdlineupdown"':' class="linecolmove"').'>';
|
||||
print '<td align="center"'.(($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown"':' class="linecolmove"').'>';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
class FormOther
|
||||
{
|
||||
private $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
@ -1029,7 +1029,7 @@ class FormOther
|
||||
if (! empty($boxidactivatedforuser[$box->id])) continue; // Already visible for user
|
||||
$label=$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
//if (preg_match('/graph/',$box->class)) $label.=' ('.$langs->trans("Graph").')';
|
||||
if (preg_match('/graph/',$box->class) && empty($conf->browser->phone))
|
||||
if (preg_match('/graph/',$box->class) && $conf->browser->layout != 'phone')
|
||||
{
|
||||
$label=$label.' <span class="fa fa-bar-chart"></span>';
|
||||
}
|
||||
@ -1163,7 +1163,7 @@ class FormOther
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($conf->browser->phone))
|
||||
if ($conf->browser->layout != 'phone')
|
||||
{
|
||||
$emptybox->box_id='A';
|
||||
$emptybox->info_box_head=array();
|
||||
@ -1190,7 +1190,7 @@ class FormOther
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($conf->browser->phone))
|
||||
if ($conf->browser->layout != 'phone')
|
||||
{
|
||||
$emptybox->box_id='B';
|
||||
$emptybox->info_box_head=array();
|
||||
|
||||
@ -134,7 +134,7 @@ if (! empty($conf->modulebuilder->enabled))
|
||||
|
||||
// Link to print main content area
|
||||
/*
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && empty($conf->browser->phone))
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone')
|
||||
{
|
||||
$qs=dol_escape_htmltag($_SERVER["QUERY_STRING"]);
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '<div class="fichehalfleft">';
|
||||
if ($conf->browser->layout == 'phone') print '<div class="fichehalfleft">';
|
||||
else print '<table class="nobordernopadding" width="100%"><tr><td class="borderright">';
|
||||
|
||||
print '<table class="nobordernopadding centpercent">';
|
||||
@ -180,10 +180,10 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
|
||||
print '</table>';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '</div>';
|
||||
if ($conf->browser->layout == 'phone') print '</div>';
|
||||
else print '</td>';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '<div class="fichehalfright">';
|
||||
if ($conf->browser->layout == 'phone') print '<div class="fichehalfright">';
|
||||
else print '<td align="center" valign="middle" class="nowrap">';
|
||||
|
||||
print '<table class="centpercent"><tr><td align="center">';
|
||||
@ -193,7 +193,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '</div>';
|
||||
if ($conf->browser->layout == 'phone') print '</div>';
|
||||
else print '</td></tr></table>';
|
||||
|
||||
print '</div>'; // Close fichecenter
|
||||
|
||||
@ -377,7 +377,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
||||
|
||||
// select2 disabled for smartphones with standard browser.
|
||||
// TODO With select2 v4, it seems ok, except that responsive style on table become crazy when scrolling at end of array)
|
||||
if (! empty($conf->browser->phone)) return '';
|
||||
if ($conf->browser->layout == 'phone') return '';
|
||||
|
||||
if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return '';
|
||||
if (empty($conf->use_javascript_ajax)) return '';
|
||||
|
||||
@ -1353,7 +1353,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$width=80; $cssclass='photoref';
|
||||
$showimage=$object->is_photo_available($conf->product->multidir_output[$entity]);
|
||||
$maxvisiblephotos=(isset($conf->global->PRODUCT_MAX_VISIBLE_PHOTO)?$conf->global->PRODUCT_MAX_VISIBLE_PHOTO:5);
|
||||
if ($conf->browser->phone) $maxvisiblephotos=1;
|
||||
if ($conf->browser->layout == 'phone') $maxvisiblephotos=1;
|
||||
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('product', $conf->product->multidir_output[$entity],'small',$maxvisiblephotos,0,0,0,$width,0).'</div>';
|
||||
else
|
||||
{
|
||||
@ -1372,7 +1372,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$width=80; $cssclass='photoref';
|
||||
$showimage=$object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->track_id);
|
||||
$maxvisiblephotos=(isset($conf->global->TICKETSUP_MAX_VISIBLE_PHOTO)?$conf->global->TICKETSUP_MAX_VISIBLE_PHOTO:2);
|
||||
if ($conf->browser->phone) $maxvisiblephotos=1;
|
||||
if ($conf->browser->layout == 'phone') $maxvisiblephotos=1;
|
||||
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('ticket', $conf->ticket->multidir_output[$entity],'small',$maxvisiblephotos,0,0,0,$width,0).'</div>';
|
||||
else
|
||||
{
|
||||
@ -2549,7 +2549,7 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep
|
||||
}
|
||||
if (! empty($addlink)) // Link on phone number (+ link to add action if conf->global->AGENDA_ADDACTIONFORPHONE set)
|
||||
{
|
||||
if (! empty($conf->browser->phone) || (! empty($conf->clicktodial->enabled) && ! empty($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS))) // If phone or option for, we use link of phone
|
||||
if ($conf->browser->layout == 'phone' || (! empty($conf->clicktodial->enabled) && ! empty($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS))) // If phone or option for, we use link of phone
|
||||
{
|
||||
$newphone ='<a href="tel:'.$phone.'"';
|
||||
$newphone.='>'.$phone.'</a>';
|
||||
|
||||
@ -1195,8 +1195,16 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
$note=(! empty($object->lines[$i]->note)?$object->lines[$i]->note:'');
|
||||
$dbatch=(! empty($object->lines[$i]->detail_batch)?$object->lines[$i]->detail_batch:false);
|
||||
|
||||
if ($issupplierline) $prodser = new ProductFournisseur($db);
|
||||
else $prodser = new Product($db);
|
||||
if ($issupplierline)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
$prodser = new ProductFournisseur($db);
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$prodser = new Product($db);
|
||||
}
|
||||
|
||||
if ($idprod)
|
||||
{
|
||||
|
||||
@ -168,7 +168,7 @@ class html_cerfafr extends ModeleDon
|
||||
$form = str_replace('__DATE__',dol_print_date($don->date,'day',false,$outputlangs),$form);
|
||||
//$form = str_replace('__IP__',$user->ip,$form); // TODO $user->ip not exist
|
||||
$form = str_replace('__AMOUNT__', price($don->amount), $form);
|
||||
$form = str_replace('__AMOUNTLETTERS__',amountToLetters($don->amount),$form);
|
||||
$form = str_replace('__AMOUNTLETTERS__', $this->amountToLetters($don->amount),$form);
|
||||
$form = str_replace('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$currency),$form);
|
||||
$form = str_replace('__CURRENCYCODE__',$conf->currency,$form);
|
||||
$form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form);
|
||||
@ -277,160 +277,163 @@ class html_cerfafr extends ModeleDon
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* numbers to letters
|
||||
*
|
||||
* @param mixed $montant amount
|
||||
* @param mixed $devise1 devise 1 ex: euro
|
||||
* @param mixed $devise2 devise 2 ex: centimes
|
||||
* @return string amount in letters
|
||||
*/
|
||||
function amountToLetters($montant, $devise1='', $devise2='')
|
||||
{
|
||||
if(empty($devise1)) $dev1='euros';
|
||||
else $dev1=$devise1;
|
||||
if(empty($devise2)) $dev2='centimes';
|
||||
else $dev2=$devise2;
|
||||
$valeur_entiere=intval($montant);
|
||||
$valeur_decimal=intval(round($montant-intval($montant), 2)*100);
|
||||
$dix_c=intval($valeur_decimal%100/10);
|
||||
$cent_c=intval($valeur_decimal%1000/100);
|
||||
$unite[1]=$valeur_entiere%10;
|
||||
$dix[1]=intval($valeur_entiere%100/10);
|
||||
$cent[1]=intval($valeur_entiere%1000/100);
|
||||
$unite[2]=intval($valeur_entiere%10000/1000);
|
||||
$dix[2]=intval($valeur_entiere%100000/10000);
|
||||
$cent[2]=intval($valeur_entiere%1000000/100000);
|
||||
$unite[3]=intval($valeur_entiere%10000000/1000000);
|
||||
$dix[3]=intval($valeur_entiere%100000000/10000000);
|
||||
$cent[3]=intval($valeur_entiere%1000000000/100000000);
|
||||
$chif=array('', 'un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept', 'huit', 'neuf', 'dix', 'onze', 'douze', 'treize', 'quatorze', 'quinze', 'seize', 'dix sept', 'dix huit', 'dix neuf');
|
||||
$secon_c='';
|
||||
$trio_c='';
|
||||
for($i=1; $i<=3; $i++){
|
||||
$prim[$i]='';
|
||||
$secon[$i]='';
|
||||
$trio[$i]='';
|
||||
if($dix[$i]==0){
|
||||
/**
|
||||
* numbers to letters
|
||||
*
|
||||
* @param mixed $montant amount
|
||||
* @param mixed $devise1 devise 1 ex: euro
|
||||
* @param mixed $devise2 devise 2 ex: centimes
|
||||
* @return string amount in letters
|
||||
*/
|
||||
private function amountToLetters($montant, $devise1='', $devise2='')
|
||||
{
|
||||
$unite = array();
|
||||
$dix = array();
|
||||
$cent = array();
|
||||
if(empty($devise1)) $dev1='euros';
|
||||
else $dev1=$devise1;
|
||||
if(empty($devise2)) $dev2='centimes';
|
||||
else $dev2=$devise2;
|
||||
$valeur_entiere=intval($montant);
|
||||
$valeur_decimal=intval(round($montant-intval($montant), 2)*100);
|
||||
$dix_c=intval($valeur_decimal%100/10);
|
||||
$cent_c=intval($valeur_decimal%1000/100);
|
||||
$unite[1]=$valeur_entiere%10;
|
||||
$dix[1]=intval($valeur_entiere%100/10);
|
||||
$cent[1]=intval($valeur_entiere%1000/100);
|
||||
$unite[2]=intval($valeur_entiere%10000/1000);
|
||||
$dix[2]=intval($valeur_entiere%100000/10000);
|
||||
$cent[2]=intval($valeur_entiere%1000000/100000);
|
||||
$unite[3]=intval($valeur_entiere%10000000/1000000);
|
||||
$dix[3]=intval($valeur_entiere%100000000/10000000);
|
||||
$cent[3]=intval($valeur_entiere%1000000000/100000000);
|
||||
$chif=array('', 'un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept', 'huit', 'neuf', 'dix', 'onze', 'douze', 'treize', 'quatorze', 'quinze', 'seize', 'dix sept', 'dix huit', 'dix neuf');
|
||||
$secon_c='';
|
||||
$trio_c='';
|
||||
for($i=1; $i<=3; $i++){
|
||||
$prim[$i]='';
|
||||
$secon[$i]='';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
$trio[$i]='';
|
||||
if($dix[$i]==0){
|
||||
$secon[$i]='';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else if($dix[$i]==1){
|
||||
$secon[$i]='';
|
||||
$prim[$i]=$chif[($unite[$i]+10)];
|
||||
}
|
||||
else if($dix[$i]==2){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='vingt et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='vingt';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==3){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='trente et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='trente';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==4){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='quarante et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='quarante';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==5){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='cinquante et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='cinquante';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==6){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='soixante et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='soixante';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==7){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='soixante et';
|
||||
$prim[$i]=$chif[$unite[$i]+10];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='soixante';
|
||||
$prim[$i]=$chif[$unite[$i]+10];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==8){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='quatre-vingts et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='quatre-vingt';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==9){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='quatre-vingts et';
|
||||
$prim[$i]=$chif[$unite[$i]+10];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='quatre-vingts';
|
||||
$prim[$i]=$chif[$unite[$i]+10];
|
||||
}
|
||||
}
|
||||
if($cent[$i]==1) $trio[$i]='cent';
|
||||
else if($cent[$i]!=0 || $cent[$i]!='') $trio[$i]=$chif[$cent[$i]] .' cents';
|
||||
}
|
||||
else if($dix[$i]==1){
|
||||
$secon[$i]='';
|
||||
$prim[$i]=$chif[($unite[$i]+10)];
|
||||
}
|
||||
else if($dix[$i]==2){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='vingt et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='vingt';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==3){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='trente et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='trente';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==4){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='quarante et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='quarante';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==5){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='cinquante et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='cinquante';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==6){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='soixante et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='soixante';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==7){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='soixante et';
|
||||
$prim[$i]=$chif[$unite[$i]+10];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='soixante';
|
||||
$prim[$i]=$chif[$unite[$i]+10];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==8){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='quatre-vingts et';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='quatre-vingt';
|
||||
$prim[$i]=$chif[$unite[$i]];
|
||||
}
|
||||
}
|
||||
else if($dix[$i]==9){
|
||||
if($unite[$i]==1){
|
||||
$secon[$i]='quatre-vingts et';
|
||||
$prim[$i]=$chif[$unite[$i]+10];
|
||||
}
|
||||
else {
|
||||
$secon[$i]='quatre-vingts';
|
||||
$prim[$i]=$chif[$unite[$i]+10];
|
||||
}
|
||||
}
|
||||
if($cent[$i]==1) $trio[$i]='cent';
|
||||
else if($cent[$i]!=0 || $cent[$i]!='') $trio[$i]=$chif[$cent[$i]] .' cents';
|
||||
|
||||
|
||||
$chif2=array('', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingts', 'quatre-vingts dix');
|
||||
$secon_c=$chif2[$dix_c];
|
||||
if($cent_c==1) $trio_c='cent';
|
||||
else if($cent_c!=0 || $cent_c!='') $trio_c=$chif[$cent_c] .' cents';
|
||||
|
||||
if(($cent[3]==0 || $cent[3]=='') && ($dix[3]==0 || $dix[3]=='') && ($unite[3]==1))
|
||||
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' million ';
|
||||
else if(($cent[3]!=0 && $cent[3]!='') || ($dix[3]!=0 && $dix[3]!='') || ($unite[3]!=0 && $unite[3]!=''))
|
||||
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' millions ';
|
||||
else
|
||||
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3];
|
||||
|
||||
if(($cent[2]==0 || $cent[2]=='') && ($dix[2]==0 || $dix[2]=='') && ($unite[2]==1))
|
||||
$somme = $somme.' mille ';
|
||||
else if(($cent[2]!=0 && $cent[2]!='') || ($dix[2]!=0 && $dix[2]!='') || ($unite[2]!=0 && $unite[2]!=''))
|
||||
$somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2]. ' milles ';
|
||||
else
|
||||
$somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2];
|
||||
|
||||
$somme = $somme. $trio[1]. ' ' .$secon[1]. ' ' . $prim[1];
|
||||
|
||||
$somme = $somme. ' '. $dev1 .' ' ;
|
||||
|
||||
if(($cent_c=='0' || $cent_c=='') && ($dix_c=='0' || $dix_c==''))
|
||||
return $somme. ' et zéro '. $dev2;
|
||||
else
|
||||
return $somme. $trio_c. ' ' .$secon_c. ' ' . $dev2;
|
||||
}
|
||||
|
||||
|
||||
$chif2=array('', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingts', 'quatre-vingts dix');
|
||||
$secon_c=$chif2[$dix_c];
|
||||
if($cent_c==1) $trio_c='cent';
|
||||
else if($cent_c!=0 || $cent_c!='') $trio_c=$chif[$cent_c] .' cents';
|
||||
|
||||
if(($cent[3]==0 || $cent[3]=='') && ($dix[3]==0 || $dix[3]=='') && ($unite[3]==1))
|
||||
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' million ';
|
||||
else if(($cent[3]!=0 && $cent[3]!='') || ($dix[3]!=0 && $dix[3]!='') || ($unite[3]!=0 && $unite[3]!=''))
|
||||
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' millions ';
|
||||
else
|
||||
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3];
|
||||
|
||||
if(($cent[2]==0 || $cent[2]=='') && ($dix[2]==0 || $dix[2]=='') && ($unite[2]==1))
|
||||
$somme = $somme.' mille ';
|
||||
else if(($cent[2]!=0 && $cent[2]!='') || ($dix[2]!=0 && $dix[2]!='') || ($unite[2]!=0 && $unite[2]!=''))
|
||||
$somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2]. ' milles ';
|
||||
else
|
||||
$somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2];
|
||||
|
||||
$somme = $somme. $trio[1]. ' ' .$secon[1]. ' ' . $prim[1];
|
||||
|
||||
$somme = $somme. ' '. $dev1 .' ' ;
|
||||
|
||||
if(($cent_c=='0' || $cent_c=='') && ($dix_c=='0' || $dix_c==''))
|
||||
return $somme. ' et zéro '. $dev2;
|
||||
else
|
||||
return $somme. $trio_c. ' ' .$secon_c. ' ' . $dev2;
|
||||
}
|
||||
|
||||
@ -427,7 +427,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
* get substitution array for object
|
||||
*
|
||||
* @param User $object user
|
||||
* @param Translation $outputlangs translation object
|
||||
* @param Translate $outputlangs translation object
|
||||
* @param string $array_key key for array
|
||||
* @return array array of substitutions
|
||||
*/
|
||||
|
||||
@ -292,7 +292,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
||||
</td>
|
||||
|
||||
<?php
|
||||
if ($num > 1 && empty($conf->browser->phone) && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) { ?>
|
||||
if ($num > 1 && $conf->browser->layout != 'phone' && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) { ?>
|
||||
<td align="center" class="linecolmove tdlineupdown"><?php $coldisplay++; ?>
|
||||
<?php if ($i > 0) { ?>
|
||||
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>">
|
||||
@ -306,7 +306,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
<td align="center"<?php echo ((empty($conf->browser->phone) && empty($disablemove)) ?' class="linecolmove tdlineupdown"':' class="linecolmove"'); ?>><?php $coldisplay++; ?></td>
|
||||
<td align="center"<?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown"':' class="linecolmove"'); ?>><?php $coldisplay++; ?></td>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
|
||||
|
||||
@ -39,7 +39,7 @@ class CdavLib
|
||||
*
|
||||
* @param User $user user
|
||||
* @param DoliDB $db Database handler
|
||||
* @param Translation $langs translation
|
||||
* @param Translate $langs translation
|
||||
*/
|
||||
function __construct($user, $db, $langs)
|
||||
{
|
||||
|
||||
@ -72,7 +72,7 @@ StatusProsp=Prospect status
|
||||
DraftPropals=Draft commercial proposals
|
||||
NoLimit=No limit
|
||||
ToOfferALinkForOnlineSignature=Link for online signature
|
||||
WelcomeOnOnlineSignaturePage=Welcome on the page to accept commercial proposals from %s
|
||||
WelcomeOnOnlineSignaturePage=Welcome to the page to accept commercial proposals from %s
|
||||
ThisScreenAllowsYouToSignDocFrom=This screen allow you to accept and sign, or refuse, a quote/commercial proposal
|
||||
ThisIsInformationOnDocumentToSign=This is information on document to accept or refuse
|
||||
SignatureProposalRef=Signature of quote/commercial proposal %s
|
||||
|
||||
@ -188,7 +188,6 @@ MembersByNature=This screen show you statistics on members by nature.
|
||||
MembersByRegion=This screen show you statistics on members by region.
|
||||
VATToUseForSubscriptions=VAT rate to use for subscriptions
|
||||
NoVatOnSubscription=No TVA for subscriptions
|
||||
MEMBER_PAYONLINE_SENDEMAIL=Email to use for email warning when Dolibarr receive a confirmation of a validated payment for a subscription (Example: paymentdone@example.com)
|
||||
ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for subscription line into invoice: %s
|
||||
NameOrCompany=Name or company
|
||||
SubscriptionRecorded=Subscription recorded
|
||||
|
||||
@ -3,7 +3,7 @@ PayBoxSetup=PayBox module setup
|
||||
PayBoxDesc=This module offer pages to allow payment on <a href="http://www.paybox.com" target="_blank">Paybox</a> by customers. This can be used for a free payment or for a payment on a particular Dolibarr object (invoice, order, ...)
|
||||
FollowingUrlAreAvailableToMakePayments=Following URLs are available to offer a page to a customer to make a payment on Dolibarr objects
|
||||
PaymentForm=Payment form
|
||||
WelcomeOnPaymentPage=Welcome on our online payment service
|
||||
WelcomeOnPaymentPage=Welcome to our online payment service
|
||||
ThisScreenAllowsYouToPay=This screen allow you to make an online payment to %s.
|
||||
ThisIsInformationOnPayment=This is information on payment to do
|
||||
ToComplete=To complete
|
||||
|
||||
@ -4,7 +4,7 @@ StripeDesc=Module to offer an online payment page accepting payments with Credit
|
||||
StripeOrCBDoPayment=Pay with credit card or Stripe
|
||||
FollowingUrlAreAvailableToMakePayments=Following URLs are available to offer a page to a customer to make a payment on Dolibarr objects
|
||||
PaymentForm=Payment form
|
||||
WelcomeOnPaymentPage=Welcome on our online payment service
|
||||
WelcomeOnPaymentPage=Welcome to our online payment service
|
||||
ThisScreenAllowsYouToPay=This screen allow you to make an online payment to %s.
|
||||
ThisIsInformationOnPayment=This is information on payment to do
|
||||
ToComplete=To complete
|
||||
|
||||
@ -256,8 +256,6 @@ if (isset($_SERVER["HTTP_USER_AGENT"]))
|
||||
$conf->browser->os=$tmp['browseros'];
|
||||
$conf->browser->version=$tmp['browserversion'];
|
||||
$conf->browser->layout=$tmp['layout']; // 'classic', 'phone', 'tablet'
|
||||
$conf->browser->phone=$tmp['phone']; // TODO deprecated, use ->layout
|
||||
$conf->browser->tablet=$tmp['tablet']; // TODO deprecated, use ->layout
|
||||
//var_dump($conf->browser);
|
||||
|
||||
if ($conf->browser->layout == 'phone') $conf->dol_no_mouse_hover=1;
|
||||
@ -486,17 +484,6 @@ if (! defined('NOLOGIN'))
|
||||
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadValueForCode");
|
||||
$test=false;
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg='ErrorBadValueForCode - login='.GETPOST("username","alpha",2);
|
||||
// Call of triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($db);
|
||||
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End Call of triggers
|
||||
|
||||
// Hooks on failed login
|
||||
$action='';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
@ -565,17 +552,6 @@ if (! defined('NOLOGIN'))
|
||||
// We set a generic message if not defined inside function checkLoginPassEntity or subfunctions
|
||||
if (empty($_SESSION["dol_loginmesg"])) $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadLoginPassword");
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg=$langs->trans("ErrorBadLoginPassword").' - login='.GETPOST("username","alpha",2);
|
||||
// Call of triggers
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($db);
|
||||
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,GETPOST("username","alpha",2));
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End Call of triggers
|
||||
|
||||
// Hooks on failed login
|
||||
$action='';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
@ -612,27 +588,12 @@ if (! defined('NOLOGIN'))
|
||||
$langs->loadLangs(array('main', 'errors'));
|
||||
|
||||
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login);
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg='ErrorCantLoadUserFromDolibarrDatabase - login='.$login;
|
||||
}
|
||||
if ($resultFetchUser < 0)
|
||||
{
|
||||
$_SESSION["dol_loginmesg"]=$user->error;
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg=$user->error;
|
||||
}
|
||||
|
||||
// Call triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($db);
|
||||
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
|
||||
// Hooks on failed login
|
||||
$action='';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
@ -671,28 +632,12 @@ if (! defined('NOLOGIN'))
|
||||
$langs->loadLangs(array('main', 'errors'));
|
||||
|
||||
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login);
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg='ErrorCantLoadUserFromDolibarrDatabase - login='.$login;
|
||||
}
|
||||
if ($resultFetchUser < 0)
|
||||
{
|
||||
$_SESSION["dol_loginmesg"]=$user->error;
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg=$user->error;
|
||||
}
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
// Call triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($db);
|
||||
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
|
||||
// Hooks on failed login
|
||||
$action='';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
@ -780,17 +725,6 @@ if (! defined('NOLOGIN'))
|
||||
|
||||
$loginfo = 'TZ='.$_SESSION["dol_tz"].';TZString='.$_SESSION["dol_tz_string"].';Screen='.$_SESSION["dol_screenwidth"].'x'.$_SESSION["dol_screenheight"];
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg = $loginfo;
|
||||
// Call triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($db);
|
||||
$result=$interface->run_triggers('USER_LOGIN',$user,$user,$langs,$conf);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
|
||||
// Hooks on successfull login
|
||||
$action='';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
@ -900,7 +834,6 @@ if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea'
|
||||
$conf->theme='eldy';
|
||||
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
||||
}
|
||||
//var_dump($conf->browser->phone);
|
||||
|
||||
if (! defined('NOREQUIRETRAN'))
|
||||
{
|
||||
@ -1574,7 +1507,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
}
|
||||
|
||||
// Link to print main content area
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && empty($conf->browser->phone))
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone')
|
||||
{
|
||||
$qs=dol_escape_htmltag($_SERVER["QUERY_STRING"]);
|
||||
|
||||
@ -1799,9 +1732,8 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
|
||||
$bugbaseurl.= '?title=';
|
||||
$bugbaseurl.= urlencode("Bug: ");
|
||||
$bugbaseurl.= '&body=';
|
||||
// TODO use .github/ISSUE_TEMPLATE.md to generate?
|
||||
$bugbaseurl .= urlencode("# Bug\n");
|
||||
$bugbaseurl .= urlencode("\n");
|
||||
$bugbaseurl.= urlencode("# Bug\n");
|
||||
$bugbaseurl.= urlencode("\n");
|
||||
$bugbaseurl.= urlencode("## Environment\n");
|
||||
$bugbaseurl.= urlencode("- **Version**: " . DOL_VERSION . "\n");
|
||||
$bugbaseurl.= urlencode("- **OS**: " . php_uname('s') . "\n");
|
||||
|
||||
@ -80,7 +80,7 @@ if (! empty($dolibarr_main_document_root_alt))
|
||||
{
|
||||
if (preg_match('/^http(s)?:/',$value))
|
||||
{
|
||||
// TODO: Make this a warning rather than an error since the correct value can be derived in most cases
|
||||
// Show error message
|
||||
$correct_value = str_replace($dolibarr_main_url_root, '', $value);
|
||||
print '<b>Error:</b><br>'."\n";
|
||||
print 'Wrong <b>$dolibarr_main_url_root_alt</b> value in <b>conf.php</b> file.<br>'."\n";
|
||||
|
||||
@ -402,31 +402,31 @@ class MyObject extends CommonObject
|
||||
{
|
||||
return $this->labelstatus[$status];
|
||||
}
|
||||
if ($mode == 1)
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
return $this->labelstatus[$status];
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4').' '.$this->labelstatus[$status];
|
||||
if ($status == 0) return img_picto($this->labelstatus[$status],'statut5').' '.$this->labelstatus[$status];
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4');
|
||||
if ($status == 0) return img_picto($this->labelstatus[$status],'statut5');
|
||||
}
|
||||
if ($mode == 4)
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4').' '.$this->labelstatus[$status];
|
||||
if ($status == 0) return img_picto($this->labelstatus[$status],'statut5').' '.$this->labelstatus[$status];
|
||||
}
|
||||
if ($mode == 5)
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut4');
|
||||
if ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut5');
|
||||
}
|
||||
if ($mode == 6)
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut4');
|
||||
if ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut5');
|
||||
@ -543,4 +543,4 @@ class MyObjectLine
|
||||
// @var mixed Sample line property 2
|
||||
public $prop2;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
@ -221,8 +221,8 @@ print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").'</td><td>';
|
||||
print '<input size="32" type="email" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
||||
print ' '.$langs->trans("Example").': myemail@myserver.com';
|
||||
print '<input size="32" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
||||
print ' '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Payment token for URL
|
||||
|
||||
@ -254,8 +254,8 @@ print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").'</td><td>';
|
||||
print '<input size="32" type="email" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
||||
print ' '.$langs->trans("Example").': myemail@myserver.com';
|
||||
print '<input size="32" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
||||
print ' '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -1068,7 +1068,7 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (empty($conf->global->PRODUCT_DISABLE_VOLUME))
|
||||
{
|
||||
{
|
||||
// Volume
|
||||
print '<tr><td>'.$langs->trans("Volume").'</td><td colspan="3">';
|
||||
print '<input name="volume" size="4" value="'.GETPOST('volume').'">';
|
||||
|
||||
@ -87,10 +87,8 @@ if (empty($paymentmethod))
|
||||
dol_print_error(null, 'The back url does not contains a parameter fulltag that should help us to find the payment method used');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("paymentmethod=".$paymentmethod);
|
||||
}
|
||||
|
||||
dol_syslog("***** paymentok.php is called paymentmethod=".$paymentmethod." FULLTAG=".$FULLTAG." REQUEST_URI=".$_SERVER["REQUEST_URI"], LOG_DEBUG, 0, '_payment');
|
||||
|
||||
|
||||
$validpaymentmethod=array();
|
||||
@ -194,7 +192,7 @@ if (! empty($conf->paypal->enabled))
|
||||
// From env
|
||||
$ipaddress = $_SESSION['ipaddress'];
|
||||
|
||||
dol_syslog("Call paymentok with token=".$onlinetoken." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag, LOG_DEBUG, 0, '_paypal');
|
||||
dol_syslog("Call paymentok with token=".$onlinetoken." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
// Validate record
|
||||
if (! empty($paymentType))
|
||||
@ -266,6 +264,9 @@ $fulltag = $FULLTAG;
|
||||
$tmptag=dolExplodeIntoArray($fulltag,'.','=');
|
||||
|
||||
|
||||
dol_syslog("ispaymentok=".$ispaymentok, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
|
||||
// Make complementary actions
|
||||
$ispostactionok = 0;
|
||||
$postactionmessages = array();
|
||||
@ -372,6 +373,8 @@ if ($ispaymentok)
|
||||
// Create subscription
|
||||
if (! $error)
|
||||
{
|
||||
dol_syslog("Call ->subscription to create subscription", LOG_DEBUG, 0, '_payment');
|
||||
|
||||
$crowid=$object->subscription($datesubscription, $amount, $accountid, $operation, $label, $num_chq, $emetteur_nom, $emetteur_banque, $datesubend);
|
||||
if ($crowid <= 0)
|
||||
{
|
||||
@ -389,11 +392,15 @@ if ($ispaymentok)
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$autocreatethirdparty = 1;
|
||||
dol_syslog("Call ->subscriptionComplementaryActions option=".$option, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
$autocreatethirdparty = 1; // will create thirdparty if member not yet linked to a thirdparty
|
||||
|
||||
$result = $object->subscriptionComplementaryActions($crowid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom, $emetteur_banque, $autocreatethirdparty);
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_syslog("Error ".$object->error." ".join(',', $object->errors), LOG_DEBUG, 0, '_payment');
|
||||
|
||||
$error++;
|
||||
$postactionmessages[] = $object->error;
|
||||
$postactionmessages = array_merge($postactionmessages, $object->errors);
|
||||
@ -401,9 +408,21 @@ if ($ispaymentok)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($option == 'bankviainvoice') $postactionmessages[] = 'Invoice, payment and bank record created';
|
||||
if ($option == 'bankdirect') $postactionmessages[] = 'Bank record created';
|
||||
if ($option == 'invoiceonly') $postactionmessages[] = 'Invoice recorded';
|
||||
if ($option == 'bankviainvoice')
|
||||
{
|
||||
$postactionmessages[] = 'Invoice, payment and bank record created';
|
||||
dol_syslog("Invoice, payment and bank record created", LOG_DEBUG, 0, '_payment');
|
||||
}
|
||||
if ($option == 'bankdirect')
|
||||
{
|
||||
$postactionmessages[] = 'Bank record created';
|
||||
dol_syslog("Bank record created", LOG_DEBUG, 0, '_payment');
|
||||
}
|
||||
if ($option == 'invoiceonly')
|
||||
{
|
||||
$postactionmessages[] = 'Invoice recorded';
|
||||
dol_syslog("Invoice recorded", LOG_DEBUG, 0, '_payment');
|
||||
}
|
||||
$ispostactionok = 1;
|
||||
|
||||
// If an invoice was created, it is into $object->invoice
|
||||
@ -416,7 +435,7 @@ if ($ispaymentok)
|
||||
{
|
||||
$thirdparty_id = $object->fk_soc;
|
||||
|
||||
dol_syslog("Search existing Stripe customer profile for thirdparty_id=".$thirdparty_id, LOG_DEBUG, 0, '_stripe');
|
||||
dol_syslog("Search existing Stripe customer profile for thirdparty_id=".$thirdparty_id, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = 0;
|
||||
@ -436,6 +455,8 @@ if ($ispaymentok)
|
||||
|
||||
if (! $customer && $TRANSACTIONID) // Not linked to a stripe customer, we make the link
|
||||
{
|
||||
dol_syslog("No stripe profile found, so we add it", LOG_DEBUG, 0, '_payment');
|
||||
|
||||
$ch = \Stripe\Charge::retrieve($TRANSACTIONID); // contains the charge id
|
||||
$stripecu = $ch->customer; // value 'cus_....'
|
||||
|
||||
@ -462,9 +483,11 @@ if ($ispaymentok)
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
// Send email
|
||||
// Send email to member
|
||||
if (! $error)
|
||||
{
|
||||
dol_syslog("Send email to customer to ".$object->email." if we have to (sendalsoemail = ".$sendalsoemail.")", LOG_DEBUG, 0, '_payment');
|
||||
|
||||
// Send confirmation Email
|
||||
if ($object->email && $sendalsoemail)
|
||||
{
|
||||
@ -629,7 +652,7 @@ if ($ispaymentok)
|
||||
}
|
||||
else
|
||||
{
|
||||
$postactionmessages[] = 'Setup of bank account to use in module '.$paymentmethod.' was not set. Not way to record the payment.';
|
||||
$postactionmessages[] = 'Setup of bank account to use in module '.$paymentmethod.' was not set. No way to record the payment.';
|
||||
$ispostactionok = -1;
|
||||
$error++;
|
||||
}
|
||||
@ -691,7 +714,9 @@ if ($ispaymentok)
|
||||
|
||||
$tmptag=dolExplodeIntoArray($fulltag,'.','=');
|
||||
|
||||
// Send an email
|
||||
dol_syslog("Send email to admins if we have to (sendemail = ".$sendemail.")", LOG_DEBUG, 0, '_payment');
|
||||
|
||||
// Send an email to admins
|
||||
if ($sendemail)
|
||||
{
|
||||
$companylangs = new Translate('', $conf);
|
||||
|
||||
@ -1184,7 +1184,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
$formadmin=new FormAdmin($db);
|
||||
$defaultlang=$codelang?$codelang:$langs->getDefaultLang();
|
||||
$morecss='maxwidth150';
|
||||
if (! empty($conf->browser->phone)) $morecss='maxwidth100';
|
||||
if ($conf->browser->layout == 'phone') $morecss='maxwidth100';
|
||||
$out.= $formadmin->select_language($defaultlang, 'lang_idrib'.$rib->id, 0, 0, 0, 0, 0, $morecss);
|
||||
}
|
||||
// Button
|
||||
|
||||
@ -307,8 +307,8 @@ print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").'</td><td>';
|
||||
print '<input size="32" type="email" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
||||
print ' '.$langs->trans("Example").': myemail@myserver.com';
|
||||
print '<input size="32" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
|
||||
print ' '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Payment token for URL
|
||||
|
||||
@ -384,18 +384,19 @@ class Stripe extends CommonObject
|
||||
$order = new Commande($this->db);
|
||||
$order->fetch($item);
|
||||
$ref = $order->ref;
|
||||
$description = "ORD=" . $ref . ".CUS=" . $societe->id;
|
||||
$description = "ORD=" . $ref . ".CUS=" . $societe->id.".PM=stripe";
|
||||
} elseif ($origin == invoice) {
|
||||
$invoice = new Facture($this->db);
|
||||
$invoice->fetch($item);
|
||||
$ref = $invoice->ref;
|
||||
$description = "INV=" . $ref . ".CUS=" . $societe->id;
|
||||
$description = "INV=" . $ref . ".CUS=" . $societe->id.".PM=stripe";
|
||||
}
|
||||
|
||||
$metadata = array(
|
||||
"dol_id" => "" . $item . "",
|
||||
"dol_type" => "" . $origin . "",
|
||||
"dol_thirdparty_id" => "" . $societe->id . "",
|
||||
'dol_thirdparty_name' => $societe->name,
|
||||
'dol_version'=>DOL_VERSION,
|
||||
'dol_entity'=>$conf->entity,
|
||||
'ipaddress'=>(empty($_SERVER['REMOTE_ADDR'])?'':$_SERVER['REMOTE_ADDR'])
|
||||
@ -413,7 +414,9 @@ class Stripe extends CommonObject
|
||||
$charge = \Stripe\Charge::create(array(
|
||||
"amount" => "$stripeamount",
|
||||
"currency" => "$currency",
|
||||
// "statement_descriptor" => " ",
|
||||
"capture" => true,
|
||||
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
|
||||
"description" => "Stripe payment: ".$description,
|
||||
"metadata" => $metadata,
|
||||
"source" => "$source"
|
||||
));
|
||||
@ -421,8 +424,9 @@ class Stripe extends CommonObject
|
||||
$paymentarray = array(
|
||||
"amount" => "$stripeamount",
|
||||
"currency" => "$currency",
|
||||
// "statement_descriptor" => " ",
|
||||
"description" => "$description",
|
||||
"capture" => true,
|
||||
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
|
||||
"description" => "Stripe payment: ".$description,
|
||||
"metadata" => $metadata,
|
||||
"source" => "$source",
|
||||
"customer" => "$customer"
|
||||
@ -442,19 +446,26 @@ class Stripe extends CommonObject
|
||||
$fee = round($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100);
|
||||
}
|
||||
|
||||
$charge = \Stripe\Charge::create(array(
|
||||
"amount" => "$stripeamount",
|
||||
"currency" => "$currency",
|
||||
// "statement_descriptor" => " ",
|
||||
"description" => "$description",
|
||||
"metadata" => $metadata,
|
||||
"source" => "$source",
|
||||
"customer" => "$customer",
|
||||
"application_fee" => "$fee"
|
||||
), array(
|
||||
"idempotency_key" => "$ref",
|
||||
"stripe_account" => "$account"
|
||||
));
|
||||
$paymentarray = array(
|
||||
"amount" => "$stripeamount",
|
||||
"currency" => "$currency",
|
||||
"capture" => true,
|
||||
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
|
||||
"description" => "Stripe payment: ".$description,
|
||||
"metadata" => $metadata,
|
||||
"source" => "$source",
|
||||
"customer" => "$customer"
|
||||
);
|
||||
if ($conf->entity!=$conf->global->STRIPECONNECT_PRINCIPAL && $fee>0)
|
||||
{
|
||||
$paymentarray["application_fee"] = $fee;
|
||||
}
|
||||
if ($societe->email && $usethirdpartyemailforreceiptemail)
|
||||
{
|
||||
$paymentarray["receipt_email"] = $societe->email;
|
||||
}
|
||||
|
||||
$charge = \Stripe\Charge::create($paymentarray, array("idempotency_key" => "$ref","stripe_account" => "$account"));
|
||||
}
|
||||
if (isset($charge->id)) {}
|
||||
|
||||
|
||||
@ -2240,7 +2240,7 @@ class User extends CommonObject
|
||||
$label.= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')';
|
||||
$label.= '<br><b>'.$langs->trans("Layout").':</b> '.$conf->browser->layout;
|
||||
$label.= '<br><b>'.$langs->trans("Screen").':</b> '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
|
||||
if (! empty($conf->browser->phone)) $label.= '<br><b>'.$langs->trans("Phone").':</b> '.$conf->browser->phone;
|
||||
if ($conf->browser->layout == 'phone') $label.= '<br><b>'.$langs->trans("Phone").':</b> '.$langs->trans("Yes");;
|
||||
if (! empty($_SESSION["disablemodules"])) $label.= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ',explode(',',$_SESSION["disablemodules"]));
|
||||
}
|
||||
if ($infologin < 0) $label='';
|
||||
|
||||
@ -59,6 +59,8 @@ class AccountingAccountTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -59,7 +59,9 @@ class ActionCommTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -61,7 +61,9 @@ class AdherentTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -59,7 +59,9 @@ class AdminLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -61,7 +61,9 @@ class BankAccountTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -62,6 +62,8 @@ class BonPrelevementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -89,7 +89,9 @@ class BuildDocTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -59,7 +59,9 @@ class CMailFileTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -60,7 +60,9 @@ class CategorieTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -60,6 +60,8 @@ class ChargeSocialesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -72,7 +72,9 @@ class CodingPhpTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -72,7 +72,9 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -61,7 +61,9 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -59,7 +59,9 @@ class CommandeTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -60,7 +60,9 @@ class CommonObjectTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -60,6 +60,8 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -59,7 +59,9 @@ class CompanyLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -68,6 +68,8 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
@ -207,7 +209,7 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
||||
$localobject->email='newemail@newemail.com';
|
||||
$localobject->jabberid='New im id';
|
||||
$localobject->default_lang='es_ES';
|
||||
|
||||
|
||||
$result=$localobject->update($localobject->id,$user);
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0, 'Contact::update error');
|
||||
|
||||
@ -60,6 +60,8 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -62,7 +62,9 @@ class CoreTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -60,6 +60,8 @@ class DateLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,6 +60,8 @@ class DateLibTzFranceTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,6 +60,8 @@ class DiscountTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,6 +60,8 @@ class EntrepotTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,7 +60,9 @@ class ExpenseReportTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -64,6 +64,8 @@ class ExportTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -61,6 +61,8 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -61,6 +61,8 @@ class FactureRecTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -59,7 +59,9 @@ class FactureTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -60,6 +60,8 @@ class FactureTestRounding extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,6 +60,8 @@ class FichinterTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -61,6 +61,8 @@ class FilesLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,6 +60,8 @@ class FormAdminTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -63,7 +63,9 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -63,7 +63,9 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -61,6 +61,8 @@ class GetUrlLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -62,6 +62,8 @@ class HolidayTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -61,6 +61,8 @@ class ImagesLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -62,6 +62,8 @@ class ImportTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -62,7 +62,9 @@ class JsonLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -72,6 +72,8 @@ class LangTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,6 +60,8 @@ class MarginsLibTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -59,6 +59,8 @@ class ModulesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -62,6 +62,8 @@ class MouvementStockTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -59,6 +59,8 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
@ -137,9 +139,9 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase
|
||||
$conf->global->FACTURE_ADDON='mercure';
|
||||
$conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}-{0000}';
|
||||
$conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}-{0000}';
|
||||
$conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED=0;
|
||||
$conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED=0;
|
||||
|
||||
$localobject=new Facture($this->savdb);
|
||||
$localobject=new Facture($this->savdb);
|
||||
$localobject->initAsSpecimen();
|
||||
$localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year
|
||||
$numbering=new mod_facture_mercure();
|
||||
|
||||
@ -61,6 +61,8 @@ class PaypalTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -63,6 +63,8 @@ class PdfDocTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -62,6 +62,8 @@ class PgsqlTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
@ -167,13 +169,13 @@ class PgsqlTest extends PHPUnit_Framework_TestCase
|
||||
$result=DoliDBPgsql::convertSQLFromMysql($sql);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals($result, "SELECT a.b, STRING_AGG(a.c, ',') FROM table GROUP BY a.b", 'Test GROUP_CONCAT (without SEPARATOR)');
|
||||
|
||||
|
||||
// Test GROUP_CONCAT (with SEPARATOR)
|
||||
$sql="SELECT a.b, GROUP_CONCAT(a.c SEPARATOR ',') FROM table GROUP BY a.b";
|
||||
$result=DoliDBPgsql::convertSQLFromMysql($sql);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertEquals($result, "SELECT a.b, STRING_AGG(a.c, ',') FROM table GROUP BY a.b", 'Test GROUP_CONCAT (with SEPARATOR)');
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +67,9 @@ class PricesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -60,7 +60,9 @@ class ProductTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -61,6 +61,8 @@ class ProjectTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,6 +60,8 @@ class PropalTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -62,7 +62,9 @@ class RestAPIDocumentTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf = $conf;
|
||||
$this->savuser = $user;
|
||||
|
||||
@ -64,7 +64,9 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -72,6 +72,8 @@ class ScriptsTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -72,6 +72,8 @@ class SecurityTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,7 +60,9 @@ class SocieteTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -63,6 +63,8 @@ class SupplierProposalTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -60,6 +60,8 @@ class TicketTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -59,7 +59,9 @@ class UserGroupTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -59,7 +59,9 @@ class UserTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -59,6 +59,8 @@ class UtilsTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -69,6 +69,8 @@ class WebservicesInvoicesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
|
||||
@ -63,7 +63,9 @@ class WebservicesOrdersTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -63,7 +63,9 @@ class WebservicesOtherTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
@ -70,7 +70,9 @@ class WebservicesProductsTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
//$this->sharedFixture
|
||||
parent::__construct();
|
||||
|
||||
//$this->sharedFixture
|
||||
global $conf,$user,$langs,$db;
|
||||
$this->savconf=$conf;
|
||||
$this->savuser=$user;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user