Skip to content

Commit

Permalink
Merge branch '3.2' of https://github.com/Dolibarr/dolibarr.git into 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 28, 2012
2 parents 05de9c1 + 5c2ce8a commit e5c2d07
Show file tree
Hide file tree
Showing 44 changed files with 376 additions and 302 deletions.
1 change: 1 addition & 0 deletions COPYRIGHT
Expand Up @@ -51,6 +51,7 @@ Copyright (C) 2012
- Juanjo Menent <jmenent@2byte.es>
- Philippe Grand <philippe.grand@atoo-net.com>
- Jean Heimburger <jean@tiaris.info>
- Marcos García <marcosgdf@gmail.com>

Copyright (C) 2011
- Laurent Destailleur <eldy@users.sourceforge.net>
Expand Down
13 changes: 11 additions & 2 deletions ChangeLog
Expand Up @@ -18,8 +18,17 @@ English Dolibarr ChangeLog
- Fix: Allows to use a comma decimal separator in supplier invoices payments.
- Fix: Translation for tr_TR, es_ES, pt_BR.
- Fix: Products with no prices not visible.


- Fix: Access to product card created with very old version of Dolibarr.
- Fix: Delete temporary files after validating an invoice.
- Fix: preview of supplier order and invoice template.
- Fix: [ bug #485 ] Configurated amount for public auto-subscription form is not taken into account
- Fix: Average amount graphs weren't comparing the previous year stats
- Fix: Closed project didn't show the new status unless the page was refreshed
- Fix: Files were not being uploaded to a project's task
- Fix: [ bug #503 ] Unable to delete linked file to a deposit
- Fix: [ bug #501 ] Error while trying to modify an user
- Fix: [ bug #506 ] Can't set percentage of a started event
- Fix: Bad assignation of const for pdf delivery module name

***** ChangeLog for 3.2.0 compared to 3.1.3 *****
WARNING: PHP lower than 5.x are no more supported.
Expand Down
2 changes: 1 addition & 1 deletion build/pad/DoliWamp.pml
Expand Up @@ -4,7 +4,7 @@
<CompanyName />
<Program_Info>
<Program_Name>DoliWamp</Program_Name>
<Program_Version>3.2..0</Program_Version>
<Program_Version>3.2.1</Program_Version>
<Program_Release_Month>05</Program_Release_Month>
<Program_Release_Day>10</Program_Release_Day>
<Program_Release_Year>2012</Program_Release_Year>
Expand Down
2 changes: 1 addition & 1 deletion build/pad/Dolibarr.pml
Expand Up @@ -4,7 +4,7 @@
<CompanyName />
<Program_Info>
<Program_Name>Dolibarr</Program_Name>
<Program_Version>3.2.0</Program_Version>
<Program_Version>3.2.1</Program_Version>
<Program_Release_Month>05</Program_Release_Month>
<Program_Release_Day>10</Program_Release_Day>
<Program_Release_Year>2012</Program_Release_Year>
Expand Down
6 changes: 3 additions & 3 deletions build/pad/pad_dolibarr.xml
Expand Up @@ -34,9 +34,9 @@
</Company_Info>
<Program_Info>
<Program_Name>Dolibarr</Program_Name>
<Program_Version>3.2.0</Program_Version>
<Program_Release_Month>06</Program_Release_Month>
<Program_Release_Day>18</Program_Release_Day>
<Program_Version>3.2.1</Program_Version>
<Program_Release_Month>08</Program_Release_Month>
<Program_Release_Day>10</Program_Release_Day>
<Program_Release_Year>2012</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />
Expand Down
6 changes: 3 additions & 3 deletions build/pad/pad_doliwamp.xml
Expand Up @@ -34,9 +34,9 @@
</Company_Info>
<Program_Info>
<Program_Name>DoliWamp</Program_Name>
<Program_Version>3.2.0</Program_Version>
<Program_Release_Month>06</Program_Release_Month>
<Program_Release_Day>18</Program_Release_Day>
<Program_Version>3.2.1</Program_Version>
<Program_Release_Month>08</Program_Release_Month>
<Program_Release_Day>10</Program_Release_Day>
<Program_Release_Year>2012</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />
Expand Down
67 changes: 37 additions & 30 deletions htdocs/adherents/class/adherent.class.php
Expand Up @@ -708,36 +708,43 @@ function delete($rowid)
$resql=$this->db->query($sql);
if ($resql)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid;
dol_syslog(get_class($this)."::delete sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
if ($this->db->affected_rows($resql))
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers

$this->db->commit();
return 1;
}
else
{
// Rien a effacer
$this->db->rollback();
return 0;
}
}
else
{
$this->error=$this->db->error();
$this->db->rollback();
return -3;
}
// Remove linked user
$ret=$this->setUserId(0);
if ($ret > 0)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid;
dol_syslog(get_class($this)."::delete sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
if ($this->db->affected_rows($resql))
{
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf);
if ($result < 0) {
$error++; $this->errors=$interface->errors;
}
// Fin appel triggers

$this->db->commit();
return 1;
}
else
{
// Rien a effacer
$this->db->rollback();
return 0;
}
}
else
{
$this->error=$this->db->error();
$this->db->rollback();
return -3;
}
}
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/index.php
Expand Up @@ -247,7 +247,7 @@
$statictype->libelle=$obj->libelle;
print '<td>'.$staticmember->getNomUrl(1,24).'</td>';
print '<td>'.$statictype->getNomUrl(1,16).'</td>';
print '<td>'.dol_print_date($db->jdate($obj->date_end),'dayhour').'</td>';
print '<td>'.dol_print_date($db->jdate($obj->datem),'dayhour').'</td>';
print '<td align="right">'.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).'</td>';
print '</tr>';
$i++;
Expand Down
12 changes: 6 additions & 6 deletions htdocs/admin/barcode.php
@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@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
Expand Down Expand Up @@ -112,7 +112,7 @@

foreach($dirbarcode as $reldir)
{
$dir=dol_buildpath($reldir,0);
$dir=dol_buildpath($reldir);
$newdir=dol_osencode($dir);

// Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php)
Expand Down Expand Up @@ -334,4 +334,4 @@
$db->close();

llxFooter();
?>
?>
2 changes: 1 addition & 1 deletion htdocs/admin/tools/export.php
Expand Up @@ -158,7 +158,7 @@
if (! empty($dolibarr_main_db_pass))
{
$paramcrypted.=' -p"'.preg_replace('/./i','*',$dolibarr_main_db_pass).'"';
$paramclear.=' -p"'.str_replace('"','\"',$dolibarr_main_db_pass).'"';
$paramclear.=' -p"'.str_replace(array('"','`'),array('\"','\`'),$dolibarr_main_db_pass).'"';
}

print '<b>'.$langs->trans("RunCommandSummary").':</b><br>'."\n";
Expand Down
4 changes: 2 additions & 2 deletions htdocs/comm/action/fiche.php
Expand Up @@ -447,7 +447,7 @@ function setdatefields()
print '<tr><td>'.$langs->trans("Title").'</td><td><input type="text" name="label" size="60" value="'.GETPOST('label').'"></td></tr>';

// Full day
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td><input type="checkbox" id="fullday" name="fullday" '.(GETPOST('fullday')?' checked="checked"':'').'></td></tr>';

// Date start
$datep=$actioncomm->datep;
Expand Down Expand Up @@ -687,7 +687,7 @@ function setdatefields()
print '<tr><td>'.$langs->trans("Title").'</td><td colspan="3"><input type="text" name="label" size="50" value="'.$act->label.'"></td></tr>';

// Full day event
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($act->fulldayevent?' checked="checked"':'').'></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($act->fulldayevent?' checked="checked"':'').'></td></tr>';

// Date start
print '<tr><td nowrap="nowrap" class="fieldrequired">'.$langs->trans("DateActionStart").'</td><td colspan="3">';
Expand Down
15 changes: 8 additions & 7 deletions htdocs/comm/action/index.php
Expand Up @@ -744,11 +744,13 @@
if (empty($action) || $action == 'show_month') // View by month
{
$newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
echo '<table width="100%" class="nocellnopadd">';
echo ' <tr class="liste_titre">';
$i=0;
Expand Down Expand Up @@ -810,11 +812,13 @@
elseif ($action == 'show_week') // View by week
{
$newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter
echo '<table width="100%" class="nocellnopadd">';
echo ' <tr class="liste_titre">';
$i=0;
Expand Down Expand Up @@ -866,9 +870,6 @@
$newparam=$param; // newparam is for birthday links
$newparam=preg_replace('/action=show_month&?/i','',$newparam);
$newparam=preg_replace('/action=show_week&?/i','',$newparam);
$newparam=preg_replace('/day=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/month=[0-9][0-9]&?/i','',$newparam);
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
// Code to show just one day
$style='cal_current_month';
$today=0;
Expand Down
16 changes: 4 additions & 12 deletions htdocs/comm/propal/stats/index.php
@@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 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
Expand Down Expand Up @@ -66,7 +67,6 @@

// Build graphic number of object
$data = $stats->getNbByMonthWithPrevYear($endyear,$startyear);
//var_dump($data);
// $data = array(array('Lib',val1,val2,val3),...)


Expand Down Expand Up @@ -110,7 +110,6 @@

// Build graphic amount of object
$data = $stats->getAmountByMonthWithPrevYear($endyear,$startyear);
//var_dump($data);
// $data = array(array('Lib',val1,val2,val3),...)

if (!$user->rights->societe->client->voir || $user->societe_id)
Expand Down Expand Up @@ -151,13 +150,7 @@
$px2->draw($filenameamount,$fileurlamount);
}


$res = $stats->getAverageByMonth($year);
$data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);

if (!$user->rights->societe->client->voir || $user->societe_id)
{
Expand All @@ -177,8 +170,7 @@
if (! $mesg)
{
$px3->SetData($data);
//$i=$startyear;$legend=array();
$i=$endyear;$legend=array();
$i=$startyear;$legend=array();
while ($i <= $endyear)
{
$legend[]=$i;
Expand Down
5 changes: 3 additions & 2 deletions htdocs/commande/class/commandestats.class.php
@@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (c) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 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
Expand Down Expand Up @@ -73,7 +74,7 @@ function CommandeStats($db, $socid, $mode, $userid=0)
$this->from = MAIN_DB_PREFIX.$object->table_element." as c";
$this->from.= ", ".MAIN_DB_PREFIX."societe as s";
$this->field='total_ht';
$this->where.= " c.fk_statut > 0"; // Not draft and not cancelled
$this->where.= " c.fk_statut > 2"; // Only approved & ordered
}
$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;

Expand Down
12 changes: 4 additions & 8 deletions htdocs/commande/stats/index.php
@@ -1,6 +1,8 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 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
Expand Down Expand Up @@ -168,12 +170,7 @@
}


$res = $stats->getAverageByMonth($year);
$data = array();
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(ucfirst(dol_substr(dol_print_date(dol_mktime(12,0,0,$i,1,$year),"%b"),0,3)), $res[$i]);
}
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);

if (!$user->rights->societe->client->voir || $user->societe_id)
{
Expand All @@ -193,8 +190,7 @@
if (! $mesg)
{
$px3->SetData($data);
//$i=$startyear;$legend=array();
$i=$endyear;$legend=array();
$i=$startyear;$legend=array();
while ($i <= $endyear)
{
$legend[]=$i;
Expand Down

0 comments on commit e5c2d07

Please sign in to comment.