Merge remote-tracking branch 'origin/3.5' into develop

Conflicts:
	htdocs/.gitignore
	htdocs/contact/fiche.php
This commit is contained in:
Laurent Destailleur 2013-12-14 03:13:46 +01:00
commit eaf151d7f5
67 changed files with 615 additions and 355 deletions

View File

@ -141,7 +141,7 @@ parameter. All methods addline in this case were modified to remove this paramet
5) Property ->tel on objects is now ->phone
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
Fix: field's problem into company's page (RIB)
Fix: Document cerfa doesn't contained firstname & lastname from donator
@ -153,6 +153,14 @@ Fix: [ bug #1142 ] Set paiement on invoice (PGSql)
Fix: [ bug #1145 ] Agenda button list type do not display
Fix: [ bug #1148 ] Product consomation : supplier order bad status
Fix: [ bug #1159 ] Commercial search "other" give p.note do not exists
Fix: [ bug #1174 ] Product translated description not good into PDF
Fix: [ bug #1163 ] SQL Error when searching for supplier orders
Fix: [ bug #1162 ] Translaction for morning and afternoon
Fix: [ bug #1161 ] Search on product label
Fix: [ bug #1075 ] POS module doesn't decrement stock of products in delayed payment mode.
Fix: [ bug #1171 ] Documents lost in interventions after validating
Fix: fix unsubscribe URL into mailing when sending manually (not by script)
Fix: [ bug #1182 ] ODT company_country tag is htmlencoded
***** ChangeLog for 3.4.1 compared to 3.4.0 *****
Fix: Display buying price on line edit when no supplier price is defined
@ -183,7 +191,6 @@ Fix: there was no escaping on filter fields in supplier product list
Fix: bugs on margin reports and better margin calculation on credit notes
Qual: Add travis-ci integration
***** ChangeLog for 3.4 compared to 3.3.* *****
For users:
- New: Can use ODS templates as document templates.

View File

@ -22,7 +22,7 @@ File added into doxygen generated documentation
<hr class="footer" />
<address class="footer"><small>Generated on $datetime
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen </a> $doxygenversion </small></address>
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
<!-- Google AdSense -->
@ -40,5 +40,6 @@ google_ad_height = 60;
<!-- End google adsense -->
<br>
</div>
</body>
</html>

View File

@ -346,6 +346,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;

2
htdocs/.gitignore vendored
View File

@ -8,4 +8,4 @@
/numberingpack*
/ovh*
/pos
/ultimatepdf*
/ultimatepdf*

View File

@ -18,7 +18,7 @@
*/
/**
* \file htdocs/admin/agenda.php
* \file htdocs/admin/agenda_other.php
* \ingroup agenda
* \brief Autocreate actions for agenda module setup page
*/

View File

@ -292,14 +292,14 @@ if ($action == 'edit' || $action == 'updateedit')
// Country
$var=!$var;
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("Country").'</td><td>';
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("Country").'</td><td class="maxwidthonsmartphone">';
//if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
print $form->select_country($mysoc->country_id,'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>'."\n";
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td class="maxwidthonsmartphone">';
$formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id');
print '</td></tr>'."\n";

View File

@ -42,9 +42,6 @@ $consts=GETPOST('const');
$constname=GETPOST('constname','alpha');
$constvalue=GETPOST('constvalue');
$constnote=GETPOST('constnote','alpha');
$consttype=(GETPOST('consttype','alpha')?GETPOST('consttype','alpha'):'chaine');
$typeconst=array('yesno' => 'yesno', 'texte' => 'texte', 'chaine' => 'chaine');
@ -52,7 +49,7 @@ $typeconst=array('yesno' => 'yesno', 'texte' => 'texte', 'chaine' => 'chaine');
* Actions
*/
if ($action == 'add')
if ($action == 'add' || (GETPOST('add') && $action != 'update'))
{
$error=0;
@ -69,9 +66,13 @@ if ($action == 'add')
if (! $error)
{
if (dolibarr_set_const($db, $constname, $constvalue, $typeconst[$consttype], 1, $constnote, $entity) >= 0)
if (dolibarr_set_const($db, $constname, $constvalue, 'chaine', 1, $constnote, $entity) >= 0)
{
setEventMessage($langs->trans("RecordSaved"));
$action="";
$constname="";
$constvalue="";
$constnote="";
}
else
{
@ -176,6 +177,10 @@ print_fiche_titre($langs->trans("OtherSetup"),'','setup');
print $langs->trans("ConstDesc")."<br>\n";
print "<br>\n";
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" id="action" name="action" value="">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
@ -189,15 +194,12 @@ print "</tr>\n";
// Line to add new record
$var=false;
print "\n";
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
print '<tr '.$bc[$var].'><td><input type="text" class="flat" size="24" name="constname" value=""></td>'."\n";
print '<tr '.$bc[$var].'><td><input type="text" class="flat" size="24" name="constname" value="'.$constname.'"></td>'."\n";
print '<td>';
print '<input type="text" class="flat" size="30" name="constvalue" value="">';
print '<input type="text" class="flat" size="30" name="constvalue" value="'.$constvalue.'">';
print '</td><td>';
print '<input type="text" class="flat" size="40" name="constnote" value="">';
print '<input type="text" class="flat" size="40" name="constnote" value="'.$constnote.'">';
print '</td>';
// Limit to superadmin
if (! empty($conf->multicompany->enabled) && !$user->entity)
@ -205,22 +207,17 @@ if (! empty($conf->multicompany->enabled) && !$user->entity)
print '<td>';
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
print '</td>';
print '<td align="center">';
}
else
{
print '<td align="center">';
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
}
print '<td align="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="Button">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">';
print "</td>\n";
print '</tr>';
print '</form>';
print "\n";
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" id="action" name="action" value="">';
// Show constants
$sql = "SELECT";
@ -250,21 +247,20 @@ if ($result)
$var=!$var;
print "\n";
print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->name.'">';
print '<input type="hidden" name="const['.$i.'][type]" value="'.$obj->type.'">';
print '<tr '.$bc[$var].'><td>'.$obj->name.'</td>'."\n";
// Value
print '<td>';
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.htmlspecialchars($obj->value).'"';
print '>';
print '</td><td>';
print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->name.'">';
print '<input type="hidden" name="const['.$i.'][type]" value="'.$obj->type.'">';
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.htmlspecialchars($obj->value).'">';
print '</td>';
// Note
print '<input type="text" id="note_'.$i.'"class="flat inputforupdate" size="40" name="const['.$i.'][note]" value="'.htmlspecialchars($obj->note,1).'"';
print '>';
print '<td>';
print '<input type="text" id="note_'.$i.'"class="flat inputforupdate" size="40" name="const['.$i.'][note]" value="'.htmlspecialchars($obj->note,1).'">';
print '</td>';
// Entity limit to superadmin
@ -273,13 +269,14 @@ if ($result)
print '<td>';
print '<input type="text" class="flat" size="1" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
print '</td>';
print '<td align="center">';
}
else
{
print '<td align="center">';
print '<input type="hidden" name="const['.$i.'][entity]" value="'.$obj->entity.'">';
}
print '<td align="center">';
if ($conf->use_javascript_ajax)
{
print '<input type="checkbox" class="flat checkboxfordelete" id="check_'.$i.'" name="const['.$i.'][check]" value="1">';

View File

@ -1316,9 +1316,9 @@ function fieldList($fieldlist,$obj='',$tabname='')
$size='';
if ($fieldlist[$field]=='libelle') $size='size="32" ';
if ($fieldlist[$field]=='tracking') $size='size="92" ';
if ($fieldlist[$field]=='accountancy_code') $size='size="15" ';
if ($fieldlist[$field]=='accountancy_code_sell') $size='size="15" ';
if ($fieldlist[$field]=='accountancy_code_buy') $size='size="15" ';
if ($fieldlist[$field]=='accountancy_code') $size='size="10" ';
if ($fieldlist[$field]=='accountancy_code_sell') $size='size="10" ';
if ($fieldlist[$field]=='accountancy_code_buy') $size='size="10" ';
print '<input type="text" '.$size.' class="flat" value="'.(isset($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'').'" name="'.$fieldlist[$field].'">';
print '</td>';
}

View File

@ -82,4 +82,4 @@ print '</table>';
llxFooter();
$db->close();
?>
?>

View File

@ -15,6 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/deconnexion.php
* \ingroup cashdesk
* \brief Manage deconnexion for point of sale module
*/
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Uncomment creates pb to relogon after a disconnect
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');

View File

@ -17,8 +17,9 @@
*/
/**
* This page is called each time we press a key in the code
* search form to show product combo list.
* \file htdocs/cashdesk/facturation_dhtml.php
* \ingroup cashdesk
* \brief This page is called each time we press a key in the code search form to show product combo list.
*/

View File

@ -16,6 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/facturation_verif.php
* \ingroup cashdesk
* \brief facturation_verif.php
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';

View File

@ -20,6 +20,12 @@
* We set here login choices into session.
*/
/**
* \file htdocs/cashdesk/index_verif.php
* \ingroup cashdesk
* \brief index_verif.php
*/
include '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php';

View File

@ -15,6 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/validation.php
* \ingroup cashdesk
* \brief validation.php
*/
// Affichage des templates
require ('tpl/validation1.tpl.php');

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2007-2008 J<EFBFBD>r<EFBFBD>mie Ollivier <jeremie.o@laposte.net>
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.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
@ -15,7 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Affichage des templates
require ('tpl/validation2.tpl.php');
/**
* \file htdocs/cashdesk/validation_ok.php
* \ingroup cashdesk
* \brief validation_ok.php
*/
// Affichage des templates
require ('tpl/validation2.tpl.php');
?>

View File

@ -15,6 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/validation_ticket.php
* \ingroup cashdesk
* \brief validation_ticket.php
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';

View File

@ -17,6 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/validation_verif.php
* \ingroup cashdesk
* \brief validation_verif.php
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';

View File

@ -19,8 +19,8 @@
*/
/**
* \file htdocs/societe/admin/societe_extrafields.php
* \ingroup societe
* \file htdocs/comm/admin/propal_extrafields.php
* \ingroup propal
* \brief Page to setup extra fields of third party
*/

View File

@ -984,7 +984,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
$error++;
}
}
if (! $error)
{
$db->begin();

View File

@ -21,7 +21,7 @@
/**
* \file htdocs/comm/propal/document.php
* \ingroup propale
* \ingroup propal
* \brief Management page of documents attached to a business proposal
*/

View File

@ -19,7 +19,7 @@
/**
* \file htdocs/comm/propal/info.php
* \ingroup propale
* \ingroup propal
* \brief Page d'affichage des infos d'une proposition commerciale
*/

View File

@ -25,8 +25,8 @@
*/
/**
* \file htdocs/comm/propal.php
* \ingroup propale
* \file htdocs/comm/propal/list.php
* \ingroup propal
* \brief Page of commercial proposals card and list
*/

View File

@ -21,7 +21,7 @@
/**
* \file htdocs/comm/propal/note.php
* \ingroup propale
* \ingroup propal
* \brief Fiche d'information sur une proposition commerciale
*/

View File

@ -14,7 +14,12 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* \file htdocs/comm/propal/tpl/linkedobjectblock.tpl.php
* \ingroup propal
* \brief Template to show objects linked to proposals
*/
?>

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -31,7 +31,7 @@ $langs->load("compta");
$langs->load("banks");
$langs->load("bills");
$id=GETPOST("id");
$id=GETPOST("id",'int');
$action=GETPOST('action');
// Security check
@ -87,7 +87,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
if ($action == 'delete')
{
$result=$tva->fetch($_GET['id']);
$result=$tva->fetch($id);
if ($tva->rappro == 0)
{
@ -100,10 +100,10 @@ if ($action == 'delete')
{
$accountline=new AccountLine($db);
$result=$accountline->fetch($tva->fk_bank);
$result=$accountline->delete($user);
if ($result > 0) $result=$accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing)
}
if ($result > 0)
if ($result >= 0)
{
$db->commit();
header("Location: ".DOL_URL_ROOT.'/compta/tva/reglement.php');
@ -289,4 +289,4 @@ if ($id)
$db->close();
llxFooter();
?>
?>

View File

@ -6,7 +6,7 @@
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -59,6 +59,8 @@ class Contact extends CommonObject
var $country_code; // Code of country
var $country; // Label of country
var $poste; // Position
var $socid; // fk_soc
var $statut; // 0=inactif, 1=actif
@ -949,37 +951,35 @@ class Contact extends CommonObject
if ($mode == 0)
{
if ($statut==0) return $langs->trans('Disabled');
elseif ($statut==1) return $langs->trans('Enabled');
if ($statut==0 || $statut==5) return $langs->trans('Disabled');
elseif ($statut==1 || $statut==4) return $langs->trans('Enabled');
}
elseif ($mode == 1)
{
if ($statut==0) return $langs->trans('Disabled');
elseif ($statut==1) return $langs->trans('Enabled');
if ($statut==0 || $statut==5) return $langs->trans('Disabled');
elseif ($statut==1 || $statut==4) return $langs->trans('Enabled');
}
elseif ($mode == 2)
{
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
if ($statut==0 || $statut==5) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
elseif ($statut==1 || $statut==4) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
}
elseif ($mode == 3)
{
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5');
elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4');
if ($statut==0 || $statut==5) return img_picto($langs->trans('Disabled'),'statut5');
elseif ($statut==1 || $statut==4) return img_picto($langs->trans('Enabled'),'statut4');
}
elseif ($mode == 4)
{
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('StatusContactDraft');
elseif ($statut==1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
elseif ($statut==1 || $statut==4) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
}
elseif ($mode == 5)
{
if ($statut==0) return '<span class="hideonsmartphone">'.$langs->trans('Disabled').' </span>'.img_picto($langs->trans('Disabled'),'statut5');
elseif ($statut==1) return '<span class="hideonsmartphone">'.$langs->trans('Enabled').' </span>'.img_picto($langs->trans('Enabled'),'statut4');
if ($statut==0 || $statut==5) return '<span class="hideonsmartphone">'.$langs->trans('Disabled').' </span>'.img_picto($langs->trans('Disabled'),'statut5');
elseif ($statut==1 || $statut==4) return '<span class="hideonsmartphone">'.$langs->trans('Enabled').' </span>'.img_picto($langs->trans('Enabled'),'statut4');
}
}

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -432,14 +432,14 @@ else
if ($socid > 0)
{
print '<tr><td>'.$langs->trans("Company").'</td>';
print '<td colspan="3">';
print '<td colspan="3" class="maxwidthonsmartphone">';
print $objsoc->getNomUrl(1);
print '</td>';
print '<input type="hidden" name="socid" value="'.$objsoc->id.'">';
print '</td></tr>';
}
else {
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3" class="maxwidthonsmartphone">';
print $form->select_company($socid,'socid','',1);
print '</td></tr>';
}
@ -474,13 +474,13 @@ else
// Zip / Town
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="'.$colspan.'">';
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).'&nbsp;';
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
print '</td></tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.$colspan.'">';
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
print $form->select_country((isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id),'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>';
@ -488,7 +488,7 @@ else
// State
if (empty($conf->global->SOCIETE_DISABLE_STATE))
{
print '<tr><td>'.$langs->trans('State').'</td><td colspan="'.$colspan.'">';
print '<tr><td>'.$langs->trans('State').'</td><td colspan="'.$colspan.'" class="maxwidthonsmartphone">';
if ($object->country_id)
{
print $formcompany->select_state(isset($_POST["state_id"])?$_POST["state_id"]:$object->state_id,$object->country_code,'state_id');
@ -527,10 +527,10 @@ else
// Skype
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
{
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3"><input name="skype" type="text" size="50" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
}
// Visibility
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
@ -655,7 +655,7 @@ else
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
{
print '<tr><td>'.$langs->trans("Company").'</td>';
print '<td colspan="3">';
print '<td colspan="3" class="maxwidthonsmartphone">';
print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1);
print '</td>';
print '</tr>';
@ -680,13 +680,13 @@ else
print '</td></tr>';
// Zip / Town
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="2">';
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="2" class="maxwidthonsmartphone">';
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).'&nbsp;';
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
print '</td></tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="2">';
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="2" class="maxwidthonsmartphone">';
print $form->select_country(isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'country_id');
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>';
@ -694,7 +694,7 @@ else
// State
if (empty($conf->global->SOCIETE_DISABLE_STATE))
{
print '<tr><td>'.$langs->trans('State').'</td><td colspan="2">';
print '<tr><td>'.$langs->trans('State').'</td><td colspan="2" class="maxwidthonsmartphone">';
print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'state_id');
print '</td></tr>';
}
@ -731,13 +731,13 @@ else
print '<td colspan="2">&nbsp;</td>';
}
print '</tr>';
// Skype
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
print '<tr><td>'.$langs->trans("Skype").'</td><td><input name="skype" type="text" size="40" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
}
// Visibility
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
@ -950,7 +950,7 @@ else
print '<td colspan="2">&nbsp;</td>';
}
print '</tr>';
// Skype
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{

View File

@ -35,6 +35,7 @@ $uri=preg_replace('/^http(s?):\/\//i','',$dolibarr_main_url_root);
$pos = strstr($uri, '/'); // $pos contient alors url sans nom domaine
if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a ''
define('DOL_URL_ROOT', $pos);
$entity = ((!empty($_SESSION['dol_entity']) && $_SESSION['dol_entity'] > 1) ? $_SESSION['dol_entity'] : null);
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
@ -49,7 +50,7 @@ $Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&fil
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root . (!empty($entity) ? '/' . $entity : '') . '/fckeditor/';
// Due to security issues with Apache modules, it is recommended to leave the
// following setting enabled.

View File

@ -99,7 +99,7 @@ function checkBanForAccount($account)
if (empty($account->number)) $account->number=$account->num_compte;
if (empty($account->cle)) $account->cle=$account->cle_rib;
dol_syslog("Bank.lib::checkBanForAccount account->code_banque=".$account->code_banque." account->code_guichet=".$account->code_guichet." account->number=".$account->number." account->cle=".$account->cle." account->iban=".$account->iban." country_code=".$country_code, LOG_DEBUG);
dol_syslog("bank.lib::checkBanForAccount account->code_banque=".$account->code_banque." account->code_guichet=".$account->code_guichet." account->number=".$account->number." account->cle=".$account->cle." account->iban=".$account->iban." country_code=".$country_code, LOG_DEBUG);
if ($country_code == 'FR') // France rules
{

View File

@ -957,7 +957,17 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
if (! empty($conf->global->MAIN_MULTILANGS) && ($outputlangs->defaultlang != $langs->defaultlang))
{
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && $label == $prodser->label) $label=$prodser->multilangs[$outputlangs->defaultlang]["label"];
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && $desc == $prodser->description) $desc=$prodser->multilangs[$outputlangs->defaultlang]["description"];
//Manage HTML entities description test
//Cause $prodser->description is store with htmlentities but $desc no
$needdesctranslation=false;
if (!empty($desc) && dol_textishtml($desc) && !empty($prodser->description) && dol_textishtml($prodser->description)) {
$needdesctranslation=(strpos(dol_html_entity_decode($desc,ENT_QUOTES | ENT_HTML401),dol_html_entity_decode($prodser->description,ENT_QUOTES | ENT_HTML401))!==false);
} else {
$needdesctranslation=($desc == $prodser->description);
}
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && ($needdesctranslation)) $desc=$prodser->multilangs[$outputlangs->defaultlang]["description"];
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && $note == $prodser->note) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"];
}
}

View File

@ -288,7 +288,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
$var=!$var;
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">';
print '<table class="nobordernopadding" width="100%">';
print '<table class="nobordernopadding" width="100%"><tr><td><div align="center">';
$i=0;
foreach($dirthemes as $dir)
@ -310,22 +310,15 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
// Disable not stable themes
//if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/bureau2crea/i',$subdir)) continue;
if ($i % $thumbsbyrow == 0)
{
print '<tr '.$bc[$var].'>';
}
print '<td align="center">';
print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
$file=$dirtheme."/".$subdir."/thumb.png";
$url=$urltheme."/".$subdir."/thumb.png";
if (! file_exists($file)) $url=$urltheme."/common/nophoto.jpg";
print '<table><tr><td>';
print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.(GETPOST("optioncss")?'&optioncss='.GETPOST("optioncss",'alpha',1):'').($fuser?'&id='.$fuser->id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
else $title=$langs->trans("ShowPreview");
print '<img src="'.$url.'" border="0" width="80" height="60" alt="'.$title.'" title="'.$title.'">';
print '</a>';
print '</td></tr><tr><td align="center">';
print '<img src="'.$url.'" border="0" width="80" height="60" alt="'.$title.'" title="'.$title.'" style="margin-bottom: 5px;">';
print '</a><br>';
if ($subdir == $selected_theme)
{
print '<input '.($edit?'':'disabled').' type="radio" '.$bc[$var].' style="border: 0px;" checked name="main_theme" value="'.$subdir.'"> <b>'.$subdir.'</b>';
@ -334,27 +327,16 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
{
print '<input '.($edit?'':'disabled').' type="radio" '.$bc[$var].' style="border: 0px;" name="main_theme" value="'.$subdir.'"> '.$subdir;
}
print '</td></tr></table></td>';
print '</div>';
$i++;
if ($i % $thumbsbyrow == 0) print '</tr>';
}
}
}
}
}
if ($i % $thumbsbyrow != 0)
{
while ($i % $thumbsbyrow != 0)
{
print '<td>&nbsp;</td>';
$i++;
}
print '</tr>';
}
print '</table>';
print '</div></td></tr></table>';
print '</td></tr>';
print '</table>';

View File

@ -627,7 +627,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/contact/fiche.php?leftmenu=contacts&amp;action=create", (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->rights->societe->contact->creer);
$newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire);
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire);
$newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
if (! empty($conf->fournisseur->enabled)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
$newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
//$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->rights->societe->contact->lire);
@ -636,11 +636,14 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if (! empty($conf->categorie->enabled))
{
$langs->load("categories");
// Categories prospects/customers
$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=2", $langs->trans("CustomersProspectsCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
if (empty($user->societe_id))
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
{
$newmenu->add("/categories/fiche.php?action=create&amp;type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
// Categories prospects/customers
$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=2", $langs->trans("CustomersProspectsCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
if (empty($user->societe_id))
{
$newmenu->add("/categories/fiche.php?action=create&amp;type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
}
}
// Categories Contact
$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');

View File

@ -178,10 +178,10 @@ class modFacture extends DolibarrModules
$this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancyBuyCode');
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancyBuyCode');
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product');
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$this->export_sql_start[$r]='SELECT DISTINCT ';

View File

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* This template needs:
* $object
*/
@ -47,77 +47,77 @@ $userstatic=new User($db);
<div class="tagtable centpercent noborder allwidth">
<?php if ($permission) { ?>
<form class="liste_titre">
<div><?php echo $langs->trans("Source"); ?></div>
<div><?php echo $langs->trans("Company"); ?></div>
<div><?php echo $langs->trans("Contacts"); ?></div>
<div><?php echo $langs->trans("ContactType"); ?></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<form class="tagtr liste_titre">
<div class="tagtd"><?php echo $langs->trans("Source"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Company"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Contacts"); ?></div>
<div class="tagtd"><?php echo $langs->trans("ContactType"); ?></div>
<div class="tagtd">&nbsp;</div>
<div class="tagtd">&nbsp;</div>
</form>
<?php $var=false; ?>
<form <?php echo $bc[$var]; ?> action="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id; ?>" method="POST">
<form class="tagtr impair" action="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id; ?>" method="POST">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<input type="hidden" name="id" value="<?php echo $object->id; ?>" />
<input type="hidden" name="action" value="addcontact" />
<input type="hidden" name="source" value="internal" />
<div class="nowrap"><?php echo img_object('','user').' '.$langs->trans("Users"); ?></div>
<div><?php echo $conf->global->MAIN_INFO_SOCIETE_NOM; ?></div>
<div><?php echo $form->select_dolusers($user->id, 'userid', 0, (! empty($userAlreadySelected)?$userAlreadySelected:null), 0, null, null, 0, 56); ?></div>
<div><?php echo $formcompany->selectTypeContact($object, '', 'type','internal'); ?></div>
<div>&nbsp;</div>
<div align="right"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></div>
<div class="nowrap tagtd"><?php echo img_object('','user').' '.$langs->trans("Users"); ?></div>
<div class="tagtd"><?php echo $conf->global->MAIN_INFO_SOCIETE_NOM; ?></div>
<div class="tagtd maxwidthonsmartphone"><?php echo $form->select_dolusers($user->id, 'userid', 0, (! empty($userAlreadySelected)?$userAlreadySelected:null), 0, null, null, 0, 56); ?></div>
<div class="tagtd maxwidthonsmartphone"><?php echo $formcompany->selectTypeContact($object, '', 'type','internal'); ?></div>
<div class="tagtd">&nbsp;</div>
<div class="tagtd" align="right"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></div>
</form>
<?php $var=!$var; ?>
<form <?php echo $bc[$var]; ?> action="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id; ?>" method="POST">
<form class="tagtr pair" action="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id; ?>" method="POST">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
<input type="hidden" name="id" value="<?php echo $object->id; ?>" />
<input type="hidden" name="action" value="addcontact" />
<input type="hidden" name="source" value="external" />
<div class="nowrap"><?php echo img_object('','contact').' '.$langs->trans("ThirdPartyContacts"); ?></div>
<div class="tagtd nowrap"><?php echo img_object('','contact').' '.$langs->trans("ThirdPartyContacts"); ?></div>
<?php if ($conf->use_javascript_ajax && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) { ?>
<div class="nowrap">
<div class="tagtd nowrap maxwidthonsmartphone">
<?php
$events=array();
$events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
print $form->select_company($object->socid,'socid','',1,0,0,$events);
?>
</div>
<div>
<div class="tagtd maxwidthonsmartphone">
<?php $nbofcontacts=$form->select_contacts($object->socid, '', 'contactid'); ?>
</div>
<?php } else { ?>
<div>
<div class="tagtd maxwidthonsmartphone">
<?php $selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$object->socid; ?>
<?php $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany'); ?>
</div>
<div>
<div class="tagtd maxwidthonsmartphone">
<?php $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid'); ?>
</div>
<?php } ?>
<div>
<div class="tagtd maxwidthonsmartphone">
<?php $formcompany->selectTypeContact($object, '', 'type','external'); ?>
</div>
<div>&nbsp;</div>
<div align="right">
<div class="tagtd">&nbsp;</div>
<div class="tagtd" align="right">
<input type="submit" id="add-customer-contact" class="button" value="<?php echo $langs->trans("Add"); ?>"<?php if (! $nbofcontacts) echo ' disabled="disabled"'; ?>>
</div>
</form>
<?php } ?>
<form class="liste_titre">
<div><?php echo $langs->trans("Source"); ?></div>
<div><?php echo $langs->trans("Company"); ?></div>
<div><?php echo $langs->trans("Contacts"); ?></div>
<div><?php echo $langs->trans("ContactType"); ?></div>
<div align="center"><?php echo $langs->trans("Status"); ?></div>
<div>&nbsp;</div>
<form class="tagtr liste_titre">
<div class="tagtd"><?php echo $langs->trans("Source"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Company"); ?></div>
<div class="tagtd"><?php echo $langs->trans("Contacts"); ?></div>
<div class="tagtd"><?php echo $langs->trans("ContactType"); ?></div>
<div class="tagtd" align="center"><?php echo $langs->trans("Status"); ?></div>
<div class="tagtd">&nbsp;</div>
</form>
<?php $var=true; ?>
@ -132,12 +132,12 @@ $userstatic=new User($db);
$var = !$var;
?>
<form <?php echo $bc[$var]; ?>>
<div align="left">
<form class="tagtr <?php echo $var?"pair":"impair"; ?>">
<div class="tagtd" align="left">
<?php if ($tab[$i]['source']=='internal') echo $langs->trans("User"); ?>
<?php if ($tab[$i]['source']=='external') echo $langs->trans("ThirdPartyContact"); ?>
</div>
<div align="left">
<div class="tagtd" align="left">
<?php
if ($tab[$i]['socid'] > 0)
{
@ -154,7 +154,7 @@ $userstatic=new User($db);
}
?>
</div>
<div>
<div class="tagtd">
<?php
if ($tab[$i]['source']=='internal')
{
@ -172,13 +172,28 @@ $userstatic=new User($db);
}
?>
</div>
<div><?php echo $tab[$i]['libelle']; ?></div>
<div align="center">
<div class="tagtd"><?php echo $tab[$i]['libelle']; ?></div>
<div class="tagtd" align="center">
<?php if ($object->statut >= 0) echo '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=swapstatut&amp;ligne='.$tab[$i]['rowid'].'">'; ?>
<?php echo $contactstatic->LibStatut($tab[$i]['status'],3); ?>
<?php
if ($tab[$i]['source']=='internal')
{
$userstatic->id=$tab[$i]['id'];
$userstatic->lastname=$tab[$i]['lastname'];
$userstatic->firstname=$tab[$i]['firstname'];
//echo $userstatic->LibStatut($tab[$i]['status'],3);
}
if ($tab[$i]['source']=='external')
{
$contactstatic->id=$tab[$i]['id'];
$contactstatic->lastname=$tab[$i]['lastname'];
$contactstatic->firstname=$tab[$i]['firstname'];
echo $contactstatic->LibStatut($tab[$i]['status'],3);
}
?>
<?php if ($object->statut >= 0) echo '</a>'; ?>
</div>
<div align="center" class="nowrap">
<div class="tagtd nowrap" align="center">
<?php if ($permission) { ?>
&nbsp;<a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=deletecontact&amp;lineid='.$tab[$i]['rowid']; ?>"><?php echo img_delete(); ?></a>
<?php } ?>

View File

@ -51,7 +51,9 @@ if (isset($action) && ! empty($action))
require DOL_DOCUMENT_ROOT . '/ecm/class/ecmdirectory.class.php';
$ecmdirstatic = new EcmDirectory($db);
$ecmdirtmp = new EcmDirectory($db);
// This part of code is same than into file index.php for action refreshmanual TODO Remove duplicate
clearstatcache();
$diroutputslash=str_replace('\\', '/', $conf->$element->dir_output);
@ -129,7 +131,6 @@ if (isset($action) && ! empty($action))
if ($fk_parent >= 0)
{
$ecmdirtmp=new EcmDirectory($db);
$ecmdirtmp->ref = 'NOTUSEDYET';
$ecmdirtmp->label = dol_basename($dirdesc['fullname']);
$ecmdirtmp->description = '';
@ -163,7 +164,21 @@ if (isset($action) && ! empty($action))
}
}
// Loop now on each sql tree to check if dir exists
foreach($sqltree as $dirdesc) // Loop on each sqltree to check dir is on disk
{
$dirtotest=$conf->$element->dir_output.'/'.$dirdesc['fullrelativename'];
if (! dol_is_dir($dirtotest))
{
$mesg.=$dirtotest." not found onto disk. We delete from database dir with id=".$dirdesc['id']."<br>\n";
$ecmdirtmp->id=$dirdesc['id'];
$ecmdirtmp->delete($user,'databaseonly');
//exit;
}
}
$sql="UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cahce counting, we set to value -1 = "unknown"
dol_syslog("sql = ".$sql);
$db->query($sql);
}
}

View File

@ -151,7 +151,7 @@ class EcmDirectory // extends CommonObject
$dir=$conf->ecm->dir_output.'/'.$this->getRelativePath();
$result=dol_mkdir($dir);
if ($result < 0) { $error++; $this->error="ErrorFailedToCreateDir"; }
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db);
@ -325,21 +325,23 @@ class EcmDirectory // extends CommonObject
/**
* Delete object on database and on disk
* Delete object on database and/or on disk
*
* @param User $user User that delete
* @param int $mode 'all'=delete all, 'databaseonly'=only database entry, 'fileonly' (not implemented)
* @return int <0 if KO, >0 if OK
*/
function delete($user)
function delete($user, $mode='all')
{
global $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$error=0;
$result=0;
$relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3
if ($mode != 'databaseonly') $relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3
dol_syslog(get_class($this)."::delete remove directory ".$relativepath);
dol_syslog(get_class($this)."::delete remove directory id=".$this->id." mode=".$mode.(($mode == 'databaseonly')?'':' relativepath='.$relativepath));
$this->db->begin();
@ -356,8 +358,11 @@ class EcmDirectory // extends CommonObject
return -2;
}
$file = $conf->ecm->dir_output . "/" . $relativepath;
$result=@dol_delete_dir($file);
if ($mode != 'databaseonly')
{
$file = $conf->ecm->dir_output . "/" . $relativepath;
$result=@dol_delete_dir($file);
}
if ($result || ! @is_dir(dol_osencode($file)))
{

View File

@ -206,7 +206,10 @@ if ($action == 'confirm_deletesection' && GETPOST('confirm') == 'yes')
// Refresh directory view
if ($action == 'refreshmanual')
{
clearstatcache();
$ecmdirtmp = new EcmDirectory($db);
// This part of code is same than into file ecm/ajax/ecmdatabase.php TODO Remove duplicate
clearstatcache();
$diroutputslash=str_replace('\\','/',$conf->ecm->dir_output);
$diroutputslash.='/';
@ -269,7 +272,7 @@ if ($action == 'refreshmanual')
//break; // We found parent, we can stop the while loop
}
else
{
{
dol_syslog("No");
//print "No<br>\n";
}
@ -282,7 +285,6 @@ if ($action == 'refreshmanual')
if ($fk_parent >= 0)
{
$ecmdirtmp=new EcmDirectory($db);
$ecmdirtmp->ref = 'NOTUSEDYET';
$ecmdirtmp->label = dol_basename($dirdesc['fullname']);
$ecmdirtmp->description = '';
@ -316,6 +318,19 @@ if ($action == 'refreshmanual')
}
}
// Loop now on each sql tree to check if dir exists
foreach($sqltree as $dirdesc) // Loop on each sqltree to check dir is on disk
{
$dirtotest=$conf->ecm->dir_output.'/'.$dirdesc['fullrelativename'];
if (! dol_is_dir($dirtotest))
{
$mesg.=$dirtotest." not found onto disk. We delete from database dir with id=".$dirdesc['id']."<br>\n";
$ecmdirtmp->id=$dirdesc['id'];
$ecmdirtmp->delete($user,'databaseonly');
//exit;
}
}
$sql="UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cahce counting, we set to value -1 = "unknown"
dol_syslog("sql = ".$sql);
$db->query($sql);

View File

@ -50,7 +50,15 @@ $(document).ready(function() {
);
$('#refreshbutton').click( function() {
ecmBuildDatabase();
$.pleaseBePatient("<?php echo $langs->trans('PleaseBePatient'); ?>");
$.getJSON( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
action: "build",
element: "ecm"
},
function(response) {
$.unblockUI();
location.href="<?php echo $_SERVER['PHP_SELF']; ?>";
});
});
});
@ -78,17 +86,5 @@ function loadandshowpreview(filedirname,section)
});
}
ecmBuildDatabase = function() {
$.pleaseBePatient("<?php echo $langs->trans('PleaseBePatient'); ?>");
$.getJSON( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
action: "build",
element: "ecm"
},
function(response) {
$.unblockUI();
location.href="<?php echo $_SERVER['PHP_SELF']; ?>";
});
};
</script>
<!-- END PHP TEMPLATE ecm/tpl/builddatabase.tpl.php -->
<!-- END PHP TEMPLATE ecm/tpl/builddatabase.tpl.php -->

View File

@ -109,16 +109,17 @@ if ($sttc)
}
if ($sall)
{
$sql .= natural_search(array('cf.ref', 'cf.note_public'), $sall);
$sql .= natural_search(array('cf.ref', 'cf.note_public', 'cf.note_private'), $sall);
}
if ($socid) $sql.= " AND s.rowid = ".$socid;
if (GETPOST('statut'))
{
$sql .= " AND fk_statut =".GETPOST('statut');
$sql .= " AND fk_statut =".GETPOST('statut','int');
}
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
$sql.= " ORDER BY $sortfield $sortorder ";
$sql.= $db->plimit($conf->liste_limit+1, $offset);
$resql = $db->query($sql);
if ($resql)

View File

@ -812,7 +812,7 @@ function write_conf_file($conffile)
fputs($fp, '$dolibarr_main_document_root=\''.str_replace("'","\'",($main_dir)).'\';');
fputs($fp,"\n");
fputs($fp, $main_use_alt_dir.'$dolibarr_main_url_root_alt=\''.str_replace("'","\'",($main_url."/".$main_alt_dir_name)).'\';');
fputs($fp, $main_use_alt_dir.'$dolibarr_main_url_root_alt=\''.str_replace("'","\'",("/".$main_alt_dir_name)).'\';');
fputs($fp,"\n");
fputs($fp, $main_use_alt_dir.'$dolibarr_main_document_root_alt=\''.str_replace("'","\'",($main_dir."/".$main_alt_dir_name)).'\';');

View File

@ -53,6 +53,7 @@ Language_sl_SI=Slovenian
Language_sv_SV=Swedish
Language_sv_SE=Swedish
Language_sk_SK=Slovakian
Language_uz_UZ=Uzbek
Language_vi_VN=Vietnamese
Language_zh_CN=Chinese
Language_zh_TW=Chinese (Traditional)

View File

@ -257,6 +257,8 @@ Seconds=Seconds
Today=Today
Yesterday=Yesterday
Tomorrow=Tomorrow
Morning=Morning
Afternoon=Afternoon
Quadri=Quadri
MonthOfDay=Month of the day
HourShort=H

View File

@ -109,4 +109,5 @@ NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (>
MassStockMovement=Mass stock movement
SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s".
RecordMovement=Record transfert
ReceivingForSameOrder=Receivings for this order
ReceivingForSameOrder=Receivings for this order
StockMovementRecorded=Stock movements recorded

View File

@ -53,6 +53,7 @@ Language_sl_SI=Slovène
Language_sv_SV=Suédois
Language_sv_SE=Suédois
Language_sk_SK=Slovaque
Language_uz_UZ=Ouzbek
Language_vi_VN=Vietnamien
Language_zh_CN=Chinois
Language_zh_TW=Chinois (Traditionel)

View File

@ -257,6 +257,8 @@ Seconds=Secondes
Today=Aujourd'hui
Yesterday=Hier
Tomorrow=Demain
Morning=Matin
Afternoon=Après-midi
Quadri=Trimestre
MonthOfDay=Mois du jour
HourShort=H

View File

@ -90,7 +90,7 @@ CalculatedVolume=Volume calculé
Weight=Poids
TotalWeight=Poids total
WeightUnitton=tonnes
WeightUnitkg=Kg
WeightUnitkg=kg
WeightUnitg=g
WeightUnitmg=mg
WeightUnitpound=livre

View File

@ -109,4 +109,5 @@ NbOfProductAfterPeriod=Quantité du produit <b>%s</b> en stock après la périod
MassStockMovement=Mouvement de stock en masse
SelectProductInAndOutWareHouse=Sélectionner un produit, une quantité à transférer, un entrepôt source et destination et cliquer sur "%s". Une fois tous les mouvements choisis, cliquer sur "%s".
RecordMovement=Enregistrer transferts
ReceivingForSameOrder=Réceptions pour cette commande
ReceivingForSameOrder=Réceptions pour cette commande
StockMovementRecorded=Mouvements de stock enregistrés

View File

@ -102,7 +102,7 @@ function test_sql_and_script_inject($val, $type)
}
// For XSS Injection done by adding javascript closing html tags like with onmousemove, etc... (closing a src or href tag with not cleaned param)
if ($type == 1) $sql_inj += preg_match('/"/i', $val); // We refused " in GET parameters value
if ($type == 2) $sql_inj += preg_match('/[;"]/', $val); // PHP_SELF is a file system path. It can contains spaces.
if ($type == 2) $sql_inj += preg_match('/[;"]/', $val); // PHP_SELF is a file system path. It can contains spaces.
return $sql_inj;
}
@ -1173,7 +1173,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
// We must force not using ajax because cache of jquery does not load js of other pages.
// This also increase seriously speed onto mobile device where complex js code is very slow and memory very low.
if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 2)
if (empty($conf->dol_use_jmobile) || ($conf->dol_use_jmobile != 2 && $conf->dol_use_jmobile != 3))
{
print '<script type="text/javascript">
$(document).bind("mobileinit", function(){
@ -1188,7 +1188,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
});
</script>';
}
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 3) print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
}
}
@ -1614,11 +1614,11 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
//Dolibarr version
$doliurl='http://www.dolibarr.org';
//local communities
if (preg_match('/fr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.fr';
if (preg_match('/es/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.es';
$appli='Dolibarr';
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) {
$appli=$conf->global->MAIN_APPLICATION_TITLE; $doliurl='';

View File

@ -78,9 +78,14 @@ if (! empty($dolibarr_main_document_root_alt))
{
if (preg_match('/^http(s)?:/',$value))
{
print 'Error: values for <b>$dolibarr_main_url_root_alt</b> into <b>conf.php</b> file must contains relative path added to $dolibarr_main_url_root to get alternative URLs.<br>'."\n";
print "Found: \"".$value."\"<br>\n";
print "Should found something like following examples:<br>\n";
// TODO: Make this a warning rather than an error since the correct value can be derived in most cases
$correct_value = str_replace($dolibarr_main_url_root, '', $value);
print '<b>Error:</b><br>'."\n";
print 'Wrong <b>$dolibarr_main_url_root_alt</b> value in <b>conf.php</b> file.<br>'."\n";
print 'We now use a relative path to $dolibarr_main_url_root to build alternate URLs.<br>'."\n";
print 'Value found: '.$value.'<br>'."\n";
print 'Should be replaced by: '.$correct_value.'<br>'."\n";
print "Or something like following examples:<br>\n";
print "\"/extensions\"<br>\n";
print "\"/extensions1,/extensions2,...\"<br>\n";
print "\"/../extensions\"<br>\n";

View File

@ -309,10 +309,10 @@ function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
}
}
}
// For multicompany
$out.="&entity=".$conf->entity;
//$out.="&entity=".$conf->entity; // This should not be into link. Link contains already a ref of an object that allow to retreive entity
return $out;
}
@ -691,7 +691,7 @@ function hash_call($methodName,$nvpStr)
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, empty($conf->global->MAIN_USE_CONNECT_TIMEOUT)?5:$conf->global->MAIN_USE_CONNECT_TIMEOUT);
curl_setopt($ch, CURLOPT_TIMEOUT, empty($conf->global->MAIN_USE_RESPONSE_TIMEOUT)?30:$conf->global->MAIN_USE_RESPONSE_TIMEOUT);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -28,6 +29,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
$langs->load("admin");
$langs->load("products");
@ -41,6 +43,7 @@ $newvatrate=GETPOST('newvatrate');
//$price_base_type=GETPOST('price_base_type');
$objectstatic = new Product($db);
$objectstatic2 = new ProductFournisseur($db);
/*
@ -60,104 +63,176 @@ if ($action == 'convert')
if (! $error)
{
$country_id=$mysoc->country_id; // TODO Allow to choose country into form
$nbrecordsmodified=0;
$db->begin();
$sql = 'SELECT rowid';
$sql.= ' FROM '.MAIN_DB_PREFIX.'product';
$sql.= ' WHERE entity IN ('.getEntity('product',1).')';
$sql.= " AND tva_tx = '".$db->escape($oldvatrate)."'";
//$sql.= ' AND price_base_type = "'..'"';
//print $sql;
// If country to edit is my country, so we change customer prices
if ($country_id == $mysoc->country_id)
{
$sql = 'SELECT rowid';
$sql.= ' FROM '.MAIN_DB_PREFIX.'product';
$sql.= ' WHERE entity IN ('.getEntity('product',1).')';
$sql.= " AND tva_tx = '".$db->escape($oldvatrate)."'";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$ret=$objectstatic->fetch($obj->rowid);
if ($ret > 0)
{
$ret=0; $retm=0; $updatelevel1=false;
// Update multiprice
$listofmulti=array_reverse($objectstatic->multiprices, true); // To finish with level 1
foreach ($listofmulti as $level => $multiprices)
{
$price_base_type = $objectstatic->multiprices_base_type[$level]; // Get price_base_type of product/service to keep the same for update
if (empty($price_base_type)) continue; // Discard not defined price levels
if ($price_base_type == 'TTC')
{
$newprice=price2num($objectstatic->multiprices_ttc[$level],'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
$newminprice=$objectstatic->multiprices_min_ttc[$level];
}
else
{
$newprice=price2num($objectstatic->multiprices[$level],'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
$newminprice=$objectstatic->multiprices_min[$level];
}
if ($newminprice > $newprice) $newminprice=$newprice;
$newvat=str_replace('*','',$newvatrate);
$newnpr=$objectstatic->multiprices_recuperableonly[$level];
$newlevel=$level;
//print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n";
$retm=$objectstatic->updatePrice($newprice, $price_base_type, $user, $newvat, $newminprice, $newlevel, $newnpr);
if ($retm < 0)
{
$error++;
break;
}
if ($newlevel == 1) $updatelevel1=true;
}
// Update single price
$price_base_type = $objectstatic->price_base_type; // Get price_base_type of product/service to keep the same for update
if ($price_base_type == 'TTC')
{
$newprice=price2num($objectstatic->price_ttc,'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
$newminprice=$objectstatic->price_min_ttc;
}
else
{
$newprice=price2num($objectstatic->price,'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
$newminprice=$objectstatic->price_min;
}
if ($newminprice > $newprice) $newminprice=$newprice;
$newvat=str_replace('*','',$newvatrate);
$newnpr=$objectstatic->recuperableonly;
$newlevel=0;
if (! empty($price_base_type) && ! $updatelevel1)
{
//print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n";
$ret=$objectstatic->updatePrice($newprice, $price_base_type, $user, $newvat, $newminprice, $newlevel, $newnpr);
}
if ($ret < 0 || $retm < 0) $error++;
else $nbrecordsmodified++;
}
$i++;
}
}
else dol_print_error($db);
}
$fourn = new Fournisseur($db);
// Change supplier prices
$sql = 'SELECT pfp.rowid, pfp.fk_soc, pfp.price as price, pfp.quantity as qty, pfp.fk_availability, pfp.ref_fourn';
$sql.= ' FROM '.MAIN_DB_PREFIX.'product_fournisseur_price as pfp, '.MAIN_DB_PREFIX.'societe as s';
$sql.= ' WHERE pfp.fk_soc = s.rowid AND pfp.entity IN ('.getEntity('product',1).')';
$sql.= " AND tva_tx = '".$db->escape($oldvatrate)."'";
$sql.= " AND s.fk_pays = '".$country_id."'";
//print $sql;
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0; $nbrecordsmodified=0;
$i = 0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$ret=$objectstatic->fetch($obj->rowid);
$ret=$objectstatic2->fetch_product_fournisseur_price($obj->rowid);
if ($ret > 0)
{
$ret=0; $retm=0; $updatelevel1=false;
// Update multiprice
$listofmulti=array_reverse($objectstatic->multiprices, true); // To finish with level 1
foreach ($listofmulti as $level => $multiprices)
{
$price_base_type = $objectstatic->multiprices_base_type[$level]; // Get price_base_type of product/service to keep the same for update
if (empty($price_base_type)) continue; // Discard not defined price levels
if ($price_base_type == 'TTC')
{
$newprice=price2num($objectstatic->multiprices_ttc[$level],'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
$newminprice=$objectstatic->multiprices_min_ttc[$level];
}
else
{
$newprice=price2num($objectstatic->multiprices[$level],'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
$newminprice=$objectstatic->multiprices_min[$level];
}
if ($newminprice > $newprice) $newminprice=$newprice;
$newvat=str_replace('*','',$newvatrate);
$newnpr=$objectstatic->multiprices_recuperableonly[$level];
$newlevel=$level;
//print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n";
$retm=$objectstatic->updatePrice($newprice, $price_base_type, $user, $newvat, $newminprice, $newlevel, $newnpr);
if ($retm < 0)
{
$error++;
break;
}
if ($newlevel == 1) $updatelevel1=true;
}
// Update single price
$price_base_type = $objectstatic->price_base_type; // Get price_base_type of product/service to keep the same for update
if ($price_base_type == 'TTC')
{
$newprice=price2num($objectstatic->price_ttc,'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
$newminprice=$objectstatic->price_min_ttc;
}
else
{
$newprice=price2num($objectstatic->price,'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
$newminprice=$objectstatic->price_min;
}
if ($newminprice > $newprice) $newminprice=$newprice;
$price_base_type='HT';
//$price_base_type = $objectstatic2->price_base_type; // Get price_base_type of product/service to keep the same for update
//if ($price_base_type == 'TTC')
//{
// $newprice=price2num($objectstatic2->price_ttc,'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
// $newminprice=$objectstatic2->price_min_ttc;
//}
//else
//{
$newprice=price2num($obj->price,'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals)
//$newminprice=$objectstatic2->fourn_price_min;
//}
//if ($newminprice > $newprice) $newminprice=$newprice;
$newvat=str_replace('*','',$newvatrate);
$newnpr=$objectstatic->recuperableonly;
//$newnpr=$objectstatic2->recuperableonly;
$newlevel=0;
if (! empty($price_base_type) && ! $updatelevel1)
{
//print "$objectstatic->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n";
$ret=$objectstatic->updatePrice($newprice, $price_base_type, $user, $newvat, $newminprice, $newlevel, $newnpr);
//print "$objectstatic2->id $newprice, $price_base_type, $newvat, $newminprice, $newlevel, $newnpr<br>\n";
$fourn->id=$obj->fk_soc;
$ret=$objectstatic2->update_buyprice($obj->qty, $newprice, $user, $price_base_type, $fourn, $obj->fk_availability, $obj->ref_fourn, $newvat);
}
if ($ret < 0 || $retm < 0) $error++;
else $nbrecordsmodified++;
}
$i++;
}
if (! $error)
{
if ($nbrecordsmodified > 0) setEventMessage($langs->trans("RecordsModified",$nbrecordsmodified));
else setEventMessage($langs->trans("NoRecordFound"),'warnings');
$db->commit();
}
else
{
setEventMessage($langs->trans("Error"),'errors');
$db->rollback();
}
}
else dol_print_error($db);
if (! $error)
{
$db->commit();
}
else
{
$db->rollback();
}
// Output result
if (! $error)
{
if ($nbrecordsmodified > 0) setEventMessage($langs->trans("RecordsModified",$nbrecordsmodified));
else setEventMessage($langs->trans("NoRecordFound"),'warnings');
}
else
{
setEventMessage($langs->trans("Error"),'errors');
}
}
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
@ -99,6 +99,11 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel"))
$tva_tx = str_replace('*','', GETPOST('tva_tx','alpha'));
$tva_tx = price2num($tva_tx);
if ($tva_tx == '')
{
$error++;
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")).'</div>';
}
if (empty($quantity))
{
$error++;
@ -353,6 +358,7 @@ if ($id || $ref)
if (! empty($socid)) // When update
{
$default_vat=get_default_tva($supplier, $mysoc, $product->id);
if (empty($default_vat)) $default_vat=$product->tva_tx;
}
print '<input type="text" class="flat" size="5" name="tva_tx" value="'.(GETPOST("tva_tx")?vatrate(GETPOST("tva_tx")):($default_vat!=''?vatrate($default_vat):'')).'">';
print '</td></tr>';

View File

@ -247,7 +247,7 @@ if ($action == 'add')
$adh->morphy = $_POST["morphy"];
$adh->birth = $birthday;
// Fill array 'array_options' with data from add form
$extralabels=$extrafields->fetch_name_optionals_label($adh->table_element);
$ret = $extrafields->setOptionalsFromPost($extralabels,$adh);
@ -521,7 +521,7 @@ print '</tr>'."\n";
// Add specific fields used by Dolibarr foundation for example
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+');
$arraybudget=array('50'=>'<= 100 000','100'=>'<= 200 000','200'=>'<= 500 000','300'=>'<= 1 500 000','600'=>'<= 3 000 000','1000'=>'<= 5 000 000','2000'=>'5 000 000+');
print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>';
print $form->selectarray('budget', $arraybudget, GETPOST('budget'), 1);
print ' € or $';

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -70,10 +70,10 @@ if (! empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL))
$from=$conf->global->MAILING_EMAIL_FROM;
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile(
'['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->trans("NewPayboxPaymentFailed"),
'['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPayboxPaymentFailed"),
$sendto,
$from,
$langs->trans("NewPayboxPaymentFailed")."\n".$fulltag
$langs->transnoentitiesnoconv("NewPayboxPaymentFailed")."\n".$fulltag
);
$result=$mailfile->sendfile();

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -100,10 +100,10 @@ if (! empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL))
$from=$conf->global->MAILING_EMAIL_FROM;
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile(
'['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->trans("NewPayboxPaymentReceived"),
'['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPayboxPaymentReceived"),
$sendto,
$from,
$langs->trans("NewPayboxPaymentReceived")."\n".$fulltag
$langs->transnoentitiesnoconv("NewPayboxPaymentReceived")."\n".$fulltag
);
$result=$mailfile->sendfile();

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -29,12 +29,10 @@
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
// For MultiCompany module
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_int($entity))
{
define("DOLENTITY", $entity);
}
// For MultiCompany module. This should be useless. Because entity must be retreive from object ref and not from url.
$entity=GETPOST('entity')?GETPOST('entity','int'):1;
if (is_int($entity)) define("DOLENTITY", $entity);
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
@ -78,10 +76,10 @@ if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL))
$from=$conf->global->MAILING_EMAIL_FROM;
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile(
'['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->trans("NewPaypalPaymentFailed"),
'['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPaypalPaymentFailed"),
$sendto,
$from,
$langs->trans("NewPaypalPaymentFailed")."\ntag=".$fulltag."\ntoken=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt
$langs->transnoentitiesnoconv("NewPaypalPaymentFailed")."\ntag=".$fulltag."\ntoken=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt
);
$result=$mailfile->sendfile();

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -29,12 +29,10 @@
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
// For MultiCompany module
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_int($entity))
{
define("DOLENTITY", $entity);
}
// For MultiCompany module. This should be useless. Because entity must be retreive from object ref and not from url.
$entity=GETPOST('entity')?GETPOST('entity','int'):1;
if (is_int($entity)) define("DOLENTITY", $entity);
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
@ -139,10 +137,10 @@ if ($PAYPALTOKEN)
$from=$conf->global->MAILING_EMAIL_FROM;
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile(
'['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->trans("NewPaypalPaymentReceived"),
'['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPaypalPaymentReceived"),
$sendto,
$from,
$langs->trans("NewPaypalPaymentReceived")."\ntag=".$fulltag."\ntoken=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt
$langs->transnoentitiesnoconv("NewPaypalPaymentReceived")."\ntag=".$fulltag."\ntoken=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt
);
$result=$mailfile->sendfile();

View File

@ -44,48 +44,68 @@ This page is a sample of page using tables. To make test with<br>
<br>
Example 0 : Table with div and table with table containg a select that should be overflowed and truncated<br>
<div style="display: table;"><div style="display: table-row"><div style="display: table-cell; overflow: hidden; white-space: nowrap; max-width: 100px;"> <!-- If you remove max-width, the jmobile overflow does not work -->
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
</div></div></div>
<br>
<table width="100%">
<tr><td style="max-width:100px; overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
Example 0a : Table with div+div+div containg a select that should be overflowed and truncated<br>
<div class="tagtable centpercent">
<div class="tagtr">
<div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 100px;"> <!-- If you remove max-width, the jmobile overflow does not work -->
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
</td></tr>
</div>
<div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 100px;"> <!-- If you remove max-width, the jmobile overflow does not work -->
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
</div>
</div>
</div>
Example 0b: Table with div+form+div containg a select that should be overflowed and truncated<br>
<div class="tagtable centpercent">
<form action="xxx" method="POST" class="tagtr">
<div class="tagtd" style="max-width:100px; overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
</div>
<div class="tagtd" style="max-width:100px; overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
</div>
</form>
</div>
Example 0c: Table with table+tr+td containg a select that should be overflowed and truncated<br>
<table class="centpercent">
<tr>
<td class="tagtd" style="max-width:100px; overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
</td>
<td class="tagtd" style="max-width:100px; overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
<select name="hidedetails"><option>aaaaaaaaaaaaaaafd sf sf gfd gfds fsd gfd fhfg hf dhfg hg fhfgdhfgdh gh gfdhdgf h gfdh dfhg dfgh dfgh fdgh gfd hfd hfd gs fgdf gaaaa</option><option>gdfs gdf g sdfg dfg fdsg dsfg dfs gdfs gds fgs gdfdf gd</option></select>
</td>
</tr>
</table>
<br>
Example 1 : Table using tags: div.tagtable+form+div or div.tagtable+div.tagtr+div.tagtd<br>
Example 1 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tagtr+div.tagtd<br>
<?php
$tasksarray=array(1,2,3); // To force having several lines
$tagidfortablednd='tablelines';
if (! empty($conf->use_javascript_ajax) && $object->statut == 0) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
?>
<div class="tagtable centpercent" id="tablelines">
<div class="liste_titre">
<div>line3<input type="hidden" name="cartitem" value="3"></div>
<div>dfsdf</div>
<div>ffdsfsd</div>
<div class="tdlineupdown">aaaa</div>
<div class="tagtr liste_titre">
<div class="tagtd">line3<input type="hidden" name="cartitem" value="3"></div>
<div class="tagtd">dfsdf</div>
<div class="tagtd">ffdsfsd</div>
<div class="tagtd tdlineupdown">aaaa</div>
</div>
<div class="impair tagtr">
<div>line4<input type="hidden" name="cartitem" value="3"></div>
<div>dfsdf</div>
<div><input name="count" value="4"></div>
<div class="tdlineupdown">bbbb</div>
<div class="tagtd">line4<input type="hidden" name="cartitem" value="3"></div>
<div class="tagtd">dfsdf</div>
<div class="tagtd"><input name="count" value="4"></div>
<div class="tagtd tdlineupdown">bbbb</div>
</div>
<div class="pair tagtr">
<div>line5<input type="hidden" name="cartitemb" value="3"></div>
<div>dfsdf</div>
<div><input name="countb" value="4"></div>
<div class="tdlineupdown">bbbb</div>
<div class="tagtd">line5<input type="hidden" name="cartitemb" value="3"></div>
<div class="tagtd">dfsdf</div>
<div class="tagtd"><input name="countb" value="4"></div>
<div class="tagtd tdlineupdown">bbbb</div>
</div>
<!-- Using form into div make Firefox crazy (page loading does not end) -->
<!-- <form class="liste_titre" method="POST" action="1.php">

View File

@ -241,23 +241,72 @@ class CompanyBankAccount extends Account
/**
* Return RIB
*
* @param boolean $displayriblabel Show or Hide Label
* @param boolean $displayriblabel Prepend or Hide Label
* @return string RIB
*/
function getRibLabel($displayriblabel = true)
{
global $langs;
global $langs,$conf;
if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib)
{
if ($this->label && $displayriblabel)
$rib = $this->label." : ";
$rib.= $this->code_banque." ".$this->code_guichet." ".$this->number;
$rib.=($this->cle_rib?" (".$this->cle_rib.")":"");
if ($this->label && $displayriblabel) $rib = $this->label." : ";
// Show fields of bank account
$fieldlists='BankCode DeskCode AccountNumber BankAccountNumberKey';
if (! empty($conf->global->BANK_SHOW_ORDER_OPTION))
{
if (is_numeric($conf->global->BANK_SHOW_ORDER_OPTION))
{
if ($conf->global->BANK_SHOW_ORDER_OPTION == '1') $fieldlists='BankCode DeskCode BankAccountNumberKey AccountNumber';
}
else $fieldlists=$conf->global->BANK_SHOW_ORDER_OPTION;
}
$fieldlistsarray=explode(' ',$fieldlists);
foreach($fieldlistsarray as $val)
{
if ($val == 'BankCode')
{
if ($this->useDetailedBBAN() == 1)
{
$rib.=$this->code_banque.'&nbsp;';
}
}
if ($val == 'DeskCode')
{
if ($this->useDetailedBBAN() == 1)
{
$rib.=$this->code_guichet.'&nbsp;';
}
}
if ($val == 'BankCode')
{
if ($this->useDetailedBBAN() == 2)
{
$rib.=$this->code_banque.'&nbsp;';
}
}
if ($val == 'AccountNumber')
{
$rib.=$this->number.'&nbsp;';
}
if ($val == 'BankAccountNumberKey')
{
if ($this->useDetailedBBAN() == 1)
{
$rib.=$this->cle_rib.'&nbsp;';
}
}
}
}
else
{
$rib=$langs->trans("NoRIB");
$rib='';
}
return $rib;

View File

@ -771,7 +771,7 @@ class Societe extends CommonObject
$this->country_id = $obj->country_id;
$this->country_code = $obj->country_id?$obj->country_code:'';
$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->trans('Country'.$obj->country_code):$obj->country):'';
$this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->transnoentities('Country'.$obj->country_code):$obj->country):'';
$this->state_id = $obj->fk_departement;
$this->state_code = $obj->state_code;
@ -1751,7 +1751,7 @@ class Societe extends CommonObject
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
$bac = new CompanyBankAccount($this->db);
$bac->fetch(0,$this->id);
return $bac->getRibLabel();
return $bac->getRibLabel(true);
}
/**

View File

@ -224,6 +224,7 @@ if ($month > 0) {
$sql.= " AND ".$datePrint." BETWEEN '".$db->idate($start)."' AND '".$db->idate($end)."'";
}
if ($sref) $sql.= " AND ".$doc_number." LIKE '%".$sref."%'";
if ($sprod_fulldescr) $sql.= " AND (d.description LIKE '%".$sprod_fulldescr."%' OR p.label LIKE '%".$sprod_fulldescr."%')";
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($limit + 1, $offset);
@ -259,7 +260,7 @@ print $formother->select_month($month?$month:-1,'month',1);
$formother->select_year($year?$year:-1,'year',1, 20, 1);
print '</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.$sprod_fulldescr.'">';
print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.dol_escape_htmltag($sprod_fulldescr).'">';
print '</td>';
print '<td class="liste_titre" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
*
@ -317,13 +317,16 @@ if ($socid && $action != 'edit' && $action != "create")
$rib_list = $soc->get_all_rib();
$var = false;
if (is_array($rib_list)) {
if (is_array($rib_list))
{
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("LabelRIB"));
print_liste_field_titre($langs->trans("Bank"));
print_liste_field_titre($langs->trans("RIB"));
print_liste_field_titre($langs->trans("IBAN"));
print_liste_field_titre($langs->trans("BIC"));
print_liste_field_titre($langs->trans("DefaultRIB"), '', '', '', '', 'align="center"');
print '<td width="40"></td>';
print '</tr>';
@ -331,9 +334,17 @@ if ($socid && $action != 'edit' && $action != "create")
foreach ($rib_list as $rib)
{
print "<tr $bc[$var]>";
// Label
print '<td>'.$rib->label.'</td>';
// Bank name
print '<td>'.$rib->bank.'</td>';
// Account number
print '<td>'.$rib->getRibLabel(false).'</td>';
// IBAN
print '<td>'.$rib->iban.'</td>';
// BIC
print '<td>'.$rib->bic.'</td>';
// Default
print '<td align="center" width="70">';
if (!$rib->default_rib) {
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&ribid='.$rib->id.'&action=setasdefault">';
@ -343,6 +354,8 @@ if ($socid && $action != 'edit' && $action != "create")
print img_picto($langs->trans("Enabled"),'on');
}
print '</td>';
// Edit/Delete
print '<td align="right">';
if ($user->rights->societe->creer)
{
@ -592,4 +605,4 @@ if ($socid && $action != 'edit' && $action != 'create')
llxFooter();
$db->close();
?>
?>

View File

@ -247,7 +247,6 @@ input.flat {
border:solid 1px rgba(0,0,0,.3);
border-top:solid 1px rgba(0,0,0,.4);
border-bottom:solid 1px rgba(0,0,0,.2);
box-shadow:1px 1px 2px rgba(0,0,0,.2) inset;
}
input:disabled {background:#b6b6b6;}
@ -1253,8 +1252,6 @@ table.liste td {padding:1px 2px 1px 0px;}
.tagtable, .table-border { display: table; }
.tagtr, .table-border-row { display: table-row; }
.tagtd, .table-border-col, .table-key-border-col, .table-val-border-col { display: table-cell; }
.tagtable form, .tagtable div { display: table-row; }
.tagtable form div, .tagtable div div { display: table-cell; }
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel
{
@ -1285,7 +1282,6 @@ tr.box_titre td.boxclose {
tr.liste_titre td, tr.liste_titre th, form.liste_titre div {
padding:2px;
padding-left:2px !important;
white-space:nowrap;
text-shadow:1px 1px 1px #ffffff;
}

View File

@ -1364,8 +1364,6 @@ table.liste td {
.tagtable, .table-border { display: table; }
.tagtr, .table-border-row { display: table-row; }
.tagtd, .table-border-col, .table-key-border-col, .table-val-border-col { display: table-cell; }
.tagtable form, .tagtable div { display: table-row; }
.tagtable form div, .tagtable div div { display: table-cell; }
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel
{
@ -1393,7 +1391,6 @@ div.liste_titre, tr.liste_titre, form.liste_titre
color: #FFFFFF;
font-family: <?php print $fontlist ?>;
/* border-bottom: 1px solid #FDFFFF; */
white-space: nowrap;
text-align: <?php echo $left; ?>;
}
th.liste_titre, td.liste_titre

View File

@ -1472,8 +1472,6 @@ table.noborder {
.tagtable, .table-border { display: table; }
.tagtr, .table-border-row { display: table-row; }
.tagtd, .table-border-col, .table-key-border-col, .table-val-border-col { display: table-cell; }
.tagtable form, .tagtable div { display: table-row; }
.tagtable form div, .tagtable div div { display: table-cell; }
tr.liste_titre, form.liste_titre {
height: 25px;

View File

@ -1500,8 +1500,6 @@ table.liste td {
.tagtable, .table-border { display: table; }
.tagtr, .table-border-row { display: table-row; }
.tagtd, .table-border-col, .table-key-border-col, .table-val-border-col { display: table-cell; }
.tagtable form, .tagtable div { display: table-row; }
.tagtable form div, .tagtable div div { display: table-cell; }
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel
{

View File

@ -1727,8 +1727,6 @@ table.liste td {
.tagtable, .table-border { display: table; }
.tagtr, .table-border-row { display: table-row; }
.tagtd, .table-border-col, .table-key-border-col, .table-val-border-col { display: table-cell; }
.tagtable form, .tagtable div { display: table-row; }
.tagtable form div, .tagtable div div { display: table-cell; }
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr
{
@ -1759,6 +1757,9 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
text-shadow: 1px 0px 1px #<?php echo $colorshadowtitle; ?>;
vertical-align: middle;
}
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
text-shadow: none !important;
}
.liste_titre td a {
text-shadow: none !important;
color: #<?php echo $colortexttitle; ?>;