Skip to content

Commit

Permalink
Merge pull request #2 from Dolibarr/develop
Browse files Browse the repository at this point in the history
update 28/8/2018
  • Loading branch information
torvista authored Aug 28, 2018
2 parents 6ecc6b8 + 50d50c2 commit 642f5fd
Show file tree
Hide file tree
Showing 351 changed files with 3,569 additions and 1,558 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ before_script:
- |
export CONF_FILE=htdocs/conf/conf.php
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_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ else return 0;


function highlightTOC(str) {





if (StopProcess()) return;
try {

str = str || parent.BODY.document.location.href;
uri = last(str);
list = parent.TOC.document.getElementsByTagName("a");
Expand All @@ -33,7 +33,7 @@ function highlightTOC(str) {
list[i].style.backgroundColor = "#6697cc";
list[i].style.padding = "2px";
list[i].style.color = "#ffffff";

} else {
list[i].style.backgroundColor = "#ffffff";
list[i].style.color = "#003380";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
pre.preformatted {
pre.preformatted {

display: block;
font-family: "Courier New", verdana, arial, helvetica, sans-serif;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ window['_pr_isIE6'] = function () {
for (var i = 0; i < 10; ++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
html.push('<ol class="linenums"><li class="L', (lineNum) % 10, '"');
if (lineNum) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body
{
{
background: #FFFFFF
}

Expand Down Expand Up @@ -100,7 +100,7 @@ li.listalpha3 {
width: auto;
height: auto;
white-space: normal;
}
}

/*li.listalpha2, li.listalpha, li.listalpha3
{
Expand Down Expand Up @@ -207,7 +207,7 @@ p.listcontinue3 {
height: auto;
}

.prcontinuous
.prcontinuous
{font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-style: normal;
font-variant: normal;
Expand Down Expand Up @@ -237,7 +237,7 @@ p.listcontinue3 {
height: auto;
}

.prefblue
.prefblue
{display: inline;
font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-size: 10pt;
Expand All @@ -253,7 +253,7 @@ p.listcontinue3 {
padding-left: 0pt;
padding-right: 0pt;
}
.prefred
.prefred
{display: inline;
font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-size: 10pt;
Expand All @@ -269,7 +269,7 @@ p.listcontinue3 {
padding-left: 0pt;
padding-right: 0pt;
}
.prefdarkblue
.prefdarkblue
{display: inline;
font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-weight: bold;
Expand All @@ -286,7 +286,7 @@ p.listcontinue3 {
padding-left: 0pt;
padding-right: 0pt;
}
.prefgrey
.prefgrey
{display: inline;
font-family: "Courier New", verdana, arial, helvetica, sans-serif;
font-size: 10pt;
Expand All @@ -303,7 +303,7 @@ p.listcontinue3 {
padding-right: 0pt;
}

.expandingblock
.expandingblock
{font-family: "Tahoma", verdana, arial, helvetica, sans-serif;
border-color: #AFAFAF;
border-top-style: dotted;
Expand Down Expand Up @@ -363,7 +363,7 @@ p.listcontinue3 {

.pagenavigation a, .pagenavigation a:link, .pagenavigation a:visited {
color: #000000;
text-decoration: none;
text-decoration: none;
}
.pagenavigation a:hover {
text-decoration: none;
Expand All @@ -387,7 +387,7 @@ p.listcontinue3 {
}
.nav a, .nav a:link, .nav a:visited {
color: #000000;
text-decoration: none;
text-decoration: none;
}
.nav a:hover {
text-decoration: none;
Expand All @@ -400,9 +400,9 @@ td.navTabActive {
vertical-align: middle;
font-family: tahoma, verdana, arial, helvetica, sans-serif;
font-size: 8pt;
padding-top: 4px;
padding-bottom: 0px;
padding-left: 8px;
padding-top: 4px;
padding-bottom: 0px;
padding-left: 8px;
padding-right: 8px;
font-weight: bold;
background-image: url('nav_bg_active.gif');
Expand Down Expand Up @@ -567,7 +567,7 @@ a:visited,
border-right-color: #FFFFFF;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #ffffff;
border-bottom-color: #ffffff;
}
.bodytext {
font-family: verdana, tahoma, arial, helvetica, sans-serif;
Expand All @@ -582,7 +582,7 @@ a:visited,
font-weight: bold;
font-size: 8pt;
line-height: 12px;
color: #2f739b;
color: #2f739b;
line-height: 11px;
margin: 0px;
padding: 3px;
Expand Down Expand Up @@ -1303,7 +1303,7 @@ li.listnumber2 {
font-style: normal;
font-variant: normal;
font-size: 12pt;
color: #5c5b64;
color: #5c5b64;
background-color: inherit;
word-spacing: normal;
letter-spacing: normal;
Expand Down Expand Up @@ -1512,7 +1512,7 @@ li.listnumber2 {
span.toc {
line-height: 19px;
}

.searchDetails {
font-family: tahoma, verdana, arial, helvetica, sans-serif;
font-size: 11px;
Expand Down Expand Up @@ -1561,11 +1561,11 @@ form {
font-weight: bold;
}
.searchFoundWord {
background-color: #fffdce;
background-color: #fffdce;
}
.searchToTop {
text-align: left;
border-top: 1px solid #cfcfcf;
padding: 7px 0px 15px 0px;
margin: 0px;
}
}
40 changes: 20 additions & 20 deletions dev/initdata/import-products.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* \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
*/

Expand Down Expand Up @@ -118,22 +118,22 @@
{
$i++;
$errorrecord=0;

if ($startlinenb && $i < $startlinenb) continue;
if ($endlinenb && $i > $endlinenb) continue;

$nboflines++;

$produit = new Product($db);
$produit->type = 0;
$produit->status = 1;
$produit->ref = trim($fields[0]);

print "Process line nb ".$i.", ref ".$produit->ref;
$produit->label = trim($fields[2]);
$produit->description = trim($fields[4]."\n".($fields[5] ? $fields[5].' x '.$fields[6].' x '.$fields[7] : ''));
$produit->volume = price2num($fields[8]);
$produit->volume_unit = 0;
$produit->volume_unit = 0;
$produit->weight = price2num($fields[9]);
$produit->weight_units = 0; // -3 = g

Expand All @@ -142,35 +142,35 @@

$produit->status = 1;
$produit->status_buy = 1;

$produit->finished = 1;

$produit->price_min = null;
$produit->price_min_ttc = null;
$produit->price = price2num($fields[11]);
$produit->price_ttc = price2num($fields[12]);
$produit->price_base_type = 'TTC';
$produit->tva_tx = price2num($fields[13]);
$produit->tva_npr = 0;

$produit->cost_price = price2num($fields[16]);

// Extrafields
$produit->array_options['options_ecotaxdeee']=price2num($fields[17]);

$ret=$produit->create($user);
if ($ret < 0)
{
print " - Error in create result code = ".$ret." - ".$produit->errorsToString();
$errorrecord++;
}
else
else
{
print " - Creation OK with ref ".$produit->ref." - id = ".$ret;
}

dol_syslog("Add prices");

// If we use price level, insert price for each level
if (! $errorrecord && 1)
{
Expand All @@ -181,14 +181,14 @@
print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString();
$errorrecord++;
}
else
else
{
print " - updatePrice OK";
}
}

dol_syslog("Add multilangs");

// Add alternative languages
if (! $errorrecord && 1)
{
Expand All @@ -201,15 +201,15 @@
print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString();
$errorrecord++;
}
else
else
{
print " - setMultiLangs OK";
}
}

print "\n";
if ($errorrecord)

if ($errorrecord)
{
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$produit->errorsToString()."\n");
$error++; // $errorrecord will be reset
Expand Down
20 changes: 10 additions & 10 deletions dev/initdata/import-users.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* \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
*/

Expand Down Expand Up @@ -118,39 +118,39 @@
{
$i++;
$errorrecord=0;

if ($startlinenb && $i < $startlinenb) continue;
if ($endlinenb && $i > $endlinenb) continue;

$nboflines++;

$object = new User($db);
$object->statut = 1;

$tmp=explode(' ',$fields[3],2);
$object->firstname = trim($tmp[0]);
$object->lastname = trim($tmp[1]);
if ($object->lastname) $object->login = strtolower(substr($object->firstname, 0, 1)) . strtolower(substr($object->lastname, 0));
else $object->login=strtolower($object->firstname);
$object->login=preg_replace('/ /','',$object->login);
$object->password = 'init';

print "Process line nb ".$i.", login ".$object->login;

$ret=$object->create($user);
if ($ret < 0)
{
print " - Error in create result code = ".$ret." - ".$object->errorsToString();
$errorrecord++;
}
else
else
{
print " - Creation OK with login ".$object->login." - id = ".$ret;
}

print "\n";
if ($errorrecord)

if ($errorrecord)
{
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n");
$error++; // $errorrecord will be reset
Expand Down
Loading

0 comments on commit 642f5fd

Please sign in to comment.