Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
Browse files Browse the repository at this point in the history
develop

Conflicts:
	htdocs/langs/ca_ES/admin.lang
	htdocs/langs/es_ES/admin.lang

Change-Id: I3c2c0789a92fb3d5506c717986ce0127dec75b9b
  • Loading branch information
FHenry committed Apr 14, 2013
2 parents cc49749 + 263e909 commit 00fb40e
Show file tree
Hide file tree
Showing 116 changed files with 713 additions and 925 deletions.
10 changes: 7 additions & 3 deletions ChangeLog
Expand Up @@ -32,6 +32,7 @@ For users:
- New: Add option INVOICE_CAN_NEVER_BE_REMOVED.
- New: Enhance agenda module to reach RFC2445 (add busy information).
- New: Add module Opensurvey.
- New: Default aprrover for holidays i sby default hierchical parent.
- First change to prepare feature "click to print" (IPP) for PDF.

For translators:
Expand All @@ -58,10 +59,10 @@ For developers:
modules.

WARNING: If you used external modules, some of them may need to be upgraded due to:
- fields of classes were renamed to be normalized (nom, prenom, cp, ville, adresse were
renamed into lastname, firstname, zip, town, address).
- Fields of classes were renamed to be normalized (nom, prenom, cp, ville, adresse, tel
were renamed into lastname, firstname, zip, town, address, phone).
This may also be true for some fields into web services.
- if module use hook pdf_writelinedesc, module may have to add return 1 at end of
- If module use hook pdf_writelinedesc, module may have to add return 1 at end of
function to keep same behaviour.


Expand All @@ -76,6 +77,9 @@ WARNING: If you used external modules, some of them may need to be upgraded due
- Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment
- Fix: [ bug #794 ] Lost filter on zipcode in prospect list
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes
- Fix: [ bug #816 ] Sales journal does not reflect localtaxes
- Fix: Orderstoinvoice didn't act as expected when no order was checked



Expand Down
4 changes: 1 addition & 3 deletions htdocs/adherents/admin/adherent_extrafields.php
Expand Up @@ -58,8 +58,6 @@
* View
*/

$textobject=$langs->transnoentitiesnoconv("Members");

$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
llxHeader('',$langs->trans("MembersSetup"),$help_url);

Expand All @@ -73,7 +71,7 @@
dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user');


print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Members")).'<br>'."\n";
print '<br>';

// Load attribute_label
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/card_subscriptions.php
Expand Up @@ -505,7 +505,7 @@
print $form->showrefnav($object, 'rowid', $linkback);
print '</td></tr>';

$showphoto='<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">'.$form->showphoto('memberphoto',$object).'</td>';
$showphoto='<td rowspan="'.$rowspan.'" class="hideonsmartphone" align="center" valign="middle" width="25%">'.$form->showphoto('memberphoto',$object).'</td>';

// Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
Expand Down
5 changes: 3 additions & 2 deletions htdocs/adherents/fiche.php
Expand Up @@ -1015,7 +1015,7 @@ function initfieldrequired()
print $form->selectarray("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$object->morphy);
print "</td>";
// Photo
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
print '<td align="center" class="hideonsmartphone" valign="middle" width="25%" rowspan="'.$rowspan.'">';
print $form->showphoto('memberphoto',$object)."\n";
if ($caneditfieldmember)
{
Expand Down Expand Up @@ -1356,14 +1356,15 @@ function initfieldrequired()
print $form->showrefnav($object, 'rowid', $linkback);
print '</td></tr>';

$showphoto='<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
$showphoto='<td rowspan="'.$rowspan.'" align="center" class="hideonsmartphone" valign="middle" width="25%">';
$showphoto.=$form->showphoto('memberphoto',$object);
$showphoto.='</td>';

// Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td>';
// Photo
print $showphoto; $showphoto='';
print '</tr>';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/info.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
Expand Down
3 changes: 2 additions & 1 deletion htdocs/adherents/stats/geo.php
Expand Up @@ -23,8 +23,9 @@

require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';

$graphwidth = 700;
$graphwidth=DolGraph::getDefaultGraphSizeForStats('width',700);
$mapratio = 0.5;
$graphheight = round($graphwidth * $mapratio);

Expand Down
5 changes: 2 additions & 3 deletions htdocs/admin/agenda_extrafields.php
Expand Up @@ -76,8 +76,7 @@

dol_fiche_head($head, 'attributes', $langs->trans("Agenda"));


print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Agenda")).'<br>'."\n";
print '<br>';

// Load attribute_label
Expand Down Expand Up @@ -155,4 +154,4 @@
llxFooter();

$db->close();
?>
?>
8 changes: 8 additions & 0 deletions htdocs/admin/commande.php
Expand Up @@ -196,6 +196,14 @@
$conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1');
}
}
else if ($action=='setModuleOptions') {
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity))
{
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
$conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1');
}
}


/*
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/syslog.php
Expand Up @@ -98,14 +98,14 @@
if ($_POST[$option['constant']])
{
dolibarr_del_const($db, $option['constant'], 0);
dolibarr_set_const($db, $option['constant'], $_POST[$option['constant']], 'chaine');
dolibarr_set_const($db, $option['constant'], $_POST[$option['constant']], 'chaine',0, '', 0);
}
}
}
}
}

dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine');
dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine',0,'',0);

if (! $error)
{
Expand Down
12 changes: 6 additions & 6 deletions htdocs/bookmarks/fiche.php
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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 @@ -147,23 +147,23 @@

print '<table class="border" width="100%">';

print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("BookmarkTitle").'</td><td><input class="flat" name="title" size="30" value="'.$title.'"></td><td>'.$langs->trans("SetHereATitleForLink").'</td></tr>';
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("BookmarkTitle").'</td><td><input class="flat" name="title" size="30" value="'.$title.'"></td><td class="hideonsmartphone">'.$langs->trans("SetHereATitleForLink").'</td></tr>';

print '<tr><td class="fieldrequired">'.$langs->trans("UrlOrLink").'</td><td><input class="flat" name="url" size="50" value="'.$url.'"></td><td>'.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("UrlOrLink").'</td><td><input class="flat" name="url" size="50" value="'.$url.'"></td><td class="hideonsmartphone">'.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'</td></tr>';

print '<tr><td>'.$langs->trans("BehaviourOnClick").'</td><td>';
$liste=array(0=>$langs->trans("ReplaceWindow"),1=>$langs->trans("OpenANewWindow"));
print $form->selectarray('target',$liste,1);
print '</td><td>'.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'</td></tr>';
print '</td><td class="hideonsmartphone">'.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").'</td></tr>';

print '<tr><td>'.$langs->trans("Owner").'</td><td>';
$form->select_users(isset($_POST['userid'])?$_POST['userid']:$user->id,'userid',1);
print '</td><td>&nbsp;</td></tr>';
print '</td><td class="hideonsmartphone">&nbsp;</td></tr>';

// Position
print '<tr><td>'.$langs->trans("Position").'</td><td>';
print '<input class="flat" name="position" size="5" value="'.(isset($_POST["position"])?$_POST["position"]:$bookmark->position).'">';
print '</td><td>&nbsp;</td></tr>';
print '</td><td class="hideonsmartphone">&nbsp;</td></tr>';

print '</table><br>';

Expand Down
8 changes: 4 additions & 4 deletions htdocs/categories/photos.php
Expand Up @@ -184,23 +184,23 @@
/* */
/* ************************************************************************** */

print "\n<div class=\"tabsAction\">\n";
print '<div class="tabsAction">'."\n";

if ($action != 'ajout_photo' && $user->rights->categorie->creer)
{
if (! empty($conf->global->MAIN_UPLOAD_DOC))
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=ajout_photo&amp;id='.$object->id.'&amp;type='.$type.'">';
print '<a class="butAction hideonsmartphone" href="'.$_SERVER['PHP_SELF'].'?action=ajout_photo&amp;id='.$object->id.'&amp;type='.$type.'">';
print $langs->trans("AddPhoto").'</a>';
}
else
{
print '<a class="butActionRefused" href="#">';
print '<a class="butActionRefused hideonsmartphone" href="#">';
print $langs->trans("AddPhoto").'</a>';
}
}

print "\n</div>\n";
print '</div>'."\n";

/*
* Ajouter une photo
Expand Down
4 changes: 2 additions & 2 deletions htdocs/comm/mailing/fiche.php
Expand Up @@ -1004,7 +1004,7 @@
{
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('body',$object->body,'',320,'dolibarr_readonly','',false,true,empty($conf->global->FCKEDITOR_ENABLE_MAILING)?0:1,20,70);
$doleditor=new DolEditor('body',$object->body,'',320,'dolibarr_readonly','',false,true,empty($conf->global->FCKEDITOR_ENABLE_MAILING)?0:1,20,120,1);
$doleditor->Create();
}
else print dol_htmlentitiesbr($object->body);
Expand Down Expand Up @@ -1130,7 +1130,7 @@
print '<td colspan="3">';
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('body',$object->body,'',320,'dolibarr_mailings','',true,true,$conf->global->FCKEDITOR_ENABLE_MAILING,20,70);
$doleditor=new DolEditor('body',$object->body,'',320,'dolibarr_mailings','',true,true,$conf->global->FCKEDITOR_ENABLE_MAILING,20,120);
$doleditor->Create();
print '</td></tr>';

Expand Down
64 changes: 32 additions & 32 deletions htdocs/commande/fiche.php
@@ -1,34 +1,34 @@
<?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* \file htdocs/commande/fiche.php
* \ingroup commande
* \brief Page to show customer order
*/
* \ingroup commande
* \brief Page to show customer order
*/

require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
Expand Down Expand Up @@ -2201,7 +2201,7 @@

// Total HT
print '<tr><td>'.$langs->trans('AmountHT').'</td>';
print '<td align="right">'.price($object->total_ht,'',$langs,'','',0,$conf->currency).'</td>';
print '<td align="right">'.price($object->total_ht,1,'',1,-1,-1,$conf->currency).'</td>';

// Margin Infos
if (! empty($conf->margin->enabled))
Expand All @@ -2215,22 +2215,22 @@
print '</tr>';

// Total TVA
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($object->total_tva,'',$langs,'','',0,$conf->currency).'</td></tr>';
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($object->total_tva,1,'',1,-1,-1,$conf->currency).'</td></tr>';

// Amount Local Taxes
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
{
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax1,'',$langs,'','',0,$conf->currency).'</td></tr>';
print '<td align="right">'.price($object->total_localtax1,1,'',1,-1,-1,$conf->currency).'</td></tr>';
}
if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax2,'',$langs,'','',0,$conf->currency).'</td></tr>';
print '<td align="right">'.price($object->total_localtax2,1,'',1,-1,-1,$conf->currency).'</td></tr>';
}

// Total TTC
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right">'.price($object->total_ttc,'',$langs,'','',0,$conf->currency).'</td></tr>';
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right">'.price($object->total_ttc,1,'',1,-1,-1,$conf->currency).'</td></tr>';

// Statut
print '<tr><td>'.$langs->trans('Status').'</td><td>'.$object->getLibStatut(4).'</td></tr>';
Expand Down
35 changes: 15 additions & 20 deletions htdocs/commande/orderstoinvoice.php
Expand Up @@ -51,37 +51,32 @@
$sref_client = GETPOST('sref_client');
$sall = GETPOST('sall');
$socid = GETPOST('socid','int');
$selected = GETPOST('orders_to_invoice');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$viewstatut = GETPOST('viewstatut');


$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
if (! $sortfield) $sortfield='c.rowid';
if (! $sortorder) $sortorder='DESC';

$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); // Date for local PHP server
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
$date_starty=dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server
$date_endy=dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]);
$selected=GETPOST('orders_to_invoice');
$action=GETPOST('action','alpha');
$now = dol_now();
$date_start = dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); // Date for local PHP server
$date_end = dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
$date_starty = dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server
$date_endy = dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]);

if ($action == 'create')
{
if (! is_array($selected))
if (is_array($selected) == false)
{
$mesgs[]='<div class="error">'.$langs->trans('Error_OrderNotChecked').'</div>';
$mesgs = array('<div class="error">'.$langs->trans('Error_OrderNotChecked').'</div>');
}
else
{
$socid=GETPOST('socid');
$action=GETPOST('action');
$origin=GETPOST('origin');
$originid=GETPOST('originid');
$origin = GETPOST('origin');
$originid = GETPOST('originid');
}
}
$now=dol_now();

$viewstatut=GETPOST('viewstatut');


/*
* Actions
Expand Down Expand Up @@ -358,7 +353,7 @@
$companystatic = new Societe($db);

// Mode creation
if ($action == 'create')
if ($action == 'create' && empty($mesgs))
{
$facturestatic=new Facture($db);

Expand Down

0 comments on commit 00fb40e

Please sign in to comment.