Merge remote-tracking branch 'upstream/develop' into 3.7-webservices-fix
This commit is contained in:
commit
bbf06cf2d7
@ -8,6 +8,7 @@
|
||||
* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -31,6 +32,7 @@
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@ -1584,7 +1586,8 @@ class Adherent extends CommonObject
|
||||
}
|
||||
if ($option == 'category')
|
||||
{
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3'.$linkclose;
|
||||
$type = Categorie::TYPE_MEMBER;
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type='.$type.$linkclose;
|
||||
$linkend='</a>';
|
||||
}
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ print "</table></form>";
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
||||
print '<tr '.$bc[0].'><td align="center" colspan="2">';
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -209,8 +209,9 @@ if ($resql)
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(3,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
if ($moreforfilter)
|
||||
|
||||
@ -283,7 +283,7 @@ if ($action == 'edit') // Edit
|
||||
{
|
||||
// Show bugtrack link
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||
print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
@ -469,7 +469,7 @@ else // Show
|
||||
{
|
||||
// Show bugtrack link
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
|
||||
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||
print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."</td>";
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -50,14 +51,14 @@ $parent=GETPOST('parent');
|
||||
|
||||
if ($origin)
|
||||
{
|
||||
if ($type == 0) $idProdOrigin = $origin;
|
||||
if ($type == 1) $idSupplierOrigin = $origin;
|
||||
if ($type == 2) $idCompanyOrigin = $origin;
|
||||
if ($type == 3) $idMemberOrigin = $origin;
|
||||
if ($type == 4) $idContactOrigin = $origin;
|
||||
if ($type == Categorie::TYPE_PRODUCT) $idProdOrigin = $origin;
|
||||
if ($type == Categorie::TYPE_SUPPLIER) $idSupplierOrigin = $origin;
|
||||
if ($type == Categorie::TYPE_CUSTOMER) $idCompanyOrigin = $origin;
|
||||
if ($type == Categorie::TYPE_MEMBER) $idMemberOrigin = $origin;
|
||||
if ($type == Categorie::TYPE_CONTACT) $idContactOrigin = $origin;
|
||||
}
|
||||
|
||||
if ($catorigin && $type == 0) $idCatOrigin = $catorigin;
|
||||
if ($catorigin && $type == Categorie::TYPE_PRODUCT) $idCatOrigin = $catorigin;
|
||||
|
||||
$object = new Categorie($db);
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -46,40 +47,40 @@ $dbtablename = '';
|
||||
|
||||
// For categories on third parties
|
||||
if (! empty($socid)) $id = $socid;
|
||||
if (! isset($type)) $type = 0;
|
||||
if ($type == 1 || $type == 2) $socid = $id;
|
||||
if (! isset($type)) $type = Categorie::TYPE_PRODUCT;
|
||||
if ($type == Categorie::TYPE_SUPPLIER || $type == Categorie::TYPE_CUSTOMER) $socid = $id;
|
||||
|
||||
if ($id || $ref)
|
||||
{
|
||||
if ($type == 0) {
|
||||
if ($type == Categorie::TYPE_PRODUCT) {
|
||||
$elementtype = 'product';
|
||||
$objecttype = 'produit|service&categorie';
|
||||
$objectid = isset($id)?$id:(isset($ref)?$ref:'');
|
||||
$dbtablename = 'product';
|
||||
$fieldid = isset($ref)?'ref':'rowid';
|
||||
}
|
||||
elseif ($type == 1) {
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER) {
|
||||
$elementtype = 'fournisseur';
|
||||
$objecttype = 'societe&categorie';
|
||||
$objectid = isset($id)?$id:(isset($socid)?$socid:'');
|
||||
$dbtablename = '&societe';
|
||||
$fieldid = 'rowid';
|
||||
}
|
||||
elseif ($type == 2) {
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER) {
|
||||
$elementtype = 'societe';
|
||||
$objecttype = 'societe&categorie';
|
||||
$objectid = isset($id)?$id:(isset($socid)?$socid:'');
|
||||
$dbtablename = '&societe';
|
||||
$fieldid = 'rowid';
|
||||
}
|
||||
elseif ($type == 3) {
|
||||
elseif ($type == Categorie::TYPE_MEMBER) {
|
||||
$elementtype = 'member';
|
||||
$objecttype = 'adherent&categorie';
|
||||
$objectid = isset($id)?$id:(isset($ref)?$ref:'');
|
||||
$dbtablename = 'adherent';
|
||||
$fieldid = ! empty($ref)?'ref':'rowid';
|
||||
}
|
||||
elseif ($type == 4) {
|
||||
elseif ($type == Categorie::TYPE_CONTACT) {
|
||||
$elementtype = 'societe';
|
||||
$objecttype = 'contact';
|
||||
$objectid = isset($id)?$id:(isset($ref)?$ref:'');
|
||||
@ -109,34 +110,34 @@ if (empty($reshook))
|
||||
// Remove element from category
|
||||
if ($removecat > 0)
|
||||
{
|
||||
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
if ($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$object = new Product($db);
|
||||
$result = $object->fetch($id, $ref);
|
||||
$elementtype = 'product';
|
||||
}
|
||||
if ($type==1 && $user->rights->societe->creer)
|
||||
if ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
$object = new Fournisseur($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'fournisseur';
|
||||
}
|
||||
if ($type==2 && $user->rights->societe->creer)
|
||||
if ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer)
|
||||
{
|
||||
$object = new Societe($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'societe';
|
||||
}
|
||||
if ($type == 3 && $user->rights->adherent->creer)
|
||||
if ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$object = new Adherent($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'member';
|
||||
}
|
||||
if ($type == 4 && $user->rights->societe->creer)
|
||||
if ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$object = new Contact($db);
|
||||
@ -157,34 +158,34 @@ if (empty($reshook))
|
||||
// Add object into a category
|
||||
if ($parent > 0)
|
||||
{
|
||||
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
if ($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$object = new Product($db);
|
||||
$result = $object->fetch($id, $ref);
|
||||
$elementtype = 'product';
|
||||
}
|
||||
if ($type==1 && $user->rights->societe->creer)
|
||||
if ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
$object = new Fournisseur($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'fournisseur';
|
||||
}
|
||||
if ($type==2 && $user->rights->societe->creer)
|
||||
if ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer)
|
||||
{
|
||||
$object = new Societe($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'societe';
|
||||
}
|
||||
if ($type==3 && $user->rights->adherent->creer)
|
||||
if ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$object = new Adherent($db);
|
||||
$result = $object->fetch($objectid);
|
||||
$elementtype = 'member';
|
||||
}
|
||||
if ($type == 4 && $user->rights->societe->creer)
|
||||
if ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$object = new Contact($db);
|
||||
@ -324,7 +325,7 @@ if ($socid)
|
||||
}
|
||||
else if ($id || $ref)
|
||||
{
|
||||
if ($type == 0)
|
||||
if ($type == Categorie::TYPE_PRODUCT)
|
||||
{
|
||||
$langs->load("products");
|
||||
|
||||
@ -377,7 +378,7 @@ else if ($id || $ref)
|
||||
formCategory($db,$product,0,$socid,($user->rights->produit->creer || $user->rights->service->creer));
|
||||
}
|
||||
|
||||
if ($type == 3)
|
||||
if ($type == Categorie::TYPE_MEMBER)
|
||||
{
|
||||
$langs->load("members");
|
||||
|
||||
@ -455,7 +456,7 @@ else if ($id || $ref)
|
||||
|
||||
formCategory($db,$member,3,0,$user->rights->adherent->creer);
|
||||
}
|
||||
if ($type == 4)
|
||||
if ($type == Categorie::TYPE_CONTACT)
|
||||
{
|
||||
$langs->load("contact");
|
||||
|
||||
@ -618,16 +619,16 @@ function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1)
|
||||
{
|
||||
global $user,$langs,$form,$bc;
|
||||
|
||||
if ($typeid == 0) $title = $langs->trans("ProductsCategoriesShort");
|
||||
if ($typeid == 1) $title = $langs->trans("SuppliersCategoriesShort");
|
||||
if ($typeid == 2) $title = $langs->trans("CustomersProspectsCategoriesShort");
|
||||
if ($typeid == 3) $title = $langs->trans("MembersCategoriesShort");
|
||||
if ($typeid == 4) $title = $langs->trans("ContactCategoriesShort");
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $title = $langs->trans("ProductsCategoriesShort");
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $title = $langs->trans("SuppliersCategoriesShort");
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $title = $langs->trans("CustomersProspectsCategoriesShort");
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $title = $langs->trans("MembersCategoriesShort");
|
||||
if ($typeid == Categorie::TYPE_CONTACT) $title = $langs->trans("ContactCategoriesShort");
|
||||
|
||||
$linktocreate='';
|
||||
if ($showclassifyform && $user->rights->categorie->creer)
|
||||
{
|
||||
$linktocreate='<a href="'.DOL_URL_ROOT.'/categories/card.php?action=create&origin='.$object->id.'&type='.$typeid.'&urlfrom='.urlencode($_SERVER["PHP_SELF"].'?'.(($typeid==1||$typeid==2)?'socid':'id').'='.$object->id.'&type='.$typeid).'">';
|
||||
$linktocreate='<a href="'.DOL_URL_ROOT.'/categories/card.php?action=create&origin='.$object->id.'&type='.$typeid.'&urlfrom='.urlencode($_SERVER["PHP_SELF"].'?'.(($typeid==Categorie::TYPE_SUPPLIER||$typeid==Categorie::TYPE_CUSTOMER)?'socid':'id').'='.$object->id.'&type='.$typeid).'">';
|
||||
$linktocreate.=$langs->trans("CreateCat").' ';
|
||||
$linktocreate.=img_picto($langs->trans("Create"),'filenew');
|
||||
$linktocreate.="</a>";
|
||||
@ -662,11 +663,11 @@ function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1)
|
||||
|
||||
if (count($cats) > 0)
|
||||
{
|
||||
if ($typeid == 0) $title=$langs->trans("ProductIsInCategories");
|
||||
if ($typeid == 1) $title=$langs->trans("CompanyIsInSuppliersCategories");
|
||||
if ($typeid == 2) $title=$langs->trans("CompanyIsInCustomersCategories");
|
||||
if ($typeid == 3) $title=$langs->trans("MemberIsInCategories");
|
||||
if ($typeid == 4) $title=$langs->trans("ContactIsInCategories");
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $title=$langs->trans("ProductIsInCategories");
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $title=$langs->trans("CompanyIsInSuppliersCategories");
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $title=$langs->trans("CompanyIsInCustomersCategories");
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $title=$langs->trans("MemberIsInCategories");
|
||||
if ($typeid == Categorie::TYPE_CONTACT) $title=$langs->trans("ContactIsInCategories");
|
||||
print "\n";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$title.':</td></tr>';
|
||||
@ -687,11 +688,11 @@ function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1)
|
||||
// Link to delete from category
|
||||
print '<td align="right">';
|
||||
$permission=0;
|
||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
||||
if ($typeid == 4) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer;
|
||||
if ($typeid == Categorie::TYPE_CONTACT) $permission=$user->rights->societe->creer;
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removecat=".$cat->id."'>";
|
||||
@ -715,18 +716,17 @@ function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($typeid == 0) $title=$langs->trans("ProductHasNoCategory");
|
||||
if ($typeid == 1) $title=$langs->trans("CompanyHasNoCategory");
|
||||
if ($typeid == 2) $title=$langs->trans("CompanyHasNoCategory");
|
||||
if ($typeid == 3) $title=$langs->trans("MemberHasNoCategory");
|
||||
if ($typeid == 4) $title=$langs->trans("ContactHasNoCategory");
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $title=$langs->trans("ProductHasNoCategory");
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $title=$langs->trans("CompanyHasNoCategory");
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $title=$langs->trans("CompanyHasNoCategory");
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $title=$langs->trans("MemberHasNoCategory");
|
||||
if ($typeid == Categorie::TYPE_CONTACT) $title=$langs->trans("ContactHasNoCategory");
|
||||
print $title;
|
||||
print "<br/>";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2005 Davoleau Brice <brice.davoleau@gmail.com>
|
||||
* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2005 Davoleau Brice <brice.davoleau@gmail.com>
|
||||
* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -40,6 +41,13 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
*/
|
||||
class Categorie extends CommonObject
|
||||
{
|
||||
// Categories types
|
||||
const TYPE_PRODUCT = 0;
|
||||
const TYPE_SUPPLIER = 1;
|
||||
const TYPE_CUSTOMER = 2;
|
||||
const TYPE_MEMBER = 3;
|
||||
const TYPE_CONTACT = 4;
|
||||
|
||||
public $element='category';
|
||||
public $table_element='categories';
|
||||
|
||||
@ -1166,11 +1174,17 @@ class Categorie extends CommonObject
|
||||
$cats = array();
|
||||
|
||||
$typeid=-1; $table='';
|
||||
if ($type == '0' || $type == 'product') { $typeid=0; $table='product'; $type='product'; }
|
||||
else if ($type == '1' || $type == 'supplier') { $typeid=1; $table='soc'; $type='fournisseur'; }
|
||||
else if ($type == '2' || $type == 'customer') { $typeid=2; $table='soc'; $type='societe'; }
|
||||
else if ($type == '3' || $type == 'member') { $typeid=3; $table='member'; $type='member'; }
|
||||
else if ($type == '4' || $type == 'contact') { $typeid=4; $table='socpeople'; $type='contact'; }
|
||||
if ($type == '0' || $type == 'product') {
|
||||
$typeid=self::TYPE_PRODUCT; $table='product'; $type='product';
|
||||
} else if ($type == '1' || $type == 'supplier') {
|
||||
$typeid=self::TYPE_SUPPLIER; $table='soc'; $type='fournisseur';
|
||||
} else if ($type == '2' || $type == 'customer') {
|
||||
$typeid=self::TYPE_CUSTOMER; $table='soc'; $type='societe';
|
||||
} else if ($type == '3' || $type == 'member') {
|
||||
$typeid=self::TYPE_MEMBER; $table='member'; $type='member';
|
||||
} else if ($type == '4' || $type == 'contact') {
|
||||
$typeid=self::TYPE_CONTACT; $table='socpeople'; $type='contact';
|
||||
}
|
||||
|
||||
$sql = "SELECT ct.fk_categorie, c.label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie_".$type." as ct, ".MAIN_DB_PREFIX."categorie as c";
|
||||
@ -1220,11 +1234,11 @@ class Categorie extends CommonObject
|
||||
$cats = array();
|
||||
|
||||
$typeid=-1;
|
||||
if ($type == 0 || $type == 'product') { $typeid=0; }
|
||||
else if ($type == 1 || $type == 'supplier') { $typeid=1; }
|
||||
else if ($type == 2 || $type == 'customer') { $typeid=2; }
|
||||
else if ($type == 3 || $type == 'member') { $typeid=3; }
|
||||
else if ($type == 4 || $type == 'contact') { $typeid=4; }
|
||||
if ($type == 0 || $type == 'product') { $typeid=self::TYPE_PRODUCT; }
|
||||
else if ($type == 1 || $type == 'supplier') { $typeid=self::TYPE_SUPPLIER; }
|
||||
else if ($type == 2 || $type == 'customer') { $typeid=self::TYPE_CUSTOMER; }
|
||||
else if ($type == 3 || $type == 'member') { $typeid=self::TYPE_MEMBER; }
|
||||
else if ($type == 4 || $type == 'contact') { $typeid=self::TYPE_CONTACT; }
|
||||
|
||||
// Generation requete recherche
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
|
||||
@ -1550,7 +1564,7 @@ class Categorie extends CommonObject
|
||||
$this->specimen=1;
|
||||
$this->description = 'This is a description';
|
||||
$this->socid = 1;
|
||||
$this->type = 0;
|
||||
$this->type = self::TYPE_PRODUCT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -35,7 +36,7 @@ $langs->load("categories");
|
||||
if (! $user->rights->categorie->lire) accessforbidden();
|
||||
|
||||
$id=GETPOST('id','int');
|
||||
$type=(GETPOST('type') ? GETPOST('type') : 0);
|
||||
$type=(GETPOST('type') ? GETPOST('type') : Categorie::TYPE_PRODUCT);
|
||||
$catname=GETPOST('catname','alpha');
|
||||
$section=(GETPOST('section')?GETPOST('section'):0);
|
||||
|
||||
@ -47,12 +48,12 @@ $section=(GETPOST('section')?GETPOST('section'):0);
|
||||
$categstatic = new Categorie($db);
|
||||
$form = new Form($db);
|
||||
|
||||
if ($type == 0) $title=$langs->trans("ProductsCategoriesArea");
|
||||
elseif ($type == 1) $title=$langs->trans("SuppliersCategoriesArea");
|
||||
elseif ($type == 2) $title=$langs->trans("CustomersCategoriesArea");
|
||||
elseif ($type == 3) $title=$langs->trans("MembersCategoriesArea");
|
||||
elseif ($type == 4) $title=$langs->trans("ContactsCategoriesArea");
|
||||
else $title=$langs->trans("CategoriesArea");
|
||||
if ($type == Categorie::TYPE_PRODUCT) $title=$langs->trans("ProductsCategoriesArea");
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER) $title=$langs->trans("SuppliersCategoriesArea");
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER) $title=$langs->trans("CustomersCategoriesArea");
|
||||
elseif ($type == Categorie::TYPE_MEMBER) $title=$langs->trans("MembersCategoriesArea");
|
||||
elseif ($type == Categorie::TYPE_CONTACT) $title=$langs->trans("ContactsCategoriesArea");
|
||||
else $title=$langs->trans("CategoriesArea");
|
||||
|
||||
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -93,11 +94,11 @@ $form = new Form($db);
|
||||
if ($object->id)
|
||||
{
|
||||
$title=$langs->trans("ProductsCategoryShort");
|
||||
if ($type == 0) $title=$langs->trans("ProductsCategoryShort");
|
||||
elseif ($type == 1) $title=$langs->trans("SuppliersCategoryShort");
|
||||
elseif ($type == 2) $title=$langs->trans("CustomersCategoryShort");
|
||||
elseif ($type == 3) $title=$langs->trans("MembersCategoryShort");
|
||||
elseif ($type == 4) $title=$langs->trans("ContactCategoriesShort");
|
||||
if ($type == Categorie::TYPE_PRODUCT) $title=$langs->trans("ProductsCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER) $title=$langs->trans("SuppliersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER) $title=$langs->trans("CustomersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_MEMBER) $title=$langs->trans("MembersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CONTACT) $title=$langs->trans("ContactCategoriesShort");
|
||||
|
||||
$head = categories_prepare_head($object,$type);
|
||||
dol_fiche_head($head, 'photos', $title, 0, 'category');
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2010-2012 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2010-2012 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -143,12 +144,12 @@ llxHeader("","",$langs->trans("Translation"));
|
||||
$form = new Form($db);
|
||||
$formadmin=new FormAdmin($db);
|
||||
|
||||
if ($type == 0) $title=$langs->trans("ProductsCategoryShort");
|
||||
elseif ($type == 1) $title=$langs->trans("SuppliersCategoryShort");
|
||||
elseif ($type == 2) $title=$langs->trans("CustomersCategoryShort");
|
||||
elseif ($type == 3) $title=$langs->trans("MembersCategoryShort");
|
||||
elseif ($type == 4) $title=$langs->trans("ContactCategoriesShort");
|
||||
else $title=$langs->trans("Category");
|
||||
if ($type == Categorie::TYPE_PRODUCT) $title=$langs->trans("ProductsCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER) $title=$langs->trans("SuppliersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER) $title=$langs->trans("CustomersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_MEMBER) $title=$langs->trans("MembersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CONTACT) $title=$langs->trans("ContactCategoriesShort");
|
||||
else $title=$langs->trans("Category");
|
||||
|
||||
$head = categories_prepare_head($object,$type);
|
||||
dol_fiche_head($head, 'translation', $title, 0, 'category');
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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,33 +71,33 @@ $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Remove element from category
|
||||
if ($id > 0 && $removeelem > 0)
|
||||
{
|
||||
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
if ($type == Categorie::TYPE_PRODUCT && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$tmpobject = new Product($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'product';
|
||||
}
|
||||
else if ($type==1 && $user->rights->societe->creer)
|
||||
else if ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer)
|
||||
{
|
||||
$tmpobject = new Societe($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'fournisseur';
|
||||
}
|
||||
else if ($type==2 && $user->rights->societe->creer)
|
||||
else if ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer)
|
||||
{
|
||||
$tmpobject = new Societe($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'societe';
|
||||
}
|
||||
else if ($type == 3 && $user->rights->adherent->creer)
|
||||
else if ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$tmpobject = new Adherent($db);
|
||||
$result = $tmpobject->fetch($removeelem);
|
||||
$elementtype = 'member';
|
||||
}
|
||||
else if ($type == 4 && $user->rights->societe->creer) {
|
||||
else if ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) {
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$tmpobject = new Contact($db);
|
||||
@ -121,7 +122,7 @@ if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confi
|
||||
}
|
||||
}
|
||||
|
||||
if ($type==0 && $elemid && $action == 'addintocategory' && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
if ($type == Categorie::TYPE_PRODUCT && $elemid && $action == 'addintocategory' && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
$newobject = new Product($db);
|
||||
@ -158,12 +159,12 @@ $form = new Form($db);
|
||||
|
||||
llxHeader("","",$langs->trans("Categories"));
|
||||
|
||||
if ($type == 0) $title=$langs->trans("ProductsCategoryShort");
|
||||
elseif ($type == 1) $title=$langs->trans("SuppliersCategoryShort");
|
||||
elseif ($type == 2) $title=$langs->trans("CustomersCategoryShort");
|
||||
elseif ($type == 3) $title=$langs->trans("MembersCategoryShort");
|
||||
elseif ($type == 4) $title=$langs->trans("ContactCategoriesShort");
|
||||
else $title=$langs->trans("Category");
|
||||
if ($type == Categorie::TYPE_PRODUCT) $title=$langs->trans("ProductsCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_SUPPLIER) $title=$langs->trans("SuppliersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CUSTOMER) $title=$langs->trans("CustomersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_MEMBER) $title=$langs->trans("MembersCategoryShort");
|
||||
elseif ($type == Categorie::TYPE_CONTACT) $title=$langs->trans("ContactCategoriesShort");
|
||||
else $title=$langs->trans("Category");
|
||||
|
||||
$head = categories_prepare_head($object,$type);
|
||||
|
||||
@ -283,7 +284,7 @@ else
|
||||
}
|
||||
|
||||
// List of products or services (type is type of category)
|
||||
if ($object->type == 0)
|
||||
if ($object->type == Categorie::TYPE_PRODUCT)
|
||||
{
|
||||
$prods = $object->getObjectsInCateg("product");
|
||||
if ($prods < 0)
|
||||
@ -292,7 +293,7 @@ if ($object->type == 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
$showclassifyform=1; $typeid=0;
|
||||
$showclassifyform=1; $typeid=Categorie::TYPE_PRODUCT;
|
||||
|
||||
// Form to add record into a category
|
||||
if ($showclassifyform)
|
||||
@ -334,10 +335,10 @@ if ($object->type == 0)
|
||||
print '<td align="right">';
|
||||
$typeid=$object->type;
|
||||
$permission=0;
|
||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer;
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$prod->id."'>";
|
||||
@ -356,7 +357,7 @@ if ($object->type == 0)
|
||||
}
|
||||
}
|
||||
|
||||
if ($object->type == 1)
|
||||
if ($object->type == Categorie::TYPE_SUPPLIER)
|
||||
{
|
||||
$socs = $object->getObjectsInCateg("supplier");
|
||||
if ($socs < 0)
|
||||
@ -384,10 +385,10 @@ if ($object->type == 1)
|
||||
print '<td align="right">';
|
||||
$typeid=$object->type;
|
||||
$permission=0;
|
||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer;
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$soc->id."'>";
|
||||
@ -407,7 +408,7 @@ if ($object->type == 1)
|
||||
}
|
||||
}
|
||||
|
||||
if($object->type == 2)
|
||||
if($object->type == Categorie::TYPE_CUSTOMER)
|
||||
{
|
||||
$socs = $object->getObjectsInCateg("customer");
|
||||
if ($socs < 0)
|
||||
@ -438,10 +439,10 @@ if($object->type == 2)
|
||||
print '<td align="right">';
|
||||
$typeid=$object->type;
|
||||
$permission=0;
|
||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer;
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$soc->id."'>";
|
||||
@ -461,7 +462,7 @@ if($object->type == 2)
|
||||
}
|
||||
|
||||
// List of members
|
||||
if ($object->type == 3)
|
||||
if ($object->type == Categorie::TYPE_MEMBER)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
|
||||
@ -493,10 +494,10 @@ if ($object->type == 3)
|
||||
print '<td align="right">';
|
||||
$typeid=$object->type;
|
||||
$permission=0;
|
||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer;
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$member->id."'>";
|
||||
@ -515,7 +516,7 @@ if ($object->type == 3)
|
||||
}
|
||||
|
||||
//Categorie contact
|
||||
if($object->type == 4)
|
||||
if($object->type == Categorie::TYPE_CONTACT)
|
||||
{
|
||||
$contacts = $object->getObjectsInCateg("contact");
|
||||
if ($contacts < 0)
|
||||
@ -544,11 +545,11 @@ if($object->type == 4)
|
||||
print '<td align="right">';
|
||||
$typeid=$object->type;
|
||||
$permission=0;
|
||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
||||
if ($typeid == 4) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_PRODUCT) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||
if ($typeid == Categorie::TYPE_SUPPLIER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_CUSTOMER) $permission=$user->rights->societe->creer;
|
||||
if ($typeid == Categorie::TYPE_MEMBER) $permission=$user->rights->adherent->creer;
|
||||
if ($typeid == Categorie::TYPE_CONTACT) $permission=$user->rights->societe->creer;
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$contact->id."'>";
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2015 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
|
||||
@ -609,6 +610,8 @@ if ($action == 'create')
|
||||
if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre($langs->trans("AddActionRendezVous"));
|
||||
else print_fiche_titre($langs->trans("AddAnAction"));
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Type of event
|
||||
@ -784,7 +787,9 @@ if ($action == 'create')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
|
||||
@ -675,6 +675,8 @@ if ($action == 'create')
|
||||
|
||||
print_fiche_titre($langs->trans("NewMailing"));
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailTitle").'</td><td><input class="flat" name="titre" size="40" value="'.$_POST['titre'].'"></td></tr>';
|
||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailFrom").'</td><td><input class="flat" name="from" size="40" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
|
||||
@ -706,12 +708,14 @@ if ($action == 'create')
|
||||
print '<td>';
|
||||
// Editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor('body',$_POST['body'],'',320,'dolibarr_mailings','',true,true,$conf->global->FCKEDITOR_ENABLE_MAILING,20,70);
|
||||
$doleditor=new DolEditor('body',$_POST['body'],'',320,'dolibarr_mailings','',true,true,$conf->global->FCKEDITOR_ENABLE_MAILING,20,'90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center"><input type="submit" class="button" value="'.$langs->trans("CreateMailing").'"></div>';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("CreateMailing").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ if ($resql)
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Proposals").'</td></tr>'."\n";
|
||||
$var=true;
|
||||
$listofstatus=array(0,1,2,3,4);
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -219,34 +220,23 @@ $sql.= " AND s.client IN (2, 3)";
|
||||
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
|
||||
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc";
|
||||
if ($socid) $sql.= " AND s.rowid = " .$socid;
|
||||
if ($search_stcomm != '') $sql.= " AND s.fk_stcomm=".$search_stcomm;
|
||||
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
||||
if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
|
||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_nom) {
|
||||
$sql .= natural_search('s.nom', $search_nom);
|
||||
}
|
||||
if ($search_stcomm != '') $sql.= natural_search("s.fk_stcomm",$search_stcomm,2);
|
||||
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
||||
if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
|
||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_nom) $sql .= natural_search('s.nom', $search_nom);
|
||||
if ($search_zipcode) $sql .= " AND s.zip LIKE '".$db->escape(strtolower($search_zipcode))."%'";
|
||||
if ($search_town) {
|
||||
$sql .= natural_search('s.town', $search_town);
|
||||
}
|
||||
if ($search_state) {
|
||||
$sql .= natural_search('d.nom', $search_state);
|
||||
}
|
||||
if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'";
|
||||
if ($search_town) $sql .= natural_search('s.town', $search_town);
|
||||
if ($search_state) $sql .= natural_search('d.nom', $search_state);
|
||||
if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'";
|
||||
if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status);
|
||||
// Insert levels filters
|
||||
if ($search_levels)
|
||||
{
|
||||
$sql .= " AND s.fk_prospectlevel IN (".$search_levels.')';
|
||||
}
|
||||
if ($search_levels) $sql .= " AND s.fk_prospectlevel IN (".$search_levels.')';
|
||||
// Insert sale filter
|
||||
if ($search_sale > 0)
|
||||
if ($search_sale > 0) $sql .= " AND sc.fk_user = ".$db->escape($search_sale);
|
||||
if ($socname)
|
||||
{
|
||||
$sql .= " AND sc.fk_user = ".$db->escape($search_sale);
|
||||
}
|
||||
if ($socname) {
|
||||
$sql .= natural_search('s.nom', $search_nom);
|
||||
$sortfield = "s.nom";
|
||||
$sortorder = "ASC";
|
||||
@ -309,8 +299,9 @@ if ($resql)
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
@ -362,22 +353,17 @@ if ($resql)
|
||||
print '<input class="flat" type="text" size="10" name="search_datec" value="'.$search_datec.'">';
|
||||
print '</td>';
|
||||
|
||||
// Added by Matelli
|
||||
// Prospect levelt
|
||||
print '<td class="liste_titre" align="center">';
|
||||
// Generate in $options_from the list of each option sorted
|
||||
$options_from = '<option value=""> </option>';
|
||||
$options_from = '<option value=""> </option>'; // Generate in $options_from the list of each option sorted
|
||||
foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
|
||||
{
|
||||
$options_from .= '<option value="'.$tab_level_sortorder.'"'.($search_level_from == $tab_level_sortorder ? ' selected':'').'>';
|
||||
$options_from .= $langs->trans($tab_level_label);
|
||||
$options_from .= '</option>';
|
||||
}
|
||||
|
||||
// Reverse the list
|
||||
array_reverse($tab_level, true);
|
||||
|
||||
// Generate in $options_to the list of each option sorted in the reversed order
|
||||
$options_to = '<option value=""> </option>';
|
||||
array_reverse($tab_level, true); // Reverse the list
|
||||
$options_to = '<option value=""> </option>'; // Generate in $options_to the list of each option sorted in the reversed order
|
||||
foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
|
||||
{
|
||||
$options_to .= '<option value="'.$tab_level_sortorder.'"'.($search_level_to == $tab_level_sortorder ? ' selected':'').'>';
|
||||
@ -392,8 +378,11 @@ if ($resql)
|
||||
|
||||
print '</td>';
|
||||
|
||||
// Prospect status
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print ' ';
|
||||
// TODO Add here a list of prospect status
|
||||
//print $form->selectarray($htmlname, $array, $search_stcomm);
|
||||
//print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="center">';
|
||||
|
||||
@ -115,7 +115,7 @@ if ($resql)
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("CustomersOrders").'</td></tr>'."\n";
|
||||
$listofstatus=array(0,1,2,3,3,-1);
|
||||
$bool=false;
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@@2byte.es>
|
||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2011-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -68,6 +69,15 @@ $req_desc=GETPOST("req_desc",'',3);
|
||||
$req_debit=GETPOST("req_debit",'',3);
|
||||
$req_credit=GETPOST("req_credit",'',3);
|
||||
|
||||
$req_stdtmonth=GETPOST('req_stdtmonth', 'int');
|
||||
$req_stdtday=GETPOST('req_stdtday', 'int');
|
||||
$req_stdtyear=GETPOST('req_stdtyear', 'int');
|
||||
$req_stdt = dol_mktime(0, 0, 0, $req_stdtmonth, $req_stdtday, $req_stdtyear);
|
||||
$req_enddtmonth=GETPOST('req_enddtmonth', 'int');
|
||||
$req_enddtday=GETPOST('req_enddtday', 'int');
|
||||
$req_enddtyear=GETPOST('req_enddtyear', 'int');
|
||||
$req_enddt = dol_mktime(23, 59, 59, $req_enddtmonth, $req_enddtday, $req_enddtyear);
|
||||
|
||||
$vline=GETPOST("vline");
|
||||
$page=GETPOST('page','int');
|
||||
$negpage=GETPOST('negpage','int');
|
||||
@ -87,6 +97,14 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
||||
$req_desc="";
|
||||
$req_debit="";
|
||||
$req_credit="";
|
||||
$req_stdtmonth="";
|
||||
$req_stdtday="";
|
||||
$req_stdtyear="";
|
||||
$req_stdt = "";
|
||||
$req_enddtmonth="";
|
||||
$req_enddtday="";
|
||||
$req_enddtyear="";
|
||||
$req_enddt = "";
|
||||
}
|
||||
|
||||
/*
|
||||
@ -158,7 +176,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->m
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
llxHeader('',$langs->trans("FinancialAccount").'-'.$langs->trans("Transactions"));
|
||||
|
||||
$societestatic=new Societe($db);
|
||||
$userstatic=new User($db);
|
||||
@ -253,6 +271,27 @@ if ($id > 0 || ! empty($ref))
|
||||
$param.='&paiementtype='.urlencode($paiementtype);
|
||||
$mode_search = 1;
|
||||
}
|
||||
|
||||
if ($req_stdt && $req_enddt)
|
||||
{
|
||||
$sql_rech.=" AND (b.datev BETWEEN '".$db->escape($db->idate($req_stdt))."' AND '".$db->escape($db->idate($req_enddt))."')";
|
||||
$param.='&req_stdtmonth='.$req_stdtmonth.'&req_stdtyear='.$req_stdtyear.'&req_stdtday='.$req_stdtday;
|
||||
$param.='&req_enddtmonth='.$req_enddtmonth.'&req_enddtday='.$req_enddtday.'&req_enddtyear='.$req_enddtyear;
|
||||
$mode_search = 1;
|
||||
}
|
||||
elseif ($req_stdt)
|
||||
{
|
||||
$sql_rech.=" AND b.datev >= '".$db->escape($db->idate($req_stdt))."'";
|
||||
$param.='&req_stdtmonth='.$req_stdtmonth.'&req_stdtyear='.$req_stdtyear.'&req_stdtday='.$req_stdtday;
|
||||
$mode_search = 1;
|
||||
}
|
||||
elseif ($req_enddt)
|
||||
{
|
||||
$sql_rech.=" AND b.datev <= '".$db->escape($db->idate($req_enddt))."'";
|
||||
$param.='&req_enddtmonth='.$req_enddtmonth.'&req_enddtday='.$req_enddtday.'&req_enddtyear='.$req_enddtyear;
|
||||
$mode_search = 1;
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT count(*) as total";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
@ -398,7 +437,13 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<input type="hidden" name="thirdparty" value="'.$thirdparty.'">';
|
||||
print '<input type="hidden" name="nbpage" value="'.$totalPages.'">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
print '<input type="hidden" name="req_stdtmonth" value="'.$req_stdtmonth.'">';
|
||||
print '<input type="hidden" name="req_stdtyear" value="'.$req_stdtyear.'">';
|
||||
print '<input type="hidden" name="req_stdtday" value="'.$req_stdtday.'">';
|
||||
print '<input type="hidden" name="req_enddtmonth" value="'.$req_enddtmonth.'">';
|
||||
print '<input type="hidden" name="req_enddtday" value="'.$req_enddtday.'">';
|
||||
print '<input type="hidden" name="req_enddtyear" value="'.$req_enddtyear.'">';
|
||||
|
||||
$navig ='<div data-role="fieldcontain">';
|
||||
if ($limitsql > $viewline) $navig.='<a href="account.php?'.$param.'&page='.($page+1).'">'.img_previous().'</a>';
|
||||
$navig.= '<label for="negpage">'.$langs->trans("Page")."</label> "; // ' Page ';
|
||||
@ -489,9 +534,12 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<input type="hidden" name="action" value="search">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
$period_filter .= $langs->trans('From').' '.$form->select_date($req_stdt,'req_stdt',0,0,1,null,1,1,1);
|
||||
$period_filter .= '<BR>'. $langs->trans('to').' '.$form->select_date($req_enddt,'req_enddt',0,0,1,null,1,1,1);
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '<td>'.$period_filter.'</td>';
|
||||
print '<td>';
|
||||
//$filtertype=array('TIP'=>'TIP','PRE'=>'PRE',...)
|
||||
$filtertype='';
|
||||
@ -576,7 +624,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$var=true;
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0; $total = 0; $sep = -1;
|
||||
$i = 0; $total = 0; $sep = -1; $total_deb=0; $total_cred=0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
@ -811,10 +859,12 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($objp->amount < 0)
|
||||
{
|
||||
print '<td align="right" class="nowrap">'.price($objp->amount * -1).'</td><td> </td>'."\n";
|
||||
$total_deb +=$objp->amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td><td align="right" class="nowrap"> '.price($objp->amount).'</td>'."\n";
|
||||
$total_cred +=$objp->amount;
|
||||
}
|
||||
|
||||
// Balance
|
||||
@ -886,11 +936,23 @@ if ($id > 0 || ! empty($ref))
|
||||
// Show total
|
||||
if ($page == 0 && ! $mode_search)
|
||||
{
|
||||
//Real account situation
|
||||
print '<tr class="liste_total"><td align="left" colspan="8">';
|
||||
if ($sep > 0) print ' '; // If we had at least one line in future
|
||||
else print $langs->trans("CurrentBalance");
|
||||
print ' '.$object->currency_code.'</td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($total, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($solde, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
// Only total according row displays
|
||||
print '<tr class="liste_total"><td align="left" colspan="6">';
|
||||
if ($sep > 0) print ' '; // If we had at least one line in future
|
||||
else print $langs->trans("Total");
|
||||
print ' '.$object->currency_code.'</td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($total_deb*-1, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($total_cred, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($total_cred-($total_deb*-1), 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 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
|
||||
@ -347,7 +348,9 @@ if ($action == 'new')
|
||||
|
||||
print '<form class="nocellnopadd" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="action" value="new">';
|
||||
//print '<fieldset><legend>aaa</legend>';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
//print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dol_print_date($now,'day').'</td></tr>';
|
||||
// Filter
|
||||
@ -358,6 +361,9 @@ if ($action == 'new')
|
||||
$form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1);
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="filter" value="'.dol_escape_htmltag($langs->trans("ToFilter")).'">';
|
||||
if ($filterdate || $filteraccountid > 0)
|
||||
@ -366,8 +372,7 @@ if ($action == 'new')
|
||||
print '<input type="submit" class="button" name="removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
}
|
||||
print '</div>';
|
||||
//print '</fieldset>';
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
||||
$sql = "SELECT ba.rowid as bid, b.datec as datec, b.dateo as date, b.rowid as chqid, ";
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -26,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
|
||||
$langs->load("products");
|
||||
$langs->load("categories");
|
||||
@ -245,7 +247,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
// Category filter
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print $langs->trans("Category") . ': ' . $formother->select_categories(0, $selected_cat, 'search_categ', true);
|
||||
print $langs->trans("Category") . ': ' . $formother->select_categories(Categorie::TYPE_PRODUCT, $selected_cat, 'search_categ', true);
|
||||
print ' ';
|
||||
print $langs->trans("SubCats") . '? ';
|
||||
print '<input type="checkbox" name="subcat" value="yes"';
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -29,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("categories");
|
||||
@ -313,7 +315,7 @@ print "<table class=\"noborder\" width=\"100%\">";
|
||||
// Category filter
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print $langs->trans("Category") . ': ' . $formother->select_categories(2, $selected_cat, 'search_categ', true);
|
||||
print $langs->trans("Category") . ': ' . $formother->select_categories(Categorie::TYPE_CUSTOMER, $selected_cat, 'search_categ', true);
|
||||
print ' ';
|
||||
print $langs->trans("SubCats") . '? ';
|
||||
print '<input type="checkbox" name="subcat" value="yes"';
|
||||
|
||||
@ -812,7 +812,7 @@ else
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>';
|
||||
print $object->getLibStatut(5);
|
||||
print $object->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
@ -1036,7 +1036,7 @@ else
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>';
|
||||
print $object->getLibStatut(5);
|
||||
print $object->getLibStatut(4);
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
// Other attributes
|
||||
|
||||
@ -970,7 +970,7 @@ class Contact extends CommonObject
|
||||
}
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($statut==0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('StatusContactDraft');
|
||||
if ($statut==0) 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 == 5)
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
@ -275,8 +275,9 @@ if ($result)
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(4,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
if ($moreforfilter)
|
||||
|
||||
@ -177,7 +177,7 @@ else
|
||||
}
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Services").'</td></tr>'."\n";
|
||||
$var=true;
|
||||
$listofstatus=array(0,4,4,5); $bool=false;
|
||||
|
||||
@ -418,7 +418,7 @@ abstract class CommonObject
|
||||
/**
|
||||
* Get array of all contacts for an object
|
||||
*
|
||||
* @param int $statut Status of lines to get (-1=all)
|
||||
* @param int $statut Status of links to get (-1=all)
|
||||
* @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user)
|
||||
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
|
||||
* @return array Array of contacts
|
||||
@ -429,9 +429,9 @@ abstract class CommonObject
|
||||
|
||||
$tab=array();
|
||||
|
||||
$sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id, ec.fk_c_type_contact"; // This field contains id of llx_socpeople or id of llx_user
|
||||
if ($source == 'internal') $sql.=", '-1' as socid";
|
||||
if ($source == 'external' || $source == 'thirdparty') $sql.=", t.fk_soc as socid";
|
||||
$sql = "SELECT ec.rowid, ec.statut as statuslink, ec.fk_socpeople as id, ec.fk_c_type_contact"; // This field contains id of llx_socpeople or id of llx_user
|
||||
if ($source == 'internal') $sql.=", '-1' as socid, t.statut as statuscontact";
|
||||
if ($source == 'external' || $source == 'thirdparty') $sql.=", t.fk_soc as socid, t.statut as statuscontact";
|
||||
$sql.= ", t.civility as civility, t.lastname as lastname, t.firstname, t.email";
|
||||
$sql.= ", tc.source, tc.element, tc.code, tc.libelle";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact tc";
|
||||
@ -463,8 +463,8 @@ abstract class CommonObject
|
||||
$libelle_type=($langs->trans($transkey)!=$transkey ? $langs->trans($transkey) : $obj->libelle);
|
||||
$tab[$i]=array('source'=>$obj->source,'socid'=>$obj->socid,'id'=>$obj->id,
|
||||
'nom'=>$obj->lastname, // For backward compatibility
|
||||
'civility'=>$obj->civility, 'lastname'=>$obj->lastname, 'firstname'=>$obj->firstname, 'email'=>$obj->email,
|
||||
'rowid'=>$obj->rowid,'code'=>$obj->code,'libelle'=>$libelle_type,'status'=>$obj->statut, 'fk_c_type_contact' => $obj->fk_c_type_contact);
|
||||
'civility'=>$obj->civility, 'lastname'=>$obj->lastname, 'firstname'=>$obj->firstname, 'email'=>$obj->email, 'statuscontact'=>$obj->statuscontact,
|
||||
'rowid'=>$obj->rowid, 'code'=>$obj->code, 'libelle'=>$libelle_type, 'status'=>$obj->statuslink, 'fk_c_type_contact'=>$obj->fk_c_type_contact);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -923,7 +923,12 @@ class ExtraFields
|
||||
}
|
||||
elseif ($type == 'chkbxlst')
|
||||
{
|
||||
$value_arr = explode(',', $value);
|
||||
if (is_array($value)) {
|
||||
$value_arr = $value;
|
||||
}
|
||||
else {
|
||||
$value_arr = explode(',', $value);
|
||||
}
|
||||
|
||||
if (is_array($param['options'])) {
|
||||
$param_list = array_keys($param['options']);
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
<?php
|
||||
/* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2006 Marc Barilley/Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
/* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2006 Marc Barilley/Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 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
|
||||
@ -4304,36 +4304,40 @@ class Form
|
||||
|
||||
/**
|
||||
* Return a HTML select string, built from an array of key+value.
|
||||
* Note: Do not use returned string into a langs->trans function, content may be entity encoded twice.
|
||||
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
|
||||
*
|
||||
* @param string $htmlname Name of html select area
|
||||
* @param array $array Array with key+value
|
||||
* @param string $id Preselected key
|
||||
* @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' ').
|
||||
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
||||
* @param int $value_as_key 1 to use value as key
|
||||
* @param string $moreparam Add more parameters onto the select tag
|
||||
* @param int $translate Translate and encode value
|
||||
* @param int $maxlen Length maximum for labels
|
||||
* @param int $disabled Html select box is disabled
|
||||
* @param int $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' = Do not sort
|
||||
* @param string $morecss Add more class to css styles
|
||||
* @param int $addjscombo Add js combo
|
||||
* @return string HTML select string.
|
||||
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
|
||||
* @param array $array Array with key+value
|
||||
* @param string|string[] $id Preselected key or preselected keys for multiselect
|
||||
* @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' ').
|
||||
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
||||
* @param int $value_as_key 1 to use value as key
|
||||
* @param string $moreparam Add more parameters onto the select tag
|
||||
* @param int $translate Translate and encode value
|
||||
* @param int $maxlen Length maximum for labels
|
||||
* @param int $disabled Html select box is disabled
|
||||
* @param int $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' = Do not sort
|
||||
* @param string $morecss Add more class to css styles
|
||||
* @param int $addjscombo Add js combo
|
||||
* @return string HTML select string.
|
||||
* @see multiselectarray
|
||||
*/
|
||||
static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
// Do we want a multiselect ?
|
||||
$multiselect = 0;
|
||||
if (preg_match('/^multi/',$htmlname)) $multiselect = 1;
|
||||
|
||||
if ($value_as_key) $array=array_combine($array, $array);
|
||||
|
||||
$out='';
|
||||
|
||||
// Add code for jquery to use multiselect
|
||||
if ($addjscombo && empty($conf->dol_use_jmobile) && (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')))
|
||||
if ($addjscombo && empty($conf->dol_use_jmobile) && $multiselect)
|
||||
{
|
||||
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
||||
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT')?constant('REQUIRE_JQUERY_MULTISELECT'):'select2':$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
||||
$out.='<!-- JS CODE TO ENABLE '.$tmpplugin.' for id '.$htmlname.' -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
@ -4393,12 +4397,11 @@ class Form
|
||||
|
||||
|
||||
/**
|
||||
* Return a HTML select string, built from an array of key+value.
|
||||
* Note: Do not use returned string into a langs->trans function, content may be entity encoded twice.
|
||||
* Return a HTML select string, built from an array of key+value but content returned into select come from an Ajax call of an URL.
|
||||
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
|
||||
*
|
||||
* @param string $url Url
|
||||
* @param string $htmlname Name of html select area
|
||||
* @param array $array Array with key+value
|
||||
* @param string $url Url
|
||||
* @param string $id Preselected key
|
||||
* @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' ').
|
||||
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
|
||||
@ -4412,7 +4415,7 @@ class Form
|
||||
* @param int $addjscombo Add js combo
|
||||
* @return string HTML select string.
|
||||
*/
|
||||
static function selectArrayAjax($url, $htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0)
|
||||
static function selectArrayAjax($htmlname, $url, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='', $addjscombo=0)
|
||||
{
|
||||
$out = '';
|
||||
|
||||
@ -4455,7 +4458,7 @@ class Form
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO get values from ajax page to use a standard already completed array
|
||||
// TODO get all values from $url into $array
|
||||
|
||||
}
|
||||
|
||||
@ -4590,7 +4593,7 @@ class Form
|
||||
|
||||
if ($rendermode == 0)
|
||||
{
|
||||
$cate_arbo = $this->select_all_categories(0, '', 'parent', 64, 0, 1);
|
||||
$cate_arbo = $this->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
|
||||
foreach($categories as $c) {
|
||||
$arrayselected[] = $c->id;
|
||||
}
|
||||
|
||||
@ -384,7 +384,7 @@ class FormOther
|
||||
}
|
||||
// Select each sales and print them in a select input
|
||||
$out.='<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
||||
if ($showempty) $out.='<option value="-1"> </option>';
|
||||
if ($showempty) $out.='<option value="0"> </option>';
|
||||
|
||||
// Get list of users allowed to be viewed
|
||||
$sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut, u.login";
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Christophe Battarel <contact@altairis.fr>
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Christophe Battarel <contact@altairis.fr>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -83,8 +84,9 @@ function societe_prepare_head(Societe $object)
|
||||
//show categorie tab
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
$type = 2;
|
||||
if ($object->fournisseur) $type = 1;
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_CUSTOMER;
|
||||
if ($object->fournisseur) $type = Categorie::TYPE_SUPPLIER;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/categories/categorie.php?socid='.$object->id."&type=".$type;
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
$head[$h][2] = 'category';
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -88,7 +89,8 @@ function contact_prepare_head(Contact $object)
|
||||
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
$type = 4;
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_CONTACT;
|
||||
$head[$tab][0] = DOL_URL_ROOT.'/categories/categorie.php?id='.$object->id."&type=".$type;
|
||||
$head[$tab][1] = $langs->trans('Categories');
|
||||
$head[$tab][2] = 'category';
|
||||
|
||||
@ -4974,21 +4974,22 @@ function dol_getmypid()
|
||||
|
||||
|
||||
/**
|
||||
* Generate natural SQL search string
|
||||
* Generate natural SQL search string for a criteria (this criteria can be tested on one or several fields)
|
||||
*
|
||||
* @param string|string[] $fields String or array of strings, filled with the name of fields in the SQL query
|
||||
* @param string|string[] $fields String or array of strings, filled with the name of all fields in the SQL query we must check (combined with a OR)
|
||||
* @param string $value The value to look for.
|
||||
* If param $numeric is 0, can contains several keywords separated with a space, like "keyword1 keyword2" = We want record field like keyword1 and field like keyword2
|
||||
* If param $numeric is 1, can contains an operator <>= like "<10" or ">=100.5 < 1000"
|
||||
* @param integer $numeric 0=value is list of keywords, 1=value is a numeric test
|
||||
* If param $mode is 0, can contains several keywords separated with a space, like "keyword1 keyword2" = We want record field like keyword1 and field like keyword2
|
||||
* If param $mode is 1, can contains an operator <, > or = like "<10" or ">=100.5 < 1000"
|
||||
* If param $mode is 2, can contains a list of id separated by comma like "1,3,4"
|
||||
* @param integer $mode 0=value is list of keywords, 1=value is a numeric test (Example ">5.5 <10"), 2=value is a list of id separated with comma (Example '1,3,4')
|
||||
* @param integer $nofinaland 1=Do now output the final 'AND'
|
||||
* @return string $res The statement to append to the SQL query
|
||||
*/
|
||||
function natural_search($fields, $value, $numeric=0, $nofinaland=0)
|
||||
function natural_search($fields, $value, $mode=0, $nofinaland=0)
|
||||
{
|
||||
global $db,$langs;
|
||||
|
||||
if ($numeric)
|
||||
if ($mode == 1)
|
||||
{
|
||||
$value=preg_replace('/([<>=]+)\s+([0-9'.preg_quote($langs->trans("DecimalSeparator"),'/').'\-])/','\1\2',$value); // Clean string '< 10' into '<10' so we can the explode on space to get all tests to do
|
||||
}
|
||||
@ -5005,7 +5006,7 @@ function natural_search($fields, $value, $numeric=0, $nofinaland=0)
|
||||
$newres = '';
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
if ($numeric)
|
||||
if ($mode == 1)
|
||||
{
|
||||
$operator='=';
|
||||
$newcrit = preg_replace('/([<>=]+)/','',trim($crit));
|
||||
@ -5029,8 +5030,13 @@ function natural_search($fields, $value, $numeric=0, $nofinaland=0)
|
||||
$i2++; // a criteria was added to string
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ($mode == 2)
|
||||
{
|
||||
$newres .= ($i2 > 0 ? ' OR ' : '') . $field . " IN (" . $db->escape(trim($crit)) . ")";
|
||||
$i2++; // a criteria was added to string
|
||||
}
|
||||
else
|
||||
{
|
||||
$newres .= ($i2 > 0 ? ' OR ' : '') . $field . " LIKE '%" . $db->escape(trim($crit)) . "%'";
|
||||
$i2++; // a criteria was added to string
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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,7 +71,9 @@ function member_prepare_head(Adherent $object)
|
||||
// Show category tab
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type=3';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_MEMBER;
|
||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
$head[$h][2] = 'category';
|
||||
$h++;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
|
||||
*
|
||||
@ -1099,7 +1099,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$categstatic=new Categorie($db);
|
||||
// recovering the list of all the categories linked to product
|
||||
$tblcateg=$categstatic->containing($idprod,0);
|
||||
$tblcateg=$categstatic->containing($idprod, Categorie::TYPE_PRODUCT);
|
||||
foreach ($tblcateg as $cate)
|
||||
{
|
||||
// Adding the descriptions if they are filled
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
/* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -60,7 +61,9 @@ function product_prepare_head($object)
|
||||
/* No more required. Replaced with new multiselect component
|
||||
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type=0';
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_PRODUCT;
|
||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
$head[$h][2] = 'category';
|
||||
$h++;
|
||||
|
||||
@ -583,11 +583,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$langs->load("commercial");
|
||||
$newmenu->add("/comm/prospect/list.php?leftmenu=prospects", $langs->trans("ListProspectsShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'prospects');
|
||||
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=1", $langs->trans("LastProspectToContact"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=1", $langs->trans("LastProspectToContact"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->rights->societe->lire);
|
||||
if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire);
|
||||
|
||||
$newmenu->add("/societe/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer);
|
||||
//$newmenu->add("/contact/list.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013-2015 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
|
||||
@ -164,6 +164,8 @@ $userstatic=new User($db);
|
||||
</div>
|
||||
<div class="tagtd">
|
||||
<?php
|
||||
$statusofcontact = $tab[$i]['status'];
|
||||
|
||||
if ($tab[$i]['source']=='internal')
|
||||
{
|
||||
$userstatic->id=$tab[$i]['id'];
|
||||
@ -182,24 +184,24 @@ $userstatic=new User($db);
|
||||
</div>
|
||||
<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.'&action=swapstatut&ligne='.$tab[$i]['rowid'].'">'; ?>
|
||||
<?php //if ($object->statut >= 0) echo '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].'">'; ?>
|
||||
<?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);
|
||||
echo $userstatic->LibStatut($tab[$i]['statuscontact'],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);
|
||||
echo $contactstatic->LibStatut($tab[$i]['statuscontact'],3);
|
||||
}
|
||||
?>
|
||||
<?php if ($object->statut >= 0) echo '</a>'; ?>
|
||||
<?php //if ($object->statut >= 0) echo '</a>'; ?>
|
||||
</div>
|
||||
<div class="tagtd nowrap" align="right">
|
||||
<?php if ($permission) { ?>
|
||||
|
||||
@ -85,7 +85,7 @@ print '<table width="100%" class="notopnoleftnoright">';
|
||||
print '<tr><td class="notopnoleft" width="30%" valign="top">';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("Statistics").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 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
|
||||
@ -20,7 +21,6 @@
|
||||
* \file htdocs/ecm/docdir.php
|
||||
* \ingroup ecm
|
||||
* \brief Main page for ECM section area
|
||||
* \author Laurent Destailleur
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -154,6 +154,8 @@ if ($action == 'create')
|
||||
|
||||
$title=$langs->trans("ECMNewSection");
|
||||
print_fiche_titre($title);
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -174,6 +176,8 @@ if ($action == 'create')
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '</table><br>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="create" value="'.$langs->trans("Create").'">';
|
||||
|
||||
@ -114,7 +114,7 @@ if ($resql)
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'</td></tr>';
|
||||
print "</tr>\n";
|
||||
foreach (array(0,1,2,3,4,5,6) as $statut)
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -167,8 +168,9 @@ if ($resql)
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(1,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
if ($moreforfilter)
|
||||
|
||||
@ -1,175 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Brice Davoleau <brice.davoleau@gmail.com>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/fourn/product/categorie.php
|
||||
* \ingroup product
|
||||
* \brief Page of products categories
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
$langs->load("categories");
|
||||
|
||||
$mesg = '';
|
||||
|
||||
if (!$user->rights->produit->lire && !$user->rights->service->lire) accessforbidden();
|
||||
|
||||
/*
|
||||
* Creation de l'objet produit correspondant a l'id
|
||||
*/
|
||||
if ($_GET["id"])
|
||||
{
|
||||
$product = new Product($db);
|
||||
$result = $product->fetch($_GET["id"]);
|
||||
}
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct0"));
|
||||
|
||||
/*
|
||||
* Fiche produit
|
||||
*/
|
||||
if ($_GET["id"])
|
||||
{
|
||||
//on veut supprimer une cat<61>gorie
|
||||
if ($_REQUEST["cat"])
|
||||
{
|
||||
$cat = new Categorie($db);
|
||||
$cat->del_product($product);
|
||||
}
|
||||
|
||||
//on veut ajouter une cat<61>gorie
|
||||
if (isset($_REQUEST["add_cat"]) && $_REQUEST["add_cat"]>=0)
|
||||
{
|
||||
$cat = new Categorie($db);
|
||||
$cat->add_product($product);
|
||||
}
|
||||
|
||||
if ( $result )
|
||||
{
|
||||
|
||||
/*
|
||||
* En mode visu
|
||||
*/
|
||||
|
||||
$h=0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/fourn/product/card.php?id=".$product->id;
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$h++;
|
||||
|
||||
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
|
||||
$head[$h][1] = $langs->trans("Stock");
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$product->id;
|
||||
$head[$h][1] = $langs->trans("Suppliers");
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/photos.php?id=".$product->id;
|
||||
$head[$h][1] = $langs->trans("Photos");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/stats/card.php?id=".$product->id;
|
||||
$head[$h][1] = $langs->trans('Statistics');
|
||||
$h++;
|
||||
|
||||
//affichage onglet cat<61>gorie
|
||||
if (! empty($conf->categorie->enabled)){
|
||||
$head[$h][0] = DOL_URL_ROOT."/fourn/product/categorie.php?id=".$product->id;
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
}
|
||||
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);
|
||||
|
||||
print($mesg);
|
||||
print '<table class="border" width="100%">';
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("Ref").'</td><td>'.$product->ref.'</td>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->label.'</td>';
|
||||
print "</table><br>\n";
|
||||
|
||||
$c = new Categorie($db);
|
||||
$cats = $c->containing($_REQUEST['id'],0);
|
||||
|
||||
if (count($cats) > 0)
|
||||
{
|
||||
print "Vous avez stock<63> le produit dans les cat<61>gorie suivantes:<br/><br/>";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("AllWays").'</td></tr>';
|
||||
|
||||
|
||||
foreach ($cats as $cat)
|
||||
{
|
||||
|
||||
$ways = $cat->print_all_ways();
|
||||
foreach ($ways as $way)
|
||||
{
|
||||
$i = !$i;
|
||||
print "<tr ".$bc[$i]."><td>".$way."</td>";
|
||||
print "<td><a href= '".DOL_URL_ROOT."/fourn/product/categorie.php?id=".$product->id."&cat=".$cat->id."'>".$langs->trans("DeleteFromCat")."</a></td></tr>\n";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
print "</table><br/><br/>\n";
|
||||
}
|
||||
else if($cats < 0)
|
||||
{
|
||||
print $langs->trans("ErrorUnknown");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoCat")."<br/><br/>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print $langs->trans("AddProductToCat")."<br/><br/>";
|
||||
print '<table class="border" width="100%">';
|
||||
print '<form method="POST" action="'.DOL_URL_ROOT.'/fourn/product/categorie.php?id='.$product->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<tr><td><select name='add_cat'><option value='-1'>".$langs->trans("Choose")."</option>";
|
||||
$cat = new Categorie($db);
|
||||
foreach ($cat->get_all_categories() as $categorie)
|
||||
{
|
||||
print "<option value='".$categorie->id."'>".$categorie->label."</option>\n";
|
||||
}
|
||||
print "</select></td><td><input type='submit' value='".$langs->trans("Select")."'></td></tr>";
|
||||
print "</form></table><br/>";
|
||||
|
||||
}
|
||||
$db->close();
|
||||
|
||||
|
||||
llxFooter();
|
||||
@ -1,153 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/product/index.php
|
||||
* \ingroup product
|
||||
* \brief Page accueil des produits et services
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Security check
|
||||
if (!$user->rights->produit->lire && !$user->rights->service->lire) accessforbidden();
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader("","",$langs->trans("ProductsAndServices"));
|
||||
|
||||
print_fiche_titre($langs->trans("ProductsAndServicesArea"));
|
||||
|
||||
print '<table border="0" width="100%">';
|
||||
|
||||
print '<tr><td valign="top" width="30%">';
|
||||
|
||||
/*
|
||||
* Zone recherche produit/service
|
||||
*/
|
||||
print '<form method="post" action="list.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print "<tr class=\"liste_titre\">\n";
|
||||
print '<td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
||||
print "<tr ".$bc[false]."><td>";
|
||||
print $langs->trans("Ref").' :</td><td><input class="flat" type="text" size="20" name="sf_ref"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print "<tr ".$bc[false]."><td>";
|
||||
print $langs->trans("Label").' :</td><td><input class="flat" type="text" size="20" name="snom"></td><td><input class="button" type="submit" value="'.$langs->trans("Search").'"></td></tr>';
|
||||
print "</table></form><br>\n";
|
||||
|
||||
/*
|
||||
* Nombre de produits et/ou services
|
||||
*/
|
||||
$prodser = array();
|
||||
$sql = "SELECT count(*), p.fk_product_type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||
$sql.= " GROUP BY p.fk_product_type";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
$prodser[$row[1]] = $row[0];
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
||||
if (! empty($conf->product->enabled))
|
||||
{
|
||||
print "<tr $bc[0]>";
|
||||
print '<td><a href="list.php?type=0">'.$langs->trans("Products").'</a></td><td>'.round($prodser[0]).'</td>';
|
||||
print "</tr>";
|
||||
}
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
print "<tr $bc[1]>";
|
||||
print '<td><a href="list.php?type=1">'.$langs->trans("Services").'</a></td><td>'.round($prodser[1]).'</td>';
|
||||
print "</tr>";
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '</td><td valign="top" width="70%">';
|
||||
|
||||
|
||||
/*
|
||||
* Derniers produits en vente
|
||||
*/
|
||||
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p ";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||
$sql.= " AND p.fk_product_type <> 1";
|
||||
$sql.= " ORDER BY p.datec DESC ";
|
||||
$sql.= $db->plimit(15, 0);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$i = 0;
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastProducts").'</td></tr>';
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td><a href=\"card.php?id=$objp->rowid\">";
|
||||
if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service");
|
||||
else print img_object($langs->trans("ShowProduct"),"product");
|
||||
print "</a> <a href=\"card.php?id=$objp->rowid\">$objp->ref</a></td>\n";
|
||||
print "<td>$objp->label</td>";
|
||||
print "<td>";
|
||||
if ($objp->fk_product_type==1) print $langs->trans('ShowService');
|
||||
else print $langs->trans('ShowProduct');
|
||||
print "</td></tr>\n";
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error();
|
||||
}
|
||||
|
||||
print '</td></tr></table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
@ -1,215 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/fourn/product/photos.php
|
||||
* \ingroup product
|
||||
* \brief Page de la fiche produit
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
if (!$user->rights->produit->lire && !$user->rights->service->lire) accessforbidden();
|
||||
|
||||
$object = new Product($db);
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
if ($id)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
|
||||
$object->add_photo($conf->product->multidir_output[$object->entity], $_FILES['photofile']);
|
||||
}
|
||||
}
|
||||
/*
|
||||
*
|
||||
*/
|
||||
llxHeader("","",$langs->trans("CardProduct0"));
|
||||
|
||||
/*
|
||||
* Fiche produit
|
||||
*/
|
||||
if ($id)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if ( $result )
|
||||
{
|
||||
/*
|
||||
* En mode visu
|
||||
*/
|
||||
|
||||
$h=0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/fourn/product/card.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$h++;
|
||||
|
||||
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans("Stock");
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/fourn/product/photos.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans("Photos");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
|
||||
//Affichage onglet Categories
|
||||
if (! empty($conf->categorie->enabled)){
|
||||
$head[$h][0] = DOL_URL_ROOT."/fourn/product/categorie.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/card.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans("CommercialCard");
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("CardProduct".$object->type).' : '.$object->ref);
|
||||
|
||||
print($mesg);
|
||||
print '<table class="border" width="100%">';
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("Ref").'</td><td>'.$object->ref.'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $object->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->label.'</td>';
|
||||
print '<td>'.$langs->trans("SellingPrice").'</td><td>'.price($object->price).'</td></tr>';
|
||||
print "</table><br>\n";
|
||||
|
||||
/*
|
||||
* Ajouter une photo
|
||||
*
|
||||
*/
|
||||
if ($action == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
print_titre($langs->trans("AddPhoto"));
|
||||
|
||||
print '<form name="userfile" action="photos.php?id='.$object->id.'" enctype="multipart/form-data" METHOD="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="max_file_size" value="'.$conf->maxfilesize.'">';
|
||||
|
||||
print '<table class="border" width="100%"><tr>';
|
||||
print '<td>'.$langs->trans("File").'</td>';
|
||||
print '<td><input type="file" name="photofile"></td></tr>';
|
||||
|
||||
print '<tr><td colspan="4" align="center">';
|
||||
print '<input type="submit" name="sendit" value="'.$langs->trans("Save").'"> ';
|
||||
|
||||
|
||||
print '<input type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
|
||||
print '</table>';
|
||||
print '</form><br>';
|
||||
}
|
||||
|
||||
|
||||
// Affiche photos
|
||||
if ($action != 'ajout_photo')
|
||||
{
|
||||
$nbphoto=0;
|
||||
$nbbyrow=5;
|
||||
|
||||
$pdir = get_exdir($object->id,2,0,0,$object,'product') . $object->id ."/photos/";
|
||||
$dir = $conf->product->multidir_output[$object->entity] . '/'. $pdir;
|
||||
|
||||
print '<br><table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
|
||||
|
||||
foreach ($object->liste_photos($dir) as $obj)
|
||||
{
|
||||
$nbphoto++;
|
||||
|
||||
// if ($nbbyrow && $nbphoto == 1) print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
|
||||
|
||||
if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print '<tr align=center valign=middle border=1>';
|
||||
if ($nbbyrow) print '<td width="'.ceil(100/$nbbyrow).'%" class="photo">';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$obj['photo']).'" alt="Taille origine" target="_blank">';
|
||||
|
||||
// Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine
|
||||
if ($obj['photo_vignette']) $filename=$obj['photo_vignette'];
|
||||
else $filename=$obj['photo'];
|
||||
print '<img border="0" height="120" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.urlencode($pdir.$filename).'">';
|
||||
|
||||
print '</a>';
|
||||
print '<br>'.$langs->trans("File").': '.dol_trunc($filename,16);
|
||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
||||
{
|
||||
print '<br><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&file='.urlencode($pdir.$filename).'">'.img_delete().'</a>';
|
||||
}
|
||||
if ($nbbyrow) print '</td>';
|
||||
if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print '</tr>';
|
||||
}
|
||||
|
||||
// Ferme tableau
|
||||
while ($nbphoto % $nbbyrow)
|
||||
{
|
||||
print '<td width="'.ceil(100/$nbbyrow).'%"> </td>';
|
||||
$nbphoto++;
|
||||
}
|
||||
|
||||
if ($nbphoto < 1)
|
||||
{
|
||||
print '<tr align=center valign=middle border=1><td class="photo">';
|
||||
print "<br>".$langs->trans("NoPhotoYet")."<br><br>";
|
||||
print '</td></tr></table>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
}
|
||||
|
||||
print "\n<div class=\"tabsAction\">\n";
|
||||
|
||||
if ($action == '')
|
||||
{
|
||||
if (($user->rights->produit->creer || $user->rights->service->creer) && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=ajout_photo&id='.$object->id.'">';
|
||||
print $langs->trans("AddPhoto").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
print "\n</div>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("ErrorUnknown");
|
||||
}
|
||||
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@ -154,7 +154,7 @@ table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
/* DOL_LDR CHANGE color: #333 !important; */
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button {
|
||||
|
||||
@ -625,16 +625,22 @@ ALTER TABLE llx_user ADD gender VARCHAR(10);
|
||||
ALTER TABLE llx_user ADD api_key VARCHAR(128) DEFAULT NULL AFTER pass_temp;
|
||||
ALTER TABLE llx_user ADD INDEX idx_user_api_key (api_key);
|
||||
|
||||
-- Deprecated fields
|
||||
ALTER TABLE llx_actioncomm DROP COLUMN datea;
|
||||
ALTER TABLE llx_actioncomm DROP INDEX idx_actioncomm_datea;
|
||||
ALTER TABLE llx_actioncomm DROP COLUMN datea2;
|
||||
|
||||
|
||||
-- Email tracking
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN email_msgid varchar(256);
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN email_from varchar(256);
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN email_sender varchar(256);
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN email_to varchar(256);
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN errors_to varchar(256);
|
||||
|
||||
-- Recuring events
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN recurid varchar(128);
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN recurrule varchar(128);
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN ecurdateend datetime;
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN recurdateend datetime;
|
||||
|
||||
ALTER TABLE llx_stcomm ADD COLUMN picto varchar(128);
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
-- ===========================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datea (datea);
|
||||
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_contact (fk_contact);
|
||||
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_code (code);
|
||||
|
||||
@ -946,7 +946,7 @@ DoNotSuggestPaymentMode=Do not suggest
|
||||
NoActiveBankAccountDefined=No active bank account defined
|
||||
OwnerOfBankAccount=Owner of bank account %s
|
||||
BankModuleNotActive=Bank accounts module not enabled
|
||||
ShowBugTrackLink=Show link "Report a bug"
|
||||
ShowBugTrackLink=Show link "<strong>%s</strong>"
|
||||
ShowWorkBoard=Show "workbench" on homepage
|
||||
Alerts=Alerts
|
||||
Delays=Delays
|
||||
|
||||
@ -1004,39 +1004,38 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
print '<!-- Includes CSS for JQuery (Ajax library) -->'."\n";
|
||||
$jquerytheme = 'smoothness';
|
||||
if (!empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;
|
||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext?'?'.$ext:'').'" />'."\n"; // JQuery
|
||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css'.($ext?'?'.$ext:'').'" />'."\n"; // JQuery
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css'.($ext?'?'.$ext:'').'" />'."\n"; // Tooltip
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext?'?'.$ext:'').'" />'."\n"; // JNotify
|
||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext?'?'.$ext:'').'">'."\n"; // JQuery
|
||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css'.($ext?'?'.$ext:'').'">'."\n"; // JQuery
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/tiptip/tipTip.css'.($ext?'?'.$ext:'').'">'."\n"; // Tooltip
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext?'?'.$ext:'').'">'."\n"; // JNotify
|
||||
/*if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) || (defined('REQUIRE_JQUERY_FILEUPLOAD') && constant('REQUIRE_JQUERY_FILEUPLOAD'))) // jQuery fileupload
|
||||
{
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/css/jquery.fileupload-ui.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/fileupload/css/jquery.fileupload-ui.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
}*/
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES) || (defined('REQUIRE_JQUERY_DATATABLES') && constant('REQUIRE_JQUERY_DATATABLES'))) // jQuery datatables
|
||||
{
|
||||
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables_jui.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColReorder/css/ColReorder.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVis.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVisAlt.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/css/TableTools.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/css/jquery.dataTables_jui.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColReorder/css/ColReorder.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVis.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVisAlt.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/css/TableTools.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
}
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) // jQuery plugin "mutiselect", "multiple-select", "select2"...
|
||||
{
|
||||
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/'.$tmpplugin.'/'.$tmpplugin.'.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/'.$tmpplugin.'/'.$tmpplugin.'.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
}
|
||||
// jQuery Timepicker
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
|
||||
{
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
}
|
||||
// jQuery jMobile
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
|
||||
{
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css'.($ext?'?'.$ext:'').'" />'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css'.($ext?'?'.$ext:'').'">'."\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print '<!-- Includes CSS for Dolibarr theme -->'."\n";
|
||||
@ -1065,7 +1064,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover','int'); }
|
||||
if (GETPOST('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile','int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile','int'); }
|
||||
//print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.$themepath.$themeparam.'">'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.$themepath.$themeparam.'">'."\n";
|
||||
if (! empty($conf->global->MAIN_FIX_FLASH_ON_CHROME)) print '<!-- Includes CSS that does not exists as workaround of flash bug of chrome -->'."\n".'<link rel="stylesheet" type="text/css" href="filethatdoesnotexiststosolvechromeflashbug">'."\n";
|
||||
|
||||
// CSS forced by modules (relative url starting with /)
|
||||
if (! empty($conf->modules_parts['css']))
|
||||
@ -1078,7 +1078,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
{
|
||||
if (empty($cssfile)) dol_syslog("Warning: module ".$modcss." declared a css path file into its descriptor that is empty.", LOG_WARNING);
|
||||
// cssfile is a relative path
|
||||
print '<!-- Includes CSS added by module '.$modcss. ' -->'."\n".'<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||
print '<!-- Includes CSS added by module '.$modcss. ' -->'."\n".'<link rel="stylesheet" type="text/css" href="'.dol_buildpath($cssfile,1);
|
||||
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
||||
if (!preg_match('/\.css$/i',$cssfile)) print $themeparam;
|
||||
print '">'."\n";
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 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
|
||||
@ -135,6 +136,8 @@ print_fiche_titre($langs->trans("CreatePoll").' (1 / 2)');
|
||||
//debut du formulaire
|
||||
print '<form name="formulaire" action="" method="POST">'."\n";
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
//Affichage des différents champs textes a remplir
|
||||
print '<table class="border" width="100%">'."\n";
|
||||
|
||||
@ -158,6 +161,8 @@ print $form->select_date($champdatefin?$champdatefin:-1,'champdatefin','','','',
|
||||
print '</tr>'."\n";
|
||||
print '</table>'."\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
//focus javascript sur le premier champ
|
||||
print '<script type="text/javascript">'."\n";
|
||||
print 'document.formulaire.titre.focus();'."\n";
|
||||
|
||||
@ -11,7 +11,8 @@
|
||||
* 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) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -974,7 +975,7 @@ else
|
||||
|
||||
// Categories
|
||||
print '<tr><td valign="top">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(0, '', 'parent', 64, 0, 1);
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
|
||||
print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, 250);
|
||||
print "</td></tr>";
|
||||
|
||||
@ -1265,9 +1266,9 @@ else
|
||||
|
||||
// Categories
|
||||
print '<tr><td valign="top">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(0, '', 'parent', 64, 0, 1);
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
|
||||
$c = new Categorie($db);
|
||||
$cats = $c->containing($object->id,0);
|
||||
$cats = $c->containing($object->id,Categorie::TYPE_PRODUCT);
|
||||
foreach($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -326,106 +327,120 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$class='pair';
|
||||
|
||||
foreach($prods_arbo as $value)
|
||||
if (count($prods_arbo))
|
||||
{
|
||||
$productstatic->id=$value['id'];
|
||||
$productstatic->type=$value['type'];
|
||||
$productstatic->label=$value['label'];
|
||||
|
||||
if ($value['level'] <= 1)
|
||||
foreach($prods_arbo as $value)
|
||||
{
|
||||
$class=($class=='impair')?'pair':'impair';
|
||||
print '<tr class="'.$class.'">';
|
||||
$productstatic->id=$value['id'];
|
||||
$productstatic->type=$value['type'];
|
||||
$productstatic->label=$value['label'];
|
||||
|
||||
$notdefined=0;
|
||||
$productstatic->ref=$value['ref'];
|
||||
$nb_of_subproduct = $value['nb'];
|
||||
|
||||
print '<td>'.$productstatic->getNomUrl(1,'composition').'</td>';
|
||||
print '<td>'.$productstatic->label.'</td>';
|
||||
|
||||
// Best buying price
|
||||
print '<td align="right">';
|
||||
if ($product_fourn->find_min_price_product_fournisseur($productstatic->id) > 0)
|
||||
if ($value['level'] <= 1)
|
||||
{
|
||||
print ' '.$langs->trans("BuyingPriceMinShort").': ';
|
||||
if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0,0);
|
||||
else { print $langs->trans("NotDefined"); $notdefined++; $atleastonenotdefined++; }
|
||||
$class=($class=='impair')?'pair':'impair';
|
||||
print '<tr class="'.$class.'">';
|
||||
|
||||
$notdefined=0;
|
||||
$productstatic->ref=$value['ref'];
|
||||
$nb_of_subproduct = $value['nb'];
|
||||
|
||||
print '<td>'.$productstatic->getNomUrl(1,'composition').'</td>';
|
||||
print '<td>'.$productstatic->label.'</td>';
|
||||
|
||||
// Best buying price
|
||||
print '<td align="right">';
|
||||
if ($product_fourn->find_min_price_product_fournisseur($productstatic->id) > 0)
|
||||
{
|
||||
print ' '.$langs->trans("BuyingPriceMinShort").': ';
|
||||
if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0,0);
|
||||
else { print $langs->trans("NotDefined"); $notdefined++; $atleastonenotdefined++; }
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
$totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT');
|
||||
$total+=$totalline;
|
||||
print '<td align="right">';
|
||||
print ($notdefined?'':($value['nb']> 1 ? $value['nb'].'x' : '').price($product_fourn->fourn_unitprice,'','',0,0,-1,$conf->currency));
|
||||
print '</td>';
|
||||
|
||||
// Stock
|
||||
if (! empty($conf->stock->enabled)) print '<td align="right">'.$value['stock'].'</td>'; // Real stock
|
||||
|
||||
// Qty + IncDec
|
||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
||||
{
|
||||
print '<td align="center"><input type="text" value="'.$nb_of_subproduct.'" name="TProduct['.$productstatic->id.'][qty]" size="4" /></td>';
|
||||
print '<td align="center"><input type="checkbox" name="TProduct['.$productstatic->id.'][incdec]" value="1" '.($value['incdec']==1?'checked':'' ).' /></td>';
|
||||
|
||||
}
|
||||
else{
|
||||
print '<td>'.$nb_of_subproduct.'</td>';
|
||||
print '<td>'.($value['incdec']==1?'x':'' ).'</td>';
|
||||
}
|
||||
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
$totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT');
|
||||
$total+=$totalline;
|
||||
print '<td align="right">';
|
||||
print ($notdefined?'':($value['nb']> 1 ? $value['nb'].'x' : '').price($product_fourn->fourn_unitprice,'','',0,0,-1,$conf->currency));
|
||||
print '</td>';
|
||||
|
||||
// Stock
|
||||
if (! empty($conf->stock->enabled)) print '<td align="right">'.$value['stock'].'</td>'; // Real stock
|
||||
|
||||
// Qty + IncDec
|
||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
||||
else // By default, we do not show this. It makes screen very difficult to understand
|
||||
{
|
||||
print '<td align="center"><input type="text" value="'.$nb_of_subproduct.'" name="TProduct['.$productstatic->id.'][qty]" size="4" /></td>';
|
||||
print '<td align="center"><input type="checkbox" name="TProduct['.$productstatic->id.'][incdec]" value="1" '.($value['incdec']==1?'checked':'' ).' /></td>';
|
||||
$hide='';
|
||||
if (empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)) $hide=' hideobject';
|
||||
|
||||
}
|
||||
else{
|
||||
print '<td>'.$nb_of_subproduct.'</td>';
|
||||
print '<td>'.($value['incdec']==1?'x':'' ).'</td>';
|
||||
}
|
||||
$class=($class=='impair')?'pair':'impair';
|
||||
print '<tr class="'.$class.$hide.'" id="sub-'.$value['id_parent'].'">';
|
||||
|
||||
print '</tr>'."\n";
|
||||
//$productstatic->ref=$value['label'];
|
||||
$productstatic->ref=$value['ref'];
|
||||
print '<td>';
|
||||
for ($i=0; $i < $value['level']; $i++) print ' '; // Add indentation
|
||||
print $productstatic->getNomUrl(1,'composition').'</td>';
|
||||
print '<td>'.$productstatic->label.'</td>';
|
||||
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
|
||||
if (! empty($conf->stock->enabled)) print '<td></td>'; // Real stock
|
||||
print '<td align="center">'.$value['nb'].'</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
}
|
||||
else // By default, we do not show this. It makes screen very difficult to understand
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
|
||||
// Minimum buying price
|
||||
print '<td class="liste_total" align="right">';
|
||||
print $langs->trans("TotalBuyingPriceMin");
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_total" align="right">';
|
||||
if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')';
|
||||
print ($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency));
|
||||
print '</td>';
|
||||
|
||||
// Stock
|
||||
if (! empty($conf->stock->enabled)) print '<td class="liste_total" align="right"> </td>';
|
||||
|
||||
print '<td align="right" colspan="2">';
|
||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
||||
{
|
||||
$hide='';
|
||||
if (empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)) $hide=' hideobject';
|
||||
|
||||
$class=($class=='impair')?'pair':'impair';
|
||||
print '<tr class="'.$class.$hide.'" id="sub-'.$value['id_parent'].'">';
|
||||
|
||||
//$productstatic->ref=$value['label'];
|
||||
$productstatic->ref=$value['ref'];
|
||||
print '<td>';
|
||||
for ($i=0; $i < $value['level']; $i++) print ' '; // Add indentation
|
||||
print $productstatic->getNomUrl(1,'composition').'</td>';
|
||||
print '<td>'.$productstatic->label.'</td>';
|
||||
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
|
||||
if (! empty($conf->stock->enabled)) print '<td></td>'; // Real stock
|
||||
print '<td align="center">'.$value['nb'].'</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Save').'">';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
|
||||
// Minimum buying price
|
||||
print '<td class="liste_total" align="right">';
|
||||
print $langs->trans("TotalBuyingPriceMin");
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_total" align="right">';
|
||||
if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')';
|
||||
print ($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency));
|
||||
print '</td>';
|
||||
|
||||
// Stock
|
||||
if (! empty($conf->stock->enabled)) print '<td class="liste_total" align="right"> </td>';
|
||||
|
||||
print '<td align="right" colspan="2">';
|
||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
||||
else
|
||||
{
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Save').'">';
|
||||
$colspan=6;
|
||||
if (! empty($conf->stock->enabled)) $colspan++;
|
||||
|
||||
print '<tr>';
|
||||
print '<td colspan="'.$colspan.'">'.$langs->trans("None").'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
/*if($user->rights->produit->creer || $user->rights->service->creer) {
|
||||
@ -458,8 +473,9 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
print '<tr><td>'.$langs->trans("CategoryFilter").' </td>';
|
||||
print '<td class="maxwidthonsmartphone">'.$form->select_all_categories(0, $parent).'</td></tr>';
|
||||
print '<td class="maxwidthonsmartphone">'.$form->select_all_categories(Categorie::TYPE_PRODUCT, $parent).'</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012-2013 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Adolfo segura <adolfo.segura@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012-2013 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Adolfo segura <adolfo.segura@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
@ -292,7 +292,7 @@ else
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(0,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
if ($moreforfilter)
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -221,7 +222,7 @@ if ($resql)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(0,$search_categ,'search_categ');
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ');
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
$moreforfilter.=$langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock?' checked':'').'>';
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -233,7 +234,7 @@ if ($resql)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(0,$search_categ,'search_categ');
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ');
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
//$moreforfilter.=$langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock?' checked':'').'>';
|
||||
|
||||
@ -66,8 +66,8 @@ else
|
||||
<h1>
|
||||
This page is a sample of page using tables. It is designed to make test with<br>
|
||||
- css (add parameter &theme=newtheme to test another theme or edit css of current theme)<br>
|
||||
- jmobile (add parameter dol_use_jmobile=1&dol_optimize_smallscreen=1 to enable view with jmobile)<br>
|
||||
- no javascript / usage for bind people (add parameter nojs=1 to force disable javascript)<br>
|
||||
- jmobile (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?dol_use_jmobile=1&dol_optimize_smallscreen=1'; ?>">dol_use_jmobile=1&dol_optimize_smallscreen=1</a> to enable view with jmobile)<br>
|
||||
- no javascript / usage for bind people (add parameter <a href="<?php echo $_SERVER["PHP_SELF"].'?nojs=1'; ?>">nojs=1</a> to force disable javascript)<br>
|
||||
- dataTables<br>
|
||||
- tablednd<br>
|
||||
</h1>
|
||||
|
||||
@ -51,7 +51,7 @@ print "Test 4c: a select with ajax refresh<br>\n";
|
||||
//$array=array(0=>'',1=>'Search into xxx',2=>'Search into yyy',3=>'Search into zzz');
|
||||
$array=array();
|
||||
$selected=-1;
|
||||
print $form->selectArrayAjax(DOL_URL_ROOT.'/core/ajax/selecsearchbox.php', 'testselectc', $array, $selected, 1, 0, 0, 'style="min-width: 250px;"', 0, 0, 0, '', '', 1);
|
||||
print $form->selectArrayAjax('testselectc', DOL_URL_ROOT.'/core/ajax/selecsearchbox.php', $selected, 1, 0, 0, 'style="min-width: 250px;"', 0, 0, 0, '', '', 1);
|
||||
*/
|
||||
|
||||
print '<br><br>'."\n";
|
||||
|
||||
@ -1,16 +1,17 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2003 Brian Fraval <brian@fraval.org>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2003 Brian Fraval <brian@fraval.org>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -1334,11 +1335,11 @@ class Societe extends CommonObject
|
||||
// Fill $toute_categs array with an array of (type => array of ("Categorie" instance))
|
||||
if ($this->client || $this->prospect)
|
||||
{
|
||||
$toute_categs ['societe'] = $static_cat->containing($this->id,2);
|
||||
$toute_categs ['societe'] = $static_cat->containing($this->id,Categorie::TYPE_CUSTOMER);
|
||||
}
|
||||
if ($this->fournisseur)
|
||||
{
|
||||
$toute_categs ['fournisseur'] = $static_cat->containing($this->id,1);
|
||||
$toute_categs ['fournisseur'] = $static_cat->containing($this->id,Categorie::TYPE_SUPPLIER);
|
||||
}
|
||||
|
||||
// Remove each "Categorie"
|
||||
@ -2747,7 +2748,7 @@ class Societe extends CommonObject
|
||||
$this->SupplierCategories = array();
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
||||
$sql.= " WHERE type = 1";
|
||||
$sql.= " WHERE type = ".Categorie::TYPE_SUPPLIER;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Charles-Fr Benke <charles.fr@benke.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2014 Charles-Fr Benke <charles.fr@benke.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
@ -135,7 +135,7 @@ if ($result)
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<table class="noborder nohover" width="100%">'."\n";
|
||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").'</th></tr>';
|
||||
if (! empty($conf->use_javascript_ajax) && ((round($third['prospect'])?1:0)+(round($third['customer'])?1:0)+(round($third['supplier'])?1:0)+(round($third['other'])?1:0) >= 2))
|
||||
{
|
||||
|
||||
@ -1012,7 +1012,7 @@ else
|
||||
|
||||
// Address
|
||||
print '<tr><td valign="top"><label for="address">'.$langs->trans('Address').'</label></td>';
|
||||
print '<td colspan="3"><textarea name="address" id="address" cols="40" rows="3" wrap="soft">';
|
||||
print '<td colspan="3"><textarea name="address" id="address" cols="80" rows="'._ROWS_2.'" wrap="soft">';
|
||||
print $object->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
@ -2259,7 +2259,7 @@ else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="soc.php?action=merge&socid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("MergeThirdparties")).'">'.$langs->trans('Merge').'</a></div>';
|
||||
}
|
||||
|
||||
|
||||
if ($user->rights->societe->supprimer)
|
||||
{
|
||||
if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) // We can't use preloaded confirm form with jmobile
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -311,7 +311,7 @@ if ($resql)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(2,$search_categ,'search_categ');
|
||||
$moreforfilter.=$htmlother->select_categories(Categories::TYPE_CUSTOMER,$search_categ,'search_categ');
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 130 B |
@ -261,6 +261,11 @@ input, textarea, select {
|
||||
margin-bottom:1px;
|
||||
margin-top:1px;
|
||||
}
|
||||
input.removedassigned {
|
||||
padding: 2px !important;
|
||||
vertical-align: text-bottom;
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
select.flat, form.flat select {
|
||||
@ -1037,8 +1042,8 @@ div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
|
||||
border-right: 1px solid #BBB;
|
||||
border-bottom: 1px solid #BBB;
|
||||
border-top: 1px solid #BBB;
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-moz-box-shadow: 3px 3px 4px #DDD;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||
box-shadow: 3px 3px 4px #DDD;
|
||||
@ -1061,8 +1066,8 @@ div.blockvmenusearch
|
||||
border-right: 1px solid #CCC;
|
||||
border-bottom: 1px solid #CCC;
|
||||
border-top: 1px solid #CCC;
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-moz-box-shadow: 3px 3px 4px #DDD;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||
box-shadow: 3px 3px 4px #DDD;
|
||||
@ -1142,9 +1147,9 @@ td.photo {
|
||||
background-repeat: repeat-x !important;
|
||||
border: 1px solid #CCC !important;
|
||||
|
||||
-moz-border-radius: 5px 5px 5px 5px !important;
|
||||
-webkit-border-radius: 5px 5px 5px 5px !important;
|
||||
border-radius: 5px 5px 5px 5px !important;
|
||||
-moz-border-radius: 4px 4px 4px 4px !important;
|
||||
-webkit-border-radius: 4px 4px 4px 4px !important;
|
||||
border-radius: 4px 4px 4px 4px !important;
|
||||
-moz-box-shadow: 2px 2px 4px #DDD;
|
||||
-webkit-box-shadow: 2px 2px 4px #DDD;
|
||||
box-shadow: 2px 2px 4px #DDD;
|
||||
@ -1377,9 +1382,9 @@ div.tabBar {
|
||||
padding-right: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px;
|
||||
padding-bottom: <?php echo ($dol_optimize_smallscreen?'4':'12'); ?>px;
|
||||
margin: 0px 0px 14px 0px;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border-right: 1px solid #AAA;
|
||||
border-bottom: 1px solid #AAA;
|
||||
border-left: 1px solid #AAA;
|
||||
@ -1433,7 +1438,14 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
border-left: 1px solid #BBB;
|
||||
border-top: 1px solid #CCC;
|
||||
*/
|
||||
|
||||
|
||||
border-right: 1px solid transparent;
|
||||
border-left: 1px solid transparent;
|
||||
border-top: 1px solid transparent;
|
||||
-moz-border-radius:4px 4px 0 0;
|
||||
-webkit-border-radius: 4px 4px 0 0;
|
||||
border-radius: 4px 4px 0 0;
|
||||
|
||||
background-image: none !important;
|
||||
}
|
||||
|
||||
@ -1447,6 +1459,9 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
border-right: 1px solid #AAA !important;
|
||||
border-left: 1px solid #AAA !important;
|
||||
border-top: 1px solid #BBB !important;
|
||||
-moz-border-radius:4px 4px 0 0;
|
||||
-webkit-border-radius: 4px 4px 0 0;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
a.tab:hover
|
||||
{
|
||||
@ -1475,9 +1490,9 @@ span.tabspan {
|
||||
margin: 0em 0.2em;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
-moz-border-radius:6px 6px 0px 0px;
|
||||
-webkit-border-radius:6px 6px 0px 0px;
|
||||
border-radius:6px 6px 0px 0px;
|
||||
-moz-border-radius:4px 4px 0px 0px;
|
||||
-webkit-border-radius:4px 4px 0px 0px;
|
||||
border-radius:4px 4px 0px 0px;
|
||||
|
||||
border-<?php print $right; ?>: 1px solid #555555;
|
||||
border-<?php print $left; ?>: 1px solid #D8D8D8;
|
||||
@ -1517,7 +1532,7 @@ div.divButAction { margin-bottom: 1.4em; }
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
*/
|
||||
|
||||
|
||||
font-weight: normal;
|
||||
border-color: #c5c5c5;
|
||||
border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
|
||||
@ -1960,6 +1975,9 @@ div.pagination li.pagination span {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.pagination li.pagination span.inactive {
|
||||
cursor: default;
|
||||
}
|
||||
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
||||
div.pagination li a,
|
||||
div.pagination li span {
|
||||
@ -2043,7 +2061,7 @@ div.pagination li.paginationafterarrows {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/* Set the color for hover lines */
|
||||
.odd:hover, .impair:hover, .even:hover, .pair:hover, .even:hover, .pair:hover, table.dataTable tr.even:hover, table.dataTable tr.odd:hover
|
||||
{
|
||||
<?php if ($colorbacklinepairhover) { if ($colorbacklinepairhover > 0) { ?>
|
||||
@ -2055,7 +2073,6 @@ div.pagination li.paginationafterarrows {
|
||||
|
||||
.odd, .impair, .nohover .odd:hover, .nohover .impair:hover, tr.odd td.nohover, tr.impair td.nohover {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
border: 0px;
|
||||
margin-bottom: 1px;
|
||||
color: #202020;
|
||||
min-height: 18px; /* seems to not be used */
|
||||
@ -2068,15 +2085,21 @@ div.pagination li.paginationafterarrows {
|
||||
|
||||
.even, .pair, .nohover .even:hover, .nohover .pair:hover, tr.even td.nohover, tr.pair td.nohover {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
border: 0px;
|
||||
margin-bottom: 1px;
|
||||
color: #202020;
|
||||
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
table.dataTable tr.odd {
|
||||
background-color: #f9f9f9 !important;
|
||||
}
|
||||
|
||||
/* For no hover style */
|
||||
table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
table.dataTable td {
|
||||
padding: 5px 2px 5px 3px !important;
|
||||
}
|
||||
@ -2220,7 +2243,7 @@ div.tabBar .noborder {
|
||||
margin-bottom: 8px !important;*/
|
||||
border: 1px solid #AAA;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.boxtable {
|
||||
@ -2317,9 +2340,9 @@ div.warning {
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
margin: 0.5em 0em 0.5em 0em;
|
||||
border: 1px solid #e0d0b0;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background: #EFDF9A;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
@ -2329,9 +2352,9 @@ div.error {
|
||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||
margin: 0.5em 0em 0.5em 0em;
|
||||
border: 1px solid #DC9CAB;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background: #EFCFCF;
|
||||
}
|
||||
|
||||
@ -2341,9 +2364,9 @@ div.info {
|
||||
padding: 0.4em 0.4em 0.4em 0.4em;
|
||||
margin: 0.5em 0em 0.5em 0em;
|
||||
border: 1px solid #DFBF9A;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius:6px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background: #EFCFAA;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
@ -2506,9 +2529,9 @@ table.valid {
|
||||
z-index: 3000;
|
||||
background-color: #FFF;
|
||||
opacity: 1;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#tiptip_content {
|
||||
background-color: rgb(255,255,255);
|
||||
@ -3131,6 +3154,7 @@ div.dolEventError h1, div.dolEventError h2 {
|
||||
/* ============================================================================== */
|
||||
/* Datatable */
|
||||
/* ============================================================================== */
|
||||
|
||||
table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
|
||||
background: none !important;
|
||||
}
|
||||
@ -3138,6 +3162,14 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
|
||||
.sorting_desc { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_desc.png',1); ?>') no-repeat center right !important; }
|
||||
.sorting_asc_disabled { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_asc_disabled.png',1); ?>') no-repeat center right !important; }
|
||||
.sorting_desc_disabled { background: url('<?php echo dol_buildpath('/theme/'.$theme.'/img/sort_desc_disabled.png',1); ?>') no-repeat center right !important; }
|
||||
.dataTables_paginate {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.paginate_button_disabled {
|
||||
opacity: 1 !important;
|
||||
color: #888 !important;
|
||||
cursor: default !important;
|
||||
}
|
||||
.paginate_disabled_previous:hover, .paginate_enabled_previous:hover, .paginate_disabled_next:hover, .paginate_enabled_next:hover
|
||||
{
|
||||
font-weight: normal;
|
||||
@ -3146,10 +3178,36 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 {
|
||||
{
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
.paginate_active
|
||||
{
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
.paginate_button
|
||||
{
|
||||
font-weight: normal !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.paging_full_numbers {
|
||||
height: inherit !important;
|
||||
}
|
||||
.paging_full_numbers a.paginate_active:hover, .paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #DDD !important;
|
||||
}
|
||||
.paging_full_numbers, .paging_full_numbers a.paginate_active, .paging_full_numbers a.paginate_button {
|
||||
background-color: #FFF !important;
|
||||
border-radius: inherit !important;
|
||||
}
|
||||
.paging_full_numbers a.paginate_button_disabled:hover {
|
||||
background-color: #FFF !important;
|
||||
}
|
||||
.paginate_button, .paginate_active {
|
||||
border: 1px solid #ddd !important;
|
||||
padding: 6px 12px !important;
|
||||
margin-left: -1px !important;
|
||||
line-height: 1.42857143 !important;
|
||||
margin: 0 0 !important;
|
||||
}
|
||||
|
||||
/* For jquery plugin combobox */
|
||||
/* Disable this. It breaks wrapping of boxes
|
||||
.ui-corner-all { white-space: nowrap; } */
|
||||
|
||||
@ -1474,7 +1474,6 @@ else
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a></div>';
|
||||
print '<div class="inline-block divButAction"><button class="btn btn-primary" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</button></div>';
|
||||
}
|
||||
}
|
||||
elseif ($caneditpassword && ! $object->ldap_sid &&
|
||||
|
||||
Loading…
Reference in New Issue
Block a user