Merge remote-tracking branch 'upstream/develop' into zapier

This commit is contained in:
Frédéric FRANCE 2019-09-14 16:37:10 +02:00
commit c9c7d60fc0
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
1141 changed files with 2399 additions and 3299 deletions

View File

@ -13,7 +13,7 @@ Component Version License GPL Compatible
-------------------------------------------------------------------------------------
PHP libraries:
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
CKEditor 4.11.4 LGPL-2.1+ Yes Editor WYSIWYG
CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG
EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)

102
ChangeLog
View File

@ -20,8 +20,110 @@ Following changes may create regressions for some external modules, but were nec
* The deprecated method get_OutstandingBill has been removed. You can use getOutstandingBills() instead.
* The hook "moreFamily" must return payment into var "totalpayment" and no more "paiement" (english replace french).
* Removed deprecated method actioncomm->add(), use create() instead
* If you have developed your own emailing target selector and used parent::add_to_target(...), you must now use parent::addToTargets(...)
* Removed function dol_micro_time. Use native PHP microtime instead.
***** ChangeLog for 10.0.2 compared to 10.0.1 *****
FIX: #10460 compatibility with MariaDB 10.4
FIX: #11401 Adherent unknown language key
FIX: #11422 Can't edit his own events with standard rights
FIX: #11427 require product class (fixes POST /supplierinvoices REST API endpoint)
FIX: #11570
FIX: #11591 FIX: #11592
FIX: #11671 CVE-2019-15062
FIX: #11672
FIX: #11685
FIX: #11702
FIX: #11711
FIX: #11720
FIX: #11746 Unable to modify amount of insurance of a loan
FIX: #11752
FIX: #11789 FIX: #11790
FIX: #11804 list of tickets from a customer card display ALL tickets
FIX: #11834
FIX: Add char $ and ; in sanitizing of filenames.
FIX: Add comment before protected functions
FIX: Add log and type of content in dolWebsiteOutput and
FIX: Add repair.php option 'restore' to restore user picture after v10
FIX: amount opened on thirdparty card dont care of credit note not converted
FIX: Api of documents work with value 'thirdparty'
FIX: author in message / ticket API
FIX: avoid sql error if fk_project is empty during update
FIX: avoid Warning: A non-numeric value encountered
FIX: bad consistency in list of invoice for direct debit order.
FIX: Bad error management in zip compress and web site export
FIX: bad substitution for extrafields type checkbox
FIX: better help message with multicompany
FIX: calculation of $products_dispatched
FIX: Can't add a new chart of account
FIX: Can't delete a draft leave even if it should
FIX: Can't save setup of mailman module
FIX: column jabberid missing
FIX: Confirmation of deletion
FIX: Consistency in direct debit order lists.
FIX: Content send before header warning
FIX: credit note can be split
FIX: credit note used on list
FIX: Css was saved on wrong website.
FIX: delivery extrafields
FIX: Disabling a website does not put it offline
FIX: display only stripe sources for customer
FIX: display payment intent in stripe's charge list
FIX: document list for products in API
FIX: dol_thirdparty_id for stripe PI
FIX: Do not show tooltip if tooltip is empty
FIX: duplicate css tag, decrease padding-bottom for boxes in eldy theme
FIX: duration when creating service
FIX: EDB-ID:47370
FIX: Enable web site
FIX: error management when adding a property with type real
FIX: Fatal situation if payment removed on expense report. Action
FIX: filepath of generated documents doesn't handle products with special characters
FIX: for MAIN_MAXTABS_IN_CARD = $i card
FIX: gzip and bzip2 must use option -f
FIX: It was possible to create cashfence without entering data.
FIX: javascript error when using dol_use_jmobile=1
FIX: logout redirect to takepos.php
FIX: Look and feel v10
FIX: Make protected all pfd models functions
FIX: management of extrafields in modulebuilder
FIX: Missing div for buttons in tax, loan, various payment modules
FIX: missing include (dol_convert_file not found)
FIX: Missing some replacements in website module
FIX: missing test on permission on button to delete ledger record
FIX: Missing the filter fields in export of expense report and leaves
FIX: Missing ticket icon on md theme
FIX: Missing transaction
FIX: Mode smartphone was not triggered when there is too loo menu
FIX: Must escape shell
FIX: Must exclude logs and some dirs for compressed backup
FIX: name and position of hook FIX: #11710
FIX: Not showing MAIN_INVERT_SENDER_RECIPIENT when edit field
FIX: Nowrap missing on amount in boxes
FIX: Option to use ZipArchive instead of PclZip bugged with large files.
FIX: order or proposals billed if both workflow conf activated
FIX: permission check on API intervention
FIX: phpcs
FIX: placement function
FIX: qty in invoice list on product's stats
FIX: remove disabled product type from product list
FIX: Return code of pdf_einstein.modules.php and proformat
FIX: round for application fee in stripe
FIX: Sens of the balance (Debit - Credit in accountancy not contrary)
FIX: Several pb in export of documents
FIX: SQL syntax error and CSRF check on vat reports
FIX: takepos layout clear or focus search
FIX: too many record in sql request. Whena criteria is a filter, we must
FIX: Translation of month
FIX: USEDOLIBARREDITOR not always set
FIX: VAT number for Monaco (it uses FR)
FIX: vulenrability in uploading file found by 美创科技安全实验室
FIX: wrong display (and hidden input) for already dispatched quantity
FIX: wrong parameters (same error in branch 9, 10, develop)
FIX: Wrong variable. Must be PROJECT_HIDE_UNSELECTABLES
***** ChangeLog for 10.0.1 compared to 10.0.0 *****
FIX: #10930
FIX: #10984

View File

@ -10,7 +10,6 @@ File added into doxygen generated documentation
<br>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
@ -24,13 +23,30 @@ File added into doxygen generated documentation
</script>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '1998533953704960');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
<!-- Twitter ad collector -->
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script>
<script src="//static.ads-twitter.com/oct.js" type="text/javascript"></script>
<script type="text/javascript">twttr.conversion.trackPid('ntm4n', { tw_sale_amount: 0, tw_order_quantity: 0 });</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" />
<img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" />
</noscript>
</body>
</html>

View File

@ -30,7 +30,6 @@ src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
</head>
<body>
<div id="top">
<div class="topmaincol">
<div class="divpath">

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2016-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -164,7 +164,7 @@ if ($action == 'export_csv')
print $object->get_compte_desc($line->numero_compte) . $sep;
print price($line->debit) . $sep;
print price($line->credit) . $sep;
print price($line->credit - $line->debit) . $sep;
print price($line->debit - $line->credit) . $sep;
print "\n";
}
@ -293,9 +293,9 @@ if ($action != 'export_csv')
print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . $description . '</td>';
print '<td class="right">' . price($line->debit) . '</td>';
print '<td class="right">' . price($line->credit) . '</td>';
print '<td class="right">' . price($line->credit - $line->debit) . '</td>';
print '<td class="nowraponall right">' . price($line->debit) . '</td>';
print '<td class="nowraponall right">' . price($line->credit) . '</td>';
print '<td class="nowraponall right">' . price($line->debit - $line->credit) . '</td>';
print '<td class="center">' . $link;
print '</td>';
print "</tr>\n";
@ -305,11 +305,11 @@ if ($action != 'export_csv')
$sous_total_credit += $line->credit;
}
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap right">' . price($sous_total_debit) . '</td><td class="nowrap right">' . price($sous_total_credit) . '</td><td class="nowrap right">' . price(price2num($sous_total_credit - $sous_total_debit)) . '</td>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("SubTotal") . ':</td><td class="nowrap right">' . price($sous_total_debit) . '</td><td class="nowrap right">' . price($sous_total_credit) . '</td><td class="nowrap right">' . price(price2num($sous_total_debit - $sous_total_credit)) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap right">' . price($total_debit) . '</td><td class="nowrap right">' . price($total_credit) . '</td><td class="nowrap right">' . price(price2num($total_credit - $total_debit)) . '</td>';
print '<tr class="liste_total"><td class="right" colspan="2">' . $langs->trans("AccountBalance") . ':</td><td class="nowrap right">' . price($total_debit) . '</td><td class="nowrap right">' . price($total_credit) . '</td><td class="nowrap right">' . price(price2num($total_debit - $total_credit)) . '</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';

View File

@ -1740,8 +1740,7 @@ class Adherent extends CommonObject
$paiement->datepaye = $paymentdate;
$paiement->amounts = $amounts;
$paiement->paiementid = dol_getIdFromCode($this->db, $operation, 'c_paiement', 'code', 'id', 1);
$paiement->num_paiement = $num_chq;
$paiement->note = $label;
$paiement->num_payment = $num_chq;
$paiement->note_public = $label;
if (! $error)
@ -2072,10 +2071,8 @@ class Adherent extends CommonObject
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
$notooltip=0;
$result=''; $label='';
$link=''; $linkstart=''; $linkend='';
$linkstart=''; $linkend='';
if (! empty($this->photo))
{
@ -2108,7 +2105,7 @@ class Adherent extends CommonObject
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
}
$link = '<a href="'.$url.'"';
$linkstart.= '<a href="'.$url.'"';
$linkclose="";
if (empty($notooltip))
{
@ -2122,10 +2119,10 @@ class Adherent extends CommonObject
$linkclose.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
}
$link.=$linkclose.'>';
$linkstart.=$linkclose.'>';
$linkend='</a>';
$result.=$link;
$result.=$linkstart;
if ($withpictoimg) $result.='<div class="inline-block nopadding valignmiddle">';
if ($withpictoimg)
{

View File

@ -424,7 +424,7 @@ class AdherentType extends CommonObject
global $langs;
if ($morphy == 'phy') { return $langs->trans("Physical"); }
elseif ($morphy == 'mor') { return $langs->trans("Moral"); }
else return $langs->trans("Physical & Morale");
else return $langs->trans("MorPhy");
//return $morphy;
}

View File

@ -261,7 +261,7 @@ if (! empty($extrafields->attributes[$object->table_element]['label']))
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
$sql.=preg_replace('/^,/', '', $hookmanager->resPrint);
$sql =preg_replace('/, $/', '', $sql);
$sql =preg_replace('/,\s*$/', '', $sql);
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d";
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (d.rowid = ef.fk_object)";
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_member as cm ON d.rowid = cm.fk_member"; // We need this table joined to the select in order to filter by categ

View File

@ -283,7 +283,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
print '<td class="center">';
if ($objp->morphy == 'phy') { print $langs->trans("Physical"); }
elseif ($objp->morphy == 'mor') { print $langs->trans("Moral"); }
else print $langs->trans("Physical & Morale");
else print $langs->trans("MorPhy");
print '</td>';
print '<td class="center">'.yn($objp->subscription).'</td>';
print '<td class="center">'.yn($objp->vote).'</td>';

View File

@ -204,7 +204,7 @@ $tabsql[28]= "SELECT h.rowid as rowid, h.code, h.label, h.affect, h.delay, h.new
$tabsql[29]= "SELECT rowid as rowid, code, label, percent, position, active FROM ".MAIN_DB_PREFIX."c_lead_status";
$tabsql[30]= "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards";
//$tabsql[31]= "SELECT s.rowid as rowid, pcg_version, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s";
$tabsql[32]= "SELECT a.id as rowid, a.entity, a.code, a.fk_country as country_id, c.code as country_code, c.label as country, a.day, a.month, a.year, a.active FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday as a LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON a.fk_country=c.rowid AND c.active=1";
$tabsql[32]= "SELECT a.id as rowid, a.entity, a.code, a.fk_country as country_id, c.code as country_code, c.label as country, a.dayrule, a.day, a.month, a.year, a.active FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday as a LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON a.fk_country=c.rowid AND c.active=1";
$tabsql[33]= "SELECT rowid, pos, code, label, active FROM ".MAIN_DB_PREFIX."c_hrm_department";
$tabsql[34]= "SELECT rowid, pos, code, label, c_level, active FROM ".MAIN_DB_PREFIX."c_hrm_function";
$tabsql[35]= "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_exp_tax_cat c";
@ -244,7 +244,7 @@ $tabsqlsort[28]="country ASC, code ASC";
$tabsqlsort[29]="position ASC";
$tabsqlsort[30]="code ASC";
//$tabsqlsort[31]="pcg_version ASC";
$tabsqlsort[32]="year ASC, month ASC, day ASC";
$tabsqlsort[32]="country, year ASC, month ASC, day ASC";
$tabsqlsort[33]="code ASC";
$tabsqlsort[34]="code ASC";
$tabsqlsort[35]="c.label ASC";
@ -284,7 +284,7 @@ $tabfield[28]= "code,label,affect,delay,newbymonth,country_id,country";
$tabfield[29]= "code,label,percent,position";
$tabfield[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfield[31]= "pcg_version,label";
$tabfield[32]= "code,year,month,day,country_id,country";
$tabfield[32]= "code,dayrule,year,month,day,country_id,country";
$tabfield[33]= "code,label";
$tabfield[34]= "code,label";
$tabfield[35]= "label";
@ -324,7 +324,7 @@ $tabfieldvalue[28]= "code,label,affect,delay,newbymonth,country";
$tabfieldvalue[29]= "code,label,percent,position";
$tabfieldvalue[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfieldvalue[31]= "pcg_version,label";
$tabfieldvalue[32]= "code,day,month,year,country";
$tabfieldvalue[32]= "code,dayrule,day,month,year,country";
$tabfieldvalue[33]= "code,label";
$tabfieldvalue[34]= "code,label";
$tabfieldvalue[35]= "label";
@ -365,7 +365,7 @@ $tabfieldinsert[29]= "code,label,percent,position";
$tabfieldinsert[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y";
//$tabfieldinsert[31]= "pcg_version,label";
//$tabfieldinsert[32]= "code,label,range_account,sens,category_type,formula,position,fk_country";
$tabfieldinsert[32]= "code,day,month,year,fk_country";
$tabfieldinsert[32]= "code,dayrule,day,month,year,fk_country";
$tabfieldinsert[33]= "code,label";
$tabfieldinsert[34]= "code,label";
$tabfieldinsert[35]= "label";
@ -487,7 +487,7 @@ $tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"),'delay'=>$lan
$tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList"));
$tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize"));
//$tabhelp[31] = array('pcg_version'=>$langs->trans("EnterAnyCode"));
$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"), 'daterule'=>"Use 'date'", 'country'=>$langs->trans("EnterACountryOnlyIfSpecificToOneCountry"), 'year'=>$langs->trans("ZeroMeansEveryYear"));
$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"), 'dayrule'=>"Keep empty for a date defined with month and day (most common case).<br>Use a keyword like 'easter', 'eastermonday', ... for a date predefined by complex rules.", 'country'=>$langs->trans("EnterACountryOnlyIfSpecificToOneCountry"), 'year'=>$langs->trans("ZeroMeansEveryYear"));
$tabhelp[33] = array('code'=>$langs->trans("EnterAnyCode"));
$tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode"));
$tabhelp[35] = array();

View File

@ -746,13 +746,19 @@ class Categorie extends CommonObject
/**
* Return list of fetched instance of elements having this category
*
* @param string $type Type of category ('customer', 'supplier', 'contact', 'product', 'member')
* @param int $onlyids Return only ids of objects (consume less memory)
* @return array|int -1 if KO, array of instance of object if OK
* @param string $type Type of category ('customer', 'supplier', 'contact', 'product', 'member')
* @param int $onlyids Return only ids of objects (consume less memory)
* @param int $limit Limit
* @param int $offset Offset
* @param string $sortfield Sort fields
* @param string $sortorder Sort order ('ASC' or 'DESC');
* @return array|int -1 if KO, array of instance of object if OK
* @see containsObject()
*/
public function getObjectsInCateg($type, $onlyids = 0)
public function getObjectsInCateg($type, $onlyids = 0, $limit = 0, $offset = 0, $sortfield = '', $sortorder = 'ASC')
{
global $user;
$objs = array();
$obj = new $this->MAP_OBJ_CLASS[$type]( $this->db );
@ -761,8 +767,15 @@ class Categorie extends CommonObject
$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as c";
$sql .= ", " . MAIN_DB_PREFIX . $this->MAP_OBJ_TABLE[$type] . " as o";
$sql .= " WHERE o.entity IN (" . getEntity($obj->element).")";
$sql.= " AND c.fk_categorie = ".$this->id;
$sql .= " AND c.fk_categorie = ".$this->id;
$sql .= " AND c.fk_" . $this->MAP_CAT_FK[$type] . " = o.rowid";
// Protection for external users
if (($type == 'customer' || $type == 'supplier') && $user->societe_id > 0)
{
$sql.= " AND o.rowid = ".$user->societe_id;
}
if ($limit > 0 || $offset > 0) $sql .= $this->db->plimit($limit + 1, $offset);
$sql .= $this->db->order($sortfield, $sortorder);
dol_syslog(get_class($this)."::getObjectsInCateg", LOG_DEBUG);
$resql = $this->db->query($sql);

View File

@ -34,13 +34,32 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
// Load translation files required by the page
$langs->load("categories");
$id = GETPOST('id', 'int');
$label= GETPOST('label', 'alpha');
$type = GETPOST('type', 'az09');
$action=GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$id = GETPOST('id', 'int');
$label = GETPOST('label', 'alpha');
$type = GETPOST('type', 'az09');
$removeelem = GETPOST('removeelem', 'int');
$elemid = GETPOST('elemid', 'alpha');
$elemid = GETPOST('elemid', 'int');
$action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'myobjectlist'; // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
// Load variable for pagination
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page', 'int');
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($id == "" && $label == "")
{
@ -319,10 +338,20 @@ else
}
// List of mass actions available
$arrayofmassactions = array(
//'validate'=>$langs->trans("Validate"),
//'generate_doc'=>$langs->trans("ReGeneratePDF"),
//'builddoc'=>$langs->trans("PDFMerge"),
//'presend'=>$langs->trans("SendByMail"),
);
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
// List of products or services (type is type of category)
if ($type == Categorie::TYPE_PRODUCT)
{
$prods = $object->getObjectsInCateg("product");
$prods = $object->getObjectsInCateg("product", 0, $limit, $offset);
if ($prods < 0)
{
dol_print_error($db, $prods->error, $prods->errors);
@ -351,14 +380,28 @@ if ($type == Categorie::TYPE_PRODUCT)
print '</form>';
}
print "<br>";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
print '<input type="hidden" name="type" value="'.$typeid.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="action" value="list">';
print '<br>';
$param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($prods); $nbtotalofrecords = ''; $newcardbutton = '';
print_barre_liste($langs->trans("ProductsAndServices"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
print "<table class='noborder' width='100%'>\n";
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("ProductsAndServices").' <span class="badge">'.count($prods).'</span></td></tr>'."\n";
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Ref").'</td></tr>'."\n";
if (count($prods) > 0)
{
$i = 0;
foreach ($prods as $prod)
{
$i++;
if ($i > $limit) break;
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
print $prod->getNomUrl(1);
@ -388,26 +431,42 @@ if ($type == Categorie::TYPE_PRODUCT)
print '<tr class="oddeven"><td colspan="2" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProduct").'</td></tr>';
}
print "</table>\n";
print '</form>'."\n";
}
}
if ($type == Categorie::TYPE_SUPPLIER)
{
$socs = $object->getObjectsInCateg("supplier");
$socs = $object->getObjectsInCateg("supplier", 0, $limit, $offset);
if ($socs < 0)
{
dol_print_error($db, $socs->error, $socs->errors);
}
else
{
print "<br>";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
print '<input type="hidden" name="type" value="'.$typeid.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="action" value="list">';
print '<br>';
$param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; $newcardbutton = '';
print_barre_liste($langs->trans("Suppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
print '<table class="noborder" width="100%">'."\n";
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Suppliers").' <span class="badge">'.count($socs)."</span></td></tr>\n";
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Name")."</td></tr>\n";
if (count($socs) > 0)
{
$i = 0;
foreach ($socs as $soc)
{
$i++;
if ($i > $limit) break;
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
print $soc->getNomUrl(1);
@ -437,30 +496,41 @@ if ($type == Categorie::TYPE_SUPPLIER)
print '<tr class="oddeven"><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoSupplier").'</td></tr>';
}
print "</table>\n";
print '</form>'."\n";
}
}
if($type == Categorie::TYPE_CUSTOMER)
{
$socs = $object->getObjectsInCateg("customer");
$socs = $object->getObjectsInCateg("customer", 0, $limit, $offset);
if ($socs < 0)
{
dol_print_error($db, $socs->error, $socs->errors);
}
else
{
print "<br>";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
print '<input type="hidden" name="type" value="'.$typeid.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="action" value="list">';
print '<br>';
$param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; $newcardbutton = '';
print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
print '<table class="noborder" width="100%">'."\n";
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Customers").' <span class="badge">'.count($socs).'</span></td></tr>'."\n";
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Name").'</td></tr>'."\n";
if (count($socs) > 0)
{
$i = 0;
foreach ($socs as $key => $soc)
{
if ($user->societe_id > 0 && $soc->id != $user->societe_id) continue; // External user always see only themself
$i++;
if ($i > $limit) break;
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
@ -490,6 +560,8 @@ if($type == Categorie::TYPE_CUSTOMER)
print '<tr class="oddeven"><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoCustomer").'</td></tr>';
}
print "</table>\n";
print '</form>'."\n";
}
}
@ -498,21 +570,35 @@ if ($type == Categorie::TYPE_MEMBER)
{
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
$prods = $object->getObjectsInCateg("member");
$prods = $object->getObjectsInCateg("member", 0, $limit, $offset);
if ($prods < 0)
{
dol_print_error($db, $prods->error, $prods->errors);
}
else
{
print "<br>";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
print '<input type="hidden" name="type" value="'.$typeid.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="action" value="list">';
print '<br>';
$param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($prods); $nbtotalofrecords = ''; $newcardbutton = '';
print_barre_liste($langs->trans("Member"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
print "<table class='noborder' width='100%'>\n";
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Member").' <span class="badge">'.count($prods).'</span></td></tr>'."\n";
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Name").'</td></tr>'."\n";
if (count($prods) > 0)
{
$i = 0;
foreach ($prods as $key => $member)
{
$i++;
if ($i > $limit) break;
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
$member->ref=$member->login;
@ -543,22 +629,35 @@ if ($type == Categorie::TYPE_MEMBER)
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoMember").'</td></tr>';
}
print "</table>\n";
print '</form>'."\n";
}
}
// Categorie contact
if ($type == Categorie::TYPE_CONTACT)
{
$contacts = $object->getObjectsInCateg("contact");
$contacts = $object->getObjectsInCateg("contact", 0, $limit, $offset);
if ($contacts < 0)
{
dol_print_error($db, $contacts->error, $contacts->errors);
}
else
{
print "<br>";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
print '<input type="hidden" name="type" value="'.$typeid.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="action" value="list">';
print '<br>';
$param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($contacts); $nbtotalofrecords = ''; $newcardbutton = '';
print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
print '<table class="noborder" width="100%">'."\n";
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Contact").' <span class="badge">'.count($contacts).'</span></td></tr>'."\n";
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Ref").'</td></tr>'."\n";
if (count($contacts) > 0)
{
@ -566,6 +665,7 @@ if ($type == Categorie::TYPE_CONTACT)
foreach ($contacts as $key => $contact)
{
$i++;
if ($i > $limit) break;
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
@ -595,6 +695,8 @@ if ($type == Categorie::TYPE_CONTACT)
print '<tr class="oddeven"><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoContact").'</td></tr>';
}
print "</table>\n";
print '</form>'."\n";
}
}
@ -603,21 +705,35 @@ if ($type == Categorie::TYPE_ACCOUNT)
{
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$accounts = $object->getObjectsInCateg("account");
$accounts = $object->getObjectsInCateg("account", 0, $limit, $offset);
if ($accounts < 0)
{
dol_print_error($db, $accounts->error, $accounts->errors);
}
else
{
print "<br>";
print "<table class='noborder' width='100%'>\n";
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Account").' <span class="badge">'.count($accounts).'</span></td></tr>'."\n";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
print '<input type="hidden" name="type" value="'.$typeid.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="action" value="list">';
print '<br>';
$param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($accounts); $nbtotalofrecords = ''; $newcardbutton = '';
print_barre_liste($langs->trans("Account"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
print "<table class='noborder' width='100%'>\n";
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Ref").'</td></tr>'."\n";
if (count($accounts) > 0)
{
$i = 0;
foreach ($accounts as $key => $account)
{
$i++;
if ($i > $limit) break;
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
print $account->getNomUrl(1, 0);
@ -647,6 +763,8 @@ if ($type == Categorie::TYPE_ACCOUNT)
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoAccount").'</td></tr>';
}
print "</table>\n";
print '</form>'."\n";
}
}
@ -655,21 +773,35 @@ if ($type == Categorie::TYPE_PROJECT)
{
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$projects = $object->getObjectsInCateg("project");
$projects = $object->getObjectsInCateg("project", 0, $limit, $offset);
if ($projects < 0)
{
dol_print_error($db, $object->error, $object->errors);
}
else
{
print "<br>";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="typeid" value="'.$typeid.'">';
print '<input type="hidden" name="type" value="'.$typeid.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="action" value="list">';
print '<br>';
$param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($projects); $nbtotalofrecords = ''; $newcardbutton = '';
print_barre_liste($langs->trans("Project"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, $newcardbutton, '', $limit);
print "<table class='noborder' width='100%'>\n";
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Project").' <span class="badge">'.count($projects).'</span></td></tr>'."\n";
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Ref").'</td></tr>'."\n";
if (count($projects) > 0)
{
$i = 0;
foreach ($projects as $key => $project)
{
$i++;
if ($i > $limit) break;
print "\t".'<tr class="oddeven">'."\n";
print '<td class="nowrap" valign="top">';
print $project->getNomUrl(1);
@ -699,6 +831,8 @@ if ($type == Categorie::TYPE_PROJECT)
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProject").'</td></tr>';
}
print "</table>\n";
print '</form>'."\n";
}
}

View File

@ -221,7 +221,7 @@ if ($action == 'add')
}
// Initialisation objet cactioncomm
if (! GETPOST('actioncode') > 0) // actioncode is id
if (GETPOSTISSET('actioncode') && ! GETPOST('actioncode', 'aZ09')) // actioncode is '0'
{
$error++; $donotclearsession=1;
$action = 'create';
@ -229,7 +229,7 @@ if ($action == 'add')
}
else
{
$object->type_code = GETPOST('actioncode');
$object->type_code = GETPOST('actioncode', 'aZ09');
}
if (! $error)
@ -243,7 +243,7 @@ if ($action == 'add')
$object->elementtype = GETPOST("elementtype", 'alpha');
if (! GETPOST('label'))
{
if (GETPOST('actioncode') == 'AC_RDV' && $contact->getFullName($langs))
if (GETPOST('actioncode', 'aZ09') == 'AC_RDV' && $contact->getFullName($langs))
{
$object->label = $langs->transnoentitiesnoconv("TaskRDVWith", $contact->getFullName($langs));
}
@ -426,15 +426,15 @@ if ($action == 'update')
$datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
$datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
$object->type_id = dol_getIdFromCode($db, GETPOST("actioncode"), 'c_actioncomm');
$object->label = GETPOST("label");
$object->type_id = dol_getIdFromCode($db, GETPOST("actioncode", 'aZ09'), 'c_actioncomm');
$object->label = GETPOST("label", "alphanohtml");
$object->datep = $datep;
$object->datef = $datef;
$object->percentage = $percentage;
$object->priority = GETPOST("priority");
$object->priority = GETPOST("priority", "alphanohtml");
$object->fulldayevent= GETPOST("fullday")?1:0;
$object->location = GETPOST('location');
$object->socid = GETPOST("socid");
$object->location = GETPOST('location', "alphanohtml");
$object->socid = GETPOST("socid", "int");
$socpeopleassigned = GETPOST("socpeopleassigned", 'array');
$object->socpeopleassigned = array();
foreach ($socpeopleassigned as $cid) $object->socpeopleassigned[$cid] = array('id' => $cid);
@ -446,8 +446,8 @@ if ($action == 'update')
$object->fk_project = GETPOST("projectid", 'int');
$object->note = GETPOST("note", "none"); // deprecated
$object->note_private= GETPOST("note", "none");
$object->fk_element = GETPOST("fk_element");
$object->elementtype = GETPOST("elementtype");
$object->fk_element = GETPOST("fk_element", "int");
$object->elementtype = GETPOST("elementtype", "alphanohtml");
if (! $datef && $percentage == 100)
{
@ -491,7 +491,7 @@ if ($action == 'update')
}
// Check parameters
if (! GETPOST('actioncode') > 0)
if (GETPOSTISSET('actioncode') && ! GETPOST('actioncode', 'aZ09')) // actioncode is '0'
{
$error++; $donotclearsession=1;
$action = 'edit';
@ -499,7 +499,7 @@ if ($action == 'update')
}
else
{
$result=$cactioncomm->fetch(GETPOST('actioncode'));
$result=$cactioncomm->fetch(GETPOST('actioncode', 'aZ09'));
}
if (empty($object->userownerid))
{
@ -689,7 +689,7 @@ if ($action == 'create')
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) print '<input type="hidden" name="actioncode" value="'.dol_getIdFromCode($db, 'AC_OTH', 'c_actioncomm').'">';
if (GETPOST("actioncode") == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous"), '', 'title_agenda');
if (GETPOST("actioncode", 'aZ09') == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous"), '', 'title_agenda');
else print load_fiche_titre($langs->trans("AddAnAction"), '', 'title_agenda');
dol_fiche_head();
@ -701,7 +701,7 @@ if ($action == 'create')
{
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Type").'</span></b></td><td>';
$default=(empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)?'':$conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT);
$formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):($object->type_code?$object->type_code:$default), "actioncode", "systemauto", 0, -1);
$formactions->select_type_actions(GETPOST("actioncode", 'aZ09')?GETPOST("actioncode", 'aZ09'):($object->type_code?$object->type_code:$default), "actioncode", "systemauto", 0, -1);
print '</td></tr>';
}
@ -731,7 +731,7 @@ if ($action == 'create')
{
$datef=dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h');
}
print '<tr><td><span id="dateend"'.(GETPOST("actioncode") == 'AC_RDV'?' class="fieldrequired"':'').'>'.$langs->trans("DateActionEnd").'</span></td><td>';
print '<tr><td><span id="dateend"'.(GETPOST("actioncode", 'aZ09') == 'AC_RDV'?' class="fieldrequired"':'').'>'.$langs->trans("DateActionEnd").'</span></td><td>';
if (GETPOST("afaire") == 1) {
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend');
} elseif (GETPOST("afaire") == 2) {
@ -1010,15 +1010,15 @@ if ($id > 0)
$datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
$datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
$object->type_id = dol_getIdFromCode($db, GETPOST("actioncode"), 'c_actioncomm');
$object->label = GETPOST("label");
$object->type_id = dol_getIdFromCode($db, GETPOST("actioncode", 'aZ09'), 'c_actioncomm');
$object->label = GETPOST("label", "alphanohtml");
$object->datep = $datep;
$object->datef = $datef;
$object->percentage = $percentage;
$object->priority = GETPOST("priority");
$object->priority = GETPOST("priority", "alphanohtml");
$object->fulldayevent= GETPOST("fullday")?1:0;
$object->location = GETPOST('location');
$object->socid = GETPOST("socid");
$object->location = GETPOST('location', "alpanohtml");
$object->socid = GETPOST("socid", "int");
$socpeopleassigned = GETPOST("socpeopleassigned", 'array');
foreach ($socpeopleassigned as $tmpid) $object->socpeopleassigned[$id] = array('id' => $tmpid);
$object->contactid = GETPOST("contactid", 'int');
@ -1101,7 +1101,7 @@ if ($id > 0)
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td colspan="3">';
if ($object->type_code != 'AC_OTH_AUTO')
{
$formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):$object->type_code, "actioncode", "systemauto");
$formactions->select_type_actions(GETPOST("actioncode", 'aZ09')?GETPOST("actioncode", 'aZ09'):$object->type_code, "actioncode", "systemauto");
}
else
{

View File

@ -84,7 +84,7 @@ class CActionComm
$sql = "SELECT id, code, type, libelle as label, color, active, picto";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm";
if (is_numeric($id)) $sql.= " WHERE id=".$id;
else $sql.= " WHERE code='".$id."'";
else $sql.= " WHERE code='".$this->db->escape($id)."'";
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$resql=$this->db->query($sql);

View File

@ -835,7 +835,7 @@ else
{
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
// You ensure that every user is using its own SMTP server when using the mass emailing module.
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails.php">';
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails_emailing.php">';
$linktoadminemailend='</a>';
setEventMessages($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), null, 'warnings');
setEventMessages($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), null, 'warnings');

View File

@ -335,15 +335,15 @@ class Mailing extends CommonObject
$target_array=array();
$sql = "SELECT fk_contact, ";
$sql.=" lastname, ";
$sql.=" firstname,";
$sql.=" email,";
$sql.=" other,";
$sql.=" source_url,";
$sql.=" source_id ,";
$sql.=" source_type ";
$sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles ";
$sql = "SELECT fk_contact,";
$sql.= " lastname,";
$sql.= " firstname,";
$sql.= " email,";
$sql.= " other,";
$sql.= " source_url,";
$sql.= " source_id ,";
$sql.= " source_type";
$sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles";
$sql.= " WHERE fk_mailing = ".$fromid;
$result=$this->db->query($sql);
@ -353,14 +353,16 @@ class Mailing extends CommonObject
{
while ($obj = $this->db->fetch_object($result)) {
$target_array[]=array('fk_contact'=>$obj->fk_contact,
'lastname'=>$obj->lastname,
'firstname'=>$obj->firstname,
'email'=>$obj->email,
'other'=>$obj->other,
'source_url'=>$obj->source_url,
'source_id'=>$obj->source_id,
'source_type'=>$obj->source_type);
$target_array[]=array(
'fk_contact'=>$obj->fk_contact,
'lastname'=>$obj->lastname,
'firstname'=>$obj->firstname,
'email'=>$obj->email,
'other'=>$obj->other,
'source_url'=>$obj->source_url,
'source_id'=>$obj->source_id,
'source_type'=>$obj->source_type
);
}
}
}
@ -370,7 +372,7 @@ class Mailing extends CommonObject
return -1;
}
$mailing_target->add_to_target($object->id, $target_array);
$mailing_target->addTargetsToDatabase($object->id, $target_array);
}
}

View File

@ -156,8 +156,6 @@ $title=$langs->trans("LT".$object->ltt) . " - " . $langs->trans("Card");
$help_url='';
llxHeader("", $title, $helpurl);
if ($action == 'create')
{
print load_fiche_titre($langs->transcountry($lttype==2?"newLT2Payment":"newLT1Payment", $mysoc->country_code));

View File

@ -85,6 +85,12 @@ $socid = GETPOST('socid', 'int');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'tax', '', '', 'charges');
if (empty($local))
{
accessforbidden('Parameter localTaxType is missing');
exit;
}
/*
@ -106,11 +112,12 @@ llxHeader('', '', '', '', 0, 0, '', '', $morequerystring);
$name=$langs->transcountry($local==1?"LT1ReportByCustomers":"LT2ReportByCustomers", $mysoc->country_code);
$fsearch.='<br>';
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
$fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': ';
$fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
$fsearch ='<!-- hidden fields for form -->';
$fsearch.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$fsearch.='<input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch.='<input type="hidden" name="localTaxType" value="'.$local.'">';
$fsearch.=$langs->trans("SalesTurnoverMinimum").': ';
$fsearch.='<input type="text" name="min" id="min" value="'.$min.'" size="6">';
$calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
// Affiche en-tete du rapport

View File

@ -188,6 +188,19 @@ function pt($db, $sql, $date)
}
}
if (empty($localTaxType))
{
accessforbidden('Parameter localTaxType is missing');
exit;
}
/*
* Actions
*/
// None
/*
* View
@ -213,7 +226,11 @@ if($localTaxType==1) {
$CalcLT= $conf->global->MAIN_INFO_LOCALTAX_CALC2;
}
$fsearch.=' <input type="hidden" name="localTaxType" value="'.$localTaxType.'">';
$fsearch = '<!-- hidden fields for form -->';
$fsearch.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$fsearch.= '<input type="hidden" name="localTaxType" value="'.$localTaxType.'">';
$fsearch.= '<input type="hidden" name="modetax" value="'.$modetax.'">';
$description = $fsearch;
// Show report header
@ -528,7 +545,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
$total = $total + $diff;
$subtotal = price2num($subtotal + $diff, 'MT');
print '<td class="nowrap right">'.price(price2num($diff, 'MT')).'</td>\n';
print '<td class="nowrap right">'.price(price2num($diff, 'MT')).'</td>'."\n";
print "<td>&nbsp;</td>\n";
print "</tr>\n";

View File

@ -97,6 +97,12 @@ $socid = GETPOST('socid', 'int');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'tax', '', '', 'charges');
if (empty($local))
{
accessforbidden('Parameter localTaxType is missing');
exit;
}
/*
@ -122,9 +128,10 @@ foreach ($listofparams as $param)
llxHeader('', $langs->trans("LocalTaxReport"), '', '', 0, 0, '', '', $morequerystring);
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
$fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch.=' <input type="hidden" name="localTaxType" value="'.$local.'">';
$fsearch = '<!-- hidden fields for form -->';
$fsearch.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$fsearch.= '<input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch.= '<input type="hidden" name="localTaxType" value="'.$local.'">';
$name=$langs->transcountry($local==1?"LT1ReportByQuarters":"LT2ReportByQuarters", $mysoc->country_code);
$calcmode='';
@ -161,7 +168,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description.='<br>'.$langs->trans("DepositsAreNotIncluded");
}
*/
if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='<br>'.$langs->trans("ThisIsAnEstimatedValue");
if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.=$langs->trans("ThisIsAnEstimatedValue");
// Customers invoices
$elementcust=$langs->trans("CustomersInvoices");
@ -186,15 +193,14 @@ if ($mysoc->tva_assuj) {
report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode);
if($local==1){
$vatcust=$langs->transcountry("LocalTax1", $mysoc->country_code);
$vatsup=$langs->transcountry("LocalTax1", $mysoc->country_code);
$vatexpensereport=$langs->transcountry("LocalTax1", $mysoc->country_code);
$vatcust=$langs->transcountry("LT1", $mysoc->country_code);
$vatsup=$langs->transcountry("LT1", $mysoc->country_code);
$vatexpensereport=$langs->transcountry("LT1", $mysoc->country_code);
}else{
$vatcust=$langs->transcountry("LocalTax2", $mysoc->country_code);
$vatsup=$langs->transcountry("LocalTax2", $mysoc->country_code);
$vatexpensereport=$langs->transcountry("LocalTax2", $mysoc->country_code);
$vatcust=$langs->transcountry("LT2", $mysoc->country_code);
$vatsup=$langs->transcountry("LT2", $mysoc->country_code);
$vatexpensereport=$langs->transcountry("LT2", $mysoc->country_code);
}
// VAT Received and paid

View File

@ -813,7 +813,7 @@ class RemiseCheque extends CommonObject
$rejectedPayment->amounts = array();
$rejectedPayment->datepaye = $rejection_date;
$rejectedPayment->paiementid = dol_getIdFromCode($this->db, 'CHQ', 'c_paiement', 'code', 'id', 1);
$rejectedPayment->num_paiement = $payment->numero;
$rejectedPayment->num_payment = $payment->num_payment;
while($obj = $db->fetch_object($resql))
{

View File

@ -117,6 +117,7 @@ class Paiement extends CommonObject
/**
* @var int bank account id of payment
* @deprecated
* @see $fk_account
*/
public $bank_account;
@ -182,7 +183,6 @@ class Paiement extends CommonObject
$this->ref = $obj->ref?$obj->ref:$obj->rowid;
$this->date = $this->db->jdate($obj->dp);
$this->datepaye = $this->db->jdate($obj->dp);
$this->numero = $obj->num_payment; // deprecated
$this->num_paiement = $obj->num_payment; // deprecated
$this->num_payment = $obj->num_payment;
$this->montant = $obj->amount; // deprecated
@ -286,10 +286,12 @@ class Paiement extends CommonObject
$total = $totalamount_converted; // Maybe use price2num with MT for the converted value
$mtotal = $totalamount;
}
$num_payment = ($this->num_payment?$this->num_payment:$this->num_paiement);
$note = ($this->note_public?$this->note_public:$this->note);
$sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, ext_payment_id, ext_payment_site, fk_user_creat)";
$sql.= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '". $this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", '".$this->db->escape($this->num_paiement)."', '".$this->db->escape($note)."', ".($this->ext_payment_id?"'".$this->db->escape($this->ext_payment_id)."'":"null").", ".($this->ext_payment_site?"'".$this->db->escape($this->ext_payment_site)."'":"null").", ".$user->id.")";
$sql.= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '". $this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", '".$this->db->escape($num_payment)."', '".$this->db->escape($note)."', ".($this->ext_payment_id?"'".$this->db->escape($this->ext_payment_id)."'":"null").", ".($this->ext_payment_site?"'".$this->db->escape($this->ext_payment_site)."'":"null").", ".$user->id.")";
dol_syslog(get_class($this)."::Create insert paiement", LOG_DEBUG);
$resql = $this->db->query($sql);
@ -885,7 +887,7 @@ class Paiement extends CommonObject
$result = $this->db->query($sql);
if ($result)
{
$this->numero = $this->db->escape($num);
$this->num_payment = $this->db->escape($num);
return 0;
}
else

View File

@ -739,8 +739,11 @@ class BonPrelevement extends CommonObject
$sql = "SELECT count(f.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
$sql.= " WHERE f.fk_statut = ".Facture::STATUS_VALIDATED;
$sql.= " AND f.entity IN (".getEntity('invoice').")";
$sql.= " WHERE f.entity IN (".getEntity('invoice').")";
if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS))
{
$sql.= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
}
$sql.= " AND f.rowid = pfd.fk_facture";
$sql.= " AND pfd.traite = 0";
$sql.= " AND f.total_ttc > 0";

View File

@ -208,7 +208,10 @@ $sql.= " ".MAIN_DB_PREFIX."societe as s,";
$sql.= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
$sql.= " WHERE s.rowid = f.fk_soc";
$sql.= " AND f.entity IN (".getEntity('invoice').")";
$sql.= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS))
{
$sql.= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
}
$sql.= " AND f.total_ttc > 0";
$sql.= " AND pfd.traite = 0";
$sql.= " AND pfd.fk_facture = f.rowid";

View File

@ -93,7 +93,10 @@ if ($socid) $sql.= " AND f.fk_soc = ".$socid;
if (!$status) $sql.= " AND pfd.traite = 0";
if ($status) $sql.= " AND pfd.traite = ".$status;
$sql.= " AND f.total_ttc > 0";
$sql.= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS))
{
$sql.= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
}
$sql.= " AND pfd.fk_facture = f.rowid";
if (dol_strlen(trim(GETPOST('search_societe', 'alpha'))))
{

View File

@ -102,7 +102,10 @@ $sql.= " , ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
$sql.= " WHERE s.rowid = f.fk_soc";
$sql.= " AND f.entity IN (".getEntity('invoice').")";
$sql.= " AND f.total_ttc > 0";
$sql.= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS))
{
$sql.= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
}
$sql.= " AND pfd.traite = 0 AND pfd.fk_facture = f.rowid";
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($socid) $sql.= " AND f.fk_soc = ".$socid;

View File

@ -123,11 +123,11 @@ if (isset($_REQUEST['extra_report']) && $_REQUEST['extra_report'] == 1) {
llxHeader('', $langs->trans("VATReport"), '', '', 0, 0, '', '', $morequerystring);
$fsearch.='<br>';
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
$fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': ';
$fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
$fsearch ='<!-- hidden fields for form -->';
$fsearch.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$fsearch.='<input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch.=$langs->trans("SalesTurnoverMinimum").': ';
$fsearch.='<input type="text" name="min" id="min" value="'.$min.'" size="6">';
// Show report header
$name=$langs->trans("VATReportByThirdParties");

View File

@ -198,7 +198,11 @@ $form=new Form($db);
$company_static=new Societe($db);
$tva = new Tva($db);
$description = '';
$fsearch ='<!-- hidden fields for form -->';
$fsearch.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$fsearch.='<input type="hidden" name="modetax" value="'.$modetax.'">';
$description = $fsearch;
// Show report header
$name = $langs->trans("ReportByMonth");
@ -208,7 +212,7 @@ if ($modetax == 1) $calcmode=$langs->trans('OptionVATDebitOption');
if ($modetax == 2) $calcmode=$langs->trans('OptionPaymentForProductAndServices');
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')';
$description = $langs->trans("VATSummary").'<br>';
$description .= $langs->trans("VATSummary").'<br>';
if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description.=$langs->trans("RulesVATDueProducts");
if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment') $description.=$langs->trans("RulesVATInProducts");
if ($conf->global->TAX_MODE_SELL_SERVICE == 'invoice') $description.='<br>'.$langs->trans("RulesVATDueServices");

View File

@ -124,8 +124,9 @@ llxHeader('', $title, '', '', 0, 0, '', '', $morequerystring);
//print load_fiche_titre($langs->trans("VAT"),"");
//$fsearch.='<br>';
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
$fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch ='<!-- hidden fields for form -->';
$fsearch.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$fsearch.='<input type="hidden" name="modetax" value="'.$modetax.'">';
//$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': ';
//$fsearch.=' <input type="text" name="min" value="'.$min.'">';

View File

@ -433,7 +433,7 @@ if (empty($reshook))
}
$qty = GETPOST('qty'.$predef);
$remise_percent = GETPOST('remise_percent'.$predef);
$remise_percent = ((GETPOST('remise_percent'.$predef) != '') ? GETPOST('remise_percent'.$predef) : 0);
if ($qty == '')
{
@ -566,7 +566,8 @@ if (empty($reshook))
$info_bits=0;
if ($tva_npr) $info_bits |= 0x01;
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS) )&& ($price_min && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))))
if (((! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance))
|| empty($conf->global->MAIN_USE_ADVANCED_PERMS) ) && ($price_min && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))))
{
$object->error = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency));
$result = -1 ;

View File

@ -173,7 +173,7 @@ class box_activity extends ModeleBoxes
$totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array(
'td' => 'class="right"',
'td' => 'class="nowrap right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
);
$this->info_box_contents[$line][4] = array(
@ -256,7 +256,7 @@ class box_activity extends ModeleBoxes
$totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array(
'td' => 'class="right"',
'td' => 'class="nowrap right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
);
$this->info_box_contents[$line][4] = array(
@ -340,7 +340,7 @@ class box_activity extends ModeleBoxes
);
$this->info_box_contents[$line][3] = array(
'td' => 'class="right"',
'td' => 'class="nowrap right"',
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency)
);

View File

@ -134,7 +134,7 @@ class box_comptes extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'td' => 'class="right nowraponall"',
'text' => price($solde, 0, $langs, 0, -1, -1, $objp->currency_code)
);

View File

@ -179,12 +179,12 @@ class box_produits_alerte_stock extends ModeleBoxes
}
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'td' => 'class="right nowraponall"',
'text' => $price,
);
$this->info_box_contents[$line][] = array(
'td' => 'class="nowrap"',
'td' => 'class="right"',
'text' => $price_base_type,
);

View File

@ -135,7 +135,7 @@ class box_supplier_orders extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
'td' => 'class="right nowrap"',
'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency),
);

View File

@ -156,6 +156,8 @@ class box_task extends ModeleBoxes
$sql.= " pt.entity = ".$conf->entity;
$sql.= " AND p.fk_statut = ".Project::STATUS_VALIDATED;
$sql.= " AND (pt.progress < 100 OR pt.progress IS NULL ) "; // 100% is done and not displayed
$sql.= " AND p.usage_task = 1 ";
$sql.= " ORDER BY pt.datee ASC, pt.dateo ASC";
$sql.= $db->plimit($max, 0);

View File

@ -4517,7 +4517,7 @@ abstract class CommonObject
$parameters = array('modelspath'=>$modelspath,'modele'=>$modele,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'hidedesc'=>$hidedesc,'hideref'=>$hideref, 'moreparams'=>$moreparams);
$reshook = $hookmanager->executeHooks('commonGenerateDocument', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if(empty($reshook))
{
dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs)?$outputlangs->defaultlang:'null'));
@ -4902,13 +4902,12 @@ abstract class CommonObject
if (! is_array($optionsArray))
{
// If $extrafields is not a known object, we initialize it. Best practice is to have $extrafields defined into card.php or list.php page.
// TODO Use of existing $extrafield is not yet ready (must mutualize code that use extrafields in form first)
// global $extrafields;
//if (! is_object($extrafields))
//{
global $extrafields;
if (! isset($extrafields) || ! is_object($extrafields))
{
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields = new ExtraFields($this->db);
//}
}
// Load array of extrafields for elementype = $this->table_element
if (empty($extrafields->attributes[$this->table_element]['loaded']))

View File

@ -552,9 +552,6 @@ class Conf
if (! isset($this->global->MAIN_PDF_DASH_BETWEEN_LINES)) $this->global->MAIN_PDF_DASH_BETWEEN_LINES=1; // use dash between lines
if (! isset($this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) $this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT=1; // allow html content into free footer text
// Set default value to MAIN_SHOW_LOGO
if (! isset($this->global->MAIN_SHOW_LOGO)) $this->global->MAIN_SHOW_LOGO=1;
// Default max file size for upload
$this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : (int) $this->global->MAIN_UPLOAD_DOC * 1024);

View File

@ -1152,9 +1152,8 @@ class Form
$sql .= ", dictp.code as country_code";
}
$sql.= " FROM (".MAIN_DB_PREFIX ."societe as s";
$sql.= " FROM ".MAIN_DB_PREFIX ."societe as s";
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " )";
if ($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST) {
$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."c_country as dictp ON dictp.rowid=s.fk_pays";
}
@ -4238,7 +4237,7 @@ class Form
$formconfirm.= '<td class="valid">';
$formconfirm.= $this->selectyesno("confirm", $newselectedchoice);
$formconfirm.= '</td>';
$formconfirm.= '<td class="valid center"><input class="button valignmiddle" type="submit" onclick="this.disabled=\'disabled\' value="'.$langs->trans("Validate").'"></td>';
$formconfirm.= '<td class="valid center"><input class="button valignmiddle" type="submit" value="'.$langs->trans("Validate").'"></td>';
$formconfirm.= '</tr>'."\n";
$formconfirm.= '</table>'."\n";

View File

@ -82,7 +82,6 @@ function getServerTimeZoneString()
*/
function getServerTimeZoneInt($refgmtdate = 'now')
{
global $conf;
if (method_exists('DateTimeZone', 'getOffset'))
{
// Method 1 (include daylight)
@ -329,6 +328,7 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date)
*/
function dol_stringtotime($string, $gm = 1)
{
$reg=array();
// Convert date with format DD/MM/YYY HH:MM:SS. This part of code should not be used.
if (preg_match('/^([0-9]+)\/([0-9]+)\/([0-9]+)\s?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $string, $reg))
{
@ -595,39 +595,47 @@ function dol_get_first_day_week($day, $month, $year, $gm = false)
}
/**
* Fonction retournant le nombre de jour feries, samedis et dimanches entre 2 dates entrees en timestamp. Dates must be UTC with hour, day, min to 0
* Return the number of non working days including saturday and sunday (or not) between 2 dates in timestamp.
* Dates must be UTC with hour, day, min to 0.
* Called by function num_open_day
*
* @param int $timestampStart Timestamp de debut
* @param int $timestampEnd Timestamp de fin
* @param string $countrycode Country code
* @param string $country_code Country code
* @param int $lastday Last day is included, 0: no, 1:yes
* @return int Nombre de jours feries
* @param int $includesaturday Include saturday as non working day (-1=use setup, 0=no, 1=yes)
* @param int $includesunday Include sunday as non working day (-1=use setup, 0=no, 1=yes)
* @return int|string Number of non working days or error message string if error
* @see num_between_day(), num_open_day()
*/
function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR', $lastday = 0)
function num_public_holiday($timestampStart, $timestampEnd, $country_code = '', $lastday = 0, $includesaturday = -1, $includesunday = -1)
{
global $conf;
global $db, $conf, $mysoc;
$nbFerie = 0;
$specialdayrule = array();
// Check to ensure we use correct parameters
if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hours and must be GMT dates';
if (empty($country_code)) $country_code = $mysoc->country_code;
if ($includesaturday < 0) $includesaturday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY : 1);
if ($includesunday < 0) $includesunday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY : 1);
$i=0;
while (( ($lastday == 0 && $timestampStart < $timestampEnd) || ($lastday && $timestampStart <= $timestampEnd) )
&& ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop)
{
$ferie=false;
$countryfound=0;
$includesaturdayandsunday=1;
$jour = date("d", $timestampStart);
$mois = date("m", $timestampStart);
$annee = date("Y", $timestampStart);
// Check into var $conf->global->HOLIDAY_MORE_DAYS MM-DD,YYYY-MM-DD, ...
// Do not use this anymore, use instead the dictionary of public holidays.
if (! empty($conf->global->HOLIDAY_MORE_PUBLIC_HOLIDAYS))
{
$arrayofdaystring=explode(',', $conf->global->HOLIDAY_MORE_PUBLIC_HOLIDAYS);
@ -645,29 +653,61 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
}
}
if ($countrycode == 'FR')
$country_id = dol_getIdFromCode($db, $country_code, 'c_country', 'code', 'rowid');
// Loop on public holiday defined into hrm_public_holiday
$sql = "SELECT code, entity, fk_country, dayrule, year, month, day, active";
$sql.= " FROM ".MAIN_DB_PREFIX."c_hrm_public_holiday";
$sql.= " WHERE active = 1 and fk_country IN (0".($country_id > 0 ? ", ".$country_id : 0).")";
$resql = $db->query($sql);
if ($resql)
{
$countryfound=1;
$num_rows = $db->num_rows($resql);
$i=0;
while ($i < $num_rows)
{
$obj = $db->fetch_object($resql);
// Definition of fixed working days
if($jour == 1 && $mois == 1) $ferie=true; // 1er january
if($jour == 1 && $mois == 5) $ferie=true; // 1er may
if($jour == 8 && $mois == 5) $ferie=true; // 5 may
if($jour == 14 && $mois == 7) $ferie=true; // 14 july
if($jour == 15 && $mois == 8) $ferie=true; // 15 august
if($jour == 1 && $mois == 11) $ferie=true; // 1 november
if($jour == 11 && $mois == 11) $ferie=true; // 11 november
if($jour == 25 && $mois == 12) $ferie=true; // 25 december
if (! empty($obj->dayrule) && $obj->dayrule != 'date') // For example 'easter', '...'
{
$specialdayrule[$obj->dayrule] = $obj->dayrule;
}
else
{
$match = 1;
if (! empty($obj->year) && $obj->year != $annee) $match = 0;
if ($obj->month != $mois) $match = 0;
if ($obj->day != $jour) $match = 0;
if ($match) $ferie = true;
}
$i++;
}
}
else
{
dol_syslog($db->lasterror(), LOG_ERR);
return 'Error sql '.$db->lasterror();
}
// Special dayrules
if (in_array('easter', $specialdayrule))
{
// Calculation for easter date
$date_paques = easter_date($annee);
$jour_paques = date("d", $date_paques);
$mois_paques = date("m", $date_paques);
if($jour_paques == $jour && $mois_paques == $mois) $ferie=true;
// Pâques
// Easter (sunday)
}
if (in_array('eastermonday', $specialdayrule))
{
// Calculation for the monday of easter date
$date_lundi_paques = mktime(
$date_paques = easter_date($annee);
$date_lundi_paques = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
@ -677,11 +717,15 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
);
$jour_lundi_ascension = date("d", $date_lundi_paques);
$mois_lundi_ascension = date("m", $date_lundi_paques);
if($jour_lundi_ascension == $jour && $mois_lundi_ascension == $mois) $ferie=true;
// Lundi de Pâques
if ($jour_lundi_ascension == $jour && $mois_lundi_ascension == $mois) $ferie=true;
// Easter (monday)
}
// Calcul du jour de l'ascension (38 days after easter day)
$date_ascension = mktime(
if (in_array('ascension', $specialdayrule))
{
// Calcul du jour de l'ascension (39 days after easter day)
$date_paques = easter_date($annee);
$date_ascension = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
@ -692,10 +736,14 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
$jour_ascension = date("d", $date_ascension);
$mois_ascension = date("m", $date_ascension);
if($jour_ascension == $jour && $mois_ascension == $mois) $ferie=true;
// Ascension
// Ascension (thursday)
}
// Calculation of "Pentecote" (11 days after easter day)
$date_pentecote = mktime(
if (in_array('pentecote', $specialdayrule))
{
// Calculation of "Pentecote" (49 days after easter day)
$date_paques = easter_date($annee);
$date_pentecote = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
@ -706,71 +754,31 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
$jour_pentecote = date("d", $date_pentecote);
$mois_pentecote = date("m", $date_pentecote);
if($jour_pentecote == $jour && $mois_pentecote == $mois) $ferie=true;
// "Pentecote"
// "Pentecote" (sunday)
}
// Pentecoste and Ascensione in Italy go to the sunday after: isn't holiday.
// Pentecoste is 50 days after Easter, Ascensione 40
if ($countrycode == 'IT')
if (in_array('pentecotemonday', $specialdayrule))
{
$countryfound=1;
// Definition des dates feriees fixes
if($jour == 1 && $mois == 1) $ferie=true; // Capodanno
if($jour == 6 && $mois == 1) $ferie=true; // Epifania
if($jour == 25 && $mois == 4) $ferie=true; // Anniversario Liberazione
if($jour == 1 && $mois == 5) $ferie=true; // Festa del Lavoro
if($jour == 2 && $mois == 6) $ferie=true; // Festa della Repubblica
if($jour == 15 && $mois == 8) $ferie=true; // Ferragosto
if($jour == 1 && $mois == 11) $ferie=true; // Tutti i Santi
if($jour == 8 && $mois == 12) $ferie=true; // Immacolata Concezione
if($jour == 25 && $mois == 12) $ferie=true; // 25 decembre
if($jour == 26 && $mois == 12) $ferie=true; // Santo Stefano
// Calcul du jour de paques
// Calculation of "Pentecote" (49 days after easter day)
$date_paques = easter_date($annee);
$jour_paques = date("d", $date_paques);
$mois_paques = date("m", $date_paques);
if($jour_paques == $jour && $mois_paques == $mois) $ferie=true;
// Paques
$date_pentecote = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
date("m", $date_paques),
date("d", $date_paques) + 50,
date("Y", $date_paques)
);
$jour_pentecote = date("d", $date_pentecote);
$mois_pentecote = date("m", $date_pentecote);
if($jour_pentecote == $jour && $mois_pentecote == $mois) $ferie=true;
// "Pentecote" (monday)
}
if ($countrycode == 'IN')
if (in_array('viernessanto', $specialdayrule))
{
$countryfound=1;
if($jour == 1 && $mois == 1) $ferie=true; // New Year's Day
if($jour == 26 && $mois == 1) $ferie=true; // Republic Day
if($jour == 1 && $mois == 5) $ferie=true; // May Day
if($jour == 15 && $mois == 8) $ferie=true; // Independence Day
if($jour == 2 && $mois == 10) $ferie=true; // Gandhi Jayanti
if($jour == 25 && $mois == 12) $ferie=true; // Christmas
}
if ($countrycode == 'ES')
{
$countryfound=1;
// Definition des dates feriees fixes
if($jour == 1 && $mois == 1) $ferie=true; // Año nuevo
if($jour == 6 && $mois == 1) $ferie=true; // Día Reyes
if($jour == 1 && $mois == 5) $ferie=true; // 1 Mayo
if($jour == 15 && $mois == 8) $ferie=true; // 15 Agosto
if($jour == 12 && $mois == 10) $ferie=true; // Día Hispanidad
if($jour == 1 && $mois == 11) $ferie=true; // 1 noviembre
if($jour == 6 && $mois == 12) $ferie=true; // Constitución
if($jour == 8 && $mois == 12) $ferie=true; // Inmaculada
if($jour == 25 && $mois == 12) $ferie=true; // 25 diciembre
// Calcul día de Pascua
$date_paques = easter_date($annee);
$jour_paques = date("d", $date_paques);
$mois_paques = date("m", $date_paques);
if($jour_paques == $jour && $mois_paques == $mois) $ferie=true;
// Paques
// Viernes Santo
$date_viernes = mktime(
$date_paques = easter_date($annee);
$date_viernes = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
@ -784,74 +792,11 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
//Viernes Santo
}
if ($countrycode == 'AT')
if (in_array('fronleichnam', $specialdayrule))
{
$countryfound=1;
// Definition des dates feriees fixes
if($jour == 1 && $mois == 1) $ferie=true; // Neujahr
if($jour == 6 && $mois == 1) $ferie=true; // Hl. 3 Koenige
if($jour == 1 && $mois == 5) $ferie=true; // 1. Mai
if($jour == 15 && $mois == 8) $ferie=true; // Mariae Himmelfahrt
if($jour == 26 && $mois == 10) $ferie=true; // 26. Oktober
if($jour == 1 && $mois == 11) $ferie=true; // Allerheiligen
if($jour == 8 && $mois == 12) $ferie=true; // Mariae Empfaengnis
if($jour == 24 && $mois == 12) $ferie=true; // Heilig abend
if($jour == 25 && $mois == 12) $ferie=true; // Christtag
if($jour == 26 && $mois == 12) $ferie=true; // Stefanietag
if($jour == 31 && $mois == 12) $ferie=true; // Silvester
// Easter calculation
$date_paques = easter_date($annee);
$jour_paques = date("d", $date_paques);
$mois_paques = date("m", $date_paques);
if($jour_paques == $jour && $mois_paques == $mois) $ferie=true;
// Easter sunday
// Monday after easter
$date_eastermonday = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
date("m", $date_paques),
date("d", $date_paques) + 1,
date("Y", $date_paques)
);
$jour_eastermonday = date("d", $date_eastermonday);
$mois_eastermonday = date("m", $date_eastermonday);
if($jour_eastermonday == $jour && $mois_eastermonday == $mois) $ferie=true;
// Easter monday
// Christi Himmelfahrt (39 days after easter sunday)
$date_ch = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
date("m", $date_paques),
date("d", $date_paques) + 39,
date("Y", $date_paques)
);
$jour_ch = date("d", $date_ch);
$mois_ch = date("m", $date_ch);
if($jour_ch == $jour && $mois_ch == $mois) $ferie=true;
// Christi Himmelfahrt
// Pfingsten (50 days after easter sunday)
$date_pentecote = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
date("m", $date_paques),
date("d", $date_paques) + 50,
date("Y", $date_paques)
);
$jour_pentecote = date("d", $date_pentecote);
$mois_pentecote = date("m", $date_pentecote);
if($jour_pentecote == $jour && $mois_pentecote == $mois) $ferie=true;
// Pfingsten
// Fronleichnam (60 days after easter sunday)
$date_fronleichnam = mktime(
$date_paques = easter_date($annee);
$date_fronleichnam = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
@ -866,15 +811,21 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
}
// If we have to include saturday and sunday
if ($includesaturdayandsunday)
if ($includesaturday || $includesunday)
{
$jour_julien = unixtojd($timestampStart);
$jour_semaine = jddayofweek($jour_julien, 0);
if($jour_semaine == 0 || $jour_semaine == 6) $ferie=true;
//Saturday (6) and Sunday (0)
if ($includesaturday) //Saturday (6) and Sunday (0)
{
if ($jour_semaine == 6) $ferie=true;
}
if ($includesunday) //Saturday (6) and Sunday (0)
{
if($jour_semaine == 0) $ferie=true;
}
}
// On incremente compteur
// We increase the counter of non working day
if ($ferie) $nbFerie++;
// Increase number of days (on go up into loop)

View File

@ -3897,7 +3897,7 @@ function dol_print_error_email($prefixcode, $errormessage = '', $errormessages =
$now=dol_now();
print '<br><div class="center login_main_message"><div class="'.$morecss.'">';
print $langs->trans("ErrorContactEMail", $email, $prefixcode.dol_print_date($now, '%Y%m%d'));
print $langs->trans("ErrorContactEMail", $email, $prefixcode.dol_print_date($now, '%Y%m%d%H%M%S'));
if ($errormessage) print '<br><br>'.$errormessage;
if (is_array($errormessages) && count($errormessages))
{
@ -5753,20 +5753,6 @@ function dol_nboflines_bis($text, $maxlinesize = 0, $charset = 'UTF-8')
return $nblines;
}
/**
* Same function than microtime in PHP 5 but compatible with PHP4
*
* @return float Time (millisecondes) with microsecondes in decimal part
* @deprecated Dolibarr does not support PHP4, you should use native function
* @see microtime()
*/
function dol_microtime_float()
{
dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
return microtime(true);
}
/**
* Return if a text is a html content
*

View File

@ -565,7 +565,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
// resume
print '<td class="right">';
print getTaskProgressView($taskstatic, false, false);
if ($lines[$i]->progress != '' && $lines[$i]->duration) {
print getTaskProgressView($taskstatic, false, false);
}
print '</td>';
if ($showbilltime)
@ -664,12 +666,48 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
print convertSecondToTime($total_projectlinesa_spent, 'allhourmin');
if ($projectidfortotallink > 0) print '</a>';
print '</td>';
if ($total_projectlinesa_planned) {
$totalAverageDeclaredProgress = round(100 * $total_projectlinesa_declared_if_planned / $total_projectlinesa_planned, 2);
$totalCalculatedProgress = round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned, 2);
// this conf is actually hidden, by default we use 1% for "be carefull or warning"
$warningRatio = !empty($conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT) ? (1 + $conf->global->PROJECT_TIME_SPEND_WARNING_PERCENT / 100) : 1.01;
// define progress color according to time spend vs workload
$progressBarClass = 'progress-bar-info';
$badgeClass = 'badge ';
if ($totalCalculatedProgress > $totalAverageDeclaredProgress) {
$progressBarClass = 'progress-bar-danger';
$badgeClass.= 'badge-danger';
} elseif ($totalCalculatedProgress * $warningRatio >= $totalAverageDeclaredProgress) { // warning if close at 1%
$progressBarClass = 'progress-bar-warning';
$badgeClass.= 'badge-warning';
} else {
$progressBarClass = 'progress-bar-success';
$badgeClass.= 'badge-success';
}
}
print '<td class="nowrap liste_total right">';
if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned, 2).' %';
if ($total_projectlinesa_planned) print $totalCalculatedProgress.' %';
print '</td>';
print '<td class="nowrap liste_total right">';
if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_declared_if_planned / $total_projectlinesa_planned, 2).' %';
if ($total_projectlinesa_planned) print '<span class="'.$badgeClass.'" >'.$totalAverageDeclaredProgress.' %</span>';
print '</td>';
// resume
print '<td class="right">';
if ($total_projectlinesa_planned) {
print '</span>';
print ' <div class="progress sm" title="'.$totalAverageDeclaredProgress.'%" >';
print ' <div class="progress-bar '.$progressBarClass.'" style="width: '.$totalAverageDeclaredProgress.'%"></div>';
print ' </div>';
print '</div>';
}
print '</td>';
if ($showbilltime)
{
print '<td class="nowrap liste_total right">';

View File

@ -124,7 +124,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$invoicefieldref='ref';
}
if ( strpos($type, 'localtax') === 0 ) {
if (strpos($type, 'localtax') === 0) {
$f_rate = $type . '_tx';
} else {
$f_rate = 'tva_tx';

View File

@ -55,7 +55,7 @@ function dolStripPhpCode($str, $replacewith = '')
//remove content before closing tag
if (count($partlings) > 1) $partlings[0] = ''; // Todo why a count > 1 and not >= 1 ?
//append to out string
$newstr .= '<span class="phptag">'.$replacewith.'<!-- '.$phppart.' --></span>'.implode('', $partlings);
$newstr .= '<span class="phptag" class="tooltip" title="'.dol_escape_htmltag(dolGetFirstLineOfText($phppart).'...').'">'.$replacewith.'<!-- '.$phppart.' --></span>'.implode('', $partlings);
}
}
}

View File

@ -53,8 +53,8 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout
if (empty($noout)) print_start_menu_array_auguria();
$usemenuhider = 1;
global $usemenuhider;
$usemenuhider = 1;
// Show/Hide vertical menu
if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
@ -265,8 +265,8 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t
$mainmenu=($forcemainmenu?$forcemainmenu:$_SESSION["mainmenu"]);
$leftmenu=($forceleftmenu?'':(empty($_SESSION["leftmenu"])?'none':$_SESSION["leftmenu"]));
$usemenuhider = 0;
global $usemenuhider;
$usemenuhider = 0;
// Show logo company
if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))

View File

@ -176,7 +176,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
$menu_arr[] = array(
'name' => 'TMenuMRP',
'link' => '/mrp/index.php?mainmenu=mrp&amp;leftmenu=',
'title' => $langs->trans("TMenuMRP"),
'title' => "TMenuMRP",
'level' => 0,
'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal),
'target' => $atarget,
@ -1580,8 +1580,17 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$langs->load("mrp");
$newmenu->add("", $langs->trans("MenuBOM"), 0, $user->rights->bom->read, '', $mainmenu, 'bom');
$newmenu->add("/bom/bom_card.php?leftmenu=bom&amp;action=create", $langs->trans("NewBOM"), 1, $user->rights->bom->write);
$newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->rights->bom->read);
$newmenu->add("/bom/bom_card.php?leftmenu=bom&amp;action=create", $langs->trans("NewBOM"), 1, $user->rights->bom->write, '', $mainmenu, 'bom');
$newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->rights->bom->read, '', $mainmenu, 'bom');
}
if (! empty($conf->mrp->enabled))
{
$langs->load("mrp");
$newmenu->add("", $langs->trans("MenuMRP"), 0, $user->rights->mrp->read, '', $mainmenu, 'mo');
$newmenu->add("/mrp/mo_card.php?leftmenu=mo&amp;action=create", $langs->trans("NewMO"), 1, $user->rights->mrp->write, '', $mainmenu, 'mo');
$newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->rights->mrp->read, '', $mainmenu, 'mo');
}
}

View File

@ -61,7 +61,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
* @var string Family
* @see familyinfo
* @see $familyinfo
*
* Native values: 'crm', 'financial', 'hr', 'projects', 'products', 'ecm', 'technic', 'other'.
* Use familyinfo to declare a custom value.
@ -70,7 +70,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
* @var array Custom family informations
* @see family
* @see $family
*
* e.g.:
* array(
@ -259,26 +259,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
*/
public $core_enabled;
/**
* @var string Relative path to module style sheet
* @deprecated
* @see module_parts
*/
public $style_sheet = '';
/**
* @var 0|1|2|3 Where to display the module in setup page
* @deprecated @since 4.0.0
* @see family
* @see familyinfo
*
* 0: common
* 1: interface
* 2: others
* 3: very specific
*/
public $special;
/**
* @var string Name of image file used for this module
*
@ -297,20 +277,20 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
* @var string[] List of module class names that must be enabled if this module is enabled.
*
* e.g.: array('modAnotherModule', 'FR'=>'modYetAnotherModule')
* @var string[] List of module class names that must be enabled if this module is enabled. e.g.: array('modAnotherModule', 'FR'=>'modYetAnotherModule')
* @see $requiredby
*/
public $depends;
/**
* @var int[] List of module ids to disable if this one is disabled.
* @var string[] List of module class names to disable if the module is disabled.
* @see $depends
*/
public $requiredby;
/**
* @var string[] List of module class names as string this module is in conflict with.
* @see depends
* @see $depends
*/
public $conflictwith;
@ -915,7 +895,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/**
* Gives the last date of activation
*
* @return timestamp|string Date of last activation
* @return int|string Date of last activation or '' if module was never activated
*/
public function getLastActivationDate()
{

View File

@ -71,10 +71,10 @@ class modPhpbarcode extends ModeleBarCode
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -67,10 +67,10 @@ class modTcpdfbarcode extends ModeleBarCode
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -92,7 +92,7 @@ class mod_bom_advanced extends ModeleNumRefboms
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -61,7 +61,7 @@ class mod_bom_standard extends ModeleNumRefboms
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -72,10 +72,10 @@ class mod_bom_standard extends ModeleNumRefboms
/**
* Test si les numeros deje en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -85,7 +85,7 @@ abstract class ModeleNumRefBoms
}
/**
* Renvoie la description par defaut du modele de numerotation
* Returns the default description of the numbering template
*
* @return string Texte descripif
*/
@ -97,7 +97,7 @@ abstract class ModeleNumRefBoms
}
/**
* Renvoie un exemple de numerotation
* Returns an example of numbering
*
* @return string Example
*/
@ -109,9 +109,10 @@ abstract class ModeleNumRefBoms
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de conflits qui empecheraient cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{
@ -119,7 +120,7 @@ abstract class ModeleNumRefBoms
}
/**
* Renvoie prochaine valeur attribuee
* Returns next assigned value
*
* @param Societe $objsoc Object thirdparty
* @param Object $object Object we need next value for
@ -132,7 +133,7 @@ abstract class ModeleNumRefBoms
}
/**
* Renvoie version du module numerotation
* Returns version of numbering module
*
* @return string Valeur
*/

View File

@ -58,7 +58,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -69,10 +69,10 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
/**
* Test si les numeros deje en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -86,7 +86,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -76,10 +76,11 @@ abstract class ModeleNumRefChequeReceipts
}
/**
* Test if the existing numbers in the database do not cause conflicts that would prevent this numbering run.
*
* @return boolean false si conflit, true si ok
*/
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{
return true;

View File

@ -61,7 +61,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -72,10 +72,10 @@ class mod_commande_marbre extends ModeleNumRefCommandes
/**
* Test si les numeros deje en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -92,7 +92,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -110,9 +110,10 @@ abstract class ModeleNumRefCommandes
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de conflits qui empecheraient cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{
@ -120,7 +121,7 @@ abstract class ModeleNumRefCommandes
}
/**
* Renvoie prochaine valeur attribuee
* Returns next assigned value
*
* @param Societe $objsoc Object thirdparty
* @param Object $object Object we need next value for
@ -133,7 +134,7 @@ abstract class ModeleNumRefCommandes
}
/**
* Renvoie version du module numerotation
* Returns version of numbering module
*
* @return string Valeur
*/

View File

@ -96,7 +96,7 @@ abstract class ModeleNumRefDons
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -108,10 +108,10 @@ abstract class ModeleNumRefDons
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas d
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -78,10 +78,10 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
/**
* Test whether the numbers already in force in the base do not cause conflicts
* that would prevent this numbering from working.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -95,7 +95,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -74,7 +74,7 @@ class mod_facture_mars extends ModeleNumRefFactures
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -84,10 +84,10 @@ class mod_facture_mars extends ModeleNumRefFactures
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -84,7 +84,7 @@ class mod_facture_terre extends ModeleNumRefFactures
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -94,10 +94,10 @@ class mod_facture_terre extends ModeleNumRefFactures
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -98,7 +98,7 @@ abstract class ModeleNumRefFactures
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -110,10 +110,10 @@ abstract class ModeleNumRefFactures
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas
* de conflits qui empecheraient cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -97,7 +97,7 @@ class mod_arctic extends ModeleNumRefFicheinter
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -68,7 +68,7 @@ class mod_pacific extends ModeleNumRefFicheinter
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -78,10 +78,10 @@ class mod_pacific extends ModeleNumRefFicheinter
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -109,10 +109,10 @@ abstract class ModeleNumRefFicheinter
}
/**
* Tests if the numbers already in force in the database do not cause conflicts
* that would prevent this numbering from working.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -72,7 +72,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -82,10 +82,10 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -100,7 +100,7 @@ abstract class ModeleNumRefDeliveryOrder
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -112,10 +112,10 @@ abstract class ModeleNumRefDeliveryOrder
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas d
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -43,6 +43,9 @@ $target[0]=array('email'=>'email_0','name'=>'name_0','firstname'=>'firstname_0',
$target[n]=array('email'=>'email_n','name'=>'name_n','firstname'=>'firstname_n', 'other'=>'other_n');
// ----- Your code end here -----
and call the method
parent::addTargetsToDatabase($mailing_id, $target);
***** STEP 3 *****

View File

@ -65,7 +65,7 @@ class mailing_advthirdparties extends MailingTargets
// phpcs:enable
global $conf, $langs;
dol_syslog(get_class($this)."::add_to_target socid=".var_export($socid, true).' contactid='.var_export($contactid, true));
dol_syslog(get_class($this)."::add_to_target_spec socid=".var_export($socid, true).' contactid='.var_export($contactid, true));
$cibles = array();
@ -86,9 +86,8 @@ class mailing_advthirdparties extends MailingTargets
$num = $this->db->num_rows($result);
$i = 0;
dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found", LOG_DEBUG);
dol_syslog(get_class($this)."::add_to_target_spec mailing ".$num." targets found", LOG_DEBUG);
$old = '';
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
@ -142,9 +141,8 @@ class mailing_advthirdparties extends MailingTargets
$num = $this->db->num_rows($result);
$i = 0;
dol_syslog(get_class($this)."::add_to_target mailing ".$num." targets found");
dol_syslog(get_class($this)."::add_to_target_spec mailing ".$num." targets found");
$old = '';
while ($i < $num)
{
$obj = $this->db->fetch_object($result);
@ -177,8 +175,9 @@ class mailing_advthirdparties extends MailingTargets
}
dol_syslog(get_class($this)."::add_to_target mailing cibles=".var_export($cibles, true), LOG_DEBUG);
return parent::add_to_target($mailing_id, $cibles);
dol_syslog(get_class($this)."::add_to_target_spec mailing cibles=".var_export($cibles, true), LOG_DEBUG);
return parent::addTargetsToDatabase($mailing_id, $cibles);
}

View File

@ -447,6 +447,6 @@ class mailing_contacts1 extends MailingTargets
return -1;
}
return parent::add_to_target($mailing_id, $cibles);
return parent::addTargetsToDatabase($mailing_id, $cibles);
}
}

View File

@ -80,7 +80,7 @@ class mailing_example extends MailingTargets
// ----- Your code end here -----
return parent::add_to_target($mailing_id, $target);
return parent::addTargetsToDatabase($mailing_id, $target);
}

View File

@ -315,6 +315,6 @@ class mailing_fraise extends MailingTargets
return -1;
}
return parent::add_to_target($mailing_id, $cibles);
return parent::addTargetsToDatabase($mailing_id, $cibles);
}
}

View File

@ -151,17 +151,15 @@ class MailingTargets // This can't be abstract as it is used for some method
return $nb;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Ajoute destinataires dans table des cibles
* Add a list of targets int the database
*
* @param int $mailing_id Id of emailing
* @param array $cibles Array with targets
* @return int < 0 si erreur, nb ajout si ok
*/
public function add_to_target($mailing_id, $cibles)
public function addTargetsToDatabase($mailing_id, $cibles)
{
// phpcs:enable
global $conf;
$this->db->begin();

View File

@ -217,6 +217,6 @@ class mailing_pomme extends MailingTargets
return -1;
}
return parent::add_to_target($mailing_id, $cibles);
return parent::addTargetsToDatabase($mailing_id, $cibles);
}
}

View File

@ -190,7 +190,7 @@ class mailing_thirdparties extends MailingTargets
return -1;
}
return parent::add_to_target($mailing_id, $cibles);
return parent::addTargetsToDatabase($mailing_id, $cibles);
}

View File

@ -159,7 +159,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
// ----- Your code end here -----
return parent::add_to_target($mailing_id, $cibles);
return parent::addTargetsToDatabase($mailing_id, $cibles);
}

View File

@ -221,6 +221,6 @@ class mailing_xinputfile extends MailingTargets
ini_set('auto_detect_line_endings', false);
return parent::add_to_target($mailing_id, $cibles);
return parent::addTargetsToDatabase($mailing_id, $cibles);
}
}

View File

@ -143,7 +143,7 @@ class mailing_xinputuser extends MailingTargets
'source_type' => 'file'
);
return parent::add_to_target($mailing_id, $cibles);
return parent::addTargetsToDatabase($mailing_id, $cibles);
}
else
{

View File

@ -93,7 +93,7 @@ class modBlockedLog extends DolibarrModules
$this->always_enabled = (!empty($conf->blockedlog->enabled)
&& !empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY)
&& in_array($mysoc->country_code, explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY))
&& $this->alreadyUsed(1));
&& $this->alreadyUsed());
// Constants
//-----------

View File

@ -66,7 +66,7 @@ class modBom extends DolibarrModules
$this->descriptionlong = "Bill of Materials definitions. They can be used to make Manufacturing Resource Planning";
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
$this->version = 'experimental';
$this->version = 'dolibarr';
//Url to the file with your last numberversion of this module
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
@ -105,7 +105,7 @@ class modBom extends DolibarrModules
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array('modProduct'); // List of module class names as string that must be enabled if this module is enabled. Example: array('always1'=>'modModuleToEnable1','always2'=>'modModuleToEnable2', 'FR1'=>'modModuleToEnableFR'...)
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
$this->requiredby = array('modMrp'); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
$this->langfiles = array("mrp");
//$this->phpmin = array(5,4); // Minimum version of PHP required by module

View File

@ -95,7 +95,7 @@ class mod_payment_ant extends ModeleNumRefPayments
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -68,7 +68,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -79,10 +79,10 @@ class mod_payment_cicada extends ModeleNumRefPayments
/**
* Test si les numeros deje en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -63,10 +63,11 @@ abstract class ModeleNumRefPayments
}
/**
* Test if the existing numbers in the database do not cause conflicts that would prevent this numbering run.
*
* @return boolean false si conflit, true si ok
*/
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{
return true;

View File

@ -90,7 +90,7 @@ abstract class ModeleProductCode
}
/** Renvoi un exemple de numerotation
/** Return an example of numbering
*
* @param Translate $langs Object langs
* @return string Example
@ -101,10 +101,11 @@ abstract class ModeleProductCode
return $langs->trans("NoExample");
}
/** Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
/**
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -80,10 +80,11 @@ class mod_project_simple extends ModeleNumRefProjects
}
/** Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
/**
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -96,7 +96,7 @@ class mod_project_universal extends ModeleNumRefProjects
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -95,7 +95,7 @@ abstract class ModeleNumRefProjects
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -107,10 +107,10 @@ abstract class ModeleNumRefProjects
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -80,10 +80,11 @@ class mod_task_simple extends ModeleNumRefTask
}
/** Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
/**
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -96,7 +96,7 @@ class mod_task_universal extends ModeleNumRefTask
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -96,7 +96,7 @@ abstract class ModeleNumRefTask
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -108,10 +108,10 @@ abstract class ModeleNumRefTask
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -81,10 +81,10 @@ class mod_propale_marbre extends ModeleNumRefPropales
/**
* Test si les numeros deje en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -98,7 +98,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -99,7 +99,7 @@ abstract class ModeleNumRefPropales
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -111,10 +111,10 @@ abstract class ModeleNumRefPropales
}
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -105,10 +105,11 @@ abstract class ModeleThirdPartyCode
return $langs->trans("NoExample");
}
/** Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
/**
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{
@ -297,10 +298,11 @@ abstract class ModeleAccountancyCode
return $langs->trans("NoExample");
}
/** Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
/**
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -80,7 +80,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -91,10 +91,10 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
/**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -98,7 +98,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -95,7 +95,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
}
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/

View File

@ -68,7 +68,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments
/**
* Renvoi un exemple de numerotation
* Return an example of numbering
*
* @return string Example
*/
@ -79,10 +79,10 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments
/**
* Test si les numeros deje en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner.
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{

View File

@ -98,10 +98,11 @@ abstract class ModeleNumRefSupplierPayments
}
/**
* Test if the existing numbers in the database do not cause conflicts that would prevent this numbering run.
*
* @return boolean false si conflit, true si ok
*/
* Checks if the numbers already in force in the data base do not
* cause conflicts that would prevent this numbering from working.
*
* @return boolean false if conflict, true if ok
*/
public function canBeActivated()
{
return true;

Some files were not shown because too many files have changed in this diff Show More