Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into mko559
This commit is contained in:
commit
bed17951b1
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -88,7 +88,8 @@ print '<td>'.$langs->trans("Label").'</td>';
|
|||||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Unique").'</td>';
|
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||||
|
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||||
print '<td width="80"> </td>';
|
print '<td width="80"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -101,7 +102,8 @@ foreach($extrafields->attribute_type as $key => $value)
|
|||||||
print "<td>".$key."</td>\n";
|
print "<td>".$key."</td>\n";
|
||||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||||
print '<td align="right">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||||
|
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
@ -149,7 +151,7 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -906,7 +906,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?GETPOST('options_'.$key,'alpha'):$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?GETPOST('options_'.$key,'alpha'):$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td>';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td>';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -1150,7 +1152,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td>';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td>';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,13 +63,24 @@ class Categorie
|
|||||||
* Load category into memory from database
|
* Load category into memory from database
|
||||||
*
|
*
|
||||||
* @param int $id Id of category
|
* @param int $id Id of category
|
||||||
|
* @param strin $label Label of category
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id,$label='')
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type";
|
$sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
||||||
$sql.= " WHERE rowid = ".$id;
|
if ($id)
|
||||||
|
{
|
||||||
|
$sql.= " WHERE rowid = '".$id."'";
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($label) $sql.= " WHERE label = '".$this->db->escape($label)."' AND entity=".$conf->entity;;
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|||||||
@ -237,7 +237,9 @@ if ($action == 'create')
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print "<tr><td>".$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -650,7 +650,9 @@ if ($action == 'create')
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -810,7 +812,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
@ -1044,7 +1048,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1538,7 +1538,9 @@ if (empty($reshook) && ! empty($extrafields->attribute_label))
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print "<tr><td>".$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1517,7 +1517,9 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print "<tr><td>".$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -2047,7 +2049,9 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2003,7 +2003,9 @@ if ($action == 'create')
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -2970,7 +2972,9 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -432,30 +432,36 @@ else
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.(isset($_POST["poste"])?$_POST["poste"]:$object->poste).'"></td>';
|
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.(isset($_POST["poste"])?$_POST["poste"]:$object->poste).'"></td>';
|
||||||
|
|
||||||
|
$colspan=3;
|
||||||
|
if ($conf->use_javascript_ajax && $socid > 0) $colspan=2;
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party
|
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party
|
||||||
print '<tr><td>'.$langs->trans("Address");
|
print '<tr><td>'.$langs->trans("Address");
|
||||||
print '</td><td colspan="2"><textarea class="flat" name="address" cols="70">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea></td>';
|
print '</td><td colspan="'.$colspan.'"><textarea class="flat" name="address" cols="70">'.(isset($_POST["address"])?$_POST["address"]:$object->address).'</textarea></td>';
|
||||||
|
|
||||||
$rowspan=3;
|
if ($conf->use_javascript_ajax && $socid > 0)
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
|
{
|
||||||
|
$rowspan=3;
|
||||||
print '<td valign="middle" align="center" rowspan="'.$rowspan.'">';
|
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
|
||||||
if ($conf->use_javascript_ajax && $socid) print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a>';
|
|
||||||
print '</td>';
|
print '<td valign="middle" align="center" rowspan="'.$rowspan.'">';
|
||||||
|
print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a>';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party
|
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party
|
||||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party
|
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="'.$colspan.'">';
|
||||||
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' ';
|
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' ';
|
||||||
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
if (dol_strlen(trim($object->fk_pays)) == 0) $object->fk_pays = $objsoc->country_id; // Predefined with third party
|
if (dol_strlen(trim($object->fk_pays)) == 0) $object->fk_pays = $objsoc->country_id; // Predefined with third party
|
||||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.$colspan.'">';
|
||||||
print $form->select_country((isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id),'country_id');
|
print $form->select_country((isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id),'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -463,7 +469,7 @@ else
|
|||||||
// State
|
// State
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans('State').'</td><td colspan="'.$colspan.'">';
|
||||||
if ($object->country_id)
|
if ($object->country_id)
|
||||||
{
|
{
|
||||||
print $formcompany->select_state(isset($_POST["state_id"])?$_POST["state_id"]:$object->state_id,$object->country_code,'state_id');
|
print $formcompany->select_state(isset($_POST["state_id"])?$_POST["state_id"]:$object->state_id,$object->country_code,'state_id');
|
||||||
@ -517,7 +523,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -732,7 +740,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ if ($action == 'add')
|
|||||||
// Type et taille non encore pris en compte => varchar(255)
|
// Type et taille non encore pris en compte => varchar(255)
|
||||||
if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname']))
|
if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname']))
|
||||||
{
|
{
|
||||||
$result=$extrafields->addExtraField($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['pos'],$extrasize,$elementtype,(GETPOST('unique')?1:0));
|
$result=$extrafields->addExtraField($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['pos'],$extrasize,$elementtype,(GETPOST('unique')?1:0),(GETPOST('required')?1:0));
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
@ -119,7 +119,7 @@ if ($action == 'update')
|
|||||||
{
|
{
|
||||||
if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname']))
|
if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname']))
|
||||||
{
|
{
|
||||||
$result=$extrafields->update($_POST['attrname'],$_POST['label'],$_POST['type'],$extrasize,$elementtype,(GETPOST('unique')?1:0));
|
$result=$extrafields->update($_POST['attrname'],$_POST['label'],$_POST['type'],$extrasize,$elementtype,(GETPOST('unique')?1:0),(GETPOST('required')?1:0));
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
|
|||||||
@ -54,6 +54,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
|||||||
$loadmethod = GETPOST('loadmethod','alpha',2);
|
$loadmethod = GETPOST('loadmethod','alpha',2);
|
||||||
$savemethod = GETPOST('savemethod','alpha',2);
|
$savemethod = GETPOST('savemethod','alpha',2);
|
||||||
$savemethodname = (! empty($savemethod) ? $savemethod : 'setValueFrom');
|
$savemethodname = (! empty($savemethod) ? $savemethod : 'setValueFrom');
|
||||||
|
$newelement = $element;
|
||||||
|
|
||||||
$view='';
|
$view='';
|
||||||
$format='text';
|
$format='text';
|
||||||
|
|||||||
@ -91,7 +91,7 @@ class ExtraFields
|
|||||||
if (empty($label)) return -1;
|
if (empty($label)) return -1;
|
||||||
|
|
||||||
// Create field into database
|
// Create field into database
|
||||||
$result=$this->create($attrname,$type,$size,$elementtype, $unique);
|
$result=$this->create($attrname,$type,$size,$elementtype, $unique, $required);
|
||||||
$err1=$this->errno;
|
$err1=$this->errno;
|
||||||
if ($result > 0 || $err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS')
|
if ($result > 0 || $err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS')
|
||||||
{
|
{
|
||||||
@ -361,7 +361,7 @@ class ExtraFields
|
|||||||
private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0)
|
private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
dol_syslog(get_class($this)."::update_label $attrname,$label,$type,$size");
|
dol_syslog(get_class($this)."::update_label ".$attrname.", ".$label.", ".$type.", ".$size.", ".$elementtype.", ".$unique.", ".$required);
|
||||||
|
|
||||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -654,7 +654,7 @@ class Form
|
|||||||
* @param int $showempty Add an empty field
|
* @param int $showempty Add an empty field
|
||||||
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
|
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
|
||||||
* @param int $forcecombo Force to use combo box
|
* @param int $forcecombo Force to use combo box
|
||||||
* @param array $event Event options
|
* @param array $event Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||||
* @return string HTML string with
|
* @return string HTML string with
|
||||||
*/
|
*/
|
||||||
function select_company($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $event=array())
|
function select_company($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $event=array())
|
||||||
@ -2408,8 +2408,8 @@ class Form
|
|||||||
$autoOpen=false;
|
$autoOpen=false;
|
||||||
$dialogconfirm.='-'.$button;
|
$dialogconfirm.='-'.$button;
|
||||||
}
|
}
|
||||||
$pageyes=$page.'&action='.$action.'&confirm=yes';
|
$pageyes=(preg_match('/\?/',$page)?'&':'?').'action='.$action.'&confirm=yes';
|
||||||
$pageno=($useajax == 2?$page.'&confirm=no':'');
|
$pageno=($useajax == 2 ? (preg_match('/\?/',$page)?'&':'?').'confirm=no':'');
|
||||||
// Add input fields into list of fields to read during submit (inputok and inputko)
|
// Add input fields into list of fields to read during submit (inputok and inputko)
|
||||||
if (is_array($formquestion))
|
if (is_array($formquestion))
|
||||||
{
|
{
|
||||||
@ -2916,17 +2916,17 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output html select to select thirdparty
|
* Output html select to select thirdparty
|
||||||
*
|
*
|
||||||
* @param string $page Page
|
* @param string $page Page
|
||||||
* @param string $selected Id preselected
|
* @param string $selected Id preselected
|
||||||
* @param string $htmlname Name of HTML select
|
* @param string $htmlname Name of HTML select
|
||||||
* @param string $filter Optionnal filters criteras
|
* @param string $filter Optionnal filters criteras
|
||||||
* @param int $showempty Add an empty field
|
* @param int $showempty Add an empty field
|
||||||
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
|
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
|
||||||
* @param int $forcecombo Force to use combo box
|
* @param int $forcecombo Force to use combo box
|
||||||
* @param array $event Event options
|
* @param array $event Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $event=array())
|
function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $event=array())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -576,7 +576,7 @@ class FormFile
|
|||||||
* @param array $filearray Array of files loaded by dol_dir_list('files') function before calling this
|
* @param array $filearray Array of files loaded by dol_dir_list('files') function before calling this
|
||||||
* @param Object $object Object on which document is linked to
|
* @param Object $object Object on which document is linked to
|
||||||
* @param string $modulepart Value for modulepart used by download or viewimage wrapper
|
* @param string $modulepart Value for modulepart used by download or viewimage wrapper
|
||||||
* @param string $param Parameters on sort links
|
* @param string $param Parameters on sort links (param must start with &, example &aaa=bbb&ccc=ddd)
|
||||||
* @param int $forcedownload Force to open dialog box "Save As" when clicking on file
|
* @param int $forcedownload Force to open dialog box "Save As" when clicking on file
|
||||||
* @param string $relativepath Relative path of docs (autodefined if not provided)
|
* @param string $relativepath Relative path of docs (autodefined if not provided)
|
||||||
* @param int $permtodelete Permission to delete
|
* @param int $permtodelete Permission to delete
|
||||||
@ -678,9 +678,10 @@ class FormFile
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Delete or view link
|
// Delete or view link
|
||||||
|
// ($param must start with &)
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if ($useinecm) print '<a href="'.DOL_URL_ROOT.'/ecm/docfile.php?urlfile='.urlencode($file['name']).$param.'" class="editfilelink" rel="'.urlencode($file['name']).'">'.img_view().'</a> ';
|
if ($useinecm) print '<a href="'.DOL_URL_ROOT.'/ecm/docfile.php?urlfile='.urlencode($file['name']).$param.'" class="editfilelink" rel="'.urlencode($file['name']).$param.'">'.img_view().'</a> ';
|
||||||
if ($permtodelete) print '<a href="'.(($useinecm && ! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))?'#':$url.'?action=delete&urlfile='.urlencode($file['name']).$param).'" class="deletefilelink" rel="'.urlencode($file['name']).'">'.img_delete().'</a>';
|
if ($permtodelete) print '<a href="'.(($useinecm && ! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))?'#':$url.'?action=delete&urlfile='.urlencode($file['name']).$param).'" class="deletefilelink" rel="'.urlencode($file['name']).$param.'">'.img_delete().'</a>';
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -1011,7 +1011,8 @@ class DoliDBMysql
|
|||||||
$sql = "ALTER TABLE ".$table;
|
$sql = "ALTER TABLE ".$table;
|
||||||
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
|
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
|
||||||
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")";
|
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")";
|
||||||
|
if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG);
|
dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG);
|
||||||
if (! $this->query($sql))
|
if (! $this->query($sql))
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -1005,7 +1005,8 @@ class DoliDBMysqli
|
|||||||
$sql = "ALTER TABLE ".$table;
|
$sql = "ALTER TABLE ".$table;
|
||||||
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
|
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
|
||||||
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")";
|
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")";
|
||||||
|
if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG);
|
dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG);
|
||||||
if (! $this->query($sql))
|
if (! $this->query($sql))
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -1221,6 +1221,9 @@ class DoliDBPgsql
|
|||||||
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
|
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
|
||||||
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")";
|
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")";
|
||||||
|
|
||||||
|
// FIXME May not work with pgsql. May need to run a second request. If it works, just remove the FIXME tag
|
||||||
|
if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL";
|
||||||
|
|
||||||
dol_syslog($sql,LOG_DEBUG);
|
dol_syslog($sql,LOG_DEBUG);
|
||||||
if (! $this->query($sql))
|
if (! $this->query($sql))
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -757,8 +757,11 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is to allow to transform all select box into ajax autocomplete box
|
/*
|
||||||
* with just one line: $(function() { $( "#listmotifcons" ).combobox(); });
|
* =================================================================
|
||||||
|
* This is to allow to transform all select box into ajax autocomplete box
|
||||||
|
* with just one line: $(function() { $( "#idofmylist" ).combobox(); });
|
||||||
|
* =================================================================
|
||||||
*/
|
*/
|
||||||
(function( $ ) {
|
(function( $ ) {
|
||||||
$.widget( "ui.combobox", {
|
$.widget( "ui.combobox", {
|
||||||
|
|||||||
@ -290,10 +290,10 @@ function ajax_dialog($title,$message,$w=350,$h=150)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a select html field into an ajax combobox
|
* Convert a html select field into an ajax combobox
|
||||||
*
|
*
|
||||||
* @param string $htmlname Name of html field
|
* @param string $htmlname Name of html select field
|
||||||
* @param array $event Event options
|
* @param array $event Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||||
* @return string Return html string to convert a select field into a combo
|
* @return string Return html string to convert a select field into a combo
|
||||||
*/
|
*/
|
||||||
function ajax_combobox($htmlname, $event=array())
|
function ajax_combobox($htmlname, $event=array())
|
||||||
|
|||||||
@ -159,7 +159,7 @@ function dol_shutdown()
|
|||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$disconnectdone=false; $depth=0;
|
$disconnectdone=false; $depth=0;
|
||||||
if (is_object($db) && ! empty($db->connected)) { $depth=$db->transaction_opened; $disconnectdone=$db->close(); }
|
if (is_object($db) && ! empty($db->connected)) { $depth=$db->transaction_opened; $disconnectdone=$db->close(); }
|
||||||
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].($disconnectdone?' (Warn: db disconnection forced, transaction depth was '.$depth.')':''), ($disconnectdone?LOG_WARNING:LOG_DEBUG));
|
dol_syslog("--- End access to ".$_SERVER["PHP_SELF"].(($disconnectdone && $depth)?' (Warn: db disconnection forced, transaction depth was '.$depth.')':''), (($disconnectdone && $depth)?LOG_WARNING:LOG_DEBUG));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -178,6 +178,63 @@ class modCategorie extends DolibarrModules
|
|||||||
|
|
||||||
$this->import_regex_array[$r]=array('ca.type'=>'^[0|1|2|3]');
|
$this->import_regex_array[$r]=array('ca.type'=>'^[0|1|2|3]');
|
||||||
$this->import_examplevalues_array[$r]=array('ca.label'=>"Supplier Category",'ca.type'=>"1",'ca.description'=>"Imported category");
|
$this->import_examplevalues_array[$r]=array('ca.label'=>"Supplier Category",'ca.type'=>"1",'ca.description'=>"Imported category");
|
||||||
|
|
||||||
|
if (! empty($conf->product->enabled))
|
||||||
|
{
|
||||||
|
//Products
|
||||||
|
$r++;
|
||||||
|
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
||||||
|
$this->import_label[$r]="CatProdList"; // Translation key
|
||||||
|
$this->import_icon[$r]=$this->picto;
|
||||||
|
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||||
|
$this->import_tables_array[$r]=array('cp'=>MAIN_DB_PREFIX.'categorie_product');
|
||||||
|
$this->import_fields_array[$r]=array('cp.fk_categorie'=>"Category*",'cp.fk_product'=>"Product*"
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->import_convertvalue_array[$r]=array(
|
||||||
|
'cp.fk_categorie'=>array('rule'=>'fetchidfromref','classfile'=>'/categories/class/categorie.class.php','class'=>'Categorie','method'=>'fetch','element'=>'category'),
|
||||||
|
'cp.fk_product'=>array('rule'=>'fetchidfromref','classfile'=>'/product/class/product.class.php','class'=>'Product','method'=>'fetch','element'=>'product')
|
||||||
|
);
|
||||||
|
$this->import_examplevalues_array[$r]=array('cp.fk_categorie'=>"Imported category",'cp.fk_product'=>"PREF123456");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->societe->enabled))
|
||||||
|
{
|
||||||
|
//Customers
|
||||||
|
$r++;
|
||||||
|
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
||||||
|
$this->import_label[$r]="CatCusList"; // Translation key
|
||||||
|
$this->import_icon[$r]=$this->picto;
|
||||||
|
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||||
|
$this->import_tables_array[$r]=array('cs'=>MAIN_DB_PREFIX.'categorie_societe');
|
||||||
|
$this->import_fields_array[$r]=array('cs.fk_categorie'=>"Category*",'cs.fk_societe'=>"ThirdParty*"
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->import_convertvalue_array[$r]=array(
|
||||||
|
'cs.fk_categorie'=>array('rule'=>'fetchidfromref','classfile'=>'/categories/class/categorie.class.php','class'=>'Categorie','method'=>'fetch','element'=>'category'),
|
||||||
|
'cs.fk_societe'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty')
|
||||||
|
);
|
||||||
|
$this->import_examplevalues_array[$r]=array('cs.fk_categorie'=>"Imported category",'cs.fk_societe'=>"MyBigCompany");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->fournisseur->enabled))
|
||||||
|
{
|
||||||
|
// Suppliers
|
||||||
|
$r++;
|
||||||
|
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
||||||
|
$this->import_label[$r]="CatSupList"; // Translation key
|
||||||
|
$this->import_icon[$r]=$this->picto;
|
||||||
|
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||||
|
$this->import_tables_array[$r]=array('cs'=>MAIN_DB_PREFIX.'categorie_fournisseur');
|
||||||
|
$this->import_fields_array[$r]=array('cs.fk_categorie'=>"Category*",'cs.fk_societe'=>"Supplier*"
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->import_convertvalue_array[$r]=array(
|
||||||
|
'cs.fk_categorie'=>array('rule'=>'fetchidfromref','classfile'=>'/categories/class/categorie.class.php','class'=>'Categorie','method'=>'fetch','element'=>'category'),
|
||||||
|
'cs.fk_societe'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty')
|
||||||
|
);
|
||||||
|
$this->import_examplevalues_array[$r]=array('cs.fk_categorie'=>"Imported category",'cs.fk_societe'=>"MyBigCompany");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -223,6 +223,28 @@ class modProduct extends DolibarrModules
|
|||||||
'sp.remise_percent'=>'0'
|
'sp.remise_percent'=>'0'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->stock->enabled))
|
||||||
|
{
|
||||||
|
// Import stocks
|
||||||
|
$r++;
|
||||||
|
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
||||||
|
$this->import_label[$r]="Stocks"; // Translation key
|
||||||
|
$this->import_icon[$r]='stock';
|
||||||
|
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||||
|
$this->import_tables_array[$r]=array('ps'=>MAIN_DB_PREFIX.'product_stock');
|
||||||
|
$this->import_fields_array[$r]=array('ps.fk_product'=>"Product*",'ps.fk_entrepot'=>"Warehouse*",
|
||||||
|
'ps.reel'=>"Stock*",'ps.pmp'=>"PMP"
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->import_convertvalue_array[$r]=array(
|
||||||
|
'ps.fk_product'=>array('rule'=>'fetchidfromref','classfile'=>'/product/class/product.class.php','class'=>'Product','method'=>'fetch','element'=>'product'),
|
||||||
|
'ps.fk_entrepot'=>array('rule'=>'fetchidfromref','classfile'=>'/product/stock/class/entrepot.class.php','class'=>'Entrepot','method'=>'fetch','element'=>'label')
|
||||||
|
);
|
||||||
|
$this->import_examplevalues_array[$r]=array('ps.fk_product'=>"PREF123456",'ps.fk_entrepot'=>"ALM001",
|
||||||
|
'ps.reel'=>"10",'ps.pmp'=>"25"
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -42,6 +42,8 @@ class modProjet extends DolibarrModules
|
|||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->numero = 400;
|
$this->numero = 400;
|
||||||
|
|
||||||
|
|||||||
@ -23,12 +23,14 @@
|
|||||||
function init_typeoffields(type)
|
function init_typeoffields(type)
|
||||||
{
|
{
|
||||||
var size = jQuery("#size");
|
var size = jQuery("#size");
|
||||||
if (type == 'date') { size.val('').attr('disabled','disabled'); }
|
var unique = jQuery("#unique");
|
||||||
else if (type == 'datetime') { size.val('').attr('disabled','disabled'); }
|
var required = jQuery("#required");
|
||||||
else if (type == 'double') { size.val('24,8').removeAttr('disabled'); }
|
if (type == 'date') { size.val('').attr('disabled','disabled'); unique.removeAttr('disabled','disabled'); }
|
||||||
else if (type == 'int') { size.val('10').removeAttr('disabled'); }
|
else if (type == 'datetime') { size.val('').attr('disabled','disabled'); unique.removeAttr('disabled','disabled'); }
|
||||||
else if (type == 'text') { size.val('2000').removeAttr('disabled'); }
|
else if (type == 'double') { size.val('24,8').removeAttr('disabled'); unique.removeAttr('disabled','disabled'); }
|
||||||
else if (type == 'varchar') { size.val('255').removeAttr('disabled'); }
|
else if (type == 'int') { size.val('10').removeAttr('disabled'); unique.removeAttr('disabled','disabled'); }
|
||||||
|
else if (type == 'text') { size.val('2000').removeAttr('disabled'); unique.attr('disabled','disabled').removeAttr('checked'); }
|
||||||
|
else if (type == 'varchar') { size.val('255').removeAttr('disabled'); unique.removeAttr('disabled','disabled'); }
|
||||||
else size.val('').attr('disabled','disabled');
|
else size.val('').attr('disabled','disabled');
|
||||||
}
|
}
|
||||||
init_typeoffields('');
|
init_typeoffields('');
|
||||||
@ -55,7 +57,9 @@
|
|||||||
<!-- Size -->
|
<!-- Size -->
|
||||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td class="valeur"><input id="size" type="text" name="size" size="5" value="<?php echo (GETPOST('size')?GETPOST('size'):''); ?>"></td></tr>
|
<tr><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td class="valeur"><input id="size" type="text" name="size" size="5" value="<?php echo (GETPOST('size')?GETPOST('size'):''); ?>"></td></tr>
|
||||||
<!-- Unique -->
|
<!-- Unique -->
|
||||||
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input type="checkbox" name="unique" <?php echo (GETPOST('unique')?' checked="true"':''); ?>"></td></tr>
|
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique" <?php echo (GETPOST('unique')?' checked="true"':''); ?>></td></tr>
|
||||||
|
<!-- Required -->
|
||||||
|
<tr><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required" <?php echo (GETPOST('required')?' checked="true"':''); ?>></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div align="center"><br><input type="submit" name="button" class="button" value="<?php echo $langs->trans("Save"); ?>">
|
<div align="center"><br><input type="submit" name="button" class="button" value="<?php echo $langs->trans("Save"); ?>">
|
||||||
|
|||||||
@ -23,11 +23,13 @@
|
|||||||
function init_typeoffields(type)
|
function init_typeoffields(type)
|
||||||
{
|
{
|
||||||
var size = jQuery("#size");
|
var size = jQuery("#size");
|
||||||
|
var unique = jQuery("#unique");
|
||||||
|
var required = jQuery("#required");
|
||||||
if (type == 'date') { size.attr('disabled','disabled'); }
|
if (type == 'date') { size.attr('disabled','disabled'); }
|
||||||
else if (type == 'datetime') { size.attr('disabled','disabled'); }
|
else if (type == 'datetime') { size.attr('disabled','disabled'); }
|
||||||
else if (type == 'double') { size.removeAttr('disabled'); }
|
else if (type == 'double') { size.removeAttr('disabled'); }
|
||||||
else if (type == 'int') { size.removeAttr('disabled'); }
|
else if (type == 'int') { size.removeAttr('disabled'); }
|
||||||
else if (type == 'text') { size.removeAttr('disabled'); }
|
else if (type == 'text') { size.removeAttr('disabled'); unique.attr('disabled','disabled').removeAttr('checked'); }
|
||||||
else if (type == 'varchar') { size.removeAttr('disabled'); }
|
else if (type == 'varchar') { size.removeAttr('disabled'); }
|
||||||
else size.val('').attr('disabled','disabled');
|
else size.val('').attr('disabled','disabled');
|
||||||
}
|
}
|
||||||
@ -52,6 +54,7 @@
|
|||||||
$type=$extrafields->attribute_type[$attrname];
|
$type=$extrafields->attribute_type[$attrname];
|
||||||
$size=$extrafields->attribute_size[$attrname];
|
$size=$extrafields->attribute_size[$attrname];
|
||||||
$unique=$extrafields->attribute_unique[$attrname];
|
$unique=$extrafields->attribute_unique[$attrname];
|
||||||
|
$required=$extrafields->attribute_required[$attrname];
|
||||||
?>
|
?>
|
||||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
||||||
<?php print $type2label[$type]; ?>
|
<?php print $type2label[$type]; ?>
|
||||||
@ -60,7 +63,9 @@ $unique=$extrafields->attribute_unique[$attrname];
|
|||||||
<!-- Size -->
|
<!-- Size -->
|
||||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td><input id="size" type="text" name="size" size="5" value="<?php echo $size; ?>"></td></tr>
|
<tr><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td><input id="size" type="text" name="size" size="5" value="<?php echo $size; ?>"></td></tr>
|
||||||
<!-- Unique -->
|
<!-- Unique -->
|
||||||
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input type="checkbox" name="unique" <?php echo ($unique?' checked="true"':''); ?>"></td></tr>
|
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique" <?php echo ($unique?' checked="true"':''); ?>></td></tr>
|
||||||
|
<!-- Required -->
|
||||||
|
<tr><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required" <?php echo ($required?' checked="true"':''); ?>></td></tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@ -168,7 +168,7 @@ if ($action == 'confirm_deletefile')
|
|||||||
{
|
{
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$result=$ecmdir->fetch($section);
|
$result=$ecmdir->fetch($section);
|
||||||
if (! $result > 0)
|
if (! ($result > 0))
|
||||||
{
|
{
|
||||||
dol_print_error($db,$ecmdir->error);
|
dol_print_error($db,$ecmdir->error);
|
||||||
exit;
|
exit;
|
||||||
@ -396,7 +396,7 @@ print $langs->trans("ECMAreaDesc")."<br>";
|
|||||||
print $langs->trans("ECMAreaDesc2")."<br>";
|
print $langs->trans("ECMAreaDesc2")."<br>";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
// Confirm remove file
|
// Confirm remove file (for non javascript users)
|
||||||
if ($action == 'delete' && empty($conf->use_javascript_ajax))
|
if ($action == 'delete' && empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
|
||||||
|
|||||||
@ -476,7 +476,7 @@ class Export
|
|||||||
require_once $dir.$file;
|
require_once $dir.$file;
|
||||||
$objmodel = new $classname($this->db);
|
$objmodel = new $classname($this->db);
|
||||||
|
|
||||||
if ($sqlquery) $sql = $sqlquery;
|
if (! empty($sqlquery)) $sql = $sqlquery;
|
||||||
else $sql=$this->build_sql($indice, $array_selected, $array_filterValue, $array_filtered);
|
else $sql=$this->build_sql($indice, $array_selected, $array_filterValue, $array_filtered);
|
||||||
|
|
||||||
// Run the sql
|
// Run the sql
|
||||||
|
|||||||
@ -772,6 +772,9 @@ ALTER TABLE llx_entrepot ADD COLUMN import_key varchar(14) AFTER fk_user_author;
|
|||||||
ALTER TABLE llx_product_fournisseur_price ADD COLUMN import_key varchar(14) AFTER fk_user;
|
ALTER TABLE llx_product_fournisseur_price ADD COLUMN import_key varchar(14) AFTER fk_user;
|
||||||
ALTER TABLE llx_product_stock ADD COLUMN import_key varchar(14) AFTER pmp;
|
ALTER TABLE llx_product_stock ADD COLUMN import_key varchar(14) AFTER pmp;
|
||||||
ALTER TABLE llx_societe_rib ADD COLUMN import_key varchar(14) AFTER adresse_proprio;
|
ALTER TABLE llx_societe_rib ADD COLUMN import_key varchar(14) AFTER adresse_proprio;
|
||||||
|
ALTER TABLE llx_categorie_product ADD COLUMN import_key varchar(14) AFTER fk_product;
|
||||||
|
ALTER TABLE llx_categorie_societe ADD COLUMN import_key varchar(14) AFTER fk_societe;
|
||||||
|
ALTER TABLE llx_categorie_fournisseur ADD COLUMN import_key varchar(14) AFTER fk_societe;
|
||||||
|
|
||||||
-- Export filter
|
-- Export filter
|
||||||
ALTER TABLE llx_export_model ADD COLUMN filter text AFTER field;
|
ALTER TABLE llx_export_model ADD COLUMN filter text AFTER field;
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
-- Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
-- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -21,5 +22,6 @@
|
|||||||
create table llx_categorie_fournisseur
|
create table llx_categorie_fournisseur
|
||||||
(
|
(
|
||||||
fk_categorie integer NOT NULL,
|
fk_categorie integer NOT NULL,
|
||||||
fk_societe integer NOT NULL
|
fk_societe integer NOT NUL,
|
||||||
|
import_key varchar(14)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||||
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||||
|
-- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -20,5 +21,6 @@
|
|||||||
create table llx_categorie_product
|
create table llx_categorie_product
|
||||||
(
|
(
|
||||||
fk_categorie integer NOT NULL,
|
fk_categorie integer NOT NULL,
|
||||||
fk_product integer NOT NULL
|
fk_product integer NOT NULL,
|
||||||
|
import_key varchar(14)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||||
|
-- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -19,5 +20,6 @@
|
|||||||
create table llx_categorie_societe
|
create table llx_categorie_societe
|
||||||
(
|
(
|
||||||
fk_categorie integer NOT NULL,
|
fk_categorie integer NOT NULL,
|
||||||
fk_societe integer NOT NULL
|
fk_societe integer NOT NULL,
|
||||||
|
import_key varchar(14)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -67,7 +67,7 @@ create table llx_product
|
|||||||
volume_units tinyint DEFAULT NULL,
|
volume_units tinyint DEFAULT NULL,
|
||||||
stock integer, -- Current physical stock (dernormalized field)
|
stock integer, -- Current physical stock (dernormalized field)
|
||||||
pmp double(24,8) DEFAULT 0 NOT NULL,
|
pmp double(24,8) DEFAULT 0 NOT NULL,
|
||||||
canvas varchar(32) DEFAULT 'default@product',
|
canvas varchar(32) DEFAULT NULL,
|
||||||
finished tinyint DEFAULT NULL,
|
finished tinyint DEFAULT NULL,
|
||||||
hidden tinyint DEFAULT 0, -- Need permission see also hidden products
|
hidden tinyint DEFAULT 0, -- Need permission see also hidden products
|
||||||
import_key varchar(14) -- Import key
|
import_key varchar(14) -- Import key
|
||||||
|
|||||||
@ -1059,14 +1059,14 @@ LDAPServerUseTLS=Usuari TLS
|
|||||||
LDAPServerUseTLSExample=El seu servidor utilitza TLS
|
LDAPServerUseTLSExample=El seu servidor utilitza TLS
|
||||||
LDAPServerDn=DN del servidor
|
LDAPServerDn=DN del servidor
|
||||||
LDAPAdminDn=DN del administrador
|
LDAPAdminDn=DN del administrador
|
||||||
LDAPAdminDnExample=DN complet (ej: cn=adminldap,dc=my-domain,dc=com)
|
LDAPAdminDnExample=DN complet (ej: cn=adminldap,dc=example,dc=com)
|
||||||
LDAPPassword=Contrasenya de l'administrador
|
LDAPPassword=Contrasenya de l'administrador
|
||||||
LDAPUserDn=DN dels usuaris
|
LDAPUserDn=DN dels usuaris
|
||||||
LDAPUserDnExample=DN complet (ej: ou=users,dc=my-domain,dc=com)
|
LDAPUserDnExample=DN complet (ej: ou=users,dc=example,dc=com)
|
||||||
LDAPGroupDn=DN dels grups
|
LDAPGroupDn=DN dels grups
|
||||||
LDAPGroupDnExample=DN complet (ej: ou=groups,dc=my-domain,dc=com)
|
LDAPGroupDnExample=DN complet (ej: ou=groups,dc=example,dc=com)
|
||||||
LDAPServerExample=Adreça del servidor (ej: localhost, 192.168.0.2, ldaps://ldap.example.com/)
|
LDAPServerExample=Adreça del servidor (ej: localhost, 192.168.0.2, ldaps://ldap.example.com/)
|
||||||
LDAPServerDnExample=DN complet (ej: dc=my-domain,dc=com)
|
LDAPServerDnExample=DN complet (ej: dc=example,dc=com)
|
||||||
LDAPPasswordExample=Contrasenya del administrador
|
LDAPPasswordExample=Contrasenya del administrador
|
||||||
LDAPDnSynchroActive=Sincronització d'usuaris i grups
|
LDAPDnSynchroActive=Sincronització d'usuaris i grups
|
||||||
LDAPDnSynchroActiveExample=Sincronització LDAP vers Dolibarr ó Dolibarr vers LDAP
|
LDAPDnSynchroActiveExample=Sincronització LDAP vers Dolibarr ó Dolibarr vers LDAP
|
||||||
@ -1076,9 +1076,9 @@ LDAPDnContactActiveExample=Sincronització activada/desactivada
|
|||||||
LDAPDnMemberActive=Sincronització dels membres
|
LDAPDnMemberActive=Sincronització dels membres
|
||||||
LDAPDnMemberActiveExample=Sincronització activada/desactivada
|
LDAPDnMemberActiveExample=Sincronització activada/desactivada
|
||||||
LDAPContactDn=DN dels contactes Dolibarr
|
LDAPContactDn=DN dels contactes Dolibarr
|
||||||
LDAPContactDnExample=DN complet (ej: ou=contacts,dc=my-domain,dc=com)
|
LDAPContactDnExample=DN complet (ej: ou=contacts,dc=example,dc=com)
|
||||||
LDAPMemberDn=DN dels membres
|
LDAPMemberDn=DN dels membres
|
||||||
LDAPMemberDnExample=DN complet (ex: ou=members,dc=society,dc=com)
|
LDAPMemberDnExample=DN complet (ex: ou=members,dc=example,dc=com)
|
||||||
LDAPMemberObjectClassList=Llista de objectClass
|
LDAPMemberObjectClassList=Llista de objectClass
|
||||||
LDAPMemberObjectClassListExample=Llista de ObjectClass que defineixen els atributs d'un registre (ex: top, inetorgperson o top, user for active directory)
|
LDAPMemberObjectClassListExample=Llista de ObjectClass que defineixen els atributs d'un registre (ex: top, inetorgperson o top, user for active directory)
|
||||||
LDAPUserObjectClassList=Llista de objectClass
|
LDAPUserObjectClassList=Llista de objectClass
|
||||||
@ -1094,6 +1094,7 @@ LDAPTestSynchroContact=Provar la sincronització de contactes
|
|||||||
LDAPTestSynchroUser=Provar la sincronització d'usuaris
|
LDAPTestSynchroUser=Provar la sincronització d'usuaris
|
||||||
LDAPTestSynchroGroup=Provar la sincronització de grups
|
LDAPTestSynchroGroup=Provar la sincronització de grups
|
||||||
LDAPTestSynchroMember=Provar la sincronització de membres
|
LDAPTestSynchroMember=Provar la sincronització de membres
|
||||||
|
LDAPTestSearch=Provar una recerca LDAP
|
||||||
LDAPSynchroOK=Prova de sincronització realitzada correctament
|
LDAPSynchroOK=Prova de sincronització realitzada correctament
|
||||||
LDAPSynchroKO=Prova de sincronització errònia
|
LDAPSynchroKO=Prova de sincronització errònia
|
||||||
LDAPSynchroKOMayBePermissions=Error de la prova de sincronització. Comproveu que la connexió al servidor sigui correcta i que permet les actualitzacions LDAP
|
LDAPSynchroKOMayBePermissions=Error de la prova de sincronització. Comproveu que la connexió al servidor sigui correcta i que permet les actualitzacions LDAP
|
||||||
|
|||||||
@ -113,7 +113,7 @@ VolumeUnitmm3=mm3 (µl)
|
|||||||
VolumeUnitounce=unça
|
VolumeUnitounce=unça
|
||||||
VolumeUnitlitre=litre
|
VolumeUnitlitre=litre
|
||||||
VolumeUnitgallon=galó
|
VolumeUnitgallon=galó
|
||||||
Size=tamany
|
Size=Tamany
|
||||||
SizeUnitm=m
|
SizeUnitm=m
|
||||||
SizeUnitdm=dm
|
SizeUnitdm=dm
|
||||||
SizeUnitcm=cm
|
SizeUnitcm=cm
|
||||||
|
|||||||
@ -1062,12 +1062,12 @@ LDAPServerUseTLS=Usuario TLS
|
|||||||
LDAPServerUseTLSExample=Su servidor utiliza TLS
|
LDAPServerUseTLSExample=Su servidor utiliza TLS
|
||||||
LDAPServerDn=DN del servidor
|
LDAPServerDn=DN del servidor
|
||||||
LDAPAdminDn=DN del administrador
|
LDAPAdminDn=DN del administrador
|
||||||
LDAPAdminDnExample=DN completo (ej: cn=adminldap,dc=my-domain,dc=com)
|
LDAPAdminDnExample=DN completo (ej: cn=adminldap,dc=example,dc=com)
|
||||||
LDAPPassword=Contraseña del administrador
|
LDAPPassword=Contraseña del administrador
|
||||||
LDAPUserDn=DN de los usuarios
|
LDAPUserDn=DN de los usuarios
|
||||||
LDAPUserDnExample=DN completo (ej: ou=users,dc=my-domain,dc=com)
|
LDAPUserDnExample=DN completo (ej: ou=users,dc=example,dc=com)
|
||||||
LDAPGroupDn=DN de los grupos
|
LDAPGroupDn=DN de los grupos
|
||||||
LDAPGroupDnExample=DN completo (ej: ou=groups,dc=my-domain,dc=com)
|
LDAPGroupDnExample=DN completo (ej: ou=groups,dc=example,dc=com)
|
||||||
LDAPServerExample=Dirección del servidor (ej: localhost, 192.168.0.2, ldaps://ldap.example.com/)
|
LDAPServerExample=Dirección del servidor (ej: localhost, 192.168.0.2, ldaps://ldap.example.com/)
|
||||||
LDAPServerDnExample=DN completo (ej: dc=my-domain,dc=com)
|
LDAPServerDnExample=DN completo (ej: dc=my-domain,dc=com)
|
||||||
LDAPPasswordExample=Contraseña del administrador
|
LDAPPasswordExample=Contraseña del administrador
|
||||||
@ -1079,7 +1079,7 @@ LDAPDnContactActiveExample=Sincronización activada/desactivada
|
|||||||
LDAPDnMemberActive=Sincronización de los miembros
|
LDAPDnMemberActive=Sincronización de los miembros
|
||||||
LDAPDnMemberActiveExample=Sincronización activada/desactivada
|
LDAPDnMemberActiveExample=Sincronización activada/desactivada
|
||||||
LDAPContactDn=DN de los contactos Dolibarr
|
LDAPContactDn=DN de los contactos Dolibarr
|
||||||
LDAPContactDnExample=DN completo (ej: ou=contacts,dc=my-domain,dc=com)
|
LDAPContactDnExample=DN completo (ej: ou=contacts,dc=example,dc=com)
|
||||||
LDAPMemberDn=DN de los miembros
|
LDAPMemberDn=DN de los miembros
|
||||||
LDAPMemberDnExample=DN completo (ex: ou=members,dc=society,dc=com)
|
LDAPMemberDnExample=DN completo (ex: ou=members,dc=society,dc=com)
|
||||||
LDAPMemberObjectClassList=Lista de objectClass
|
LDAPMemberObjectClassList=Lista de objectClass
|
||||||
@ -1091,12 +1091,13 @@ LDAPGroupObjectClassListExample=Lista de ObjectClass que definen los atributos d
|
|||||||
LDAPContactObjectClassList=Lista de objectClass
|
LDAPContactObjectClassList=Lista de objectClass
|
||||||
LDAPContactObjectClassListExample=Lista de objectClass que definen los atributos de un registro (ej: top,inetOrgPerson o top,user for active directory)
|
LDAPContactObjectClassListExample=Lista de objectClass que definen los atributos de un registro (ej: top,inetOrgPerson o top,user for active directory)
|
||||||
LDAPMemberTypeDn=DN de los tipos de miembros
|
LDAPMemberTypeDn=DN de los tipos de miembros
|
||||||
LDAPMemberTypeDnExample=DN complet (ej: ou=type_members,dc=society,dc=com)
|
LDAPMemberTypeDnExample=DN complet (ej: ou=type_members,dc=example,dc=com)
|
||||||
LDAPTestConnect=Probar la conexión LDAP
|
LDAPTestConnect=Probar la conexión LDAP
|
||||||
LDAPTestSynchroContact=Probar la sincronización de contactos
|
LDAPTestSynchroContact=Probar la sincronización de contactos
|
||||||
LDAPTestSynchroUser=Probar la sincronización de usuarios
|
LDAPTestSynchroUser=Probar la sincronización de usuarios
|
||||||
LDAPTestSynchroGroup=Probar la sincronización de grupos
|
LDAPTestSynchroGroup=Probar la sincronización de grupos
|
||||||
LDAPTestSynchroMember=Probar la sincronización de miembros
|
LDAPTestSynchroMember=Probar la sincronización de miembros
|
||||||
|
LDAPTestSearch=Probar una búsqueda LDAP
|
||||||
LDAPSynchroOK=Prueba de sincronización realizada correctamente
|
LDAPSynchroOK=Prueba de sincronización realizada correctamente
|
||||||
LDAPSynchroKO=Prueba de sincronización erronea
|
LDAPSynchroKO=Prueba de sincronización erronea
|
||||||
LDAPSynchroKOMayBePermissions=Error de la prueba de sincronización. Compruebe que la conexión al servidor sea correcta y que permite las actualizaciones LDAP
|
LDAPSynchroKOMayBePermissions=Error de la prueba de sincronización. Compruebe que la conexión al servidor sea correcta y que permite las actualizaciones LDAP
|
||||||
@ -1129,7 +1130,7 @@ LDAPFieldCommonNameExample=Ejemplo : cn
|
|||||||
LDAPFieldName=Nombre
|
LDAPFieldName=Nombre
|
||||||
LDAPFieldNameExample=Ejemplo : sn
|
LDAPFieldNameExample=Ejemplo : sn
|
||||||
LDAPFieldFirstName=Nombre
|
LDAPFieldFirstName=Nombre
|
||||||
LDAPFieldFirstNameExample=Ejemplo : givenname
|
LDAPFieldFirstNameExample=Ejemplo : givenName
|
||||||
LDAPFieldMail=E-Mail
|
LDAPFieldMail=E-Mail
|
||||||
LDAPFieldMailExample=Ejemplo : mail
|
LDAPFieldMailExample=Ejemplo : mail
|
||||||
LDAPFieldPhone=Teléfono trabajo
|
LDAPFieldPhone=Teléfono trabajo
|
||||||
|
|||||||
@ -112,7 +112,7 @@ VolumeUnitmm3=mm3 (µl)
|
|||||||
VolumeUnitounce=onza
|
VolumeUnitounce=onza
|
||||||
VolumeUnitlitre=litro
|
VolumeUnitlitre=litro
|
||||||
VolumeUnitgallon=galón
|
VolumeUnitgallon=galón
|
||||||
Size=tamaño
|
Size=Tamaño
|
||||||
SizeUnitm=m
|
SizeUnitm=m
|
||||||
SizeUnitdm=dm
|
SizeUnitdm=dm
|
||||||
SizeUnitcm=cm
|
SizeUnitcm=cm
|
||||||
|
|||||||
@ -101,7 +101,8 @@ print '<td>'.$langs->trans("Label").'</td>';
|
|||||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Unique").'</td>';
|
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||||
|
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||||
print '<td width="80"> </td>';
|
print '<td width="80"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -114,7 +115,8 @@ foreach($extrafields->attribute_type as $key => $value)
|
|||||||
print "<td>".$key."</td>\n";
|
print "<td>".$key."</td>\n";
|
||||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||||
print '<td align="right">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||||
|
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
@ -159,42 +161,7 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
print "<br>";
|
print "<br>";
|
||||||
print_titre($langs->trans("FieldEdition", $attrname));
|
print_titre($langs->trans("FieldEdition", $attrname));
|
||||||
|
|
||||||
/*
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
* formulaire d'edition
|
|
||||||
*/
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?attrname='.$attrname.'">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="attrname" value="'.$attrname.'">';
|
|
||||||
print '<input type="hidden" name="action" value="update">';
|
|
||||||
print '<table summary="listofattributes" class="border" width="100%">';
|
|
||||||
|
|
||||||
// Label
|
|
||||||
print '<tr>';
|
|
||||||
print '<td class="fieldrequired" required>'.$langs->trans("Label").'</td><td class="valeur"><input type="text" name="label" size="40" value="'.$extrafields->attribute_label[$attrname].'"></td>';
|
|
||||||
print '</tr>';
|
|
||||||
// Code
|
|
||||||
print '<tr>';
|
|
||||||
print '<td class="fieldrequired" required>'.$langs->trans("AttributeCode").'</td>';
|
|
||||||
print '<td class="valeur">'.$attrname.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
// Type
|
|
||||||
$type=$extrafields->attribute_type[$attrname];
|
|
||||||
$size=$extrafields->attribute_size[$attrname];
|
|
||||||
print '<tr><td class="fieldrequired" required>'.$langs->trans("Type").'</td>';
|
|
||||||
print '<td class="valeur">';
|
|
||||||
print $type2label[$type];
|
|
||||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
|
||||||
print '</td></tr>';
|
|
||||||
// Size
|
|
||||||
print '<tr><td class="fieldrequired" required>'.$langs->trans("Size").'</td><td class="valeur"><input type="text" name="size" size="5" value="'.$size.'"></td></tr>';
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '<center><br><input type="submit" name="button" class="button" value="'.$langs->trans("Save").'"> ';
|
|
||||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
|
|
||||||
|
|
||||||
print "</form>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -828,7 +828,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(GETPOST('options_'.$key)?GETPOST('options_'.$key):$object->array_options["options_".$key]);
|
$value=(GETPOST('options_'.$key)?GETPOST('options_'.$key):$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -1037,7 +1039,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -240,13 +240,26 @@ class Entrepot extends CommonObject
|
|||||||
* Load warehouse data
|
* Load warehouse data
|
||||||
*
|
*
|
||||||
* @param int $id Warehouse id
|
* @param int $id Warehouse id
|
||||||
|
* @param string $ref Warehouse label
|
||||||
* @return int >0 if OK, <0 if KO
|
* @return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id, $ref='')
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT rowid, label, description, statut, lieu, address, cp as zip, ville as town, fk_pays as country_id";
|
$sql = "SELECT rowid, label, description, statut, lieu, address, cp as zip, ville as town, fk_pays as country_id";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot";
|
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot";
|
||||||
$sql .= " WHERE rowid = ".$id;
|
|
||||||
|
if ($id)
|
||||||
|
{
|
||||||
|
$sql.= " WHERE rowid = '".$id."'";
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$sql.= " WHERE entity = " .$conf->entity;
|
||||||
|
if ($ref) $sql.= " AND label = '".$this->db->escape($ref)."'";
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
dol_syslog(get_class($this)."::fetch sql=".$sql);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|||||||
@ -88,7 +88,8 @@ print '<td>'.$langs->trans("Label").'</td>';
|
|||||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Unique").'</td>';
|
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||||
|
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||||
print '<td width="80"> </td>';
|
print '<td width="80"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -101,7 +102,8 @@ foreach($extrafields->attribute_type as $key => $value)
|
|||||||
print "<td>".$key."</td>\n";
|
print "<td>".$key."</td>\n";
|
||||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||||
print '<td align="right">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||||
|
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
@ -146,42 +148,7 @@ if ($action == 'edit' && ! empty($attrname))
|
|||||||
print "<br>";
|
print "<br>";
|
||||||
print_titre($langs->trans("FieldEdition", $attrname));
|
print_titre($langs->trans("FieldEdition", $attrname));
|
||||||
|
|
||||||
/*
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
* formulaire d'edition
|
|
||||||
*/
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?attrname='.$attrname.'">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="attrname" value="'.$attrname.'">';
|
|
||||||
print '<input type="hidden" name="action" value="update">';
|
|
||||||
print '<table summary="listofattributes" class="border" width="100%">';
|
|
||||||
|
|
||||||
// Label
|
|
||||||
print '<tr>';
|
|
||||||
print '<td class="fieldrequired" required>'.$langs->trans("Label").'</td><td class="valeur"><input type="text" name="label" size="40" value="'.$extrafields->attribute_label[$attrname].'"></td>';
|
|
||||||
print '</tr>';
|
|
||||||
// Code
|
|
||||||
print '<tr>';
|
|
||||||
print '<td class="fieldrequired" required>'.$langs->trans("AttributeCode").'</td>';
|
|
||||||
print '<td class="valeur">'.$attrname.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
// Type
|
|
||||||
$type=$extrafields->attribute_type[$attrname];
|
|
||||||
$size=$extrafields->attribute_size[$attrname];
|
|
||||||
print '<tr><td class="fieldrequired" required>'.$langs->trans("Type").'</td>';
|
|
||||||
print '<td class="valeur">';
|
|
||||||
print $type2label[$type];
|
|
||||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
|
||||||
print '</td></tr>';
|
|
||||||
// Size
|
|
||||||
print '<tr><td class="fieldrequired" required>'.$langs->trans("Size").'</td><td class="valeur"><input type="text" name="size" size="5" value="'.$size.'"></td></tr>';
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '<center><br><input type="submit" name="button" class="button" value="'.$langs->trans("Save").'"> ';
|
|
||||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
|
|
||||||
|
|
||||||
print "</form>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -88,7 +88,8 @@ print '<td>'.$langs->trans("Label").'</td>';
|
|||||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Unique").'</td>';
|
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||||
|
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||||
print '<td width="80"> </td>';
|
print '<td width="80"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -101,7 +102,8 @@ foreach($extrafields->attribute_type as $key => $value)
|
|||||||
print "<td>".$key."</td>\n";
|
print "<td>".$key."</td>\n";
|
||||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||||
print '<td align="right">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||||
|
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|||||||
@ -1757,7 +1757,7 @@ class Societe extends CommonObject
|
|||||||
$dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
|
$dirsociete=array_merge(array('/core/modules/societe/'),$conf->societe_modules);
|
||||||
foreach ($dirsociete as $dirroot)
|
foreach ($dirsociete as $dirroot)
|
||||||
{
|
{
|
||||||
$res=dol_include_once($dirroot.$conf->global->SOCIETE_FOURNISSEUR_ADDON.'.php');
|
$res=dol_include_once($dirroot.$conf->global->SOCIETE_CODEFOURNISSEUR_ADDON.'.php');
|
||||||
if ($res) break;
|
if ($res) break;
|
||||||
}
|
}
|
||||||
$var = $conf->global->SOCIETE_CODEFOURNISSEUR_ADDON;
|
$var = $conf->global->SOCIETE_CODEFOURNISSEUR_ADDON;
|
||||||
|
|||||||
@ -957,7 +957,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
@ -1379,7 +1381,9 @@ else
|
|||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
print '<tr><td';
|
||||||
|
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||||
|
print '>'.$label.'</td><td colspan="3">';
|
||||||
print $extrafields->showInputField($key,$value);
|
print $extrafields->showInputField($key,$value);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.org>
|
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -28,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
|||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
$actionsave=GETPOST("save");
|
$actionsave=GETPOST("save");
|
||||||
$mesg='';
|
|
||||||
|
|
||||||
// Sauvegardes parametres
|
// Sauvegardes parametres
|
||||||
if ($actionsave)
|
if ($actionsave)
|
||||||
@ -45,12 +46,12 @@ if ($actionsave)
|
|||||||
if ($i >= 1)
|
if ($i >= 1)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
setEventMessage($langs->trans("SetupSaved"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
setEventMessage($langs->trans("Error"), 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +81,10 @@ print "</tr>";
|
|||||||
|
|
||||||
print '<tr class="impair">';
|
print '<tr class="impair">';
|
||||||
print '<td class="fieldrequired">'.$langs->trans("KeyForWebServicesAccess").'</td>';
|
print '<td class="fieldrequired">'.$langs->trans("KeyForWebServicesAccess").'</td>';
|
||||||
print '<td><input type="text" class="flat" name="WEBSERVICES_KEY" value="'. (GETPOST('WEBSERVICES_KEY')?GETPOST('WEBSERVICES_KEY'):(! empty($conf->global->WEBSERVICES_KEY)?$conf->global->WEBSERVICES_KEY:'')) . '" size="20"></td>';
|
print '<td><input type="text" class="flat" id="WEBSERVICES_KEY" name="WEBSERVICES_KEY" value="'. (GETPOST('WEBSERVICES_KEY')?GETPOST('WEBSERVICES_KEY'):(! empty($conf->global->WEBSERVICES_KEY)?$conf->global->WEBSERVICES_KEY:'')) . '" size="40">';
|
||||||
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||||
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -92,8 +96,6 @@ print '</center>';
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg);
|
|
||||||
|
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +156,24 @@ print '<br>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print $langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php');
|
print $langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php');
|
||||||
|
|
||||||
$db->close();
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
{
|
||||||
|
print "\n".'<script type="text/javascript">';
|
||||||
|
print '$(document).ready(function () {
|
||||||
|
$("#generate_token").click(function() {
|
||||||
|
$.get( "'.DOL_URL_ROOT.'/core/ajax/security.php", {
|
||||||
|
action: \'getrandompassword\',
|
||||||
|
generic: true
|
||||||
|
},
|
||||||
|
function(token) {
|
||||||
|
$("#WEBSERVICES_KEY").val(token);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});';
|
||||||
|
print '</script>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -144,27 +144,77 @@ class ExportTest extends PHPUnit_Framework_TestCase
|
|||||||
$model='csv';
|
$model='csv';
|
||||||
|
|
||||||
// Build export file
|
// Build export file
|
||||||
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $sql);
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), array(), $sql);
|
||||||
$expectedresult=1;
|
$expectedresult=1;
|
||||||
$this->assertEquals($result,$expectedresult);
|
$this->assertEquals($result,$expectedresult);
|
||||||
|
|
||||||
$model='tsv';
|
$model='tsv';
|
||||||
|
|
||||||
// Build export file
|
// Build export file
|
||||||
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $sql);
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), array(), $sql);
|
||||||
$expectedresult=1;
|
$expectedresult=1;
|
||||||
$this->assertEquals($result,$expectedresult);
|
$this->assertEquals($result,$expectedresult);
|
||||||
|
|
||||||
$model='excel';
|
$model='excel';
|
||||||
|
|
||||||
// Build export file
|
// Build export file
|
||||||
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $sql);
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), array(), $sql);
|
||||||
$expectedresult=1;
|
$expectedresult=1;
|
||||||
$this->assertEquals($result,$expectedresult);
|
$this->assertEquals($result,$expectedresult);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test filtered export function
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testExportFilteredExport()
|
||||||
|
{
|
||||||
|
global $conf,$user,$langs,$db;
|
||||||
|
|
||||||
|
$sql = "SELECT f.facnumber as f_facnumber, f.amount as f_amount, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f";
|
||||||
|
|
||||||
|
$objexport=new Export($db);
|
||||||
|
//$objexport->load_arrays($user,$datatoexport);
|
||||||
|
|
||||||
|
// Define properties
|
||||||
|
$datatoexport='test';
|
||||||
|
$array_selected = array("f.facnumber"=>1, "f.amount"=>2, "f.total"=>3, "f.tva"=>4);
|
||||||
|
$array_export_fields = array("f.facnumber"=>"FacNumber", "f.amount"=>"FacAmount", "f.total"=>"FacTotal", "f.tva"=>"FacVat");
|
||||||
|
$array_filtervalue = array("f.amount" => ">100");
|
||||||
|
$array_filtered = array("f.amount" => 1);
|
||||||
|
$array_alias = array("f_facnumber"=>"facnumber", "f_amount"=>"amount", "f_total"=>"total", "f_tva"=>"tva");
|
||||||
|
$objexport->array_export_fields[0]=$array_export_fields;
|
||||||
|
$objexport->array_export_alias[0]=$array_alias;
|
||||||
|
|
||||||
|
dol_mkdir($conf->export->dir_temp);
|
||||||
|
|
||||||
|
$model='csv';
|
||||||
|
|
||||||
|
// Build export file
|
||||||
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $array_filtered, $sql);
|
||||||
|
$expectedresult=1;
|
||||||
|
$this->assertEquals($result,$expectedresult);
|
||||||
|
|
||||||
|
$model='tsv';
|
||||||
|
|
||||||
|
// Build export file
|
||||||
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $array_filtered, $sql);
|
||||||
|
$expectedresult=1;
|
||||||
|
$this->assertEquals($result,$expectedresult);
|
||||||
|
|
||||||
|
$model='excel';
|
||||||
|
|
||||||
|
// Build export file
|
||||||
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $array_filtered, $sql);
|
||||||
|
$expectedresult=1;
|
||||||
|
$this->assertEquals($result,$expectedresult);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test export function
|
* Test export function
|
||||||
*
|
*
|
||||||
@ -183,7 +233,7 @@ class ExportTest extends PHPUnit_Framework_TestCase
|
|||||||
$result=$objexport->load_arrays($user,$datatoexport);
|
$result=$objexport->load_arrays($user,$datatoexport);
|
||||||
|
|
||||||
// Build export file
|
// Build export file
|
||||||
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $sql);
|
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), array(), $sql);
|
||||||
$expectedresult=1;
|
$expectedresult=1;
|
||||||
$this->assertEquals($result,$expectedresult);
|
$this->assertEquals($result,$expectedresult);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<con:soapui-project name="Dolibarr" soapui-version="3.6.1" abortOnError="false" runType="SEQUENTIAL" resourceRoot="" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrOtherBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrOtherBinding" soapVersion="1_1" anonymous="optional" definition="http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl"><con:part><con:url>http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
|
<con:soapui-project name="Dolibarr" soapui-version="4.0.1" abortOnError="false" runType="SEQUENTIAL" resourceRoot="" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrOtherBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrOtherBinding" soapVersion="1_1" anonymous="optional" definition="http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl"><con:part><con:url>http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||||
<types>
|
<types>
|
||||||
<xsd:schema targetNamespace="http://www.dolibarr.org/ns/">
|
<xsd:schema targetNamespace="http://www.dolibarr.org/ns/">
|
||||||
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
|
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||||
@ -522,7 +522,7 @@
|
|||||||
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
||||||
<sourceapplication xsi:type="xsd:string">aaa</sourceapplication>
|
<sourceapplication xsi:type="xsd:string">aaa</sourceapplication>
|
||||||
<login xsi:type="xsd:string">admin</login>
|
<login xsi:type="xsd:string">admin</login>
|
||||||
<password xsi:type="xsd:string">admin</password>
|
<password xsi:type="xsd:string">changeme</password>
|
||||||
<entity xsi:type="xsd:string"></entity>
|
<entity xsi:type="xsd:string"></entity>
|
||||||
</authentication>
|
</authentication>
|
||||||
<id xsi:type="xsd:string">1</id>
|
<id xsi:type="xsd:string">1</id>
|
||||||
@ -536,7 +536,7 @@
|
|||||||
<ns:getSupplierInvoicesForThirdParty soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
<ns:getSupplierInvoicesForThirdParty soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||||
<authentication xsi:type="ns:authentication">
|
<authentication xsi:type="ns:authentication">
|
||||||
<!--You may enter the following 5 items in any order-->
|
<!--You may enter the following 5 items in any order-->
|
||||||
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
<dolibarrkey xsi:type="xsd:string">?</dolibarrkey>
|
||||||
<sourceapplication xsi:type="xsd:string">?</sourceapplication>
|
<sourceapplication xsi:type="xsd:string">?</sourceapplication>
|
||||||
<login xsi:type="xsd:string">admin</login>
|
<login xsi:type="xsd:string">admin</login>
|
||||||
<password xsi:type="xsd:string">admin</password>
|
<password xsi:type="xsd:string">admin</password>
|
||||||
@ -692,7 +692,7 @@
|
|||||||
<soap:address location="http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php"/>
|
<soap:address location="http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php"/>
|
||||||
</port>
|
</port>
|
||||||
</service>
|
</service>
|
||||||
</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php</con:endpoint></con:endpoints><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#createProductOrService" name="createProductOrService" bindingOperationName="createProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint></con:endpoints><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#createProductOrService" name="createProductOrService" bindingOperationName="createProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
||||||
<soapenv:Header/>
|
<soapenv:Header/>
|
||||||
<soapenv:Body>
|
<soapenv:Body>
|
||||||
<ns:createProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
<ns:createProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||||
@ -733,14 +733,14 @@
|
|||||||
</product>
|
</product>
|
||||||
</ns:createProductOrService>
|
</ns:createProductOrService>
|
||||||
</soapenv:Body>
|
</soapenv:Body>
|
||||||
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#createProductOrService"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#getProductOrService" name="getProductOrService" bindingOperationName="getProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#createProductOrService"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#getProductOrService" name="getProductOrService" bindingOperationName="getProductOrService" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
||||||
<soapenv:Header/>
|
<soapenv:Header/>
|
||||||
<soapenv:Body>
|
<soapenv:Body>
|
||||||
<ns:getProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
<ns:getProductOrService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||||
<authentication xsi:type="ns:authentication">
|
<authentication xsi:type="ns:authentication">
|
||||||
<!--You may enter the following 5 items in any order-->
|
<!--You may enter the following 5 items in any order-->
|
||||||
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
||||||
<sourceapplication xsi:type="xsd:string"></sourceapplication>
|
<sourceapplication xsi:type="xsd:string">?</sourceapplication>
|
||||||
<login xsi:type="xsd:string">admin</login>
|
<login xsi:type="xsd:string">admin</login>
|
||||||
<password xsi:type="xsd:string">admin</password>
|
<password xsi:type="xsd:string">admin</password>
|
||||||
<entity xsi:type="xsd:string"></entity>
|
<entity xsi:type="xsd:string"></entity>
|
||||||
@ -750,27 +750,27 @@
|
|||||||
<ref_ext xsi:type="xsd:string"></ref_ext>
|
<ref_ext xsi:type="xsd:string"></ref_ext>
|
||||||
</ns:getProductOrService>
|
</ns:getProductOrService>
|
||||||
</soapenv:Body>
|
</soapenv:Body>
|
||||||
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getProductOrService"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#getListOfProductsOrServices" name="getListOfProductsOrServices" bindingOperationName="getListOfProductsOrServices" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getProductOrService"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#getListOfProductsOrServices" name="getListOfProductsOrServices" bindingOperationName="getListOfProductsOrServices" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
||||||
<soapenv:Header/>
|
<soapenv:Header/>
|
||||||
<soapenv:Body>
|
<soapenv:Body>
|
||||||
<ns:getListOfProductsOrServices soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
<ns:getListOfProductsOrServices soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||||
<authentication xsi:type="ns:authentication">
|
<authentication xsi:type="ns:authentication">
|
||||||
<!--You may enter the following 5 items in any order-->
|
<!--You may enter the following 5 items in any order-->
|
||||||
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
<dolibarrkey xsi:type="xsd:string">?</dolibarrkey>
|
||||||
<sourceapplication xsi:type="xsd:string">?</sourceapplication>
|
<sourceapplication xsi:type="xsd:string">?</sourceapplication>
|
||||||
<login xsi:type="xsd:string">admin</login>
|
<login xsi:type="xsd:string">?</login>
|
||||||
<password xsi:type="xsd:string">admin</password>
|
<password xsi:type="xsd:string">?</password>
|
||||||
<entity xsi:type="xsd:string"></entity>
|
<entity xsi:type="xsd:string">?</entity>
|
||||||
</authentication>
|
</authentication>
|
||||||
<filterproduct xsi:type="ns:filterproduct">
|
<filterproduct xsi:type="ns:filterproduct">
|
||||||
<!--You may enter the following 3 items in any order-->
|
<!--You may enter the following 3 items in any order-->
|
||||||
<type xsi:type="xsd:string">0</type>
|
<type xsi:type="xsd:string">?</type>
|
||||||
<status_tobuy xsi:type="xsd:string"></status_tobuy>
|
<status_tobuy xsi:type="xsd:string">?</status_tobuy>
|
||||||
<status_tosell xsi:type="xsd:string"></status_tosell>
|
<status_tosell xsi:type="xsd:string">?</status_tosell>
|
||||||
</filterproduct>
|
</filterproduct>
|
||||||
</ns:getListOfProductsOrServices>
|
</ns:getListOfProductsOrServices>
|
||||||
</soapenv:Body>
|
</soapenv:Body>
|
||||||
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getListOfProductsOrServices"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrUserBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrUserBinding" soapVersion="1_1" anonymous="optional" definition="http://localhostdolibarr/webservices/server_user.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhostdolibarr/webservices/server_user.php?wsdl"><con:part><con:url>http://localhostdolibarr/webservices/server_user.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getListOfProductsOrServices"/></con:call></con:operation></con:interface><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="WebServicesDolibarrUserBinding" type="wsdl" bindingName="{http://www.dolibarr.org/ns/}WebServicesDolibarrUserBinding" soapVersion="1_1" anonymous="optional" definition="http://localhostdolibarr/webservices/server_user.php?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhostdolibarr/webservices/server_user.php?wsdl"><con:part><con:url>http://localhostdolibarr/webservices/server_user.php?wsdl</con:url><con:content><![CDATA[<definitions targetNamespace="http://www.dolibarr.org/ns/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.dolibarr.org/ns/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||||
<types>
|
<types>
|
||||||
<xsd:schema targetNamespace="http://www.dolibarr.org/ns/">
|
<xsd:schema targetNamespace="http://www.dolibarr.org/ns/">
|
||||||
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
|
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||||
@ -1028,21 +1028,24 @@
|
|||||||
<soap:address location="http://localhostdolibarr/webservices/server_thirdparty.php"/>
|
<soap:address location="http://localhostdolibarr/webservices/server_thirdparty.php"/>
|
||||||
</port>
|
</port>
|
||||||
</service>
|
</service>
|
||||||
</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhostdolibarr/webservices/server_thirdparty.php</con:endpoint></con:endpoints><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#getThirdParty" name="getThirdParty" bindingOperationName="getThirdParty" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhostdolibarr/webservices/server_thirdparty.php</con:endpoint><con:request><![CDATA[<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
|
</definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://localhostdolibarr/webservices/server_thirdparty.php</con:endpoint></con:endpoints><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#getThirdParty" name="getThirdParty" bindingOperationName="getThirdParty" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhostdolibarr/webservices/server_thirdparty.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
||||||
<SOAP-ENV:Body>
|
<soapenv:Header/>
|
||||||
<ns9290:getVersions xmlns:ns9290="http://www.Dolibarr.org/ns/">
|
<soapenv:Body>
|
||||||
<authentication>
|
<ns:getThirdParty soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||||
|
<authentication xsi:type="ns:authentication">
|
||||||
|
<!--You may enter the following 5 items in any order-->
|
||||||
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
<dolibarrkey xsi:type="xsd:string">dolibarrkey</dolibarrkey>
|
||||||
<sourceapplication xsi:type="xsd:string">PRESTASHOP</sourceapplication>
|
<sourceapplication xsi:type="xsd:string">aaa</sourceapplication>
|
||||||
<login xsi:type="xsd:string">admin</login>
|
<login xsi:type="xsd:string">admin</login>
|
||||||
<password xsi:type="xsd:string">admin</password>
|
<password xsi:type="xsd:string">admin</password>
|
||||||
<entity xsi:type="xsd:string"/>
|
<entity xsi:type="xsd:string"></entity>
|
||||||
</authentication>
|
</authentication>
|
||||||
</ns9290:getVersions>
|
<id xsi:type="xsd:string">1</id>
|
||||||
</SOAP-ENV:Body>
|
<ref xsi:type="xsd:string"></ref>
|
||||||
</SOAP-ENV:Envelope>
|
<ref_ext xsi:type="xsd:string"></ref_ext>
|
||||||
|
</ns:getThirdParty>
|
||||||
]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getVersions"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#createThirdParty" name="createThirdParty" bindingOperationName="createThirdParty" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhostdolibarr/webservices/server_thirdparty.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.dolibarr.org/ns/#getVersions"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="http://www.dolibarr.org/ns/#createThirdParty" name="createThirdParty" bindingOperationName="createThirdParty" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhostdolibarr/webservices/server_thirdparty.php</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.dolibarr.org/ns/">
|
||||||
<soapenv:Header/>
|
<soapenv:Header/>
|
||||||
<soapenv:Body>
|
<soapenv:Body>
|
||||||
<ns:createThirdParty soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
<ns:createThirdParty soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user