Merge branch 'develop' into 3.1-beta
This commit is contained in:
commit
4c68edf629
@ -10,8 +10,9 @@ Package: dolibarr
|
|||||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||||
php5-mysql | php5-mysqli,
|
php5-mysql | php5-mysqli,
|
||||||
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime,
|
php5-cli, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime,
|
||||||
${misc:Depends}, xdg-utils,
|
xdg-utils,
|
||||||
mysql-server, perl
|
mysql-server,
|
||||||
|
${misc:Depends}
|
||||||
Recommends: apache2 | lighttpd | httpd, mysql-client
|
Recommends: apache2 | lighttpd | httpd, mysql-client
|
||||||
Suggests: www-browser
|
Suggests: www-browser
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|||||||
@ -49,15 +49,16 @@ echo Run the dolibarr postinst script
|
|||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
docdir='/var/lib/dolibarr/documents'
|
docdir='/var/lib/dolibarr/documents'
|
||||||
#docdir='/usr/share/dolibarr/documents'
|
|
||||||
installfileorig="/usr/share/dolibarr/build/deb/install.forced.php.install"
|
installfileorig="/usr/share/dolibarr/build/deb/install.forced.php.install"
|
||||||
installconfig="/etc/dolibarr/install.forced.php"
|
installconfig="/etc/dolibarr/install.forced.php"
|
||||||
#config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
|
||||||
config="/etc/dolibarr/conf.php"
|
config="/etc/dolibarr/conf.php"
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
|
|
||||||
|
# Remove lock file
|
||||||
|
rm -f $docdir/install.lock
|
||||||
|
|
||||||
# Create document directory for uploaded data files
|
# Create document directory for uploaded data files
|
||||||
mkdir -p $docdir
|
mkdir -p $docdir
|
||||||
|
|||||||
@ -54,10 +54,8 @@ echo Run the dolibarr postrm script
|
|||||||
|
|
||||||
|
|
||||||
docdir='/var/lib/dolibarr/documents'
|
docdir='/var/lib/dolibarr/documents'
|
||||||
#docdir='/usr/share/dolibarr/documents'
|
|
||||||
#config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
|
||||||
config="/etc/dolibarr/conf.php"
|
config="/etc/dolibarr/conf.php"
|
||||||
lockfile="/usr/share/dolibarr/install.lock"
|
lockfile="$docdir/install.lock"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ with format RPM (for Redhat, OpenSuse, Mandriva, ...).
|
|||||||
# This is standard command to work on RPM packaging:
|
# This is standard command to work on RPM packaging:
|
||||||
#
|
#
|
||||||
# To install all packagers tools:
|
# To install all packagers tools:
|
||||||
# yum -y install rpmlint mock hunspell-en hunspell-es hunspell-fr hunspell-it
|
# yum -y install rpmlint fedora-packager mock koji hunspell-en hunspell-es hunspell-fr hunspell-it
|
||||||
#
|
#
|
||||||
# rpmlint file.rpm Test a package
|
# rpmlint file.rpm Test a package
|
||||||
# mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm
|
# mock -r fedora-15-i386 --rebuild ../SRPMS/hello-2.7-1.fc15.src.rpm
|
||||||
|
|||||||
@ -154,8 +154,6 @@ export apachefileorig="$targetdir/build/rpm/httpd-dolibarr.conf"
|
|||||||
export apacheconfig="%{_sysconfdir}/dolibarr/apache.conf"
|
export apacheconfig="%{_sysconfdir}/dolibarr/apache.conf"
|
||||||
#export config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
#export config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
||||||
export config="%{_sysconfdir}/dolibarr/conf.php"
|
export config="%{_sysconfdir}/dolibarr/conf.php"
|
||||||
export lockfile="/usr/share/dolibarr/install.lock"
|
|
||||||
|
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
os='unknown';
|
os='unknown';
|
||||||
@ -185,6 +183,8 @@ if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -g
|
|||||||
fi
|
fi
|
||||||
echo OS detected: $os
|
echo OS detected: $os
|
||||||
|
|
||||||
|
# Remove lock file
|
||||||
|
%{__rm} -f $docdir/install.lock
|
||||||
|
|
||||||
# Create empty directory for uploaded files and generated documents
|
# Create empty directory for uploaded files and generated documents
|
||||||
echo Create document directory $docdir
|
echo Create document directory $docdir
|
||||||
@ -223,11 +223,9 @@ if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
|||||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||||
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
||||||
#semanage fcontext -a -t httpd_sys_script_rw_t "/usr/share/dolibarr(/.*?)"
|
#semanage fcontext -a -t httpd_sys_script_rw_t "/usr/share/dolibarr(/.*?)"
|
||||||
semanage fcontext -a -t httpd_sys_script_rw_t "/usr/share/dolibarr/install.lock"
|
|
||||||
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
|
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
|
||||||
restorecon -R -v /etc/dolibarr
|
restorecon -R -v /etc/dolibarr
|
||||||
#restorecon -R -v /usr/share/dolibarr
|
#restorecon -R -v /usr/share/dolibarr
|
||||||
restorecon -v /usr/share/dolibarr/install.lock
|
|
||||||
restorecon -R -v /var/lib/dolibarr
|
restorecon -R -v /var/lib/dolibarr
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -288,7 +286,6 @@ export apachefileorig="$targetdir/build/rpm/httpd-dolibarr.conf"
|
|||||||
export apacheconfig="%{_sysconfdir}/dolibarr/apache.conf"
|
export apacheconfig="%{_sysconfdir}/dolibarr/apache.conf"
|
||||||
#export config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
#export config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
||||||
export config="%{_sysconfdir}/dolibarr/conf.php"
|
export config="%{_sysconfdir}/dolibarr/conf.php"
|
||||||
export lockfile="$targetdir/install.lock"
|
|
||||||
|
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
@ -345,8 +342,8 @@ echo Removed remaining $config
|
|||||||
%{__rm} -f $config
|
%{__rm} -f $config
|
||||||
echo Removed remaining $installconfig
|
echo Removed remaining $installconfig
|
||||||
%{__rm} -f $installconfig
|
%{__rm} -f $installconfig
|
||||||
echo Removed remaining $lockfile
|
echo Removed remaining $docdir/install.lock
|
||||||
%{__rm} -f $lockfile
|
%{__rm} -f $docdir/install.lock
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2011 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -22,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/admin/modules.php
|
* \file htdocs/admin/modules.php
|
||||||
* \brief Page to activate/disable all modules
|
* \brief Page to activate/disable all modules
|
||||||
* \version $Id: modules.php,v 1.157 2011/08/01 12:25:15 hregis Exp $
|
* \version $Id: modules.php,v 1.159 2011/08/04 21:07:33 simnandez Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@ -89,10 +90,10 @@ foreach ($conf->file->dol_document_root as $type => $dirroot)
|
|||||||
|
|
||||||
if ($type == 'alt')
|
if ($type == 'alt')
|
||||||
{
|
{
|
||||||
$althandle=@opendir($dirroot);
|
$handle=@opendir($dirroot);
|
||||||
if (is_resource($althandle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
while (($file = readdir($althandle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||||
{
|
{
|
||||||
@ -102,6 +103,7 @@ foreach ($conf->file->dol_document_root as $type => $dirroot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
closedir($handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,7 +375,7 @@ if ($mode != 4)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="modules.php?id='.$objMod->numero.'&action=reset&value=' . $modName . '&mode=' . $mode . '">';
|
print '<a href="modules.php?id='.$objMod->numero.'&action=reset&value=' . $modName . '&mode=' . $mode . '">';
|
||||||
print img_picto($langs->trans("Activated"),'on');
|
print img_picto($langs->trans("Activated"),'switch_on');
|
||||||
print '</a></td>'."\n";
|
print '</a></td>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,7 +433,7 @@ if ($mode != 4)
|
|||||||
|
|
||||||
// Module non actif
|
// Module non actif
|
||||||
print '<a href="modules.php?id='.$objMod->numero.'&action=set&value=' . $modName . '&mode=' . $mode . '">';
|
print '<a href="modules.php?id='.$objMod->numero.'&action=set&value=' . $modName . '&mode=' . $mode . '">';
|
||||||
print img_picto($langs->trans("Disabled"),'off');
|
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||||
print "</a></td>\n <td> </td>\n";
|
print "</a></td>\n <td> </td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,5 +474,5 @@ print '</div>';
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/01 12:25:15 $ - $Revision: 1.157 $');
|
llxFooter('$Date: 2011/08/04 21:07:33 $ - $Revision: 1.159 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
* \file htdocs/comm/remx.php
|
* \file htdocs/comm/remx.php
|
||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
* \brief Page to edit absolute discounts for a customer
|
* \brief Page to edit absolute discounts for a customer
|
||||||
* \version $Id: remx.php,v 1.52 2011/08/03 00:46:26 eldy Exp $
|
* \version $Id: remx.php,v 1.53 2011/08/04 21:46:51 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@ -270,7 +270,7 @@ if ($_socid > 0)
|
|||||||
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||||
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
|
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$form->select_tva('tva_tx','0','',$mysoc,'');
|
print $form->load_tva('tva_tx','0','',$mysoc,'');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("NoteReason").'</td>';
|
print '<tr><td>'.$langs->trans("NoteReason").'</td>';
|
||||||
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';
|
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';
|
||||||
@ -538,5 +538,5 @@ if ($_socid > 0)
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/03 00:46:26 $ - $Revision: 1.52 $');
|
llxFooter('$Date: 2011/08/04 21:46:51 $ - $Revision: 1.53 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \file htdocs/contrat/fiche.php
|
* \file htdocs/contrat/fiche.php
|
||||||
* \ingroup contrat
|
* \ingroup contrat
|
||||||
* \brief Page of a contract
|
* \brief Page of a contract
|
||||||
* \version $Id: fiche.php,v 1.198 2011/08/02 12:44:20 simnandez Exp $
|
* \version $Id: fiche.php,v 1.199 2011/08/04 21:46:51 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require ("../main.inc.php");
|
require ("../main.inc.php");
|
||||||
@ -875,7 +875,7 @@ else
|
|||||||
}
|
}
|
||||||
print '<textarea name="eldesc" cols="70" rows="1">'.$objp->description.'</textarea></td>';
|
print '<textarea name="eldesc" cols="70" rows="1">'.$objp->description.'</textarea></td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print $form->select_tva("eltva_tx",$objp->tva_tx,$mysoc,$object->societe);
|
print $form->load_tva("eltva_tx",$objp->tva_tx,$mysoc,$object->societe);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input size="5" type="text" name="elprice" value="'.price($objp->subprice).'"></td>';
|
print '<td align="right"><input size="5" type="text" name="elprice" value="'.price($objp->subprice).'"></td>';
|
||||||
print '<td align="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
|
print '<td align="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
|
||||||
@ -1195,7 +1195,7 @@ else
|
|||||||
print '<td><textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea></td>';
|
print '<td><textarea name="desc" cols="70" rows="'.ROWS_2.'"></textarea></td>';
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$form->select_tva("tva_tx",$conf->defaulttx,$mysoc,$object->societe);
|
print $form->load_tva("tva_tx",-1,$mysoc,$object->societe);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input type="text" class="flat" size="4" name="pu" value=""></td>';
|
print '<td align="right"><input type="text" class="flat" size="4" name="pu" value=""></td>';
|
||||||
print '<td align="center"><input type="text" class="flat" size="2" name="pqty" value="1"></td>';
|
print '<td align="center"><input type="text" class="flat" size="2" name="pqty" value="1"></td>';
|
||||||
@ -1286,5 +1286,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/08/02 12:44:20 $ - $Revision: 1.198 $');
|
llxFooter('$Date: 2011/08/04 21:46:51 $ - $Revision: 1.199 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File of class to manage storage of current setup
|
* \brief File of class to manage storage of current setup
|
||||||
* Config is stored into file conf.php
|
* Config is stored into file conf.php
|
||||||
* \version $Id: conf.class.php,v 1.64 2011/08/01 13:26:22 hregis Exp $
|
* \version $Id: conf.class.php,v 1.65 2011/08/04 21:46:51 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -325,15 +325,6 @@ class Conf
|
|||||||
$this->compta->mode = 'RECETTES-DEPENSES'; // By default
|
$this->compta->mode = 'RECETTES-DEPENSES'; // By default
|
||||||
if (isset($this->global->COMPTA_MODE)) $this->compta->mode = $this->global->COMPTA_MODE; // Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES'
|
if (isset($this->global->COMPTA_MODE)) $this->compta->mode = $this->global->COMPTA_MODE; // Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES'
|
||||||
|
|
||||||
// $this->defaulttx
|
|
||||||
if (isset($this->global->FACTURE_TVAOPTION) && $this->global->FACTURE_TVAOPTION == 'franchise')
|
|
||||||
{
|
|
||||||
$this->defaulttx='0'; // Taux par defaut des factures clients
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$this->defaulttx=''; // Pas de taux par defaut des factures clients, le plus élevé sera pris
|
|
||||||
}
|
|
||||||
|
|
||||||
// $this->liste_limit = constante de taille maximale des listes
|
// $this->liste_limit = constante de taille maximale des listes
|
||||||
if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) $this->global->MAIN_SIZE_LISTE_LIMIT=25;
|
if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) $this->global->MAIN_SIZE_LISTE_LIMIT=25;
|
||||||
$this->liste_limit=$this->global->MAIN_SIZE_LISTE_LIMIT;
|
$this->liste_limit=$this->global->MAIN_SIZE_LISTE_LIMIT;
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
* \file htdocs/core/class/html.form.class.php
|
* \file htdocs/core/class/html.form.class.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File of class with all html predefined components
|
* \brief File of class with all html predefined components
|
||||||
* \version $Id: html.form.class.php,v 1.193 2011/07/31 23:45:14 eldy Exp $
|
* \version $Id: html.form.class.php,v 1.194 2011/08/04 21:46:51 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -2669,11 +2669,10 @@ class Form
|
|||||||
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par defaut=0 (La TVA doit etre paye par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
|
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par defaut=0 (La TVA doit etre paye par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
|
||||||
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu autre que transport neuf alors la TVA par defaut=TVA du produit vendu. Fin de regle.
|
* Si (vendeur et acheteur dans Communaute europeenne) et bien vendu autre que transport neuf alors la TVA par defaut=TVA du produit vendu. Fin de regle.
|
||||||
* Sinon la TVA proposee par defaut=0. Fin de regle.
|
* Sinon la TVA proposee par defaut=0. Fin de regle.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function select_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='')
|
function select_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='')
|
||||||
{
|
{
|
||||||
// TODO size of field is too large
|
|
||||||
//print '<script>jQuery(function() { jQuery( "#'.$htmlname.'" ).combobox(); });</script>';
|
|
||||||
print $this->load_tva($htmlname, $selectedrate, $societe_vendeuse, $societe_acheteuse, $idprod, $info_bits, $type);
|
print $this->load_tva($htmlname, $selectedrate, $societe_vendeuse, $societe_acheteuse, $idprod, $info_bits, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2800,6 +2799,7 @@ class Form
|
|||||||
$defaulttx=get_default_tva($societe_vendeuse,$societe_acheteuse,$idprod);
|
$defaulttx=get_default_tva($societe_vendeuse,$societe_acheteuse,$idprod);
|
||||||
$defaultnpr=get_default_npr($societe_vendeuse,$societe_acheteuse,$idprod);
|
$defaultnpr=get_default_npr($societe_vendeuse,$societe_acheteuse,$idprod);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si taux par defaut n'a pu etre determine, on prend dernier de la liste.
|
// Si taux par defaut n'a pu etre determine, on prend dernier de la liste.
|
||||||
// Comme ils sont tries par ordre croissant, dernier = plus eleve = taux courant
|
// Comme ils sont tries par ordre croissant, dernier = plus eleve = taux courant
|
||||||
if ($defaulttx < 0 || dol_strlen($defaulttx) == 0)
|
if ($defaulttx < 0 || dol_strlen($defaulttx) == 0)
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* $Id: freeproductline_create.tpl.php,v 1.15 2011/07/31 23:45:13 eldy Exp $
|
* $Id: freeproductline_create.tpl.php,v 1.16 2011/08/04 21:46:50 eldy Exp $
|
||||||
*
|
*
|
||||||
* Need to have following variables defined:
|
* Need to have following variables defined:
|
||||||
* $conf
|
* $conf
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<?php
|
<?php
|
||||||
echo $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1);
|
echo $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1);
|
||||||
if (($conf->product->enabled && $conf->service->enabled) || (empty($conf->product->enabled) && empty($conf->service->enabled))) echo '<br>';
|
if (($conf->product->enabled && $conf->service->enabled) || (empty($conf->product->enabled) && empty($conf->service->enabled))) echo '<br>';
|
||||||
|
|
||||||
if (! empty($this->hooks)) {
|
if (! empty($this->hooks)) {
|
||||||
foreach($this->hooks as $hook) {
|
foreach($this->hooks as $hook) {
|
||||||
if (! empty($hook['modules'])) {
|
if (! empty($hook['modules'])) {
|
||||||
@ -59,7 +59,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Editor wysiwyg
|
// Editor wysiwyg
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$nbrows=ROWS_2;
|
$nbrows=ROWS_2;
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<td align="right">
|
<td align="right">
|
||||||
<?php
|
<?php
|
||||||
if ($buyer->tva_assuj == "0") echo '<input type="hidden" name="np_tva_tx" value="0">0';
|
if ($buyer->tva_assuj == "0") echo '<input type="hidden" name="np_tva_tx" value="0">0';
|
||||||
else $html->select_tva('np_tva_tx', $conf->defaulttx, $seller, $buyer);
|
else echo $html->load_tva('np_tva_tx', -1, $seller, $buyer);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td align="right"><input type="text" size="5" name="np_price"></td>
|
<td align="right"><input type="text" size="5" name="np_price"></td>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* $Id: freeproductline_edit.tpl.php,v 1.15 2011/07/31 23:45:11 eldy Exp $
|
* $Id: freeproductline_edit.tpl.php,v 1.16 2011/08/04 21:46:50 eldy Exp $
|
||||||
*
|
*
|
||||||
* Need to have following variables defined:
|
* Need to have following variables defined:
|
||||||
* $conf
|
* $conf
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<tr <?php echo $bc[$var]; ?>>
|
<tr <?php echo $bc[$var]; ?>>
|
||||||
<td>
|
<td>
|
||||||
<a name="<?php echo $line->id; ?>"></a>
|
<a name="<?php echo $line->id; ?>"></a>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($this->hooks)) {
|
if (! empty($this->hooks)) {
|
||||||
foreach($this->hooks as $hook) {
|
foreach($this->hooks as $hook) {
|
||||||
@ -61,7 +61,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td align="right"><?php echo $html->select_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type); ?></td>
|
<td align="right"><?php echo $html->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type); ?></td>
|
||||||
|
|
||||||
<td align="right"><input size="6" type="text" class="flat" name="subprice" value="<?php echo price($line->subprice,0,'',0); ?>"></td>
|
<td align="right"><input size="6" type="text" class="flat" name="subprice" value="<?php echo price($line->subprice,0,'',0); ?>"></td>
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* $Id: predefinedproductline_edit.tpl.php,v 1.14 2011/07/31 23:45:11 eldy Exp $
|
* $Id: predefinedproductline_edit.tpl.php,v 1.15 2011/08/04 21:46:50 eldy Exp $
|
||||||
*
|
*
|
||||||
* Need to have following variables defined:
|
* Need to have following variables defined:
|
||||||
* $conf
|
* $conf
|
||||||
@ -69,7 +69,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td align="right"><?php echo $html->select_tva('tva_tx',$line->tva_tx,$seller,$buyer,'',$line->info_bits); ?></td>
|
<td align="right"><?php echo $html->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,'',$line->info_bits); ?></td>
|
||||||
|
|
||||||
<td align="right"><input size="6" type="text" class="flat" name="subprice" value="<?php echo price($line->subprice,0,'',0); ?>"></td>
|
<td align="right"><input size="6" type="text" class="flat" name="subprice" value="<?php echo price($line->subprice,0,'',0); ?>"></td>
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
* \file htdocs/filefunc.inc.php
|
* \file htdocs/filefunc.inc.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File that include conf.php file and functions.lib.php
|
* \brief File that include conf.php file and functions.lib.php
|
||||||
* \version $Id: filefunc.inc.php,v 1.21 2011/07/31 23:19:04 eldy Exp $
|
* \version $Id: filefunc.inc.php,v 1.22 2011/08/04 12:07:29 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('DOL_VERSION','3.1.0-beta'); // 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)
|
||||||
@ -60,6 +60,7 @@ error_reporting(E_ALL ^ E_NOTICE);
|
|||||||
//error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
|
|
||||||
|
|
||||||
|
# Define vars
|
||||||
$conffiletoshowshort = "conf.php";
|
$conffiletoshowshort = "conf.php";
|
||||||
# Define localization of conf file
|
# Define localization of conf file
|
||||||
$conffile = "conf/conf.php";
|
$conffile = "conf/conf.php";
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
* \file htdocs/fourn/commande/fiche.php
|
* \file htdocs/fourn/commande/fiche.php
|
||||||
* \ingroup supplier, order
|
* \ingroup supplier, order
|
||||||
* \brief Card supplier order
|
* \brief Card supplier order
|
||||||
* \version $Id: fiche.php,v 1.232 2011/07/10 20:03:40 eldy Exp $
|
* \version $Id: fiche.php,v 1.233 2011/08/04 21:46:51 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
@ -1174,7 +1174,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$html->select_tva('tva_tx',$line->tva_tx);
|
print $html->load_tva('tva_tx',$line->tva_tx);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input size="5" type="text" name="pu" value="'.price($line->subprice).'"></td>';
|
print '<td align="right"><input size="5" type="text" name="pu" value="'.price($line->subprice).'"></td>';
|
||||||
print '<td align="right"><input size="2" type="text" name="qty" value="'.$line->qty.'"></td>';
|
print '<td align="right"><input size="2" type="text" name="qty" value="'.$line->qty.'"></td>';
|
||||||
@ -1227,10 +1227,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
//if($soc->tva_assuj == "0")
|
print $html->load_tva('tva_tx',($_POST["tva_tx"]?$_POST["tva_tx"]:-1),$soc,$mysoc);
|
||||||
//print '<input type="hidden" name="tva_tx" value="0">0';
|
|
||||||
//else
|
|
||||||
print $html->select_tva('tva_tx',($_POST["tva_tx"]?$_POST["tva_tx"]:$conf->defaulttx),$soc,$mysoc);
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input type="text" name="pu" size="5" value="'.$_POST["pu"].'"></td>';
|
print '<td align="right"><input type="text" name="pu" size="5" value="'.$_POST["pu"].'"></td>';
|
||||||
print '<td align="right"><input type="text" name="qty" value="'.($_POST["qty"]?$_POST["qty"]:'1').'" size="2"></td>';
|
print '<td align="right"><input type="text" name="qty" value="'.($_POST["qty"]?$_POST["qty"]:'1').'" size="2"></td>';
|
||||||
@ -1545,5 +1542,5 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/10 20:03:40 $ - $Revision: 1.232 $');
|
llxFooter('$Date: 2011/08/04 21:46:51 $ - $Revision: 1.233 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \file htdocs/fourn/facture/fiche.php
|
* \file htdocs/fourn/facture/fiche.php
|
||||||
* \ingroup facture, fournisseur
|
* \ingroup facture, fournisseur
|
||||||
* \brief Page for supplier invoice card (view, edit, validate)
|
* \brief Page for supplier invoice card (view, edit, validate)
|
||||||
* \version $Id: fiche.php,v 1.262 2011/07/31 23:57:00 eldy Exp $
|
* \version $Id: fiche.php,v 1.263 2011/08/04 21:46:50 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
@ -1114,7 +1114,7 @@ if ($_GET['action'] == 'create')
|
|||||||
print '<td><input size="50" name="label'.$i.'" value="'.$value_label.'" type="text"></td>';
|
print '<td><input size="50" name="label'.$i.'" value="'.$value_label.'" type="text"></td>';
|
||||||
print '<td align="right"><input type="text" size="8" name="amount'.$i.'" value="'.$value_pu.'"></td>';
|
print '<td align="right"><input type="text" size="8" name="amount'.$i.'" value="'.$value_pu.'"></td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
$html->select_tva('tauxtva'.$i,$value_tauxtva,$societe,$mysoc);
|
print $html->load_tva('tauxtva'.$i,$value_tauxtva,$societe,$mysoc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input type="text" size="3" name="qty'.$i.'" value="'.$value_qty.'"></td>';
|
print '<td align="right"><input type="text" size="3" name="qty'.$i.'" value="'.$value_qty.'"></td>';
|
||||||
print '<td align="right"><input type="text" size="8" name="amountttc'.$i.'" value=""></td></tr>';
|
print '<td align="right"><input type="text" size="8" name="amountttc'.$i.'" value=""></td></tr>';
|
||||||
@ -1549,7 +1549,7 @@ else
|
|||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
$html->select_tva('tauxtva',$fac->lines[$i]->tva_tx,$societe,$mysoc);
|
print $html->load_tva('tauxtva',$fac->lines[$i]->tva_tx,$societe,$mysoc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Unit price
|
// Unit price
|
||||||
@ -1678,7 +1678,7 @@ else
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print $html->select_tva('tauxtva',$conf->defaulttx,$societe,$mysoc);
|
print $html->load_tva('tauxtva',($_POST["tauxtva"]?$_POST["tauxtva"]:-1),$societe,$mysoc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print '<input size="4" name="amount" type="text">';
|
print '<input size="4" name="amount" type="text">';
|
||||||
@ -1915,5 +1915,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/31 23:57:00 $ - $Revision: 1.262 $');
|
llxFooter('$Date: 2011/08/04 21:46:50 $ - $Revision: 1.263 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* \defgroup barcode Module barcode
|
* \defgroup barcode Module barcode
|
||||||
* \brief Module pour gerer les codes barres
|
* \brief Module pour gerer les codes barres
|
||||||
* \version $Id: modBarcode.class.php,v 1.28 2011/07/31 23:28:11 eldy Exp $
|
* \version $Id: modBarcode.class.php,v 1.29 2011/08/04 12:40:17 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -70,7 +70,9 @@ class modBarcode extends DolibarrModules
|
|||||||
// Constants
|
// Constants
|
||||||
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
|
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
|
||||||
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
|
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
|
||||||
$this->const = array(0=>array('GENBARCODE_LOCATION','chaine',DOL_DOCUMENT_ROOT.'/includes/barcode/php-barcode/genbarcode/genbarcode','Path to genbarcode command line tool',0));
|
$this->const = array(
|
||||||
|
//0=>array('GENBARCODE_LOCATION','chaine',DOL_DOCUMENT_ROOT.'/includes/barcode/php-barcode/genbarcode/genbarcode','Path to genbarcode command line tool',0)
|
||||||
|
);
|
||||||
|
|
||||||
// Boxes
|
// Boxes
|
||||||
$this->boxes = array();
|
$this->boxes = array();
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/index.php
|
* \file htdocs/index.php
|
||||||
* \brief Dolibarr home page
|
* \brief Dolibarr home page
|
||||||
* \version $Id: index.php,v 1.200 2011/07/31 23:19:05 eldy Exp $
|
* \version $Id: index.php,v 1.201 2011/08/04 12:07:30 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('NOCSRFCHECK',1); // This is login page. We must be able to go on it from another web site.
|
define('NOCSRFCHECK',1); // This is login page. We must be able to go on it from another web site.
|
||||||
@ -545,8 +545,9 @@ if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING))
|
|||||||
{
|
{
|
||||||
$message='';
|
$message='';
|
||||||
|
|
||||||
// Install lock missing
|
// Check if install lock file is present
|
||||||
if (! file_exists('../install.lock') && is_dir(DOL_DOCUMENT_ROOT."/install"))
|
$lockfile=DOL_DATA_ROOT.'/install.lock';
|
||||||
|
if (! empty($lockfile) && ! file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install"))
|
||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
//if (! empty($message)) $message.='<br>';
|
//if (! empty($message)) $message.='<br>';
|
||||||
@ -573,7 +574,7 @@ if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING))
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/31 23:19:05 $ - $Revision: 1.200 $');
|
llxFooter('$Date: 2011/08/04 12:07:30 $ - $Revision: 1.201 $');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \file htdocs/install/etape1.php
|
* \file htdocs/install/etape1.php
|
||||||
* \ingroup install
|
* \ingroup install
|
||||||
* \brief Build conf file on disk
|
* \brief Build conf file on disk
|
||||||
* \version $Id: etape1.php,v 1.136 2011/07/31 23:26:18 eldy Exp $
|
* \version $Id: etape1.php,v 1.137 2011/08/04 13:19:26 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php
|
define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php
|
||||||
@ -64,14 +64,14 @@ $error = 0;
|
|||||||
// Repertoire des pages dolibarr
|
// Repertoire des pages dolibarr
|
||||||
$main_dir=isset($_POST["main_dir"])?trim($_POST["main_dir"]):'';
|
$main_dir=isset($_POST["main_dir"])?trim($_POST["main_dir"]):'';
|
||||||
|
|
||||||
// On supprime / de fin dans main_dir
|
// Remove last / into dans main_dir
|
||||||
if (substr($main_dir, dol_strlen($main_dir) -1) == "/")
|
if (substr($main_dir, dol_strlen($main_dir) -1) == "/")
|
||||||
{
|
{
|
||||||
$main_dir = substr($main_dir, 0, dol_strlen($main_dir)-1);
|
$main_dir = substr($main_dir, 0, dol_strlen($main_dir)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// On supprime / de fin dans main_url
|
// Remove last / into dans main_url
|
||||||
if (substr($_POST["main_url"], dol_strlen($_POST["main_url"]) -1) == "/")
|
if (! empty($_POST["main_url"]) && substr($_POST["main_url"], dol_strlen($_POST["main_url"]) -1) == "/")
|
||||||
{
|
{
|
||||||
$_POST["main_url"] = substr($_POST["main_url"], 0, dol_strlen($_POST["main_url"])-1);
|
$_POST["main_url"] = substr($_POST["main_url"], 0, dol_strlen($_POST["main_url"])-1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \file htdocs/install/etape5.php
|
* \file htdocs/install/etape5.php
|
||||||
* \ingroup install
|
* \ingroup install
|
||||||
* \brief Last page of upgrade or install process
|
* \brief Last page of upgrade or install process
|
||||||
* \version $Id: etape5.php,v 1.107 2011/07/31 23:26:19 eldy Exp $
|
* \version $Id: etape5.php,v 1.108 2011/08/04 12:07:30 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once("./inc.php");
|
include_once("./inc.php");
|
||||||
@ -314,7 +314,8 @@ if ($action == "set")
|
|||||||
if (! empty($force_install_lockinstall))
|
if (! empty($force_install_lockinstall))
|
||||||
{
|
{
|
||||||
// Install is finished, we create the lock file
|
// Install is finished, we create the lock file
|
||||||
$fp = @fopen($lockfile, "w");
|
$lockfile=DOL_DATA_ROOT.'/install.lock';
|
||||||
|
$fp = @fopen($lockfile, "w");
|
||||||
if ($fp)
|
if ($fp)
|
||||||
{
|
{
|
||||||
if ($force_install_lockinstall == 1) $force_install_lockinstall=444; // For backward compatibility
|
if ($force_install_lockinstall == 1) $force_install_lockinstall=444; // For backward compatibility
|
||||||
@ -363,7 +364,8 @@ elseif (preg_match('/upgrade/i',$action))
|
|||||||
if (! empty($force_install_lockinstall))
|
if (! empty($force_install_lockinstall))
|
||||||
{
|
{
|
||||||
// Upgrade is finished, we create the lock file
|
// Upgrade is finished, we create the lock file
|
||||||
$fp = @fopen($lockfile, "w");
|
$lockfile=DOL_DATA_ROOT.'/install.lock';
|
||||||
|
$fp = @fopen($lockfile, "w");
|
||||||
if ($fp)
|
if ($fp)
|
||||||
{
|
{
|
||||||
if ($force_install_lockinstall == 1) $force_install_lockinstall=444; // For backward compatibility
|
if ($force_install_lockinstall == 1) $force_install_lockinstall=444; // For backward compatibility
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
/** \file htdocs/install/inc.php
|
/** \file htdocs/install/inc.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File that define environment for install pages
|
* \brief File that define environment for install pages
|
||||||
* \version $Id: inc.php,v 1.137 2011/07/31 23:26:18 eldy Exp $
|
* \version $Id: inc.php,v 1.138 2011/08/04 12:07:30 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('DOL_VERSION','3.1.0-beta'); // 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)
|
||||||
@ -70,16 +70,15 @@ else
|
|||||||
$includeconferror='';
|
$includeconferror='';
|
||||||
|
|
||||||
|
|
||||||
|
# Define vars
|
||||||
$conffiletoshowshort = "conf.php";
|
$conffiletoshowshort = "conf.php";
|
||||||
# Define localization of conf file
|
# Define localization of conf file
|
||||||
$conffile = "../conf/conf.php";
|
$conffile = "../conf/conf.php";
|
||||||
$conffiletoshow = "htdocs/conf/conf.php";
|
$conffiletoshow = "htdocs/conf/conf.php";
|
||||||
$lockfile = '../../install.lock';
|
|
||||||
# For debian/redhat like systems
|
# For debian/redhat like systems
|
||||||
#$conffile = "/etc/dolibarr/conf.php";
|
#$conffile = "/etc/dolibarr/conf.php";
|
||||||
#$conffiletoshow = "/etc/dolibarr/conf.php";
|
#$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||||
#$lockfile = '/etc/dolibarr/install.lock'; # Web has no permission to write here
|
|
||||||
$lockfile = '../../install.lock';
|
|
||||||
|
|
||||||
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
||||||
{
|
{
|
||||||
@ -128,7 +127,6 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
|||||||
}
|
}
|
||||||
$conf->global->MAIN_LOGTOHTML=1;
|
$conf->global->MAIN_LOGTOHTML=1;
|
||||||
|
|
||||||
|
|
||||||
// Define prefix
|
// Define prefix
|
||||||
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
|
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
|
||||||
define('MAIN_DB_PREFIX',(isset($dolibarr_main_db_prefix)?$dolibarr_main_db_prefix:''));
|
define('MAIN_DB_PREFIX',(isset($dolibarr_main_db_prefix)?$dolibarr_main_db_prefix:''));
|
||||||
@ -179,6 +177,7 @@ if (preg_match('/install.lock/i',$_SERVER["SCRIPT_FILENAME"]))
|
|||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
$lockfile=DOL_DATA_ROOT.'/install.lock';
|
||||||
if (file_exists($lockfile))
|
if (file_exists($lockfile))
|
||||||
{
|
{
|
||||||
print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr root directory).<br>';
|
print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr root directory).<br>';
|
||||||
|
|||||||
@ -1135,6 +1135,7 @@ BarcodeDescUPC=Codis de barra tipus UPC
|
|||||||
BarcodeDescISBN=Codis de barra tipus ISBN
|
BarcodeDescISBN=Codis de barra tipus ISBN
|
||||||
BarcodeDescC39=Codis de barra tipus C39
|
BarcodeDescC39=Codis de barra tipus C39
|
||||||
BarcodeDescC128=Codis de barra tipus C128
|
BarcodeDescC128=Codis de barra tipus C128
|
||||||
|
NoActivatedBarcode=Cap tipus de codi de barres activat
|
||||||
##### Prelevements #####
|
##### Prelevements #####
|
||||||
WithdrawalsSetup=Configuració del mòdul domiciliacions
|
WithdrawalsSetup=Configuració del mòdul domiciliacions
|
||||||
##### ExternalRSS #####
|
##### ExternalRSS #####
|
||||||
|
|||||||
@ -1125,6 +1125,7 @@ BarcodeDescUPC=Barcode of type UPC
|
|||||||
BarcodeDescISBN=Barcode of type ISBN
|
BarcodeDescISBN=Barcode of type ISBN
|
||||||
BarcodeDescC39=Barcode of type C39
|
BarcodeDescC39=Barcode of type C39
|
||||||
BarcodeDescC128=Barcode of type C128
|
BarcodeDescC128=Barcode of type C128
|
||||||
|
NoActivatedBarcode=No barcode type activated
|
||||||
##### Prelevements #####
|
##### Prelevements #####
|
||||||
WithdrawalsSetup=Withdrawal module setup
|
WithdrawalsSetup=Withdrawal module setup
|
||||||
##### ExternalRSS #####
|
##### ExternalRSS #####
|
||||||
|
|||||||
@ -1135,6 +1135,7 @@ BarcodeDescUPC=Códigos de barra tipo UPC
|
|||||||
BarcodeDescISBN=Códigos de barra tipo ISBN
|
BarcodeDescISBN=Códigos de barra tipo ISBN
|
||||||
BarcodeDescC39=Códigos de barra tipo C39
|
BarcodeDescC39=Códigos de barra tipo C39
|
||||||
BarcodeDescC128=Códigos de barra tipo C128
|
BarcodeDescC128=Códigos de barra tipo C128
|
||||||
|
NoActivatedBarcode=Ningún tipo de código de barra activado
|
||||||
##### Prelevements #####
|
##### Prelevements #####
|
||||||
WithdrawalsSetup=Configuración del módulo domiciliaciones
|
WithdrawalsSetup=Configuración del módulo domiciliaciones
|
||||||
##### ExternalRSS #####
|
##### ExternalRSS #####
|
||||||
|
|||||||
@ -1137,6 +1137,7 @@ BarcodeDescUPC= code-barres de type UPC
|
|||||||
BarcodeDescISBN= code-barres de type ISBN
|
BarcodeDescISBN= code-barres de type ISBN
|
||||||
BarcodeDescC39= code-barres de type C39
|
BarcodeDescC39= code-barres de type C39
|
||||||
BarcodeDescC128= code-barres de type C128
|
BarcodeDescC128= code-barres de type C128
|
||||||
|
NoActivatedBarcode=Aucun type de code bar activé
|
||||||
##### Prelevements #####
|
##### Prelevements #####
|
||||||
WithdrawalsSetup= Configuration du module prélèvement
|
WithdrawalsSetup= Configuration du module prélèvement
|
||||||
##### ExternalRSS #####
|
##### ExternalRSS #####
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/lib/databases/mssql.lib.php
|
* \file htdocs/lib/databases/mssql.lib.php
|
||||||
* \brief Fichier de la classe permettant de gerer une base mssql
|
* \brief Fichier de la classe permettant de gerer une base mssql
|
||||||
* \version $Id: mssql.lib.php,v 1.86 2011/07/31 23:26:03 eldy Exp $
|
* \version $Id: mssql.lib.php,v 1.87 2011/08/04 13:58:14 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Pour compatibilite lors de l'upgrade
|
// Pour compatibilite lors de l'upgrade
|
||||||
@ -1022,14 +1022,24 @@ class DoliDb
|
|||||||
return ''; // attente debugage
|
return ''; // attente debugage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return full path of dump program
|
||||||
|
* @return string Full path of dump program
|
||||||
|
*/
|
||||||
function getPathOfDump()
|
function getPathOfDump()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return full path of restore program
|
||||||
|
* @return string Full path of restore program
|
||||||
|
*/
|
||||||
function getPathOfRestore()
|
function getPathOfRestore()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/lib/databases/mysql.lib.php
|
* \file htdocs/lib/databases/mysql.lib.php
|
||||||
* \brief Class file to manage Dolibarr database access for a Mysql database
|
* \brief Class file to manage Dolibarr database access for a Mysql database
|
||||||
* \version $Id: mysql.lib.php,v 1.119 2011/07/31 23:26:03 eldy Exp $
|
* \version $Id: mysql.lib.php,v 1.121 2011/08/04 13:58:55 eldy Exp $
|
||||||
*/
|
*/
|
||||||
// For compatibility during upgrade
|
// For compatibility during upgrade
|
||||||
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '../..');
|
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '../..');
|
||||||
@ -1144,8 +1144,8 @@ class DoliDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return full path of dump program
|
* Return full path of dump program
|
||||||
* \return string Full path of dump program
|
* @return string Full path of dump program
|
||||||
*/
|
*/
|
||||||
function getPathOfDump()
|
function getPathOfDump()
|
||||||
{
|
{
|
||||||
@ -1156,7 +1156,7 @@ class DoliDb
|
|||||||
{
|
{
|
||||||
$liste=$this->fetch_array($resql);
|
$liste=$this->fetch_array($resql);
|
||||||
$basedir=$liste['Value'];
|
$basedir=$liste['Value'];
|
||||||
$fullpathofdump=$basedir.'bin/mysqldump';
|
$fullpathofdump=$basedir.(preg_match('/\/$/',$basedir)?'':'/').'bin/mysqldump';
|
||||||
}
|
}
|
||||||
return $fullpathofdump;
|
return $fullpathofdump;
|
||||||
}
|
}
|
||||||
@ -1174,7 +1174,7 @@ class DoliDb
|
|||||||
{
|
{
|
||||||
$liste=$this->fetch_array($resql);
|
$liste=$this->fetch_array($resql);
|
||||||
$basedir=$liste['Value'];
|
$basedir=$liste['Value'];
|
||||||
$fullpathofimport=$basedir.'bin/mysql';
|
$fullpathofimport=$basedir.(preg_match('/\/$/',$basedir)?'':'/').'bin/mysql';
|
||||||
}
|
}
|
||||||
return $fullpathofimport;
|
return $fullpathofimport;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/lib/databases/mysqli.lib.php
|
* \file htdocs/lib/databases/mysqli.lib.php
|
||||||
* \brief Class file to manage Dolibarr database access for a Mysql database
|
* \brief Class file to manage Dolibarr database access for a Mysql database
|
||||||
* \version $Id: mysqli.lib.php,v 1.113 2011/07/31 23:26:03 eldy Exp $
|
* \version $Id: mysqli.lib.php,v 1.115 2011/08/04 13:58:55 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// For compatibility during upgrade
|
// For compatibility during upgrade
|
||||||
@ -1155,8 +1155,8 @@ class DoliDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return full path of dump program
|
* Return full path of dump program
|
||||||
* \return string Full path of dump program
|
* @return string Full path of dump program
|
||||||
*/
|
*/
|
||||||
function getPathOfDump()
|
function getPathOfDump()
|
||||||
{
|
{
|
||||||
@ -1167,14 +1167,14 @@ class DoliDb
|
|||||||
{
|
{
|
||||||
$liste=$this->fetch_array($resql);
|
$liste=$this->fetch_array($resql);
|
||||||
$basedir=$liste['Value'];
|
$basedir=$liste['Value'];
|
||||||
$fullpathofdump=$basedir.'bin/mysqldump';
|
$fullpathofdump=$basedir.(preg_match('/\/$/',$basedir)?'':'/').'bin/mysqldump';
|
||||||
}
|
}
|
||||||
return $fullpathofdump;
|
return $fullpathofdump;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return full path of restore program
|
* Return full path of restore program
|
||||||
* \return string Full path of restore program
|
* @return string Full path of restore program
|
||||||
*/
|
*/
|
||||||
function getPathOfRestore()
|
function getPathOfRestore()
|
||||||
{
|
{
|
||||||
@ -1185,7 +1185,7 @@ class DoliDb
|
|||||||
{
|
{
|
||||||
$liste=$this->fetch_array($resql);
|
$liste=$this->fetch_array($resql);
|
||||||
$basedir=$liste['Value'];
|
$basedir=$liste['Value'];
|
||||||
$fullpathofimport=$basedir.'bin/mysql';
|
$fullpathofimport=$basedir.(preg_match('/\/$/',$basedir)?'':'/').'bin/mysql';
|
||||||
}
|
}
|
||||||
return $fullpathofimport;
|
return $fullpathofimport;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/lib/databases/pgsql.lib.php
|
* \file htdocs/lib/databases/pgsql.lib.php
|
||||||
* \brief Fichier de la classe permettant de gerer une base pgsql
|
* \brief Fichier de la classe permettant de gerer une base pgsql
|
||||||
* \version $Id: pgsql.lib.php,v 1.110 2011/07/31 23:26:03 eldy Exp $
|
* \version $Id: pgsql.lib.php,v 1.111 2011/08/04 13:58:14 eldy Exp $
|
||||||
*/
|
*/
|
||||||
// For compatibility during upgrade
|
// For compatibility during upgrade
|
||||||
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '../..');
|
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '../..');
|
||||||
@ -1233,8 +1233,8 @@ class DoliDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return full path of dump program
|
* Return full path of dump program
|
||||||
* \return string Full path of dump program
|
* @return string Full path of dump program
|
||||||
*/
|
*/
|
||||||
function getPathOfDump()
|
function getPathOfDump()
|
||||||
{
|
{
|
||||||
@ -1259,10 +1259,10 @@ class DoliDb
|
|||||||
return $fullpathofdump;
|
return $fullpathofdump;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return full path of restore program
|
* Return full path of restore program
|
||||||
* \return string Full path of restore program
|
* @return string Full path of restore program
|
||||||
*/
|
*/
|
||||||
function getPathOfRestore()
|
function getPathOfRestore()
|
||||||
{
|
{
|
||||||
$fullpathofdump='/pathtopgrestore/pg_restore';
|
$fullpathofdump='/pathtopgrestore/pg_restore';
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
* \file htdocs/lib/functions.lib.php
|
* \file htdocs/lib/functions.lib.php
|
||||||
* \brief A set of functions for Dolibarr
|
* \brief A set of functions for Dolibarr
|
||||||
* This file contains all frequently used functions.
|
* This file contains all frequently used functions.
|
||||||
* \version $Id: functions.lib.php,v 1.549 2011/07/31 23:25:25 eldy Exp $
|
* \version $Id: functions.lib.php,v 1.552 2011/08/04 22:01:23 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// For compatibility during upgrade
|
// For compatibility during upgrade
|
||||||
@ -1639,6 +1639,7 @@ function img_picto_common($alt, $picto, $options='', $pictoisfullpath=0)
|
|||||||
global $conf;
|
global $conf;
|
||||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
||||||
if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||||
|
if (! empty($conf->global->MAIN_MODULE_CAN_OVERWRITE_COMMONICONS) && file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/'.$picto)) return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||||
return '<img src="'.DOL_URL_ROOT.'/theme/common/'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
return '<img src="'.DOL_URL_ROOT.'/theme/common/'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3148,14 +3149,24 @@ function get_default_tva($societe_vendeuse, $societe_acheteuse, $idprod=0)
|
|||||||
dol_syslog("get_default_tva: seller use vat=".$societe_vendeuse->tva_assuj.", seller country=".$societe_vendeuse->pays_code.", seller in cee=".$societe_vendeuse->isInEEC().", buyer country=".$societe_acheteuse->pays_code.", buyer in cee=".$societe_acheteuse->isInEEC().", idprod=".$idprod.", SERVICE_ARE_ECOMMERCE_200238EC=".$conf->global->SERVICES_ARE_ECOMMERCE_200238EC);
|
dol_syslog("get_default_tva: seller use vat=".$societe_vendeuse->tva_assuj.", seller country=".$societe_vendeuse->pays_code.", seller in cee=".$societe_vendeuse->isInEEC().", buyer country=".$societe_acheteuse->pays_code.", buyer in cee=".$societe_acheteuse->isInEEC().", idprod=".$idprod.", SERVICE_ARE_ECOMMERCE_200238EC=".$conf->global->SERVICES_ARE_ECOMMERCE_200238EC);
|
||||||
|
|
||||||
// Si vendeur non assujeti a TVA (tva_assuj vaut 0/1 ou franchise/reel)
|
// Si vendeur non assujeti a TVA (tva_assuj vaut 0/1 ou franchise/reel)
|
||||||
if (is_numeric($societe_vendeuse->tva_assuj) && ! $societe_vendeuse->tva_assuj) return 0;
|
if (is_numeric($societe_vendeuse->tva_assuj) && ! $societe_vendeuse->tva_assuj)
|
||||||
if (! is_numeric($societe_vendeuse->tva_assuj) && $societe_vendeuse->tva_assuj=='franchise') return 0;
|
{
|
||||||
|
//print 'VATRULE 1';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (! is_numeric($societe_vendeuse->tva_assuj) && $societe_vendeuse->tva_assuj=='franchise')
|
||||||
|
{
|
||||||
|
//print 'VATRULE 2';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
|
|
||||||
//if (is_object($societe_acheteuse) && ($societe_vendeuse->pays_id == $societe_acheteuse->pays_id) && ($societe_acheteuse->tva_assuj == 1 || $societe_acheteuse->tva_assuj == 'reel'))
|
//if (is_object($societe_acheteuse) && ($societe_vendeuse->pays_id == $societe_acheteuse->pays_id) && ($societe_acheteuse->tva_assuj == 1 || $societe_acheteuse->tva_assuj == 'reel'))
|
||||||
// Le test ci-dessus ne devrait pas etre necessaire. Me signaler l'exemple du cas juridique concerne si le test suivant n'est pas suffisant.
|
// Le test ci-dessus ne devrait pas etre necessaire. Me signaler l'exemple du cas juridique concerne si le test suivant n'est pas suffisant.
|
||||||
if ($societe_vendeuse->pays_code == $societe_acheteuse->pays_code) // Warning ->pays_id not always defined
|
|
||||||
|
// Si le (pays vendeur = pays acheteur) alors la TVA par defaut=TVA du produit vendu. Fin de regle.
|
||||||
|
if ($societe_vendeuse->pays_code == $societe_acheteuse->pays_code) // Warning ->pays_code not always defined
|
||||||
{
|
{
|
||||||
|
//print 'VATRULE 3';
|
||||||
return get_product_vat_for_country($idprod,$societe_vendeuse->pays_code);
|
return get_product_vat_for_country($idprod,$societe_vendeuse->pays_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3169,10 +3180,12 @@ function get_default_tva($societe_vendeuse, $societe_acheteuse, $idprod=0)
|
|||||||
$isacompany=$societe_acheteuse->isACompany();
|
$isacompany=$societe_acheteuse->isACompany();
|
||||||
if ($isacompany)
|
if ($isacompany)
|
||||||
{
|
{
|
||||||
|
//print 'VATRULE 4';
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//print 'VATRULE 5';
|
||||||
return get_product_vat_for_country($idprod,$societe_vendeuse->pays_code);
|
return get_product_vat_for_country($idprod,$societe_vendeuse->pays_code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3184,12 +3197,14 @@ function get_default_tva($societe_vendeuse, $societe_acheteuse, $idprod=0)
|
|||||||
//print "eee".$societe_acheteuse->isACompany();exit;
|
//print "eee".$societe_acheteuse->isACompany();exit;
|
||||||
if (! $societe_vendeuse->isInEEC() && $societe_acheteuse->isInEEC() && ! $societe_acheteuse->isACompany())
|
if (! $societe_vendeuse->isInEEC() && $societe_acheteuse->isInEEC() && ! $societe_acheteuse->isACompany())
|
||||||
{
|
{
|
||||||
|
//print 'VATRULE 6';
|
||||||
return get_product_vat_for_country($idprod,$societe_acheteuse->pays_code);
|
return get_product_vat_for_country($idprod,$societe_acheteuse->pays_code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sinon la TVA proposee par defaut=0. Fin de regle.
|
// Sinon la TVA proposee par defaut=0. Fin de regle.
|
||||||
// Rem: Cela signifie qu'au moins un des 2 est hors Communaute europeenne et que le pays differe
|
// Rem: Cela signifie qu'au moins un des 2 est hors Communaute europeenne et que le pays differe
|
||||||
|
//print 'VATRULE 7';
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
* \file htdocs/product/class/product.class.php
|
* \file htdocs/product/class/product.class.php
|
||||||
* \ingroup produit
|
* \ingroup produit
|
||||||
* \brief Fichier de la classe des produits predefinis
|
* \brief Fichier de la classe des produits predefinis
|
||||||
* \version $Id: product.class.php,v 1.48 2011/07/31 23:24:03 eldy Exp $
|
* \version $Id: product.class.php,v 1.49 2011/08/04 21:46:51 eldy Exp $
|
||||||
*/
|
*/
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||||
|
|
||||||
@ -2861,7 +2861,7 @@ class Product extends CommonObject
|
|||||||
$this->tpl['price_base_type'] = $html->load_PriceBaseType($this->price_base_type, "price_base_type");
|
$this->tpl['price_base_type'] = $html->load_PriceBaseType($this->price_base_type, "price_base_type");
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
$this->tpl['tva_tx'] = $html->load_tva("tva_tx",$conf->defaulttx,$mysoc,'');
|
$this->tpl['tva_tx'] = $html->load_tva("tva_tx",-1,$mysoc,'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'create' || $action == 'edit')
|
if ($action == 'create' || $action == 'edit')
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
* \file htdocs/product/fiche.php
|
* \file htdocs/product/fiche.php
|
||||||
* \ingroup product
|
* \ingroup product
|
||||||
* \brief Page to show product
|
* \brief Page to show product
|
||||||
* \version $Id: fiche.php,v 1.374 2011/07/31 23:19:26 eldy Exp $
|
* \version $Id: fiche.php,v 1.375 2011/08/04 21:46:50 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@ -793,7 +793,7 @@ if ($action == 'create' && ($user->rights->produit->creer || $user->rights->serv
|
|||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<tr><td width="20%">'.$langs->trans("VATRate").'</td><td>';
|
print '<tr><td width="20%">'.$langs->trans("VATRate").'</td><td>';
|
||||||
print $html->select_tva("tva_tx",$conf->defaulttx,$mysoc,'');
|
print $html->load_tva("tva_tx",-1,$mysoc,'');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -1645,6 +1645,6 @@ if ($product->id && $action == '' && $product->status)
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/31 23:19:26 $ - $Revision: 1.374 $');
|
llxFooter('$Date: 2011/08/04 21:46:50 $ - $Revision: 1.375 $');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \file htdocs/product/price.php
|
* \file htdocs/product/price.php
|
||||||
* \ingroup product
|
* \ingroup product
|
||||||
* \brief Page to show product prices
|
* \brief Page to show product prices
|
||||||
* \version $Id: price.php,v 1.110 2011/07/31 23:19:25 eldy Exp $
|
* \version $Id: price.php,v 1.111 2011/08/04 21:46:50 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@ -317,7 +317,7 @@ if ($_GET["action"] == 'edit_price' && ($user->rights->produit->creer || $user->
|
|||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
print '<tr><td>'.$langs->trans("VATRate").'</td><td>';
|
print '<tr><td>'.$langs->trans("VATRate").'</td><td>';
|
||||||
print $html->select_tva("tva_tx",$product->tva_tx,$mysoc,'',$product->id);
|
print $html->load_tva("tva_tx",$product->tva_tx,$mysoc,'',$product->id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Price base
|
// Price base
|
||||||
@ -377,7 +377,7 @@ if ($_GET["action"] == 'edit_price' && ($user->rights->produit->creer || $user->
|
|||||||
if ($i == 1)
|
if ($i == 1)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("VATRate").'</td><td>';
|
print '<tr><td>'.$langs->trans("VATRate").'</td><td>';
|
||||||
print $html->select_tva("tva_tx_".$i,$product->multiprices_tva_tx["$i"],$mysoc,'',$product->id);
|
print $html->load_tva("tva_tx_".$i,$product->multiprices_tva_tx["$i"],$mysoc,'',$product->id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -534,5 +534,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/31 23:19:25 $ - $Revision: 1.110 $');
|
llxFooter('$Date: 2011/08/04 21:46:50 $ - $Revision: 1.111 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user