Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/Dolibarr/3.9' into 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fappels committed Jun 22, 2016
2 parents bd00265 + 386b19d commit 8b275c6
Show file tree
Hide file tree
Showing 133 changed files with 876 additions and 482 deletions.
41 changes: 41 additions & 0 deletions ChangeLog
Expand Up @@ -12,6 +12,47 @@ Upgrading to any other version or any other database system is abolutely require
make a Dolibarr upgrade.



***** ChangeLog for 3.9.2 compared to 3.9.1 *****
FIX: #4813 Won translation for the key OppStatusWON instead OppStatusWIN
FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists
FIX: #5236 Cron module activated but "Modules tools" does not appear in the left menu.
FIX: Accountancy - 3.9 - Chart of accounts are limited on only one country
FIX: bug on email template
FIX: Can't create a stock transfer from product card
FIX: can't fetch by siret or siren because of first "if"
FIX: Check stock of product by warehouse if $entrepot_id defined on shippings
FIX: Compatible with multicompany
FIX: Creation of the second ressource type fails.
FIX: end of select when no fournprice
FIX: Filter on assigned to was preselected on current user on list "All events" (instead of no filtering)
FIX: Filter on category tag for suppliers
FIX: hook on group card called but not initialized
FIX: Infinite loop on menu tree output for edition
FIX: Can show tree of entries added by external modules using fk_mainmenu and fk_leftmenu instead of fk_menu.
FIX: init var at wrong place report incorrect "shippable" flag on draft order.
FIX: It doesn't check if there is enough stock to update the lines of orders/invoices
FIX: Menu statistics was not visible if module proposal was not enabled
FIX: Merge manually PR #5161 - Bad translation key
FIX: missing column when module was installed before standard integration
FIX: Missing number total of modules
FIX: Not filtering correctly when coming from dashboard
FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH
FIX: Remove PHP Warning: Creating default object from empty value.
FIX: same page added several times on mergepropal option
FIX: search on date into supplier invoice list dont work because of status -1
FIX: Search supplier ref on contract
FIX: Split of credit note into discount page generates records not correctly recognised as credit note.
FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty
FIX: #5087
FIX: #5108
FIX: #5163
FIX: #5195
FIX: #5203
FIX: #5207
FIX: #5209
FIX: #5230

***** ChangeLog for 3.9.1 compared to 3.9.* *****
FIX: #3815 Call to undefined function local_by_date()
FIX: #4424 Missing email of user popup in supplier orders area
Expand Down
2 changes: 1 addition & 1 deletion build/makepack-dolibarr.pl
Expand Up @@ -379,7 +379,7 @@

print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
if ($ret =~ /already exists/)
if ($ret =~ /(already exists|existe déjà)/)
{
print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? ";
$QUESTIONOVERWRITETAG=<STDIN>;
Expand Down
4 changes: 3 additions & 1 deletion htdocs/accountancy/admin/account.php
Expand Up @@ -43,7 +43,9 @@
$search_pcgsubtype = GETPOST("search_pcgsubtype");

// Security check
if (! $user->admin)
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->chartofaccount)
accessforbidden();

$sortfield = GETPOST("sortfield", 'alpha');
Expand Down
9 changes: 6 additions & 3 deletions htdocs/accountancy/admin/fiscalyear.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@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
Expand Down Expand Up @@ -30,12 +30,15 @@
$langs->load("admin");
$langs->load("compta");

if (! $user->admin)
// Security check
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->fiscalyear)
accessforbidden();

$error = 0;

// List of statut
// List of status
static $tmpstatut2label = array (
'0' => 'OpenFiscalYear',
'1' => 'CloseFiscalYear'
Expand Down
7 changes: 3 additions & 4 deletions htdocs/accountancy/admin/index.php
@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
Expand Down Expand Up @@ -202,10 +202,9 @@
print "<td>";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';

$sql = "SELECT rowid, pcg_version, fk_pays, label, active";
$sql = "SELECT rowid, pcg_version, label, active";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
$sql .= " WHERE active = 1";
$sql .= " AND fk_pays = " . $mysoc->country_id;

dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
$resql = $db->query($sql);
Expand All @@ -221,7 +220,7 @@

print '<option value="' . $row[0] . '"';
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
print '>' . $row[1] . ' - ' . $row[3] . '</option>';
print '>' . $row[1] . ' - ' . $row[2] . '</option>';

$i ++;
}
Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/customer/index.php
Expand Up @@ -95,7 +95,7 @@
$sql1 .= " SET fd.fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accountingaccount as accnt';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';

Expand Down Expand Up @@ -393,4 +393,4 @@
print '</td></tr></table>';

llxFooter();
$db->close();
$db->close();
21 changes: 12 additions & 9 deletions htdocs/adherents/card.php
Expand Up @@ -1381,17 +1381,12 @@ function initfieldrequired()
print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1);
}

/*
* Confirm add in spip
*/
// Confirm add in spip
if ($action == 'add_spip')
{
print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
}

/*
* Confirm removed from spip
*/
// Confirm removed from spip
if ($action == 'del_spip')
{
print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
Expand Down Expand Up @@ -1556,8 +1551,16 @@ function initfieldrequired()
}
else
{
print $langs->trans("SubscriptionNotReceived");
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
if (! $adht->cotisation)
{
print $langs->trans("SubscriptionNotRecorded");
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
}
else
{
print $langs->trans("SubscriptionNotReceived");
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
}
}
print '</td></tr>';

Expand Down
12 changes: 10 additions & 2 deletions htdocs/adherents/card_subscriptions.php
Expand Up @@ -722,8 +722,16 @@
}
else
{
print $langs->trans("SubscriptionNotReceived");
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
if (! $adht->cotisation)
{
print $langs->trans("SubscriptionNotRecorded");
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
}
else
{
print $langs->trans("SubscriptionNotReceived");
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
}
}
print '</td></tr>';

Expand Down
54 changes: 20 additions & 34 deletions htdocs/admin/barcode.php
Expand Up @@ -62,21 +62,12 @@
}
else if ($action == 'update')
{
if (GETPOST('submit_GENBARCODE_LOCATION'))
{
$location = GETPOST('GENBARCODE_LOCATION','alpha');
$res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity);
}
if (GETPOST('submit_PRODUIT_DEFAULT_BARCODE_TYPE'))
{
$coder_id = GETPOST('PRODUIT_DEFAULT_BARCODE_TYPE','alpha');
$res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity);
}
if (GETPOST('submit_GENBARCODE_BARCODETYPE_THIRDPARTY'))
{
$coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha');
$res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity);
}
$location = GETPOST('GENBARCODE_LOCATION','alpha');
$res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity);
$coder_id = GETPOST('PRODUIT_DEFAULT_BARCODE_TYPE','alpha');
$res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity);
$coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha');
$res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity);
}
else if ($action == 'updateengine')
{
Expand Down Expand Up @@ -195,9 +186,9 @@
print '<br>';
print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'','');

print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"updateengine\">";
//print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
//print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
//print "<input type=\"hidden\" name=\"action\" value=\"updateengine\">";

print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
Expand Down Expand Up @@ -261,7 +252,7 @@
// Build barcode on disk (not used, this is done to make debug easier)
$result=$module->writeBarCode($obj->example,$obj->encoding,'Y');
// Generate on the fly and output barcode with generator
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding);
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&amp;generator='.urlencode($obj->coder).'&amp;code='.urlencode($obj->example).'&amp;encoding='.urlencode($obj->encoding);
//print $url;
print '<img src="'.$url.'" title="'.$obj->example.'" border="0">';
}
Expand Down Expand Up @@ -296,7 +287,7 @@
// TODO Implement code behind action updateengine
//print '<div class="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'"></div>';
}
print '</form>';
//print '</form>';

print "<br>";

Expand Down Expand Up @@ -331,9 +322,7 @@
$langs->load("errors");
print '<br><font class="error">'.$langs->trans("ErrorFileNotFound",$conf->global->GENBARCODE_LOCATION).'</font>';
}
print '</td>';
print '<td width="60" align="center"><input type="submit" class="button" name="submit_GENBARCODE_LOCATION" value="'.$langs->trans("Modify").'"></td>';
print '</tr>';
print '</td></tr>';
}

// Module products
Expand All @@ -344,10 +333,7 @@
print '<td>'.$langs->trans("SetDefaultBarcodeTypeProducts").'</td>';
print '<td width="60" align="right">';
$formbarcode->select_barcode_type($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE,"PRODUIT_DEFAULT_BARCODE_TYPE",1);
print '</td><td align="right">';
print '<input type="submit" class="button" name="submit_PRODUIT_DEFAULT_BARCODE_TYPE" value="'.$langs->trans("Modify").'">';
print "</td>";
print '</tr>';
print '</td></tr>';
}

// Module thirdparty
Expand All @@ -358,13 +344,13 @@
print '<td>'.$langs->trans("SetDefaultBarcodeTypeThirdParties").'</td>';
print '<td width="60" align="right">';
print $formbarcode->select_barcode_type($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY,"GENBARCODE_BARCODETYPE_THIRDPARTY",1);
print '</td><td align="right">';
print '<input type="submit" class="button" name="submit_GENBARCODE_BARCODETYPE_THIRDPARTY" value="'.$langs->trans("Modify").'">';
print "</td>";
print '</tr>';
print '</td></tr>';
}

print "</table>\n";
print '<div class="tabsAction">';
print '<input type="submit" class="button" name="submit_GENBARCODE_BARCODETYPE_THIRDPARTY" value="'.$langs->trans("Modify").'">';
print "</div>";
print '</form>';

print '<br>';
Expand Down Expand Up @@ -419,13 +405,13 @@

if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file")
{
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&value='.$file.'">';
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&amp;value='.$file.'">';
print img_picto($langs->trans("Activated"),'switch_on');
print '</a></td>';
}
else
{
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&value='.$file.'">';
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&amp;value='.$file.'">';
print img_picto($langs->trans("Disabled"),'switch_off');
print '</a></td>';
}
Expand All @@ -442,7 +428,7 @@
print "</table>\n";
}

print '</form>';
//print '</form>';

print "<br>";

Expand Down
16 changes: 12 additions & 4 deletions htdocs/admin/menus/edit.php
Expand Up @@ -271,7 +271,7 @@ function init_topleft()
</script>';

print load_fiche_titre($langs->trans("NewMenu"),'','title_setup');

print '<form action="./edit.php?action=add&menuId='.$_GET['menuId'].'" method="post" name="formmenucreate">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';

Expand All @@ -281,7 +281,7 @@ function init_topleft()
$parent_rowid = $_GET['menuId'];
if ($_GET['menuId'])
{
$sql = "SELECT m.rowid, m.mainmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".$_GET['menuId'];
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".$_GET['menuId'];
$res = $db->query($sql);
if ($res)
{
Expand All @@ -290,6 +290,7 @@ function init_topleft()
{
$parent_rowid = $menu['rowid'];
$parent_mainmenu = $menu['mainmenu'];
$parent_leftmenu = $menu['leftmenu'];
$parent_langs = $menu['langs'];
$parent_level = $menu['level'];
}
Expand Down Expand Up @@ -340,7 +341,9 @@ function init_topleft()
{
print '<td><input type="text" size="20" id="menuId" name="menuId" value="'.($_POST["menuId"]?$_POST["menuId"]:'').'"></td>';
}
print '<td>'.$langs->trans('DetailMenuIdParent').'</td></tr>';
print '<td>'.$langs->trans('DetailMenuIdParent');
print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def';
print '</td></tr>';

// Title
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" size="30" name="titre" value="'.$_POST["titre"].'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
Expand Down Expand Up @@ -418,7 +421,12 @@ function init_topleft()
print '<tr><td class="fieldrequired">'.$langs->trans('MenuIdParent').'</td>';
//$menu_handler
//print '<td><input type="text" size="50" name="handler" value="all"></td>';
print '<td>'.$menu->fk_menu.'</td>';
print '<td>';
$valtouse=$menu->fk_menu;
if ($menu->fk_mainmenu) $valtouse='fk_mainmenu='.$menu->fk_mainmenu;
if ($menu->fk_leftmenu) $valtouse.='&fk_leftmenu='.$menu->fk_leftmenu;
print $valtouse;
print '</td>';
print '<td>'.$langs->trans('DetailMenuIdParent').'</td></tr>';

// Niveau
Expand Down

0 comments on commit 8b275c6

Please sign in to comment.