Compare commits

...

88 Commits
6.0.1 ... 5.0.7

Author SHA1 Message Date
Laurent Destailleur
0b271cca46 Prepare 5.0.7 2017-10-29 10:38:57 +01:00
Laurent Destailleur
02f47b5a91 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-10-28 22:03:23 +02:00
Laurent Destailleur
4feecbeab8 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-10-28 22:03:06 +02:00
Laurent Destailleur
0630542e20 Merge pull request #7723 from atm-maxime/fix_contract_desc
Fix : contract lines from origin were containing all lines desc
2017-10-28 22:02:13 +02:00
Laurent Destailleur
783efd1a71 Merge pull request #7722 from fmarcet/4.0
FIX: paid supplier invoices are shown as abandoned
2017-10-28 22:01:30 +02:00
Maxime Kohlhaas
7c1d6251f7 Fix : contract lines from origin were containing all lines desc 2017-10-27 13:27:38 +02:00
Ferran Marcet
9178d80349 Merge remote-tracking branch 'origin/4.0' into 4.0 2017-10-27 11:52:15 +02:00
Ferran Marcet
bc8127d685 Fix: paid supplier invoices are shown as abandoned on the consumption card. 2017-10-27 11:52:05 +02:00
Laurent Destailleur
8e18d5906d Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-10-27 02:32:28 +02:00
Laurent Destailleur
f02e731c67 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts:
	htdocs/core/lib/project.lib.php
2017-10-27 02:32:09 +02:00
Laurent Destailleur
9bcf01bf3f Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-10-27 02:30:55 +02:00
Laurent Destailleur
fed0f3d09e Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/core/lib/project.lib.php
	htdocs/projet/class/task.class.php
2017-10-27 02:30:33 +02:00
Laurent Destailleur
07b25e457b Merge pull request #7652 from fappels/5.0_Fix_old_batch_not_shown_multi_shipping
FIX old batch not shown in multi shipping
2017-10-27 02:26:45 +02:00
Laurent Destailleur
78e3c63ead Update card.php 2017-10-27 02:26:37 +02:00
Laurent Destailleur
c48721e008 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-10-26 16:50:53 +02:00
Laurent Destailleur
0efd118d43 Fix hook on product list 2017-10-26 16:50:38 +02:00
fappels
eaafe83ae4 Only show old batch number and qty 2017-10-24 16:05:41 +02:00
Laurent Destailleur
c387436a68 Merge pull request #7671 from simnandez/4.0
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
2017-10-22 03:20:22 +02:00
Laurent Destailleur
fba3adbc5e Merge pull request #7670 from atm-ph/fix_5_0_empty_ref_shipment
Fix shipment ref is empty
2017-10-22 03:00:26 +02:00
Laurent Destailleur
b70808eca7 Merge pull request #7663 from tuxgasy/5.0_anchor_addline
Fix anchor after add line
2017-10-22 02:35:13 +02:00
Laurent Destailleur
8ac7dd8e9a Merge pull request #7660 from atm-gauthier/fix_project_time_spent
FIX : wrong personnal project time spent
2017-10-22 02:26:34 +02:00
Juanjo Menent
75580f253e FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart 2017-10-20 12:57:32 +02:00
atm-ph
08d5ff4736 Fix shipment ref is empty 2017-10-20 12:28:33 +02:00
Laurent Destailleur
fbc3be84e3 Merge pull request #7643 from atm-maxime/fix_dashboard_stats_links
Fix dashboard stats links
2017-10-19 19:26:49 +02:00
TuxGasy
9c3805c0d5 Fix anchor after add line 2017-10-19 14:10:58 +02:00
gauthier
3793ae323a FIX : wrong personnal project time spent 2017-10-19 09:46:19 +02:00
fappels
6b557fd92f Fix old batches not displayed in multi warehouse shipping
Old batches not available in product_lot table are not shown for
shipping from multiple warehouses
2017-10-17 22:19:45 +02:00
fappels
6ba7fe26a7 Merge remote-tracking branch 'refs/remotes/Dolibarr/5.0' into 5.0 2017-10-17 16:59:24 +02:00
Maxime Kohlhaas
b3f17dc614 Better with leftmenu 2017-10-16 20:20:55 +02:00
Maxime Kohlhaas
dac99c7745 Missing menus in links on index stats 2017-10-16 20:16:30 +02:00
Laurent Destailleur
20d4ba9ddd Merge pull request #7620 from atm-gauthier/fix_selectthirdparty
FIX : wrong key in selectarray
2017-10-13 00:46:15 +02:00
Laurent Destailleur
5ab88e629b Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-10-12 18:32:33 +02:00
Laurent Destailleur
463441c808 Fix bad table name 2017-10-12 18:32:10 +02:00
gauthier
1e7676d26f FIX : wrong key in selectarray 2017-10-12 09:30:04 +02:00
Laurent Destailleur
b4018846e8 Merge pull request #7610 from atm-arnaud/FIX_search_conciliated_bankentries
FIX bankentries search conciliated if val 0
2017-10-11 11:54:21 +02:00
arnaud
fd796723f2 FIX bankentries search conciliated if val 0 2017-10-10 17:15:01 +02:00
Laurent Destailleur
346c17b649 Merge pull request #7176 from atm-maxime/fix_member_search_pgsql
Fix : search on rowid don't work with pgsql and natural search
2017-10-05 10:39:17 +02:00
Laurent Destailleur
56acb2c08c Fix: with 5.0 and 6.0, supplier prices are always in main currency. The currency is not yet available in supplier prices.
Field to define the currency of supplier prices were added in database but not yet used by screen/code.
2017-10-05 10:38:58 +02:00
Maxime Kohlhaas
37b1b161f9 Merge branch '5.0' of github.com:atm-maxime/dolibarr into fix_member_search_pgsql 2017-10-03 18:15:01 +02:00
Maxime Kohlhaas
123c9d2315 Better fix only if bdd is pgsql 2017-10-03 18:12:17 +02:00
Maxime Kohlhaas
29a6c7e6ba Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-10-02 21:32:29 +02:00
Laurent Destailleur
ea5c54ad9c Merge pull request #7525 from hregis/5.0_bug2
Fix: two errors when you create invoice from shipping
2017-10-02 01:25:35 +02:00
Laurent Destailleur
ec8db116f8 Update llx_c_type_contact.sql 2017-10-02 01:25:28 +02:00
Laurent Destailleur
884fc5d249 Update facture.class.php 2017-10-02 01:25:00 +02:00
Laurent Destailleur
be84b52d19 Merge pull request #7518 from atm-ph/fix_5.0_hookmanager_situation_invoice
Fix the pdf_getlineprogress hook isn't use because hookmanager is null
2017-10-02 00:14:34 +02:00
Laurent Destailleur
7c690ae8b8 Merge pull request #7517 from simnandez/5.0
FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention
2017-10-02 00:14:05 +02:00
Regis Houssin
4a63e6b6ec Fix: two errors when you create invoice from shipping 2017-09-29 19:07:13 +02:00
atm-ph
7ba2dd8397 Fix the pdf_getlineprogress hook isn't use because hookmanager is null 2017-09-28 15:25:51 +02:00
Juanjo Menent
93cf135d5e FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention 2017-09-28 12:05:41 +02:00
Laurent Destailleur
3cc7f66e90 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-09-25 19:48:42 +02:00
Laurent Destailleur
ef61407d95 Merge pull request #7459 from fmarcet/4.0
Fix: #7358 User can't create holiday requests
2017-09-24 21:54:33 +02:00
Laurent Destailleur
5776a948c4 Update card.php 2017-09-24 21:54:26 +02:00
fmarcet
72108c3a4e Fix: #7358 User can't create holiday requests with 'Create/modify your leave requests' rights 2017-09-21 15:59:50 +02:00
Laurent Destailleur
f5bc9c08b1 Missing css 2017-09-19 11:38:28 +02:00
Maxime Kohlhaas
5018bf1baf Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-09-19 09:13:22 +02:00
Laurent Destailleur
278bcfa8da FIX #7148 2017-09-18 15:31:22 +02:00
Laurent Destailleur
52ebdcc27f Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0 2017-09-18 15:25:51 +02:00
Laurent Destailleur
4c97f5514d FIX #7366 renaming table with pgsql 2017-09-18 15:25:21 +02:00
Laurent Destailleur
c6f7687bbb Merge pull request #7423 from tuxgasy/5.0_stock_supports_services_fix
FIX Allow create shipping if STOCK_SUPPORTS_SERVICES option is enabled
2017-09-18 15:09:30 +02:00
TuxGasy
4043141ae3 Allow create shipping if STOCK_SUPPORTS_SERVICES option is enabled 2017-09-18 14:11:21 +02:00
Maxime Kohlhaas
5383df5246 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-09-18 09:58:15 +02:00
Laurent Destailleur
279988bd60 Remove warning 2017-09-16 12:45:54 +02:00
Maxime Kohlhaas
0608778b9c Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-09-12 11:00:28 +02:00
fappels
d5b7b7ec52 Merge remote-tracking branch 'refs/remotes/Dolibarr/5.0' into 5.0 2017-09-11 18:13:14 +02:00
Maxime Kohlhaas
18cbe31a84 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-09-07 09:10:24 +02:00
Maxime Kohlhaas
4638ebac8a Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-09-05 09:46:31 +02:00
Maxime Kohlhaas
49a29a16e6 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-08-31 09:02:21 +02:00
Maxime Kohlhaas
c3152a6343 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-08-28 10:32:04 +02:00
Maxime Kohlhaas
e1dd85d261 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-07-27 10:05:00 +02:00
Maxime Kohlhaas
4cab48a000 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-07-19 08:06:54 +02:00
Maxime Kohlhaas
f876833b9a Fix : search on rowid don't work with pgsql and natural search 2017-07-18 10:31:35 +02:00
Maxime Kohlhaas
ce534491fd Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-07-18 10:19:11 +02:00
Maxime Kohlhaas
843172ccc8 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-07-17 11:38:37 +02:00
Maxime Kohlhaas
794d638ded Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-07-11 09:37:45 +02:00
Maxime Kohlhaas
ba283377b9 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-07-09 10:13:02 +02:00
Maxime Kohlhaas
f8ad108da6 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-07-07 12:07:35 +02:00
Maxime Kohlhaas
98208b9963 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-28 00:33:24 +02:00
Maxime Kohlhaas
8eba418715 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-27 12:19:10 +02:00
Maxime Kohlhaas
ea616114a9 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-20 22:16:19 +02:00
Maxime Kohlhaas
166b5da560 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-20 09:29:26 +02:00
Maxime Kohlhaas
c8172d2b49 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-13 11:59:10 +02:00
Maxime Kohlhaas
ec5b304634 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-09 11:05:37 +02:00
Maxime Kohlhaas
e19de25297 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-08 11:36:02 +02:00
Maxime Kohlhaas
9b74a632e1 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-07 09:24:40 +02:00
Maxime Kohlhaas
5f6c63948e Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-01 13:06:32 +02:00
Maxime Kohlhaas
0b5adc7795 Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-06-01 11:55:54 +02:00
Maxime Kohlhaas
2f6fe2c65e Merge branch '5.0' of https://github.com/Dolibarr/dolibarr into 5.0 2017-05-30 14:10:20 +02:00
Maxime Kohlhaas
6ac08c3bee Fix : Product supplier price is related to supplier's currency 2017-05-29 10:32:17 +02:00
28 changed files with 169 additions and 121 deletions

View File

@@ -2,6 +2,22 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 5.0.7 compared to 5.0.6 *****
FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
FIX: #7148
FIX: #7325 Default VAT rate when editing template invoices is 0%
FIX: #7366 renaming table with pgsql
FIX: #7391
FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
FIX: Bad link to unpayed suppliers invoices
FIX: bankentries search conciliated if val 0
FIX: multicompany better accuracy in rounding and with revenue stamp.
FIX: PDF output was sharing 2 different currencies in same total
FIX: Upgrade missing on field
FIX: wrong key in selectarray
FIX: wrong personnal project time spent
***** ChangeLog for 5.0.6 compared to 5.0.5 *****
FIX: Removed a bad symbolic link into custom directory.
FIX: Renaming a resouce ref rename also the directory of attached files.

View File

@@ -96,6 +96,7 @@ $fieldstosearchall = array(
'd.note_public'=>'NotePublic',
'd.note_private'=>'NotePrivate',
);
if($db->type == 'pgsql') unset($fieldstosearchall['d.rowid']);
$arrayfields=array(
'd.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
'd.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),

View File

@@ -61,7 +61,7 @@ if (preg_match('/set_(.*)/',$action,$reg))
dol_print_error($db);
}
}
if (preg_match('/del_(.*)/',$action,$reg))
{
$code=$reg[1];
@@ -79,7 +79,7 @@ if (preg_match('/del_(.*)/',$action,$reg))
if ($action == 'add_currency')
{
$langs->loadCacheCurrencies('');
$code = GETPOST('code', 'alpha');
$rate = GETPOST('rate', 'alpha');
$currency = new MultiCurrency($db);
@@ -96,23 +96,23 @@ if ($action == 'add_currency')
elseif ($action == 'update_currency')
{
$submit = GETPOST('submit', 'alpha');
if ($submit == $langs->trans('Modify'))
{
$fk_multicurrency = GETPOST('fk_multicurrency', 'int');
$rate = GETPOST('rate', 'float');
$rate = price2num(GETPOST('rate', 'alpha'));
$currency = new MultiCurrency($db);
if ($currency->fetch($fk_multicurrency) > 0)
{
$currency->updateRate($rate);
}
}
}
elseif ($submit == $langs->trans('Delete'))
{
$fk_multicurrency = GETPOST('fk_multicurrency', 'int');
$currency = new MultiCurrency($db);
if ($currency->fetch($fk_multicurrency) > 0)
{
if ($currency->delete() > 0) setEventMessages($langs->trans('RecordDeleted'), array());
@@ -120,14 +120,14 @@ elseif ($action == 'update_currency')
}
}
}
elseif ($action == 'synchronize')
elseif ($action == 'synchronize')
{
$response = GETPOST('response');
$response = json_decode($response);
if ($response->success)
{
MultiCurrency::syncRates($response);
MultiCurrency::syncRates($response);
}
else
{
@@ -226,7 +226,7 @@ print '</form>';
print '</td></tr>';
*/
/* TODO uncomment when the functionality will integrated
/* TODO uncomment when the functionality will integrated
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").'</td>';
@@ -259,8 +259,8 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
print $langs->trans("Value").'&nbsp;<input type="button" id="bt_sync" class="button" onclick="javascript:getRates();" value="'.$langs->trans('Synchronize').'" />';
print '</form>';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td><a target="_blank" href="https://currencylayer.com">'.$langs->transnoentitiesnoconv("multicurrency_appId").'</a></td>';
@@ -273,7 +273,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").'</td>';
@@ -286,7 +286,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").'</td>';
@@ -299,7 +299,7 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION))
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print '</td></tr>';
print '</table>';
print '<br />';
}
@@ -334,7 +334,7 @@ print '</td></form></tr>';
foreach ($TCurrency as &$currency)
{
if($currency->code == $conf->currency) continue;
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$currency->code.' - '.$currency->name.'</td>';
@@ -363,7 +363,7 @@ print '
{
$("#bt_sync").attr("disabled", true);
var url_sync = "http://apilayer.net/api/live?access_key='.$conf->global->MULTICURRENCY_APP_ID.'&format=1'.(!empty($conf->global->MULTICURRENCY_APP_SOURCE) ? '&source='.$conf->global->MULTICURRENCY_APP_SOURCE : '').'";
$.ajax({
url: url_sync,
dataType: "jsonp"

View File

@@ -2,8 +2,8 @@
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
*
* 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
@@ -1317,6 +1317,7 @@ class ActionComm extends CommonObject
{
// Note: Output of sql request is encoded in $conf->file->character_set_client
// This assignment in condition is not a bug. It allows walking the results.
$diff = 0;
while ($obj=$this->db->fetch_object($resql))
{
$qualified=true;
@@ -1351,8 +1352,9 @@ class ActionComm extends CommonObject
if ($qualified && $datestart)
{
$eventarray[$datestart]=$event;
$eventarray[$datestart+$diff]=$event;
}
$diff++;
}
}
else

View File

@@ -2239,7 +2239,7 @@ if ($action == 'create')
// Show object lines
$result = $object->getLinesArray();
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
<input type="hidden" name="mode" value="">

View File

@@ -2433,7 +2433,7 @@ if ($action == 'create' && $user->rights->commande->creer)
*/
$result = $object->getLinesArray();
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
<input type="hidden" name="mode" value="">
@@ -2541,7 +2541,7 @@ if ($action == 'create' && $user->rights->commande->creer)
if (! empty($conf->expedition->enabled)) {
$numshipping = $object->nb_expedition();
if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfProductsLines() > 0) {
if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES))) {
if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)) {
if ($user->rights->expedition->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/expedition/shipment.php?id=' . $object->id . '">' . $langs->trans('CreateShipment') . '</a></div>';

View File

@@ -372,6 +372,8 @@ if (dol_strlen($search_dv_end) > 0) $param .= '&search_end_dvmonth=' . GETPOST
if ($search_req_nb) $param.='&amp;req_nb='.urlencode($search_req_nb);
if (GETPOST("thirdparty")) $param.='&amp;thirdparty='.urlencode(GETPOST("thirdparty"));
if ($optioncss != '') $param.='&optioncss='.$optioncss;
if(!empty($search_conciliated) || $search_conciliated === 0) $param.='&search_conciliated='.$search_conciliated;
// Add $param from extra fields
foreach ($search_array_options as $key => $val)
{

View File

@@ -3867,7 +3867,7 @@ else if ($id > 0 || ! empty($ref))
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
<input type="hidden" name="mode" value="">

View File

@@ -486,7 +486,8 @@ class Facture extends CommonInvoice
foreach ($exp->linkedObjectsIds['commande'] as $key => $value)
{
$originforcontact = 'commande';
$originidforcontact = $value->id;
if (is_object($value)) $originidforcontact = $value->id;
else $originidforcontact = $value;
break; // We take first one
}
}

View File

@@ -232,7 +232,7 @@ $tmp_companies = $form->select_thirdparty_list($socid,'socid',$filter,1, 0, 0, a
$companies = array();
foreach ($tmp_companies as $value) {
$companies[$value['value']] = $value['label'];
$companies[$value['key']] = $value['label'];
}
print '<div class="fichecenter"><div class="fichethirdleft">';

View File

@@ -327,7 +327,7 @@ if (empty($reshook))
$label = $lines[$i]->product_label;
}
$desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):'';
$desc = ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):'';
}
else {
$desc = dol_htmlentitiesbr($lines[$i]->desc);

View File

@@ -1753,6 +1753,8 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0)
*/
function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null)
{
if (empty($hookmanager)) global $hookmanager;
$reshook=0;
$result='';
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )

View File

@@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
function project_prepare_head($object)
{
global $db, $langs, $conf, $user;
$h = 0;
$head = array();
@@ -119,7 +119,7 @@ function project_prepare_head($object)
}
$head[$h][2] = 'agenda';
$h++;
complete_head_from_modules($conf,$langs,$object,$head,$h,'project','remove');
return $head;
@@ -492,7 +492,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, $addordertick);
$level--;
}
$total_projectlinesa_spent += $lines[$i]->duration;
$total_projectlinesa_planned += $lines[$i]->planned_workload;
if ($lines[$i]->planned_workload) $total_projectlinesa_spent_if_planned += $lines[$i]->duration;
@@ -556,9 +556,9 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
$lastprojectid=0;
$workloadforid=array();
$lineswithoutlevel0=array();
$numlines=count($lines);
// Create a smaller array with sublevels only to be used later. This increase dramatically performances.
if ($parent == 0) // Always and only if at first level
{
@@ -566,9 +566,10 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
{
if ($lines[$i]->fk_task_parent) $lineswithoutlevel0[]=$lines[$i];
}
}
}
//dol_syslog('projectLinesPerDay inc='.$inc.' preselectedday='.$preselectedday.' task parent id='.$parent.' level='.$level." count(lines)=".$numlines." count(lineswithoutlevel0)=".count($lineswithoutlevel0));
for ($i = 0 ; $i < $numlines ; $i++)
{
if ($parent == 0) $level = 0;
@@ -579,7 +580,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
if (empty($mine) || ! empty($tasksrole[$lines[$i]->id]))
{
//dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project);
// Break on a new project
if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid)
{
@@ -589,7 +590,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
$projectstatic->id = $lines[$i]->fk_project;
}
}
if (empty($workloadforid[$projectstatic->id]))
{
if ($preselectedday)
@@ -598,7 +599,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
$workloadforid[$projectstatic->id]=1;
}
}
$projectstatic->id=$lines[$i]->fk_project;
$projectstatic->ref=$lines[$i]->projectref;
$projectstatic->title=$lines[$i]->projectlabel;
@@ -641,7 +642,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
print $thirdpartystatic->getNomUrl(1, 'project', 10);
print '</td>';
}
// Planned Workload
print '<td align="right">';
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
@@ -716,16 +717,16 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
print '<textarea name="'.$lines[$i]->id.'note" rows="2" id="note">';
print '</textarea>';
print '</td>';
print "</tr>\n";
}
$inc++;
$level++;
if ($lines[$i]->id > 0)
if ($lines[$i]->id > 0)
{
if ($parent == 0) projectLinesPerDay($inc, $lines[$i]->id, $fuser, $lineswithoutlevel0, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $preselectedday, $var);
else projectLinesPerDay($inc, $lines[$i]->id, $fuser, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $preselectedday, $var);
else projectLinesPerDay($inc, $lines[$i]->id, $fuser, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $preselectedday, $var);
}
$level--;
}
@@ -766,7 +767,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
$lastprojectid=0;
$workloadforid=array();
$lineswithoutlevel0=array();
// Create a smaller array with sublevels only to be used later. This increase dramatically performances.
if ($parent == 0) // Always and only if at first level
{
@@ -777,18 +778,18 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
}
//dol_syslog('projectLinesPerWeek inc='.$inc.' firstdaytoshow='.$firstdaytoshow.' task parent id='.$parent.' level='.$level." count(lines)=".$numlines." count(lineswithoutlevel0)=".count($lineswithoutlevel0));
for ($i = 0 ; $i < $numlines ; $i++)
{
if ($parent == 0) $level = 0;
if ($lines[$i]->fk_task_parent == $parent)
{
// If we want all or we have a role on task, we show it
if (empty($mine) || ! empty($tasksrole[$lines[$i]->id]))
{
//dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project);
// Break on a new project
if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid)
{
@@ -796,13 +797,13 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
$lastprojectid=$lines[$i]->fk_project;
$projectstatic->id = $lines[$i]->fk_project;
}
if (empty($workloadforid[$projectstatic->id]))
{
$projectstatic->loadTimeSpent($firstdaytoshow, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week
$workloadforid[$projectstatic->id]=1;
}
print "<tr ".$bc[$var].">\n";
// Ref
@@ -845,7 +846,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
print $thirdpartystatic->getNomUrl(1, 'project');
print '</td>';
}
// Planned Workload
print '<td align="right">';
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
@@ -893,7 +894,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
}
//var_dump($projectstatic->weekWorkLoadPerTask);
// Fields to show current time
$tableCell=''; $modeinput='hours';
for ($idw = 0; $idw < 7; $idw++)
@@ -904,7 +905,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
$alreadyspent='';
if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($dayWorkLoad,'allhourmin');
$alttitle=$langs->trans("AddHereTimeSpentForDay",$tmparray['day'],$tmparray['mon']);
$tableCell ='<td align="center" class="hide'.$idw.'">';
if ($alreadyspent)
{
@@ -920,7 +921,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
print $tableCell;
}
dol_syslog("yyy");
print '<td align="right">';
if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
@@ -932,7 +933,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
// Call to show task with a lower level (task under the current task)
$inc++;
$level++;
if ($lines[$i]->id > 0)
if ($lines[$i]->id > 0)
{
if ($parent == 0) projectLinesPerWeek($inc, $firstdaytoshow, $fuser, $lines[$i]->id, $lineswithoutlevel0, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $var);
else projectLinesPerWeek($inc, $firstdaytoshow, $fuser, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask, $var);
@@ -1006,7 +1007,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
$projectstatic=new Project($db);
$thirdpartystatic=new Societe($db);
$sortfield='';
$sortorder='';
$project_year_filter=0;
@@ -1015,7 +1016,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
if (strcmp($statut, '') && $statut >= 0) $title=$langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$statut]);
$arrayidtypeofcontact=array();
print '<table class="noborder" width="100%">';
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
@@ -1058,11 +1059,11 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
$sql.= " AND (p.datee IS NULL OR p.datee >= ".$db->idate(dol_get_first_day($project_year_filter,1,false)).")";
}
}
// Get id of project we must show tasks
$arrayidofprojects=array();
$sql1 = "SELECT p.rowid as projectid";
$sql1.= $sql;
$sql1.= $sql;
$resql = $db->query($sql1);
if ($resql)
{
@@ -1077,7 +1078,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
}
else dol_print_error($db);
if (empty($arrayidofprojects)) $arrayidofprojects[0]=-1;
// Get list of project with calculation on tasks
$sql2 = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_soc, s.nom as socname, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_amount,";
$sql2.= " p.dateo, p.datee,";
@@ -1108,7 +1109,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
print_liste_field_titre($langs->trans("OpportunityAmount"),"","","","",'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("OpportunityStatus"),"","","","",'align="right"',$sortfield,$sortorder);
}
if (empty($conf->global->PROJECT_HIDE_TASKS))
if (empty($conf->global->PROJECT_HIDE_TASKS))
{
print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder);
if (! in_array('plannedworkload', $hiddenfields)) print_liste_field_titre($langs->trans("PlannedWorkload"),"","","","",'align="right"',$sortfield,$sortorder);
@@ -1116,7 +1117,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
}
print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder);
print "</tr>\n";
while ($i < $num)
{
$objp = $db->fetch_object($resql);
@@ -1134,7 +1135,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
$projectstatic->title = $objp->title;
$projectstatic->datee = $db->jdate($objp->datee);
$projectstatic->dateo = $db->jdate($objp->dateo);
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>';
@@ -1160,17 +1161,17 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
if ($code) print $langs->trans("OppStatus".$code);
print '</td>';
}
if (empty($conf->global->PROJECT_HIDE_TASKS))
if (empty($conf->global->PROJECT_HIDE_TASKS))
{
print '<td align="right">'.$objp->nb.'</td>';
$plannedworkload=$objp->planned_workload;
$total_plannedworkload+=$plannedworkload;
if (! in_array('plannedworkload', $hiddenfields))
{
print '<td align="right">'.($plannedworkload?convertSecondToTime($plannedworkload):'').'</td>';
}
if (! in_array('declaredprogress', $hiddenfields))
if (! in_array('declaredprogress', $hiddenfields))
{
$declaredprogressworkload=$objp->declared_progess_workload;
$total_declaredprogressworkload+=$declaredprogressworkload;
@@ -1180,7 +1181,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
print '</td>';
}
}
print '<td align="right">'.$projectstatic->getLibStatut(3).'</td>';
print "</tr>\n";
@@ -1199,7 +1200,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
print '<td class="liste_total" align="right">'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).'</td>';
print '<td class="liste_total" align="right">'.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).'</td>';
}
if (empty($conf->global->PROJECT_HIDE_TASKS))
if (empty($conf->global->PROJECT_HIDE_TASKS))
{
print '<td class="liste_total" align="right">'.$total_task.'</td>';
if (! in_array('plannedworkload', $hiddenfields)) print '<td class="liste_total" align="right">'.($total_plannedworkload?convertSecondToTime($total_plannedworkload):'').'</td>';
@@ -1207,7 +1208,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
}
print '<td class="liste_total"></td>';
print '</tr>';
$db->free($resql);
}
else

View File

@@ -272,12 +272,12 @@ class modFournisseur extends DolibarrModules
$this->rights[$r][5] = 'approve2';
}
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;
@@ -435,7 +435,7 @@ class modFournisseur extends DolibarrModules
// End add extra fields object
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
if(!$user->rights->societe->client->voir) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture_fourn as f';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)';
@@ -444,7 +444,7 @@ class modFournisseur extends DolibarrModules
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn as p ON pf.fk_paiementfourn = p.rowid';
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid';
$this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_invoice',1).')';
if(!$user->rights->societe->client->voir) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id;
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id;
// Order
$r++;

View File

@@ -212,7 +212,7 @@ if (empty($reshook))
$objectsrc->fetch($object->origin_id);
$object->socid = $objectsrc->socid;
$object->ref_customer = ''; // We don't use $objectsrc->ref_client, this is ref or order not shipment
$object->ref_customer = GETPOST('ref_customer'); // We don't use $objectsrc->ref_client, this is ref or order not shipment
$object->model_pdf = GETPOST('model');
$object->date_delivery = $date_delivery; // Date delivery planed
$object->fk_delivery_address = $objectsrc->fk_delivery_address;
@@ -692,7 +692,7 @@ if ($action == 'create')
else if ($origin == 'propal') print $langs->trans('RefCustomerOrder');
else print $langs->trans('RefCustomer');
print '</td><td colspan="3">';
print $object->ref_client;
print '<input type="text" name="ref_customer" value="'.$object->ref_client.'" />';
print '</td>';
print '</tr>';
@@ -1212,11 +1212,16 @@ if ($action == 'create')
print '<!-- Show details of lot -->';
print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
//print $langs->trans("DetailBatchFormat", $dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty);
$productlotObject->fetch(0, $line->fk_product, $dbatch->batch);
print $langs->trans("Batch").': '.$productlotObject->getNomUrl(1);
print ' ('.$dbatch->qty.')';
//print $langs->trans("DetailBatchFormat", 'ee'.$dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty);
if (!empty($productlotObject->batch))
{
print $langs->trans("Batch").': '.$productlotObject->getNomUrl(1);
print ' ('.$dbatch->qty.')';
}
else // When lot not found in lot table (this can happen with old record)
{
print $langs->trans("Batch").': '.$dbatch->batch.' ('.$dbatch->qty.')';
}
$quantityToBeDelivered -= $deliverableQty;
if ($quantityToBeDelivered < 0)
{

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014-2015 Charlie Benke <charlies@patas-monkey.com>
@@ -785,7 +785,8 @@ if (empty($reshook))
$parameters=array('id'=>$object->id);
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
{ $result=$object->updateExtraField($_POST["attribute"]);
{
$result=$object->insertExtraFields();
if ($result < 0)
{
$error++;

View File

@@ -1408,7 +1408,7 @@ class CommandeFournisseur extends CommonOrder
$result=$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->fk_soc); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$fourn_ref/$this->fk_soc
if ($result > 0)
{
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
$ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice
}
if ($result == 0) // If result == 0, we failed to found the supplier reference price

View File

@@ -2064,7 +2064,7 @@ elseif (! empty($object->id))
//$result = $object->getLinesArray();
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#addline':'#line_'.GETPOST('lineid')).'" method="POST">
<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
<input type="hidden" name="mode" value="">

View File

@@ -2584,7 +2584,7 @@ else
/*
* Lines
*/
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">';
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#addline':'#line_'.GETPOST('lineid')).'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">';
print '<input type="hidden" name="mode" value="">';

View File

@@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
$myparam = GETPOST("myparam");
$action=GETPOST('action', 'alpha');
$id=GETPOST('id', 'int');
$fuserid = (GETPOST('fuserid','int')?GETPOST('fuserid','int'):$user->id);
// Protection if external user
if ($user->societe_id > 0) accessforbidden();

View File

@@ -285,23 +285,23 @@ if (empty($user->societe_id))
// Dashboard Link lines
$links=array(
DOL_URL_ROOT.'/user/index.php',
DOL_URL_ROOT.'/societe/list.php?type=c',
DOL_URL_ROOT.'/societe/list.php?type=p',
DOL_URL_ROOT.'/societe/list.php?type=f',
DOL_URL_ROOT.'/contact/list.php',
DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies',
DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies',
DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies',
DOL_URL_ROOT.'/contact/list.php?mainmenu=companies',
DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members',
DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products',
DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products',
DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial',
DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial',
DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=accountancy',
DOL_URL_ROOT.'/contrat/list.php',
DOL_URL_ROOT.'/fichinter/list.php',
DOL_URL_ROOT.'/fourn/commande/list.php',
DOL_URL_ROOT.'/fourn/facture/list.php',
DOL_URL_ROOT.'/supplier_proposal/list.php',
DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders',
DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=accountancy&leftmenu=customers_bills',
DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=accountancy&leftmenu=suppliers_bills',
DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'
DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport'
);
// Translation lang files
$langfile=array("users",

View File

@@ -4,6 +4,7 @@
-- when current version is 4.0.0 or higher.
--
-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
-- -- VPGSQL8.2 ALTER SEQUENCE IF EXISTS llx_table_rowid_seq RENAME TO llx_table_new_rowid_seq;
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
@@ -120,6 +121,8 @@ create table llx_expensereport_extrafields
ALTER TABLE llx_expensereport_extrafields ADD INDEX idx_expensereport_extrafields (fk_object);
ALTER TABLE llx_cotisation RENAME TO llx_subscription;
-- VPGSQL8.2 ALTER SEQUENCE IF EXISTS llx_cotisation_rowid_seq RENAME TO llx_subscription_rowid_seq;
ALTER TABLE llx_subscription ADD UNIQUE INDEX uk_subscription (fk_adherent,dateadh);
ALTER TABLE llx_subscription CHANGE COLUMN cotisation subscription real;
ALTER TABLE llx_adherent_type CHANGE COLUMN cotisation subscription varchar(3) NOT NULL DEFAULT '1';

View File

@@ -33,7 +33,7 @@
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batchlot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) CHARACTER SET utf8;
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;

View File

@@ -426,13 +426,14 @@ else
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ',1);
$moreforfilter.='</div>';
}
if ($moreforfilter)
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $moreforfilter.=$hookmanager->resPrint;
else $moreforfilter=$hookmanager->resPrint;
if ($moreforfilter)
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
@@ -788,7 +789,7 @@ else
}
}
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp);
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation

View File

@@ -672,7 +672,7 @@ class Task extends CommonObject
$sql.= ", ".MAIN_DB_PREFIX."element_contact as ec2";
$sql.= ", ".MAIN_DB_PREFIX."c_type_contact as ctc2";
}
else
else
{
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid";
}
@@ -929,7 +929,7 @@ class Task extends CommonObject
$tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time");
$ret = $tasktime_id;
$this->timespent_id = $ret;
if (! $notrigger)
{
// Call trigger
@@ -993,10 +993,10 @@ class Task extends CommonObject
global $langs;
$id=$this->id;
if (empty($id))
if (empty($id))
{
dol_syslog("getSummaryOfTimeSpent called on a not loaded task", LOG_ERR);
return -1;
return -1;
}
$result=array();
@@ -1011,7 +1011,7 @@ class Task extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
$sql.= " WHERE t.fk_task = ".$id;
if ($userid > 0) $sql.=" AND t.fk_user = ".$userid;
dol_syslog(get_class($this)."::getSummaryOfTimeSpent", LOG_DEBUG);
$resql=$this->db->query($sql);
if ($resql)
@@ -1323,7 +1323,7 @@ class Task extends CommonObject
$clone_task->fetch($fromid);
$clone_task->fetch_optionals();
//var_dump($clone_task->array_options);exit;
$origin_task->fetch($fromid);
$defaultref='';
@@ -1637,7 +1637,7 @@ class Task extends CommonObject
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
}
/**
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
*
@@ -1647,12 +1647,12 @@ class Task extends CommonObject
function load_board($user)
{
global $conf, $langs;
$mine=0; $socid=$user->societe_id;
$projectstatic = new Project($this->db);
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1,$socid);
// List of tasks (does not care about permissions. Filtering will be done later)
$sql = "SELECT p.rowid as projectid, p.fk_statut as projectstatus,";
$sql.= " t.rowid as taskid, t.progress as progress, t.fk_statut as status,";
@@ -1675,29 +1675,29 @@ class Task extends CommonObject
if ($resql)
{
$task_static = new Task($this->db);
$response = new WorkboardResponse();
$response->warning_delay = $conf->projet->task->warning_delay/60/60/24;
$response->label = $langs->trans("OpenedTasks");
if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mainmenu=project';
else $response->url = DOL_URL_ROOT.'/projet/tasks/list.php?mode=mine&amp;mainmenu=project';
$response->img = img_object($langs->trans("Tasks"),"task");
// This assignment in condition is not a bug. It allows walking the results.
while ($obj=$this->db->fetch_object($resql))
{
$response->nbtodo++;
$task_static->projectstatus = $obj->projectstatus;
$task_static->progress = $obj->progress;
$task_static->fk_statut = $obj->status;
$task_static->date_end = $this->db->jdate($obj->datee);
if ($task_static->hasDelay()) {
$response->nbtodolate++;
}
}
return $response;
}
else
@@ -1706,7 +1706,7 @@ class Task extends CommonObject
return -1;
}
}
/**
* Is the task delayed?
*
@@ -1715,7 +1715,7 @@ class Task extends CommonObject
public function hasDelay()
{
global $conf;
if (! ($this->progress >= 0 && $this->progress < 100)) {
return false;
}
@@ -1725,5 +1725,5 @@ class Task extends CommonObject
$datetouse = ($this->date_end > 0) ? $this->date_end : ($this->datee > 0 ? $this->datee : 0);
return ($datetouse > 0 && ($datetouse < ($now - $conf->projet->task->warning_delay)));
}
}
}

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2015-2017 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@@ -245,7 +245,7 @@ if ($type_element == 'supplier_invoice')
{ // Supplier : Show products from invoices.
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$documentstatic=new FactureFournisseur($db);
$sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, ';
$sql_select = 'SELECT f.rowid as doc_id, f.ref as doc_number, \'1\' as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, ';
$tables_from = MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."facture_fourn_det as d";
$where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid;
$where.= " AND d.fk_facture_fourn = f.rowid";

View File

@@ -586,6 +586,12 @@ div.myavailability {
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowmax200 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowmax300 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 300px;
overflow: hidden;

View File

@@ -564,6 +564,12 @@ div.myavailability {
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowmax200 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tdoverflowmax300 {
max-width: 300px;
overflow: hidden;