Merge branch 'develop' of git://github.com/Dolibarr/dolibarr into api_rest

Conflicts:
	htdocs/install/mysql/migration/3.7.0-3.8.0.sql
This commit is contained in:
jfefe 2015-05-06 01:00:11 +02:00
commit 24bf614061
43 changed files with 132 additions and 82 deletions

View File

@ -66,7 +66,7 @@ $myproduct=new Product($db);
// Definition of product instance properties // Definition of product instance properties
$myproduct->ref = '1234'; $myproduct->ref = '1234';
$myproduct->libelle = 'libelle'; $myproduct->label = 'label';
$myproduct->price = '10'; $myproduct->price = '10';
$myproduct->price_base_type = 'HT'; $myproduct->price_base_type = 'HT';
$myproduct->tva_tx = '19.6'; $myproduct->tva_tx = '19.6';

View File

@ -88,7 +88,7 @@ for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++)
$produit->type = rand(0,1); $produit->type = rand(0,1);
$produit->status = 1; $produit->status = 1;
$produit->ref = ($produit->type?'S':'P').time().$s; $produit->ref = ($produit->type?'S':'P').time().$s;
$produit->libelle = 'Label '.time().$s; $produit->label = 'Label '.time().$s;
$produit->description = 'Description '.time().$s; $produit->description = 'Description '.time().$s;
$produit->price = rand(1,1000); $produit->price = rand(1,1000);
$produit->tva_tx = "19.6"; $produit->tva_tx = "19.6";

View File

@ -357,7 +357,7 @@ else if ($id || $ref)
print '</tr>'; print '</tr>';
// Label // Label
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->label.'</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -37,7 +37,7 @@ $action=GETPOST('action');
$confirm=GETPOST('confirm'); $confirm=GETPOST('confirm');
$socid=GETPOST('socid','int'); $socid=GETPOST('socid','int');
$nom=GETPOST('nom'); $label=GETPOST('label');
$description=GETPOST('description'); $description=GETPOST('description');
$visible=GETPOST('visible'); $visible=GETPOST('visible');
$parent=GETPOST('parent'); $parent=GETPOST('parent');
@ -66,7 +66,7 @@ if ($action == 'update' && $user->rights->categorie->creer)
$categorie = new Categorie($db); $categorie = new Categorie($db);
$result=$categorie->fetch($id); $result=$categorie->fetch($id);
$categorie->label = $nom; $categorie->label = $label;
$categorie->description = dol_htmlcleanlastbr($description); $categorie->description = dol_htmlcleanlastbr($description);
$categorie->socid = ($socid ? $socid : 'null'); $categorie->socid = ($socid ? $socid : 'null');
$categorie->visible = $visible; $categorie->visible = $visible;
@ -138,13 +138,13 @@ print '<table class="border" width="100%">';
// Ref // Ref
print '<tr><td class="fieldrequired">'; print '<tr><td class="fieldrequired">';
print $langs->trans("Ref").'</td>'; print $langs->trans("Ref").'</td>';
print '<td><input type="text" size="25" id="nom" name ="nom" value="'.$object->label.'" />'; print '<td><input type="text" size="25" id="label" name ="label" value="'.$object->label.'" />';
print '</tr>'; print '</tr>';
// Description // Description
print '<tr>'; print '<tr>';
print '<td width="25%">'.$langs->trans("Description").'</td>'; print '<td class="fieldrequired" width="25%">'.$langs->trans("Description").'</td>';
print '<td>'; print '<td >';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50); $doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50);
$doleditor->Create(); $doleditor->Create();

View File

@ -327,7 +327,7 @@ if ($object->type == 0)
print '<td class="nowrap" valign="top">'; print '<td class="nowrap" valign="top">';
print $prod->getNomUrl(1,'category'); print $prod->getNomUrl(1,'category');
print "</td>\n"; print "</td>\n";
print '<td valign="top">'.$prod->libelle."</td>\n"; print '<td valign="top">'.$prod->label."</td>\n";
// Link to delete from category // Link to delete from category
print '<td align="right">'; print '<td align="right">';
$typeid=$object->type; $typeid=$object->type;

View File

@ -1402,7 +1402,7 @@ class Commande extends CommonOrder
$line->localtax1_tx=$localtax1_tx; $line->localtax1_tx=$localtax1_tx;
$line->localtax2_tx=$localtax2_tx; $line->localtax2_tx=$localtax2_tx;
$line->ref=$prod->ref; $line->ref=$prod->ref;
$line->libelle=$prod->libelle; $line->libelle=$prod->label;
$line->product_desc=$prod->description; $line->product_desc=$prod->description;
$line->fk_unit=$prod->fk_unit; $line->fk_unit=$prod->fk_unit;

View File

@ -34,6 +34,7 @@ function categories_prepare_head($object,$type)
global $langs, $conf, $user; global $langs, $conf, $user;
$langs->load("categories"); $langs->load("categories");
$langs->load("products");
$h = 0; $h = 0;
$head = array(); $head = array();

View File

@ -426,7 +426,7 @@ class ExportExcel extends ModeleExports
$this->workbook->disconnectWorksheets(); $this->workbook->disconnectWorksheets();
unset($this->workbook); unset($this->workbook);
} }
return 0; return 1;
} }

View File

@ -95,7 +95,7 @@ class ExportExcel2007 extends ExportExcel
$this->workbook->disconnectWorksheets(); $this->workbook->disconnectWorksheets();
unset($this->workbook); unset($this->workbook);
} }
return 0; return 1;
} }
} }

View File

@ -992,7 +992,7 @@ if ($step == 4 && $datatoexport)
if ($step == 5 && $datatoexport) if ($step == 5 && $datatoexport)
{ {
asort($array_selected); asort($array_selected);
llxHeader('',$langs->trans("NewExport"),'EN:Module_Exports_En|FR:Module_Exports|ES:M&oacute;dulo_Exportaciones'); llxHeader('',$langs->trans("NewExport"),'EN:Module_Exports_En|FR:Module_Exports|ES:M&oacute;dulo_Exportaciones');
@ -1142,6 +1142,7 @@ if ($step == 5 && $datatoexport)
print '</td><td width="50%">&nbsp;</td></tr>'; print '</td><td width="50%">&nbsp;</td></tr>';
print '</table>'; print '</table>';
} }
print '<br>'; print '<br>';
@ -1150,6 +1151,8 @@ llxFooter();
$db->close(); $db->close();
exit; // don't know why but apache hangs with php 5.3.10-1ubuntu3.12 and apache 2.2.2 if i remove this exit or replace with return
/** /**
* Return table name of an alias. For this, we look for the "tablename as alias" in sql string. * Return table name of an alias. For this, we look for the "tablename as alias" in sql string.
@ -1172,4 +1175,3 @@ function getablenamefromfield($code,$sqlmaxforexport)
} }
else return ''; else return '';
} }

View File

@ -317,7 +317,7 @@ if (empty($reshook))
{ {
$res=$productsupplier->fetch($idprod); $res=$productsupplier->fetch($idprod);
$label = $productsupplier->libelle; $label = $productsupplier->label;
$desc = $productsupplier->description; $desc = $productsupplier->description;
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc); if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);

View File

@ -690,7 +690,7 @@ if (empty($reshook))
{ {
$result=$productsupplier->fetch($idprod); $result=$productsupplier->fetch($idprod);
$label = $productsupplier->libelle; $label = $productsupplier->label;
$desc = $productsupplier->description; $desc = $productsupplier->description;
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc); if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);

View File

@ -115,7 +115,7 @@ if ($_GET["id"])
print "<tr>"; print "<tr>";
print '<td>'.$langs->trans("Ref").'</td><td>'.$product->ref.'</td>'; print '<td>'.$langs->trans("Ref").'</td><td>'.$product->ref.'</td>';
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->label.'</td>';
print "</table><br>\n"; print "</table><br>\n";
$c = new Categorie($db); $c = new Categorie($db);

View File

@ -102,7 +102,7 @@ if ($id)
print '<td colspan="2">'; print '<td colspan="2">';
print $object->getLibStatut(2); print $object->getLibStatut(2);
print '</td></tr>'; print '</td></tr>';
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->label.'</td>';
print '<td>'.$langs->trans("SellingPrice").'</td><td>'.price($object->price).'</td></tr>'; print '<td>'.$langs->trans("SellingPrice").'</td><td>'.price($object->price).'</td></tr>';
print "</table><br>\n"; print "</table><br>\n";

View File

@ -608,4 +608,9 @@ ALTER TABLE llx_user ADD INDEX idx_user_api_key (api_key);
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);

View File

@ -24,15 +24,12 @@ create table llx_actioncomm
( (
id integer AUTO_INCREMENT PRIMARY KEY, id integer AUTO_INCREMENT PRIMARY KEY,
ref_ext varchar(128), ref_ext varchar(128),
entity integer DEFAULT 1 NOT NULL, -- multi company id entity integer DEFAULT 1 NOT NULL, -- multi company id
datep datetime, -- date start datep datetime, -- date start
datep2 datetime, -- date end datep2 datetime, -- date end
datea datetime, -- deprecated
datea2 datetime, -- deprecated
fk_action integer, -- type of action (optional link with llx_c_actioncomm or null) fk_action integer, -- type of action (optional link with id in llx_c_actioncomm or null)
code varchar(32) NULL, -- code of action for automatic action code varchar(32) NULL, -- code of action for automatic action ('AC_OTH_AUTO' for automatic actions, 'AC_EMAILIN_AUTO' for email input, 'AC_xxx' for manual action...)
label varchar(128) NOT NULL, -- label/title of event
datec datetime, -- date creation datec datetime, -- date creation
tms timestamp, -- date modification tms timestamp, -- date modification
@ -44,7 +41,7 @@ create table llx_actioncomm
fk_contact integer, fk_contact integer,
fk_parent integer NOT NULL default 0, fk_parent integer NOT NULL default 0,
fk_user_action integer, -- user id of owner of action (currently also user id of actor that must do action. In future, actors assigned to action will be an array into table llx_actioncomm_resources) fk_user_action integer, -- user id of owner of action (note that assigned users to event are store into another table)
transparency integer, -- transparency (ical standard). used to say if user assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_resources) transparency integer, -- transparency (ical standard). used to say if user assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_resources)
fk_user_done integer, -- user id of user that has made action (deprecated) fk_user_done integer, -- user id of user that has made action (deprecated)
@ -55,8 +52,15 @@ create table llx_actioncomm
percent smallint NOT NULL default 0, percent smallint NOT NULL default 0,
location varchar(128), location varchar(128),
durationp real, -- planed duration durationp real, -- planed duration
durationa real, -- deprecated
note text, label varchar(256) NOT NULL, -- label/title of event or topic of email
note text, -- note of event or content of email
email_msgid varchar(256), -- when event was an email, we store here the msgid
email_from varchar(256), -- when event was an email, we store here the from
email_sender varchar(256), -- when event was an email, we store here the sender
email_to varchar(256), -- when event was an email, we store here the email_to
errors_to varchar(256), -- when event was an email, we store here the erros_to
fk_element integer DEFAULT NULL, fk_element integer DEFAULT NULL,
elementtype varchar(32) DEFAULT NULL elementtype varchar(32) DEFAULT NULL

View File

@ -263,7 +263,7 @@ if ($result)
$product_static->type=$objp->fk_product_type; $product_static->type=$objp->fk_product_type;
$product_static->id=$objp->rowid; $product_static->id=$objp->rowid;
$product_static->ref=$objp->ref; $product_static->ref=$objp->ref;
$product_static->libelle=$objp->label; $product_static->label=$objp->label;
$text=$product_static->getNomUrl(1); $text=$product_static->getNomUrl(1);
print $text.= ' - '.$objp->label; print $text.= ' - '.$objp->label;
print "</td>\n"; print "</td>\n";

View File

@ -92,7 +92,7 @@ if ($id > 0 || ! empty($ref))
print '</tr>'; print '</tr>';
// Libelle // Libelle
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->label.'</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -214,7 +214,7 @@ $adresseadmin=$object->mail_admin;
print $langs->trans("Title") .'</td><td colspan="2">'; print $langs->trans("Title") .'</td><td colspan="2">';
if ($action == 'edit') if ($action == 'edit')
{ {
print '<input type="text" name="nouveautitre" size="40" value="'.dol_escape_htmltag(dol_htmlentities($object->titre)).'">'; print '<input type="text" name="nouveautitre" style="width: 95%" value="'.dol_escape_htmltag(dol_htmlentities($object->titre)).'">';
} }
else print dol_htmlentities($object->titre); else print dol_htmlentities($object->titre);
print '</td></tr>'; print '</td></tr>';
@ -310,14 +310,26 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
$url=$urlwithouturlroot.dol_buildpath('/public/opensurvey/studs.php',1).'?sondage='.$object->id_sondage; $url=$urlwithouturlroot.dol_buildpath('/public/opensurvey/studs.php',1).'?sondage='.$object->id_sondage;
$urllink='<a href="'.$url.'" target="_blank">'.$url.'</a>'; $urllink='<input type="text" style="width: 60%" '.($action == 'edit' ? 'disabled="disabled"' : '').' id="opensurveyurl" name="opensurveyurl" value="'.$url.'">';
print $urllink; print $urllink;
if ($action != 'edit')
{
print '<script type="text/javascript">
jQuery(document).ready(function () {
jQuery("#opensurveyurl").focus(function() { jQuery(this).select(); } );
});
</script>';
print ' <a href="'.$url.'" target="_blank">'.$langs->trans("Link").'</a>';
}
print '</table>'; print '</table>';
dol_fiche_end(); dol_fiche_end();
if ($action == 'edit') print '<div class="center"><input type="submit" class="button" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></div>'; if ($action == 'edit')
{
print '<div class="center"><input type="submit" class="button" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></div>';
}
print '</form>'."\n"; print '</form>'."\n";

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
@ -51,6 +51,8 @@ background: #f78d1d;
background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20)); background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));
background: -moz-linear-gradient(top, #faa51a, #f47a20); background: -moz-linear-gradient(top, #faa51a, #f47a20);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
margin-left: 4px;
margin-right: 4px;
} }
.orange:active { .orange:active {
color: #fcd3a5; color: #fcd3a5;
@ -73,6 +75,8 @@ background: #0095cd;
background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5)); background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5));
background: -moz-linear-gradient(top, #00adee, #0078a5); background: -moz-linear-gradient(top, #00adee, #0078a5);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5'); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5');
margin-left: 4px;
margin-right: 4px;
} }
.blue:active { .blue:active {
color: #80bed6; color: #80bed6;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -48,8 +48,8 @@ print '<div class="center">';
print '<p>'.$langs->trans("OrganizeYourMeetingEasily").'</p>'; print '<p>'.$langs->trans("OrganizeYourMeetingEasily").'</p>';
print '<div class="corps">'; print '<div class="corps">';
print '<br>'; print '<br>';
print '<div class="index_date"><div><img class="opacity" src="../img/date.png" onclick="document.formulaire.date.click()"></div><button id="date" name="choix_sondage" value="date" type="submit" class="button orange bigrounded"><img src="../img/calendar-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'"><strong>&nbsp;'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'</strong></button></div>'; print '<div class="index_date"><div><img class="opacity imgopensurveywizard" src="../img/date.png" onclick="document.formulaire.date.click()"></div><button id="date" name="choix_sondage" value="date" type="submit" class="button orange bigrounded"><img src="../img/calendar-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'" style="padding-right: 4px">'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'</button></div>';
print '<div class="index_sondage"><div><img class="opacity" src="../img/sondage2.png" onclick="document.formulaire.autre.click()"></div><button id="autre" name="choix_sondage" value="autre" type="submit" class="button blue bigrounded"><img src="../img/chart-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'"><strong>&nbsp;'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'</strong></button></div><div style="clear:both;"></div>'; print '<div class="index_sondage"><div><img class="opacity imgopensurveywizard" src="../img/sondage2.png" onclick="document.formulaire.autre.click()"></div><button id="autre" name="choix_sondage" value="autre" type="submit" class="button blue bigrounded"><img src="../img/chart-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'" style="padding-right: 4px">'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'</button></div><div style="clear:both;"></div>';
print '</div>'; print '</div>';
print '</div></form>'; print '</div></form>';

View File

@ -169,7 +169,7 @@ if (empty($reshook))
{ {
$error=0; $error=0;
if (! GETPOST('libelle')) if (! GETPOST('label'))
{ {
setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('Label')), 'errors'); setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('Label')), 'errors');
$action = "create"; $action = "create";
@ -187,7 +187,7 @@ if (empty($reshook))
$units = GETPOST('units', 'int'); $units = GETPOST('units', 'int');
$object->ref = $ref; $object->ref = $ref;
$object->libelle = GETPOST('libelle'); $object->label = GETPOST('label');
$object->price_base_type = GETPOST('price_base_type'); $object->price_base_type = GETPOST('price_base_type');
if ($object->price_base_type == 'TTC') if ($object->price_base_type == 'TTC')
@ -315,7 +315,7 @@ if (empty($reshook))
$object->oldcopy=dol_clone($object); $object->oldcopy=dol_clone($object);
$object->ref = $ref; $object->ref = $ref;
$object->libelle = GETPOST('libelle'); $object->label = GETPOST('label');
$object->description = dol_htmlcleanlastbr(GETPOST('desc')); $object->description = dol_htmlcleanlastbr(GETPOST('desc'));
$object->url = GETPOST('url'); $object->url = GETPOST('url');
$object->note = dol_htmlcleanlastbr(GETPOST('note')); $object->note = dol_htmlcleanlastbr(GETPOST('note'));
@ -822,7 +822,7 @@ else
print '</td></tr>'; print '</td></tr>';
// Label // Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="libelle" size="40" maxlength="255" value="'.dol_escape_htmltag(GETPOST('libelle')).'"></td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" size="40" maxlength="255" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>';
// On sell // On sell
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">'; print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
@ -1085,7 +1085,7 @@ else
print '<tr><td width="20%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" size="32" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>'; print '<tr><td width="20%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" size="32" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>';
// Label // Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="libelle" size="40" maxlength="255" value="'.dol_escape_htmltag($object->libelle).'"></td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" size="40" maxlength="255" value="'.dol_escape_htmltag($object->label).'"></td></tr>';
// Status To sell // Status To sell
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">'; print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="3">';
@ -1341,7 +1341,7 @@ else
print '</tr>'; print '</tr>';
// Label // Label
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$object->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$object->label.'</td>';
$nblignes=7; $nblignes=7;
if (! empty($conf->produit->enabled) && ! empty($conf->service->enabled)) $nblignes++; if (! empty($conf->produit->enabled) && ! empty($conf->service->enabled)) $nblignes++;
@ -1586,7 +1586,7 @@ else
// Categories // Categories
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td colspan="3">'; print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td colspan="3">';
print $form->showCategories($object->id,'product'); print $form->showCategories($object->id,'product',1);
print "</td></tr>"; print "</td></tr>";
print "</table>\n"; print "</table>\n";

View File

@ -59,8 +59,21 @@ class Product extends CommonObject
var $id ; var $id ;
//! Ref //! Ref
var $ref; var $ref;
var $libelle; // TODO deprecated /**
* Product label
* @var string
* @deprecated use $label
*/
var $libelle;
/**
* Product label
* @var string
*/
var $label; var $label;
/**
* Product descripion
* @var string
*/
var $description; var $description;
/** /**
@ -232,7 +245,7 @@ class Product extends CommonObject
if (dol_strlen(trim($this->ref)) == 0) if (dol_strlen(trim($this->ref)) == 0)
$err++; $err++;
if (dol_strlen(trim($this->libelle)) == 0) if (dol_strlen(trim($this->label)) == 0)
$err++; $err++;
if ($err > 0) if ($err > 0)
@ -260,7 +273,7 @@ class Product extends CommonObject
// Clean parameters // Clean parameters
$this->ref = dol_string_nospecial(trim($this->ref)); $this->ref = dol_string_nospecial(trim($this->ref));
$this->libelle = trim($this->libelle); $this->label = trim($this->label);
$this->price_ttc=price2num($this->price_ttc); $this->price_ttc=price2num($this->price_ttc);
$this->price=price2num($this->price); $this->price=price2num($this->price);
$this->price_min_ttc=price2num($this->price_min_ttc); $this->price_min_ttc=price2num($this->price_min_ttc);
@ -312,7 +325,7 @@ class Product extends CommonObject
$this->barcode=trim($this->barcode); $this->barcode=trim($this->barcode);
// Check parameters // Check parameters
if (empty($this->libelle)) if (empty($this->label))
{ {
$this->error='ErrorMandatoryParametersNotProvided'; $this->error='ErrorMandatoryParametersNotProvided';
return -1; return -1;
@ -397,7 +410,7 @@ class Product extends CommonObject
$sql.= ", ".(! empty($this->ref_ext)?"'".$this->db->escape($this->ref_ext)."'":"null"); $sql.= ", ".(! empty($this->ref_ext)?"'".$this->db->escape($this->ref_ext)."'":"null");
$sql.= ", ".price2num($price_min_ht); $sql.= ", ".price2num($price_min_ht);
$sql.= ", ".price2num($price_min_ttc); $sql.= ", ".price2num($price_min_ttc);
$sql.= ", ".(! empty($this->libelle)?"'".$this->db->escape($this->libelle)."'":"null"); $sql.= ", ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null");
$sql.= ", ".$user->id; $sql.= ", ".$user->id;
$sql.= ", ".$this->type; $sql.= ", ".$this->type;
$sql.= ", ".price2num($price_ht); $sql.= ", ".price2num($price_ht);
@ -588,11 +601,11 @@ class Product extends CommonObject
$error=0; $error=0;
// Check parameters // Check parameters
if (! $this->libelle) $this->libelle = 'MISSING LABEL'; if (! $this->label) $this->label = 'MISSING LABEL';
// Clean parameters // Clean parameters
$this->ref = dol_string_nospecial(trim($this->ref)); $this->ref = dol_string_nospecial(trim($this->ref));
$this->libelle = trim($this->libelle); $this->label = trim($this->label);
$this->description = trim($this->description); $this->description = trim($this->description);
$this->note = (isset($this->note) ? trim($this->note) : null); $this->note = (isset($this->note) ? trim($this->note) : null);
$this->weight = price2num($this->weight); $this->weight = price2num($this->weight);
@ -667,7 +680,7 @@ class Product extends CommonObject
if ($this->barcode == -1) $this->barcode = $this->get_barcode($this,$this->barcode_type_code); if ($this->barcode == -1) $this->barcode = $this->get_barcode($this,$this->barcode_type_code);
$sql = "UPDATE ".MAIN_DB_PREFIX."product"; $sql = "UPDATE ".MAIN_DB_PREFIX."product";
$sql.= " SET label = '" . $this->db->escape($this->libelle) ."'"; $sql.= " SET label = '" . $this->db->escape($this->label) ."'";
$sql.= ", ref = '" . $this->ref ."'"; $sql.= ", ref = '" . $this->ref ."'";
$sql.= ", ref_ext = ".(! empty($this->ref_ext)?"'".$this->db->escape($this->ref_ext)."'":"null"); $sql.= ", ref_ext = ".(! empty($this->ref_ext)?"'".$this->db->escape($this->ref_ext)."'":"null");
$sql.= ", tva_tx = " . $this->tva_tx; $sql.= ", tva_tx = " . $this->tva_tx;
@ -958,7 +971,7 @@ class Product extends CommonObject
if ($this->db->num_rows($result)) // if there is already a description line for this language if ($this->db->num_rows($result)) // if there is already a description line for this language
{ {
$sql2 = "UPDATE ".MAIN_DB_PREFIX."product_lang"; $sql2 = "UPDATE ".MAIN_DB_PREFIX."product_lang";
$sql2.= " SET label='".$this->db->escape($this->libelle)."',"; $sql2.= " SET label='".$this->db->escape($this->label)."',";
$sql2.= " description='".$this->db->escape($this->description)."',"; $sql2.= " description='".$this->db->escape($this->description)."',";
$sql2.= " note='".$this->db->escape($this->note)."'"; $sql2.= " note='".$this->db->escape($this->note)."'";
$sql2.= " WHERE fk_product=".$this->id." AND lang='".$key."'"; $sql2.= " WHERE fk_product=".$this->id." AND lang='".$key."'";
@ -966,7 +979,7 @@ class Product extends CommonObject
else else
{ {
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_lang (fk_product, lang, label, description, note)"; $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_lang (fk_product, lang, label, description, note)";
$sql2.= " VALUES(".$this->id.",'".$key."','". $this->db->escape($this->libelle); $sql2.= " VALUES(".$this->id.",'".$key."','". $this->db->escape($this->label);
$sql2.= "','".$this->db->escape($this->description); $sql2.= "','".$this->db->escape($this->description);
$sql2.= "','".$this->db->escape($this->note)."')"; $sql2.= "','".$this->db->escape($this->note)."')";
} }
@ -1535,7 +1548,6 @@ class Product extends CommonObject
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->ref = $obj->ref; $this->ref = $obj->ref;
$this->ref_ext = $obj->ref_ext; $this->ref_ext = $obj->ref_ext;
$this->libelle = $obj->label; // TODO deprecated
$this->label = $obj->label; $this->label = $obj->label;
$this->description = $obj->description; $this->description = $obj->description;
$this->url = $obj->url; $this->url = $obj->url;
@ -3808,7 +3820,7 @@ class Product extends CommonObject
// Initialize parameters // Initialize parameters
$this->id=0; $this->id=0;
$this->ref = 'PRODUCT_SPEC'; $this->ref = 'PRODUCT_SPEC';
$this->libelle = 'PRODUCT SPECIMEN'; $this->label = 'PRODUCT SPECIMEN';
$this->description = 'PRODUCT SPECIMEN '.dol_print_date($now,'dayhourlog'); $this->description = 'PRODUCT SPECIMEN '.dol_print_date($now,'dayhourlog');
$this->specimen=1; $this->specimen=1;
$this->country_id=1; $this->country_id=1;

View File

@ -524,7 +524,7 @@ if ($id > 0 || ! empty($ref))
print "\n<tr ".$bc[$var].">"; print "\n<tr ".$bc[$var].">";
$productstatic->id=$objp->rowid; $productstatic->id=$objp->rowid;
$productstatic->ref=$objp->ref; $productstatic->ref=$objp->ref;
$productstatic->libelle=$objp->label; $productstatic->label=$objp->label;
$productstatic->type=$objp->type; $productstatic->type=$objp->type;
print '<td>'.$productstatic->getNomUrl(1,'',24).'</td>'; print '<td>'.$productstatic->getNomUrl(1,'',24).'</td>';

View File

@ -191,7 +191,7 @@ if ($object->id)
print '</tr>'; print '</tr>';
// Label // Label
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->libelle.'</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->label.'</td></tr>';
// Status (to sell) // Status (to sell)
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>'; print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';

View File

@ -280,7 +280,7 @@ if ($id || $ref)
print '</tr>'; print '</tr>';
// Label // Label
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$product->libelle.'</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$product->label.'</td></tr>';
// Minimum Price // Minimum Price
print '<tr><td>'.$langs->trans("BuyingPriceMin").'</td>'; print '<tr><td>'.$langs->trans("BuyingPriceMin").'</td>';

View File

@ -126,7 +126,7 @@ if ($object->id)
print '</tr>'; print '</tr>';
// Libelle // Libelle
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$object->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$object->label.'</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -368,7 +368,7 @@ print '</td>';
print '</tr>'; print '</tr>';
// Label // Label
print '<tr><td>' . $langs->trans("Label") . '</td><td>' . $object->libelle . '</td>'; print '<tr><td>' . $langs->trans("Label") . '</td><td>' . $object->label . '</td>';
$isphoto = $object->is_photo_available($conf->product->multidir_output [$object->entity]); $isphoto = $object->is_photo_available($conf->product->multidir_output [$object->entity]);

View File

@ -83,7 +83,7 @@ if (! empty($id) || ! empty($ref))
print '</tr>'; print '</tr>';
// Label // Label
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->libelle.'</td></tr>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$object->label.'</td></tr>';
// Status (to sell) // Status (to sell)
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>'; print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';

View File

@ -107,7 +107,7 @@ if ($id > 0 || ! empty($ref))
print '</tr>'; print '</tr>';
// Libelle // Libelle
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->label.'</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -115,7 +115,7 @@ if ($id > 0 || ! empty($ref)) {
print '</tr>'; print '</tr>';
// Libelle // Libelle
print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $product->libelle . '</td>'; print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $product->label . '</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -97,7 +97,7 @@ if ($id > 0 || ! empty($ref))
print '</tr>'; print '</tr>';
// Libelle // Libelle
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->label.'</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -108,7 +108,7 @@ if ($id > 0 || ! empty($ref))
print '</tr>'; print '</tr>';
// Libelle // Libelle
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->label.'</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -109,7 +109,7 @@ if ($id > 0 || ! empty($ref))
print '</tr>'; print '</tr>';
// Libelle // Libelle
print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $product->libelle . '</td>'; print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $product->label . '</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -107,7 +107,7 @@ if ($id > 0 || ! empty($ref))
print '</tr>'; print '</tr>';
// Libelle // Libelle
print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $product->libelle . '</td>'; print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $product->label . '</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -514,7 +514,7 @@ if ($resql)
print '</td>'; print '</td>';
// Product label // Product label
print '<td class="liste_titre" align="left">'; print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="10" name="search_product" value="'.($idproduct?$product->libelle:$search_product).'">'; print '<input class="flat" type="text" size="10" name="search_product" value="'.($idproduct?$product->label:$search_product).'">';
print '</td>'; print '</td>';
// Batch // Batch
if (! empty($conf->productbatch->enabled)) if (! empty($conf->productbatch->enabled))

View File

@ -403,7 +403,7 @@ if ($id > 0 || $ref)
print '</tr>'; print '</tr>';
// Label // Label
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->label.'</td>';
print '</tr>'; print '</tr>';
// Status (to sell) // Status (to sell)

View File

@ -558,7 +558,7 @@ if (GETPOST("source") == 'contractline' && $valid)
$text='<b>'.$langs->trans("PaymentRenewContractId",$contract->ref,$contractline->ref).'</b>'; $text='<b>'.$langs->trans("PaymentRenewContractId",$contract->ref,$contractline->ref).'</b>';
if ($contractline->fk_product) if ($contractline->fk_product)
{ {
$text.='<br>'.$product->ref.($product->libelle?' - '.$product->libelle:''); $text.='<br>'.$product->ref.($product->label?' - '.$product->label:'');
} }
if ($contractline->description) $text.='<br>'.dol_htmlentitiesbr($contractline->description); if ($contractline->description) $text.='<br>'.dol_htmlentitiesbr($contractline->description);
//if ($contractline->date_fin_validite) { //if ($contractline->date_fin_validite) {

View File

@ -695,7 +695,7 @@ if (GETPOST("source") == 'contractline' && $valid)
$text='<b>'.$langs->trans("PaymentRenewContractId",$contract->ref,$contractline->ref).'</b>'; $text='<b>'.$langs->trans("PaymentRenewContractId",$contract->ref,$contractline->ref).'</b>';
if ($contractline->fk_product) if ($contractline->fk_product)
{ {
$text.='<br>'.$product->ref.($product->libelle?' - '.$product->libelle:''); $text.='<br>'.$product->ref.($product->label?' - '.$product->label:'');
} }
if ($contractline->description) $text.='<br>'.dol_htmlentitiesbr($contractline->description); if ($contractline->description) $text.='<br>'.dol_htmlentitiesbr($contractline->description);
//if ($contractline->date_fin_validite) { //if ($contractline->date_fin_validite) {

View File

@ -447,6 +447,7 @@ textarea.centpercent {
/* Styles to hide objects */ /* Styles to hide objects */
/* ============================================================================== */ /* ============================================================================== */
.clearboth { clear:both; }
.hideobject { display: none; } .hideobject { display: none; }
.minwidth100 { min-width: 100px; } .minwidth100 { min-width: 100px; }
.minwidth200 { min-width: 200px; } .minwidth200 { min-width: 200px; }
@ -1359,8 +1360,6 @@ img.toolbarbutton {
/* Onglets */ /* Onglets */
/* ============================================================================== */ /* ============================================================================== */
div.tabs { div.tabs {
/* margin: 0px 0px 2px 6px;
padding: 0px 6px 3px 0px; */
text-align: <?php print $left; ?>; text-align: <?php print $left; ?>;
margin-left: 6px !important; margin-left: 6px !important;
margin-right: 6px !important; margin-right: 6px !important;
@ -2974,7 +2973,6 @@ a span.select2-chosen
cursor: default; cursor: default;
} }
.select2-container-multi .select2-choices .select2-search-choice { .select2-container-multi .select2-choices .select2-search-choice {
margin-top: 2px;
margin-bottom: 2px; margin-bottom: 2px;
} }
@ -3160,5 +3158,17 @@ border-top-right-radius: 6px;
padding-left: 54px; padding-left: 54px;
} }
/* CSS style used for small screen */
.imgopensurveywizard
{
padding: 0 4px 0 4px;
}
@media only screen and (max-width: 767px)
{
.imgopensurveywizard { width:95%; height: auto; }
}
<?php <?php
if (is_object($db)) $db->close(); if (is_object($db)) $db->close();

View File

@ -505,7 +505,7 @@ function createProductOrService($authentication,$product)
$newobject->ref=$product['ref']; $newobject->ref=$product['ref'];
$newobject->ref_ext=$product['ref_ext']; $newobject->ref_ext=$product['ref_ext'];
$newobject->type=$product['type']; $newobject->type=$product['type'];
$newobject->libelle=$product['label']; // TODO deprecated $newobject->libelle=$product['label']; // @deprecated
$newobject->label=$product['label']; $newobject->label=$product['label'];
$newobject->description=$product['description']; $newobject->description=$product['description'];
$newobject->note=$product['note']; $newobject->note=$product['note'];
@ -675,7 +675,7 @@ function updateProductOrService($authentication,$product)
if (isset($product['ref'])) $newobject->ref=$product['ref']; if (isset($product['ref'])) $newobject->ref=$product['ref'];
if (isset($product['ref_ext'])) $newobject->ref_ext=$product['ref_ext']; if (isset($product['ref_ext'])) $newobject->ref_ext=$product['ref_ext'];
$newobject->type=$product['type']; $newobject->type=$product['type'];
$newobject->libelle=$product['label']; // TODO deprecated $newobject->libelle=$product['label']; // @deprecated
$newobject->label=$product['label']; $newobject->label=$product['label'];
$newobject->description=$product['description']; $newobject->description=$product['description'];
$newobject->note=$product['note']; $newobject->note=$product['note'];