forked from Wavyzz/dolibarr
cvsimport
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
--------------------------------------------------------------
|
||||
English Dolibarr ChangeLog
|
||||
$Id: ChangeLog,v 1.423 2011/07/07 16:03:53 simnandez Exp $
|
||||
$Id: ChangeLog,v 1.424 2011/07/13 14:16:39 eldy Exp $
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 3.1 compared to 3.0 *****
|
||||
WARNING: IE6 browser is no more supported in this version.
|
||||
For users:
|
||||
- New: War against number of clicks:
|
||||
- When adding a free bank transaction, form to add next one is still
|
||||
|
||||
13
README
13
README
@@ -53,20 +53,13 @@ To upgrade Dolibarr from an old version to this one:
|
||||
|
||||
- If you came from a beta version or from any version x.y.z to any
|
||||
other where x or y number differs, you must call the Dolibarr "install/"
|
||||
page in your browser.
|
||||
Url might be for example:
|
||||
page in your browser (this should be done automatically at first dolibarr
|
||||
access).
|
||||
This URL should looks like:
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
or
|
||||
http://yourdolibarrhost/install/index.php
|
||||
|
||||
To know what is exactly correct URL for "install/" page, take URL you use
|
||||
to go on login page. It it ends with "index.php", remove it. Then add
|
||||
"install/" at the end.
|
||||
For example, if your login page is:
|
||||
http://yourdolibarrhost/something/index.php
|
||||
Then, your "install/" pages will be
|
||||
http://yourdolibarrhost/something/install/
|
||||
|
||||
Then choose the "update" option according to your case.
|
||||
Note: Migrate process can be ran safely several times.
|
||||
|
||||
|
||||
12
README-FR
12
README-FR
@@ -53,19 +53,13 @@ Pour mettre a jour Dolibarr depuis une vieille version vers celle ci:
|
||||
il n'y a pas besoin de migration de données.
|
||||
|
||||
- Si vous venez d'une beta ou d'un version x.y.z vers une autre ou les numeros x
|
||||
ou y varient, vous devez appelez la page de migration dans votre navigateur:
|
||||
ou y varient, vous devez appelez la page "install/" de migration dans votre
|
||||
navigateur (ceci doit se faire automatiquement au premier accès de l'application).
|
||||
Ce sera une URL du genre:
|
||||
http://localhost/dolibarr/htdocs/install/index.php
|
||||
ou
|
||||
http://yourdolibarrhost/install/index.php
|
||||
|
||||
Pour savoir quelle est l'URL exactement de la page "install/", prenez l'URL que
|
||||
vous utilisez pour vous loguer. Si elle se termine par "index.php", enlevez le.
|
||||
Dans tous les cas, ajouter ensuite "install/" à la fin.
|
||||
Par exemple, si votre page de connexion est:
|
||||
http://yourdolibarrhost/something/index.php
|
||||
Alors la page "install/" sera
|
||||
http://yourdolibarrhost/something/install/
|
||||
|
||||
Ensuite, choisir l'option de "mise a jour" en rapport avec votre cas.
|
||||
Note: Le processus de migration peut etre lance plusieurs fois sans risque.
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
; only the root user with no password, stop server and catch
|
||||
; files user.MY* to put them in the Dolibarr build/exe/doliwamp/mysql directory.
|
||||
;
|
||||
; Version: $Id$
|
||||
; Version: $Id: doliwamp.iss,v 1.82 2011/07/13 21:09:30 eldy Exp $
|
||||
;----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
; ----- Change this -----
|
||||
AppName=DoliWamp
|
||||
; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
|
||||
AppVerName=DoliWamp-3.1.0-alpha
|
||||
AppVerName=DoliWamp-3.1.0-beta
|
||||
; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
|
||||
OutputBaseFilename=DoliWamp-3.1.0-alpha
|
||||
OutputBaseFilename=DoliWamp-3.1.0-beta
|
||||
; Define full path from wich all relative path are defined
|
||||
; You must modify this to put here your dolibarr root directory
|
||||
SourceDir=C:\Work\Data\Workspace\dolibarr
|
||||
SourceDir=C:\Mes Developpements\dolibarr
|
||||
; ----- End of change
|
||||
;OutputManifestFile=build\doliwampbuild.log
|
||||
AppId=doliwamp
|
||||
@@ -101,10 +101,10 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi
|
||||
; PhpMyAdmin, Apache, Php, Mysql
|
||||
; Put here path of Wampserver applications
|
||||
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11 fails if php_exif is on), mysql 5.0.45 or 5.1.36
|
||||
Source: "C:\Work\Applis\Wamp\apps\phpmyadmin3.2.0.1\*.*"; DestDir: "{app}\apps\phpmyadmin3.2.0.1"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\Work\Applis\Wamp\bin\apache\apache2.2.6\*.*"; DestDir: "{app}\bin\apache\apache2.2.6"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\Work\Applis\Wamp\bin\php\php5.2.5\*.*"; DestDir: "{app}\bin\php\php5.2.5"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\Work\Applis\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
|
||||
Source: "C:\Program Files\Wamp\apps\phpmyadmin3.2.0.1\*.*"; DestDir: "{app}\apps\phpmyadmin3.2.0.1"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\Program Files\Wamp\bin\apache\apache2.2.6\*.*"; DestDir: "{app}\bin\apache\apache2.2.6"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\Program Files\Wamp\bin\php\php5.2.5\*.*"; DestDir: "{app}\bin\php\php5.2.5"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
|
||||
Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
|
||||
; Mysql data files (does not overwrite if exists)
|
||||
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db"
|
||||
; Dolibarr
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \file htdocs/adherents/fiche.php
|
||||
* \ingroup member
|
||||
* \brief Page of member
|
||||
* \version $Id$
|
||||
* \version $Id: fiche.php,v 1.237 2011/07/13 11:50:33 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -944,7 +944,7 @@ if ($action == 'edit')
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
$adh->pays_id=$adh->pays_id?$adh->pays_id:$mysoc->pays_id;
|
||||
//$adh->pays_id=$adh->pays_id?$adh->pays_id:$mysoc->pays_id; // In edit mode we don't force to company country if not defined
|
||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td>';
|
||||
$html->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$adh->pays_id,'pays_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||
@@ -1505,5 +1505,5 @@ if ($rowid && $action != 'edit')
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/13 11:50:33 $ - $Revision: 1.237 $');
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/admin/system/dolibarr.php
|
||||
* \brief Page to show Dolibarr informations
|
||||
* \version $Id$
|
||||
* \version $Id: dolibarr.php,v 1.58 2011/07/13 13:15:17 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -163,7 +163,7 @@ if (function_exists('date_default_timezone_get'))
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTimeZone").'</td><td>'; // Timezone server PHP
|
||||
$a=date_default_timezone_get();
|
||||
$a.=' ('.(-dol_mktime(0,0,0,1,1,1970)>0?'+':'').(-dol_mktime(0,0,0,1,1,1970)).')';
|
||||
print $form->textwithtooltip($a,$txt,2,1,img_info());
|
||||
print $form->textwithtooltip($a,$txt,2,1,img_info(''));
|
||||
print '</td></tr>'."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||
}
|
||||
else
|
||||
@@ -171,7 +171,7 @@ else
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("PHPServerOffsetWithGreenwich").'</td><td>';
|
||||
$a=(-dol_mktime(0,0,0,1,1,1970)>0?'+':'').(-dol_mktime(0,0,0,1,1,1970));
|
||||
print $form->textwithtooltip($a,$txt,2,1,img_info());
|
||||
print $form->textwithtooltip($a,$txt,2,1,img_info(''));
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
$var=!$var;
|
||||
@@ -213,5 +213,5 @@ print '<tr '.$bc[$var].'><td width="300">=> '.$langs->trans("File encoding").'</
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/13 13:15:17 $ - $Revision: 1.58 $');
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -23,7 +23,7 @@
|
||||
* \file htdocs/compta/facture/impayees.php
|
||||
* \ingroup facture
|
||||
* \brief Page to list and build liste of unpaid invoices
|
||||
* \version $Revision$
|
||||
* \version $Revision: 1.83 $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -268,7 +268,7 @@ if ($result)
|
||||
print_fiche_titre($titre,$link);
|
||||
//print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',0); // We don't want pagination on this page
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
$i = 0;
|
||||
print '<table class="liste" width="100%">';
|
||||
@@ -351,10 +351,10 @@ if ($result)
|
||||
|
||||
// PDF Picto
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
$filename=dol_sanitizeFileName($objp->facnumber);
|
||||
$filename=dol_sanitizeFileName($objp->facnumber);
|
||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
|
||||
$foundpdf=$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1,$param);
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
|
||||
print '</tr></table>';
|
||||
|
||||
@@ -425,5 +425,5 @@ if ($result)
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/13 14:41:02 $ - $Revision: 1.83 $');
|
||||
?>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* \file htdocs/compta/paiement.php
|
||||
* \ingroup compta
|
||||
* \brief Page to create a payment
|
||||
* \version $Id: paiement.php,v 1.110 2011/07/11 09:32:35 cdelambert Exp $
|
||||
* \version $Id: paiement.php,v 1.111 2011/07/13 08:57:21 eldy Exp $
|
||||
*/
|
||||
|
||||
require('../main.inc.php');
|
||||
@@ -253,7 +253,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
if (! empty($conf->global->PAYPAL_BANK_ACCOUNT)) $accountid=$conf->global->PAYPAL_BANK_ACCOUNT;
|
||||
$paymentnum=$facture->ref_int;
|
||||
}
|
||||
if ($conf->use_javascript_ajax)
|
||||
if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT))
|
||||
{
|
||||
print "\n".'<script type="text/javascript" language="javascript">';
|
||||
print 'jQuery(document).ready(function () {';
|
||||
@@ -272,32 +272,32 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
jQuery(\'.fieldrequireddyn\').removeClass(\'fieldrequired\');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function elemToJson(selector)
|
||||
{
|
||||
var subJson = {};
|
||||
jQuery.map(selector.serializeArray(), function(n,i)
|
||||
{
|
||||
subJson[n["name"]] = n["value"];
|
||||
});
|
||||
return subJson;
|
||||
});
|
||||
return subJson;
|
||||
}
|
||||
function callForResult(imgId)
|
||||
{
|
||||
var json = {};
|
||||
var form = jQuery("#payment_form");
|
||||
|
||||
json["amountPayment"] = jQuery("#amountpayment").attr("value");
|
||||
|
||||
json["amountPayment"] = jQuery("#amountpayment").attr("value");
|
||||
json["amounts"] = elemToJson(form.find("input[name*=\"amount_\"]"));
|
||||
json["remains"] = elemToJson(form.find("input[name*=\"remain_\"]"));
|
||||
json["remains"] = elemToJson(form.find("input[name*=\"remain_\"]"));
|
||||
if(imgId != null)json["imgClicked"] = imgId;
|
||||
|
||||
|
||||
jQuery.post("ajaxpayment.php", json, function(data)
|
||||
{
|
||||
json = jQuery.parseJSON(data);
|
||||
|
||||
json = jQuery.parseJSON(data);
|
||||
|
||||
form.data(json);
|
||||
|
||||
|
||||
for(var key in json)
|
||||
{
|
||||
if(key == "result") {
|
||||
@@ -307,31 +307,31 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
} else {
|
||||
jQuery("#"+key).removeAttr("style");
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
form.find("input[name*=\""+key+"\"]").each(function() {
|
||||
jQuery(this).attr("value", json[key]);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function callToBreakdown(imgSelector) {
|
||||
|
||||
}
|
||||
function callToBreakdown(imgSelector) {
|
||||
var form = jQuery("#payment_form"), imgId;
|
||||
|
||||
|
||||
imgId = imgSelector.attr("id");
|
||||
callForResult(imgId);
|
||||
}
|
||||
|
||||
jQuery("#payment_form").find("img").click(function() {
|
||||
callToBreakdown(jQuery(this));
|
||||
});
|
||||
|
||||
jQuery("#payment_form").find("input[name*=\"amount_\"]").change(function() {
|
||||
});
|
||||
|
||||
jQuery("#payment_form").find("input[name*=\"amount_\"]").change(function() {
|
||||
callForResult();
|
||||
});
|
||||
|
||||
jQuery("#amountpayment").change(function() {
|
||||
});
|
||||
|
||||
jQuery("#amountpayment").change(function() {
|
||||
callForResult();
|
||||
});
|
||||
});
|
||||
@@ -371,7 +371,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '</tr>';
|
||||
|
||||
// Payment amount
|
||||
if ($conf->use_javascript_ajax)
|
||||
if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT))
|
||||
{
|
||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('AmountPayment').'</span></td>';
|
||||
print '<td>';
|
||||
@@ -460,7 +460,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
print '<td align="right">'.$langs->trans('RemainderToPay').'</td>';
|
||||
print '<td align="right">'.$langs->trans('PaymentAmount').'</td>';
|
||||
print '<td align="right"> </td>';
|
||||
print "</tr>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
$total=0;
|
||||
@@ -512,7 +512,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
if ($action != 'add_paiement')
|
||||
{
|
||||
if ($conf->use_javascript_ajax)
|
||||
if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT))
|
||||
{
|
||||
print img_picto($langs->trans('AddRemind'),'rightarrow.png','id="'.$objp->facid.'" "');
|
||||
}
|
||||
@@ -671,5 +671,5 @@ if (! GETPOST('action'))
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/11 09:32:35 $ - $Revision: 1.110 $');
|
||||
llxFooter('$Date: 2011/07/13 08:57:21 $ - $Revision: 1.111 $');
|
||||
?>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2011 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
|
||||
@@ -20,7 +20,7 @@
|
||||
* \file htdocs/compta/paiement_charge.php
|
||||
* \ingroup tax
|
||||
* \brief Page to add payment of a tax
|
||||
* \version $Id$
|
||||
* \version $Id: paiement_charge.php,v 1.52 2011/07/13 14:25:49 eldy Exp $
|
||||
*/
|
||||
|
||||
require('../main.inc.php');
|
||||
@@ -42,8 +42,9 @@ if ($user->societe_id > 0)
|
||||
|
||||
|
||||
/*
|
||||
* Actions add payment
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($_POST["action"] == 'add_payment')
|
||||
{
|
||||
$error=0;
|
||||
@@ -145,7 +146,7 @@ if ($_POST["action"] == 'add_payment')
|
||||
|
||||
|
||||
/*
|
||||
* Affichage
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
@@ -153,9 +154,7 @@ llxHeader();
|
||||
$html=new Form($db);
|
||||
|
||||
|
||||
/*
|
||||
* Formulaire de creation d'un paiement de charge
|
||||
*/
|
||||
// Formulaire de creation d'un paiement de charge
|
||||
if ($_GET["action"] == 'create')
|
||||
{
|
||||
|
||||
@@ -223,7 +222,7 @@ if ($_GET["action"] == 'create')
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
|
||||
print '<td>';
|
||||
$html->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$charge->accountid, "accountid", 0, "courant=1",1); // Affiche liste des comptes courant
|
||||
$html->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$charge->accountid, "accountid", 0, '',1); // Show opend bank account list
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Numero');
|
||||
@@ -335,5 +334,5 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/13 14:25:49 $ - $Revision: 1.52 $');
|
||||
?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/core/class/commonobject.class.php
|
||||
* \ingroup core
|
||||
* \brief File of parent class of all other business classes (invoices, contracts, proposals, orders, ...)
|
||||
* \version $Id: commonobject.class.php,v 1.145 2011/07/10 16:50:40 eldy Exp $
|
||||
* \version $Id: commonobject.class.php,v 1.146 2011/07/13 16:55:25 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -365,9 +365,10 @@ class CommonObject
|
||||
* Return array with list of possible values for type of contacts
|
||||
* @param source internal, external or all if not defined
|
||||
* @param order Sort order by : code or rowid
|
||||
* @return array List of type of contacts
|
||||
* @param option 0=Return array id->label, 1=Return array code->label
|
||||
* @return array Array list of type of contacts (id->label if option=0, code->label if option=1)
|
||||
*/
|
||||
function liste_type_contact($source='internal', $order='code')
|
||||
function liste_type_contact($source='internal', $order='code', $option=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@@ -390,7 +391,8 @@ class CommonObject
|
||||
|
||||
$transkey="TypeContact_".$this->element."_".$source."_".$obj->code;
|
||||
$libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle);
|
||||
$tab[$obj->rowid]=$libelle_type;
|
||||
if (empty($option)) $tab[$obj->rowid]=$libelle_type;
|
||||
else $tab[$obj->code]=$libelle_type;
|
||||
$i++;
|
||||
}
|
||||
return $tab;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* \ingroup core
|
||||
* \brief Fichier de la classe de stockage de la config courante
|
||||
* \remarks La config est stockee dans le fichier conf/conf.php
|
||||
* \version $Id: conf.class.php,v 1.60 2011/07/09 05:28:42 hregis Exp $
|
||||
* \version $Id: conf.class.php,v 1.61 2011/07/13 18:04:25 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -145,13 +145,13 @@ class Conf
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_TRIGGERS$/i',$key,$reg))
|
||||
{
|
||||
$modulename = strtolower($reg[1]);
|
||||
$this->triggers_modules[] = '/'.$modulename.'/inc/triggers/';
|
||||
$this->triggers_modules[] = '/'.$modulename.'/inc/triggers/'; // TODO Replace inc by includes to have same path than standard
|
||||
}
|
||||
// If this is constant for login method activated by a module
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_LOGIN_METHOD$/i',$key,$reg))
|
||||
{
|
||||
$modulename = strtolower($reg[1]);
|
||||
$this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/login/';
|
||||
$this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/login/'; // TODO Replace inc by includes to have same path than standard
|
||||
}
|
||||
// If this is constant for hook activated by a module. Value is list of hooked tabs separated with :
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_HOOKS$/i',$key,$reg))
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* \file htdocs/core/class/html.form.class.php
|
||||
* \ingroup core
|
||||
* \brief File of class with all html predefined components
|
||||
* \version $Id: html.form.class.php,v 1.188 2011/07/10 17:28:09 hregis Exp $
|
||||
* \version $Id: html.form.class.php,v 1.189 2011/07/13 14:03:15 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -1771,12 +1771,14 @@ class Form
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retourne la liste deroulante des differents etats d'une propal.
|
||||
* Les valeurs de la liste sont les id de la table c_propalst
|
||||
* \param selected etat pre-selectionne
|
||||
* Return combo list of differents status of a proposal
|
||||
* Values are id of table c_propalst
|
||||
* @param selected etat pre-selectionne
|
||||
*/
|
||||
function select_propal_statut($selected='')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst";
|
||||
$sql .= " WHERE active = 1";
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/core/class/html.formfile.class.php
|
||||
* \ingroup core
|
||||
* \brief File of class to offer components to list and upload files
|
||||
* \version $Id: html.formfile.class.php,v 1.47 2011/07/10 21:17:14 eldy Exp $
|
||||
* \version $Id: html.formfile.class.php,v 1.49 2011/07/13 14:41:03 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@ class FormFile
|
||||
*/
|
||||
function show_documents($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$maxfilenamelength=28,$noform=0,$param='',$title='',$buttonlabel='',$codelang='',$hooks='')
|
||||
{
|
||||
$this->numoffiles=0;
|
||||
print $this->showdocuments($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed,$modelselected,$allowgenifempty,$forcenomultilang,$iconPDF,$maxfilenamelength,$noform,$param,$title,$buttonlabel,$codelang,$hooks);
|
||||
return $this->numoffiles;
|
||||
}
|
||||
@@ -845,6 +846,10 @@ class FormFile
|
||||
print '<button type="submit" class="start">'.$langs->trans('StartUpload').'</button>';
|
||||
print '<button type="reset" class="cancel">'.$langs->trans('CancelUpload').'</button>';
|
||||
print '</div></form>';
|
||||
|
||||
print '</div><!-- end div fileupload -->';
|
||||
|
||||
print '<div id="fileupload-view">';
|
||||
print '<div class="fileupload-content">';
|
||||
|
||||
print '<table width="100%" class="files">';
|
||||
@@ -859,8 +864,8 @@ class FormFile
|
||||
// We remove this because there is already individual bars.
|
||||
//print '<div class="fileupload-progressbar"></div>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div><!-- end div fileupload-content -->';
|
||||
print '</div><!-- end div fileupload-view -->';
|
||||
|
||||
// Include template
|
||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/ajaxfileupload.tpl.php');
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/core/class/html.formmail.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de la classe permettant la generation du formulaire html d'envoi de mail unitaire
|
||||
* \version $Id: html.formmail.class.php,v 1.31 2011/07/10 20:03:41 eldy Exp $
|
||||
* \version $Id: html.formmail.class.php,v 1.33 2011/07/13 22:18:12 eldy Exp $
|
||||
*/
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/html.form.class.php");
|
||||
|
||||
@@ -505,7 +505,7 @@ class FormMail
|
||||
$out.= '<tr>';
|
||||
$out.= '<td width="180">'.$langs->trans("MailFile").'</td>';
|
||||
$out.= '<td>';
|
||||
// FIXME Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
|
||||
// TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
|
||||
$out.= '<input type="hidden" class="removedfilehidden" name="removedfile" value="">'."\n";
|
||||
$out.= '<script type="text/javascript" language="javascript">';
|
||||
$out.= 'jQuery(document).ready(function () {';
|
||||
@@ -519,7 +519,7 @@ class FormMail
|
||||
foreach($listofpaths as $key => $val)
|
||||
{
|
||||
$out.= '<div id="attachfile_'.$key.'">';
|
||||
$out.= img_mime($listofnames[$key]).' '.$listofnames[$key];
|
||||
$out.= img_mime($listofnames[$key]).' '.$listofnames[$key];
|
||||
if (! $this->withfilereadonly)
|
||||
{
|
||||
$out.= ' <input type="image" style="border: 0px;" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" value="'.($key+1).'" class="removedfile" id="removedfile_'.$key.'" name="removedfile_'.$key.'" />';
|
||||
@@ -547,15 +547,15 @@ class FormMail
|
||||
$defaultmessage="";
|
||||
|
||||
// TODO A partir du type, proposer liste de messages dans table llx_models
|
||||
if ($this->param["models"]=='body') { $defaultmessage=$this->withbody; }
|
||||
if ($this->param["models"]=='facture_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendInvoice"); }
|
||||
if ($this->param["models"]=='facture_relance') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendInvoiceReminder"); }
|
||||
if ($this->param["models"]=='propal_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendProposal"); }
|
||||
if ($this->param["models"]=='order_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendOrder"); }
|
||||
if ($this->param["models"]=='order_supplier_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierOrder"); }
|
||||
if ($this->param["models"]=='invoice_supplier_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierInvoice"); }
|
||||
if ($this->param["models"]=='shipping_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendShipping"); }
|
||||
if ($this->param["models"]=='fichinter_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendFichInter"); }
|
||||
if ($this->param["models"]=='facture_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendInvoice"); }
|
||||
elseif ($this->param["models"]=='facture_relance') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendInvoiceReminder"); }
|
||||
elseif ($this->param["models"]=='propal_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendProposal"); }
|
||||
elseif ($this->param["models"]=='order_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendOrder"); }
|
||||
elseif ($this->param["models"]=='order_supplier_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierOrder"); }
|
||||
elseif ($this->param["models"]=='invoice_supplier_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierInvoice"); }
|
||||
elseif ($this->param["models"]=='shipping_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendShipping"); }
|
||||
elseif ($this->param["models"]=='fichinter_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendFichInter"); }
|
||||
elseif (! is_numeric($this->withbody)) { $defaultmessage=$this->withbody; }
|
||||
|
||||
if ($conf->paypal->enabled && $conf->global->PAYPAL_ADD_PAYMENT_URL)
|
||||
{
|
||||
@@ -565,12 +565,12 @@ class FormMail
|
||||
|
||||
if ($this->param["models"]=='order_send')
|
||||
{
|
||||
$url=getPaymentUrl('order',$this->substit['__ORDERREF__']);
|
||||
$url=getPaypalPaymentUrl('order',$this->substit['__ORDERREF__']);
|
||||
$defaultmessage=$langs->transnoentities("PredefinedMailContentSendOrderWithPaypalLink",$url);
|
||||
}
|
||||
if ($this->param["models"]=='facture_send')
|
||||
{
|
||||
$url=getPaymentUrl('invoice',$this->substit['__FACREF__']);
|
||||
$url=getPaypalPaymentUrl('invoice',$this->substit['__FACREF__']);
|
||||
$defaultmessage=$langs->transnoentities("PredefinedMailContentSendInvoiceWithPaypalLink",$url);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/core/class/menubase.class.php
|
||||
* \ingroup core
|
||||
* \version $Id$
|
||||
* \version $Id: menubase.class.php,v 1.25 2011/07/13 22:18:48 eldy Exp $
|
||||
* \brief File of class to manage dynamic menu entries
|
||||
* \remarks Initialy built by build_class_from_table on 2008-01-12 14:19
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ class Menubase
|
||||
* @param user User that create
|
||||
* @return int <0 if KO, Id of record if OK
|
||||
*/
|
||||
function create($user)
|
||||
function create($user=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
* \file htdocs/filefunc.inc.php
|
||||
* \ingroup core
|
||||
* \brief File that include conf.php file and functions.lib.php
|
||||
* \version $Id: filefunc.inc.php,v 1.17 2011/06/28 12:25:43 hregis Exp $
|
||||
* \version $Id: filefunc.inc.php,v 1.18 2011/07/13 21:19:58 eldy Exp $
|
||||
*/
|
||||
|
||||
define('DOL_VERSION','3.1.0-alpha'); // Also defined in htdocs/install/inc.php (Ex: x.y.z-alpha, x.y.z)
|
||||
define('DOL_VERSION','3.1.0-beta'); // Also defined in htdocs/install/inc.php (Ex: x.y.z-alpha, x.y.z)
|
||||
define('EURO',chr(128));
|
||||
|
||||
// Definition des constantes syslog
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/fourn/facture/index.php
|
||||
* \ingroup fournisseur,facture
|
||||
* \brief List of suppliers invoices
|
||||
* \version $Id$
|
||||
* \version $Id: index.php,v 1.84 2011/07/13 13:10:51 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -35,6 +35,7 @@ if (!$user->rights->fournisseur->facture->lire)
|
||||
accessforbidden();
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
|
||||
$socid = $_GET["socid"];
|
||||
|
||||
@@ -292,5 +293,5 @@ else
|
||||
$db->close();
|
||||
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/13 13:10:51 $ - $Revision: 1.84 $');
|
||||
?>
|
||||
|
||||
@@ -65,7 +65,9 @@
|
||||
data.isAdjusted = true;
|
||||
data.isValidated = that._validate(data.files);
|
||||
data.context = that._renderUpload(data.files)
|
||||
.appendTo($(this).find('.files')).fadeIn(function () {
|
||||
// DOL_CHANGE
|
||||
//.appendTo($(this).find('.files')).fadeIn(function () {
|
||||
.appendTo($('#fileupload-view').find('.files')).fadeIn(function () {
|
||||
// Fix for IE7 and lower:
|
||||
$(this).show();
|
||||
}).data('data', data);
|
||||
@@ -119,7 +121,9 @@
|
||||
} else {
|
||||
that._renderDownload(data.result)
|
||||
.css('display', 'none')
|
||||
.appendTo($(this).find('.files'))
|
||||
// DOL_CHANGE
|
||||
//.appendTo($(this).find('.files'))
|
||||
.appendTo($('#fileupload-view').find('.files'))
|
||||
.fadeIn(function () {
|
||||
// Fix for IE7 and lower:
|
||||
$(this).show();
|
||||
@@ -153,7 +157,9 @@
|
||||
that._adjustMaxNumberOfFiles(-data.files.length);
|
||||
data.context = that._renderUpload(data.files)
|
||||
.css('display', 'none')
|
||||
.appendTo($(this).find('.files'))
|
||||
// DOL_CHANGE
|
||||
//.appendTo($(this).find('.files'))
|
||||
.appendTo($('#fileupload-view').find('.files'))
|
||||
.fadeIn(function () {
|
||||
// Fix for IE7 and lower:
|
||||
$(this).show();
|
||||
@@ -487,7 +493,9 @@
|
||||
|
||||
_initEventHandlers: function () {
|
||||
$.blueimp.fileupload.prototype._initEventHandlers.call(this);
|
||||
var filesList = this.element.find('.files'),
|
||||
// DOL_CHANGE
|
||||
//var filesList = this.element.find('.files'),
|
||||
var filesList = $('#fileupload-view').find('.files'),
|
||||
eventData = {fileupload: this};
|
||||
filesList.find('.start button')
|
||||
.live(
|
||||
@@ -510,7 +518,9 @@
|
||||
},
|
||||
|
||||
_destroyEventHandlers: function () {
|
||||
var filesList = this.element.find('.files');
|
||||
// DOL_CHANGE
|
||||
//var filesList = this.element.find('.files'),
|
||||
var filesList = $('#fileupload-view').find('.files');
|
||||
filesList.find('.start button')
|
||||
.die('click.' + this.options.namespace);
|
||||
filesList.find('.cancel button')
|
||||
@@ -522,7 +532,9 @@
|
||||
|
||||
_initFileUploadButtonBar: function () {
|
||||
var fileUploadButtonBar = this.element.find('.fileupload-buttonbar'),
|
||||
filesList = this.element.find('.files'),
|
||||
// DOL_CHANGE
|
||||
//filesList = this.element.find('.files'),
|
||||
filesList = $('#fileupload-view').find('.files'),
|
||||
ns = this.options.namespace;
|
||||
fileUploadButtonBar
|
||||
.addClass('ui-widget-header ui-corner-top');
|
||||
@@ -607,16 +619,24 @@
|
||||
this.element
|
||||
.addClass('ui-widget');
|
||||
this._initFileUploadButtonBar();
|
||||
this.element.find('.fileupload-content')
|
||||
// DOL_CHANGE
|
||||
//this.element.find('.fileupload-content')
|
||||
$('#fileupload-view').find('.fileupload-content')
|
||||
.addClass('ui-widget-content ui-corner-bottom');
|
||||
this.element.find('.fileupload-progressbar')
|
||||
// DOL_CHANGE
|
||||
//this.element.find('.fileupload-progressbar')
|
||||
$('#fileupload-view').find('.fileupload-progressbar')
|
||||
.hide().progressbar();
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
this.element.find('.fileupload-progressbar')
|
||||
// DOL_CHANGE
|
||||
//this.element.find('.fileupload-progressbar')
|
||||
$('#fileupload-view').find('.fileupload-progressbar')
|
||||
.progressbar('destroy');
|
||||
this.element.find('.fileupload-content')
|
||||
// DOL_CHANGE
|
||||
//this.element.find('.fileupload-content')
|
||||
$('#fileupload-view').find('.fileupload-content')
|
||||
.removeClass('ui-widget-content ui-corner-bottom');
|
||||
this._destroyFileUploadButtonBar();
|
||||
this.element.removeClass('ui-widget');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--
|
||||
-- $Id: init_menu_auguria.sql,v 1.119 2011/07/03 16:00:20 eldy Exp $
|
||||
-- $Revision: 1.119 $
|
||||
-- $Id: init_menu_auguria.sql,v 1.121 2011/07/13 11:26:17 eldy Exp $
|
||||
-- $Revision: 1.121 $
|
||||
--
|
||||
-- Menu base entries
|
||||
-- This file is loaded when a menu handler base is activated (auguria, etc..)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/includes/menus/standard/eldy.lib.php
|
||||
* \brief Library for file eldy menus
|
||||
* \version $Id: eldy.lib.php,v 1.55 2011/07/04 11:33:22 eldy Exp $
|
||||
* \version $Id: eldy.lib.php,v 1.57 2011/07/13 11:26:17 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/**
|
||||
* \file htdocs/includes/modules/DolibarrModules.class.php
|
||||
* \brief Fichier de description et activation des modules Dolibarr
|
||||
* \version $Id: DolibarrModules.class.php,v 1.159 2011/06/28 20:31:23 eldy Exp $
|
||||
* \version $Id: DolibarrModules.class.php,v 1.161 2011/07/13 22:15:19 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -926,7 +926,7 @@ class DolibarrModules
|
||||
|
||||
/**
|
||||
* Insert permissions definitions related to the module into llx_rights_def
|
||||
* @param $reinitadminperms If 1, we also grant them to admin user
|
||||
* @param $reinitadminperms If 1, we also grant them to all admin users
|
||||
* @return int Number of error (0 if OK)
|
||||
*/
|
||||
function insert_permissions($reinitadminperms=0)
|
||||
@@ -955,7 +955,7 @@ class DolibarrModules
|
||||
{
|
||||
$r_id = $this->rights[$key][0];
|
||||
$r_desc = $this->rights[$key][1];
|
||||
$r_type = $this->rights[$key][2];
|
||||
$r_type = isset($this->rights[$key][2])?$this->rights[$key][2]:'';
|
||||
$r_def = $this->rights[$key][3];
|
||||
$r_perms = $this->rights[$key][4];
|
||||
$r_subperms = isset($this->rights[$key][5])?$this->rights[$key][5]:'';
|
||||
@@ -1004,12 +1004,15 @@ class DolibarrModules
|
||||
}
|
||||
|
||||
// If we are into a logged session and we are an admin user, we take permission of new activated module
|
||||
if ($reinitadminperms && ! empty($user->admin))
|
||||
if ($reinitadminperms)
|
||||
{
|
||||
$user->addrights($r_id);
|
||||
// We reload permissions
|
||||
$user->clearrights();
|
||||
$user->getrights();
|
||||
if (! empty($user->admin)) // FIXME. We must loop on each admin records and make grant on each fuser object. We must removed global $user.
|
||||
{
|
||||
$user->addrights($r_id);
|
||||
// We reload permissions
|
||||
$user->clearrights();
|
||||
$user->getrights();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1056,8 +1059,6 @@ class DolibarrModules
|
||||
*/
|
||||
function insert_menus()
|
||||
{
|
||||
global $user;
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/menubase.class.php");
|
||||
|
||||
$err=0;
|
||||
@@ -1118,7 +1119,7 @@ class DolibarrModules
|
||||
|
||||
if (! $err)
|
||||
{
|
||||
$result=$menu->create($user);
|
||||
$result=$menu->create();
|
||||
if ($result > 0)
|
||||
{
|
||||
$this->menu[$key]['rowid']=$result;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \file htdocs/includes/modules/fichinter/pdf_soleil.modules.php
|
||||
* \ingroup ficheinter
|
||||
* \brief Fichier de la classe permettant de generer les fiches d'intervention au modele Soleil
|
||||
* \version $Id$
|
||||
* \version $Id: pdf_soleil.modules.php,v 1.101 2011/07/13 14:09:35 eldy Exp $
|
||||
*/
|
||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/fichinter/modules_fichinter.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
||||
@@ -105,7 +105,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$result=$fichinter->fetch($id);
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error($db,$fichinter->error);
|
||||
dol_print_error($this->db,$fichinter->error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php
|
||||
* \ingroup agenda
|
||||
* \brief Trigger file for agenda module
|
||||
* \version $Id: interface_modAgenda_ActionsAuto.class.php,v 1.33 2011/07/07 09:18:27 simnandez Exp $
|
||||
* \version $Id: interface_modAgenda_ActionsAuto.class.php,v 1.34 2011/07/13 18:05:27 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -550,8 +550,14 @@ class InterfaceActionsAuto
|
||||
{
|
||||
$now=dol_now();
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php');
|
||||
$contactforaction=new Contact($this->db);
|
||||
$societeforaction=new Societe($this->db);
|
||||
if ($object->sendtoid > 0) $contactforaction->fetch($object->sendtoid);
|
||||
if ($object->socid > 0) $societeforaction->fetch($object->socid);
|
||||
|
||||
// Insertion action
|
||||
require_once(DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php');
|
||||
$actioncomm = new ActionComm($this->db);
|
||||
$actioncomm->type_code = $object->actiontypecode;
|
||||
@@ -562,8 +568,8 @@ class InterfaceActionsAuto
|
||||
$actioncomm->durationp = 0;
|
||||
$actioncomm->punctual = 1;
|
||||
$actioncomm->percentage = -1; // Not applicable
|
||||
$actioncomm->contact = new Contact($this->db,$object->sendtoid);
|
||||
$actioncomm->societe = new Societe($this->db,$object->socid);
|
||||
$actioncomm->contact = $contactforaction;
|
||||
$actioncomm->societe = $societeforaction;
|
||||
$actioncomm->author = $user; // User saving action
|
||||
//$actioncomm->usertodo = $user; // User affected to action
|
||||
$actioncomm->userdone = $user; // User doing action
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
/** \file htdocs/install/inc.php
|
||||
* \ingroup core
|
||||
* \brief File that define environment for install pages
|
||||
* \version $Id: inc.php,v 1.134 2011/07/11 10:53:37 eldy Exp $
|
||||
* \version $Id: inc.php,v 1.135 2011/07/13 21:19:58 eldy Exp $
|
||||
*/
|
||||
|
||||
define('DOL_VERSION','3.1.0-alpha'); // Also defined in htdocs/master.inc.php (Ex: x.y.z-alpha, x.y.z)
|
||||
define('DOL_VERSION','3.1.0-beta'); // Also defined in htdocs/master.inc.php (Ex: x.y.z-alpha, x.y.z)
|
||||
|
||||
require_once('../core/class/translate.class.php');
|
||||
require_once('../lib/functions.lib.php');
|
||||
|
||||
@@ -76,7 +76,7 @@ EditMember=Edit member
|
||||
SubscriptionEndDate=Subscription's end date
|
||||
MembersTypeSetup=Members type setup
|
||||
NewSubscription=New subscription
|
||||
NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription (if already a member), please contact foundation board instead.
|
||||
NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription (if already a member), please contact foundation board instead by email %s.
|
||||
Subscription=Subscription
|
||||
Subscriptions=Subscriptions
|
||||
SubscriptionLate=Late
|
||||
@@ -193,3 +193,4 @@ Associations=Foundations
|
||||
Collectivités=Organizations
|
||||
Particuliers=Personal
|
||||
Entreprises=Companies
|
||||
DOLIBARRFOUNDATION_PAYMENT_FORM=To make your subscription payment using a bank transfer, see page <a target="_blank" href="http://wiki.dolibarr.org/index.php/Subscribe#To_subscribe_making_a_bank_transfer">http://wiki.dolibarr.org/index.php/Subscribe</a>.<br>To pay using a Credit Card or Paypal, click on button at bottom of this page.<br>
|
||||
|
||||
@@ -42,7 +42,7 @@ ErrCatAlreadyExists=Ce nom est déjà utilisé
|
||||
AddProductToCat=Ajouter ce produit à une catégorie ?
|
||||
ImpossibleAddCat=Impossible d'ajouter la catégorie
|
||||
ImpossibleAssociateCategory=Impossible d'associer la catégorie
|
||||
WasAddedSuccessfully=<b>%s</b> a été ajoutée avec succès.
|
||||
WasAddedSuccessfully=<b>%s</b> a été ajouté avec succès.
|
||||
ObjectAlreadyLinkedToCategory=L'élément est déjà lié à cette catégorie.
|
||||
CategorySuccessfullyCreated=La catégorie %s a été ajouté avec succès.
|
||||
ProductIsInCategories=Ce produit/service est dans les catégories suivantes
|
||||
|
||||
@@ -75,9 +75,12 @@ NewCotisation=Nouvelle adhésion
|
||||
PaymentSubscription=Paiement cotisation
|
||||
EditMember=Édition adhérent
|
||||
SubscriptionEndDate=Date de fin adhésion
|
||||
NewAttribute=Nouvel attribut
|
||||
AttributeCode=Code de l'attribut
|
||||
OptionalFieldsSetup=Configuration des champs optionnels
|
||||
MembersTypeSetup=Configuration des types d'adhérents
|
||||
NewSubscription=Nouvelle adhésion
|
||||
NewSubscriptionDesc=Ce formulaire permet de vous enregistrer comme nouvel adhérent de l'association. Pour un renouvellement si vous êtes déjà adhérent, contacter plutôt l'association.
|
||||
NewSubscriptionDesc=Ce formulaire permet de vous enregistrer comme nouvel adhérent de l'association. Pour un renouvellement si vous êtes déjà adhérent, contacter plutôt l'association par mail %s.
|
||||
Subscription=Adhésion/cotisation
|
||||
Subscriptions=Adhésions/cotisations
|
||||
SubscriptionLate=En retard
|
||||
@@ -194,3 +197,4 @@ Associations=Associations
|
||||
Collectivités=Collectivités
|
||||
Particuliers=Particuliers
|
||||
Entreprises=Entreprises
|
||||
DOLIBARRFOUNDATION_PAYMENT_FORM=Pour réaliser le paiement de votre cotisation par virement bancaire ou par chèque, consulter la page <a target="_blank" href="http://wiki.dolibarr.org/index.php/Adh%C3%A9rer#Pour_une_adh.C3.A9sion_par_ch.C3.A8que">http://wiki.dolibarr.org/index.php/Adhérer</a>.<br>Pour payer dès maintenant par Carte Bancaire ou Paypal, cliquer sur le bouton au bas de cette page.<br>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
DIRECTION=ltr
|
||||
FONTFORPDF=chinese
|
||||
#FONTFORPDF=stsongstdlight
|
||||
#FONTFORPDF=chinese
|
||||
FONTFORPDF=stsongstdlight
|
||||
#FONTSIZEFORPDF=9
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=None
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/lib/files.lib.php
|
||||
* \brief Library for file managing functions
|
||||
* \version $Id: files.lib.php,v 1.68 2011/07/11 06:23:22 hregis Exp $
|
||||
* \version $Id: files.lib.php,v 1.69 2011/07/13 21:33:38 eldy Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -590,12 +590,13 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
||||
* @param disableglob Disable usage of glob like *
|
||||
* @param nophperrors Disable all PHP output errors
|
||||
* @param notrigger Disable all triggers
|
||||
* @param triggercode Code of trigger
|
||||
* @param object Object for trigger
|
||||
* @return boolean True if file is deleted, False if error
|
||||
*/
|
||||
function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0)
|
||||
function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0,$triggercode='FILE_DELETE',$object=null)
|
||||
{
|
||||
global $conf, $user, $langs;
|
||||
global $object;
|
||||
global $db, $conf, $user, $langs;
|
||||
|
||||
//print "x".$file." ".$disableglob;
|
||||
$ok=true;
|
||||
@@ -611,12 +612,13 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$notrigger=0)
|
||||
dol_syslog("Removed file ".$filename,LOG_DEBUG);
|
||||
if (! $notrigger)
|
||||
{
|
||||
if (! is_object($object)) $object=(object) 'dummy';
|
||||
$object->src_file=$file;
|
||||
|
||||
// Appel des triggers
|
||||
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||
$interface=new Interfaces($db);
|
||||
$result=$interface->run_triggers('FILE_DELETE',$object,$user,$langs,$conf);
|
||||
$result=$interface->run_triggers($triggercode,$object,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $errors=$interface->errors; }
|
||||
// Fin appel triggers
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/paypal/lib/paypal.lib.php
|
||||
* \ingroup paypal
|
||||
* \brief Library for common paypal functions
|
||||
* \version $Id$
|
||||
* \version $Id: paypal.lib.php,v 1.25 2011/07/13 16:55:34 eldy Exp $
|
||||
*/
|
||||
function llxHeaderPaypal($title, $head = "")
|
||||
{
|
||||
@@ -132,7 +132,7 @@ function html_print_paypal_footer($fromcompany,$langs)
|
||||
function paypaladmin_prepare_head()
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
@@ -140,7 +140,7 @@ function paypaladmin_prepare_head()
|
||||
$head[$h][1] = $langs->trans("Account");
|
||||
$head[$h][2] = 'paypalaccount';
|
||||
$h++;
|
||||
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
@@ -151,24 +151,24 @@ function paypaladmin_prepare_head()
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
function getPaymentUrl($source='',$ref='',$amount=0,$freetag='')
|
||||
function getPaypalPaymentUrl($source='',$ref='',$amount=0,$freetag='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/security.lib.php");
|
||||
|
||||
|
||||
if (! empty($source) && ! empty($ref))
|
||||
{
|
||||
$token='';
|
||||
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN)) $token='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$source.$ref, 2);
|
||||
|
||||
|
||||
if ($source == 'commande') $source = 'order';
|
||||
if ($source == 'facture') $source = 'invoice';
|
||||
|
||||
|
||||
$url = DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?source='.$source.'&ref='.$ref.$token;
|
||||
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
@@ -482,7 +482,7 @@ function hash_call($methodName,$nvpStr)
|
||||
global $conf, $langs;
|
||||
global $API_Endpoint, $API_Url, $API_version, $USE_PROXY, $PROXY_HOST, $PROXY_PORT, $PROXY_USER, $PROXY_PASS;
|
||||
global $PAYPAL_API_USER, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE;
|
||||
|
||||
|
||||
// TODO problem with triggers
|
||||
$API_version="56";
|
||||
if ($conf->global->PAYPAL_API_SANDBOX)
|
||||
@@ -495,7 +495,7 @@ function hash_call($methodName,$nvpStr)
|
||||
$API_Endpoint = "https://api-3t.paypal.com/nvp";
|
||||
$API_Url = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=";
|
||||
}
|
||||
|
||||
|
||||
// Clean parameters
|
||||
$PAYPAL_API_USER="";
|
||||
if ($conf->global->PAYPAL_API_USER) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER;
|
||||
@@ -506,7 +506,7 @@ function hash_call($methodName,$nvpStr)
|
||||
$PAYPAL_API_SANDBOX="";
|
||||
if ($conf->global->PAYPAL_API_SANDBOX) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX;
|
||||
// TODO END problem with triggers
|
||||
|
||||
|
||||
dol_syslog("Paypal API endpoint ".$API_Endpoint);
|
||||
|
||||
//setting the curl parameters.
|
||||
@@ -580,19 +580,19 @@ function hash_call($methodName,$nvpStr)
|
||||
function GetApiError()
|
||||
{
|
||||
$errors=array();
|
||||
|
||||
|
||||
$resArray=$_SESSION['reshash'];
|
||||
|
||||
|
||||
if(isset($_SESSION['curl_error_no']))
|
||||
{
|
||||
$errors[] = $_SESSION['curl_error_no'].'-'.$_SESSION['curl_error_msg'];
|
||||
}
|
||||
|
||||
|
||||
foreach($resArray as $key => $value)
|
||||
{
|
||||
$errors[] = $key.'-'.$value;
|
||||
}
|
||||
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/public/members/new.php
|
||||
* \ingroup member
|
||||
* \brief Example of form to add a new member
|
||||
* \version $Id: new.php,v 1.39 2011/07/05 08:33:34 eldy Exp $
|
||||
* \version $Id: new.php,v 1.42 2011/07/13 11:56:36 eldy Exp $
|
||||
*
|
||||
* Note that you can add following constant to change behaviour of page
|
||||
* MEMBER_NEWFORM_AMOUNT Default amount for autosubscribe form
|
||||
@@ -182,13 +182,18 @@ if ($action == 'add')
|
||||
$langs->load("errors");
|
||||
$errmsg .= $langs->trans("ErrorBadDateFormat")."<br>\n";
|
||||
}
|
||||
if (isset($public))
|
||||
if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
|
||||
{
|
||||
$public=1;
|
||||
}else{
|
||||
$public=0;
|
||||
if (GETPOST("morphy") == 'mor' && GETPOST('budget') <= 0)
|
||||
{
|
||||
$error+=1;
|
||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("TurnoverOrBudget"))."<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($public)) $public=1;
|
||||
else $public=0;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// email a peu pres correct et le login n'existe pas
|
||||
@@ -232,20 +237,24 @@ if ($action == 'add')
|
||||
}
|
||||
|
||||
if ($backtopage) $urlback=$backtopage;
|
||||
else if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION) $urlback=$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION;
|
||||
else if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)
|
||||
{
|
||||
$urlback=$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION;
|
||||
// TODO Make replacement of __AMOUNT__, etc...
|
||||
}
|
||||
else $urlback=$_SERVER["PHP_SELF"]."?action=added";
|
||||
|
||||
if (! empty($conf->global->MEMBER_NEWFORM_PAYONLINE))
|
||||
{
|
||||
if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paybox')
|
||||
{
|
||||
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?source=membersubscription&ref='.$adh->ref;
|
||||
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref;
|
||||
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
|
||||
if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
|
||||
}
|
||||
else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal')
|
||||
{
|
||||
$urlback=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?source=membersubscription&ref='.$adh->ref;
|
||||
$urlback=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref;
|
||||
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
|
||||
if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
|
||||
}
|
||||
@@ -280,7 +289,7 @@ if ($action == 'added')
|
||||
print $langs->trans("NewMemberbyWeb");
|
||||
print '</center>';
|
||||
|
||||
llxFooterVierge('$Date: 2011/07/05 08:33:34 $ - $Revision: 1.39 $');
|
||||
llxFooterVierge('$Date: 2011/07/13 11:56:36 $ - $Revision: 1.42 $');
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -301,8 +310,8 @@ llxHeaderVierge($langs->trans("NewSubscription"));
|
||||
|
||||
print_titre($langs->trans("NewSubscription"));
|
||||
|
||||
print $langs->trans("NewSubscriptionDesc").'<br>';
|
||||
if (! empty($conf->global->MEMBER_NEWFORM_TEXT)) print $langs->trans($conf->global->MEMBER_NEWFORM_TEXT)."<br>\n";
|
||||
else print $langs->trans("NewSubscriptionDesc",$conf->global->MAIN_INFO_SOCIETE_MAIL)."<br>\n";
|
||||
|
||||
dol_htmloutput_errors($errmsg);
|
||||
|
||||
@@ -450,7 +459,7 @@ print '</tr>'."\n";
|
||||
if (! empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER))
|
||||
{
|
||||
$arraybudget=array('50'=>'<= 100 000','100'=>'<= 200 000','200'=>'<= 500 000','400'=>'<= 1 500 000','750'=>'<= 3 000 000','1500'=>'<= 5 000 000','2000'=>'5 000 000+');
|
||||
print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").'</td><td>';
|
||||
print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>';
|
||||
print $html->select_array('budget', $arraybudget, GETPOST('budget'), 1);
|
||||
print ' € or $';
|
||||
|
||||
@@ -528,5 +537,5 @@ print "<br></form>\n";
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooterVierge('$Date: 2011/07/05 08:33:34 $ - $Revision: 1.39 $');
|
||||
llxFooterVierge('$Date: 2011/07/13 11:56:36 $ - $Revision: 1.42 $');
|
||||
?>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \ingroup paybox
|
||||
* \brief File to offer a way to make a payment for a particular Dolibarr entity
|
||||
* \author Laurent Destailleur
|
||||
* \version $Id: newpayment.php,v 1.56 2011/07/05 08:29:53 eldy Exp $
|
||||
* \version $Id: newpayment.php,v 1.60 2011/07/13 12:03:30 eldy Exp $
|
||||
*/
|
||||
|
||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||
@@ -186,10 +186,23 @@ if ($urllogo)
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
print '<tr><td align="center"><br>'.$langs->trans("WelcomeOnPaymentPage").'<br></td></tr>'."\n";
|
||||
|
||||
print '<tr><td align="center"><br>'.$langs->trans("ThisScreenAllowsYouToPay",$creditor).'<br><br></td></tr>'."\n";
|
||||
// Output introduction text
|
||||
$text='';
|
||||
if (! empty($conf->global->PAYBOX_NEWFORM_TEXT))
|
||||
{
|
||||
$langs->load("members");
|
||||
if (preg_match('/^\((.*)\)$/',$conf->global->PAYBOX_NEWFORM_TEXT,$reg)) $text.=$langs->trans($reg[1])."<br>\n";
|
||||
else $text.=$conf->global->PAYBOX_NEWFORM_TEXT."<br>\n";
|
||||
$text='<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n";
|
||||
}
|
||||
if (empty($text))
|
||||
{
|
||||
$text.='<tr><td align="center"><br>'.$langs->trans("WelcomeOnPaymentPage").'<br></td></tr>'."\n";
|
||||
$text.='<tr><td align="center"><br>'.$langs->trans("ThisScreenAllowsYouToPay",$creditor).'<br><br></td></tr>'."\n";
|
||||
}
|
||||
print $text;
|
||||
|
||||
// Output payment summary form
|
||||
print '<tr><td align="center">';
|
||||
print '<table with="100%">';
|
||||
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("ThisIsInformationOnPayment").' :</td></tr>'."\n";
|
||||
@@ -678,9 +691,9 @@ if (GETPOST("source") == 'membersubscription')
|
||||
// EMail
|
||||
$var=!$var;
|
||||
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("YourEMail");
|
||||
print ' ('.$langs->trans("ToComplete").')';
|
||||
$email=$member->client->email;
|
||||
$email=(GETPOST("email")?GETPOST("email"):(isValidEmail($email)?$email:''));
|
||||
if (empty($email)) print ' ('.$langs->trans("ToComplete").')';
|
||||
print '</td><td class="CTableRow'.($var?'1':'2').'"><input class="flat" type="text" name="email" size="48" value="'.$email.'"></td></tr>'."\n";
|
||||
}
|
||||
|
||||
@@ -716,5 +729,5 @@ html_print_paybox_footer($mysoc,$langs);
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooterPayBox('$Date: 2011/07/05 08:29:53 $ - $Revision: 1.56 $');
|
||||
llxFooterPayBox('$Date: 2011/07/13 12:03:30 $ - $Revision: 1.60 $');
|
||||
?>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \ingroup paypal
|
||||
* \brief File to offer a way to make a payment for a particular Dolibarr entity
|
||||
* \author Laurent Destailleur
|
||||
* \version $Id: newpayment.php,v 1.21 2011/06/26 12:34:54 eldy Exp $
|
||||
* \version $Id: newpayment.php,v 1.24 2011/07/13 12:00:18 eldy Exp $
|
||||
*/
|
||||
|
||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||
@@ -280,10 +280,22 @@ if ($urllogo)
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
print '<tr><td align="center"><br>'.$langs->trans("WelcomeOnPaymentPage").'<br></td></tr>'."\n";
|
||||
|
||||
print '<tr><td align="center"><br>'.$langs->trans("ThisScreenAllowsYouToPay",$creditor).'<br><br></td></tr>'."\n";
|
||||
// Output introduction text
|
||||
$text='';
|
||||
if (! empty($conf->global->PAYPAL_NEWFORM_TEXT))
|
||||
{
|
||||
$langs->load("members");
|
||||
if (preg_match('/^\((.*)\)$/',$conf->global->PAYPAL_NEWFORM_TEXT,$reg)) $text.=$langs->trans($reg[1])."<br>\n";
|
||||
else $text.=$conf->global->PAYPAL_NEWFORM_TEXT."<br>\n";
|
||||
}
|
||||
if (empty($text))
|
||||
{
|
||||
$text.='<tr><td align="center"><br>'.$langs->trans("WelcomeOnPaymentPage").'<br></td></tr>'."\n";
|
||||
$text.='<tr><td align="center"><br>'.$langs->trans("ThisScreenAllowsYouToPay",$creditor).'<br><br></td></tr>'."\n";
|
||||
}
|
||||
print $text;
|
||||
|
||||
// Output payment summary form
|
||||
print '<tr><td align="center">';
|
||||
print '<table with="100%">';
|
||||
print '<tr class="liste_total"><td align="left" colspan="2">'.$langs->trans("ThisIsInformationOnPayment").' :</td></tr>'."\n";
|
||||
@@ -934,5 +946,5 @@ html_print_paypal_footer($mysoc,$langs);
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooterPaypal('$Date: 2011/06/26 12:34:54 $ - $Revision: 1.21 $');
|
||||
llxFooterPaypal('$Date: 2011/07/13 12:00:18 $ - $Revision: 1.24 $');
|
||||
?>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \file htdocs/societe/socnote.php
|
||||
* \brief Tab for notes on third party
|
||||
* \ingroup societe
|
||||
* \version $Id$
|
||||
* \version $Id: socnote.php,v 1.22 2011/07/13 16:24:57 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -44,13 +44,13 @@ $result = restrictedArea($user, 'societe', $socid);
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'add')
|
||||
if ($action == 'add' && ! GETPOST('cancel'))
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$db->escape($_POST["note"])."' WHERE rowid=".$_POST["socid"];
|
||||
$result = $db->query($sql);
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$db->escape($_POST["note"])."' WHERE rowid=".$_POST["socid"];
|
||||
$result = $db->query($sql);
|
||||
|
||||
$_GET["socid"]=$_POST["socid"]; // Pour retour sur fiche
|
||||
$socid = $_GET["socid"];
|
||||
$_GET["socid"]=$_POST["socid"]; // Pour retour sur fiche
|
||||
$socid = $_GET["socid"];
|
||||
}
|
||||
|
||||
|
||||
@@ -70,25 +70,25 @@ if ($socid > 0)
|
||||
$societe = new Societe($db, $socid);
|
||||
$societe->fetch($socid);
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
if ($conf->notification->enabled) $langs->load("mails");
|
||||
|
||||
$head = societe_prepare_head($societe);
|
||||
$head = societe_prepare_head($societe);
|
||||
|
||||
dol_fiche_head($head, 'note', $langs->trans("ThirdParty"),0,'company');
|
||||
dol_fiche_head($head, 'note', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
print "<form method=\"post\" action=\"".DOL_URL_ROOT."/societe/socnote.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<form method=\"post\" action=\"".DOL_URL_ROOT."/societe/socnote.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
@@ -113,32 +113,36 @@ if ($socid > 0)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td>';
|
||||
print '<td valign="top">';
|
||||
if ($action == 'edit' && $user->rights->societe->creer)
|
||||
{
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
||||
print "<input type=\"hidden\" name=\"socid\" value=\"".$societe->id."\">";
|
||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td>';
|
||||
print '<td valign="top">';
|
||||
if ($action == 'edit' && $user->rights->societe->creer)
|
||||
{
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
|
||||
print "<input type=\"hidden\" name=\"socid\" value=\"".$societe->id."\">";
|
||||
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$societe->note,'',360,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,20,70);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
{
|
||||
print dol_textishtml($societe->note)?$societe->note:dol_nl2br($societe->note,1,true);
|
||||
}
|
||||
print "</td></tr>";
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||
$doleditor=new DolEditor('note',$societe->note,'',360,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,20,70);
|
||||
$doleditor->Create();
|
||||
}
|
||||
else
|
||||
{
|
||||
print dol_textishtml($societe->note)?$societe->note:dol_nl2br($societe->note,1,true);
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
}
|
||||
if ($action == 'edit')
|
||||
{
|
||||
print '<tr><td colspan="2" align="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print "</table>";
|
||||
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
@@ -163,5 +167,5 @@ if ($action != 'edit')
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/13 16:24:57 $ - $Revision: 1.22 $');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user