Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-08-28 02:36:15 +02:00
commit 9c6ce4b29d
124 changed files with 979 additions and 1021 deletions

View File

@ -216,7 +216,7 @@ before_script:
- | - |
export CONF_FILE=htdocs/conf/conf.php export CONF_FILE=htdocs/conf/conf.php
echo "Setting up Dolibarr $CONF_FILE" echo "Setting up Dolibarr $CONF_FILE"
echo '<?php ' > $CONF_FILE echo '<?php' > $CONF_FILE
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE

View File

@ -15,14 +15,14 @@ else return 0;
function highlightTOC(str) { function highlightTOC(str) {
if (StopProcess()) return; if (StopProcess()) return;
try { try {
str = str || parent.BODY.document.location.href; str = str || parent.BODY.document.location.href;
uri = last(str); uri = last(str);
list = parent.TOC.document.getElementsByTagName("a"); list = parent.TOC.document.getElementsByTagName("a");
@ -33,7 +33,7 @@ function highlightTOC(str) {
list[i].style.backgroundColor = "#6697cc"; list[i].style.backgroundColor = "#6697cc";
list[i].style.padding = "2px"; list[i].style.padding = "2px";
list[i].style.color = "#ffffff"; list[i].style.color = "#ffffff";
} else { } else {
list[i].style.backgroundColor = "#ffffff"; list[i].style.backgroundColor = "#ffffff";
list[i].style.color = "#003380"; list[i].style.color = "#003380";

View File

@ -12,7 +12,7 @@
.atn { color: #606; } .atn { color: #606; }
.atv { color: #080; } .atv { color: #080; }
.dec { color: #606; } .dec { color: #606; }
pre.preformatted { pre.preformatted {
display: block; display: block;
font-family: "Courier New", verdana, arial, helvetica, sans-serif; font-family: "Courier New", verdana, arial, helvetica, sans-serif;

View File

@ -1116,7 +1116,7 @@ window['_pr_isIE6'] = function () {
for (var i = 0; i < 10; ++i) { for (var i = 0; i < 10; ++i) {
lineBreaks[i] = lineBreakHtml + '</li><li class="L' + i + '">'; lineBreaks[i] = lineBreakHtml + '</li><li class="L' + i + '">';
} }
var lineNum = numberLines[1] && numberLines[1].length var lineNum = numberLines[1] && numberLines[1].length
? numberLines[1] - 1 : 0; // Lines are 1-indexed ? numberLines[1] - 1 : 0; // Lines are 1-indexed
html.push('<ol class="linenums"><li class="L', (lineNum) % 10, '"'); html.push('<ol class="linenums"><li class="L', (lineNum) % 10, '"');
if (lineNum) { if (lineNum) {

View File

@ -1,5 +1,5 @@
body body
{ {
background: #FFFFFF background: #FFFFFF
} }
@ -100,7 +100,7 @@ li.listalpha3 {
width: auto; width: auto;
height: auto; height: auto;
white-space: normal; white-space: normal;
} }
/*li.listalpha2, li.listalpha, li.listalpha3 /*li.listalpha2, li.listalpha, li.listalpha3
{ {
@ -207,7 +207,7 @@ p.listcontinue3 {
height: auto; height: auto;
} }
.prcontinuous .prcontinuous
{font-family: "Courier New", verdana, arial, helvetica, sans-serif; {font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-style: normal; font-style: normal;
font-variant: normal; font-variant: normal;
@ -237,7 +237,7 @@ p.listcontinue3 {
height: auto; height: auto;
} }
.prefblue .prefblue
{display: inline; {display: inline;
font-family: "Courier New", verdana, arial, helvetica, sans-serif; font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-size: 10pt; font-size: 10pt;
@ -253,7 +253,7 @@ p.listcontinue3 {
padding-left: 0pt; padding-left: 0pt;
padding-right: 0pt; padding-right: 0pt;
} }
.prefred .prefred
{display: inline; {display: inline;
font-family: "Courier New", verdana, arial, helvetica, sans-serif; font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-size: 10pt; font-size: 10pt;
@ -269,7 +269,7 @@ p.listcontinue3 {
padding-left: 0pt; padding-left: 0pt;
padding-right: 0pt; padding-right: 0pt;
} }
.prefdarkblue .prefdarkblue
{display: inline; {display: inline;
font-family: "Courier New", verdana, arial, helvetica, sans-serif; font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-weight: bold; font-weight: bold;
@ -286,7 +286,7 @@ p.listcontinue3 {
padding-left: 0pt; padding-left: 0pt;
padding-right: 0pt; padding-right: 0pt;
} }
.prefgrey .prefgrey
{display: inline; {display: inline;
font-family: "Courier New", verdana, arial, helvetica, sans-serif; font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-size: 10pt; font-size: 10pt;
@ -303,7 +303,7 @@ p.listcontinue3 {
padding-right: 0pt; padding-right: 0pt;
} }
.expandingblock .expandingblock
{font-family: "Tahoma", verdana, arial, helvetica, sans-serif; {font-family: "Tahoma", verdana, arial, helvetica, sans-serif;
border-color: #AFAFAF; border-color: #AFAFAF;
border-top-style: dotted; border-top-style: dotted;
@ -363,7 +363,7 @@ p.listcontinue3 {
.pagenavigation a, .pagenavigation a:link, .pagenavigation a:visited { .pagenavigation a, .pagenavigation a:link, .pagenavigation a:visited {
color: #000000; color: #000000;
text-decoration: none; text-decoration: none;
} }
.pagenavigation a:hover { .pagenavigation a:hover {
text-decoration: none; text-decoration: none;
@ -387,7 +387,7 @@ p.listcontinue3 {
} }
.nav a, .nav a:link, .nav a:visited { .nav a, .nav a:link, .nav a:visited {
color: #000000; color: #000000;
text-decoration: none; text-decoration: none;
} }
.nav a:hover { .nav a:hover {
text-decoration: none; text-decoration: none;
@ -400,9 +400,9 @@ td.navTabActive {
vertical-align: middle; vertical-align: middle;
font-family: tahoma, verdana, arial, helvetica, sans-serif; font-family: tahoma, verdana, arial, helvetica, sans-serif;
font-size: 8pt; font-size: 8pt;
padding-top: 4px; padding-top: 4px;
padding-bottom: 0px; padding-bottom: 0px;
padding-left: 8px; padding-left: 8px;
padding-right: 8px; padding-right: 8px;
font-weight: bold; font-weight: bold;
background-image: url('nav_bg_active.gif'); background-image: url('nav_bg_active.gif');
@ -567,7 +567,7 @@ a:visited,
border-right-color: #FFFFFF; border-right-color: #FFFFFF;
border-bottom-style: solid; border-bottom-style: solid;
border-bottom-width: 2px; border-bottom-width: 2px;
border-bottom-color: #ffffff; border-bottom-color: #ffffff;
} }
.bodytext { .bodytext {
font-family: verdana, tahoma, arial, helvetica, sans-serif; font-family: verdana, tahoma, arial, helvetica, sans-serif;
@ -582,7 +582,7 @@ a:visited,
font-weight: bold; font-weight: bold;
font-size: 8pt; font-size: 8pt;
line-height: 12px; line-height: 12px;
color: #2f739b; color: #2f739b;
line-height: 11px; line-height: 11px;
margin: 0px; margin: 0px;
padding: 3px; padding: 3px;
@ -1303,7 +1303,7 @@ li.listnumber2 {
font-style: normal; font-style: normal;
font-variant: normal; font-variant: normal;
font-size: 12pt; font-size: 12pt;
color: #5c5b64; color: #5c5b64;
background-color: inherit; background-color: inherit;
word-spacing: normal; word-spacing: normal;
letter-spacing: normal; letter-spacing: normal;
@ -1512,7 +1512,7 @@ li.listnumber2 {
span.toc { span.toc {
line-height: 19px; line-height: 19px;
} }
.searchDetails { .searchDetails {
font-family: tahoma, verdana, arial, helvetica, sans-serif; font-family: tahoma, verdana, arial, helvetica, sans-serif;
font-size: 11px; font-size: 11px;
@ -1561,11 +1561,11 @@ form {
font-weight: bold; font-weight: bold;
} }
.searchFoundWord { .searchFoundWord {
background-color: #fffdce; background-color: #fffdce;
} }
.searchToTop { .searchToTop {
text-align: left; text-align: left;
border-top: 1px solid #cfcfcf; border-top: 1px solid #cfcfcf;
padding: 7px 0px 15px 0px; padding: 7px 0px 15px 0px;
margin: 0px; margin: 0px;
} }

View File

@ -21,7 +21,7 @@
/** /**
* \file dev/initdata/import-product.php * \file dev/initdata/import-product.php
* \brief Script example to insert products from a csv file. * \brief Script example to insert products from a csv file.
* To purge data, you can have a look at purge-data.php * To purge data, you can have a look at purge-data.php
*/ */
@ -118,22 +118,22 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{ {
$i++; $i++;
$errorrecord=0; $errorrecord=0;
if ($startlinenb && $i < $startlinenb) continue; if ($startlinenb && $i < $startlinenb) continue;
if ($endlinenb && $i > $endlinenb) continue; if ($endlinenb && $i > $endlinenb) continue;
$nboflines++; $nboflines++;
$produit = new Product($db); $produit = new Product($db);
$produit->type = 0; $produit->type = 0;
$produit->status = 1; $produit->status = 1;
$produit->ref = trim($fields[0]); $produit->ref = trim($fields[0]);
print "Process line nb ".$i.", ref ".$produit->ref; print "Process line nb ".$i.", ref ".$produit->ref;
$produit->label = trim($fields[2]); $produit->label = trim($fields[2]);
$produit->description = trim($fields[4]."\n".($fields[5] ? $fields[5].' x '.$fields[6].' x '.$fields[7] : '')); $produit->description = trim($fields[4]."\n".($fields[5] ? $fields[5].' x '.$fields[6].' x '.$fields[7] : ''));
$produit->volume = price2num($fields[8]); $produit->volume = price2num($fields[8]);
$produit->volume_unit = 0; $produit->volume_unit = 0;
$produit->weight = price2num($fields[9]); $produit->weight = price2num($fields[9]);
$produit->weight_units = 0; // -3 = g $produit->weight_units = 0; // -3 = g
@ -142,9 +142,9 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$produit->status = 1; $produit->status = 1;
$produit->status_buy = 1; $produit->status_buy = 1;
$produit->finished = 1; $produit->finished = 1;
$produit->price_min = null; $produit->price_min = null;
$produit->price_min_ttc = null; $produit->price_min_ttc = null;
$produit->price = price2num($fields[11]); $produit->price = price2num($fields[11]);
@ -152,25 +152,25 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$produit->price_base_type = 'TTC'; $produit->price_base_type = 'TTC';
$produit->tva_tx = price2num($fields[13]); $produit->tva_tx = price2num($fields[13]);
$produit->tva_npr = 0; $produit->tva_npr = 0;
$produit->cost_price = price2num($fields[16]); $produit->cost_price = price2num($fields[16]);
// Extrafields // Extrafields
$produit->array_options['options_ecotaxdeee']=price2num($fields[17]); $produit->array_options['options_ecotaxdeee']=price2num($fields[17]);
$ret=$produit->create($user); $ret=$produit->create($user);
if ($ret < 0) if ($ret < 0)
{ {
print " - Error in create result code = ".$ret." - ".$produit->errorsToString(); print " - Error in create result code = ".$ret." - ".$produit->errorsToString();
$errorrecord++; $errorrecord++;
} }
else else
{ {
print " - Creation OK with ref ".$produit->ref." - id = ".$ret; print " - Creation OK with ref ".$produit->ref." - id = ".$ret;
} }
dol_syslog("Add prices"); dol_syslog("Add prices");
// If we use price level, insert price for each level // If we use price level, insert price for each level
if (! $errorrecord && 1) if (! $errorrecord && 1)
{ {
@ -181,14 +181,14 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString(); print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString();
$errorrecord++; $errorrecord++;
} }
else else
{ {
print " - updatePrice OK"; print " - updatePrice OK";
} }
} }
dol_syslog("Add multilangs"); dol_syslog("Add multilangs");
// Add alternative languages // Add alternative languages
if (! $errorrecord && 1) if (! $errorrecord && 1)
{ {
@ -201,15 +201,15 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString(); print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString();
$errorrecord++; $errorrecord++;
} }
else else
{ {
print " - setMultiLangs OK"; print " - setMultiLangs OK";
} }
} }
print "\n"; print "\n";
if ($errorrecord) if ($errorrecord)
{ {
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$produit->errorsToString()."\n"); fwrite($fhandleerr, 'Error on record nb '.$i." - ".$produit->errorsToString()."\n");
$error++; // $errorrecord will be reset $error++; // $errorrecord will be reset

View File

@ -21,7 +21,7 @@
/** /**
* \file dev/initdata/import-thirdparties.php * \file dev/initdata/import-thirdparties.php
* \brief Script example to insert thirdparties from a csv file. * \brief Script example to insert thirdparties from a csv file.
* To purge data, you can have a look at purge-data.php * To purge data, you can have a look at purge-data.php
*/ */
@ -118,15 +118,15 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{ {
$i++; $i++;
$errorrecord=0; $errorrecord=0;
if ($startlinenb && $i < $startlinenb) continue; if ($startlinenb && $i < $startlinenb) continue;
if ($endlinenb && $i > $endlinenb) continue; if ($endlinenb && $i > $endlinenb) continue;
$nboflines++; $nboflines++;
$object = new User($db); $object = new User($db);
$object->statut = 1; $object->statut = 1;
$tmp=explode(' ',$fields[3],2); $tmp=explode(' ',$fields[3],2);
$object->firstname = trim($tmp[0]); $object->firstname = trim($tmp[0]);
$object->lastname = trim($tmp[1]); $object->lastname = trim($tmp[1]);
@ -134,23 +134,23 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
else $object->login=strtolower($object->firstname); else $object->login=strtolower($object->firstname);
$object->login=preg_replace('/ /','',$object->login); $object->login=preg_replace('/ /','',$object->login);
$object->password = 'init'; $object->password = 'init';
print "Process line nb ".$i.", login ".$object->login; print "Process line nb ".$i.", login ".$object->login;
$ret=$object->create($user); $ret=$object->create($user);
if ($ret < 0) if ($ret < 0)
{ {
print " - Error in create result code = ".$ret." - ".$object->errorsToString(); print " - Error in create result code = ".$ret." - ".$object->errorsToString();
$errorrecord++; $errorrecord++;
} }
else else
{ {
print " - Creation OK with login ".$object->login." - id = ".$ret; print " - Creation OK with login ".$object->login." - id = ".$ret;
} }
print "\n"; print "\n";
if ($errorrecord) if ($errorrecord)
{ {
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n"); fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n");
$error++; // $errorrecord will be reset $error++; // $errorrecord will be reset

View File

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/ * or see http://www.gnu.org/
* *
* Get a distant dump file and load it into a mysql database * Get a distant dump file and load it into a mysql database
*/ */
@ -74,7 +74,7 @@ $tables=array(
$year=2010; $year=2010;
$currentyear=$tmp['year']; $currentyear=$tmp['year'];
while ($year <= $currentyear) while ($year <= $currentyear)
{ {
//$year=2021; //$year=2021;
$delta=($currentyear - $year); $delta=($currentyear - $year);
@ -84,7 +84,7 @@ while ($year <= $currentyear)
{ {
foreach($tables as $tablekey => $tableval) foreach($tables as $tablekey => $tableval)
{ {
print "\nCorrect ".$tablekey." for year ".$year." and move them to current year ".$currentyear." "; print "\nCorrect ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)"; $sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
//$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()"; //$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()";
$resql = $db->query($sql); $resql = $db->query($sql);
@ -110,14 +110,14 @@ while ($year <= $currentyear)
//print $sql2."\n"; //print $sql2."\n";
$resql2 = $db->query($sql2); $resql2 = $db->query($sql2);
if (! $resql2) dol_print_error($db); if (! $resql2) dol_print_error($db);
} }
$i++; $i++;
} }
} }
else dol_print_error($db); else dol_print_error($db);
} }
} }
$year++; $year++;
} }

View File

@ -158,6 +158,22 @@
<!-- Disabled as this does not support tab --> <!-- Disabled as this does not support tab -->
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> --> <!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="true"/>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
<severity>0</severity>
</rule>
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" /> <rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
<!-- Rules from PEAR Standard --> <!-- Rules from PEAR Standard -->

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> * Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -18,7 +18,7 @@
*/ */
/** /**
* \file htdocs/accountancy/admin/importaccounts.php * \file htdocs/accountancy/admin/importaccounts.php
* \ingroup Advanced accountancy * \ingroup Advanced accountancy
* \brief Page import accounting account * \brief Page import accounting account
*/ */
@ -83,7 +83,7 @@ if ($_POST["action"] == 'import') {
$accounting->pcg_type = $monType; $accounting->pcg_type = $monType;
$accounting->pcg_subtype = $monSubType; $accounting->pcg_subtype = $monSubType;
$accounting->active = 1; $accounting->active = 1;
$result = $accounting->create($user); $result = $accounting->create($user);
if ($result > 0) { if ($result > 0) {
setEventMessages($langs->trans("AccountingAccountAdd"), null, 'mesgs'); setEventMessages($langs->trans("AccountingAccountAdd"), null, 'mesgs');
@ -101,7 +101,7 @@ if ($_POST["action"] == 'import') {
print '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>'; print '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>';
} }
// list accounting account from product // list accounting account from product
$sql = "(SELECT p.rowid as product_id, p.accountancy_code_sell as accounting "; $sql = "(SELECT p.rowid as product_id, p.accountancy_code_sell as accounting ";
$sql .= " FROM " . MAIN_DB_PREFIX . "product as p "; $sql .= " FROM " . MAIN_DB_PREFIX . "product as p ";
@ -172,9 +172,9 @@ if ($result) {
print '</tr>'; print '</tr>';
$i ++; $i ++;
} }
print '<tr><td colspan="8">&nbsp;</td></tr><tr><td colspan="8" align="center"><input type="submit" class="butAction" value="' . $langs->trans("Import") . '"></td></tr>'; print '<tr><td colspan="8">&nbsp;</td></tr><tr><td colspan="8" align="center"><input type="submit" class="butAction" value="' . $langs->trans("Import") . '"></td></tr>';
print '</table>'; print '</table>';
print '</form>'; print '</form>';
} else { } else {

View File

@ -82,7 +82,7 @@ $socid = GETPOST("socid", 'int');
$object = new Societe($db); $object = new Societe($db);
$object->id = $socid; $object->id = $socid;
$result = $object->fetch($socid); $result = $object->fetch($socid);
if ($result < 0) if ($result < 0)
{ {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }

View File

@ -86,7 +86,7 @@ $socid = GETPOST("socid", 'int');
$object = new Societe($db); $object = new Societe($db);
$object->id = $socid; $object->id = $socid;
$result = $object->fetch($socid); $result = $object->fetch($socid);
if ($result<0) if ($result<0)
{ {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }

View File

@ -420,7 +420,7 @@ if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE) {
print '</a>'; print '</a>';
print '</td>'; print '</td>';
} }
else else
{ {
print '<td align="center">' . "\n"; print '<td align="center">' . "\n";
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"), print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setreportlastnumreleve">' . img_picto($langs->trans("Disabled"),

View File

@ -188,7 +188,7 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
{ {
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1','aZ09'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1','aZ09'),'chaine',0,'',$conf->entity);
} }
dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC1", GETPOST("clt1",'aZ09'),'chaine',0,'',$conf->entity); dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC1", GETPOST("clt1",'aZ09'),'chaine',0,'',$conf->entity);
} }
if($_POST["optionlocaltax2"]=="localtax2on") if($_POST["optionlocaltax2"]=="localtax2on")
{ {
@ -200,7 +200,7 @@ if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
{ {
dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2','aZ09'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2','aZ09'),'chaine',0,'',$conf->entity);
} }
dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC2", GETPOST("clt2",'aZ09'),'chaine',0,'',$conf->entity); dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC2", GETPOST("clt2",'aZ09'),'chaine',0,'',$conf->entity);
} }
if ($action != 'updateedit' && ! $error) if ($action != 'updateedit' && ! $error)

View File

@ -385,7 +385,7 @@ class PrestaShopWebservice
else else
throw new PrestaShopWebserviceException('Bad parameters given'); throw new PrestaShopWebserviceException('Bad parameters given');
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $xml)); $request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $xml));
self::checkStatusCode($request['status_code']);// check the response validity self::checkStatusCode($request['status_code']);// check the response validity
return self::parseXML($request['response']); return self::parseXML($request['response']);
} }

View File

@ -6,10 +6,10 @@ div.divsearchfield {
} }
.margeCoteGauche,.margeCote{ .margeCoteGauche,.margeCote{
padding-right: 20px!important; padding-right: 20px!important;
} }
.margeCote,.margeCoteDroite{ .margeCote,.margeCoteDroite{
padding-left: 20px!important; padding-left: 20px!important;
} }
.nomargesupinf{ .nomargesupinf{
margin-top: 0; margin-top: 0;
@ -26,13 +26,13 @@ div.divsearchfield {
width: 100%; width: 100%;
} }
.tree{ .tree{
margin: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;
padding:0px; padding:0px;
list-style: none; line-height: 2em; font-family: Arial; list-style: none; line-height: 2em; font-family: Arial;
} }
.tree li{ .tree li{
font-size: 16px; font-size: 16px;
position: relative;list-style: none; position: relative;list-style: none;
} }
.tree li:before{ .tree li:before{
position: absolute; position: absolute;
@ -65,7 +65,7 @@ div.divsearchfield {
.tree li.root:after{ .tree li.root:after{
display: none; display: none;
} }
.tree li:last-child:after{ .tree li:last-child:after{
display: none display: none
} }
.blockUI { .blockUI {
@ -159,7 +159,7 @@ textarea.row4{
.reviewList { .reviewList {
max-height: 150px; max-height: 150px;
overflow-y: scroll; overflow-y: scroll;
} }
.reviewRow{ .reviewRow{

View File

@ -94,7 +94,7 @@ print "</tr>\n";
foreach ($eventstolog as $key => $arr) foreach ($eventstolog as $key => $arr)
{ {
if ($arr['id']) if ($arr['id'])
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$arr['id'].'</td>'; print '<td>'.$arr['id'].'</td>';
print '<td>'; print '<td>';

View File

@ -79,10 +79,10 @@ if ($action == 'removebackgroundlogin' && ! empty($conf->global->MAIN_LOGIN_BACK
if ($action == 'update') if ($action == 'update')
{ {
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["MAIN_LANG_DEFAULT"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["MAIN_LANG_DEFAULT"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["MAIN_MULTILANGS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["MAIN_MULTILANGS"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity);
$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE'); $val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity); if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
@ -133,21 +133,21 @@ if ($action == 'update')
if (GETPOST('THEME_ELDY_USE_HOVER') == '') dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", '0', 'chaine', 0, '', $conf->entity); // If empty, we set to '0' ('000000' is for black) if (GETPOST('THEME_ELDY_USE_HOVER') == '') dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", '0', 'chaine', 0, '', $conf->entity); // If empty, we set to '0' ('000000' is for black)
else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $_POST["THEME_ELDY_USE_HOVER"], 'chaine', 0, '', $conf->entity); else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $_POST["THEME_ELDY_USE_HOVER"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"],'chaine',0,'',$conf->entity);
$varforimage='imagebackground'; $dirforimage=$conf->mycompany->dir_output.'/logos/'; $varforimage='imagebackground'; $dirforimage=$conf->mycompany->dir_output.'/logos/';
if ($_FILES[$varforimage]["tmp_name"]) if ($_FILES[$varforimage]["tmp_name"])

View File

@ -80,9 +80,9 @@ if ($action == 'setvalue' && $user->admin)
if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION', GETPOST("fieldendlastsubscription"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION', GETPOST("fieldendlastsubscription"),'chaine',0,'',$conf->entity)) $error++;
// Subscriptions // Subscriptions
if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE', GETPOST("fieldfirstsubscriptiondate"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE', GETPOST("fieldfirstsubscriptiondate"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT',GETPOST("fieldfirstsubscriptionamount"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT',GETPOST("fieldfirstsubscriptionamount"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE', GETPOST("fieldlastsubscriptiondate"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE', GETPOST("fieldlastsubscriptiondate"),'chaine',0,'',$conf->entity)) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT', GETPOST("fieldlastsubscriptionamount"),'chaine',0,'',$conf->entity)) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT', GETPOST("fieldlastsubscriptionamount"),'chaine',0,'',$conf->entity)) $error++;
// This one must be after the others // This one must be after the others

View File

@ -66,11 +66,11 @@ if ($action == 'update')
if (! $error) if (! $error)
{ {
dolibarr_set_const($db, "MAIN_MAX_DECIMALS_UNIT", $_POST["MAIN_MAX_DECIMALS_UNIT"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAX_DECIMALS_UNIT", $_POST["MAIN_MAX_DECIMALS_UNIT"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAX_DECIMALS_TOT", $_POST["MAIN_MAX_DECIMALS_TOT"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAX_DECIMALS_TOT", $_POST["MAIN_MAX_DECIMALS_TOT"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAX_DECIMALS_SHOWN", $_POST["MAIN_MAX_DECIMALS_SHOWN"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAX_DECIMALS_SHOWN", $_POST["MAIN_MAX_DECIMALS_SHOWN"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_ROUNDING_RULE_TOT", $_POST["MAIN_ROUNDING_RULE_TOT"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_ROUNDING_RULE_TOT", $_POST["MAIN_ROUNDING_RULE_TOT"],'chaine',0,'',$conf->entity);
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
exit; exit;

View File

@ -65,27 +65,27 @@ complete_substitutions_array($substitutionarrayfortest, $langs);
if ($action == 'update' && empty($_POST["cancel"])) if ($action == 'update' && empty($_POST["cancel"]))
{ {
dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", GETPOST("MAIN_DISABLE_ALL_MAILS"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", GETPOST("MAIN_DISABLE_ALL_MAILS"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_FORCE_SENDTO", GETPOST("MAIN_MAIL_FORCE_SENDTO"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_FORCE_SENDTO", GETPOST("MAIN_MAIL_FORCE_SENDTO"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_ENABLED_USER_DEST_SELECT", GETPOST("MAIN_MAIL_ENABLED_USER_DEST_SELECT"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_ENABLED_USER_DEST_SELECT", GETPOST("MAIN_MAIL_ENABLED_USER_DEST_SELECT"), 'chaine', 0, '', $conf->entity);
// Send mode parameters // Send mode parameters
dolibarr_set_const($db, "MAIN_MAIL_SENDMODE", GETPOST("MAIN_MAIL_SENDMODE"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SENDMODE", GETPOST("MAIN_MAIL_SENDMODE"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", GETPOST("MAIN_MAIL_SMTP_PORT"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", GETPOST("MAIN_MAIL_SMTP_PORT"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", GETPOST("MAIN_MAIL_SMTP_SERVER"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", GETPOST("MAIN_MAIL_SMTP_SERVER"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_ENABLED", GETPOST("MAIN_MAIL_EMAIL_DKIM_ENABLED"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_ENABLED", GETPOST("MAIN_MAIL_EMAIL_DKIM_ENABLED"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_DOMAIN", GETPOST("MAIN_MAIL_EMAIL_DKIM_DOMAIN"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_DOMAIN", GETPOST("MAIN_MAIL_EMAIL_DKIM_DOMAIN"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_SELECTOR", GETPOST("MAIN_MAIL_EMAIL_DKIM_SELECTOR"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_SELECTOR", GETPOST("MAIN_MAIL_EMAIL_DKIM_SELECTOR"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY", GETPOST("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY", GETPOST("MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY"), 'chaine', 0, '', $conf->entity);
// Content parameters // Content parameters
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", GETPOST("MAIN_MAIL_AUTOCOPY_TO"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", GETPOST("MAIN_MAIL_AUTOCOPY_TO"),'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'MAIN_MAIL_DEFAULT_FROMTYPE', GETPOST('MAIN_MAIL_DEFAULT_FROMTYPE'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, 'MAIN_MAIL_DEFAULT_FROMTYPE', GETPOST('MAIN_MAIL_DEFAULT_FROMTYPE'), 'chaine', 0, '', $conf->entity);
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
exit; exit;

View File

@ -61,12 +61,12 @@ complete_substitutions_array($substitutionarrayfortest, $langs);
if ($action == 'update' && empty($_POST["cancel"])) if ($action == 'update' && empty($_POST["cancel"]))
{ {
// Send mode parameters // Send mode parameters
dolibarr_set_const($db, "MAIN_MAIL_SENDMODE_EMAILING", GETPOST("MAIN_MAIL_SENDMODE_EMAILING"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SENDMODE_EMAILING", GETPOST("MAIN_MAIL_SENDMODE_EMAILING"),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT_EMAILING", GETPOST("MAIN_MAIL_SMTP_PORT_EMAILING"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT_EMAILING", GETPOST("MAIN_MAIL_SMTP_PORT_EMAILING"),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_EMAILING", GETPOST("MAIN_MAIL_SMTP_SERVER_EMAILING"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_EMAILING", GETPOST("MAIN_MAIL_SMTP_SERVER_EMAILING"),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_EMAILING", GETPOST("MAIN_MAIL_SMTPS_ID_EMAILING"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_EMAILING", GETPOST("MAIN_MAIL_SMTPS_ID_EMAILING"), 'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_EMAILING", GETPOST("MAIN_MAIL_SMTPS_PW_EMAILING"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_EMAILING", GETPOST("MAIN_MAIL_SMTPS_PW_EMAILING"), 'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS_EMAILING", GETPOST("MAIN_MAIL_EMAIL_TLS_EMAILING"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS_EMAILING", GETPOST("MAIN_MAIL_EMAIL_TLS_EMAILING"),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_EMAILING", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_EMAILING"),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_EMAILING", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_EMAILING"),'chaine',0,'',$conf->entity);
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");

View File

@ -64,10 +64,10 @@ if ($action == 'update' && ! $cancel)
{ {
$_SESSION["mainmenu"]="home"; // Le gestionnaire de menu a pu changer $_SESSION["mainmenu"]="home"; // Le gestionnaire de menu a pu changer
dolibarr_set_const($db, "MAIN_MENU_STANDARD", GETPOST('MAIN_MENU_STANDARD','alpha'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MENU_STANDARD", GETPOST('MAIN_MENU_STANDARD','alpha'),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MENU_SMARTPHONE", GETPOST('MAIN_MENU_SMARTPHONE','alpha'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MENU_SMARTPHONE", GETPOST('MAIN_MENU_SMARTPHONE','alpha'),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MENUFRONT_STANDARD", GETPOST('MAIN_MENUFRONT_STANDARD','alpha'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MENUFRONT_STANDARD", GETPOST('MAIN_MENUFRONT_STANDARD','alpha'),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MENUFRONT_SMARTPHONE", GETPOST('MAIN_MENUFRONT_SMARTPHONE','alpha'),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MENUFRONT_SMARTPHONE", GETPOST('MAIN_MENUFRONT_SMARTPHONE','alpha'),'chaine',0,'',$conf->entity);
// Define list of menu handlers to initialize // Define list of menu handlers to initialize

View File

@ -8,7 +8,7 @@
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
@ -672,7 +672,7 @@ if ($mode == 'common')
print '<td class="center nowrap" width="120px">'; print '<td class="center nowrap" width="120px">';
print $versiontrans; print $versiontrans;
if(!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)){ if(!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)){
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
if (!empty($objMod->url_last_version)) { if (!empty($objMod->url_last_version)) {
$newversion = getURLContent($objMod->url_last_version); $newversion = getURLContent($objMod->url_last_version);
if(isset($newversion['content'])){ if(isset($newversion['content'])){

View File

@ -54,29 +54,29 @@ if ($cancel) {
if ($action == 'update') if ($action == 'update')
{ {
dolibarr_set_const($db, "MAIN_PDF_FORMAT", $_POST["MAIN_PDF_FORMAT"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PDF_FORMAT", $_POST["MAIN_PDF_FORMAT"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PDF_MARGIN_LEFT", $_POST["MAIN_PDF_MARGIN_LEFT"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PDF_MARGIN_LEFT", $_POST["MAIN_PDF_MARGIN_LEFT"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PDF_MARGIN_RIGHT", $_POST["MAIN_PDF_MARGIN_RIGHT"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PDF_MARGIN_RIGHT", $_POST["MAIN_PDF_MARGIN_RIGHT"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PDF_MARGIN_TOP", $_POST["MAIN_PDF_MARGIN_TOP"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PDF_MARGIN_TOP", $_POST["MAIN_PDF_MARGIN_TOP"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PDF_MARGIN_BOTTOM", $_POST["MAIN_PDF_MARGIN_BOTTOM"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PDF_MARGIN_BOTTOM", $_POST["MAIN_PDF_MARGIN_BOTTOM"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", $_POST["MAIN_PROFID1_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", $_POST["MAIN_PROFID1_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", $_POST["MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", $_POST["MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", $_POST["MAIN_TVAINTRA_NOT_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", $_POST["MAIN_TVAINTRA_NOT_IN_ADDRESS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DESC"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DESC"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", $_POST["MAIN_PDF_USE_ISO_LOCATION"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", $_POST["MAIN_PDF_USE_ISO_LOCATION"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_SECOND_TAX", $_POST["MAIN_PDF_MAIN_HIDE_SECOND_TAX"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_SECOND_TAX", $_POST["MAIN_PDF_MAIN_HIDE_SECOND_TAX"],'chaine',0,'', $conf->entity);
dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", $_POST["MAIN_PDF_MAIN_HIDE_THIRD_TAX"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PDF_MAIN_HIDE_THIRD_TAX", $_POST["MAIN_PDF_MAIN_HIDE_THIRD_TAX"],'chaine',0,'', $conf->entity);
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
exit; exit;

View File

@ -243,14 +243,14 @@ if ($mode == 'config' && $user->admin)
print "</tr>\n"; print "</tr>\n";
$ret = $printer->listprinters(); $ret = $printer->listprinters();
$nbofprinters = count($printer->listprinters); $nbofprinters = count($printer->listprinters);
if ($ret > 0) { if ($ret > 0) {
setEventMessages($printer->error, $printer->errors, 'errors'); setEventMessages($printer->error, $printer->errors, 'errors');
} else { } else {
for ($line=0; $line < $nbofprinters; $line++) for ($line=0; $line < $nbofprinters; $line++)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid) if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid)
{ {
print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">'; print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">';
print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>'; print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>';
@ -285,7 +285,7 @@ if ($mode == 'config' && $user->admin)
} }
} }
if ($action!='editprinter') if ($action!='editprinter')
{ {
if ($nbofprinters > 0) if ($nbofprinters > 0)
{ {
@ -299,7 +299,7 @@ if ($mode == 'config' && $user->admin)
print '<th></th>'; print '<th></th>';
print "</tr>\n"; print "</tr>\n";
} }
print '<tr>'; print '<tr>';
print '<td><input size="50" type="text" name="printername"></td>'; print '<td><input size="50" type="text" name="printername"></td>';
$ret = $printer->selectTypePrinter(); $ret = $printer->selectTypePrinter();
@ -315,7 +315,7 @@ if ($mode == 'config' && $user->admin)
print '</table>'; print '</table>';
dol_fiche_end(); dol_fiche_end();
if ($action!='editprinter') { if ($action!='editprinter') {
print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'"></div>'; print '<div class="center"><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'"></div>';
} else { } else {
@ -324,9 +324,9 @@ if ($mode == 'config' && $user->admin)
print '</form>'; print '</form>';
print '<div><p></div>'; print '<div><p></div>';
dol_fiche_head(); dol_fiche_head();
print $langs->trans("ReceiptPrinterTypeDesc")."<br><br>\n"; print $langs->trans("ReceiptPrinterTypeDesc")."<br><br>\n";
print '<table class="noborder" width="100%">'."\n"; print '<table class="noborder" width="100%">'."\n";
print '<tr class="oddeven"><td>'.$langs->trans("CONNECTOR_DUMMY").':</td><td>'.$langs->trans("CONNECTOR_DUMMY_HELP").'</td></tr>'; print '<tr class="oddeven"><td>'.$langs->trans("CONNECTOR_DUMMY").':</td><td>'.$langs->trans("CONNECTOR_DUMMY_HELP").'</td></tr>';
@ -338,7 +338,7 @@ if ($mode == 'config' && $user->admin)
dol_fiche_end(); dol_fiche_end();
print '<div><p></div>'; print '<div><p></div>';
dol_fiche_head(); dol_fiche_head();
print $langs->trans("ReceiptPrinterProfileDesc")."<br><br>\n"; print $langs->trans("ReceiptPrinterProfileDesc")."<br><br>\n";
print '<table class="noborder" width="100%">'."\n"; print '<table class="noborder" width="100%">'."\n";
@ -378,7 +378,7 @@ if ($mode == 'template' && $user->admin)
setEventMessages($printer->error, $printer->errors, 'errors'); setEventMessages($printer->error, $printer->errors, 'errors');
} else { } else {
$max = count($printer->listprinterstemplates); $max = count($printer->listprinterstemplates);
for ($line=0; $line < $max; $line++) for ($line=0; $line < $max; $line++)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
if ($action=='edittemplate' && $printer->listprinterstemplates[$line]['rowid']==$templateid) { if ($action=='edittemplate' && $printer->listprinterstemplates[$line]['rowid']==$templateid) {
@ -423,7 +423,7 @@ if ($mode == 'template' && $user->admin)
print '<th>'.$langs->trans("Description").'</th>'; print '<th>'.$langs->trans("Description").'</th>';
print "</tr>\n"; print "</tr>\n";
$max = count($printer->tags); $max = count($printer->tags);
for ($tag=0; $tag < $max; $tag++) for ($tag=0; $tag < $max; $tag++)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>&lt;'.$printer->tags[$tag].'&gt;</td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>'; print '<td>&lt;'.$printer->tags[$tag].'&gt;</td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>';
@ -436,14 +436,14 @@ if ($mode == 'template' && $user->admin)
} }
// to remove after test // to remove after test
$object=new stdClass(); // $object=new stdClass();
$object->date_time = '2015-11-02 22:30:25'; // $object->date_time = '2015-11-02 22:30:25';
$object->id = 1234; // $object->id = 1234;
$object->customer_firstname = 'John'; // $object->customer_firstname = 'John';
$object->customer_lastname = 'Deuf'; // $object->customer_lastname = 'Deuf';
$object->vendor_firstname = 'Jim'; // $object->vendor_firstname = 'Jim';
$object->vendor_lastname = 'Big'; // $object->vendor_lastname = 'Big';
$object->barcode = '3700123862396'; // $object->barcode = '3700123862396';
//$printer->sendToPrinter($object, 1, 16); //$printer->sendToPrinter($object, 1, 16);
//setEventMessages($printer->error, $printer->errors, 'errors'); //setEventMessages($printer->error, $printer->errors, 'errors');

View File

@ -48,12 +48,12 @@ $action=GETPOST('action','aZ09');
if ($action == 'update' && empty($_POST["cancel"])) if ($action == 'update' && empty($_POST["cancel"]))
{ {
dolibarr_set_const($db, "MAIN_DISABLE_ALL_SMS", $_POST["MAIN_DISABLE_ALL_SMS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DISABLE_ALL_SMS", $_POST["MAIN_DISABLE_ALL_SMS"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SMS_SENDMODE", $_POST["MAIN_SMS_SENDMODE"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SMS_SENDMODE", $_POST["MAIN_SMS_SENDMODE"], 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMS_FROM", $_POST["MAIN_MAIL_SMS_FROM"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMS_FROM", $_POST["MAIN_MAIL_SMS_FROM"], 'chaine', 0, '', $conf->entity);
//dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", $_POST["MAIN_MAIL_AUTOCOPY_TO"],'chaine',0,'',$conf->entity); //dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", $_POST["MAIN_MAIL_AUTOCOPY_TO"], 'chaine', 0, '', $conf->entity);
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
exit; exit;
@ -169,21 +169,21 @@ if ($action == 'edit')
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
// Disable // Disable
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>';
print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1);
print '</td></tr>'; print '</td></tr>';
// Separator // Separator
print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>'; print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>';
// Method // Method
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>';
if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1);
else print '<font class="error">'.$langs->trans("None").'</font>'; else print '<font class="error">'.$langs->trans("None").'</font>';
print '</td></tr>'; print '</td></tr>';
// From // From
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>';
print '<td><input class="flat" name="MAIN_MAIL_SMS_FROM" size="32" value="' . $conf->global->MAIN_MAIL_SMS_FROM; print '<td><input class="flat" name="MAIN_MAIL_SMS_FROM" size="32" value="' . $conf->global->MAIN_MAIL_SMS_FROM;
print '"></td></tr>'; print '"></td></tr>';
@ -213,20 +213,20 @@ else
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
// Disable // Disable
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>'.yn($conf->global->MAIN_DISABLE_ALL_SMS).'</td></tr>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_SMS").'</td><td>'.yn($conf->global->MAIN_DISABLE_ALL_SMS).'</td></tr>';
// Separator // Separator
print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>'; print '<tr class="oddeven"><td colspan="2">&nbsp;</td></tr>';
// Method // Method
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_SMS_SENDMODE").'</td><td>';
$text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE]; $text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE];
if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning(); if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning();
print $text; print $text;
print '</td></tr>'; print '</td></tr>';
// From // From
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'</td>';
print '<td>'.$conf->global->MAIN_MAIL_SMS_FROM; print '<td>'.$conf->global->MAIN_MAIL_SMS_FROM;
if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && ! isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone")); if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && ! isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone"));

View File

@ -373,7 +373,7 @@ if($conf->invoice->enabled)
print "</tr>\n"; print "</tr>\n";
} }
if($conf->order->enabled) if($conf->order->enabled)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("StockMustBeEnoughForOrder").'</td>'; print '<td>'.$langs->trans("StockMustBeEnoughForOrder").'</td>';
@ -388,7 +388,7 @@ if($conf->order->enabled)
print "</tr>\n"; print "</tr>\n";
} }
if($conf->expedition->enabled) if($conf->expedition->enabled)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("StockMustBeEnoughForShipment").'</td>'; print '<td>'.$langs->trans("StockMustBeEnoughForShipment").'</td>';

View File

@ -79,17 +79,17 @@ foreach($modulesdir as $dir)
{ {
try { try {
$objMod = new $modName($db); $objMod = new $modName($db);
$modules[$objMod->numero]=$objMod; $modules[$objMod->numero]=$objMod;
$modules_names[$objMod->numero]=$objMod->name; $modules_names[$objMod->numero]=$objMod->name;
$modules_files[$objMod->numero]=$file; $modules_files[$objMod->numero]=$file;
$modules_fullpath[$file]=$dir.$file; $modules_fullpath[$file]=$dir.$file;
$picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic'; $picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic';
} }
catch(Exception $e) catch(Exception $e)
{ {
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
} }
} }
else else
{ {

View File

@ -54,11 +54,11 @@ if ($action == 'updateMask') {
$error++; $error++;
} }
if (!$error) if (!$error)
{ {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} }
else else
{ {
setEventMessages($langs->trans("Error"), null, 'errors'); setEventMessages($langs->trans("Error"), null, 'errors');
} }

View File

@ -31,9 +31,9 @@ include '../master.inc.php';
$phone = GETPOST('phone'); $phone = GETPOST('phone');
$notfound = $langs->trans("Unknown"); $notfound = $langs->trans("Unknown");
// Security check // Security check
if (empty($conf->clicktodial->enabled)) if (empty($conf->clicktodial->enabled))
{ {
print "Error: Module Click to dial is not enabled.\n"; print "Error: Module Click to dial is not enabled.\n";
exit; exit;

View File

@ -131,7 +131,7 @@ else if (GETPOST('downloadcsv','alpha'))
{ {
// Make the first fetch to get first line // Make the first fetch to get first line
$obj = $db->fetch_object($res); $obj = $db->fetch_object($res);
if ($obj) if ($obj)
{ {
$previoushash = $block_static->getPreviousHash(0, $obj->rowid); $previoushash = $block_static->getPreviousHash(0, $obj->rowid);
$firstid = $obj->rowid; $firstid = $obj->rowid;

View File

@ -52,7 +52,7 @@ p {
} }
.logopos { .logopos {
padding-top: 20px; padding-top: 20px;
max-height: 40px; max-height: 40px;
} }
/* ------------------- Header ------------------- */ /* ------------------- Header ------------------- */

View File

@ -5,7 +5,7 @@
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
@ -1236,7 +1236,7 @@ class ActionComm extends CommonObject
if ((!$user->rights->agenda->allactions->read && $this->author->id != $user->id) || (!$user->rights->agenda->myactions->read && $this->author->id == $user->id)) if ((!$user->rights->agenda->allactions->read && $this->author->id != $user->id) || (!$user->rights->agenda->myactions->read && $this->author->id == $user->id))
$option = 'nolink'; $option = 'nolink';
$label = $this->label; $label = $this->label;
if (empty($label)) $label=$this->libelle; // For backward compatibility if (empty($label)) $label=$this->libelle; // For backward compatibility
@ -1692,4 +1692,3 @@ class ActionComm extends CommonObject
} }
} }

View File

@ -84,11 +84,11 @@ if (empty($template_id)) {
$result = $advTarget->fetch($template_id); $result = $advTarget->fetch($template_id);
} }
if ($result < 0) if ($result < 0)
{ {
setEventMessages($advTarget->error, $advTarget->errors, 'errors'); setEventMessages($advTarget->error, $advTarget->errors, 'errors');
} }
else else
{ {
if (! empty($advTarget->id)) { if (! empty($advTarget->id)) {
$array_query = json_decode($advTarget->filtervalue, true); $array_query = json_decode($advTarget->filtervalue, true);
@ -225,7 +225,7 @@ if ($action == 'add') {
} else { } else {
$advTarget->contact_lines = array (); $advTarget->contact_lines = array ();
} }
if ((count($advTarget->thirdparty_lines) > 0) || (count($advTarget->contact_lines) > 0)) { if ((count($advTarget->thirdparty_lines) > 0) || (count($advTarget->contact_lines) > 0)) {
// Add targets into database // Add targets into database
$obj = new mailing_advthirdparties($db); $obj = new mailing_advthirdparties($db);
@ -359,7 +359,7 @@ if ($action == 'savefilter' || $action == 'createfilter') {
setEventMessages($advTarget->error, $advTarget->errors, 'errors'); setEventMessages($advTarget->error, $advTarget->errors, 'errors');
} }
} elseif ($action == 'savefilter') { } elseif ($action == 'savefilter') {
$result = $advTarget->update($user); $result = $advTarget->update($user);
if ($result < 0) { if ($result < 0) {
setEventMessages($advTarget->error, $advTarget->errors, 'errors'); setEventMessages($advTarget->error, $advTarget->errors, 'errors');
@ -465,9 +465,9 @@ if ($object->fetch($id) >= 0) {
// Show email selectors // Show email selectors
if ($object->statut == 0 && $user->rights->mailing->creer) { if ($object->statut == 0 && $user->rights->mailing->creer) {
include DOL_DOCUMENT_ROOT . '/core/tpl/advtarget.tpl.php'; include DOL_DOCUMENT_ROOT . '/core/tpl/advtarget.tpl.php';
} }
} }

View File

@ -326,8 +326,6 @@ if ($object->fetch($id) >= 0)
} }
// Si le module mailing est qualifie // Si le module mailing est qualifie
if ($qualified)
{
if ($allowaddtarget) if ($allowaddtarget)
{ {
print '<form class="oddeven tagtr" name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">'; print '<form class="oddeven tagtr" name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';

View File

@ -16,9 +16,9 @@
*/ */
/** /**
* \file comm/mailing/class/html.formadvtragetemaling.class.php * \file comm/mailing/class/html.formadvtargetemailing.class.php
* \ingroup mailing * \ingroup mailing
* \brief Fichier de la classe des fonctions predefinie de composants html advtargetemaling * \brief Fichier de la classe des fonctions predefinies de composant html advtargetemailing
*/ */
/** /**

View File

@ -57,7 +57,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
<?php if(!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) <?php if(!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES)
{ {
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id; $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id;
print '<a class="objectlinked_importbtn" href="'.$url.'&amp;action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a>'; print '<a class="objectlinked_importbtn" href="'.$url.'&amp;action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a>';
} }
?> ?>
</td> </td>

View File

@ -700,8 +700,8 @@ if (empty($reshook))
if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) {
$idprod = $res->fk_product_child; $idprod = $res->fk_product_child;
} }
else else
{ {
setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors');
$error ++; $error ++;

View File

@ -31,10 +31,10 @@ class BankCateg // extends CommonObject
//public $element='bank_categ'; //!< Id that identify managed objects //public $element='bank_categ'; //!< Id that identify managed objects
//public $table_element='bank_categ'; //!< Name of table without prefix where object is stored //public $table_element='bank_categ'; //!< Name of table without prefix where object is stored
public $picto='generic'; public $picto='generic';
public $id; public $id;
public $label; public $label;
/** /**
* Constructor * Constructor
@ -205,7 +205,7 @@ class BankCateg // extends CommonObject
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account";
$sql.= " WHERE fk_categorie = ".$this->id; $sql.= " WHERE fk_categorie = ".$this->id;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) if (!$resql)
{ {
@ -213,13 +213,13 @@ class BankCateg // extends CommonObject
$this->errors[] = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror();
} }
} }
// Delete link between tag and bank lines // Delete link between tag and bank lines
if (! $error) if (! $error)
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
$sql.= " WHERE fk_categ = ".$this->id; $sql.= " WHERE fk_categ = ".$this->id;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) if (!$resql)
{ {
@ -227,21 +227,21 @@ class BankCateg // extends CommonObject
$this->errors[] = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror();
} }
} }
// Delete bank categ // Delete bank categ
if (! $error) if (! $error)
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql .= " WHERE rowid=".$this->id; $sql .= " WHERE rowid=".$this->id;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (!$resql) if (!$resql)
{ {
$error++; $error++;
$this->errors[] = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror();
} }
} }
// Commit or rollback // Commit or rollback
if ($error) { if ($error) {
foreach ($this->errors as $errmsg) { foreach ($this->errors as $errmsg) {

View File

@ -44,37 +44,37 @@ $eventfound = array();
//dol_syslog('time='.$time.' $_SESSION[auto_ck_events_not_before]='.$_SESSION['auto_check_events_not_before']); //dol_syslog('time='.$time.' $_SESSION[auto_ck_events_not_before]='.$_SESSION['auto_check_events_not_before']);
// TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when several tabs are opened. // TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when several tabs are opened.
if ($time >= $_SESSION['auto_check_events_not_before']) if ($time >= $_SESSION['auto_check_events_not_before'])
{ {
$time_update = (int) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY; // Always defined $time_update = (int) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY; // Always defined
if (! empty($_SESSION['auto_check_events_not_before'])) if (! empty($_SESSION['auto_check_events_not_before']))
{ {
// We start scan from the not before so if two tabs were opend at differents seconds and we close one (so the js timer), // We start scan from the not before so if two tabs were opend at differents seconds and we close one (so the js timer),
// then we are not losing periods // then we are not losing periods
$starttime = $_SESSION['auto_check_events_not_before']; $starttime = $_SESSION['auto_check_events_not_before'];
// Protection to avoid too long sessions // Protection to avoid too long sessions
if ($starttime < ($time - (int) $conf->global->MAIN_SESSION_TIMEOUT)) if ($starttime < ($time - (int) $conf->global->MAIN_SESSION_TIMEOUT))
{ {
dol_syslog("We ask to check browser notification on a too large period. We fix this with current date."); dol_syslog("We ask to check browser notification on a too large period. We fix this with current date.");
$starttime = $time; $starttime = $time;
} }
} }
else else
{ {
$starttime = $time; $starttime = $time;
} }
$_SESSION['auto_check_events_not_before'] = $time + $time_update; $_SESSION['auto_check_events_not_before'] = $time + $time_update;
// Force save of session change we did. // Force save of session change we did.
// WARNING: Any change in sessions after that will not be saved ! // WARNING: Any change in sessions after that will not be saved !
session_write_close(); session_write_close();
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
dol_syslog('NEW $_SESSION[auto_check_events_not_before]='.$_SESSION['auto_check_events_not_before']); dol_syslog('NEW $_SESSION[auto_check_events_not_before]='.$_SESSION['auto_check_events_not_before']);
$sql = 'SELECT id'; $sql = 'SELECT id';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'actioncomm a, ' . MAIN_DB_PREFIX . 'actioncomm_resources ar'; $sql .= ' FROM ' . MAIN_DB_PREFIX . 'actioncomm a, ' . MAIN_DB_PREFIX . 'actioncomm_resources ar';
$sql .= ' WHERE a.id = ar.fk_actioncomm'; $sql .= ' WHERE a.id = ar.fk_actioncomm';
@ -91,11 +91,11 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
$actionmod = new ActionComm($db); $actionmod = new ActionComm($db);
while ($obj = $db->fetch_object($resql)) while ($obj = $db->fetch_object($resql))
{ {
$langs->load("agenda"); $langs->load("agenda");
$langs->load("commercial"); $langs->load("commercial");
$actionmod->fetch($obj->id); $actionmod->fetch($obj->id);
// Message must be formated and translated to be used with javascript directly // Message must be formated and translated to be used with javascript directly
@ -105,7 +105,7 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
$event['tipo'] = $langs->transnoentities('Action' . $actionmod->code); $event['tipo'] = $langs->transnoentities('Action' . $actionmod->code);
$event['titulo'] = $actionmod->label; $event['titulo'] = $actionmod->label;
$event['location'] = $langs->transnoentities('Location').': '.$actionmod->location; $event['location'] = $langs->transnoentities('Location').': '.$actionmod->location;
$eventfound[] = $event; $eventfound[] = $event;
} }
} }

View File

@ -1864,7 +1864,7 @@ abstract class CommonObject
case 'order_supplier': case 'order_supplier':
$this->updateline( $this->updateline(
$line->id, ($line->description?$line->description:$line->desc), $line->subprice, $line->qty, $line->remise_percent, $line->id, ($line->description?$line->description:$line->desc), $line->subprice, $line->qty, $line->remise_percent,
$line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, false, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, false,
$line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice
); );
break; break;

View File

@ -53,7 +53,7 @@ abstract class CommonObjectLine extends CommonObject
/** /**
* Returns the translation key from units dictionary. * Returns the translation key from units dictionary.
* A langs->trans() must be called on result to get translated value. * A langs->trans() must be called on result to get translated value.
* *
* @param string $type Label type (long or short) * @param string $type Label type (long or short)
* @return string|int <0 if ko, label if ok * @return string|int <0 if ko, label if ok
*/ */
@ -94,4 +94,3 @@ abstract class CommonObjectLine extends CommonObject
// For the moment we use the extends on CommonObject until PHP min is 5.4 so use Traits. // For the moment we use the extends on CommonObject until PHP min is 5.4 so use Traits.
} }

View File

@ -45,7 +45,7 @@
* <dol_cut_paper_partial> Cut ticket partially * <dol_cut_paper_partial> Cut ticket partially
* <dol_open_drawer> Open cash drawer * <dol_open_drawer> Open cash drawer
* <dol_activate_buzzer> Activate buzzer * <dol_activate_buzzer> Activate buzzer
* *
* Code which can be placed everywhere * Code which can be placed everywhere
* <dol_print_qrcode> Print QR Code * <dol_print_qrcode> Print QR Code
* <dol_print_date> Print date AAAA-MM-DD * <dol_print_date> Print date AAAA-MM-DD
@ -94,7 +94,7 @@
require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/Escpos.php'; require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/Escpos.php';
/** /**
* Class to manage Receipt Printers * Class to manage Receipt Printers
*/ */
@ -313,16 +313,16 @@ class dolReceiptPrinter extends Escpos
function selectTypePrinter($selected='', $htmlname='printertypeid') function selectTypePrinter($selected='', $htmlname='printertypeid')
{ {
global $langs; global $langs;
$options = array( $options = array(
1 => $langs->trans('CONNECTOR_DUMMY'), 1 => $langs->trans('CONNECTOR_DUMMY'),
2 => $langs->trans('CONNECTOR_FILE_PRINT'), 2 => $langs->trans('CONNECTOR_FILE_PRINT'),
3 => $langs->trans('CONNECTOR_NETWORK_PRINT'), 3 => $langs->trans('CONNECTOR_NETWORK_PRINT'),
4 => $langs->trans('CONNECTOR_WINDOWS_PRINT') 4 => $langs->trans('CONNECTOR_WINDOWS_PRINT')
); );
$this->resprint = Form::selectarray($htmlname, $options, $selected); $this->resprint = Form::selectarray($htmlname, $options, $selected);
return 0; return 0;
} }
@ -337,7 +337,7 @@ class dolReceiptPrinter extends Escpos
function selectProfilePrinter($selected='', $htmlname='printerprofileid') function selectProfilePrinter($selected='', $htmlname='printerprofileid')
{ {
global $langs; global $langs;
$options = array( $options = array(
0 => $langs->trans('PROFILE_DEFAULT'), 0 => $langs->trans('PROFILE_DEFAULT'),
1 => $langs->trans('PROFILE_SIMPLE'), 1 => $langs->trans('PROFILE_SIMPLE'),
@ -345,7 +345,7 @@ class dolReceiptPrinter extends Escpos
3 => $langs->trans('PROFILE_P822D'), 3 => $langs->trans('PROFILE_P822D'),
4 => $langs->trans('PROFILE_STAR') 4 => $langs->trans('PROFILE_STAR')
); );
$this->profileresprint = Form::selectarray($htmlname, $options, $selected); $this->profileresprint = Form::selectarray($htmlname, $options, $selected);
return 0; return 0;
} }
@ -533,11 +533,11 @@ class dolReceiptPrinter extends Escpos
$ret = $this->InitPrinter($printerid); $ret = $this->InitPrinter($printerid);
if ($ret>0) { if ($ret>0) {
setEventMessages($this->error, $this->errors, 'errors'); setEventMessages($this->error, $this->errors, 'errors');
} }
else else
{ {
$nboflines = count($vals); $nboflines = count($vals);
for ($line=0; $line < $nboflines; $line++) for ($line=0; $line < $nboflines; $line++)
{ {
switch ($vals[$line]['tag']) { switch ($vals[$line]['tag']) {
case 'DOL_ALIGN_CENTER': case 'DOL_ALIGN_CENTER':

View File

@ -74,14 +74,14 @@ class FormContract
if ($socid > 0) if ($socid > 0)
{ {
// CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. // CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY))
$sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)"; $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all')
{ {
$sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") "; $sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") ";
$sql.= " OR c.fk_soc IS NULL)"; $sql.= " OR c.fk_soc IS NULL)";
} }
} }
if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)"; if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)";
$sql.= " ORDER BY c.ref "; $sql.= " ORDER BY c.ref ";
@ -147,14 +147,14 @@ class FormContract
} }
print '</select>'; print '</select>';
$db->free($resql); $db->free($resql);
if (!empty($conf->use_javascript_ajax)) if (!empty($conf->use_javascript_ajax))
{ {
// Make select dynamic // Make select dynamic
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
print ajax_combobox($htmlname); print ajax_combobox($htmlname);
} }
return $num; return $num;
} }
else else
@ -163,7 +163,7 @@ class FormContract
return -1; return -1;
} }
} }
/** /**
* Show a form to select a contract * Show a form to select a contract
* *
@ -178,7 +178,7 @@ class FormContract
function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
{ {
global $langs; global $langs;
print "\n"; print "\n";
print '<form method="post" action="'.$page.'">'; print '<form method="post" action="'.$page.'">';
print '<input type="hidden" name="action" value="setcontract">'; print '<input type="hidden" name="action" value="setcontract">';
@ -186,6 +186,6 @@ class FormContract
$this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty); $this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty);
print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
print '</form>'; print '</form>';
} }
} }

View File

@ -66,10 +66,10 @@ class FormPropal
$prefix=''; $prefix='';
$listofstatus=array(); $listofstatus=array();
if ($mode == 'supplier') if ($mode == 'supplier')
{ {
$prefix='SupplierProposalStatus'; $prefix='SupplierProposalStatus';
$langs->load("supplier_proposal"); $langs->load("supplier_proposal");
$listofstatus=array( $listofstatus=array(
0=>array('id'=>0, 'code'=>'PR_DRAFT'), 0=>array('id'=>0, 'code'=>'PR_DRAFT'),
@ -82,7 +82,7 @@ class FormPropal
else else
{ {
$prefix="PropalStatus"; $prefix="PropalStatus";
$sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst"; $sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst";
$sql .= " WHERE active = 1"; $sql .= " WHERE active = 1";
dol_syslog(get_class($this)."::selectProposalStatus", LOG_DEBUG); dol_syslog(get_class($this)."::selectProposalStatus", LOG_DEBUG);
@ -146,4 +146,3 @@ class FormPropal
print '</select>'; print '</select>';
} }
} }

View File

@ -41,7 +41,7 @@ $(document).ready(function() {
'-moz-border-radius': '10px', '-moz-border-radius': '10px',
'border-radius': '10px' 'border-radius': '10px'
}, },
// styles applied when using $.growlUI // styles applied when using $.growlUI
dolEventErrorCSS: { dolEventErrorCSS: {
width: '350px', width: '350px',
@ -60,7 +60,7 @@ $(document).ready(function() {
} }
};*/ };*/
$.dolEventValid = function(title, message, timeout, onClose) { $.dolEventValid = function(title, message, timeout, onClose) {
var $m = $('<div class="dolEventValid"></div>'); var $m = $('<div class="dolEventValid"></div>');
if (title) $m.append('<h1>'+title+'</h1>'); if (title) $m.append('<h1>'+title+'</h1>');
@ -73,7 +73,7 @@ $(document).ready(function() {
css: $.blockUI.events.dolEventValidCSS css: $.blockUI.events.dolEventValidCSS
}); });
}; };
$.dolEventError = function(title, message, timeout, onClose) { $.dolEventError = function(title, message, timeout, onClose) {
var $m = $('<div class="dolEventError"></div>'); var $m = $('<div class="dolEventError"></div>');
if (title) $m.append('<h1>'+title+'</h1>'); if (title) $m.append('<h1>'+title+'</h1>');
@ -87,7 +87,7 @@ $(document).ready(function() {
}); });
$('.dolEventError').click($.unblockUI); $('.dolEventError').click($.unblockUI);
}; };
$.pleaseBePatient = function(message) { $.pleaseBePatient = function(message) {
$.blockUI({ $.blockUI({
message: message, message: message,

View File

@ -22,28 +22,28 @@ var Listview_include = true;
function Listview_OrderDown(idListe, column) { function Listview_OrderDown(idListe, column) {
var base_url = document.location.href; var base_url = document.location.href;
base_url = Listview_recup_form_param(idListe,base_url); base_url = Listview_recup_form_param(idListe,base_url);
base_url = Listview_removeParam(base_url,'Listview['+encodeURIComponent(idListe)+'][orderBy]'); base_url = Listview_removeParam(base_url,'Listview['+encodeURIComponent(idListe)+'][orderBy]');
base_url = Listview_removeParam(base_url,'get-all-for-export'); base_url = Listview_removeParam(base_url,'get-all-for-export');
document.location.href=Listview_modifyUrl(base_url,"Listview["+encodeURIComponent(idListe)+"][orderBy]["+encodeURIComponent(column)+"]","DESC"); document.location.href=Listview_modifyUrl(base_url,"Listview["+encodeURIComponent(idListe)+"][orderBy]["+encodeURIComponent(column)+"]","DESC");
} }
function Listview_OrderUp(idListe, column) { function Listview_OrderUp(idListe, column) {
var base_url = document.location.href; var base_url = document.location.href;
base_url = Listview_recup_form_param(idListe,base_url); base_url = Listview_recup_form_param(idListe,base_url);
base_url = Listview_removeParam(base_url,'Listview['+encodeURIComponent(idListe)+'][orderBy]'); base_url = Listview_removeParam(base_url,'Listview['+encodeURIComponent(idListe)+'][orderBy]');
base_url = Listview_removeParam(base_url,'get-all-for-export'); base_url = Listview_removeParam(base_url,'get-all-for-export');
document.location.href=Listview_modifyUrl(base_url,"Listview["+encodeURIComponent(idListe)+"][orderBy]["+encodeURIComponent(column)+"]","ASC"); document.location.href=Listview_modifyUrl(base_url,"Listview["+encodeURIComponent(idListe)+"][orderBy]["+encodeURIComponent(column)+"]","ASC");
} }
function Listview_modifyUrl(strURL,paramName,paramNewValue){ function Listview_modifyUrl(strURL,paramName,paramNewValue){
if (strURL.indexOf(paramName+'=')!=-1){ if (strURL.indexOf(paramName+'=')!=-1){
var strFirstPart=strURL.substring(0,strURL.indexOf(paramName+'=',0))+paramName+'='; var strFirstPart=strURL.substring(0,strURL.indexOf(paramName+'=',0))+paramName+'=';
var strLastPart=""; var strLastPart="";
if (strURL.indexOf('&',strFirstPart.length-1)>0) if (strURL.indexOf('&',strFirstPart.length-1)>0)
@ -56,55 +56,55 @@ function Listview_modifyUrl(strURL,paramName,paramNewValue){
else else
strURL+='?'+paramName+'='+paramNewValue; strURL+='?'+paramName+'='+paramNewValue;
} }
return strURL; return strURL;
} }
function Listview_removeParam(strURL, paramMask) { function Listview_removeParam(strURL, paramMask) {
var cpt=0; var cpt=0;
var url = ''; var url = '';
while(strURL.indexOf(paramMask)!=-1 && cpt++ <50){ while(strURL.indexOf(paramMask)!=-1 && cpt++ <50){
var strFirstPart= strURL.substring(0,strURL.indexOf(paramMask)-1); var strFirstPart= strURL.substring(0,strURL.indexOf(paramMask)-1);
var strLastPart=''; var strLastPart='';
if (strURL.indexOf('&',strFirstPart.length+1)>0) { if (strURL.indexOf('&',strFirstPart.length+1)>0) {
strLastPart = strURL.substring(strURL.indexOf('&',strFirstPart.length+1),strURL.length); strLastPart = strURL.substring(strURL.indexOf('&',strFirstPart.length+1),strURL.length);
} }
url = strFirstPart+strLastPart; url = strFirstPart+strLastPart;
} }
if(url=='')url = strURL; if(url=='')url = strURL;
return url; return url;
} }
function Listview_recup_form_param(idListe,base_url) { function Listview_recup_form_param(idListe,base_url) {
$('#'+idListe+' tr.barre-recherche [listviewtbs],#'+idListe+' tr.barre-recherche-head input,#'+idListe+' tr.barre-recherche-head select,#'+idListe+' div.tabsAction input[listviewtbs]').each(function(i,item) { $('#'+idListe+' tr.barre-recherche [listviewtbs],#'+idListe+' tr.barre-recherche-head input,#'+idListe+' tr.barre-recherche-head select,#'+idListe+' div.tabsAction input[listviewtbs]').each(function(i,item) {
if($(item).attr("name")) { if($(item).attr("name")) {
base_url = Listview_modifyUrl(base_url, $(item).attr("name") , $(item).val()); base_url = Listview_modifyUrl(base_url, $(item).attr("name") , $(item).val());
} }
}); });
return base_url; return base_url;
} }
function Listview_GoToPage(idListe,pageNumber){ function Listview_GoToPage(idListe,pageNumber){
var base_url = document.location.href; var base_url = document.location.href;
base_url = Listview_recup_form_param(idListe,base_url); base_url = Listview_recup_form_param(idListe,base_url);
base_url =Listview_modifyUrl(base_url,"Listview["+encodeURIComponent(idListe)+"][page]",pageNumber); base_url =Listview_modifyUrl(base_url,"Listview["+encodeURIComponent(idListe)+"][page]",pageNumber);
base_url = Listview_removeParam(base_url,'get-all-for-export'); base_url = Listview_removeParam(base_url,'get-all-for-export');
document.location.href=base_url; document.location.href=base_url;
} }
function Listview_submitSearch(obj) { function Listview_submitSearch(obj) {
$form = $(obj).closest('form'); $form = $(obj).closest('form');
console.log($form); console.log($form);
if($form.length>0){ if($form.length>0){
@ -113,20 +113,20 @@ function Listview_submitSearch(obj) {
} }
function Listview_launch_downloadAs(mode,url,token,session_name) { function Listview_launch_downloadAs(mode,url,token,session_name) {
$('#listviewdAS_export_form').remove(); $('#listviewdAS_export_form').remove();
$form = $('<form action="'+url+'" method="post" name="listviewdAS_export_form" id="listTBSdAS_export_form"></form>'); $form = $('<form action="'+url+'" method="post" name="listviewdAS_export_form" id="listTBSdAS_export_form"></form>');
$form.append('<input type="hidden" name="mode" value="'+mode+'" />'); $form.append('<input type="hidden" name="mode" value="'+mode+'" />');
$form.append('<input type="hidden" name="token" value="'+token+'" />'); $form.append('<input type="hidden" name="token" value="'+token+'" />');
$form.append('<input type="hidden" name="session_name" value="'+session_name+'" />'); $form.append('<input type="hidden" name="session_name" value="'+session_name+'" />');
$('body').append($form); $('body').append($form);
$('#listviewdAS_export_form').submit(); $('#listviewdAS_export_form').submit();
} }
function Listview_downloadAs(obj, mode,url,token,session_name) { function Listview_downloadAs(obj, mode,url,token,session_name) {
$form = $(obj).closest('form'); $form = $(obj).closest('form');
$div = $form.find('div.tabsAction'); $div = $form.find('div.tabsAction');
$div.append('<input type="hidden" listviewtbs="hidden" name="token" value="'+token+'" />'); $div.append('<input type="hidden" listviewtbs="hidden" name="token" value="'+token+'" />');
@ -134,33 +134,33 @@ function Listview_downloadAs(obj, mode,url,token,session_name) {
$div.append('<input type="hidden" listviewtbs="hidden" name="url" value="'+url+'" />'); $div.append('<input type="hidden" listviewtbs="hidden" name="url" value="'+url+'" />');
$div.append('<input type="hidden" listviewtbs="hidden" name="session_name" value="'+session_name+'" />'); $div.append('<input type="hidden" listviewtbs="hidden" name="session_name" value="'+session_name+'" />');
$div.append('<input type="hidden" listviewtbs="hidden" name="get-all-for-export" value="1" />'); $div.append('<input type="hidden" listviewtbs="hidden" name="get-all-for-export" value="1" />');
Listview_submitSearch(obj); Listview_submitSearch(obj);
} }
$(document).ready(function() { $(document).ready(function() {
$('tr.barre-recherche input').keypress(function(e) { $('tr.barre-recherche input').keypress(function(e) {
if(e.which == 13) { if(e.which == 13) {
var id_list = $(this).closest('table').attr('id'); var id_list = $(this).closest('table').attr('id');
$('#'+id_list+' .list-search-link').click(); $('#'+id_list+' .list-search-link').click();
} }
}); });
var $_GET = {}; var $_GET = {};
document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () { document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () {
function decode(s) { function decode(s) {
return decodeURIComponent(s.split("+").join(" ")); return decodeURIComponent(s.split("+").join(" "));
} }
$_GET[decode(arguments[1])] = decode(arguments[2]); $_GET[decode(arguments[1])] = decode(arguments[2]);
}); });
if(typeof $_GET["get-all-for-export"] != "undefined") { if(typeof $_GET["get-all-for-export"] != "undefined") {
Listview_launch_downloadAs($_GET['mode'],$_GET['url'],$_GET['token'],$_GET['session_name']); Listview_launch_downloadAs($_GET['mode'],$_GET['url'],$_GET['token'],$_GET['session_name']);
} }
}); });

View File

@ -24,9 +24,9 @@ function regexEvent(objet,evt,type)
{ {
case 'days': case 'days':
var regex= /^[0-9]{1}([.,]{1}[0-9]{1})?$/; var regex= /^[0-9]{1}([.,]{1}[0-9]{1})?$/;
if(regex.test(objet.value) ) if(regex.test(objet.value) )
{ {
var tmp=objet.value.replace(',','.'); var tmp=objet.value.replace(',','.');
if(tmp<=1.5){ if(tmp<=1.5){
var tmpint=parseInt(tmp); var tmpint=parseInt(tmp);
@ -41,13 +41,13 @@ function regexEvent(objet,evt,type)
}else{ }else{
objet.value= '0'; objet.value= '0';
} }
break; break;
case 'hours': case 'hours':
var regex= /^[0-9]{1,2}:[0-9]{2}$/; var regex= /^[0-9]{1,2}:[0-9]{2}$/;
var regex2=/^[0-9]{1,2}$/; var regex2=/^[0-9]{1,2}$/;
var regex3= /^[0-9]{1}([.,]{1}[0-9]{1,2})?$/; var regex3= /^[0-9]{1}([.,]{1}[0-9]{1,2})?$/;
if(!regex.test(objet.value)) if(!regex.test(objet.value))
{ {
if(regex2.test(objet.value)) if(regex2.test(objet.value))
objet.value=objet.value+':00'; objet.value=objet.value+':00';
else if(regex3.test(objet.value)) { else if(regex3.test(objet.value)) {
@ -63,25 +63,25 @@ function regexEvent(objet,evt,type)
//var regex= /^[0-9:]{1}$/; //var regex= /^[0-9:]{1}$/;
//alert(event.charCode); //alert(event.charCode);
var charCode = (evt.which) ? evt.which : event.keyCode; var charCode = (evt.which) ? evt.which : event.keyCode;
if(((charCode >= 48) && (charCode <= 57)) || //num if(((charCode >= 48) && (charCode <= 57)) || //num
(charCode===46) || (charCode===8)||// comma & periode (charCode===46) || (charCode===8)||// comma & periode
(charCode === 58) || (charCode==44) )// : & all charcode (charCode === 58) || (charCode==44) )// : & all charcode
{ {
// ((charCode>=96) && (charCode<=105)) || //numpad // ((charCode>=96) && (charCode<=105)) || //numpad
return true; return true;
}else }else
{ {
return false; return false;
} }
break; break;
default: default:
break; break;
} }
} }
function pad(n) { function pad(n) {
return (n < 10) ? ("0" + n) : n; return (n < 10) ? ("0" + n) : n;
@ -95,7 +95,7 @@ function parseTime(timeStr, dt)
if (!dt) { if (!dt) {
dt = new Date(); dt = new Date();
} }
var time = timeStr.match(/(\d+)(?::(\d\d))?\s*(p?)/i); var time = timeStr.match(/(\d+)(?::(\d\d))?\s*(p?)/i);
if (!time) { if (!time) {
return -1; return -1;
@ -107,7 +107,7 @@ function parseTime(timeStr, dt)
else { else {
hours += (hours < 12 && time[3]) ? 12 : 0; hours += (hours < 12 && time[3]) ? 12 : 0;
} }
dt.setHours(hours); dt.setHours(hours);
dt.setMinutes(parseInt(time[2], 10) || 0); dt.setMinutes(parseInt(time[2], 10) || 0);
dt.setSeconds(0, 0); dt.setSeconds(0, 0);
@ -122,10 +122,10 @@ function updateTotal(days,mode)
{ {
var total = new Date(0); var total = new Date(0);
total.setHours(0); total.setHours(0);
total.setMinutes(0); total.setMinutes(0);
var nbline = document.getElementById('numberOfLines').value; var nbline = document.getElementById('numberOfLines').value;
for (var i=-1; i<nbline; i++) for (var i=-1; i<nbline; i++)
{ {
var id='timespent['+i+']['+days+']'; var id='timespent['+i+']['+days+']';
var taskTime= new Date(0); var taskTime= new Date(0);
var element=document.getElementById(id); var element=document.getElementById(id);
@ -133,7 +133,7 @@ function updateTotal(days,mode)
{ {
/* alert(element.value);*/ /* alert(element.value);*/
if (element.value) if (element.value)
{ {
result=parseTime(element.value,taskTime); result=parseTime(element.value,taskTime);
} }
else else
@ -147,14 +147,14 @@ function updateTotal(days,mode)
} }
} }
var id='timeadded['+i+']['+days+']'; var id='timeadded['+i+']['+days+']';
var taskTime= new Date(0); var taskTime= new Date(0);
var element=document.getElementById(id); var element=document.getElementById(id);
if(element) if(element)
{ {
/* alert(element.value);*/ /* alert(element.value);*/
if (element.value) if (element.value)
{ {
result=parseTime(element.value,taskTime); result=parseTime(element.value,taskTime);
} }
else else
@ -178,7 +178,7 @@ function updateTotal(days,mode)
console.log(this.value) console.log(this.value)
alert(element.value);*/ alert(element.value);*/
if (this.value) if (this.value)
{ {
console.log(this.value+':00') console.log(this.value+':00')
result=parseTime(this.value+':00',taskTime); result=parseTime(this.value+':00',taskTime);
} }
@ -202,7 +202,7 @@ function updateTotal(days,mode)
console.log(this.value) console.log(this.value)
alert(element.value);*/ alert(element.value);*/
if (this.value) if (this.value)
{ {
console.log('00:'+this.value) console.log('00:'+this.value)
result=parseTime('00:'+"00".substring(0, 2 - this.value.length) + this.value,taskTime); result=parseTime('00:'+"00".substring(0, 2 - this.value.length) + this.value,taskTime);
} }
@ -217,14 +217,14 @@ function updateTotal(days,mode)
console.log(total.getMinutes()) console.log(total.getMinutes())
} }
}); });
if (total.getHours() || total.getMinutes()) jQuery('.totalDay'+days).addClass("bold"); if (total.getHours() || total.getMinutes()) jQuery('.totalDay'+days).addClass("bold");
else jQuery('.totalDay'+days).removeClass("bold"); else jQuery('.totalDay'+days).removeClass("bold");
jQuery('.totalDay'+days).text(pad(total.getHours())+':'+pad(total.getMinutes())); jQuery('.totalDay'+days).text(pad(total.getHours())+':'+pad(total.getMinutes()));
var total = new Date(0); var total = new Date(0);
total.setHours(0); total.setHours(0);
total.setMinutes(0); total.setMinutes(0);
for (var i=0; i<7; i++) for (var i=0; i<7; i++)
{ {
var taskTime= new Date(0); var taskTime= new Date(0);
@ -242,14 +242,14 @@ function updateTotal(days,mode)
var total =0; var total =0;
var nbline = document.getElementById('numberOfLines').value; var nbline = document.getElementById('numberOfLines').value;
for (var i=-1; i<nbline; i++) for (var i=-1; i<nbline; i++)
{ {
var id='timespent['+i+']['+days+']'; var id='timespent['+i+']['+days+']';
var taskTime= new Date(0); var taskTime= new Date(0);
var element=document.getElementById(id); var element=document.getElementById(id);
if(element) if(element)
{ {
if (element.value) if (element.value)
{ {
total+=parseInt(element.value); total+=parseInt(element.value);
} }
@ -259,13 +259,13 @@ function updateTotal(days,mode)
} }
} }
var id='timeadded['+i+']['+days+']'; var id='timeadded['+i+']['+days+']';
var taskTime= new Date(0); var taskTime= new Date(0);
var element=document.getElementById(id); var element=document.getElementById(id);
if(element) if(element)
{ {
if (element.value) if (element.value)
{ {
total+=parseInt(element.value); total+=parseInt(element.value);
} }
@ -275,11 +275,9 @@ function updateTotal(days,mode)
} }
} }
} }
if (total) jQuery('.totalDay'+days).addClass("bold"); if (total) jQuery('.totalDay'+days).addClass("bold");
else jQuery('.totalDay'+days).removeClass("bold"); else jQuery('.totalDay'+days).removeClass("bold");
jQuery('.totalDay'+days).text(total); jQuery('.totalDay'+days).text(total);
} }
} }

View File

@ -251,7 +251,7 @@ function barcode_encode_genbarcode($code,$encoding)
$command=escapeshellarg($genbarcode_loc); $command=escapeshellarg($genbarcode_loc);
//$paramclear=" \"".str_replace("\"", "\\\"",$code)."\" \"".str_replace("\"", "\\\"",strtoupper($encoding))."\""; //$paramclear=" \"".str_replace("\"", "\\\"",$code)."\" \"".str_replace("\"", "\\\"",strtoupper($encoding))."\"";
$paramclear=" ".escapeshellarg($code)." ".escapeshellarg(strtoupper($encoding)); $paramclear=" ".escapeshellarg($code)." ".escapeshellarg(strtoupper($encoding));
$fullcommandclear=$command." ".$paramclear." 2>&1"; $fullcommandclear=$command." ".$paramclear." 2>&1";
//print $fullcommandclear."<br>\n";exit; //print $fullcommandclear."<br>\n";exit;
@ -277,8 +277,8 @@ function barcode_encode_genbarcode($code,$encoding)
"error" => "" "error" => ""
); );
//var_dump($ret); //var_dump($ret);
if (preg_match('/permission denied/i',$ret['bars'])) if (preg_match('/permission denied/i',$ret['bars']))
{ {
$ret['error']=$ret['bars']; $ret['bars']=''; $ret['error']=$ret['bars']; $ret['bars']='';
return $ret; return $ret;
} }

View File

@ -48,8 +48,8 @@ function emailing_prepare_head(Mailing $object)
$h++; $h++;
} }
if (! empty($conf->global->EMAILING_USE_ADVANCED_SELECTOR)) if (! empty($conf->global->EMAILING_USE_ADVANCED_SELECTOR))
{ {
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/advtargetemailing.php?id=".$object->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/advtargetemailing.php?id=".$object->id;
$head[$h][1] = $langs->trans("MailAdvTargetRecipients"); $head[$h][1] = $langs->trans("MailAdvTargetRecipients");

View File

@ -36,7 +36,7 @@ $sql = "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, t
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
while ($row = $db->fetch_array($resql)) while ($row = $db->fetch_array($resql))
{ {
$_Avery_Labels[$row['code']]['name']=$row['name']; $_Avery_Labels[$row['code']]['name']=$row['name'];
$_Avery_Labels[$row['code']]['paper-size']=$row['paper_size']; $_Avery_Labels[$row['code']]['paper-size']=$row['paper_size'];

View File

@ -18,7 +18,7 @@
/** /**
* \file htdocs/core/lib/hrm.lib.php * \file htdocs/core/lib/hrm.lib.php
* \ingroup HRM * \ingroup HRM
* \brief Library for hrm * \brief Library for hrm
*/ */
$langs->load('hrm'); $langs->load('hrm');

View File

@ -36,7 +36,7 @@
function facture_prepare_head($object) function facture_prepare_head($object)
{ {
global $db, $langs, $conf; global $db, $langs, $conf;
$h = 0; $h = 0;
$head = array(); $head = array();
@ -63,7 +63,7 @@ function facture_prepare_head($object)
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
$sql .= " WHERE pfd.fk_facture = ".$object->id; $sql .= " WHERE pfd.fk_facture = ".$object->id;
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
{ {
$obj=$db->fetch_object($resql); $obj=$db->fetch_object($resql);
if ($obj) $nbStandingOrders = $obj->nb; if ($obj) $nbStandingOrders = $obj->nb;
@ -152,12 +152,12 @@ function invoice_admin_prepare_head()
$head[$h][1] = $langs->trans("ExtraFieldsLines"); $head[$h][1] = $langs->trans("ExtraFieldsLines");
$head[$h][2] = 'attributeslines'; $head[$h][2] = 'attributeslines';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facture_rec_cust_extrafields.php'; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facture_rec_cust_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFieldsCustomerInvoicesRec"); $head[$h][1] = $langs->trans("ExtraFieldsCustomerInvoicesRec");
$head[$h][2] = 'attributesrec'; $head[$h][2] = 'attributesrec';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facturedet_rec_cust_extrafields.php'; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/admin/facturedet_rec_cust_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFieldsLinesRec"); $head[$h][1] = $langs->trans("ExtraFieldsLinesRec");
$head[$h][2] = 'attributeslinesrec'; $head[$h][2] = 'attributeslinesrec';
@ -172,7 +172,7 @@ function invoice_admin_prepare_head()
function invoice_rec_prepare_head($object) function invoice_rec_prepare_head($object)
{ {
global $db, $langs, $conf; global $db, $langs, $conf;
$h = 0; $h = 0;
$head = array(); $head = array();
@ -191,5 +191,3 @@ function invoice_rec_prepare_head($object)
return $head; return $head;
} }

View File

@ -59,7 +59,7 @@ function loan_prepare_head($object)
$tab++; $tab++;
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
{ {
$nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1); $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
$head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id; $head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id;
$head[$tab][1] = $langs->trans("Notes"); $head[$tab][1] = $langs->trans("Notes");

View File

@ -258,13 +258,13 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='',
foreach($object->fields as $key => $val) foreach($object->fields as $key => $val)
{ {
$i++; $i++;
$type = $val['type']; $type = $val['type'];
$type = preg_replace('/:.*$/', '', $type); // For case type = 'integer:Societe:societe/class/societe.class.php' $type = preg_replace('/:.*$/', '', $type); // For case type = 'integer:Societe:societe/class/societe.class.php'
if ($type == 'html') $type = 'text'; // html modulebuilder type is a text type in database if ($type == 'html') $type = 'text'; // html modulebuilder type is a text type in database
else if ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database else if ($type == 'price') $type = 'double'; // html modulebuilder type is a text type in database
else if ($type == 'link' || $type == 'sellist') $type = 'integer'; else if ($type == 'link' || $type == 'sellist') $type = 'integer';
$texttoinsert.= "\t".$key." ".$type; $texttoinsert.= "\t".$key." ".$type;
if ($key == 'rowid') $texttoinsert.= ' AUTO_INCREMENT PRIMARY KEY'; if ($key == 'rowid') $texttoinsert.= ' AUTO_INCREMENT PRIMARY KEY';
if ($key == 'entity') $texttoinsert.= ' DEFAULT 1'; if ($key == 'entity') $texttoinsert.= ' DEFAULT 1';
@ -343,5 +343,3 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='',
return $error ? -1 : 1; return $error ? -1 : 1;
} }

View File

@ -64,7 +64,7 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile)
&& $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60){ && $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60){
$hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'hour'); $hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'hour');
$mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'min'); $mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'min');
$ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'sec'); $ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'sec');
fwrite($calfileh,"X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n"); fwrite($calfileh,"X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n");
} }
@ -520,4 +520,3 @@ function quotedPrintDecode($str)
$out = quoted_printable_decode($out); // Available with PHP 4+ $out = quoted_printable_decode($out); // Available with PHP 4+
return trim($out); return trim($out);
} }

View File

@ -113,7 +113,7 @@ class modPhpbarcode extends ModeleBarCode
* @param string $encoding Mode of encoding * @param string $encoding Mode of encoding
* @param string $readable Code can be read * @param string $readable Code can be read
* @param integer $scale Scale * @param integer $scale Scale
* @param integer $nooutputiferror No output if error * @param integer $nooutputiferror No output if error
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function buildBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) function buildBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0)
@ -154,7 +154,7 @@ class modPhpbarcode extends ModeleBarCode
* @param string $encoding Mode of encoding * @param string $encoding Mode of encoding
* @param string $readable Code can be read * @param string $readable Code can be read
* @param integer $scale Scale * @param integer $scale Scale
* @param integer $nooutputiferror No output if error * @param integer $nooutputiferror No output if error
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function writeBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) function writeBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0)
@ -173,4 +173,3 @@ class modPhpbarcode extends ModeleBarCode
} }
} }

View File

@ -39,7 +39,7 @@ class modTcpdfbarcode extends ModeleBarCode
public $error=''; public $error='';
var $is2d = false; var $is2d = false;
/** /**
* Return description of numbering model * Return description of numbering model
* *
@ -60,8 +60,8 @@ class modTcpdfbarcode extends ModeleBarCode
function isEnabled() function isEnabled()
{ {
return true; return true;
} }
/** /**
* Test si les numeros deja en vigueur dans la base ne provoquent pas de * Test si les numeros deja en vigueur dans la base ne provoquent pas de
* de conflits qui empechera cette numerotation de fonctionner. * de conflits qui empechera cette numerotation de fonctionner.
@ -71,10 +71,10 @@ class modTcpdfbarcode extends ModeleBarCode
function canBeActivated() function canBeActivated()
{ {
global $langs; global $langs;
return true; return true;
} }
/** /**
* Return true if encoding is supported * Return true if encoding is supported
* *
@ -88,7 +88,7 @@ class modTcpdfbarcode extends ModeleBarCode
return 0; return 0;
} else { } else {
return 1; return 1;
} }
} }
/** /**
@ -104,17 +104,17 @@ class modTcpdfbarcode extends ModeleBarCode
function buildBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0) function buildBarCode($code,$encoding,$readable='Y',$scale=1,$nooutputiferror=0)
{ {
global $_GET; global $_GET;
$tcpdfEncoding = $this->getTcpdfEncodingType($encoding); $tcpdfEncoding = $this->getTcpdfEncodingType($encoding);
if (empty($tcpdfEncoding)) return -1; if (empty($tcpdfEncoding)) return -1;
$color = array(0,0,0); $color = array(0,0,0);
$_GET["code"]=$code; $_GET["code"]=$code;
$_GET["type"]=$encoding; $_GET["type"]=$encoding;
$_GET["height"]=$height; $_GET["height"]=$height;
$_GET["readable"]=$readable; $_GET["readable"]=$readable;
if ($code) { if ($code) {
// Load the tcpdf barcode class // Load the tcpdf barcode class
if ($this->is2d) { if ($this->is2d) {
@ -127,15 +127,15 @@ class modTcpdfbarcode extends ModeleBarCode
$width = 1; $width = 1;
require_once TCPDF_PATH.'tcpdf_barcodes_1d.php'; require_once TCPDF_PATH.'tcpdf_barcodes_1d.php';
$barcodeobj = new TCPDFBarcode($code, $tcpdfEncoding); $barcodeobj = new TCPDFBarcode($code, $tcpdfEncoding);
} }
dol_syslog("buildBarCode::TCPDF.getBarcodePNG"); dol_syslog("buildBarCode::TCPDF.getBarcodePNG");
$barcodeobj->getBarcodePNG($width, $height, $color); $barcodeobj->getBarcodePNG($width, $height, $color);
return 1; return 1;
} else { } else {
return -2; return -2;
} }
} }
/** /**
@ -177,8 +177,8 @@ class modTcpdfbarcode extends ModeleBarCode
$width = 1; $width = 1;
require_once TCPDF_PATH.'tcpdf_barcodes_1d.php'; require_once TCPDF_PATH.'tcpdf_barcodes_1d.php';
$barcodeobj = new TCPDFBarcode($code, $tcpdfEncoding); $barcodeobj = new TCPDFBarcode($code, $tcpdfEncoding);
} }
dol_syslog("writeBarCode::TCPDF.getBarcodePngData"); dol_syslog("writeBarCode::TCPDF.getBarcodePngData");
if ($imageData = $barcodeobj->getBarcodePngData($width, $height, $color)) { if ($imageData = $barcodeobj->getBarcodePngData($width, $height, $color)) {
if (function_exists('imagecreate')) { if (function_exists('imagecreate')) {
@ -191,16 +191,16 @@ class modTcpdfbarcode extends ModeleBarCode
} }
} else { } else {
return -4; return -4;
} }
} else { } else {
return -2; return -2;
} }
} }
/** /**
* get available output_modes for tcpdf class wth its translated description * get available output_modes for tcpdf class wth its translated description
* *
* @param string $dolEncodingType dolibarr barcode encoding type * @param string $dolEncodingType dolibarr barcode encoding type
* @return string tcpdf encoding type * @return string tcpdf encoding type
*/ */
public function getTcpdfEncodingType($dolEncodingType) public function getTcpdfEncodingType($dolEncodingType)
@ -237,7 +237,7 @@ class modTcpdfbarcode extends ModeleBarCode
'PHARMA' => 'PHARMA', 'PHARMA' => 'PHARMA',
'PHARMA2T' => 'PHARMA2T' 'PHARMA2T' => 'PHARMA2T'
); );
$tcpdf2dEncodingTypes = array( $tcpdf2dEncodingTypes = array(
'DATAMATRIX' => 'DATAMATRIX', 'DATAMATRIX' => 'DATAMATRIX',
'PDF417' => 'PDF417', 'PDF417' => 'PDF417',
@ -245,9 +245,9 @@ class modTcpdfbarcode extends ModeleBarCode
'QRCODE,L' => 'QRCODE,L', 'QRCODE,L' => 'QRCODE,L',
'QRCODE,M' => 'QRCODE,M', 'QRCODE,M' => 'QRCODE,M',
'QRCODE,Q' => 'QRCODE,Q', 'QRCODE,Q' => 'QRCODE,Q',
'QRCODE,H' => 'QRCODE,H' 'QRCODE,H' => 'QRCODE,H'
); );
if (array_key_exists($dolEncodingType, $tcpdf1dEncodingTypes)) { if (array_key_exists($dolEncodingType, $tcpdf1dEncodingTypes)) {
$this->is2d = false; $this->is2d = false;
return $tcpdf1dEncodingTypes[$dolEncodingType]; return $tcpdf1dEncodingTypes[$dolEncodingType];
@ -256,6 +256,6 @@ class modTcpdfbarcode extends ModeleBarCode
return $tcpdf2dEncodingTypes[$dolEncodingType]; return $tcpdf2dEncodingTypes[$dolEncodingType];
} else { } else {
return ''; return '';
} }
} }
} }

View File

@ -44,7 +44,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Load traductions files requiredby by page // Load traductions files requiredby by page
$langs->loadLangs(array("main", "bills")); $langs->loadLangs(array("main", "bills"));
@ -77,7 +77,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
/** /**
* Fonction to generate document on disk * Fonction to generate document on disk
* *
* @param RemiseCheque $object Object RemiseCheque * @param RemiseCheque $object Object RemiseCheque
* @param string $_dir Directory * @param string $_dir Directory
* @param string $number Number * @param string $number Number
* @param Translate $outputlangs Lang output object * @param Translate $outputlangs Lang output object
@ -91,7 +91,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
$sav_charset_output=$outputlangs->charset_output; $sav_charset_output=$outputlangs->charset_output;
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta")); $outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta"));
@ -191,7 +191,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
@chmod($file, octdec($conf->global->MAIN_UMASK)); @chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file); $this->result = array('fullpath'=>$file);
$outputlangs->charset_output=$sav_charset_output; $outputlangs->charset_output=$sav_charset_output;
return 1; // Pas d'erreur return 1; // Pas d'erreur
} }
@ -210,7 +210,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
{ {
global $langs; global $langs;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("compta", "banks")); $outputlangs->loadLangs(array("compta", "banks"));
@ -384,7 +384,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
{ {
$newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray); $newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray);
} }
return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
} }
} }

View File

@ -118,7 +118,7 @@ abstract class ModeleNumRefChequeReceipts
/** /**
* \class ModeleChequeReceipts * \class ModeleChequeReceipts
* \brief Classe mere des modeles de * \brief Classe mere des modeles de
*/ */
abstract class ModeleChequeReceipts extends CommonDocGenerator abstract class ModeleChequeReceipts extends CommonDocGenerator
{ {
@ -215,4 +215,3 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
return -1; return -1;
} }
} }

View File

@ -43,17 +43,17 @@ class pdf_strato extends ModelePDFContract
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
@ -63,8 +63,8 @@ class pdf_strato extends ModelePDFContract
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
@ -75,32 +75,32 @@ class pdf_strato extends ModelePDFContract
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
@ -177,7 +177,7 @@ class pdf_strato extends ModelePDFContract
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Translations // Translations
$outputlangs->loadLangs(array("main", "dict", "companies", "contracts")); $outputlangs->loadLangs(array("main", "dict", "companies", "contracts"));
@ -537,9 +537,9 @@ class pdf_strato extends ModelePDFContract
function _pagehead(&$pdf, $object, $showaddress, $outputlangs) function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {
global $conf,$langs; global $conf,$langs;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
// Translations // Translations
$outputlangs->loadLangs(array("main", "dict", "contract", "companies")); $outputlangs->loadLangs(array("main", "dict", "contract", "companies"));
@ -721,4 +721,3 @@ class pdf_strato extends ModelePDFContract
} }
} }

View File

@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
/** /**
* Class to build sending documents with model Merou * Class to build sending documents with model Merou
*/ */
class pdf_merou extends ModelePdfExpedition class pdf_merou extends ModelePdfExpedition
{ {
@ -41,17 +41,17 @@ class pdf_merou extends ModelePdfExpedition
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
@ -61,8 +61,8 @@ class pdf_merou extends ModelePdfExpedition
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
@ -73,37 +73,37 @@ class pdf_merou extends ModelePdfExpedition
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Societe * @var Societe
@ -162,10 +162,10 @@ class pdf_merou extends ModelePdfExpedition
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Translations // Translations
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
if ($conf->expedition->dir_output) if ($conf->expedition->dir_output)
{ {
$object->fetch_thirdparty(); $object->fetch_thirdparty();
@ -331,7 +331,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->SetDrawColor(120,120,120); $pdf->SetDrawColor(120,120,120);
$pdf->Rect(10+3, $curY, 3, 3); $pdf->Rect(10+3, $curY, 3, 3);
$pdf->Rect(20+3, $curY, 3, 3); $pdf->Rect(20+3, $curY, 3, 3);
//Insertion de la reference du produit //Insertion de la reference du produit
$pdf->SetXY(30, $curY); $pdf->SetXY(30, $curY);
$pdf->SetFont('','B', $default_font_size - 3); $pdf->SetFont('','B', $default_font_size - 3);
@ -424,7 +424,7 @@ class pdf_merou extends ModelePdfExpedition
@chmod($file, octdec($conf->global->MAIN_UMASK)); @chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file); $this->result = array('fullpath'=>$file);
return 1; return 1;
} }
else else
@ -456,7 +456,7 @@ class pdf_merou extends ModelePdfExpedition
{ {
global $langs; global $langs;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
// Translations // Translations
$langs->loadLangs(array("main", "bills")); $langs->loadLangs(array("main", "bills"));

View File

@ -40,17 +40,17 @@ class pdf_rouget extends ModelePdfExpedition
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
@ -60,8 +60,8 @@ class pdf_rouget extends ModelePdfExpedition
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
@ -72,37 +72,37 @@ class pdf_rouget extends ModelePdfExpedition
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Societe * @var Societe
@ -193,7 +193,7 @@ class pdf_rouget extends ModelePdfExpedition
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Translations // Translations
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
@ -1100,4 +1100,3 @@ class pdf_rouget extends ModelePdfExpedition
} }
} }

View File

@ -52,7 +52,7 @@ class pdf_standard extends ModeleExpenseReport
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
@ -62,8 +62,8 @@ class pdf_standard extends ModeleExpenseReport
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
@ -74,37 +74,37 @@ class pdf_standard extends ModeleExpenseReport
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Societe * @var Societe
@ -120,7 +120,7 @@ class pdf_standard extends ModeleExpenseReport
function __construct($db) function __construct($db)
{ {
global $conf, $langs, $mysoc; global $conf, $langs, $mysoc;
// Translations // Translations
$langs->loadLangs(array("main", "trips", "projects")); $langs->loadLangs(array("main", "trips", "projects"));
@ -208,7 +208,7 @@ class pdf_standard extends ModeleExpenseReport
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Translations // Translations
$outputlangs->loadLangs(array("main", "trips", "projects", "dict")); $outputlangs->loadLangs(array("main", "trips", "projects", "dict"));
@ -567,7 +567,7 @@ class pdf_standard extends ModeleExpenseReport
function _pagehead(&$pdf, $object, $showaddress, $outputlangs) function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {
global $conf,$langs,$hookmanager; global $conf,$langs,$hookmanager;
// Translations // Translations
$outputlangs->loadLangs(array("main", "trips", "companies")); $outputlangs->loadLangs(array("main", "trips", "companies"));
@ -919,4 +919,3 @@ class pdf_standard extends ModeleExpenseReport
} }
} }

View File

@ -71,8 +71,8 @@ class pdf_crabe extends ModelePDFFactures
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
@ -83,37 +83,37 @@ class pdf_crabe extends ModelePDFFactures
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Societe * @var Societe
@ -1843,4 +1843,3 @@ class pdf_crabe extends ModelePDFFactures
} }
} }

View File

@ -78,7 +78,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>'; $texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>';
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->FACTURE_MERCURE_MASK_REPLACEMENT.'">',$tooltip,1,1).'</td>'; $texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->FACTURE_MERCURE_MASK_REPLACEMENT.'">',$tooltip,1,1).'</td>';
$texte.= '</tr>'; $texte.= '</tr>';
// Parametrage du prefix des avoirs // Parametrage du prefix des avoirs
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</td>'; $texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</td>';
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->FACTURE_MERCURE_MASK_CREDIT.'">',$tooltip,1,1).'</td>'; $texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->FACTURE_MERCURE_MASK_CREDIT.'">',$tooltip,1,1).'</td>';
@ -135,7 +135,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
// Get Mask value // Get Mask value
$mask = ''; $mask = '';
if (is_object($facture) && $facture->type == 1) if (is_object($facture) && $facture->type == 1)
{ {
$mask=$conf->global->FACTURE_MERCURE_MASK_REPLACEMENT; $mask=$conf->global->FACTURE_MERCURE_MASK_REPLACEMENT;
if (! $mask) if (! $mask)

View File

@ -52,7 +52,7 @@ class pdf_soleil extends ModelePDFFicheinter
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
@ -62,8 +62,8 @@ class pdf_soleil extends ModelePDFFicheinter
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
@ -74,37 +74,37 @@ class pdf_soleil extends ModelePDFFicheinter
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Societe * @var Societe
@ -169,7 +169,7 @@ class pdf_soleil extends ModelePDFFicheinter
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Translations // Translations
$outputlangs->loadLangs(array("main", "interventions", "dict", "companies")); $outputlangs->loadLangs(array("main", "interventions", "dict", "companies"));
@ -552,7 +552,7 @@ class pdf_soleil extends ModelePDFFicheinter
{ {
global $conf,$langs; global $conf,$langs;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "interventions")); $outputlangs->loadLangs(array("main", "dict", "companies", "interventions"));
@ -732,4 +732,3 @@ class pdf_soleil extends ModelePDFFicheinter
} }
} }

View File

@ -648,8 +648,8 @@ class ImportCsv extends ModeleImports
} }
} else { } else {
// We have a last INSERT ID. Check if we have a row referencing this foreign key. // We have a last INSERT ID. Check if we have a row referencing this foreign key.
// This is required when updating table with some extrafields. When inserting a record in parent table, we can make // This is required when updating table with some extrafields. When inserting a record in parent table, we can make
// a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record
// may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid. // may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid.
$sqlSelect = 'SELECT rowid FROM '.$tablename; $sqlSelect = 'SELECT rowid FROM '.$tablename;
@ -771,5 +771,3 @@ function cleansep($value)
{ {
return str_replace(array(',',';'),'/',$value); return str_replace(array(',',';'),'/',$value);
}; };

View File

@ -672,8 +672,8 @@ class ImportXlsx extends ModeleImports
} }
} else { } else {
// We have a last INSERT ID. Check if we have a row referencing this foreign key. // We have a last INSERT ID. Check if we have a row referencing this foreign key.
// This is required when updating table with some extrafields. When inserting a record in parent table, we can make // This is required when updating table with some extrafields. When inserting a record in parent table, we can make
// a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record
// may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid. // may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid.
$sqlSelect = 'SELECT rowid FROM '.$tablename; $sqlSelect = 'SELECT rowid FROM '.$tablename;

View File

@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
/** /**
* Class to build Delivery Order documents with typhon model * Class to build Delivery Order documents with typhon model
*/ */
class pdf_typhon extends ModelePDFDeliveryOrder class pdf_typhon extends ModelePDFDeliveryOrder
{ {
@ -43,69 +43,69 @@ class pdf_typhon extends ModelePDFDeliveryOrder
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';
/** /**
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Societe * @var Societe
@ -120,7 +120,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Translations // Translations
$langs->loadLangs(array("main", "bills", "sendings", "companies")); $langs->loadLangs(array("main", "bills", "sendings", "companies"));
@ -192,7 +192,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Translations // Translations
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "sendings", "deliveries")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "sendings", "deliveries"));
@ -953,4 +953,3 @@ class pdf_typhon extends ModelePDFDeliveryOrder
} }
} }

View File

@ -32,9 +32,9 @@ class mailing_example extends MailingTargets
var $desc='Put here a description'; var $desc='Put here a description';
// CHANGE THIS: Set to 1 if selector is available for admin users only // CHANGE THIS: Set to 1 if selector is available for admin users only
var $require_admin=0; var $require_admin=0;
// CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector // CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector
var $tooltip='MyTooltipLangKey'; var $tooltip='MyTooltipLangKey';
var $require_module=array(); var $require_module=array();
var $picto=''; var $picto='';
@ -148,4 +148,3 @@ class mailing_example extends MailingTargets
} }
} }

View File

@ -121,7 +121,7 @@ class mailing_pomme extends MailingTargets
$s.='<option value="1">'.$langs->trans("Enabled").'</option>'; $s.='<option value="1">'.$langs->trans("Enabled").'</option>';
$s.='<option value="0">'.$langs->trans("Disabled").'</option>'; $s.='<option value="0">'.$langs->trans("Disabled").'</option>';
$s.='</select>'; $s.='</select>';
$s.=' '; $s.=' ';
$s.=$langs->trans("Employee").': '; $s.=$langs->trans("Employee").': ';
$s.='<select name="filteremployee" class="flat">'; $s.='<select name="filteremployee" class="flat">';
@ -129,7 +129,7 @@ class mailing_pomme extends MailingTargets
$s.='<option value="1">'.$langs->trans("Yes").'</option>'; $s.='<option value="1">'.$langs->trans("Yes").'</option>';
$s.='<option value="0">'.$langs->trans("No").'</option>'; $s.='<option value="0">'.$langs->trans("No").'</option>';
$s.='</select>'; $s.='</select>';
return $s; return $s;
} }
@ -159,7 +159,7 @@ class mailing_pomme extends MailingTargets
if ($filtersarray) { if ($filtersarray) {
dol_syslog(__METHOD__ . ": filtersarray parameter is deprecated", LOG_WARNING); dol_syslog(__METHOD__ . ": filtersarray parameter is deprecated", LOG_WARNING);
} }
global $conf, $langs; global $conf, $langs;
$langs->load("companies"); $langs->load("companies");
@ -172,10 +172,10 @@ class mailing_pomme extends MailingTargets
$sql.= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test $sql.= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test
$sql.= " AND u.entity IN (0,".$conf->entity.")"; $sql.= " AND u.entity IN (0,".$conf->entity.")";
$sql.= " AND u.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; $sql.= " AND u.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
if (isset($_POST["filter"]) && $_POST["filter"] == '1') $sql.= " AND u.statut=1"; if (isset($_POST["filter"]) && $_POST["filter"] == '1') $sql.= " AND u.statut=1";
if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND u.statut=0"; if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND u.statut=0";
if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '1') $sql.= " AND u.employee=1"; if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '1') $sql.= " AND u.employee=1";
if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '0') $sql.= " AND u.employee=0"; if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '0') $sql.= " AND u.employee=0";
$sql.= " ORDER BY u.email"; $sql.= " ORDER BY u.email";
// Stocke destinataires dans cibles // Stocke destinataires dans cibles
@ -225,4 +225,3 @@ class mailing_pomme extends MailingTargets
} }
} }

View File

@ -77,7 +77,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
* @param int $y y position in user units * @param int $y y position in user units
* @param int $w width in user units * @param int $w width in user units
* @param int $h height in user units * @param int $h height in user units
* @return void * @return void
*/ */
private function writeBarcode(&$pdf, $code, $encoding, $is2d, $x, $y, $w, $h) private function writeBarcode(&$pdf, $code, $encoding, $is2d, $x, $y, $w, $h)
{ {

View File

@ -932,109 +932,109 @@ class doc_generic_project_odt extends ModelePDFProjects
'title' => "ListProposalsAssociatedProject", 'title' => "ListProposalsAssociatedProject",
'class' => 'Propal', 'class' => 'Propal',
'table' => 'propal', 'table' => 'propal',
'test' => $conf->propal->enabled && $user->rights->propale->lire 'test' => $conf->propal->enabled && $user->rights->propale->lire
), ),
'order' => array( 'order' => array(
'title' => "ListOrdersAssociatedProject", 'title' => "ListOrdersAssociatedProject",
'class' => 'Commande', 'class' => 'Commande',
'table' => 'commande', 'table' => 'commande',
'test' => $conf->commande->enabled && $user->rights->commande->lire 'test' => $conf->commande->enabled && $user->rights->commande->lire
), ),
'invoice' => array( 'invoice' => array(
'title' => "ListInvoicesAssociatedProject", 'title' => "ListInvoicesAssociatedProject",
'class' => 'Facture', 'class' => 'Facture',
'table' => 'facture', 'table' => 'facture',
'test' => $conf->facture->enabled && $user->rights->facture->lire 'test' => $conf->facture->enabled && $user->rights->facture->lire
), ),
'invoice_predefined' => array( 'invoice_predefined' => array(
'title' => "ListPredefinedInvoicesAssociatedProject", 'title' => "ListPredefinedInvoicesAssociatedProject",
'class' => 'FactureRec', 'class' => 'FactureRec',
'table' => 'facture_rec', 'table' => 'facture_rec',
'test' => $conf->facture->enabled && $user->rights->facture->lire 'test' => $conf->facture->enabled && $user->rights->facture->lire
), ),
'proposal_supplier' => array( 'proposal_supplier' => array(
'title' => "ListSupplierProposalsAssociatedProject", 'title' => "ListSupplierProposalsAssociatedProject",
'class' => 'SupplierProposal', 'class' => 'SupplierProposal',
'table' => 'supplier_proposal', 'table' => 'supplier_proposal',
'test' => $conf->supplier_proposal->enabled && $user->rights->supplier_proposal->lire 'test' => $conf->supplier_proposal->enabled && $user->rights->supplier_proposal->lire
), ),
'order_supplier' => array( 'order_supplier' => array(
'title' => "ListSupplierOrdersAssociatedProject", 'title' => "ListSupplierOrdersAssociatedProject",
'table' => 'commande_fournisseur', 'table' => 'commande_fournisseur',
'class' => 'CommandeFournisseur', 'class' => 'CommandeFournisseur',
'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire 'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire
), ),
'invoice_supplier' => array( 'invoice_supplier' => array(
'title' => "ListSupplierInvoicesAssociatedProject", 'title' => "ListSupplierInvoicesAssociatedProject",
'table' => 'facture_fourn', 'table' => 'facture_fourn',
'class' => 'FactureFournisseur', 'class' => 'FactureFournisseur',
'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire 'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire
), ),
'contract' => array( 'contract' => array(
'title' => "ListContractAssociatedProject", 'title' => "ListContractAssociatedProject",
'class' => 'Contrat', 'class' => 'Contrat',
'table' => 'contrat', 'table' => 'contrat',
'test' => $conf->contrat->enabled && $user->rights->contrat->lire 'test' => $conf->contrat->enabled && $user->rights->contrat->lire
), ),
'intervention' => array( 'intervention' => array(
'title' => "ListFichinterAssociatedProject", 'title' => "ListFichinterAssociatedProject",
'class' => 'Fichinter', 'class' => 'Fichinter',
'table' => 'fichinter', 'table' => 'fichinter',
'disableamount' => 1, 'disableamount' => 1,
'test' => $conf->ficheinter->enabled && $user->rights->ficheinter->lire 'test' => $conf->ficheinter->enabled && $user->rights->ficheinter->lire
), ),
'shipping' => array( 'shipping' => array(
'title' => "ListShippingAssociatedProject", 'title' => "ListShippingAssociatedProject",
'class' => 'Expedition', 'class' => 'Expedition',
'table' => 'expedition', 'table' => 'expedition',
'disableamount' => 1, 'disableamount' => 1,
'test' => $conf->expedition->enabled && $user->rights->expedition->lire 'test' => $conf->expedition->enabled && $user->rights->expedition->lire
), ),
'trip' => array( 'trip' => array(
'title' => "ListTripAssociatedProject", 'title' => "ListTripAssociatedProject",
'class' => 'Deplacement', 'class' => 'Deplacement',
'table' => 'deplacement', 'table' => 'deplacement',
'disableamount' => 1, 'disableamount' => 1,
'test' => $conf->deplacement->enabled && $user->rights->deplacement->lire 'test' => $conf->deplacement->enabled && $user->rights->deplacement->lire
), ),
'expensereport' => array( 'expensereport' => array(
'title' => "ListExpenseReportsAssociatedProject", 'title' => "ListExpenseReportsAssociatedProject",
'class' => 'ExpenseReportLine', 'class' => 'ExpenseReportLine',
'table' => 'expensereport_det', 'table' => 'expensereport_det',
'test' => $conf->expensereport->enabled && $user->rights->expensereport->lire 'test' => $conf->expensereport->enabled && $user->rights->expensereport->lire
), ),
'donation' => array( 'donation' => array(
'title' => "ListDonationsAssociatedProject", 'title' => "ListDonationsAssociatedProject",
'class' => 'Don', 'class' => 'Don',
'table' => 'don', 'table' => 'don',
'test' => $conf->don->enabled && $user->rights->don->lire 'test' => $conf->don->enabled && $user->rights->don->lire
), ),
'loan' => array( 'loan' => array(
'title' => "ListLoanAssociatedProject", 'title' => "ListLoanAssociatedProject",
'class' => 'Loan', 'class' => 'Loan',
'table' => 'loan', 'table' => 'loan',
'test' => $conf->loan->enabled && $user->rights->loan->read 'test' => $conf->loan->enabled && $user->rights->loan->read
), ),
'chargesociales' => array( 'chargesociales' => array(
'title' => "ListSocialContributionAssociatedProject", 'title' => "ListSocialContributionAssociatedProject",
'class' => 'ChargeSociales', 'class' => 'ChargeSociales',
'table' => 'chargesociales', 'table' => 'chargesociales',
'urlnew' => DOL_URL_ROOT . '/compta/sociales/card.php?action=create&projectid=' . $id, 'urlnew' => DOL_URL_ROOT . '/compta/sociales/card.php?action=create&projectid=' . $id,
'test' => $conf->tax->enabled && $user->rights->tax->charges->lire 'test' => $conf->tax->enabled && $user->rights->tax->charges->lire
), ),
'stock_mouvement' => array( 'stock_mouvement' => array(
'title' => "ListMouvementStockProject", 'title' => "ListMouvementStockProject",
'class' => 'MouvementStock', 'class' => 'MouvementStock',
'table' => 'stock_mouvement', 'table' => 'stock_mouvement',
'test' => ($conf->stock->enabled && $user->rights->stock->mouvement->lire && ! empty($conf->global->STOCK_MOVEMENT_INTO_PROJECT_OVERVIEW)) 'test' => ($conf->stock->enabled && $user->rights->stock->mouvement->lire && ! empty($conf->global->STOCK_MOVEMENT_INTO_PROJECT_OVERVIEW))
), ),
'agenda' => array( 'agenda' => array(
'title' => "ListActionsAssociatedProject", 'title' => "ListActionsAssociatedProject",
'class' => 'ActionComm', 'class' => 'ActionComm',
'table' => 'actioncomm', 'table' => 'actioncomm',
'disableamount' => 1, 'disableamount' => 1,
'test' => $conf->agenda->enabled && $user->rights->agenda->allactions->lire 'test' => $conf->agenda->enabled && $user->rights->agenda->allactions->lire
) )
); );
//Insert reference //Insert reference

View File

@ -42,69 +42,69 @@ class pdf_baleine extends ModelePDFProjects
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';
/** /**
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Societe * @var Societe
@ -119,7 +119,7 @@ class pdf_baleine extends ModelePDFProjects
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Translations // Translations
$langs->loadLangs(array("main", "projects", "companies")); $langs->loadLangs(array("main", "projects", "companies"));
@ -179,7 +179,7 @@ class pdf_baleine extends ModelePDFProjects
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects")); $outputlangs->loadLangs(array("main", "dict", "companies", "projects"));

View File

@ -64,7 +64,7 @@ class pdf_beluga extends ModelePDFProjects
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Translations // Translations
$langs->loadLangs(array("main", "projects", "companies")); $langs->loadLangs(array("main", "projects", "companies"));
@ -126,7 +126,7 @@ class pdf_beluga extends ModelePDFProjects
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects")); $outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
@ -253,7 +253,7 @@ class pdf_beluga extends ModelePDFProjects
$iniY = $tab_top + $heightoftitleline + 1; $iniY = $tab_top + $heightoftitleline + 1;
$curY = $tab_top + $heightoftitleline + 1; $curY = $tab_top + $heightoftitleline + 1;
$nexY = $tab_top + $heightoftitleline + 1; $nexY = $tab_top + $heightoftitleline + 1;
$listofreferent=array( $listofreferent=array(
'propal'=>array( 'propal'=>array(
'name'=>"Proposals", 'name'=>"Proposals",
@ -368,8 +368,8 @@ class pdf_beluga extends ModelePDFProjects
//var_dump("$key, $tablename, $datefieldname, $dates, $datee"); //var_dump("$key, $tablename, $datefieldname, $dates, $datee");
$elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee); $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee);
if ($key == 'agenda') if ($key == 'agenda')
{ {
// var_dump($elementarray); // var_dump($elementarray);
} }
@ -378,11 +378,11 @@ class pdf_beluga extends ModelePDFProjects
if ($num >= 0) if ($num >= 0)
{ {
$nexY = $pdf->GetY() + 5; $nexY = $pdf->GetY() + 5;
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0); $pdf->SetTextColor(0,0,0);
$pdf->SetXY($this->posxref, $curY); $pdf->SetXY($this->posxref, $curY);
$pdf->MultiCell($this->posxstatut - $this->posxref, 3, $outputlangs->transnoentities($title), 0, 'L'); $pdf->MultiCell($this->posxstatut - $this->posxref, 3, $outputlangs->transnoentities($title), 0, 'L');
@ -418,7 +418,7 @@ class pdf_beluga extends ModelePDFProjects
$num = count($elementarray); $num = count($elementarray);
// Loop on each lines // Loop on each lines
for ($i = 0; $i < $num; $i ++) for ($i = 0; $i < $num; $i ++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
@ -496,10 +496,10 @@ class pdf_beluga extends ModelePDFProjects
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
$pdf->MultiCell(0, 3, ''); // Set interline to 3 $pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0,0,0); $pdf->SetTextColor(0,0,0);
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
$curY = $tab_top_newpage + $heightoftitleline + 1; $curY = $tab_top_newpage + $heightoftitleline + 1;
// Label // Label
$pdf->SetXY($this->posxref, $curY); $pdf->SetXY($this->posxref, $curY);
$posybefore=$pdf->GetY(); $posybefore=$pdf->GetY();
@ -557,7 +557,7 @@ class pdf_beluga extends ModelePDFProjects
{ {
$pdf->MultiCell($this->posxamountht - $this->posxsociety, 3, (is_object($element->thirdparty)?$element->thirdparty->name:''), 1, 'L'); $pdf->MultiCell($this->posxamountht - $this->posxsociety, 3, (is_object($element->thirdparty)?$element->thirdparty->name:''), 1, 'L');
} }
// Amount without tax // Amount without tax
if (empty($value['disableamount'])) { if (empty($value['disableamount'])) {
$pdf->SetXY($this->posxamountht, $curY); $pdf->SetXY($this->posxamountht, $curY);
@ -610,7 +610,7 @@ class pdf_beluga extends ModelePDFProjects
$curY = $nexY; $curY = $nexY;
} }
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Passe espace entre les lignes
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
@ -775,7 +775,7 @@ class pdf_beluga extends ModelePDFProjects
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : " . $object->thirdparty->getFullName($outputlangs), '', 'R'); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : " . $object->thirdparty->getFullName($outputlangs), '', 'R');
} }
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
} }

View File

@ -44,79 +44,79 @@ class pdf_azur extends ModelePDFPropales
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string Save the name of generated file as the main doc when generating a doc with this template * @var string Save the name of generated file as the main doc when generating a doc with this template
*/ */
public $update_main_doc_field; public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';
/** /**
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Objet societe qui emet * @var Objet societe qui emet
*/ */
public $emetteur; public $emetteur;
/** /**
@ -127,7 +127,7 @@ class pdf_azur extends ModelePDFPropales
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Translations // Translations
$langs->loadLangs(array("main", "bills")); $langs->loadLangs(array("main", "bills"));
@ -219,7 +219,7 @@ class pdf_azur extends ModelePDFPropales
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products"));
@ -1432,7 +1432,7 @@ class pdf_azur extends ModelePDFPropales
function _pagehead(&$pdf, $object, $showaddress, $outputlangs) function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {
global $conf,$langs; global $conf,$langs;
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "propal", "companies", "bills")); $outputlangs->loadLangs(array("main", "propal", "companies", "bills"));
@ -1691,4 +1691,3 @@ class pdf_azur extends ModelePDFPropales
return ($tab_hl*7); return ($tab_hl*7);
} }
} }

View File

@ -87,7 +87,7 @@ class pdf_standard extends ModelePDFStock
public function __construct($db) public function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Load traductions files requiredby by page // Load traductions files requiredby by page
$langs->loadLangs(array("main", "companies")); $langs->loadLangs(array("main", "companies"));
@ -114,12 +114,12 @@ class pdf_standard extends ModelePDFStock
// Recupere emetteur // Recupere emetteur
$this->emetteur=$mysoc; $this->emetteur=$mysoc;
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
// Define position of columns // Define position of columns
$this->wref = 15; $this->wref = 15;
$this->posxdesc=$this->marge_gauche+1; $this->posxdesc=$this->marge_gauche+1;
$this->posxlabel=$this->posxdesc+$this->wref; $this->posxlabel=$this->posxdesc+$this->wref;
$this->posxtva=80; $this->posxtva=80;
$this->posxqty=95; $this->posxqty=95;
$this->posxup=115; $this->posxup=115;
$this->posxunit=135; $this->posxunit=135;
@ -164,7 +164,7 @@ class pdf_standard extends ModelePDFStock
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
@ -188,7 +188,7 @@ class pdf_standard extends ModelePDFStock
$stockFournisseur = new ProductFournisseur($this->db); $stockFournisseur = new ProductFournisseur($this->db);
$supplierprices = $stockFournisseur->list_product_fournisseur_price($object->id); $supplierprices = $stockFournisseur->list_product_fournisseur_price($object->id);
$object->supplierprices = $supplierprices; $object->supplierprices = $supplierprices;
$productstatic=new Product($db); $productstatic=new Product($db);
if (! file_exists($dir)) if (! file_exists($dir))
@ -268,8 +268,8 @@ class pdf_standard extends ModelePDFStock
/* Affichage de la liste des produits de l'entrepot */ /* Affichage de la liste des produits de l'entrepot */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
$nexY+=5; $nexY+=5;
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
$nexY+=10; $nexY+=10;
@ -311,7 +311,7 @@ class pdf_standard extends ModelePDFStock
if ($objtp->label != '') $objp->produit = $objtp->label; if ($objtp->label != '') $objp->produit = $objtp->label;
} }
} }
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0); $pdf->SetTextColor(0,0,0);
@ -319,7 +319,7 @@ class pdf_standard extends ModelePDFStock
$pdf->setTopMargin($tab_top_newpage); $pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage(); $pageposbefore=$pdf->getPage();
// Description of product line // Description of product line
$curX = $this->posxdesc-1; $curX = $this->posxdesc-1;
@ -372,13 +372,13 @@ class pdf_standard extends ModelePDFStock
} }
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
$productstatic->id=$objp->rowid; $productstatic->id=$objp->rowid;
$productstatic->ref = $objp->ref; $productstatic->ref = $objp->ref;
$productstatic->label = $objp->produit; $productstatic->label = $objp->produit;
$productstatic->type=$objp->type; $productstatic->type=$objp->type;
$productstatic->entity=$objp->entity; $productstatic->entity=$objp->entity;
$productstatic->status_batch=$objp->tobatch; $productstatic->status_batch=$objp->tobatch;
// Ref. // Ref.
$pdf->SetXY($this->posxdesc, $curY); $pdf->SetXY($this->posxdesc, $curY);
@ -391,12 +391,12 @@ class pdf_standard extends ModelePDFStock
// Quantity // Quantity
$valtoshow=price2num($objp->value, 'MS'); $valtoshow=price2num($objp->value, 'MS');
$towrite = (empty($valtoshow)?'0':$valtoshow); $towrite = (empty($valtoshow)?'0':$valtoshow);
$pdf->SetXY($this->posxqty, $curY); $pdf->SetXY($this->posxqty, $curY);
$pdf->MultiCell($this->posxup-$this->posxqty-0.8, 3, $towrite, 0, 'R'); $pdf->MultiCell($this->posxup-$this->posxqty-0.8, 3, $towrite, 0, 'R');
$totalunit+=$objp->value; $totalunit+=$objp->value;
$pdf->SetXY($this->posxup, $curY); $pdf->SetXY($this->posxup, $curY);
$pdf->MultiCell($this->posxunit-$this->posxup-0.8, 3, price(price2num($objp->ppmp,'MU'), 0, $outputlangs), 0, 'R'); $pdf->MultiCell($this->posxunit-$this->posxup-0.8, 3, price(price2num($objp->ppmp,'MU'), 0, $outputlangs), 0, 'R');
@ -429,7 +429,7 @@ class pdf_standard extends ModelePDFStock
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Passe espace entre les lignes
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)
{ {
@ -466,20 +466,20 @@ class pdf_standard extends ModelePDFStock
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
} }
} }
$db->free($resql); $db->free($resql);
/** /**
* footer table * footer table
*/ */
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
$nexY+=2; $nexY+=2;
$curY = $nexY; $curY = $nexY;
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
$pdf->line($this->marge_gauche, $curY-1, $this->page_largeur-$this->marge_droite, $curY-1); $pdf->line($this->marge_gauche, $curY-1, $this->page_largeur-$this->marge_droite, $curY-1);
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
$pdf->SetFont('','B',$default_font_size-1); $pdf->SetFont('','B',$default_font_size-1);
$pdf->SetTextColor(0,0,120); $pdf->SetTextColor(0,0,120);
@ -487,7 +487,7 @@ class pdf_standard extends ModelePDFStock
$pdf->SetXY($this->posxdesc, $curY); $pdf->SetXY($this->posxdesc, $curY);
$pdf->MultiCell($this->wref, 3, $langs->trans("Total"), 0, 'L'); $pdf->MultiCell($this->wref, 3, $langs->trans("Total"), 0, 'L');
// Quantity // Quantity
$valtoshow=price2num($totalunit, 'MS'); $valtoshow=price2num($totalunit, 'MS');
$towrite = empty($valtoshow)?'0':$valtoshow; $towrite = empty($valtoshow)?'0':$valtoshow;
@ -736,8 +736,8 @@ class pdf_standard extends ModelePDFStock
} }
} }
*/ */
$tab_top = $tab_top_newpage+21; $tab_top = $tab_top_newpage+21;
// Show square // Show square
if ($pagenb == 1) if ($pagenb == 1)
{ {
@ -749,7 +749,7 @@ class pdf_standard extends ModelePDFStock
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code); $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
} }
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
// Affiche zone infos // Affiche zone infos
@ -836,21 +836,21 @@ class pdf_standard extends ModelePDFStock
// Output Rect // Output Rect
//$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
$pdf->SetDrawColor(220,26,26); $pdf->SetDrawColor(220,26,26);
$pdf->line($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_droite, $tab_top); $pdf->line($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_droite, $tab_top);
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
$pdf->SetDrawColor(128,128,128); $pdf->SetDrawColor(128,128,128);
$pdf->SetTextColor(0,0,120); $pdf->SetTextColor(0,0,120);
if (empty($hidetop)) if (empty($hidetop))
{ {
//$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param //$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param
$pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->SetXY($this->posxdesc-1, $tab_top+1);
$pdf->MultiCell($this->wref,3, $outputlangs->transnoentities("Ref"),'','L'); $pdf->MultiCell($this->wref,3, $outputlangs->transnoentities("Ref"),'','L');
} }
//$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height); //$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height);
if (empty($hidetop)) if (empty($hidetop))
{ {
@ -860,7 +860,7 @@ class pdf_standard extends ModelePDFStock
//$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); //$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
if (empty($hidetop)) if (empty($hidetop))
{ {
$pdf->SetXY($this->posxqty-1, $tab_top+1); $pdf->SetXY($this->posxqty-1, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxqty-1,2, $outputlangs->transnoentities("Units"),'','C'); $pdf->MultiCell($this->posxup-$this->posxqty-1,2, $outputlangs->transnoentities("Units"),'','C');
} }
@ -873,7 +873,7 @@ class pdf_standard extends ModelePDFStock
} }
//$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); //$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) if (empty($hidetop))
{ {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1); $pdf->SetXY($this->posxunit - 1, $tab_top + 1);
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '',
@ -887,18 +887,18 @@ class pdf_standard extends ModelePDFStock
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("SellPriceMin"),'','C'); $pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("SellPriceMin"),'','C');
} }
//$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); //$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
if (empty($hidetop)) if (empty($hidetop))
{ {
$pdf->SetXY($this->postotalht-1, $tab_top+1); $pdf->SetXY($this->postotalht-1, $tab_top+1);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht,2, $outputlangs->transnoentities("EstimatedStockValueSellShort"),'','C'); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht,2, $outputlangs->transnoentities("EstimatedStockValueSellShort"),'','C');
} }
$pdf->SetDrawColor(220,26,26); $pdf->SetDrawColor(220,26,26);
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
$pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11); $pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11);
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
/** /**
@ -914,7 +914,7 @@ class pdf_standard extends ModelePDFStock
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="") function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
{ {
global $conf,$langs,$db,$hookmanager; global $conf,$langs,$db,$hookmanager;
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks")); $outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
@ -961,7 +961,7 @@ class pdf_standard extends ModelePDFStock
$text=$this->emetteur->name; $text=$this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
} }
$pdf->SetFont('','B', $default_font_size + 3); $pdf->SetFont('','B', $default_font_size + 3);
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
@ -981,22 +981,22 @@ class pdf_standard extends ModelePDFStock
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("LocationSummary").' :', '', 'R'); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("LocationSummary").' :', '', 'R');
$posy+=4; $posy+=4;
$pdf->SetXY($posx-50,$posy); $pdf->SetXY($posx-50,$posy);
$pdf->MultiCell(150, 3, $object->lieu, '', 'R'); $pdf->MultiCell(150, 3, $object->lieu, '', 'R');
// Parent entrepot // Parent entrepot
$posy+=4; $posy+=4;
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60); $pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ParentWarehouse").' :', '', 'R'); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ParentWarehouse").' :', '', 'R');
$posy+=4; $posy+=4;
$pdf->SetXY($posx-50,$posy); $pdf->SetXY($posx-50,$posy);
$e = new Entrepot($db); $e = new Entrepot($db);
if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0)
{ {
$pdf->MultiCell(150, 3, $e->libelle, '', 'R'); $pdf->MultiCell(150, 3, $e->libelle, '', 'R');
} }
@ -1004,14 +1004,14 @@ class pdf_standard extends ModelePDFStock
{ {
$pdf->MultiCell(150, 3, $outputlangs->transnoentities("None"), '', 'R'); $pdf->MultiCell(150, 3, $outputlangs->transnoentities("None"), '', 'R');
} }
// Description // Description
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
$nexY+=5; $nexY+=5;
$pdf->SetXY($posx,$posy); $pdf->SetXY($posx,$posy);
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("Description").' : </b>'.nl2br($object->description), 0, 1); $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("Description").' : </b>'.nl2br($object->description), 0, 1);
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
$calcproductsunique=$object->nb_different_products(); $calcproductsunique=$object->nb_different_products();
$calcproducts=$object->nb_products(); $calcproducts=$object->nb_products();
@ -1023,12 +1023,12 @@ class pdf_standard extends ModelePDFStock
$valtoshow=price2num($calcproducts['nb'], 'MS'); $valtoshow=price2num($calcproducts['nb'], 'MS');
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("NumberOfProducts").' : </b>'.(empty($valtoshow)?'0':$valtoshow), 0, 1); $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("NumberOfProducts").' : </b>'.(empty($valtoshow)?'0':$valtoshow), 0, 1);
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
// Value // Value
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("EstimatedStockValueShort").' : </b>'. price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency), 0, 1); $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("EstimatedStockValueShort").' : </b>'. price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency), 0, 1);
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
// Last movement // Last movement
$sql = "SELECT max(m.datem) as datem"; $sql = "SELECT max(m.datem) as datem";
$sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m";
@ -1056,7 +1056,7 @@ class pdf_standard extends ModelePDFStock
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("LastMovement").' : </b>'.$toWrite, 0, 1); $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, '<b>'.$outputlangs->transnoentities("LastMovement").' : </b>'.$toWrite, 0, 1);
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
/*if ($object->ref_client) /*if ($object->ref_client)
{ {
$posy+=5; $posy+=5;
@ -1147,4 +1147,3 @@ class pdf_standard extends ModelePDFStock
} }
} }

View File

@ -40,75 +40,75 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
public $type; public $type;
/** /**
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';
/** /**
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Objet societe qui emet * @var Objet societe qui emet
*/ */
public $emetteur; public $emetteur;
/** /**
@ -1249,4 +1249,3 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
} }
} }

View File

@ -42,17 +42,17 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
@ -62,54 +62,54 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
*/ */
public $version = 'dolibarr'; public $version = 'dolibarr';
/** /**
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
public $marge_basse; public $marge_basse;
/** /**
* Issuer * Issuer
* @var Societe * @var Societe
*/ */
public $emetteur; public $emetteur;
/** /**
@ -120,7 +120,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
function __construct($db) function __construct($db)
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
// Translations // Translations
$langs->loadLangs(array("main", "bills")); $langs->loadLangs(array("main", "bills"));
@ -814,4 +814,3 @@ class pdf_standard extends ModelePDFSuppliersPayments
} }
} }

View File

@ -42,17 +42,17 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @var DoliDb Database handler * @var DoliDb Database handler
*/ */
public $db; public $db;
/** /**
* @var string model name * @var string model name
*/ */
public $name; public $name;
/** /**
* @var string model description (short text) * @var string model description (short text)
*/ */
public $description; public $description;
/** /**
* @var string document type * @var string document type
*/ */
@ -62,8 +62,8 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @var array() Minimum version of PHP required by module. * @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.4 = array(5, 4)
*/ */
public $phpmin = array(5, 4); public $phpmin = array(5, 4);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
* @public string * @public string
@ -74,32 +74,32 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @var int page_largeur * @var int page_largeur
*/ */
public $page_largeur; public $page_largeur;
/** /**
* @var int page_hauteur * @var int page_hauteur
*/ */
public $page_hauteur; public $page_hauteur;
/** /**
* @var array format * @var array format
*/ */
public $format; public $format;
/** /**
* @var int marge_gauche * @var int marge_gauche
*/ */
public $marge_gauche; public $marge_gauche;
/** /**
* @var int marge_droite * @var int marge_droite
*/ */
public $marge_droite; public $marge_droite;
/** /**
* @var int marge_haute * @var int marge_haute
*/ */
public $marge_haute; public $marge_haute;
/** /**
* @var int marge_basse * @var int marge_basse
*/ */
@ -120,7 +120,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
public function __construct($db) public function __construct($db)
{ {
global $conf, $langs, $mysoc; global $conf, $langs, $mysoc;
// Translations // Translations
$langs->loadLangs(array("main", "bills")); $langs->loadLangs(array("main", "bills"));
@ -160,7 +160,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->posxdesc=$this->marge_gauche+1; $this->posxdesc=$this->marge_gauche+1;
$this->posxdiscount=162; $this->posxdiscount=162;
$this->postotalht=174; $this->postotalht=174;
if ($conf->global->PRODUCT_USE_UNITS) if ($conf->global->PRODUCT_USE_UNITS)
{ {
$this->posxtva=101; $this->posxtva=101;
@ -172,7 +172,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->posxup=126; $this->posxup=126;
$this->posxqty=145; $this->posxqty=145;
} }
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxup=$this->posxtva; if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxup=$this->posxtva;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images $this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
if ($this->page_largeur < 210) // To work with US executive format if ($this->page_largeur < 210) // To work with US executive format
@ -211,7 +211,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
// Translations // Translations
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal"));
@ -524,7 +524,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
{ {
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R'); $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R');
} }
// Unit // Unit
if($conf->global->PRODUCT_USE_UNITS) if($conf->global->PRODUCT_USE_UNITS)
{ {
@ -1232,7 +1232,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
} }
} }
if($conf->global->PRODUCT_USE_UNITS) { if($conf->global->PRODUCT_USE_UNITS) {
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) { if (empty($hidetop)) {
@ -1274,7 +1274,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
function _pagehead(&$pdf, $object, $showaddress, $outputlangs) function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {
global $conf,$langs; global $conf,$langs;
// Translations // Translations
$outputlangs->loadLangs(array("main", "bills", "supplier_proposal", "companies")); $outputlangs->loadLangs(array("main", "bills", "supplier_proposal", "companies"));
@ -1496,4 +1496,3 @@ class pdf_aurore extends ModelePDFSupplierProposal
} }
} }

View File

@ -126,8 +126,8 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
if (is_object($langs)) // $langs may not be defined yet. if (is_object($langs)) // $langs may not be defined yet.
{ {
$errors[] = $langs->trans("ErrorFailedToOpenFile", self::$firephp_class_path); $errors[] = $langs->trans("ErrorFailedToOpenFile", self::$firephp_class_path);
} }
else else
{ {
$errors[] = "ErrorFailedToOpenFile " . self::$firephp_class_path; $errors[] = "ErrorFailedToOpenFile " . self::$firephp_class_path;
} }

View File

@ -1,6 +1,6 @@
<?php <?php
/* /*
* To change this license header, choose License Headers in Project Properties. * To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates * To change this template file, choose Tools | Templates
* and open the template in the editor. * and open the template in the editor.
@ -36,8 +36,8 @@ print '<script type="text/javascript" language="javascript">
}); });
}); });
</script>'; </script>';
print_fiche_titre($langs->trans("AdvTgtTitle")); print_fiche_titre($langs->trans("AdvTgtTitle"));
print '<div class="tabBar">' . "\n"; print '<div class="tabBar">' . "\n";

View File

@ -155,12 +155,9 @@ class InterfaceTicketEmail extends DolibarrTriggers
} }
include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, '', '', 0, -1); $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, '', '', 0, -1);
if ($mailfile->error) if ($mailfile->error) {
{
setEventMessages($mailfile->error, $mailfile->errors, 'errors'); setEventMessages($mailfile->error, $mailfile->errors, 'errors');
} } else {
else
{
$result = $mailfile->sendfile(); $result = $mailfile->sendfile();
} }
if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) { if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) {

View File

@ -36,7 +36,7 @@ $total=0; $ilink=0;
foreach($linkedObjectBlock as $key => $objectlink) foreach($linkedObjectBlock as $key => $objectlink)
{ {
$ilink++; $ilink++;
$trclass='oddeven'; $trclass='oddeven';
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
?> ?>
@ -66,7 +66,7 @@ if (count($linkedObjectBlock) > 1)
<td align="right"></td> <td align="right"></td>
<td align="right"></td> <td align="right"></td>
</tr> </tr>
<?php <?php
} }
?> ?>

View File

@ -101,7 +101,7 @@ if ($action == 'add') {
$action = "create"; $action = "create";
$error++; $error++;
} }
if (! GETPOST('socid')) { if (! GETPOST('socid')) {
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Customer")), null, 'errors'); setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Customer")), null, 'errors');
$action = "create"; $action = "create";
@ -144,7 +144,7 @@ if ($action == 'add') {
$date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear); $date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear);
$object->date_when = $date_next_execution; $object->date_when = $date_next_execution;
if ($object->create($user) > 0) { if ($object->create($user) > 0) {
$id = $object->id; $id = $object->id;
$action = ''; $action = '';
@ -155,10 +155,10 @@ if ($action == 'add') {
} }
} elseif ($action == 'createfrommodel') { } elseif ($action == 'createfrommodel') {
$newinter = new fichinter($db); $newinter = new fichinter($db);
// on récupère les enregistrements // on récupère les enregistrements
$object->fetch($id); $object->fetch($id);
// on transfert les données de l'un vers l'autre // on transfert les données de l'un vers l'autre
if ($object->socid > 0) { if ($object->socid > 0) {
@ -167,14 +167,14 @@ if ($action == 'add') {
$newinter->fk_contrat=$object->fk_contrat; $newinter->fk_contrat=$object->fk_contrat;
} else } else
$newinter->socid=GETPOST("socid"); $newinter->socid=GETPOST("socid");
$newinter->entity=$object->entity; $newinter->entity=$object->entity;
$newinter->duree=$object->duree; $newinter->duree=$object->duree;
$newinter->description=$object->description; $newinter->description=$object->description;
$newinter->note_private=$object->note_private; $newinter->note_private=$object->note_private;
$newinter->note_public=$object->note_public; $newinter->note_public=$object->note_public;
// on créer un nouvelle intervention // on créer un nouvelle intervention
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label($newinter->table_element); $extralabels = $extrafields->fetch_name_optionals_label($newinter->table_element);
@ -182,7 +182,7 @@ if ($action == 'add') {
$newinter->array_options = $array_options; $newinter->array_options = $array_options;
$newfichinterid = $newinter->create($user); $newfichinterid = $newinter->create($user);
if ($newfichinterid > 0) { if ($newfichinterid > 0) {
// on ajoute les lignes de détail ensuite // on ajoute les lignes de détail ensuite
foreach ($object->lines as $ficheinterligne) foreach ($object->lines as $ficheinterligne)
@ -205,14 +205,14 @@ if ($action == 'add') {
header('Location: '.$_SERVER["PHP_SELF"]); header('Location: '.$_SERVER["PHP_SELF"]);
exit; exit;
} elseif ($action == 'setfrequency' && $user->rights->ficheinter->creer) { } elseif ($action == 'setfrequency' && $user->rights->ficheinter->creer) {
// Set frequency and unit frequency // Set frequency and unit frequency
$object->fetch($id); $object->fetch($id);
$object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha')); $object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha'));
} elseif ($action == 'setdate_when' && $user->rights->ficheinter->creer) { } elseif ($action == 'setdate_when' && $user->rights->ficheinter->creer) {
// Set next date of execution // Set next date of execution
$object->fetch($id); $object->fetch($id);
$date = dol_mktime( $date = dol_mktime(
GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0, GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0,
GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear') GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear')
); );
if (!empty($date)) $object->setNextDate($date); if (!empty($date)) $object->setNextDate($date);
@ -239,7 +239,7 @@ if (! empty($conf->projet->enabled))
$now = dol_now(); $now = dol_now();
$tmparray=dol_getdate($now); $tmparray=dol_getdate($now);
$today = dol_mktime( $today = dol_mktime(
23, 59, 59, 23, 59, 59,
$tmparray['mon'], $tmparray['mday'], $tmparray['year'] $tmparray['mon'], $tmparray['mday'], $tmparray['year']
); // Today is last second of current day ); // Today is last second of current day
@ -265,7 +265,7 @@ if ($action == 'create') {
$rowspan=4; $rowspan=4;
if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++; if (! empty($conf->projet->enabled) && $object->fk_project > 0) $rowspan++;
if (! empty($conf->contrat->enabled) && $object->fk_contrat > 0) $rowspan++; if (! empty($conf->contrat->enabled) && $object->fk_contrat > 0) $rowspan++;
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
$object->fetch_thirdparty(); $object->fetch_thirdparty();
@ -297,12 +297,12 @@ if ($action == 'create') {
// Duration // Duration
print '<tr><td>'.$langs->trans("TotalDuration").'</td>'; print '<tr><td>'.$langs->trans("TotalDuration").'</td>';
print '<td colspan="3">'.convertSecondToTime( print '<td colspan="3">'.convertSecondToTime(
$object->duration, 'all', $object->duration, 'all',
$conf->global->MAIN_DURATION_OF_WORKDAY $conf->global->MAIN_DURATION_OF_WORKDAY
).'</td>'; ).'</td>';
print '</tr>'; print '</tr>';
} }
// Project // Project
if (! empty($conf->projet->enabled)) { if (! empty($conf->projet->enabled)) {
$formproject = new FormProjets($db); $formproject = new FormProjets($db);
@ -345,7 +345,7 @@ if ($action == 'create') {
print "</td><td>"; print "</td><td>";
print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='4' />&nbsp;"; print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='4' />&nbsp;";
print $form->selectarray( print $form->selectarray(
'unit_frequency', 'unit_frequency',
array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')),
(GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m') (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')
); );
@ -423,7 +423,7 @@ if ($action == 'create') {
} }
$db->free($result); $db->free($result);
} else } else
print $db->error(); print $db->error();
print "</table>"; print "</table>";
@ -465,7 +465,7 @@ if ($action == 'create') {
} else { } else {
/* /*
* View mode * View mode
* *
*/ */
if ($id > 0) { if ($id > 0) {
if ($object->fetch($id) > 0) { if ($object->fetch($id) > 0) {
@ -496,7 +496,7 @@ if ($action == 'create') {
$morehtmlref.=img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; $morehtmlref.=img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : ';
} }
if ($action == 'classify') { if ($action == 'classify') {
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
$morehtmlref.='<input type="hidden" name="action" value="classin">'; $morehtmlref.='<input type="hidden" name="action" value="classin">';
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; $morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -511,7 +511,7 @@ if ($action == 'create') {
$object->socid, $object->fk_project, $object->socid, $object->fk_project,
'none', 0, 0, 0, 1 'none', 0, 0, 0, 1
); );
} }
} else { } else {
if (! empty($object->fk_project)) { if (! empty($object->fk_project)) {
$proj = new Project($db); $proj = new Project($db);
@ -566,7 +566,7 @@ if ($action == 'create') {
if ($action == 'contrat') { if ($action == 'contrat') {
$formcontract= new Formcontract($db); $formcontract= new Formcontract($db);
$formcontract->formSelectContract( $formcontract->formSelectContract(
$_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid,
$object->fk_contrat, 'contratid', 0, 1 $object->fk_contrat, 'contratid', 0, 1
); );
} else { } else {
@ -593,9 +593,9 @@ if ($action == 'create') {
$title = $langs->trans("Recurrence"); $title = $langs->trans("Recurrence");
print load_fiche_titre($title, '', 'calendar'); print load_fiche_titre($title, '', 'calendar');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// if "frequency" is empty or = 0, the reccurence is disabled // if "frequency" is empty or = 0, the reccurence is disabled
print '<tr><td style="width: 50%">'; print '<tr><td style="width: 50%">';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
@ -615,26 +615,26 @@ if ($action == 'create') {
print '<tr><td>'; print '<tr><td>';
print "<input type='text' name='frequency' value='".$object->frequency."' size='5' />&nbsp;"; print "<input type='text' name='frequency' value='".$object->frequency."' size='5' />&nbsp;";
print $form->selectarray( print $form->selectarray(
'unit_frequency', 'unit_frequency',
array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')),
($object->unit_frequency?$object->unit_frequency:'m') ($object->unit_frequency?$object->unit_frequency:'m')
); );
print '</td>'; print '</td>';
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr></table></form>'; print '</tr></table></form>';
} else { } else {
if ($object->frequency > 0) if ($object->frequency > 0)
print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency); print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency);
else else
print $langs->trans("NotARecurringInterventionalTemplate"); print $langs->trans("NotARecurringInterventionalTemplate");
} }
print '</td></tr>'; print '</td></tr>';
// Date when // Date when
print '<tr><td>'; print '<tr><td>';
if ( $user->rights->ficheinter->creer && ($action == 'date_when' || $object->frequency > 0)) { if ( $user->rights->ficheinter->creer && ($action == 'date_when' || $object->frequency > 0)) {
print $form->editfieldkey( print $form->editfieldkey(
$langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $langs->trans("NextDateToExecution"), 'date_when', $object->date_when,
$object, $user->rights->facture->creer, 'day' $object, $user->rights->facture->creer, 'day'
); );
} else { } else {
@ -649,12 +649,12 @@ if ($action == 'create') {
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Max period / Rest period // Max period / Rest period
print '<tr><td>'; print '<tr><td>';
if ($user->rights->ficheinter->creer && ($action == 'nb_gen_max' || $object->frequency > 0)) { if ($user->rights->ficheinter->creer && ($action == 'nb_gen_max' || $object->frequency > 0)) {
print $form->editfieldkey( print $form->editfieldkey(
$langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max,
$object, $user->rights->facture->creer $object, $user->rights->facture->creer
); );
} else } else
@ -672,29 +672,29 @@ if ($action == 'create') {
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';
// Frequencry/Recurring section // Frequencry/Recurring section
if ($object->frequency > 0) { if ($object->frequency > 0) {
print '<br>'; print '<br>';
if (empty($conf->cron->enabled)) { if (empty($conf->cron->enabled)) {
$txtinfoadmin=$langs->trans( $txtinfoadmin=$langs->trans(
"EnableAndSetupModuleCron", "EnableAndSetupModuleCron",
$langs->transnoentitiesnoconv("Module2300Name") $langs->transnoentitiesnoconv("Module2300Name")
); );
print info_admin($txtinfoadmin); print info_admin($txtinfoadmin);
} }
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">'; print '<table class="border centpercent">';
// Nb of generation already done // Nb of generation already done
print '<tr><td style="width: 50%">'.$langs->trans("NbOfGenerationDone").'</td>'; print '<tr><td style="width: 50%">'.$langs->trans("NbOfGenerationDone").'</td>';
print '<td>'; print '<td>';
print $object->nb_gen_done?$object->nb_gen_done:'0'; print $object->nb_gen_done?$object->nb_gen_done:'0';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Date last // Date last
print '<tr><td>'; print '<tr><td>';
print $langs->trans("DateLastGeneration"); print $langs->trans("DateLastGeneration");
@ -733,7 +733,7 @@ if ($action == 'create') {
$num = count($object->lines); $num = count($object->lines);
$i = 0; $i = 0;
while ($i < $num) { while ($i < $num) {
// Show product and description // Show product and description
if (isset($object->lines[$i]->product_type)) if (isset($object->lines[$i]->product_type))
$type=$object->lines[$i]->product_type; $type=$object->lines[$i]->product_type;
@ -785,7 +785,7 @@ if ($action == 'create') {
$sql = "SELECT f.rowid as fich_rec, s.nom as name, s.rowid as socid, f.rowid as facid, f.titre, "; $sql = "SELECT f.rowid as fich_rec, s.nom as name, s.rowid as socid, f.rowid as facid, f.titre, ";
$sql.= " f.duree, f.fk_contrat, f.fk_projet, f.frequency, f.nb_gen_done, f.nb_gen_max,"; $sql.= " f.duree, f.fk_contrat, f.fk_projet, f.frequency, f.nb_gen_done, f.nb_gen_max,";
$sql.= " f.date_last_gen, f.date_when, f.datec"; $sql.= " f.date_last_gen, f.date_when, f.datec";
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter_rec as f"; $sql.= " FROM ".MAIN_DB_PREFIX."fichinter_rec as f";
$sql.= " , ".MAIN_DB_PREFIX."societe as s "; $sql.= " , ".MAIN_DB_PREFIX."societe as s ";
if (! $user->rights->societe->client->voir && ! $socid) { if (! $user->rights->societe->client->voir && ! $socid) {
@ -810,7 +810,7 @@ if ($action == 'create') {
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
print_barre_liste( print_barre_liste(
$langs->trans("RepeatableInterventional"), $page, $langs->trans("RepeatableInterventional"), $page,
$_SERVER['PHP_SELF'], "&socid=$socid", $sortfield, $sortorder, $_SERVER['PHP_SELF'], "&socid=$socid", $sortfield, $sortorder,
'', $num, '', 'title_commercial.png' '', $num, '', 'title_commercial.png'
); );
@ -821,12 +821,12 @@ if ($action == 'create') {
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre( print_liste_field_titre(
$langs->trans("Ref"), $_SERVER['PHP_SELF'], "f.titre", "", "", $langs->trans("Ref"), $_SERVER['PHP_SELF'], "f.titre", "", "",
'width="200px" align="left"', $sortfiled, $sortorder 'width="200px" align="left"', $sortfiled, $sortorder
); );
print_liste_field_titre( print_liste_field_titre(
$langs->trans("Company"), $_SERVER['PHP_SELF'], "s.nom", "", "", $langs->trans("Company"), $_SERVER['PHP_SELF'], "s.nom", "", "",
'width="200px" align="left"', $sortfiled, $sortorder 'width="200px" align="left"', $sortfiled, $sortorder
); );
if (! empty($conf->contrat->enabled)) if (! empty($conf->contrat->enabled))
@ -844,7 +844,7 @@ if ($action == 'create') {
); );
print_liste_field_titre( print_liste_field_titre(
$langs->trans("Duration"), $_SERVER['PHP_SELF'], $langs->trans("Duration"), $_SERVER['PHP_SELF'],
'f.duree', '', '', 'f.duree', '', '',
'width="50px" align="right"', $sortfiled, $sortorder 'width="50px" align="right"', $sortfiled, $sortorder
); );
// Recurring or not // Recurring or not
@ -910,7 +910,7 @@ if ($action == 'create') {
print '<td align=right>'.convertSecondToTime($objp->duree).'</td>'; print '<td align=right>'.convertSecondToTime($objp->duree).'</td>';
print '<td align="center">'.yn($objp->frequency?1:0).'</td>'; print '<td align="center">'.yn($objp->frequency?1:0).'</td>';
print '<td align="center">'; print '<td align="center">';
if ($objp->frequency) { if ($objp->frequency) {
print $objp->nb_gen_done.($objp->nb_gen_max>0?' / '. $objp->nb_gen_max:'') ; print $objp->nb_gen_done.($objp->nb_gen_max>0?' / '. $objp->nb_gen_max:'') ;
@ -933,7 +933,7 @@ if ($action == 'create') {
print '<span class="opacitymedium">'.$langs->trans('NA').'</span>'; print '<span class="opacitymedium">'.$langs->trans('NA').'</span>';
print '</td>'; print '</td>';
} }
if ($user->rights->ficheinter->creer) { if ($user->rights->ficheinter->creer) {
// Action column // Action column
print '<td align="center">'; print '<td align="center">';
@ -953,7 +953,7 @@ if ($action == 'create') {
$i++; $i++;
} }
} }
} else } else
print '<tr class="oddeven"><td colspan="6">'.$langs->trans("NoneF").'</td></tr>'; print '<tr class="oddeven"><td colspan="6">'.$langs->trans("NoneF").'</td></tr>';
print "</table>"; print "</table>";

View File

@ -148,7 +148,6 @@ if ($resql)
{ {
if (! $conf->use_javascript_ajax) if (! $conf->use_javascript_ajax)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$fichinterstatic->LibStatut($status,$bool,0).'</td>'; print '<td>'.$fichinterstatic->LibStatut($status,$bool,0).'</td>';
print '<td align="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' '; print '<td align="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' ';

View File

@ -350,9 +350,7 @@ if (empty($reshook))
if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) {
$idprod = $res->fk_product_child; $idprod = $res->fk_product_child;
} } else {
else
{
setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors');
$error ++; $error ++;
} }

View File

@ -1160,9 +1160,7 @@ if (empty($reshook))
if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) {
$idprod = $res->fk_product_child; $idprod = $res->fk_product_child;
} } else {
else
{
setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors');
$error ++; $error ++;
} }

View File

@ -819,7 +819,6 @@ if ($resql)
if ($num > 0) if ($num > 0)
{ {
$i=0; $i=0;
$totalarray=array(); $totalarray=array();
while ($i < min($num,$limit)) while ($i < min($num,$limit))
{ {

View File

@ -146,6 +146,7 @@ if ($year)
print '<td align="right">'.$langs->trans("Size").'</td>'; print '<td align="right">'.$langs->trans("Size").'</td>';
print '<td align="right">'.$langs->trans("Date").'</td>'; print '<td align="right">'.$langs->trans("Date").'</td>';
print '</tr>'; print '</tr>';
if (is_resource($handle)) if (is_resource($handle))
{ {
while (($file = readdir($handle))!==false) while (($file = readdir($handle))!==false)

View File

@ -23,23 +23,23 @@
/** /**
* addDispatchLine * addDispatchLine
* Adds new table row for dispatching to multiple stock locations * Adds new table row for dispatching to multiple stock locations
* *
* @param index int index of product line. 0 = first product line * @param index int index of product line. 0 = first product line
* @param type string type of dispatch (batch = batch dispatch, dispatch = non batch dispatch) * @param type string type of dispatch (batch = batch dispatch, dispatch = non batch dispatch)
* @param mode string 'qtymissing' will create new line with qty missing, 'lessone' will keep 1 in old line and the rest in new one * @param mode string 'qtymissing' will create new line with qty missing, 'lessone' will keep 1 in old line and the rest in new one
*/ */
function addDispatchLine(index, type, mode) function addDispatchLine(index, type, mode)
{ {
mode = mode || 'qtymissing' mode = mode || 'qtymissing'
console.log("fourn/js/lib_dispatch.js Split line type="+type+" index="+index+" mode="+mode); console.log("fourn/js/lib_dispatch.js Split line type="+type+" index="+index+" mode="+mode);
var $row = $("tr[name='"+type+'_0_'+index+"']").clone(true), // clone first batch line to jQuery object var $row = $("tr[name='"+type+'_0_'+index+"']").clone(true), // clone first batch line to jQuery object
nbrTrs = $("tr[name^='"+type+"_'][name$='_"+index+"']").length, // position of line for batch nbrTrs = $("tr[name^='"+type+"_'][name$='_"+index+"']").length, // position of line for batch
qtyOrdered = parseFloat($("#qty_ordered_0_"+index).val()), // Qty ordered is same for all rows qtyOrdered = parseFloat($("#qty_ordered_0_"+index).val()), // Qty ordered is same for all rows
qty = parseFloat($("#qty_"+(nbrTrs - 1)+"_"+index).val()), qty = parseFloat($("#qty_"+(nbrTrs - 1)+"_"+index).val()),
qtyDispatched; qtyDispatched;
if (mode === 'lessone') if (mode === 'lessone')
{ {
qtyDispatched = parseFloat($("#qty_dispatched_0_"+index).val()) + 1; qtyDispatched = parseFloat($("#qty_dispatched_0_"+index).val()) + 1;
} }
@ -47,7 +47,7 @@ function addDispatchLine(index, type, mode)
{ {
qtyDispatched = parseFloat($("#qty_dispatched_0_"+index).val()) + qty; qtyDispatched = parseFloat($("#qty_dispatched_0_"+index).val()) + qty;
} }
if (qtyDispatched < qtyOrdered) if (qtyDispatched < qtyOrdered)
{ {
//replace tr suffix nbr //replace tr suffix nbr
@ -62,19 +62,19 @@ function addDispatchLine(index, type, mode)
$row.attr('name',type+'_'+nbrTrs+'_'+index); $row.attr('name',type+'_'+nbrTrs+'_'+index);
//insert new row before last row //insert new row before last row
$("tr[name^='"+type+"_'][name$='_"+index+"']:last").after($row); $("tr[name^='"+type+"_'][name$='_"+index+"']:last").after($row);
//remove cloned select2 with duplicate id. //remove cloned select2 with duplicate id.
$("#s2id_entrepot_"+nbrTrs+'_'+index).detach(); // old way to find duplicated select2 component $("#s2id_entrepot_"+nbrTrs+'_'+index).detach(); // old way to find duplicated select2 component
$(".csswarehouse_"+nbrTrs+"_"+index+":first-child").parent("span.selection").parent(".select2").detach(); $(".csswarehouse_"+nbrTrs+"_"+index+":first-child").parent("span.selection").parent(".select2").detach();
/* Suffix of lines are: _ trs.length _ index */ /* Suffix of lines are: _ trs.length _ index */
$("#qty_"+nbrTrs+"_"+index).focus(); $("#qty_"+nbrTrs+"_"+index).focus();
$("#qty_dispatched_0_"+index).val(qtyDispatched); $("#qty_dispatched_0_"+index).val(qtyDispatched);
//hide all buttons then show only the last one //hide all buttons then show only the last one
$("tr[name^='"+type+"_'][name$='_"+index+"'] .splitbutton").hide(); $("tr[name^='"+type+"_'][name$='_"+index+"'] .splitbutton").hide();
$("tr[name^='"+type+"_'][name$='_"+index+"']:last .splitbutton").show(); $("tr[name^='"+type+"_'][name$='_"+index+"']:last .splitbutton").show();
if (mode === 'lessone') if (mode === 'lessone')
{ {
qty = 1; // keep 1 in old line qty = 1; // keep 1 in old line
@ -94,11 +94,11 @@ function addDispatchLine(index, type, mode)
/** /**
* onChangeDispatchLineQty * onChangeDispatchLineQty
* *
* Change event handler for dispatch qty input field, * Change event handler for dispatch qty input field,
* recalculate qty dispatched when qty input has changed. * recalculate qty dispatched when qty input has changed.
* If qty is more then qty ordered reset input qty to max qty to dispatch. * If qty is more then qty ordered reset input qty to max qty to dispatch.
* *
* element requires arbitrary data qty (value before change), type (type of dispatch) and index (index of product line) * element requires arbitrary data qty (value before change), type (type of dispatch) and index (index of product line)
*/ */
@ -124,4 +124,4 @@ function onChangeDispatchLineQty() {
} }
$(this).data('qty', $(this).val()); $(this).data('qty', $(this).val());
} }
} }

View File

@ -42,7 +42,7 @@ class Establishment extends CommonObject
public $fk_element = 'fk_establishment'; public $fk_element = 'fk_establishment';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto='building'; public $picto='building';
public $id; public $id;
public $ref; public $ref;
public $rowid; public $rowid;
@ -216,7 +216,7 @@ class Establishment extends CommonObject
$this->country_id = $obj->country_id; $this->country_id = $obj->country_id;
$this->country_code = $obj->country_code; $this->country_code = $obj->country_code;
$this->country = $obj->country; $this->country = $obj->country;
return 1; return 1;
} }
@ -394,7 +394,7 @@ class Establishment extends CommonObject
return ''; return '';
} }
/** /**
* Initialise object with example values * Initialise object with example values
* Id must be 0 if object instance is a specimen * Id must be 0 if object instance is a specimen
@ -405,5 +405,5 @@ class Establishment extends CommonObject
{ {
$this->id = 0; $this->id = 0;
$this->ref = 'DEAAA'; $this->ref = 'DEAAA';
} }
} }

View File

@ -568,7 +568,7 @@ if (! empty($valid_dashboardlines))
if ($board->total > 0 && ! empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) if ($board->total > 0 && ! empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX))
{ {
$boxwork .= '&nbsp;/&nbsp;<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0)?' dashboardlineok':'').'">'.price($board->total) .'</span></a>'; $boxwork .= '&nbsp;/&nbsp;<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0)?' dashboardlineok':'').'">'.price($board->total) .'</span></a>';
} }
$boxwork .= '</div>'; $boxwork .= '</div>';
if ($board->nbtodolate > 0) if ($board->nbtodolate > 0)
{ {

View File

@ -1,5 +1,5 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2009-2017 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2009-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -89,16 +89,16 @@ div.soustitre {
body { body {
margin: 15px 4px 4px; margin: 15px 4px 4px;
} }
input, input[type=text], input[type=password], select, textarea { input, input[type=text], input[type=password], select, textarea {
min-width: 20px; min-width: 20px;
min-height: 1.4em; min-height: 1.4em;
line-height: 1.4em; line-height: 1.4em;
padding: .4em .1em; padding: .4em .1em;
border: 1px solid #BBB; border: 1px solid #BBB;
/* max-width: inherit; why this ? */ /* max-width: inherit; why this ? */
} }
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; }
.maxwidthonsmartphone { max-width: 100px; } .maxwidthonsmartphone { max-width: 100px; }
@ -120,13 +120,13 @@ div.soustitre {
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
} }
table.main-inside { table.main-inside {
padding-left: 1px; padding-left: 1px;
padding-right: 1px; padding-right: 1px;
line-height: 20px; line-height: 20px;
} }
span.titre { span.titre {
font-size: 90%; font-size: 90%;
font-weight: normal; font-weight: normal;
@ -146,7 +146,7 @@ input:disabled
padding: 0 0 0 0; padding: 0 0 0 0;
margin: 0 0 0 0; margin: 0 0 0 0;
color: #AAA !important; color: #AAA !important;
cursor: not-allowed !important; cursor: not-allowed !important;
} }
input[type=submit] { input[type=submit] {
@ -212,7 +212,7 @@ table.listofchoices, table.listofchoices tr, table.listofchoices td {
} }
.blinkwait { .blinkwait {
font-weight: bold; font-weight: bold;
text-decoration:blink !important; text-decoration:blink !important;
} }
.installchoices table tr td { .installchoices table tr td {

View File

@ -422,13 +422,14 @@ class MultiCurrency extends CommonObject
} }
} }
/** /**
* Try get label of code in llx_currency then add rate * Try get label of code in llx_currency then add rate.
* *
* @param string $code currency code * @param string $code currency code
* @param double $rate new rate * @param double $rate new rate
* @return int -1 if KO, 1 if OK, 2 if label found and OK *
*/ * @return int -1 if KO, 1 if OK, 2 if label found and OK
*/
function addRateFromDolibarr($code, $rate) function addRateFromDolibarr($code, $rate)
{ {
global $db, $user; global $db, $user;
@ -457,7 +458,7 @@ class MultiCurrency extends CommonObject
return -1; return -1;
} }
/** /**
* Add new entry into llx_multicurrency_rate to historise * Add new entry into llx_multicurrency_rate to historise
* *
* @param double $rate rate value * @param double $rate rate value
@ -467,7 +468,7 @@ class MultiCurrency extends CommonObject
public function updateRate($rate) public function updateRate($rate)
{ {
return $this->addRate($rate); return $this->addRate($rate);
} }
/** /**
* Fetch CurrencyRate object in $this->rate * Fetch CurrencyRate object in $this->rate
@ -488,9 +489,9 @@ class MultiCurrency extends CommonObject
return $this->rate->fetch($obj->rowid); return $this->rate->fetch($obj->rowid);
} }
} }
/** /**
* Get id of currency from code * Get id of currency from code
* *
* @param DoliDB $db object db * @param DoliDB $db object db
@ -508,9 +509,9 @@ class MultiCurrency extends CommonObject
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql && $obj = $db->fetch_object($resql)) return $obj->rowid; if ($resql && $obj = $db->fetch_object($resql)) return $obj->rowid;
else return 0; else return 0;
} }
/** /**
* Get id and rate of currency from code * Get id and rate of currency from code
* *
* @param DoliDB $db object db * @param DoliDB $db object db
@ -571,29 +572,28 @@ class MultiCurrency extends CommonObject
else return $amount; else return $amount;
} }
/** /**
* Get current invoite rate * Get current invoite rate
* *
* @param int $fk_facture id of facture * @param int $fk_facture id of facture
* @param string $table facture or facture_fourn * @param string $table facture or facture_fourn
* @return bool * @return bool
*/ */
public static function getInvoiceRate($fk_facture, $table='facture') public static function getInvoiceRate($fk_facture, $table='facture')
{ {
global $db; global $db;
$sql = 'SELECT multicurrency_tx FROM '.MAIN_DB_PREFIX.$table.' WHERE rowid = '.$fk_facture; $sql = 'SELECT multicurrency_tx FROM '.MAIN_DB_PREFIX.$table.' WHERE rowid = '.$fk_facture;
dol_syslog(__METHOD__,LOG_DEBUG); dol_syslog(__METHOD__,LOG_DEBUG);
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql && ($line = $db->fetch_object($resql))) if ($resql && ($line = $db->fetch_object($resql)))
{ {
return $line->multicurrency_tx; return $line->multicurrency_tx;
} }
return false;
}
return false;
}
/** /**
* With free account we can't set source then recalcul all rates to force another source * With free account we can't set source then recalcul all rates to force another source
@ -636,13 +636,13 @@ class MultiCurrency extends CommonObject
global $db,$conf; global $db,$conf;
$ch = curl_init('http://apilayer.net/api/live?access_key='.$key.''); $ch = curl_init('http://apilayer.net/api/live?access_key='.$key.'');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch); $response = curl_exec($ch);
curl_close($ch); curl_close($ch);
$response = json_decode($response); $response = json_decode($response);
if ($response->success) if ($response->success)
{ {
$TRate = $response->quotes; $TRate = $response->quotes;
$timestamp = $response->timestamp; $timestamp = $response->timestamp;

View File

@ -104,10 +104,10 @@ borghesi@unistra.fr
Ce logiciel est régi par la licence CeCILL-B soumise au droit français et Ce logiciel est régi par la licence CeCILL-B soumise au droit français et
respectant les principes de diffusion des logiciels libres. Vous pouvez respectant les principes de diffusion des logiciels libres. Vous pouvez
utiliser, modifier et/ou redistribuer ce programme sous les conditions utiliser, modifier et/ou redistribuer ce programme sous les conditions
de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA de la licence CeCILL-B telle que diffusée par le CEA, le CNRS et l'INRIA
sur le site "http://www.cecill.info". sur le site "http://www.cecill.info".
Le fait que vous puissiez accéder à cet en-tête signifie que vous avez Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
pris connaissance de la licence CeCILL-B, et que vous en avez accepté les pris connaissance de la licence CeCILL-B, et que vous en avez accepté les
termes. Vous pouvez trouver une copie de la licence dans le fichier LICENCE. termes. Vous pouvez trouver une copie de la licence dans le fichier LICENCE.
@ -120,10 +120,10 @@ Creation : Feb 2008
borghesi@unistra.fr borghesi@unistra.fr
This software is governed by the CeCILL-B license under French law and This software is governed by the CeCILL-B license under French law and
abiding by the rules of distribution of free software. You can use, abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL-B modify and/ or redistribute the software under the terms of the CeCILL-B
license as circulated by CEA, CNRS and INRIA at the following URL license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info". "http://www.cecill.info".
The fact that you are presently reading this means that you have had The fact that you are presently reading this means that you have had
knowledge of the CeCILL-B license and that you accept its terms. You can knowledge of the CeCILL-B license and that you accept its terms. You can
@ -133,12 +133,12 @@ find a copy of this license in the file LICENSE.
*/ */
/* /*
Le fichier style.css est le fichier de style de studs. Il se trouve à la racine Le fichier style.css est le fichier de style de studs. Il se trouve à la racine
du répertoire studs. Il contient toutes les mises en forme des fichiers PHP du répertoire studs. Il contient toutes les mises en forme des fichiers PHP
de Studs. de Studs.
*/ */
/*bandeau de titre*/ /*bandeau de titre*/
div.bandeau{ div.bandeau{
line-height:35px; line-height:35px;
text-align:center; text-align:center;
background-color: #0b419b; background-color: #0b419b;
@ -146,7 +146,7 @@ div.bandeau{
vertical-align:middle; vertical-align:middle;
font-size:35px; font-size:35px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
padding:8px; padding:8px;
height:35px; height:35px;
position:static; position:static;
top:6px; top:6px;
@ -154,30 +154,30 @@ div.bandeau{
right:6px; right:6px;
} }
div.logo{ div.logo{
height:64px; height:64px;
float:right; float:right;
top:8px; top:8px;
right:8px; right:8px;
margin-left: 0; margin-left: 0;
margin-right:0; margin-right:0;
margin-bottom:auto; margin-bottom:auto;
} }
/*Sous bandeau avec bouton de navigation*/ /*Sous bandeau avec bouton de navigation*/
div.bandeautitre{ div.bandeautitre{
height:17px; height:17px;
font-size:14px; font-size:14px;
font-weight:bold; font-weight:bold;
text-align:center; text-align:center;
vertical-align:middle; vertical-align:middle;
font-family:arial, sans-serif; font-family:arial, sans-serif;
padding:3px; padding:3px;
position:static; position:static;
top:57px; top:57px;
left:6px; left:6px;
right:6px; right:6px;
} }
div.sousbandeau{ div.sousbandeau{
height:17px; height:17px;
background-color: #DDDDDD; background-color: #DDDDDD;
font-size:11px; font-size:11px;
@ -191,15 +191,15 @@ div.sousbandeau{
right:6px; right:6px;
} }
/*bandeau de pied*/ /*bandeau de pied*/
div.surbandeaupied{ div.surbandeaupied{
background-color: #0077DD; background-color: #0077DD;
position:absolute; position:absolute;
bottom:30px; bottom:30px;
left:6px; left:6px;
right:6px; right:6px;
height:6px; height:6px;
} }
div.bandeaupied{ div.bandeaupied{
text-align:center; text-align:center;
background-color: #0b419b; background-color: #0b419b;
color:white; color:white;
@ -209,29 +209,29 @@ div.bandeaupied{
position:fixed; position:fixed;
bottom:6px; bottom:6px;
left:6px; left:6px;
right:6px; right:6px;
margin:2px; margin:2px;
} }
div.surbandeaupiedmobile{ div.surbandeaupiedmobile{
background-color: #0077DD; background-color: #0077DD;
position:static; position:static;
bottom:32px; bottom:32px;
left:6px; left:6px;
right:6px; right:6px;
height:6px; height:6px;
} }
div.bandeaupiedmobile{ div.bandeaupiedmobile{
text-align:center; text-align:center;
background-color: #0b419b; background-color: #0b419b;
color:white; color:white;
font-size:11px; font-size:11px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
padding:6px; padding:6px;
position:static; position:static;
} }
/*les boutons se trouvant dans le sousbandeau*/ /*les boutons se trouvant dans le sousbandeau*/
div.sousbandeau a, div.sousbandeau span.sousbandeaulangue a { div.sousbandeau a, div.sousbandeau span.sousbandeaulangue a {
background-color: #0b419b; background-color: #0b419b;
height:16px; height:16px;
padding: 2px 6px 2px 6px; padding: 2px 6px 2px 6px;
vertical-align:middle; vertical-align:middle;
@ -249,7 +249,7 @@ span.sousbandeaulangue {
float:right; float:right;
} }
/*corps de la page index.php*/ /*corps de la page index.php*/
div.corps{ div.corps{
font-size:12px; font-size:12px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
position:static; position:static;
@ -257,10 +257,10 @@ div.corps{
} }
div.corps table{ div.corps table{
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:12px; font-size:12px;
font-weight:bold; font-weight:bold;
} }
div.corpscentre{ div.corpscentre{
font-size:12px; font-size:12px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
text-align:center; text-align:center;
@ -285,7 +285,7 @@ div.jourschoisis {
div.bodydate { div.bodydate {
padding:10px; padding:10px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
position:static; position:static;
top:330px; top:330px;
@ -294,7 +294,7 @@ div.bodydate {
} }
div.bodydate table{ div.bodydate table{
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:12px; font-size:12px;
font-weight:bold; font-weight:bold;
} }
/*cadre de commentaires*/ /*cadre de commentaires*/
@ -302,7 +302,7 @@ div.presentationdate {
width:100%; width:100%;
font-family:arial, sans-serif; font-family:arial, sans-serif;
text-align:center; text-align:center;
font-size:12px; font-size:12px;
border-top:1px solid; border-top:1px solid;
border-bottom:1px solid; border-bottom:1px solid;
border-left: none; border-left: none;
@ -321,14 +321,14 @@ div.presentationdatefin {
border: 1px solid; border: 1px solid;
margin-top: 10px; margin-top: 10px;
margin-left: 30%; margin-left: 30%;
margin-right: 30%; margin-right: 30%;
position:static; position:static;
} }
/*cadre principal de studs.php*/ /*cadre principal de studs.php*/
div.cadre { div.cadre {
padding:10px; padding:10px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:12px; font-size:12px;
position:static; position:static;
top:235px; top:235px;
text-align:center; text-align:center;
@ -350,54 +350,54 @@ div.cadre td {
} }
/*case de tableau OK dans affichage de sondage*/ /*case de tableau OK dans affichage de sondage*/
div.cadre td.ok { div.cadre td.ok {
background-color: #66FF99; background-color: #66FF99;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
} }
/*Case de tableau NON dans affichage de sondage*/ /*Case de tableau NON dans affichage de sondage*/
div.cadre td.non { div.cadre td.non {
background-color: #FF7777; background-color: #FF7777;
min-width: 60px; min-width: 60px;
} }
/*Case de tableau VIDE dans affichage de sondage*/ /*Case de tableau VIDE dans affichage de sondage*/
div.cadre td.vide { div.cadre td.vide {
background-color: #DDDDDD; background-color: #DDDDDD;
text-align:center; text-align:center;
} }
/*Case de tableau contenant les noms dans affichage de sondage*/ /*Case de tableau contenant les noms dans affichage de sondage*/
div.cadre td.nom { div.cadre td.nom {
background-color: #DDDDDD; background-color: #DDDDDD;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
} }
div.cadre td.casevide { div.cadre td.casevide {
background-color: white; background-color: white;
text-align:center; text-align:center;
} }
/*les cases contenant les sommes de chaque colonne dans l'affichage de calendrier*/ /*les cases contenant les sommes de chaque colonne dans l'affichage de calendrier*/
div.cadre td.somme { div.cadre td.somme {
font-weight: bold; font-weight: bold;
font-size:14px; font-size:14px;
} }
/*Case de tableau SUJET dans affichage de sondage*/ /*Case de tableau SUJET dans affichage de sondage*/
div.cadre td.sujet, div.cadre td.jour, div.cadre td.heure { div.cadre td.sujet, div.cadre td.jour, div.cadre td.heure {
border: 2px; border: 2px;
background-color: #DDDDDD; background-color: #DDDDDD;
font-size:14px; font-size:14px;
padding:1px 5px; padding:1px 5px;
} }
div.cadre td.annee { div.cadre td.annee {
border: 2px; border: 2px;
background-color: #969696; background-color: #969696;
font-weight: bold; font-weight: bold;
font-size:14px; font-size:14px;
padding:1px 5px; padding:1px 5px;
} }
div.cadre td.mois { div.cadre td.mois {
border: 2px; border: 2px;
background-color: #C0C0C0; background-color: #C0C0C0;
font-weight: bold; font-weight: bold;
font-size:14px; font-size:14px;
padding:1px 5px; padding:1px 5px;
@ -421,7 +421,7 @@ div.calendrier td.joursemaine {
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:14px; font-size:14px;
border: 2px; border: 2px;
background-color: white; background-color: white;
} }
div.calendrier td.jourwe { div.calendrier td.jourwe {
width:65px; width:65px;
@ -429,7 +429,7 @@ div.calendrier td.jourwe {
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:14px; font-size:14px;
border: 2px; border: 2px;
background-color: #C0C0C0; background-color: #C0C0C0;
} }
/*jour avant le premier jour du mois dans calendrier*/ /*jour avant le premier jour du mois dans calendrier*/
div.calendrier td.avant { div.calendrier td.avant {
@ -438,21 +438,21 @@ div.calendrier td.avant {
border: 2px; border: 2px;
font-family:arial, sans-serif; font-family:arial, sans-serif;
font-size:13px; font-size:13px;
background-color: #DDDDDD; background-color: #DDDDDD;
} }
/*jour libre dans calendrier*/ /*jour libre dans calendrier*/
div.calendrier td.libre { div.calendrier td.libre {
width:65px; width:65px;
text-align: center; text-align: center;
border: 2px; border: 2px;
background-color: #66FF99; background-color: #66FF99;
} }
/*jour deja selectionné dans calendrier*/ /*jour deja selectionné dans calendrier*/
div.calendrier td.choisi { div.calendrier td.choisi {
width:65px; width:65px;
text-align: center; text-align: center;
border: 2px; border: 2px;
background-color: #0077DD; background-color: #0077DD;
} }
/* Le paragraphe de fin */ /* Le paragraphe de fin */
p.affichageresultats{ p.affichageresultats{

View File

@ -49,19 +49,19 @@ print $langs->trans("DirectPrintingJobsDesc").'<br><br>';
// List Jobs from printing modules // List Jobs from printing modules
$object = new PrintingDriver($db); $object = new PrintingDriver($db);
$result = $object->listDrivers($db, 10); $result = $object->listDrivers($db, 10);
foreach ($result as $driver) foreach ($result as $driver)
{ {
require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php';
$classname = 'printing_'.$driver; $classname = 'printing_'.$driver;
$langs->load($driver); $langs->load($driver);
$printer = new $classname($db); $printer = new $classname($db);
if ($conf->global->{$printer->active}) if ($conf->global->{$printer->active})
{ {
//$printer->list_jobs('commande'); //$printer->list_jobs('commande');
$result = $printer->list_jobs(); $result = $printer->list_jobs();
print $printer->resprint; print $printer->resprint;
if ($result > 0) if ($result > 0)
{ {
setEventMessages($printer->error, $printer->errors, 'errors'); setEventMessages($printer->error, $printer->errors, 'errors');
} }

View File

@ -3657,7 +3657,7 @@ class Product extends CommonObject
$result.=$linkstart; $result.=$linkstart;
if ($withpicto) { if ($withpicto) {
if ($this->type == Product::TYPE_PRODUCT) $result.=(img_object(($notooltip?'':$label), 'product', ($notooltip?'class="paddingright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1)); if ($this->type == Product::TYPE_PRODUCT) $result.=(img_object(($notooltip?'':$label), 'product', ($notooltip?'class="paddingright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
if ($this->type == Product::TYPE_SERVICE) $result.=(img_object(($notooltip?'':$label), 'service', ($notooltip?'class="paddinright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1)); if ($this->type == Product::TYPE_SERVICE) $result.=(img_object(($notooltip?'':$label), 'service', ($notooltip?'class="paddinright"':'class="paddingright classfortooltip"'), 0, 0, $notooltip?0:1));
} }
$result.= $newref; $result.= $newref;
$result.= $linkend; $result.= $linkend;

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