Compare commits

...

87 Commits
8.0.2 ... 7.0.4

Author SHA1 Message Date
Laurent Destailleur
bd60fe6ffd Prepare 7.0.4 2018-10-12 19:13:11 +02:00
Laurent Destailleur
bb606df5e0 Prepare 7.0.4 2018-10-12 19:12:20 +02:00
Laurent Destailleur
067b29c9f8 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-10-12 19:09:45 +02:00
Laurent Destailleur
9f27dd41e5 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	ChangeLog
	htdocs/filefunc.inc.php
	htdocs/societe/class/societe.class.php
2018-10-12 19:08:06 +02:00
Laurent Destailleur
d4b02c0552 Release 6.0.8 2018-10-12 19:03:03 +02:00
Laurent Destailleur
fd46ae13d6 Merge pull request #9731 from atm-ph/fix_7.0_empty_column_physical_stock
Fix display 0 (as virtual stock) instead of empty string
2018-10-12 18:17:04 +02:00
Laurent Destailleur
2fdc1a9883 Merge pull request #9718 from frederic34/patch-9
define $code for all execution paths
2018-10-12 17:42:07 +02:00
Laurent Destailleur
817920f282 Prepare 6.0.8 2018-10-12 17:36:49 +02:00
atm-ph
79420593f4 Fix display 0 (as virtual stock) instead of empty string 2018-10-11 17:14:22 +02:00
Frédéric FRANCE
c3f07dd2e0 define $code for all execution paths 2018-10-09 19:28:52 +02:00
Laurent Destailleur
84605bc59b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-10-09 16:59:47 +02:00
Laurent Destailleur
430f833222 Merge pull request #9626 from OPEN-DSI/fix_product_margin
FIX Product margin tab and credit note
2018-10-09 16:57:08 +02:00
Laurent Destailleur
bd8cf3d81e Merge pull request #9704 from atm-gauthier/7.0_fix_userlist
FIX : when we're just admin and not super admin, if we create new use…
2018-10-09 16:17:49 +02:00
Laurent Destailleur
67e7736eb2 Merge pull request #9698 from Dolibarr/atm-maxime-patch-1
Fix request on project overview
2018-10-09 12:40:51 +02:00
gauthier
021f9552dd FIX : when we're just admin and not super admin, if we create new user with transverse mode, we don't see it then we can't add him in usergroup 2018-10-08 15:41:31 +02:00
Maxime Kohlhaas
320ca3db67 Fix request on project overview
Fixes #9220
2018-10-06 22:53:28 +02:00
Laurent Destailleur
e165dce908 Merge pull request #9689 from ATM-Marc/FIX_6.0_facture_stats_situation
FIX: invoice stats: situation invoices were not counted
2018-10-06 12:46:25 +02:00
Laurent Destailleur
a97dafc1f2 Merge pull request #9688 from atm-florian/7.0_fix9161
7.0 fix9161
2018-10-06 12:40:42 +02:00
Marc de Lima Lucio
82651cd920 FIX: invoice stats: situation invoices were not counted 2018-10-05 12:12:04 +02:00
florian HENRY
cba4676032 Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0_fix9161 2018-10-05 10:36:03 +02:00
florian HENRY
68c99d01a7 OMG!!!! var_dump.... 2018-10-05 10:35:32 +02:00
Laurent Destailleur
b20dc5678c Merge pull request #9684 from atm-ph/fix_7.0_wrong_modulepart_name
FIX wrong value for module part and return access denied
2018-10-04 19:06:53 +02:00
Laurent Destailleur
8592b03b49 Merge pull request #9682 from atm-ph/fix_7.0_missing_hook
Fix missing hook on sellsjournal
2018-10-04 19:06:02 +02:00
Laurent Destailleur
17e4af50ec Merge pull request #9680 from ATM-Nicolas/fix_wrong_variable_name
FIX : Wrong variable name
2018-10-04 18:47:08 +02:00
Laurent Destailleur
ac86eac508 Merge pull request #9675 from atm-ph/fix_7.0_dom_error
Fix minor error in dom
2018-10-04 18:32:52 +02:00
Laurent Destailleur
3060647212 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/lib/pdf.lib.php
2018-10-04 17:50:19 +02:00
Laurent Destailleur
8690d65479 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/lib/pdf.lib.php
2018-10-04 17:47:22 +02:00
Laurent Destailleur
577192554d Merge pull request #9670 from oas-services/7.0
Fix issue #9434 : no array_options available when calling api on order line and invoice line
2018-10-04 17:39:37 +02:00
Laurent Destailleur
9e397206d3 Merge pull request #9668 from atm-greg/Fix_pdf_generation
fix error 500 on pdf_generation
2018-10-04 17:27:29 +02:00
Laurent Destailleur
1dd276b046 Merge pull request #9666 from atm-gauthier/7.0_wrongfunction
FIX : wrong function name
2018-10-04 17:26:59 +02:00
atm-ph
bfaf25ca2a Fix wrong value for module part and return access denied 2018-10-04 16:55:16 +02:00
atm-ph
58d1ac427e Fix missing hook on sellsjournal 2018-10-04 10:57:22 +02:00
ATM-Nicolas
c048f51562 FIX : Wrong variable name 2018-10-04 09:54:40 +02:00
florian HENRY
e95921eb93 better test 2018-10-04 09:47:04 +02:00
florian HENRY
7f4f27ebfe indent 2018-10-04 09:45:12 +02:00
florian HENRY
292dab192b FIX : #9161 2018-10-04 09:42:11 +02:00
atm-ph
2acd69033c Fix minor error in dom 2018-10-03 22:48:29 +02:00
aplose
8ee7a48583 Fix issue #9434 : no array_options available when calling api :
I replace the deprecated code by the fetch_optionnals() recommanded call.
2018-10-03 15:15:46 +02:00
atm-greg
583ea05567 fix missing letter... 2018-10-03 12:13:53 +02:00
gauthier
587766b39b FIX : wrong function name 2018-10-03 10:38:47 +02:00
Philippe
06fe172669 FIX Product marge tabs on product card
Credit note are not negative so the grand total are false
2018-09-27 20:06:00 +02:00
Philippe
8deb2eaa0c Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2018-09-27 19:00:09 +02:00
Laurent Destailleur
6e7fd15e1e Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-09-27 12:48:08 +02:00
Laurent Destailleur
291d477f65 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/class/commonobject.class.php
2018-09-27 12:47:48 +02:00
Laurent Destailleur
4c8664b297 Merge pull request #9619 from ATM-Marc/FIX_6.0_extrafield_columns
FIX: showOptionals: column mismatches
2018-09-27 09:39:51 +02:00
Laurent Destailleur
2d88b69cf6 Merge pull request #9616 from frederic34/patch-14
add try catch for swiftmailer
2018-09-27 09:34:21 +02:00
Laurent Destailleur
bc5b794b1a Merge pull request #9613 from frederic34/patch-11
FIX Option MAIN_DISABLE_NOTES_TAB #9611
2018-09-27 09:30:56 +02:00
Laurent Destailleur
77341470e1 Merge pull request #9608 from frederic34/patch-10
comparaison of two boolean in rssparser.class.php
2018-09-27 09:23:24 +02:00
Laurent Destailleur
46363a7705 Merge pull request #9607 from atm-gauthier/7.0_fix_replenish_entity
FIX : need to filter on current entity on replenish
2018-09-27 09:22:44 +02:00
Laurent Destailleur
ff3f1e933a Update replenish.php 2018-09-27 09:22:38 +02:00
Marc de Lima Lucio
af93fc7484 FIX: showOptionals: column mismatches 2018-09-26 17:19:06 +02:00
Frédéric FRANCE
1bac3a0ccf swiftmailer is doing encodetorfc2822 2018-09-26 10:37:20 +02:00
Frédéric FRANCE
92a3faeaf7 add try catch for swiftmailer 2018-09-26 10:13:14 +02:00
Frédéric FRANCE
a9f7bdead6 fix Option MAIN_DISABLE_NOTES_TAB #9611 2018-09-25 15:22:08 +02:00
Frédéric FRANCE
d15c52db3b Update rssparser.class.php 2018-09-25 08:16:05 +02:00
gauthier
fc7c0ce521 FIX : need to filter on current entity on replenish 2018-09-24 16:23:44 +02:00
Laurent Destailleur
40bed96a01 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-09-24 10:15:20 +02:00
Laurent Destailleur
dbb75e35a1 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/compta/facture/list.php
	htdocs/langs/en_US/admin.lang
	htdocs/langs/fr_FR/agenda.lang
2018-09-24 10:14:38 +02:00
Laurent Destailleur
2dbb82fc76 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-09-24 10:03:21 +02:00
Laurent Destailleur
12690666e2 Missing trans 2018-09-24 10:03:08 +02:00
Laurent Destailleur
9ddc1770e8 Merge pull request #9501 from atm-gauthier/7.0_fix_tva_if_buyer_hors_cee_and_particulier
FIX : According to french law, if seller is in France and buyer isn't…
2018-09-23 15:41:33 +02:00
Laurent Destailleur
1569770855 Rename hidden conf into MAIN_USE_VAT_OF_PRODUCT_FOR_INDIVIDUAL_CUSTOMER_OUT_OF_EEC 2018-09-23 15:41:22 +02:00
gauthier
7b46bedce6 NEW : hidden configuration 2018-09-21 14:35:36 +02:00
Laurent Destailleur
a0bc26a923 Merge pull request #9476 from atm-maxime/fix_invoicelist_creditnote
Fix invoicelist creditnote
2018-09-21 09:56:43 +02:00
Laurent Destailleur
779d7e9689 Merge pull request #9568 from atm-gauthier/6.0_fix_langs_fr
FIX : langs fr
2018-09-19 15:04:18 +02:00
Laurent Destailleur
9b190d2cbc Merge pull request #9201 from atm-quentin/FIX_select_element
FIX exclude element of the select
2018-09-19 14:55:31 +02:00
gauthier
d62118dca8 FIX : langs fr 2018-09-19 14:53:56 +02:00
Laurent Destailleur
02617bd799 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-09-19 14:53:07 +02:00
Laurent Destailleur
2b67da3f34 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/modules/commande/doc/pdf_einstein.modules.php
	htdocs/core/modules/facture/doc/pdf_crabe.modules.php
	htdocs/core/modules/propale/doc/pdf_azur.modules.php
2018-09-19 14:52:43 +02:00
Laurent Destailleur
d6bd0ed73e Merge pull request #9566 from frederic34/patch-9
call to deprecated add_object_linked was present two times
2018-09-19 14:37:05 +02:00
Laurent Destailleur
a6996169d6 Merge pull request #9565 from frederic34/multicpdf
correct typo in multicurrency doc pdf #9562
2018-09-19 14:30:15 +02:00
Frédéric FRANCE
1d43c6bc3a call to deprecated add_object_linked was present two times 2018-09-19 10:57:59 +02:00
Frédéric FRANCE
cdbb79a26c correct typo in multicurrency doc pdf 2018-09-19 09:26:56 +02:00
gauthier
b68523b9c1 FIX : According to french law, if seller is in France and buyer isn't in UE and isn't a company, TVA used = TVA product 2018-09-13 14:37:12 +02:00
Maxime Kohlhaas
c94689e9a9 FIX remain to pay for credit note was wrong on invoice list 2018-09-12 11:53:57 +02:00
atm-quentin
ec9eeb5201 FIX check !empty exclude select element 2018-08-27 10:17:18 +02:00
atm-quentin
09dfcc6016 FIX exclude element of the select 2018-08-03 14:54:21 +02:00
Philippe
4d72573484 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2018-05-21 14:44:22 +02:00
Philippe
cbf12b779d Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2018-02-21 12:50:23 +01:00
Philippe
7406d3c7ee Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2018-01-11 15:32:52 +01:00
Philippe
bcbbcc1c66 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2018-01-11 09:13:46 +01:00
Philippe
e66847d5c3 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2018-01-05 14:47:04 +01:00
Philippe
dd8ef47a25 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2017-12-18 15:37:46 +01:00
Philippe
2f2b0630e2 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2017-11-23 21:52:11 +01:00
Philippe
26e3593c98 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2017-10-25 14:15:59 +02:00
Philippe
c88f5c560c Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2017-09-06 15:30:45 +02:00
Philippe
04466651d6 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0 2017-07-27 14:28:28 +02:00
28 changed files with 253 additions and 73 deletions

1
.gitignore vendored
View File

@@ -12,6 +12,7 @@ dolibarr_install.log
upgrade.log
doxygen_warnings.log
/.project
/.vscode
.DS_Store
.idea
*.iml

View File

@@ -2,6 +2,68 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 7.0.4 compared to 7.0.3 *****
FIX: #8984 button create expense report
FIX: #9032
FIX: #9161
FIX: #9328
FIX: According to french law, if seller is in France and buyer isn't in UE and isn't a company, TVA used = TVA product
FIX: Add calls to fetchComments function
FIX: better compatibility with multicompany
FIX: case when we valid form with keyboard
FIX: character making error on bill list
FIX: check !empty exclude select element
FIX: combo into popup become crazy with IE10
FIX: combo of stock in popup are crazy in IE
FIX: Deletion of files in migration
FIX: exclude element of the select
FIX: extrafieldkey
FIX: Fetch function will fetch comments
FIX: Fetch task will now fetch comments
FIX: filter supplier invoice list by societe name.
FIX: $fk_account is always empty, must be $soc->fk_account
FIX: Force stripe api version to avoid trouble if we update stripe api
FIX: getEntity project and not projet
FIX: Get templates in a forced language
FIX: global $mysoc missing (to avoid php notice on lines 279, 280 & 281)
FIX: Injection
FIX: invoice stats: situation invoices were not counted
FIX: keep context filter on contact list on change column displayed
FIX: Keep same project when creating shipping from order
FIX: langs fr
FIX: Lose filter on payment type or category after a sort on invoice list
FIX: Missing behavior
FIX: missing hook to edit sql
FIX: multicompany compatibility !
FIX: need to filter on current entity on replenish
FIX: Option MAIN_DISABLE_NOTES_TAB #9611
FIX: page must always be 0 when we search (to avoid case : when we're on page 3 and we're looking for a precise thirdparty, we stay on page 3 and nothing's displaied)
FIX: Pagination on related item pages
FIX: Pagination on withdraw request list
FIX: PDF address: handle when contact thirdparty different from document thirdparty
FIX: PHP warning, undefined index notnull
FIX: Product marge tabs on product card
FIX: Product margin tab and credit note
FIX: propal: correctly preset project when creating with origin/originid
FIX: remain to pay for credit note was wrong on invoice list
FIX: remove debug
FIX: Remove fetchComments from project and task fetch function
FIX: remove rowid for multicompany compatibility
FIX: Search on Ref project on order list
FIX: search on ref project on propal list
FIX: showOptionals: column mismatches
FIX: SQL Injections reported by mu shcor (ADLab of Venustech)
FIX: stock replenish with multientity
FIX: table llx_chargessociales doesn't exists
FIX: we must see number of all shared projects
FIX: when stock is empty for current entity but > 0 in other entity, until this commit product wasn't displaied on replenishment, it must depends on multientity stock sharing
FIX: when we're just admin and not super admin, if we create new user with transverse mode, we don't see it then we can't add him in usergroup
FIX: wrong function name
FIX: Wrong position of firstname lastname
FIX: wrong value for module part and return access denied
FIX: Wrong variable and trigger name
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
FIX: 7.0 task contact card without withproject parameters
FIX: #8722
@@ -484,6 +546,32 @@ Following changes may create regressions for some external modules, but were nec
multicompany module to a version that support Dolibarr v7, everything should work as expected.
***** ChangeLog for 6.0.8 compared to 6.0.7 *****
FIX: #8762
FIX: #9032
FIX: case when we valid form with keyboard
FIX: clause must not be there
FIX: dol_delete_file must work in a context without db handler loaded
FIX: entity test must be on product_fourn_price table and not product table
FIX: Fetch shipping will now fetch project id
FIX: $fk_account is always empty, must be $soc->fk_account
FIX: getEntity project and not projet
FIX: If we enable 3 steps for supplier order approbation, we must not delete all fourn rights def.
FIX: Keep supplier proposal price for supplier order
FIX: langs fr
FIX: missing filters during reordering
FIX: need to filter on aa.entity for same accounting accounts available in several entities
FIX: page must always be 0 when we search (to avoid case : when we're on page 3 and we're looking for a precise thirdparty, we stay on page 3 and nothing's displaied)
FIX: PDF address: handle when contact thirdparty different from document thirdparty
FIX: propal: correctly preset project when creating with origin/originid
FIX: pu_ht_devise was not converted to numeric so decimals were lost when calculating total_ht_devise
FIX: remain to pay for credit note was wrong on invoice list
FIX: shipment: fk_proje(c)t not handled in fetch() and update() methods
FIX: showOptionals: column mismatches
FIX: sometimes amounts are identical but php find them different.
FIX: test is_erasable() must be done before call function delete() too to avoid delete invoice with &action=delete in url
FIX: we must see number of all shared projects
FIX: wrong var name
***** ChangeLog for 6.0.7 compared to 6.0.6 *****
FIX: #8023

View File

@@ -59,11 +59,15 @@ $now = dol_now();
if ($user->societe_id > 0)
accessforbidden();
$hookmanager->initHooks(array('sellsjournal'));
$parameters=array();
/*
* Actions
*/
$reshook=$hookmanager->executeHooks('doActions',$parameters,$user,$action); // Note that $action and $object may have been modified by some hooks
// Get informations of journal
$accountingjournalstatic = new AccountingJournal($db);
$accountingjournalstatic->fetch($id_journal);

View File

@@ -1611,7 +1611,7 @@ if ($id > 0)
$var=true;
print $formfile->showdocuments('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang);
print $formfile->showdocuments('actions',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang);
print '</div><div class="fichehalfright"><div class="ficheaddleft">';

View File

@@ -12,6 +12,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -1018,6 +1019,7 @@ class Propal extends CommonObject
// Add linked object (deprecated, use ->linkedObjectsIds instead)
if (! $error && $this->origin && $this->origin_id)
{
dol_syslog('Deprecated use of linked object, use ->linkedObjectsIds instead', LOG_WARNING);
$ret = $this->add_object_linked();
if (! $ret) dol_print_error($this->db);
}
@@ -1090,13 +1092,6 @@ class Propal extends CommonObject
}
}
// Add linked object
if (! $error && $this->origin && $this->origin_id)
{
$ret = $this->add_object_linked();
if (! $ret) dol_print_error($this->db);
}
// Set delivery address
if (! $error && $this->fk_delivery_address)
{

View File

@@ -1677,10 +1677,11 @@ class Commande extends CommonOrder
// Retrieve all extrafields for invoice
// fetch optionals attributes and labels
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields=new ExtraFields($this->db);
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
$this->fetch_optionals($this->id,$extralabels);
// require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
// $extrafields=new ExtraFields($this->db);
// $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
// $this->fetch_optionals($this->id,$extralabels);
$this->fetch_optionals();
$this->db->free($result);
@@ -1882,6 +1883,9 @@ class Commande extends CommonOrder
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
$line->fetch_optionals();
$this->lines[$i] = $line;
$i++;

View File

@@ -1353,10 +1353,12 @@ class Facture extends CommonInvoice
// Retrieve all extrafield for invoice
// fetch optionals attributes and labels
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields=new ExtraFields($this->db);
$extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
$this->fetch_optionals($this->id,$extralabels);
// require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
// $extrafields=new ExtraFields($this->db);
// $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true);
// $this->fetch_optionals($this->id,$extralabels);
$this->fetch_optionals();
/*
* Lines
@@ -1477,7 +1479,7 @@ class Facture extends CommonInvoice
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
// TODO Fetch optional like done in fetch line of facture_rec ?
$line->fetch_optionals();
$this->lines[$i] = $line;

View File

@@ -84,8 +84,8 @@ class FactureStats extends Stats
$this->where.=" AND f.fk_soc = ".$this->socid;
}
if ($this->userid > 0) $this->where.=' AND f.fk_user_author = '.$this->userid;
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $this->where.= " AND f.type IN (0,1,2)";
else $this->where.= " AND f.type IN (0,1,2,3)";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $this->where.= " AND f.type IN (0,1,2,5)";
else $this->where.= " AND f.type IN (0,1,2,3,5)";
}

View File

@@ -451,7 +451,7 @@ if ($search_month > 0)
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $serch_year))."'";
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$month."'";
}
@@ -876,7 +876,8 @@ if ($resql)
print "</tr>\n";
$projectstatic=new Project($db);
$discount = new DiscountAbsolute($db);
if ($num > 0)
{
$i=0;
@@ -890,6 +891,9 @@ if ($resql)
$facturestatic->ref=$obj->ref;
$facturestatic->type=$obj->type;
$facturestatic->statut=$obj->fk_statut;
$facturestatic->total_ttc=$obj->total_ttc;
$facturestatic->paye=$obj->paye;
$facturestatic->fk_soc=$obj->fk_soc;
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);
$facturestatic->note_public=$obj->note_public;
$facturestatic->note_private=$obj->note_private;
@@ -909,7 +913,12 @@ if ($resql)
$totalcreditnotes = $facturestatic->getSumCreditNotesUsed();
$totaldeposits = $facturestatic->getSumDepositsUsed();
$totalpay = $paiement + $totalcreditnotes + $totaldeposits;
$remaintopay = $obj->total_ttc - $totalpay;
$remaintopay = $facturestatic->total_ttc - $totalpay;
if ($facturestatic->type == Facture::TYPE_CREDIT_NOTE && $obj->paye == 1) {
$remaincreditnote = $discount->getAvailableDiscounts($obj->fk_soc, '', 'rc.fk_facture_source='.$facturestatic->id);
$remaintopay = -$remaincreditnote;
$totalpay = $facturestatic->total_ttc - $remaintopay;
}
print '<tr class="oddeven">';
if (! empty($arrayfields['f.facnumber']['checked']))

View File

@@ -409,18 +409,44 @@ class CMailFile
// TODO if (! empty($moreinheader)) ...
// Give the message a subject
$this->message->setSubject($this->encodetorfc2822($subject));
try {
$this->message->setSubject($subject);
} catch (Exception $e) {
$this->error = $e->getMessage();
}
// Set the From address with an associative array
//$this->message->setFrom(array('john@doe.com' => 'John Doe'));
if (! empty($from)) $this->message->setFrom($this->getArrayAddress($from));
if (! empty($from)) {
try {
$result = $this->message->setFrom($this->getArrayAddress($from));
} catch (Exception $e) {
$this->error = $e->getMessage();
}
}
// Set the To addresses with an associative array
if (! empty($to)) $this->message->setTo($this->getArrayAddress($to));
if (! empty($to)) {
try {
$result = $this->message->setTo($this->getArrayAddress($to));
} catch (Exception $e) {
$this->error = $e->getMessage();
}
}
if (! empty($from)) $this->message->SetReplyTo($this->getArrayAddress($from));
if (! empty($from)) {
try {
$result = $this->message->SetReplyTo($this->getArrayAddress($from));
} catch (Exception $e) {
$this->error = $e->getMessage();
}
}
$this->message->setCharSet($conf->file->character_set_client);
try {
$result = $this->message->setCharSet($conf->file->character_set_client);
} catch (Exception $e) {
$this->error = $e->getMessage();
}
if (! empty($this->html))
{

View File

@@ -749,7 +749,7 @@ function xml2php($xml)
}
//Let see if the new child is not in the array
if($tab==false && in_array($key,array_keys($array)))
if($tab === false && in_array($key,array_keys($array)))
{
//If this element is already in the array we will create an indexed array
$tmp = $array[$key];
@@ -758,7 +758,7 @@ function xml2php($xml)
$array[$key][] = $child;
$tab = true;
}
elseif($tab == true)
elseif($tab === true)
{
//Add an element in an existing array
$array[$key][] = $child;

View File

@@ -1213,6 +1213,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
global $param;
dol_include_once('/comm/action/class/actioncomm.class.php');
// Check parameters
if (! is_object($filterobj) && ! is_object($objcon)) dol_print_error('','BadParameter');
@@ -1261,6 +1263,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'product'";
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
}
//TODO check how ot work with new table actioncomm_resources and multiple contact affectation
if (is_object($objcon) && $objcon->id) $sql.= " AND a.fk_contact = ".$objcon->id;
// Condition on actioncode
if (! empty($actioncode))
@@ -1297,6 +1300,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
{
$obj = $db->fetch_object($resql);
$contactaction = new ActionComm($db);
$contactaction->id=$obj->id;
$result = $contactaction->fetchResources();
if ($result<0) {
dol_print_error($db);
setEventMessage("company.lib::show_actions_done Error fetch ressource",'errors');
}
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
//if ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
$tododone='';
@@ -1318,6 +1329,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
'userphoto'=>$obj->user_photo,
'contact_id'=>$obj->fk_contact,
'socpeopleassigned' => $contactaction->socpeopleassigned,
'lastname'=>$obj->lastname,
'firstname'=>$obj->firstname,
'fk_element'=>$obj->fk_element,
@@ -1470,7 +1482,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$out.=getTitleFieldOfList($langs->trans("Label"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
$out.=getTitleFieldOfList($langs->trans("Date"), 0, $_SERVER["PHP_SELF"], 'a.datep,a.id', '', $param, 'align="center"', $sortfield, $sortorder);
$out.=getTitleFieldOfList('');
$out.=getTitleFieldOfList($langs->trans("ActionOnContact"), 0, $_SERVER["PHP_SELF"], 'a.fk_contact', '', $param, '', $sortfield, $sortorder);
$out.=getTitleFieldOfList($langs->trans("ActionOnContact"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
$out.=getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, 'align="center"', $sortfield, $sortorder);
$out.=getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
$out.='</tr>';
@@ -1617,10 +1629,28 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$contactstatic->firstname=$histo[$key]['firstname'];
$contactstatic->id=$histo[$key]['contact_id'];
$out.='<td width="120">'.$contactstatic->getNomUrl(1,'',10).'</td>';
}
else
{
$out.='<td>&nbsp;</td>';
} elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
$out .= '<td>';
foreach ( $histo[$key]['socpeopleassigned'] as $cid => $Tab ) {
$contact = new Contact($db);
$result = $contact->fetch($cid);
if ($result < 0)
dol_print_error($db, $contact->error);
if ($result > 0) {
$out .= $contact->getNomUrl(1);
if (isset($histo[$key]['acode']) && $histo[$key]['acode'] == 'AC_TEL') {
if (! empty($contact->phone_pro))
$out .= '(' . dol_print_phone($contact->phone_pro) . ')';
}
$out .= '<div class="paddingright"></div>';
}
}
$out .= '</td>';
}
else {
$out.='<td>&nbsp;</td>';
}
// Status

View File

@@ -2806,7 +2806,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
if ($picto == 'off') { $fakey = 'fa-square-o'; $fasize='1.3em'; }
if ($picto == 'on') { $fakey = 'fa-check-square-o'; $fasize='1.3em'; }
$enabledisablehtml='';
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'">';
$enabledisablehtml.='<span class="fa '.$fakey.' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'>';
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $enabledisablehtml.=$titlealt;
$enabledisablehtml.='</span>';
return $enabledisablehtml;
@@ -4744,6 +4744,12 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer,
}
}
// Si (vendeur en France et acheteur hors Communaute europeenne et acheteur particulier) alors TVA par defaut=TVA du produit vendu. Fin de regle
if (! empty($conf->global->MAIN_USE_VAT_OF_PRODUCT_FOR_INDIVIDUAL_CUSTOMER_OUT_OF_EEC) && empty($buyer_in_cee) && !$thirdparty_buyer->isACompany())
{
return get_product_vat_for_country($idprod,$thirdparty_seller,$idprodfournprice);
}
// Sinon la TVA proposee par defaut=0. Fin de regle.
// Rem: Cela signifie qu'au moins un des 2 est hors Communaute europeenne et que le pays differe
//print 'VATRULE 5';

View File

@@ -437,15 +437,15 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
} else {
$companytouseforaddress = $targetcompany;
// Contact on a thirdparty that is a different thirdparty than the thirdparty of object
if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id)
{
$targetcontact->fetch_thirparty();
// Contact on a thirdparty that is a different thirdparty than the thirdparty of object
if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id)
{
$targetcontact->fetch_thirdparty();
$companytouseforaddress = $targetcontact->thirdparty;
}
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($companytouseforaddress));
}
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($companytouseforaddress));
}
// Country
if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) {
$stringaddress.= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code));

View File

@@ -7,6 +7,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -865,7 +866,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetXY($col1x, $tab2_top + 0);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$pdf->SetXY($col2x, $tab2_top + 0);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1);
@@ -1316,7 +1317,7 @@ class pdf_einstein extends ModelePDFCommandes
{
$top_shift = $pdf->getY() - $current_y;
}
if ($showaddress)
{
// Sender properties
@@ -1430,4 +1431,3 @@ class pdf_einstein extends ModelePDFCommandes
}
}

View File

@@ -8,6 +8,7 @@
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -1064,7 +1065,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY($col1x, $tab2_top + 0);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$pdf->SetXY($col2x, $tab2_top + 0);
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (! empty($object->remise)?$object->remise:0)), 0, $outputlangs), 0, 'R', 1);
@@ -1799,4 +1800,3 @@ class pdf_crabe extends ModelePDFFactures
}
}

View File

@@ -7,6 +7,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017-2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -1012,7 +1013,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetXY($col1x, $tab2_top + 0);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$pdf->SetXY($col2x, $tab2_top + 0);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1);
@@ -1501,7 +1502,7 @@ class pdf_azur extends ModelePDFPropales
{
$top_shift = $pdf->getY() - $current_y;
}
if ($showaddress)
{
// Sender properties
@@ -1644,4 +1645,3 @@ class pdf_azur extends ModelePDFPropales
return ($tab_hl*7);
}
}

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -600,7 +601,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetXY($col1x, $tab2_top + 0);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$pdf->SetXY($col2x, $tab2_top + 0);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + $object->remise), 0, 'R', 1);
@@ -1096,7 +1097,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$object->fetch_user($arrayidcontact[0]);
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
}
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
// Show sender
@@ -1194,4 +1195,3 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
}
}

View File

@@ -5,6 +5,7 @@
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -772,7 +773,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetXY($col1x, $tab2_top + 0);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$total_ht = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
$pdf->SetXY($col2x, $tab2_top + 0);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1);
@@ -1221,7 +1222,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$object->fetch_user($arrayidcontact[0]);
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
}
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
// Show sender
@@ -1319,4 +1320,3 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
}

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -42,7 +43,7 @@ print '});'."\n";
print '$("#show-'.$blocname.'").click(function(){'."\n";
print ' setShowHide(1);'."\n";
print ' $("#'.$blocname.'").show("blind", {direction: "vertical"}, 300).addClass("nohideobject");'."\n";
print ' $("#'.$blocname.'_bloc").show("blind", {direction: "vertical"}, 300).addClass("nohideobject");'."\n";
print ' $(this).hide();'."\n";
print ' $("#hide-'.$blocname.'").show();'."\n";
print '});'."\n";

View File

@@ -1766,6 +1766,7 @@ MAIN_PDF_MARGIN_TOP=Top margin on PDF
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups
EnterCalculationRuleIfPreviousFieldIsYes=Enter calculcation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2')
NothingToSetup=There is no specific setup to do for this module.
##### Resource ####
ResourceSetup=Configuration du module Resource
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).

View File

@@ -122,7 +122,7 @@ MyAvailability=Ma disponibilité
ActionType=Type événement
DateActionBegin=Date début événément
CloneAction=Cloner l'événement
ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner cette facture <b>%s</b> ?
ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner l'événement <b>%s</b> ?
RepeatEvent=Evénement répétitif
EveryWeek=Chaque semaine
EveryMonth=Chaque mois

View File

@@ -138,9 +138,9 @@ if ($id > 0 || ! empty($ref))
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.type,";
if (!$user->rights->societe->client->voir && !$socid) $sql.= " sc.fk_soc, sc.fk_user,";
$sql.= " sum(d.total_ht) as selling_price,"; // may be negative or positive
$sql.= " sum(d.qty) as qty,";
$sql.= " sum(d.qty * d.buy_price_ht) as buying_price,"; // always positive
$sql.= " sum(abs(d.total_ht) - (d.buy_price_ht * d.qty)) as marge" ; // always positive
$sql.= " IF(f.type = 2, -1, 1) * sum(d.qty) as qty,"; // not always positive in case of Credit note
$sql.= " IF(f.type = 2, -1, 1) * sum(d.qty * d.buy_price_ht) as buying_price,"; // not always positive in case of Credit note
$sql.= " IF(f.type = 2, -1, 1) * sum(abs(d.total_ht) - (d.buy_price_ht * d.qty)) as marge" ; // not always positive in case of Credit note
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";

View File

@@ -338,7 +338,7 @@ if ($resql)
// Real stock
print '<td align="right">';
if ($objp->seuil_stock_alerte != '' && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' ';
print $objp->stock_physique;
print $objp->stock_physique|0;
print '</td>';
// Details per warehouse

View File

@@ -185,6 +185,7 @@ if ($action == 'order' && isset($_POST['valid']))
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur";
$sql.= " WHERE fk_soc = ".$suppliersid[$i];
$sql.= " AND source = 42 AND fk_statut = 0";
$sql.= " AND entity IN (".getEntity('commande_fournisseur').")";
$sql.= " ORDER BY date_creation DESC";
$resql = $db->query($sql);
if($resql && $db->num_rows($resql) > 0) {

View File

@@ -291,7 +291,7 @@ $listofreferent=array(
'title'=>"ListSupplierProposalsAssociatedProject",
'class'=>'SupplierProposal',
'table'=>'supplier_proposal',
'datefieldname'=>'date',
'datefieldname'=>'datec',
'urlnew'=>DOL_URL_ROOT.'/supplier_proposal/card.php?action=create&projectid='.$id.'&socid='.$socid,
'lang'=>'supplier_proposal',
'buttonnew'=>'AddSupplierProposal',
@@ -698,6 +698,9 @@ foreach ($listofreferent as $key => $value)
$urlnew=$value['urlnew'];
$buttonnew=$value['buttonnew'];
$testnew=$value['testnew'];
$exclude_select_element = array('payment_various');
if (!empty($value['exclude_select_element'])) $exclude_select_element[] = $value['exclude_select_element'];
if ($qualified)
{
@@ -718,7 +721,7 @@ foreach ($listofreferent as $key => $value)
if (! empty($conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS)) $idtofilterthirdparty.=','.$conf->global->PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS;
}
if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename, array('payment_various')))
if (empty($conf->global->PROJECT_LINK_ON_OVERWIEW_DISABLED) && $idtofilterthirdparty && !in_array($tablename,$exclude_select_element))
{
$selectList=$formproject->select_element($tablename, $idtofilterthirdparty, 'minwidth300');
if (! $selectList || ($selectList<0))

View File

@@ -87,7 +87,7 @@ class Societe extends CommonObject
* Thirdparty name
* @var string
* @deprecated Use $name instead
* @see name
* @see $name
*/
public $nom;
@@ -120,21 +120,21 @@ class Societe extends CommonObject
* State code
* @var string
* @deprecated Use state_code instead
* @see state_code
* @see $state_code
*/
var $departement_code;
/**
* @var string
* @deprecated Use state instead
* @see state
* @see $state
*/
var $departement;
/**
* @var string
* @deprecated Use country instead
* @see country
* @see $country
*/
var $pays;
@@ -308,7 +308,7 @@ class Societe extends CommonObject
/**
* @var string
* @deprecated Note is split in public and private notes
* @see note_public, note_private
* @see $note_public, $note_private
*/
var $note;
@@ -1882,24 +1882,33 @@ class Societe extends CommonObject
if (! empty($conf->global->SOCIETE_ADD_REF_IN_LIST) && (!empty($withpicto)))
{
$code = '';
if (($this->client) && (! empty ( $this->code_client ))
&& ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1
|| $conf->global->SOCIETE_ADD_REF_IN_LIST == 2
)
)
$code = $this->code_client . ' - ';
{
$code = $this->code_client . ' - ';
}
if (($this->fournisseur) && (! empty ( $this->code_fournisseur ))
&& ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1
|| $conf->global->SOCIETE_ADD_REF_IN_LIST == 3
)
)
$code .= $this->code_fournisseur . ' - ';
{
$code .= $this->code_fournisseur . ' - ';
}
if ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1)
{
$name =$code.' '.$name;
}
else
{
$name =$code;
}
}
if (!empty($this->name_alias)) $name .= ' ('.$this->name_alias.')';

View File

@@ -194,7 +194,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u2 ON u.fk_user = u2.rowid";
// TODO add hook
if (! empty($conf->multicompany->enabled)) {
if (! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
if (! empty($user->admin) && empty($user->entity)) {
if (! empty($user->admin)) {
if ($conf->entity == 1) {
$sql.= " WHERE u.entity IS NOT NULL";
} else {