Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7
This commit is contained in:
commit
02ce0bc6af
10
ChangeLog
10
ChangeLog
@ -8,6 +8,10 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection"
|
||||
Upgrading to any other version or database system is abolutely required BEFORE trying to
|
||||
make a Dolibarr upgrade.
|
||||
|
||||
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
|
||||
FIX [ bug #2855 ] Wrong translation key in localtax report page
|
||||
FIX [ bug #1852 ] JS error when editing a customer order line
|
||||
FIX [ bug #2900 ] Courtesy title is not stored in create thirdparty form
|
||||
|
||||
***** ChangeLog for 3.7.1 compared to 3.7.* *****
|
||||
FIX Bug in the new photo system
|
||||
@ -262,6 +266,7 @@ Dolibarr better:
|
||||
- Fix: [ bug #2545 ] Missing object_margin.png in Amarok theme
|
||||
- Fix: [ bug #2542 ] Contracts store localtax preferences
|
||||
- Fix: Bad permission assignments for stock movements actions
|
||||
- Fix: [ bug #2891 ] Category hooks do not work
|
||||
|
||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
||||
@ -436,6 +441,11 @@ Fix: [ bug #2577 ] Incorrect invoice status in "Linked objects" page of a projec
|
||||
Fix: [ bug #2576 ] Unable to edit a dictionary entry that has # in its ref
|
||||
Fix: [ bug #2758 ] Product::update sets product note to "null" when $prod->note is null
|
||||
Fix: [ bug #2757 ] Deleting product category photo gives "Forbidden access" error
|
||||
Fix: [ bug #2976 ] "Report" tab is the current tab but it is not marked as selected by the UI
|
||||
Fix: [ bug #2861 ] Undefined variable $res when migrating
|
||||
Fix: [ bug #2837 ] Product list table column header does not match column body
|
||||
Fix: [ bug #2835 ] Customer prices of a product shows incorrect history order
|
||||
Fix: [ bug #2814 ] JPEG photos are not displayed in Product photos page
|
||||
|
||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||
|
||||
@ -456,10 +456,10 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
|
||||
# Removed known external modules to avoir any error when packaging on test env
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
* Copyright (C) 2008-2009 Laurent Destailleur <eldy@uers.sourceforge.net>
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
* Copyright (C) 2008-2009 Laurent Destailleur <eldy@uers.sourceforge.net>
|
||||
* Copyright (C) 2015 Regis Houssin <regis.houssin@capnetworks.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
|
||||
@ -41,8 +42,10 @@ require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
|
||||
//header("Content-type: text/html; charset=UTF-8");
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
|
||||
$search = GETPOST("code", "alpha");
|
||||
|
||||
// Search from criteria
|
||||
if (dol_strlen($_GET["code"]) >= 0) // If search criteria is on char length at least
|
||||
if (dol_strlen($search) >= 0) // If search criteria is on char length at least
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, p.label, p.tva_tx";
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
@ -54,11 +57,15 @@ if (dol_strlen($_GET["code"]) >= 0) // If search criteria is on char length at l
|
||||
// Add criteria on ref/label
|
||||
if (! empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE))
|
||||
{
|
||||
$sql.= " AND (p.ref LIKE '".$_GET['code']."%' OR p.label LIKE '".$_GET['code']."%')";
|
||||
$sql.= " AND (p.ref LIKE '".$db->escape($search)."%' OR p.label LIKE '".$db->escape($search)."%'";
|
||||
if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$db->escape($search)."%'";
|
||||
$sql.= ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.= " AND (p.ref LIKE '%".$_GET['code']."%' OR p.label LIKE '%".$_GET['code']."%')";
|
||||
$sql.= " AND (p.ref LIKE '%".$db->escape($search)."%' OR p.label LIKE '%".$db->escape($search)."%'";
|
||||
if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '%".$db->escape($search)."%'";
|
||||
$sql.= ")";
|
||||
}
|
||||
$sql.= " ORDER BY label";
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
* Copyright (C) 2015 Regis Houssin <regis.houssin@capnetworks.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,8 +60,8 @@ function afficheDonnees(aId, aTexte) {
|
||||
|
||||
|
||||
// aCible : id du bloc de destination; aCode : argument a passer a la page php chargee du traitement et de l'affichage
|
||||
function verifResultat(aCible, aCode) {
|
||||
if (aCode != '') {
|
||||
function verifResultat(aCible, aCode, iLimit = 1) {
|
||||
if (aCode != '' && aCode.length >= iLimit) {
|
||||
|
||||
if (texte = file ('facturation_dhtml.php?code='+escape(aCode))) {
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Regis Houssin <regis.houssin@capnetworks.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
|
||||
@ -43,8 +44,8 @@ $langs->load("cashdesk");
|
||||
<!-- Affichage de la reference et de la designation -->
|
||||
<td><input class="texte_ref" type="text" id ="txtRef" name="txtRef" value="<?php echo $obj_facturation->ref() ?>"
|
||||
onchange="javascript: setSource('REF');"
|
||||
onkeyup="javascript: verifResultat('resultats_dhtml', this.value);"
|
||||
onfocus="javascript: this.select(); verifResultat('resultats_dhtml', this.value);"
|
||||
onkeyup="javascript: verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
|
||||
onfocus="javascript: this.select(); verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
|
||||
onBlur="javascript: document.getElementById('resultats_dhtml').innerHTML = '';"/>
|
||||
</td>
|
||||
<td class="select_design">
|
||||
|
||||
@ -64,6 +64,10 @@ $object = new Categorie($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('categorycard'));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -56,6 +56,9 @@ $object = new Categorie($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('categorycard'));
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -63,6 +63,9 @@ $type=$object->type;
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('categorycard'));
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -2194,7 +2194,7 @@ if ($action == 'create')
|
||||
|
||||
$ref = dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file = $fileparams ['fullname'];
|
||||
|
||||
// Define output language
|
||||
@ -2219,7 +2219,7 @@ if ($action == 'create')
|
||||
dol_print_error($db, $result);
|
||||
exit();
|
||||
}
|
||||
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||
$fileparams = dol_most_recent_file($conf->propal->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file = $fileparams ['fullname'];
|
||||
}
|
||||
|
||||
|
||||
@ -959,8 +959,10 @@ class Propal extends CommonObject
|
||||
*/
|
||||
function createFromClone($socid=0)
|
||||
{
|
||||
global $user,$langs,$conf,$hookmanager;
|
||||
|
||||
global $db, $user,$langs,$conf,$hookmanager;
|
||||
|
||||
dol_include_once('/projet/class.project.class.php');
|
||||
|
||||
$this->context['createfromclone']='createfromclone';
|
||||
|
||||
$error=0;
|
||||
@ -985,7 +987,16 @@ class Propal extends CommonObject
|
||||
$this->socid = $objsoc->id;
|
||||
$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$this->fk_project = '';
|
||||
|
||||
$project = new Project($db);
|
||||
|
||||
if($objFrom->fk_project > 0 && $project->fetch($objFrom->fk_project)) {
|
||||
if($project->socid <= 0) $this->fk_project = $objFrom->fk_project;
|
||||
else $this->fk_project = '';
|
||||
} else {
|
||||
$this->fk_project = '';
|
||||
}
|
||||
|
||||
$this->fk_delivery_address = '';
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
@ -2285,7 +2285,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
|
||||
$ref = dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file = $fileparams ['fullname'];
|
||||
|
||||
// Define output language
|
||||
@ -2310,7 +2310,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
dol_print_error($db, $result);
|
||||
exit();
|
||||
}
|
||||
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file = $fileparams ['fullname'];
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copytight (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copytight (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copytight (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
@ -176,7 +176,7 @@ $form->select_comptes($account_to,'account_to',0,'',1);
|
||||
print "</td>\n";
|
||||
|
||||
print "<td>";
|
||||
$form->select_date($dateo,'','','','','add');
|
||||
$form->select_date((! empty($dateo)?$dateo:''),'','','','','add');
|
||||
print "</td>\n";
|
||||
print '<td><input name="label" class="flat" type="text" size="40" value="'.$label.'"></td>';
|
||||
print '<td><input name="amount" class="flat" type="text" size="8" value="'.$amount.'"></td>';
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
@ -3561,7 +3561,7 @@ if ($action == 'create')
|
||||
|
||||
$ref = dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file = $fileparams ['fullname'];
|
||||
|
||||
// Define output language
|
||||
@ -3586,7 +3586,7 @@ if ($action == 'create')
|
||||
dol_print_error($db, $result);
|
||||
exit();
|
||||
}
|
||||
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/'));
|
||||
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file = $fileparams ['fullname'];
|
||||
}
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ $calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
|
||||
if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice for goods and services
|
||||
{
|
||||
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec");
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
|
||||
@ -129,7 +129,7 @@ $calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
|
||||
if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice for goods and services
|
||||
{
|
||||
$nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode");
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec");
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$prevyear=$year_start; $prevquarter=$q;
|
||||
@ -161,7 +161,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
|
||||
if ($conf->global->$calc==2) // Invoice for goods, payment for services
|
||||
{
|
||||
$nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode");
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec");
|
||||
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
|
||||
$calcmode.='<br>('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')';
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$prevyear=$year_start; $prevquarter=$q;
|
||||
|
||||
@ -77,13 +77,15 @@ abstract class CommonObject
|
||||
*/
|
||||
static function isExistingObject($element, $id, $ref='', $ref_ext='')
|
||||
{
|
||||
global $db;
|
||||
global $db,$conf;
|
||||
|
||||
$sql = "SELECT rowid, ref, ref_ext";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
|
||||
if ($id > 0) $sql.= " WHERE rowid = ".$db->escape($id);
|
||||
else if ($ref) $sql.= " WHERE ref = '".$db->escape($ref)."'";
|
||||
else if ($ref_ext) $sql.= " WHERE ref_ext = '".$db->escape($ref_ext)."'";
|
||||
$sql.= " WHERE entity IN (".getEntity($element).")" ;
|
||||
|
||||
if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
|
||||
else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";
|
||||
else if ($ref_ext) $sql.= " AND ref_ext = '".$db->escape($ref_ext)."'";
|
||||
else {
|
||||
$error='ErrorWrongParameters';
|
||||
dol_print_error(get_class()."::isExistingObject ".$error, LOG_ERR);
|
||||
|
||||
@ -4514,7 +4514,7 @@ class Form
|
||||
{
|
||||
global $dolibarr_main_url_root;
|
||||
$ret.='<!-- Put link to gravatar -->';
|
||||
$ret.='<img alt="Photo found on Gravatar" title="Photo Gravatar.com - email '.$email.'" border="0" width="'.$width.'" src="http://www.gravatar.com/avatar/'.dol_hash($email,3).'?s='.$width.'&d='.urlencode(dol_buildpath('/theme/common/nophoto.jpg',2)).'">'; // gravatar need md5 hash
|
||||
$ret.='<img alt="Photo found on Gravatar" title="Photo Gravatar.com - email '.$email.'" border="0" width="'.$width.'" src="https://www.gravatar.com/avatar/'.dol_hash($email,3).'?s='.$width.'&d='.urlencode(dol_buildpath('/theme/common/nophoto.jpg',2)).'">'; // gravatar need md5 hash
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -586,7 +586,7 @@ class FormOther
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a HTML code to select a color
|
||||
* Output a HTML code to select a color. Field will return an hexa color like '334455'.
|
||||
*
|
||||
* @param string $set_color Pre-selected color
|
||||
* @param string $prefix Name of HTML field
|
||||
|
||||
@ -124,7 +124,7 @@ class FormProjets
|
||||
}
|
||||
else if ($obj->fk_statut == 2)
|
||||
{
|
||||
if ($discard_close == 2) $disabled=1;
|
||||
if ($discard_closed == 2) $disabled=1;
|
||||
$labeltoshow.=' - '.$langs->trans("Closed");
|
||||
}
|
||||
else if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid))
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
// \brief File that include javascript functions used when dispatching batch-enabled product
|
||||
//
|
||||
|
||||
function AddLineBatch(index) {
|
||||
function addLineBatch(index) {
|
||||
var nme = 'dluo_0_'+index;
|
||||
$row=$("tr[name='"+nme+"']").clone(true);
|
||||
$row.find("input[name^='qty']").val('');
|
||||
|
||||
@ -352,7 +352,7 @@ function getState($id,$withcode='',$dbtouse=0)
|
||||
}
|
||||
else
|
||||
{
|
||||
return $langs->trans("NotDefined");
|
||||
return $langs->transnoentitiesnoconv("NotDefined");
|
||||
}
|
||||
}
|
||||
else dol_print_error($dbtouse,'');
|
||||
|
||||
@ -181,7 +181,7 @@ function dol_shutdown()
|
||||
global $conf,$user,$langs,$db;
|
||||
$disconnectdone=false; $depth=0;
|
||||
if (is_object($db) && ! empty($db->connected)) { $depth=$db->transaction_opened; $disconnectdone=$db->close(); }
|
||||
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth)?' (Warn: db disconnection forced, transaction depth was '.$depth.')':''), (($disconnectdone && $depth)?LOG_WARNING:LOG_DEBUG));
|
||||
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth)?' (Warn: db disconnection forced, transaction depth was '.$depth.')':''), (($disconnectdone && $depth)?LOG_WARNING:LOG_INFO));
|
||||
}
|
||||
|
||||
|
||||
@ -2527,11 +2527,12 @@ function dol_print_error_email($prefixcode)
|
||||
* @param string $td Options of attribute td ("" by defaut, example: 'align="center"')
|
||||
* @param string $sortfield Current field used to sort
|
||||
* @param string $sortorder Current sort order
|
||||
* @param string $prefix Prefix for css
|
||||
* @return void
|
||||
*/
|
||||
function print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $td="", $sortfield="", $sortorder="")
|
||||
function print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $td="", $sortfield="", $sortorder="", $prefix="")
|
||||
{
|
||||
print getTitleFieldOfList($name, 0, $file, $field, $begin, $moreparam, $td, $sortfield, $sortorder);
|
||||
print getTitleFieldOfList($name, 0, $file, $field, $begin, $moreparam, $td, $sortfield, $sortorder, $prefix);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2546,9 +2547,10 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar
|
||||
* @param string $moreattrib Add more attributes on th ("" by defaut)
|
||||
* @param string $sortfield Current field used to sort
|
||||
* @param string $sortorder Current sort order
|
||||
* @param string $prefix Prefix for css
|
||||
* @return string
|
||||
*/
|
||||
function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="")
|
||||
function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="")
|
||||
{
|
||||
global $conf;
|
||||
//print "$name, $file, $field, $begin, $options, $moreattrib, $sortfield, $sortorder<br>\n";
|
||||
@ -2562,7 +2564,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
|
||||
// If field is used as sort criteria we use a specific class
|
||||
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom")
|
||||
if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel" '. $moreattrib.'>';
|
||||
else $out.= '<'.$tag.' class="liste_titre" '. $moreattrib.'>';
|
||||
else $out.= '<'.$tag.' class="'.$prefix.'liste_titre" '. $moreattrib.'>';
|
||||
|
||||
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
||||
{
|
||||
|
||||
@ -1844,22 +1844,24 @@ function fetchObjectByElement($element_id,$element_type) {
|
||||
* Convert an array with RGB value into hex RGB value
|
||||
*
|
||||
* @param array $arraycolor Array
|
||||
* @param string $colorifnotfound Color code to return if entry not defined
|
||||
* @param string $colorifnotfound Color code to return if entry not defined or not a RGB format
|
||||
* @return string RGB hex value (without # before). For example: FF00FF
|
||||
* @see Make the opposite of colorStringToArray
|
||||
*/
|
||||
function colorArrayToHex($arraycolor,$colorifnotfound='888888')
|
||||
{
|
||||
if (! is_array($arraycolor)) return $colorifnotfound;
|
||||
if (empty($arraycolor)) return $colorifnotfound;
|
||||
return dechex($arraycolor[0]).dechex($arraycolor[1]).dechex($arraycolor[2]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,255)
|
||||
* Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,255).
|
||||
* If entry is already an array, return it.
|
||||
*
|
||||
* @param string $stringcolor String with hex (FFFFFF) or comma RGB ('255,255,255')
|
||||
* @param string $colorifnotfound Color code to return if entry not defined
|
||||
* @param array $colorifnotfound Color code array to return if entry not defined
|
||||
* @return string RGB hex value (without # before). For example: FF00FF
|
||||
* @see Make the opposite of colorArrayToHex
|
||||
*/
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
function report_header($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='')
|
||||
{
|
||||
global $langs, $hselected;
|
||||
global $langs;
|
||||
|
||||
print "\n\n<!-- debut cartouche rapport -->\n";
|
||||
|
||||
@ -48,7 +48,7 @@ function report_header($nom,$variante,$period,$periodlink,$description,$builddat
|
||||
$head[$h][1] = $langs->trans("Report");
|
||||
$head[$h][2] = 'report';
|
||||
|
||||
dol_fiche_head($head, $hselected);
|
||||
dol_fiche_head($head, 'report');
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
foreach($moreparam as $key => $value)
|
||||
|
||||
@ -48,7 +48,7 @@ if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX))
|
||||
//var_dump($modulepart);
|
||||
if (in_array($modulepart,array('facture_fournisseur','commande_fournisseur','facture','commande','propal','ficheinter','contract','project','project_task')))
|
||||
{
|
||||
$savingdocmask=$object->ref.'___file__';
|
||||
$savingdocmask=$object->ref.'-__file__';
|
||||
}
|
||||
/*if (in_array($modulepart,array('member')))
|
||||
{
|
||||
|
||||
@ -194,7 +194,7 @@ else {
|
||||
</td>
|
||||
|
||||
<td align="right"><?php
|
||||
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" id="tva_tx" value="0">0';
|
||||
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" id="tva_tx" value="0">'.vatrate(0, true);
|
||||
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer);
|
||||
?>
|
||||
</td>
|
||||
|
||||
@ -248,10 +248,10 @@ if (! empty($conf->margin->enabled))
|
||||
{
|
||||
?>
|
||||
$('#savelinebutton').click(function (e) {
|
||||
return checkEditLine(e, "marginRate");
|
||||
return checkEditLine(e, "np_marginRate");
|
||||
});
|
||||
$("input[name='np_marginRate']:first").blur(function(e) {
|
||||
return checkEditLine(e, "marginRate");
|
||||
return checkEditLine(e, "np_marginRate");
|
||||
});
|
||||
<?php
|
||||
}
|
||||
@ -259,10 +259,10 @@ if (! empty($conf->margin->enabled))
|
||||
{
|
||||
?>
|
||||
$('#savelinebutton').click(function (e) {
|
||||
return checkEditLine(e, "markRate");
|
||||
return checkEditLine(e, "np_markRate");
|
||||
});
|
||||
$("input[name='np_markRate']:first").blur(function(e) {
|
||||
return checkEditLine(e, "markRate");
|
||||
return checkEditLine(e, "np_markRate");
|
||||
});
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -730,7 +730,7 @@ if ($action == 'create')
|
||||
$liste = ModelePdfExpedition::liste_modeles($db);
|
||||
print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF);
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$expe,$action); // Note that $action and $object may have been modified by hook
|
||||
@ -1621,7 +1621,7 @@ else if ($id || $ref)
|
||||
{
|
||||
$ref = dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($ref,'/'));
|
||||
$fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file=$fileparams['fullname'];
|
||||
|
||||
// Define output language
|
||||
@ -1648,7 +1648,7 @@ else if ($id || $ref)
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
$fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($ref,'/'));
|
||||
$fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file=$fileparams['fullname'];
|
||||
}
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ print_titre($langs->trans('RelatedShippings'));
|
||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$total=0;
|
||||
$var=true;
|
||||
foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
@ -71,4 +72,4 @@ foreach($linkedObjectBlock as $object)
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
<!-- END PHP TEMPLATE -->
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
@ -324,24 +324,34 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Extrafields
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$array_option = $extrafields->getOptionalsFromPost($extralabels);
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||
if ($ret < 0) {
|
||||
$error ++;
|
||||
$action = 'create';
|
||||
}
|
||||
|
||||
$object->array_options = $array_option;
|
||||
if (! $error)
|
||||
{
|
||||
// Extrafields
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$array_option = $extrafields->getOptionalsFromPost($extralabels);
|
||||
|
||||
$result = $object->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$id=$result; // Force raffraichissement sur fiche venant d'etre cree
|
||||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
$object->array_options = $array_option;
|
||||
|
||||
$result = $object->create($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$id=$result; // Force raffraichissement sur fiche venant d'etre cree
|
||||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = 'create';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1732,7 +1742,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$ref = dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||
$fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file=$fileparams['fullname'];
|
||||
|
||||
// Define output language
|
||||
@ -1759,7 +1769,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
$fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||
$fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file=$fileparams['fullname'];
|
||||
}
|
||||
|
||||
|
||||
@ -155,6 +155,7 @@ class ProductFournisseur extends Product
|
||||
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
//global $mysoc;
|
||||
|
||||
// Clean parameter
|
||||
if (empty($qty)) $qty=0;
|
||||
|
||||
@ -1920,7 +1920,7 @@ elseif (! empty($object->id))
|
||||
{
|
||||
$ref = dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$fileparams = dol_most_recent_file($conf->fournisseur->commande->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||
$fileparams = dol_most_recent_file($conf->fournisseur->commande->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file=$fileparams['fullname'];
|
||||
|
||||
// Define output language
|
||||
@ -1947,7 +1947,7 @@ elseif (! empty($object->id))
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
$fileparams = dol_most_recent_file($conf->fournisseur->commande->dir_output . '/' . $ref, preg_quote($ref,'/'));
|
||||
$fileparams = dol_most_recent_file($conf->fournisseur->commande->dir_output . '/' . $ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file=$fileparams['fullname'];
|
||||
}
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ print_titre($langs->trans('RelatedOrders'));
|
||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$total=0;
|
||||
$var=true;
|
||||
foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
@ -68,4 +69,4 @@ foreach($linkedObjectBlock as $object)
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
<!-- END PHP TEMPLATE -->
|
||||
|
||||
@ -2396,7 +2396,7 @@ else
|
||||
{
|
||||
$ref = dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($ref,'/'));
|
||||
$fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file=$fileparams['fullname'];
|
||||
|
||||
// Define output language
|
||||
@ -2423,7 +2423,7 @@ else
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
$fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($ref,'/'));
|
||||
$fileparams = dol_most_recent_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($object->id,2).$ref, preg_quote($ref, '/').'([^\-])+');
|
||||
$file=$fileparams['fullname'];
|
||||
}
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ else print_titre($langs->trans("RelatedBill"));
|
||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$total=0;
|
||||
$var=true;
|
||||
foreach($linkedObjectBlock as $object)
|
||||
{
|
||||
@ -69,4 +70,4 @@ foreach($linkedObjectBlock as $object)
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
<!-- END PHP TEMPLATE -->
|
||||
|
||||
@ -98,36 +98,36 @@ ALTER TABLE llx_accountingaccount add column fk_user_author integer DEFAULT NULL
|
||||
ALTER TABLE llx_accountingaccount add column fk_user_modif integer DEFAULT NULL AFTER fk_user_author;
|
||||
|
||||
-- Qual
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_MODE' WHERE name = 'COMPTA_MODE';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_CUSTOMER' WHERE name = 'COMPTA_ACCOUNT_CUSTOMER';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUPPLIER' WHERE name = 'COMPTA_ACCOUNT_SUPPLIER';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_BUY_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_BUY_ACCOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_SOLD_ACCOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_BUY_ACCOUNT' WHERE name = 'COMPTA_SERVICE_BUY_ACCOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_SOLD_ACCOUNT' WHERE name = 'COMPTA_SERVICE_SOLD_ACCOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_VAT_ACCOUNT' WHERE name = 'COMPTA_VAT_ACCOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_VAT_BUY_ACCOUNT' WHERE name = 'COMPTA_VAT_BUY_ACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_MODE')__ WHERE __DECRYPT('name')__ = 'COMPTA_MODE';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_CUSTOMER')__ WHERE __DECRYPT('name')__ = 'COMPTA_ACCOUNT_CUSTOMER';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_SUPPLIER')__ WHERE __DECRYPT('name')__ = 'COMPTA_ACCOUNT_SUPPLIER';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PRODUCT_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_PRODUCT_BUY_ACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PRODUCT_SOLD_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_PRODUCT_SOLD_ACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SERVICE_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_SERVICE_BUY_ACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SERVICE_SOLD_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_SERVICE_SOLD_ACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_VAT_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_VAT_ACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_VAT_BUY_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'COMPTA_VAT_BUY_ACCOUNT';
|
||||
|
||||
-- Compatibility with module Accounting Expert
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_MODELCSV' WHERE name = 'ACCOUNTINGEX_MODELCSV';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_SEPARATORCSV' WHERE name = 'ACCOUNTINGEX_SEPARATORCSV';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_DATE' WHERE name = 'ACCOUNTINGEX_EXP_DATE';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_PIECE' WHERE name = 'ACCOUNTINGEX_EXP_PIECE';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_GLOBAL_ACCOUNT' WHERE name = 'ACCOUNTINGEX_EXP_GLOBAL_ACCOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_LABEL' WHERE name = 'ACCOUNTINGEX_EXP_LABEL';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_AMOUNT' WHERE name = 'ACCOUNTINGEX_EXP_AMOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_DEVISE' WHERE name = 'ACCOUNTINGEX_EXP_DEVISE';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUSPENSE' WHERE name = 'ACCOUNTINGEX_ACCOUNT_SUSPENSE';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_SELL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SELL_JOURNAL';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_PURCHASE_JOURNAL' WHERE name = 'ACCOUNTINGEX_PURCHASE_JOURNAL';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_SOCIAL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SOCIAL_JOURNAL';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_MISCELLANEOUS_JOURNAL' WHERE name = 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH' WHERE name = 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_GACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_GACCOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_AACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_AACCOUNT';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_LIMIT_LIST_VENTILATION' WHERE name = 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_LIST_SORT_VENTILATION_TODO' WHERE name = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO';
|
||||
UPDATE llx_const SET name = 'ACCOUNTING_LIST_SORT_VENTILATION_DONE' WHERE name = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_MODELCSV')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_MODELCSV';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_SEPARATORCSV')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SEPARATORCSV';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_DATE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_DATE';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_PIECE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_PIECE';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_GLOBAL_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_GLOBAL_ACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_LABEL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_LABEL';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_AMOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_AMOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_EXPORT_DEVISE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_EXP_DEVISE';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_SUSPENSE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_ACCOUNT_SUSPENSE';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SELL_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SELL_JOURNAL';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_PURCHASE_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_PURCHASE_JOURNAL';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_SOCIAL_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_SOCIAL_JOURNAL';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_MISCELLANEOUS_JOURNAL')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_ACCOUNT_TRANSFER_CASH')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LENGTH_GACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LENGTH_GACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LENGTH_AACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LENGTH_AACCOUNT';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIMIT_LIST_VENTILATION')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIST_SORT_VENTILATION_TODO')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO';
|
||||
UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_LIST_SORT_VENTILATION_DONE')__ WHERE __DECRYPT('name')__ = 'ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE';
|
||||
|
||||
-- Drop old table
|
||||
DROP TABLE llx_compta;
|
||||
@ -208,10 +208,14 @@ UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type NOT IN (SELE
|
||||
ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_user_author (fk_user_author);
|
||||
UPDATE llx_product_price set fk_user_author = null where fk_user_author = 0;
|
||||
UPDATE llx_product_price set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
|
||||
-- drop foreign key for avoid a mysql crash
|
||||
ALTER TABLE llx_product_price DROP FOREIGN KEY fk_product_price_user_author;
|
||||
ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||
-- fk_product
|
||||
ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_product (fk_product);
|
||||
DELETE from llx_product_price where fk_product NOT IN (SELECT rowid from llx_product);
|
||||
-- drop foreign key for avoid a mysql crash
|
||||
ALTER TABLE llx_product_price DROP FOREIGN KEY fk_product_price_product;
|
||||
ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur MODIFY COLUMN date_livraison datetime;
|
||||
@ -1133,9 +1137,9 @@ ALTER TABLE llx_c_email_templates ADD UNIQUE INDEX uk_c_email_templates(entity,
|
||||
ALTER TABLE llx_c_email_templates ADD INDEX idx_type(type_template);
|
||||
|
||||
-- Remove OSC module
|
||||
DELETE FROM llx_const WHERE name = 'MAIN_MODULE_BOUTIQUE';
|
||||
DELETE FROM llx_const WHERE name = 'OSC_DB_HOST';
|
||||
DELETE FROM llx_menu WHERE module = 'boutique';
|
||||
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MODULE_BOUTIQUE';
|
||||
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'OSC_DB_HOST';
|
||||
DELETE FROM llx_menu WHERE __DECRYPT('module')__ = 'boutique';
|
||||
|
||||
-- Add option always editable on extrafield
|
||||
ALTER TABLE llx_extrafields ADD alwayseditable INTEGER DEFAULT 0 AFTER pos;
|
||||
@ -1177,4 +1181,5 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_typ
|
||||
|
||||
ALTER TABLE llx_livraison MODIFY COLUMN date_delivery DATETIME NULL DEFAULT NULL;
|
||||
|
||||
INSERT INTO llx_const (name, value, type, note, visible, entity) SELECT 'PRODUCT_USE_OLD_PATH_FOR_PHOTO','1','chaine','Use old path for products images',1,1 FROM llx_const WHERE name='MAIN_VERSION_LAST_INSTALL' AND value < '3.7.0';
|
||||
-- This constant is for compatibility if user come from 3.6 or lower. Must not be enabled on 3.7.0 or +
|
||||
INSERT INTO llx_const (name, value, type, note, visible, entity) SELECT __ENCRYPT('PRODUCT_USE_OLD_PATH_FOR_PHOTO')__,__ENCRYPT('1')__,'chaine','Use old path for products images',1,0 FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_VERSION_LAST_INSTALL' AND __DECRYPT('value')__ < '3.7.0';
|
||||
|
||||
@ -535,7 +535,7 @@ if (! defined('NOLOGIN'))
|
||||
{
|
||||
// We are already into an authenticated session
|
||||
$login=$_SESSION["dol_login"];
|
||||
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login);
|
||||
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login, LOG_DEBUG);
|
||||
|
||||
$resultFetchUser=$user->fetch('',$login);
|
||||
if ($resultFetchUser <= 0)
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -820,8 +820,13 @@ else
|
||||
if (! empty($conf->barcode->enabled) && ! empty($conf->global->BARCODE_PRODUCT_ADDON_NUM))
|
||||
{
|
||||
$module=strtolower($conf->global->BARCODE_PRODUCT_ADDON_NUM);
|
||||
$result=dol_include_once('/core/modules/barcode/'.$module.'.php');
|
||||
if ($result > 0)
|
||||
$dirbarcode=array_merge(array('/core/modules/barcode/'),$conf->modules_parts['barcode']);
|
||||
foreach ($dirbarcode as $dirroot)
|
||||
{
|
||||
$res=dol_include_once($dirroot.$module.'.php');
|
||||
if ($res) break;
|
||||
}
|
||||
if ($res > 0)
|
||||
{
|
||||
$modBarCodeProduct =new $module();
|
||||
}
|
||||
|
||||
@ -2169,7 +2169,7 @@ class Product extends CommonObject
|
||||
$sql = "SELECT sum(d.qty), date_format(c.date_commande, '%Y%m')";
|
||||
if ($mode == 'bynumber') $sql.= ", count(DISTINCT c.rowid)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as d, ".MAIN_DB_PREFIX."commande_fournisseur as c, ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->fournisseur->lire && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.rowid = d.fk_commande";
|
||||
$sql.= " AND d.fk_product =".$this->id;
|
||||
$sql.= " AND c.fk_soc = s.rowid";
|
||||
@ -3447,6 +3447,12 @@ class Product extends CommonObject
|
||||
{
|
||||
dol_delete_file($dirthumb.$photo_vignette);
|
||||
}
|
||||
|
||||
$photo_vignette=preg_replace('/'.$regs[0].'/i','',$filename).'_mini'.$regs[0];
|
||||
if (file_exists(dol_osencode($dirthumb.$photo_vignette)))
|
||||
{
|
||||
dol_delete_file($dirthumb.$photo_vignette);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -49,8 +49,8 @@ $sall=GETPOST("sall");
|
||||
$type=GETPOST("type","int");
|
||||
$search_sale = GETPOST("search_sale");
|
||||
$search_categ = GETPOST("search_categ",'int');
|
||||
$tosell = GETPOST("tosell");
|
||||
$tobuy = GETPOST("tobuy");
|
||||
$tosell = GETPOST("tosell", 'int');
|
||||
$tobuy = GETPOST("tobuy", 'int');
|
||||
$fourn_id = GETPOST("fourn_id",'int');
|
||||
$catid = GETPOST('catid','int');
|
||||
|
||||
|
||||
@ -748,9 +748,8 @@ $sql .= " " . MAIN_DB_PREFIX . "user as u";
|
||||
$sql .= " WHERE fk_product = " . $object->id;
|
||||
$sql .= " AND p.entity IN (" . getEntity('productprice', 1) . ")";
|
||||
$sql .= " AND p.fk_user_author = u.rowid";
|
||||
if (! empty($socid) && ! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
$sql .= " AND p.price_level = " . $soc->price_level;
|
||||
$sql .= " ORDER BY p.date_price DESC, p.price_level ASC";
|
||||
if (! empty($socid) && ! empty($conf->global->PRODUIT_MULTIPRICES)) $sql .= " AND p.price_level = " . $soc->price_level;
|
||||
$sql .= " ORDER BY p.date_price DESC, p.price_level ASC, p.rowid DESC";
|
||||
// $sql .= $db->plimit();
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -41,7 +41,7 @@ $conf->dol_use_jmobile=GETPOST('dol_use_jmobile','int');
|
||||
|
||||
// Security check
|
||||
global $dolibarr_main_demo;
|
||||
if (empty($dolibarr_main_demo)) accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page',1,1,1);
|
||||
if (empty($dolibarr_main_demo)) accessforbidden('Parameter dolibarr_main_demo must be defined in conf file with value "default login,default pass" to enable the demo entry page',0,0,1);
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$res=$hookmanager->initHooks(array('demo'));
|
||||
|
||||
@ -65,7 +65,11 @@ $extrafields = new ExtraFields($db);
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeaderVierge($langs->trans("MemberCard"));
|
||||
$morehead='';
|
||||
if (! empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead='<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.'">';
|
||||
else $morehead='<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php'.'">';
|
||||
|
||||
llxHeaderVierge($langs->trans("MemberCard"), $morehead);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('adherent');
|
||||
@ -75,7 +79,7 @@ if ($id > 0)
|
||||
if ($res < 0) { dol_print_error($db,$object->error); exit; }
|
||||
$res=$object->fetch_optionals($object->id,$extralabels);
|
||||
|
||||
print_titre($langs->trans("MemberCard"));
|
||||
print_fiche_titre($langs->trans("MemberCard"), '', '');
|
||||
|
||||
if (empty($object->public))
|
||||
{
|
||||
@ -83,7 +87,7 @@ if ($id > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<table class="border" cellspacing="0" width="100%" cellpadding="3">';
|
||||
print '<table class="public_border" cellspacing="0" width="100%" cellpadding="3">';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Type").'</td><td class="valeur">'.$object->type."</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Person").'</td><td class="valeur">'.$object->morphy.'</td></tr>';
|
||||
@ -138,7 +142,7 @@ function llxHeaderVierge($title, $head = "")
|
||||
print "<title>".$title."</title>\n";
|
||||
if ($head) print $head."\n";
|
||||
print "</head>\n";
|
||||
print "<body>\n";
|
||||
print '<body class="public_body">'."\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -62,7 +62,7 @@ function llxHeaderVierge($title, $head = "")
|
||||
print "<title>".$title."</title>\n";
|
||||
if ($head) print $head."\n";
|
||||
print "</head>\n";
|
||||
print "<body>\n";
|
||||
print '<body class="public_body">'."\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,7 +98,13 @@ if (! $sortfield) { $sortfield="lastname"; }
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers"));
|
||||
$form = new Form($db);
|
||||
|
||||
$morehead='';
|
||||
if (! empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead='<link rel="stylesheet" type="text/css" href="'.$conf->global->MEMBER_PUBLIC_CSS.'">';
|
||||
else $morehead='<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/theme/eldy/style.css.php'.'">';
|
||||
|
||||
llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers"), $morehead);
|
||||
|
||||
$sql = "SELECT rowid, firstname, lastname, societe, zip, town, email, birth, photo";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent";
|
||||
@ -120,17 +126,16 @@ if ($result)
|
||||
|
||||
$param="&statut=$statut&sortorder=$sortorder&sortfield=$sortfield";
|
||||
print_barre_liste($langs->trans("ListOfValidatedPublicMembers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, 0, '');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="public_border" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=firstname">'.$langs->trans("Firstname").'</a>';
|
||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?page='.$page.'&sortorder=ASC&sortfield=lastname">'.$langs->trans("Lastname").'</a>';
|
||||
print ' / <a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=societe">'.$langs->trans("Company").'</a></td>'."\n";
|
||||
print '<tr class="public_liste_titre">';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=firstname">'.dolGetFirstLastname($langs->trans("Firstname"),$langs->trans("Lastname")).'</a></td>';
|
||||
print '<td><a href="'.$_SERVER["PHP_SELF"].'?page='.$page.'&sortorder=ASC&sortfield=societe">'.$langs->trans("Company").'</a></td>'."\n";
|
||||
//print_liste_field_titre($langs->trans("DateToBirth"), $_SERVER["PHP_SELF"],"birth",'',$param,$sortfield,$sortorder); // est-ce nécessaire ??
|
||||
print_liste_field_titre($langs->trans("EMail"), $_SERVER["PHP_SELF"],"email",'',$param,$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Zip"), $_SERVER["PHP_SELF"],"zip","",$param,$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Town"), $_SERVER["PHP_SELF"],"town","",$param,$sortfield,$sortorder);
|
||||
print "<td>".$langs->trans("Photo")."</td>\n";
|
||||
print_liste_field_titre($langs->trans("EMail"), $_SERVER["PHP_SELF"],"email",'',$param,'',$sortfield,$sortorder,'public_');
|
||||
print_liste_field_titre($langs->trans("Zip"), $_SERVER["PHP_SELF"],"zip","",$param,'',$sortfield,$sortorder,'public_');
|
||||
print_liste_field_titre($langs->trans("Town"), $_SERVER["PHP_SELF"],"town","",$param,'',$sortfield,$sortorder,'public_');
|
||||
print_liste_field_titre($langs->trans("Photo"), $_SERVER["PHP_SELF"],"","",$param,'',$sortfield,$sortorder,'public_');
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
@ -139,13 +144,13 @@ if ($result)
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td><a href="public_card.php?id='.$objp->rowid.'">'.dolGetFirstLastname($obj->firstname, $obj->lastname).($objp->societe?' / '.$objp->societe:'').'</a></td>'."\n";
|
||||
print '<td><a href="public_card.php?id='.$objp->rowid.'">'.dolGetFirstLastname($objp->firstname, $objp->lastname).'</a></td>'."\n";
|
||||
print '<td>'.$objp->societe.'</td>'."\n";
|
||||
print '<td>'.$objp->email.'</td>'."\n";
|
||||
print '<td>'.$objp->zip.'</td>'."\n";
|
||||
print '<td>'.$objp->town.'</td>'."\n";
|
||||
if (isset($objp->photo) && $objp->photo != '')
|
||||
{
|
||||
$form = new Form($db);
|
||||
print '<td>';
|
||||
print $form->showphoto('memberphoto', $objp, 64);
|
||||
print '</td>'."\n";
|
||||
@ -165,6 +170,6 @@ else
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooterVierge();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2012-2013 Philippe Berthet <berthet@systune.be>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* Version V1.1 Initial version of Philippe Berthet
|
||||
* Version V2 Change to be compatible with 3.4 and enhanced to be more generic
|
||||
@ -197,7 +198,7 @@ if ($type_element == 'invoice')
|
||||
{ // Customer : show products from invoices
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$documentstatic=new Facture($db);
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.facnumber as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, ';
|
||||
$sql_select = 'SELECT f.rowid as doc_id, f.facnumber as doc_number, f.type as doc_type, f.datef as dateprint, f.fk_statut as status, f.paye as paid, ';
|
||||
$tables_from = MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."facturedet as d";
|
||||
$where = " WHERE f.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||
$where.= " AND d.fk_facture = f.rowid";
|
||||
@ -228,7 +229,7 @@ if ($type_element == 'order')
|
||||
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||
$where.= " AND d.fk_commande = c.rowid";
|
||||
$where.= " AND c.entity = ".$conf->entity;
|
||||
$dateprint = 'c.datef';
|
||||
$dateprint = 'c.date_commande';
|
||||
$doc_number='c.ref';
|
||||
$thirdTypeSelect='customer';
|
||||
}
|
||||
@ -335,11 +336,12 @@ if ($sql_select)
|
||||
{
|
||||
$documentstatic->id=$objp->doc_id;
|
||||
$documentstatic->ref=$objp->doc_number;
|
||||
$documentstatic->type=$objp->type;
|
||||
$documentstatic->type=$objp->doc_type;
|
||||
$documentstatic->fk_statut=$objp->status;
|
||||
$documentstatic->fk_status=$objp->status;
|
||||
$documentstatic->statut=$objp->status;
|
||||
$documentstatic->status=$objp->status;
|
||||
$documentstatic->paye=$objp->paid;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
@ -137,7 +137,7 @@ if (empty($reshook))
|
||||
$object->particulier = GETPOST("private");
|
||||
|
||||
$object->name = dolGetFirstLastname(GETPOST('firstname','alpha'),GETPOST('nom','alpha')?GETPOST('nom','alpha'):GETPOST('name','alpha'));
|
||||
$object->civility_id = GETPOST('civility_id', 'int');
|
||||
$object->civility_id = GETPOST('civility_id');
|
||||
// Add non official properties
|
||||
$object->name_bis = GETPOST('name','alpha')?GETPOST('name','alpha'):GETPOST('nom','alpha');
|
||||
$object->firstname = GETPOST('firstname','alpha');
|
||||
|
||||
@ -93,7 +93,6 @@ $isblue=max(0,(2*$colblue-$colred-$colgreen)/2); // 0 - 255
|
||||
$colorbackhmenu1=($colred-3).','.($colgreen-3).','.($colblue-3); // topmenu
|
||||
$colorbackhmenu2=($colred+5).','.($colgreen+5).','.($colblue+5);
|
||||
$colorbackvmenu1=($colred+15).','.($colgreen+16).','.($colblue+17); // vmenu
|
||||
$colorbackvmenu1b=($colred+5).','.($colgreen+6).','.($colblue+7); // vmenu (not menu)
|
||||
$colorbackvmenu2=($colred-15).','.($colgreen-15).','.($colblue-15);
|
||||
$colorbacktitle1=($colred-5).','.($colgreen-5).','.($colblue-5); // title of array
|
||||
$colorbacktitle2=($colred-15).','.($colgreen-15).','.($colblue-15);
|
||||
@ -106,7 +105,7 @@ $colorbacklineimpairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+roun
|
||||
$colorbacklinepair1=(244+round($isred/3)).','.(244+round($isgreen/3)).','.(244+round($isblue/3)); // line pair
|
||||
$colorbacklinepair2=(250+round($isred/3)).','.(250+round($isgreen/3)).','.(250+round($isblue/3)); // line pair
|
||||
$colorbacklinepairhover=(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)).','.(230+round(($isred+$isgreen+$isblue)/9)); // line pair
|
||||
$colorbackbody='#f9f9f9';
|
||||
$colorbackbody='249,249,249';
|
||||
$colortext='40,40,40';
|
||||
$fontsize='12';
|
||||
$fontsizesmaller='11';
|
||||
@ -124,7 +123,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED))
|
||||
$conf->global->THEME_ELDY_BACKTABCARD2='210,210,210'; // card
|
||||
$conf->global->THEME_ELDY_BACKTABCARD1='234,234,234';
|
||||
$conf->global->THEME_ELDY_BACKTABACTIVE='234,234,234';
|
||||
$conf->global->THEME_ELDY_BACKBODY='#f9f9f9;';
|
||||
$conf->global->THEME_ELDY_BACKBODY='249,249,249;';
|
||||
$conf->global->THEME_ELDY_LINEIMPAIR1='255,255,255';
|
||||
$conf->global->THEME_ELDY_LINEIMPAIR2='255,255,255';
|
||||
$conf->global->THEME_ELDY_LINEIMPAIRHOVER='238,246,252';
|
||||
@ -139,7 +138,6 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED))
|
||||
$colorbackhmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
|
||||
$colorbackhmenu2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK2)?$colorbackhmenu2:$conf->global->THEME_ELDY_TOPMENU_BACK2) :(empty($user->conf->THEME_ELDY_TOPMENU_BACK2)?$colorbackhmenu2:$user->conf->THEME_ELDY_TOPMENU_BACK2);
|
||||
$colorbackvmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK1)?$colorbackvmenu1:$conf->global->THEME_ELDY_VERMENU_BACK1) :(empty($user->conf->THEME_ELDY_VERMENU_BACK1)?$colorbackvmenu1:$user->conf->THEME_ELDY_VERMENU_BACK1);
|
||||
$colorbackvmenu1b =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK1b)?$colorbackvmenu1:$conf->global->THEME_ELDY_VERMENU_BACK1b) :(empty($user->conf->THEME_ELDY_VERMENU_BACK1b)?$colorbackvmenu1b:$user->conf->THEME_ELDY_VERMENU_BACK1b);
|
||||
$colorbackvmenu2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_VERMENU_BACK2)?$colorbackvmenu2:$conf->global->THEME_ELDY_VERMENU_BACK2) :(empty($user->conf->THEME_ELDY_VERMENU_BACK2)?$colorbackvmenu2:$user->conf->THEME_ELDY_VERMENU_BACK2);
|
||||
$colorbacktitle1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_BACKTITLE1) ?$colorbacktitle1:$conf->global->THEME_ELDY_BACKTITLE1) :(empty($user->conf->THEME_ELDY_BACKTITLE1)?$colorbacktitle1:$user->conf->THEME_ELDY_BACKTITLE1);
|
||||
$colorbacktitle2 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_BACKTITLE2) ?$colorbacktitle2:$conf->global->THEME_ELDY_BACKTITLE2) :(empty($user->conf->THEME_ELDY_BACKTITLE2)?$colorbacktitle2:$user->conf->THEME_ELDY_BACKTITLE2);
|
||||
@ -165,6 +163,11 @@ if ((! empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) && empty($user->conf->
|
||||
}
|
||||
|
||||
// Format color value to match expected format (may be 'FFFFFF' or '255,255,255')
|
||||
$colorbackbody=join(',',colorStringToArray($colorbackbody));
|
||||
/*$colorbackhmenu1=join(',',colorStringToArray($colorbackhmenu1));
|
||||
$colorbackhmenu2=join(',',colorStringToArray($colorbackhmenu2));
|
||||
$colorbackvmenu1=join(',',colorStringToArray($colorbackvmenu1));
|
||||
$colorbackvmenu2=join(',',colorStringToArray($colorbackvmenu2));*/
|
||||
$colorbacktabcard1=join(',',colorStringToArray($colorbacktabcard1));
|
||||
$colorbacktabcard2=join(',',colorStringToArray($colorbacktabcard2));
|
||||
|
||||
@ -186,7 +189,6 @@ $tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppa
|
||||
if ($tmpval <= 340) { $colortextbacktab='FFF'; }
|
||||
else { $colortextbacktab='444'; }
|
||||
|
||||
|
||||
$usecss3=true;
|
||||
if ($conf->browser->name == 'ie' && round($conf->browser->version,2) < 10) $usecss3=false;
|
||||
elseif ($conf->browser->name == 'iceweasel') $usecss3=false;
|
||||
@ -195,6 +197,10 @@ elseif ($conf->browser->name == 'epiphany') $usecss3=false;
|
||||
print '/*'."\n";
|
||||
print 'colred='.$colred.' colgreen='.$colgreen.' colblue='.$colblue."\n";
|
||||
print 'isred='.$isred.' isgreen='.$isgreen.' isblue='.$isblue."\n";
|
||||
print 'colorbackbody='.$colorbackbody."\n";
|
||||
print 'colorbackvmenu1='.$colorbackvmenu1."\n";
|
||||
print 'colorbackhmenu1='.$colorbackhmenu1."\n";
|
||||
print 'colorbacktitle1='.$colorbacktitle1."\n";
|
||||
print 'colorbacklineimpair1='.$colorbacklineimpair1."\n";
|
||||
print 'colorbacklineimpair2='.$colorbacklineimpair2."\n";
|
||||
print 'colorbacklineimpairhover='.$colorbacklineimpairhover."\n";
|
||||
@ -223,7 +229,7 @@ body {
|
||||
<?php if (GETPOST("optioncss") == 'print') { ?>
|
||||
background-color: #FFFFFF;
|
||||
<?php } else { ?>
|
||||
background: <?php print $colorbackbody; ?>;
|
||||
background: rgb(<?php print $colorbackbody; ?>);
|
||||
<?php } ?>
|
||||
color: #101010;
|
||||
font-size: <?php print $fontsize ?>px;
|
||||
@ -1820,7 +1826,7 @@ table.liste td {
|
||||
}
|
||||
*/
|
||||
|
||||
.impair:hover, td.nohover {
|
||||
.impair:hover {
|
||||
<?php if ($colorbacklineimpairhover) { if ($usecss3) { ?>
|
||||
background: rgb(<?php echo $colorbacklineimpairhover; ?>);
|
||||
<?php } else { ?>
|
||||
@ -1829,7 +1835,7 @@ table.liste td {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.impair, .nohover .impair:hover, tr.impair td.nohover {
|
||||
.impair, .nohover .impair:hover, tr.impair td.nohover, td.nohover {
|
||||
<?php if ($usecss3) { ?>
|
||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||
@ -3079,5 +3085,17 @@ border-top-right-radius: 6px;
|
||||
padding-left: 54px;
|
||||
}
|
||||
|
||||
|
||||
/* The theme for public pages */
|
||||
.public_body {
|
||||
margin: 20px;
|
||||
}
|
||||
.public_border {
|
||||
border: 1px solid #888;
|
||||
}
|
||||
.public_liste_titre {
|
||||
|
||||
}
|
||||
|
||||
<?php
|
||||
if (is_object($db)) $db->close();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user