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

This commit is contained in:
Laurent Destailleur 2012-12-08 14:25:36 +01:00
commit 6a60b78b28
16 changed files with 428 additions and 50 deletions

View File

@ -62,7 +62,14 @@ For users:
- New: Can choose menu entry to show with external site module.
- New: Add hidden option MAIN_PDF_MARGIN_LEFT, MAIN_PDF_MARGIN_RIGHT, MAIN_PDF_MARGIN_TOP, MAIN_PDF_MARGIN_BOTTOM
to force margins of generated PDF.
- New: [ task #314 ] Can define if prof id are mandatory or not
- New: [ task #314 ] Can define if prof id are mandatory or not.
- New: Add button on order card to create intervention from services.
- New: Add search box to find products by supplier reference.
- New: Add option MAIN_HELPCENTER_LINKTOUSE to define target link "I need help" onto logon page.
- New: [ task #608 ] Can clone a supplier order with prices updates
- New: [ task #559 ] Can define a discount % regarding quantity in supplier prices and price by quantity in customer prices
- New: [ task #527 ] After cloning a suplier invoice, go onto invoice ref into edit mode
New experimental modules:
- New: Add margin management module.
- New: Add commissions management module.

View File

@ -0,0 +1,161 @@
<?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/admin/agenda_extrafields.php
* \ingroup agenda
* \brief Page to setup extra fields of agenda
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin)
accessforbidden();
$langs->load("admin");
$langs->load("other");
$extrafields = new ExtraFields($db);
$form = new Form($db);
// List of supported format
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
$action=GETPOST('action', 'alpha');
$attrname=GETPOST('attrname', 'alpha');
$elementtype='actioncomm';
if (!$user->admin) accessforbidden();
/*
* Actions
*/
require DOL_DOCUMENT_ROOT.'/core/admin_extrafields.inc.php';
/*
* View
*/
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
print "<br>\n";
print "<br>\n";
$head=agenda_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Agenda"));
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
print '<br>';
dol_htmloutput_errors($mesg);
// Load attribute_label
$extrafields->fetch_name_optionals_label($elementtype);
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Label").'</td>';
print '<td>'.$langs->trans("AttributeCode").'</td>';
print '<td>'.$langs->trans("Type").'</td>';
print '<td align="right">'.$langs->trans("Size").'</td>';
print '<td align="center">'.$langs->trans("Unique").'</td>';
print '<td align="center">'.$langs->trans("Required").'</td>';
print '<td width="80">&nbsp;</td>';
print "</tr>\n";
$var=True;
foreach($extrafields->attribute_type as $key => $value)
{
$var=!$var;
print "<tr ".$bc[$var].">";
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
print "<td>".$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="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 "&nbsp; <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
print "</tr>";
// $i++;
}
print "</table>";
dol_fiche_end();
// Buttons
if ($action != 'create' && $action != 'edit')
{
print '<div class="tabsAction">';
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute")."</a>";
print "</div>";
}
/* ************************************************************************** */
/* */
/* Creation d'un champ optionnel
/* */
/* ************************************************************************** */
if ($action == 'create')
{
print "<br>";
print_titre($langs->trans('NewAttribute'));
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
/* ************************************************************************** */
/* */
/* Edition d'un champ optionnel */
/* */
/* ************************************************************************** */
if ($action == 'edit' && ! empty($attrname))
{
print "<br>";
print_titre($langs->trans("FieldEdition", $attrname));
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
}
llxFooter();
$db->close();
?>

View File

@ -209,6 +209,25 @@ class ActionComm extends CommonObject
{
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."actioncomm","id");
// Actions on extra fields (by external module or standard code)
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
$hookmanager->initHooks(array('actioncommdao'));
$parameters=array('actcomm'=>$this->id);
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
{
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result=$this->insertExtraFields();
if ($result < 0)
{
$error++;
}
}
}
else if ($reshook < 0) $error++;
if (! $notrigger)
{
// Appel des triggers
@ -343,7 +362,19 @@ class ActionComm extends CommonObject
$sql.= " WHERE id=".$this->id;
dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG);
if ($this->db->query($sql))
$res=$this->db->query($sql);
if ($res < 0) {
$this->error=$this->db->lasterror();
$error++;
}
// Removed extrafields
if (! $error) {
$result=$this->deleteExtraFields($this);
if ($result < 0) $error++;
}
if (!$error)
{
if (! $notrigger)
{
@ -437,6 +468,26 @@ class ActionComm extends CommonObject
dol_syslog(get_class($this)."::update sql=".$sql);
if ($this->db->query($sql))
{
// Actions on extra fields (by external module or standard code)
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
$hookmanager->initHooks(array('actioncommdao'));
$parameters=array('actcomm'=>$this->id);
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
{
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result=$this->insertExtraFields();
if ($result < 0)
{
$error++;
}
}
}
else if ($reshook < 0) $error++;
if (! $notrigger)
{
// Appel des triggers

View File

@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$langs->load("companies");
$langs->load("commercial");
@ -60,6 +61,8 @@ $mesg='';
$cactioncomm = new CActionComm($db);
$actioncomm = new ActionComm($db);
$contact = new Contact($db);
$extrafields = new ExtraFields($db);
//var_dump($_POST);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
@ -202,6 +205,15 @@ if ($action == 'add_action')
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")).'</div>';
}
// Get extra fields
foreach($_POST as $key => $value)
{
if (preg_match("/^options_/",$key))
{
$actioncomm->array_options[$key]=GETPOST($key);
}
}
if (! $error)
{
$db->begin();
@ -332,6 +344,15 @@ if ($action == 'update')
}
$actioncomm->userdone = $userdone;
// Get extra fields
foreach($_POST as $key => $value)
{
if (preg_match("/^options_/",$key))
{
$actioncomm->array_options[$key]=GETPOST($key);
}
}
if (! $error)
{
$db->begin();
@ -375,6 +396,8 @@ llxHeader('',$langs->trans("Agenda"),$help_url);
$form = new Form($db);
$htmlactions = new FormActions($db);
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm');
if ($action == 'create')
{
@ -579,11 +602,30 @@ if ($action == 'create')
print '</td></tr>';
// Other attributes
$parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$actioncomm,$action); // Note that $action and $object may have been modified by hook
print '<tr><td colspan="4">&nbsp;';
print '</td></tr>';
// Other attributes
$parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$actioncomm,$action); // Note that $action and $object may have been modified by hook
print '</table>';
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
print '<br><br><table class="border" width="100%">';
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($actioncomm->array_options["options_".$key])?$actioncomm->array_options["options_".$key]:''));
print '<tr><td';
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
print ' width="30%">'.$label.'</td><td>';
print $extrafields->showInputField($key,$value);
print '</td></tr>'."\n";
}
print '</table><br><br>';
}
print '<center><br>';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
print ' &nbsp; &nbsp; ';
@ -607,6 +649,8 @@ if ($id)
$act = new ActionComm($db);
$result=$act->fetch($id);
$act->fetch_optionals($id,$extralabels);
if ($result < 0)
{
dol_print_error($db,$act->error);
@ -792,8 +836,32 @@ if ($id)
$doleditor->Create();
print '</td></tr>';
// Other attributes
print '<tr><td colspan="4">&nbsp;';
print '</td></tr>';
// Other attributes
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
print '</table>';
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
print '<br><br><table class="border" width="100%">';
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$act->array_options["options_".$key]);
print '<tr><td';
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
print ' width="30%">'.$label.'</td><td>';
print $extrafields->showInputField($key,$value);
print '</td></tr>'."\n";
}
print '</table><br><br>';
}
print '<center><br><input type="submit" class="button" name="edit" value="'.$langs->trans("Save").'">';
print ' &nbsp; &nbsp; <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</center>';
@ -957,11 +1025,28 @@ if ($id)
print dol_htmlentitiesbr($act->note);
print '</td></tr>';
// Other attributes
$parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
print '<tr><td colspan="4">&nbsp;';
print '</td></tr>';
// Other attributes
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
print '</table>';
//Extra field
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
print '<br><br><table class="border" width="100%">';
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($act->array_options['options_'.$key])?$act->array_options['options_'.$key]:''));
print '<tr><td width="30%">'.$label.'</td><td>';
print $extrafields->showOutputField($key,$value);
print "</td></tr>\n";
}
print '</table><br><br>';
}
}
print "</div>\n";

View File

@ -529,7 +529,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
{
if ($conf->use_javascript_ajax && !empty($conf->global->MAIN_JS_ON_PAYMENT))
{
print img_picto($langs->trans('AddRemind'),'rightarrow.png','id="'.$objp->facid.'" "');
print img_picto($langs->trans('AddRemind'),'rightarrow.png','id="'.$objp->facid.'"');
}
print '<input type=hidden name="'.$nameRemain.'" value="'.$remaintopay.'">';
print '<input type="text" size="8" name="'.$namef.'" value="'.$_POST[$namef].'">';

View File

@ -130,7 +130,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
$bon = new BonPrelevement($db,"");
$form = new Form($db);
llxHeader('',$langs->trans("WithdrawalReceipt"));
llxHeader('',$langs->trans("WithdrawalReceipts"));
if ($id > 0)
@ -138,7 +138,7 @@ if ($id > 0)
$bon->fetch($id);
$head = prelevement_prepare_head($bon);
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipt"), '', 'payment');
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipts"), '', 'payment');
if (GETPOST('error','alpha')!='')
{

View File

@ -2067,6 +2067,36 @@ abstract class CommonObject
}
}
/**
* Delete all extra fields values for the current object.
*
* @return void
*/
function deleteExtraFields()
{
global $langs;
$error=0;
$this->db->begin();
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id;
dol_syslog(get_class($this)."::insertExtraFields delete sql=".$sql_del);
$this->db->query($sql_del);
if (! $resql)
{
$this->error=$this->db->lasterror();
dol_syslog(get_class($this)."::delete ".$this->error,LOG_ERR);
$this->db->rollback();
return -1;
}
else
{
$this->db->commit();
return 1;
}
}
/**
* Add/Update all extra fields values for the current object.

View File

@ -379,7 +379,12 @@ class Form
$s="";
if (empty($notabs)) $s.='<table class="nobordernopadding" summary=""><tr>';
if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?'&nbsp;':'').$text.(($direction > 0)?'&nbsp;':'').'</'.$tag.'>';
// Use another method to help avoid having a space in value in order to use this value with jquery
// TODO add this in css
//if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?'&nbsp;':'').$text.(($direction > 0)?'&nbsp;':'').'</'.$tag.'>';
$paramfortooltiptd.= (($direction < 0)?' style="padding-left: 3px !important;"':'');
$paramfortooltiptd.= (($direction > 0)?' style="padding-right: 3px !important;"':'');
if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.'</'.$tag.'>';
if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
if (empty($notabs)) $s.='</tr></table>';
@ -1229,13 +1234,13 @@ class Form
$opt = '';
$optJson = array();
$objp = $this->db->fetch_object($result);
if(!empty($objp->price_by_qty) && $objp->price_by_qty == 1) { // Price by quantity will return many prices for the same product
$sql = "SELECT rowid, quantity, price, unitprice, remise_percent, remise";
$sql.= " FROM ".MAIN_DB_PREFIX."product_price_by_qty";
$sql.= " WHERE fk_product_price=".$objp->price_rowid;
$sql.= " ORDER BY quantity ASC";
dol_syslog(get_class($this)."::select_produits_do search price by qty sql=".$sql);
$result2 = $this->db->query($sql);
if ($result2)
@ -1244,18 +1249,18 @@ class Form
$j = 0;
while ($nb_prices && $j < $nb_prices) {
$objp2 = $this->db->fetch_object($result2);
$objp->quantity = $objp2->quantity;
$objp->price = $objp2->price;
$objp->unitprice = $objp2->unitprice;
$objp->remise_percent = $objp2->remise_percent;
$objp->remise = $objp2->remise;
$objp->price_by_qty_rowid = $objp2->rowid;
$this->_construct_product_list_option($objp, $opt, $optJson, 0, $selected);
$j++;
// Add new entry
// "key" value of json key array is used by jQuery automatically as selected value
// "label" value of json key array is used by jQuery automatically as text for combo box
@ -1290,7 +1295,7 @@ class Form
function _construct_product_list_option(&$objp, &$opt, &$optJson, $price_level, $selected) {
global $langs,$conf,$user,$db;
$outkey='';
$outval='';
$outref='';
@ -1394,7 +1399,7 @@ class Form
$opt.= $langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding
$outval.=$langs->transnoentities("Units");
}
$outprice_ht=price($objp->unitprice);
$outprice_ttc=price($objp->unitprice * (1 + ($objp->tva_tx / 100)));
$outpricebasetype=$objp->price_base_type;
@ -2333,7 +2338,7 @@ class Form
// Clean parameters
$newselectedchoice=empty($selectedchoice)?"no":$selectedchoice;
if (is_array($formquestion) && ! empty($formquestion))
{
$more.='<table class="paddingrightonly" width="100%">'."\n";
@ -2494,7 +2499,7 @@ class Form
}
});
var button = "'.$button.'";
if (button.length > 0) {
$( "#" + button ).click(function() {

View File

@ -384,6 +384,15 @@ function agenda_prepare_head()
$head[$h][2] = 'extsites';
$h++;
complete_head_from_modules($conf,$langs,$object,$head,$h,'agenda_admin');
$head[$h][0] = DOL_URL_ROOT."/admin/agenda_extrafields.php";
$head[$h][1] = $langs->trans("ExtraFields");
$head[$h][2] = 'attributes';
$h++;
complete_head_from_modules($conf,$langs,$object,$head,$h,'agenda_admin','remove');
return $head;
}

View File

@ -2523,6 +2523,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
// Clean parameters
if (empty($amount)) $amount=0; // To have a numeric value if amount not defined or = ''
$amount = (is_numeric($amount)?$amount:0); // Check if amount is numeric, for example, an error occured when amount value = o (letter) instead 0 (number)
if ($rounding < 0) $rounding=min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
$nbdecimal=$rounding;

View File

@ -166,7 +166,9 @@ if ($forgetpasslink || $helpcenterlink) {
}
if ($helpcenterlink) {
echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/support/index.php" target="_blank">';
$url=DOL_URL_ROOT.'/support/index.php';
if (! empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) $url=$conf->global->MAIN_HELPCENTER_LINKTOUSE;
echo '<a style="color: #888888; font-size: 10px" href="'.dol_escape_htmltag($url).'" target="_blank">';
if ($forgetpasslink) {
echo '&nbsp;-&nbsp;';
} else {

View File

@ -817,7 +817,7 @@ if ($step == 4 && $datatoexport)
$list='';
foreach($array_selected as $code=>$value)
{
$list.=($list?', ':'');
$list.=(! empty($list)?', ':'');
$list.=$langs->trans($objexport->array_export_fields[0][$code]);
}
print '<td>'.$list.'</td>';
@ -828,15 +828,18 @@ if ($step == 4 && $datatoexport)
{
print '<tr><td width="25%">'.$langs->trans("FilteredFields").'</td>';
$list='';
foreach($array_filtervalue as $code=>$value)
if (! empty($array_filtervalue))
{
if (isset($objexport->array_export_fields[0][$code]))
foreach($array_filtervalue as $code=>$value)
{
$list.=($list?', ':'');
$list.=$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'')."'";
if (isset($objexport->array_export_fields[0][$code]))
{
$list.=($list?', ':'');
$list.=$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'')."'";
}
}
}
print '<td>'.($list?$list:$langs->trans("None")).'</td>';
print '<td>'.(! empty($list)?$list:$langs->trans("None")).'</td>';
print '</tr>';
}
@ -1046,7 +1049,7 @@ if ($step == 5 && $datatoexport)
$list='';
foreach($array_selected as $code=>$label)
{
$list.=($list?', ':'');
$list.=(! empty($list)?', ':'');
$list.=$langs->trans($objexport->array_export_fields[0][$code]);
}
print '<td>'.$list.'</td></tr>';
@ -1056,15 +1059,18 @@ if ($step == 5 && $datatoexport)
{
print '<tr><td width="25%">'.$langs->trans("FilteredFields").'</td>';
$list='';
foreach($array_filtervalue as $code=>$value)
if (! empty($array_filtervalue))
{
if (isset($objexport->array_export_fields[0][$code]))
foreach($array_filtervalue as $code=>$value)
{
$list.=($list?', ':'');
$list.=$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'')."'";
if (isset($objexport->array_export_fields[0][$code]))
{
$list.=($list?', ':'');
$list.=$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'')."'";
}
}
}
print '<td>'.($list?$list:$langs->trans("None")).'</td>';
print '<td>'.(! empty($list)?$list:$langs->trans("None")).'</td>';
print '</tr>';
}

View File

@ -24,9 +24,9 @@ ProductsAndServicesNotOnSell=Productes i serveis fora de venda
ProductsAndServicesStatistics=Estadístiques productes i serveis
ProductsStatistics=Estadístiques productes
ProductsOnSell=Productes en venda o compra
ProductsNotOnSell=Productes fora de venda o compra
ProductsNotOnSell=Productes fora de venda y compra
ServicesOnSell=Serveis en venda o compra
ServicesNotOnSell=Serveis fora de venda o compra
ServicesNotOnSell=Serveis fora de venda y compra
InternalRef=Referència interna
LastRecorded=Ultims productes/serveis en venda registrats
LastRecordedProductsAndServices=Els %s darrers productes/serveis registrats

View File

@ -24,9 +24,9 @@ ProductsAndServicesNotOnSell=Productos y servicios fuera de venta
ProductsAndServicesStatistics=Estadísticas productos y servicios
ProductsStatistics=Estadísticas productos
ProductsOnSell=Productos en venta o en compra
ProductsNotOnSell=Productos fuera de venta o de compra
ProductsNotOnSell=Productos fuera de venta y de compra
ServicesOnSell=Servicios en venta o en compra
ServicesNotOnSell=Servicios fuera de venta o de compra
ServicesNotOnSell=Servicios fuera de venta y de compra
InternalRef=Referencia interna
LastRecorded=Ultimos productos/servicios en venta registrados
LastRecordedProductsAndServices=Los %s últimos productos/servicios registrados

View File

@ -10,7 +10,7 @@ StandingOrderProcessed=Traités
Withdrawals=Retraits
Withdrawal=Retrait
WithdrawalsReceipts=Bons de prélèvements
WithdrawalReceipt=Bon de prélèvement
WithdrawalReceipts=Bon de prélèvements
WithdrawalReceiptShort=Bon
LastWithdrawalReceipts=Les %s derniers bons de traitement
WithdrawedBills=Factures prélevées
@ -82,7 +82,7 @@ ShowWithdraw=Voir prélèvement
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Toutefois, si la facture a au moins un paiement par prélèvement non traité, elle ne le sera pas afin de permettre la gestion du prélèvement d'abord.
DoStandingOrdersBeforePayments=Cet onglet permet de faire une demande de prélèvement bancaire. Une fois réalisé, vous pourrez saisir le paiement sur la facture pour la clore.
WithdrawalFile=Fichier de prélèvement
SetToStatusSent=Mettre status "Fichier envoyé"
SetToStatusSent=Mettre statut "Fichier envoyé"
ThisWillAlsoAddPaymentOnInvoice=Ceci créera également les paiements sur les factures et les classera payées
### Notifications

View File

@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/ws.lib.php';
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
dol_syslog("Call Dolibarr webservices interfaces");
@ -82,14 +83,8 @@ $server->wsdl->addComplexType(
)
);
// Define other specific objects
$server->wsdl->addComplexType(
'thirdparty',
'complexType',
'struct',
'all',
'',
array(
$thirdparty_fields= array(
'id' => array('name'=>'id','type'=>'xsd:string'),
'ref' => array('name'=>'name','type'=>'xsd:string'),
'ref_ext' => array('name'=>'ref_ext','type'=>'xsd:string'),
@ -123,8 +118,34 @@ $server->wsdl->addComplexType(
'profid6' => array('name'=>'profid6','type'=>'xsd:string'),
'capital' => array('name'=>'capital','type'=>'xsd:string'),
'vat_used' => array('name'=>'vat_used','type'=>'xsd:string'),
'vat_number' => array('name'=>'vat_number','type'=>'xsd:string')
)
'vat_number' => array('name'=>'vat_number','type'=>'xsd:string'));
//Retreive all extrafield for thirdsparty
// fetch optionals attributes and labels
$extrafields=new ExtraFields($db);
$extralabels=$extrafields->fetch_name_optionals_label('company');
foreach($extrafields->attribute_label as $key=>$label)
{
//$value=$object->array_options["options_".$key];
$type =$extrafields->attribute_type[$key];
if ($type=='date' || $type=='datetime') {$type='xsd:dateTime';}
else {$type='xsd:string';}
$extrafield_array = array();
$extrafield_array[$key]=array('name'=>$key,'type'=>$type);
}
$thirdparty_fields=array_merge($thirdparty_fields,$extrafield_array);
// Define other specific objects
$server->wsdl->addComplexType(
'thirdparty',
'complexType',
'struct',
'all',
'',
$thirdparty_fields
);
// Define other specific objects