Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into N…
Browse files Browse the repository at this point in the history
…EW_Show_Region_in_company_info_&_Global_option_to_show_state_code_MAIN_SHOW_STATE_CODE

# Conflicts:
#	htdocs/admin/company.php
#	htdocs/core/class/commonobject.class.php
  • Loading branch information
ruistrecht-alt committed Oct 9, 2017
2 parents 4839d0f + 725e57b commit 1a5cdf2
Show file tree
Hide file tree
Showing 343 changed files with 37,661 additions and 34,886 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Expand Up @@ -325,18 +325,21 @@ script:
set +e
echo
#cat $TRAVIS_BUILD_DIR/upgrade400500-2.log
#cat $TRAVIS_BUILD_DIR/upgrade500600.log
#cat $TRAVIS_BUILD_DIR/upgrade500600-2.log
#cat $TRAVIS_BUILD_DIR/upgrade500600-3.log
#cat /tmp/dolibarr_install.log
- |
echo "Unit testing"
# Ensure we catch errors. Set this to +e if you want to go to the end to see log file.
# Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.
set -e
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
set +e
- |
#echo "Output dolibarr.log"
#echo cat documents/dolibarr.log
#cat documents/dolibarr.log
after_script:
- |
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog
Expand Up @@ -16,6 +16,10 @@ Following changes may create regressions for some external modules, but were nec
* The substitution key for reference of object is now __REF__ whatever is the object (it replaces __ORDERREF__,
__PROPALREF__, ...)
* Some REST API to access the dictionary (country, town, ...) were moved into a common API.
* Page bank/index.php and bank/bankentries.php were renamed into bank/list.php and bank/bankentries_list.php to
follow page naming conventions (so default filter/sort order features can also work).
* The trigger ORDER_SUPPLIER_STATUS_ONPROCESS was renamed ORDER_SUPPLIER_STATUS_ORDERED
* The trigger ORDER_SUPPLIER_STATUS_RECEIVED_ALL was renamed ORDER_SUPPLIER_STATUS_RECEIVED_COMPLETELY


***** ChangeLog for 6.0.1 compared to 6.0.* *****
Expand Down
44 changes: 22 additions & 22 deletions dev/initdata/import-thirdparties.php
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 @@ -123,15 +123,15 @@
if ($endlinenb && $i > $endlinenb) continue;

$nboflines++;

$object = new Societe($db);
$object->state = $fields[6];
$object->client = $fields[7];
$object->fournisseur = $fields[8];

$object->name = $fields[13]?trim($fields[13]):$fields[0];
$object->name_alias = $fields[0]!=$fields[13]?trim($fields[0]):'';

$object->address = trim($fields[14]);
$object->zip = trim($fields[15]);
$object->town = trim($fields[16]);
Expand All @@ -149,7 +149,7 @@
$condpayment = trim($fields[36]);
if ($condpayment == 'A la commande') $condpayment = 'A réception de commande';
if ($condpayment == 'A reception facture') $condpayment = 'Réception de facture';
$object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid');
$object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid', 1);
if (empty($object->cond_reglement_id))
{
print " - Error cant find payment mode for ".$condpayment."\n";
Expand All @@ -166,7 +166,7 @@
// Set price level
$object->price_level = 1;
if ($labeltype == 'Revendeur') $object->price_level = 2;

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


Expand All @@ -182,7 +182,7 @@
print " - Error in create result code = ".$ret." - ".$object->errorsToString();
$errorrecord++;
}
else
else
{
print " - Creation OK with name ".$object->name." - id = ".$ret;
}
Expand All @@ -198,15 +198,15 @@
if (! $errorrecord && $fields[3])
{
$salesrep=new User($db);

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

$result = $object->add_commercial($user, $salesrep->id);
if ($result < 0)
{
Expand All @@ -217,14 +217,14 @@
{
print " - create link sale representative OK";
}
}
}

dol_syslog("Add invoice contacts");
// Insert an invoice contact if there is an invoice email != standard email
if (! $errorrecord && $fields[27] && $fields[26] != $fields[27])
{
$ret1=$ret2=0;

$contact = new Contact($db);
$contact->lastname = $object->name;
$contact->address=$object->address;
Expand All @@ -233,7 +233,7 @@
$contact->country_id=$object->country_id;
$contact->email=$fields[27];
$contact->socid=$object->id;

$ret1=$contact->create($user);
if ($ret1 > 0)
{
Expand All @@ -244,18 +244,18 @@
print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString();
$errorrecord++;
}
else
else
{
print " - create contact OK";
}
}

dol_syslog("Add delivery contacts");
// Insert a delivery contact
if (! $errorrecord && $fields[47])
{
$ret1=$ret2=0;

$contact2 = new Contact($db);
$contact2->lastname = 'Service livraison - '.$fields[47];
$contact2->address = $fields[48];
Expand All @@ -264,10 +264,10 @@
$contact2->country_id=dol_getIdFromCode($db, trim($fields[52]), 'c_country', 'code', 'rowid');
$contact2->note_public=$fields[54];
$contact2->socid=$object->id;

// Extrafields
$contact2->array_options['options_anazoneliv']=price2num($fields[53]);

$ret1=$contact2->create($user);
if ($ret1 > 0)
{
Expand All @@ -278,16 +278,16 @@
print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString();
$errorrecord++;
}
else
else
{
print " - create contact OK";
}
}


print "\n";
if ($errorrecord)

if ($errorrecord)
{
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n");
$error++; // $errorrecord will be reset
Expand Down
1 change: 1 addition & 0 deletions dev/resources/iso-normes/code_nace.txt
@@ -0,0 +1 @@
http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_CLS_DLD&StrNom=NACE_REV2&StrLanguageCode=FR&StrLayoutCode=#
2 changes: 1 addition & 1 deletion dev/setup/codesniffer/ruleset.xml
Expand Up @@ -126,7 +126,7 @@
<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
<property name="complexity" value="120" />
<property name="absoluteComplexity" value="250" />
<property name="absoluteComplexity" value="300" />
</properties>
</rule>
<rule ref="Generic.Metrics.NestingLevel">
Expand Down
2 changes: 1 addition & 1 deletion dev/translation/txpush.sh
Expand Up @@ -15,7 +15,7 @@ then
echo "This push local files to transifex for project $project."
echo "Note: If you push a language file (not source), file will be skipped if transifex file is newer."
echo " Using -f will overwrite translation but not memory."
echo "Usage: ./dev/translation/txpush.sh (source|xx_XX|all) [-r dolibarr.file] [-f] [--no-interactive]"
echo "Usage: ./dev/translation/txpush.sh (source|xx_XX|all) [-r ".$project.".file] [-f] [--no-interactive]"
exit
fi

Expand Down

0 comments on commit 1a5cdf2

Please sign in to comment.