diff --git a/.travis.yml b/.travis.yml
index c1bed319447..733e997bdf3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,8 +38,8 @@ env:
jobs:
fast_finish: true
- allow_failures:
- - php: nightly
+ #allow_failures:
+ #- php: nightly
include:
- if: type = push
php: '5.6'
@@ -73,13 +73,6 @@ before_install:
phpenv config-rm xdebug.ini
echo
-- |
- if [ "$DB" = 'postgresql' ]; then
- echo "Check pgloader version"
- pgloader --version
- echo
- fi
-
install:
- |
echo "Updating Composer"
@@ -178,6 +171,10 @@ before_script:
mysql --version | head -
mysql -e "SELECT VERSION();" | head -
psql --version
+ if [ "$DB" = 'postgresql' ]; then
+ echo "Check pgloader version"
+ pgloader --version
+ fi
echo
- |
diff --git a/ChangeLog b/ChangeLog
index c5cc42fd2f3..14f59405eb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,8 @@ English Dolibarr ChangeLog
For users:
----------
-NEW: Add module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files.
+NEW: Module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files.
+NEW: Module Intracomm report
NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable.
NEW: Module Recruitment to manage Job position and applications.
NEW: Several security issues after a private bug bounty campaign.
@@ -22,7 +23,6 @@ NEW: Solve blocking feature. Can increase stock of a Kit without changing subpro
NEW: add a widget to show the customers with outstanding limits reached
NEW: add 2 rules for emailcollector: Message send/not sent from Dolibarr
NEW: add a counter of number of words for pages in website module
-NEW: add alert before changing thirdparty in TakePOS
NEW: add a page to list Stock at a given date in the past
NEW: add a start date to begin binding in accountancy
NEW: add a statistics page to list popularity of products on invoices
@@ -34,7 +34,7 @@ NEW: add column vat rate in page to define accounting account on product/service
NEW: add costprice in fields of products list
NEW: add an import profile for CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE
NEW: add employee link in expense report binding page
-NEW: add EORI No. as ProfID5
+NEW: add EORI No. as ProfID5 #15382
NEW: add export for various payments
NEW: add Extrafields labels and values in mail on create ticket
NEW: add Extrafields support on ECM module
@@ -121,9 +121,7 @@ NEW: link on balance to the ledger
NEW: MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const in email collector
NEW: manage errors on update extra fields in ticket card
NEW: mass-actions for the event list view
-NEW: Module Intracomm report
NEW: more filter for "View change logs"
-NEW: multicurrency total in TakePOS
NEW: multiselect type and date to date filter
NEW: Nature of product is now a dictionay
NEW: new line template: hidden conf to fill service dates from the last service line
@@ -136,14 +134,12 @@ NEW: Purchase price table: added filterable table columns
NEW: rate editor for multicurrency
NEW: ref_ext field for Commande lines, order lines, Attributes and Combinations, Invoice lines, payments, order lines
NEW: remove new lines in mail on add ticket message
-NEW: restrict thirdparty to customer in TakePOS
NEW: Rule "email to" accept wildcard *
NEW: Save filter of the project homepage
NEW: select-able columns on customer and supplier invoice paymnet list
NEW: select-able columns on miscellaneous payments + more data columns
NEW: select-able columns on social taxes list
NEW: send context and remove new lines on create ticket
-NEW: show available stock in TakePOS
NEW: show category filter on lists only when user have rights to read categories
NEW: show header number and make it clickable in warehouse area, payment area, shipment area
NEW: show image of user in the combo select of users
@@ -156,12 +152,16 @@ NEW: show tags and status in search list of website pages
NEW: show user on external calender events (when found)
NEW: subject title with company name instead of application title in ticket message
NEW: Support for Samba4 AD
+NEW: TakePOS add alert before changing thirdparty
NEW: TakePOS add third order printer
NEW: TakePOS can change thirdparty with barcode scan
NEW: TakePOS can create a thirdparty customer from TakePOS frontend
NEW: TakePOS connector compatibility with RECEIPT PRINTERS module
NEW: TakePOS Gift Receipt
-NEW: TakePOS Multicurrency compatibility
+NEW: TakePOS multicurrency compatibility
+NEW: TakePOS multicurrency total
+NEW: TakePOS restrict thirdparty to customer
+NEW: TakePOS show available stock in TakePOS
NEW: TakePOS Weighing Scale compatibility with TakePOS connector #14725
NEW: Third-Party Import new fields: mother company,outstanding debt limit,bank account,incoterms
NEW: Thirdparty module : box on customer/supplier tab for invoice outsantding amount late
diff --git a/build/README b/build/README
index 14f2b92ae39..626953f9376 100644
--- a/build/README
+++ b/build/README
@@ -7,6 +7,9 @@ Building packages
##################################################
All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages.
+The build directory and all its contents is absolutely not required to make Dolibarr working.
+It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory.
+
There are several tools:
@@ -17,8 +20,7 @@ There are several tools:
--------------------------------------------------------------------------------------------------
-Prerequisites to build tgz, debian, rpm package:
-
+Prerequisites to build tgz, debian and rpm packages:
> apt-get install tar dpkg dpatch p7zip-full rpm zip
@@ -58,10 +60,6 @@ Prerequisites to build autoexe DoliWamp package:
--------------------------------------------------------------------------------------------------
-Note:
-The build directory and all its contents is absolutely not required to make Dolibarr working.
-It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory.
-
You can find in "build", following sub-directories:
diff --git a/dev/README b/dev/README
index 337928507fc..78666d77f3a 100644
--- a/dev/README
+++ b/dev/README
@@ -1,13 +1,14 @@
README (English)
--------------------------------
-This directory contains sub-directories to provide tools or
-documentation for developers.
-Note: All files in this directory are in VCS only and are not
-provided with a standard release.
+This directory contains sub-directories to provide tools or documentation for developers.
+
+Note: All files in this directory are in the source repository only and are not provided with a standard release. They are useless to make Dolibarr working.
+
+You may find a more complete documentation on Dolibarr on the wiki:
-There is also some documentation on Dolibarr Wiki:
https://wiki.dolibarr.org/
-and
-https://doxygen.dolibarr.org/
+and on
+
+https://doxygen.dolibarr.org/
diff --git a/doc/index.html b/doc/index.html
index 5c655136e3e..333f96099c3 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -6,18 +6,15 @@
-This directory contains several subdirectories with entries for
-informations on Dolibarr.
-But if you are looking for other resources (downloads, documentation, addons, ...), you can find this
-on Internet on web following sites:
-
-* Dolibarr wiki (documentation)
+This directory contains several subdirectories with entries for informations on Dolibarr.
+But if you are looking for other resources (downloads, documentation, addons, ...), you can find this on Internet on web following sites:
+
* Dolibarr portal (official website)
';
// Suggested accounting account
- // $objp->code_sell_l = default (it takes the country into consideration), $objp->code_sell_p is value for product (it takes the country into consideration too)
print '
';
$suggestedid = $objp->aarowid_suggest;
- /*var_dump($suggestedid);
- var_dump($objp->code_sell_p);
- var_dump($objp->code_sell_l);*/
if (empty($suggestedid) && empty($objp->code_sell_p) && !empty($objp->code_sell_l) && empty($conf->global->ACCOUNTANCY_DO_NOT_AUTOFILL_ACCOUNT_WITH_GENERIC))
{
if (empty($accountingaccount_codetotid_cache[$objp->code_sell_l]))
@@ -642,7 +659,6 @@ if ($result) {
// Column with checkbox
print '
';
- //var_dump($objp->aarowid);var_dump($objp->aarowid_intra);var_dump($objp->aarowid_export);var_dump($objp->aarowid_suggest);
$ischecked = $objp->aarowid_suggest;
if ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') $ischecked = 0;
print '';
diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php
index 0dbe09fa468..9dd097f3d0c 100644
--- a/htdocs/accountancy/supplier/index.php
+++ b/htdocs/accountancy/supplier/index.php
@@ -120,9 +120,9 @@ if ($action == 'validatehistory') {
$sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type,";
$sql .= " p.accountancy_code_buy as code_buy, p.accountancy_code_buy_intra as code_buy_intra, p.accountancy_code_buy_export as code_buy_export, p.tva_tx as tva_tx_prod,";
- $sql .= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,";
+ $sql .= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export, aa4.rowid as aarowid_thirdparty,";
$sql .= " co.code as country_code, co.label as country_label,";
- $sql .= " s.tva_intra";
+ $sql .= " s.tva_intra, s.accountancy_code_buy as company_code_buy";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
@@ -131,6 +131,7 @@ if ($action == 'validatehistory') {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_buy_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON s.accountancy_code_buy = aa4.account_number AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql .= " AND l.product_type <= 2";
@@ -151,7 +152,7 @@ if ($action == 'validatehistory') {
$isSellerInEEC = isInEEC($objp);
- // Search suggested account for product/service
+ // Level 2: Search suggested account for product/service (similar code exists in page list.php to make manual binding)
$suggestedaccountingaccountfor = '';
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
$objp->code_buy_p = $objp->code_buy;
@@ -169,6 +170,13 @@ if ($action == 'validatehistory') {
}
}
+ // Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
+ if (!empty($objp->company_code_buy)) {
+ $objp->code_buy_t = $objp->company_code_buy;
+ $objp->aarowid_suggest = $objp->aarowid_thirdparty;
+ $suggestedaccountingaccountfor = '';
+ }
+
if ($objp->aarowid_suggest > 0)
{
$sqlupdate = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det";
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index cbdecd2e85e..919130e80d3 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -215,9 +215,9 @@ $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label,
$sql .= " p.accountancy_code_sell as code_sell, p.accountancy_code_sell_intra as code_sell_intra, p.accountancy_code_sell_export as code_sell_export,";
$sql .= " p.accountancy_code_buy as code_buy, p.accountancy_code_buy_intra as code_buy_intra, p.accountancy_code_buy_export as code_buy_export,";
$sql .= " p.tosell as status, p.tobuy as status_buy,";
-$sql .= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,";
+$sql .= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export, aa4.rowid as aarowid_thirdparty,";
$sql .= " co.code as country_code, co.label as country_label,";
-$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur";
+$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur, s.accountancy_code_buy as company_code_buy";
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
@@ -229,6 +229,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_buy_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON s.accountancy_code_buy = aa4.account_number AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql .= " AND l.product_type <= 2";
// Define begin binding date
@@ -460,10 +461,12 @@ if ($result) {
$facturefourn_static->label = $objp->invoice_label;
$code_buy_p_notset = '';
+ $code_buy_t_notset = '';
$objp->aarowid_suggest = ''; // Will be set later
$isSellerInEEC = isInEEC($objp);
+ // Level 1: Search suggested default account for product/service
$suggestedaccountingaccountbydefaultfor = '';
if ($objp->type_l == 1) {
if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
@@ -494,7 +497,7 @@ if ($result) {
}
if ($objp->code_sell_l == -1) $objp->code_sell_l = '';
- // Search suggested account for product/service
+ // Level 2: Search suggested account for product/service (similar code exists in page index.php to make automatic binding)
$suggestedaccountingaccountfor = '';
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
$objp->code_buy_p = $objp->code_buy;
@@ -512,6 +515,13 @@ if ($result) {
}
}
+ // Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
+ if (!empty($objp->company_code_buy)) {
+ $objp->code_buy_t = $objp->company_code_buy;
+ $objp->aarowid_suggest = $objp->aarowid_thirdparty;
+ $suggestedaccountingaccountfor = '';
+ }
+
if (!empty($objp->code_buy_p)) {
// Value was defined previously
} else {
@@ -521,6 +531,7 @@ if ($result) {
// $objp->code_buy_l is now default code of product/service
// $objp->code_buy_p is now code of product/service
+ // $objp->code_buy_t is now code of thirdparty
print '
';
@@ -576,7 +587,7 @@ if ($result) {
// Found accounts
print '