diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 69d8adc7352..da63720a69c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1615,9 +1615,11 @@ class Form * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) * @param array $ajaxoptions Options for ajax_autocompleter * @param int $socid Thirdparty Id (to get also price dedicated to this customer) + * @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. + * @param int $forcecombo Force to use combo box * @return void */ - function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0) + function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0) { global $langs,$conf; @@ -1650,14 +1652,14 @@ class Form print img_picto($langs->trans("Search"), 'search'); } } - print 'global->PRODUCT_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; + print 'global->PRODUCT_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; if ($hidelabel == 3) { print img_picto($langs->trans("Search"), 'search'); } } else { - print $this->select_produits_list($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0,$socid); + print $this->select_produits_list($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0,$socid,$showempty,$forcecombo); } } @@ -1674,9 +1676,11 @@ class Form * @param int $finished Filter on finished field: 2=No filter * @param int $outputmode 0=HTML select string, 1=Array * @param int $socid Thirdparty Id (to get also price dedicated to this customer) + * @param string $showempty '' to not show empty line. Translation key to show an empty line. '1' show empty line with no text. + * @param int $forcecombo Force to use combo box * @return array Array of keys for json */ - function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0) + function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0) { global $langs,$conf,$user,$db; @@ -1767,8 +1771,27 @@ class Form require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $num = $this->db->num_rows($result); - $out.=''; + + $textifempty=''; + // Do not use textifempty = ' ' or ' ' here, or search on key will search on ' key'. + //if (! empty($conf->use_javascript_ajax) || $forcecombo) $textifempty=''; + if (! empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) + { + if ($showempty && ! is_numeric($showempty)) $textifempty=$langs->trans($showempty); + else $textifempty.=$langs->trans("All"); + } + if ($showempty) $out.=''; $i = 0; while ($num && $i < $num) @@ -4518,7 +4541,7 @@ class Form } } - if ($d && $h) $retstring.=' '; + if ($d && $h) $retstring.=($h==2?'
':' '); if ($h) { @@ -4685,7 +4708,7 @@ class Form } elseif ($typehour=='text') { - $retstring.=''; + $retstring.=''; } else return 'BadValueForParameterTypeHour'; @@ -4708,7 +4731,7 @@ class Form } elseif ($typehour=='text') { - $retstring.=''; + $retstring.=''; } $retstring.=' '.$langs->trans('MinuteShort'); $retstring.=" "; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index d009ac793a0..173aee8ce26 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -406,14 +406,14 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // Title of task print ""; if ($showlineingray) print ''; - else print ''; + //else print ''; for ($k = 0 ; $k < $level ; $k++) { print "     "; } print $lines[$i]->label; if ($showlineingray) print ''; - else print ''; + //else print ''; print "\n"; // Date start diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index a6091f8ebb0..06eb19de48e 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; */ function shipping_prepare_head($object) { - global $langs, $conf, $user; + global $db, $langs, $conf, $user; $langs->load("sendings"); $langs->load("deliveries"); @@ -64,7 +64,13 @@ function shipping_prepare_head($object) if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { - $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); + $objectsrc = $object; + if ($object->origin == 'commande' && $object->origin_id > 0) + { + $objectsrc = new Commande($db); + $objectsrc->fetch($object->origin_id); + } + $nbContact = count($objectsrc->liste_contact(-1,'internal')) + count($objectsrc->liste_contact(-1,'external')); $head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id; $head[$h][1] = $langs->trans("ContactsAddresses"); if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.''; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 37b9f8a7248..fb45993f567 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1295,7 +1295,7 @@ else if ($id || $ref) $totalVolume=$tmparray['volume']; - // Warehouse card + // Shipment card $linkback = ''.$langs->trans("BackToList").''; $morehtmlref='
'; @@ -1348,18 +1348,6 @@ else if ($id || $ref) print ''; - // Ref - /* - print ''; - print ''; - - // Customer - print ''; - print ''; - print "";*/ - // Linked documents if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled)) { diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index 039af2cd0ec..65a44cb64f9 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -155,83 +155,99 @@ if ($id > 0 || ! empty($ref)) dol_fiche_head($head, 'contact', $langs->trans("Shipment"), 0, 'sending'); - /* - * Facture synthese pour rappel - */ - print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); - print '
'.$langs->trans("Customer").''.$soc->getNomUrl(1).'
'; - + // Shipment card $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref='
'; + // Ref customer shipment + $morehtmlref.=$form->editfieldkey("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + // Project + /* + if (! empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '
' . $langs->trans('Project') . ' '; + if ($user->rights->supplier_proposal->creer) { + if ($action != 'classify') { + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= ''; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref.='
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + //print '
'; + print '
'; - // Ref - print '
"; + print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); - print "
'; - // Customer - print ''; - print ''; - print ""; - - // Linked documents + // Linked documents if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled)) { - print ''; - print '\n"; - print ''; + print ''; + print '\n"; + print ''; } if ($typeobject == 'propal' && $object->$typeobject->id && ! empty($conf->propal->enabled)) { - print ''; - print '\n"; - print ''; + print ''; + print '\n"; + print ''; } - - // Ref expedition client - print ''; - print ''; - - // Delivery address - if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)) - { - print ''; - } - + print "
'.$langs->trans("Customer").''.$object->thirdparty->getNomUrl(1).'
'; - $objectsrc=new Commande($db); - $objectsrc->fetch($object->$typeobject->id); - print $langs->trans("RefOrder").''; - print $objectsrc->getNomUrl(1,'commande'); - print "
'; + $objectsrc=new Commande($db); + $objectsrc->fetch($object->$typeobject->id); + print $langs->trans("RefOrder").''; + print $objectsrc->getNomUrl(1,'commande'); + print "
'; - $objectsrc=new Propal($db); - $objectsrc->fetch($object->$typeobject->id); - print $langs->trans("RefProposal").''; - print $objectsrc->getNomUrl(1,'expedition'); - print "
'; + $objectsrc=new Propal($db); + $objectsrc->fetch($object->$typeobject->id); + print $langs->trans("RefProposal").''; + print $objectsrc->getNomUrl(1,'expedition'); + print "
'; - print ''; - print '
'; - print $langs->trans('RefCustomer').''; - print '
'; - print '
'; - print $objectsrc->ref_client; - print '
'; - print ''; - - if ($action != 'editdelivery_address' && $object->brouillon) print ''; - print '
'; - print $langs->trans('DeliveryAddress'); - print 'socid.'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDeliveryAddress'),1).'
'; - print '
'; - - if ($action == 'editdelivery_address') - { - $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','shipping',$object->id); - } - else - { - $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','shipping',$object->id); - } - print '
"; + + //print '
'; + //print '
'; + //print '
'; + //print '
'; + + + //print '
'; + //print '
'; + print ''; + + print '
'; + + dol_fiche_end(); // Lignes de contacts diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 652b09453f7..849ec6e66bc 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -20,9 +20,9 @@ /** * \file htdocs/expedition/note.php -* \ingroup expedition -* \brief Note card expedition -*/ + * \ingroup expedition + * \brief Note card expedition + */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; @@ -99,65 +99,57 @@ if ($id > 0 || ! empty($ref)) $head=shipping_prepare_head($object); dol_fiche_head($head, 'note', $langs->trans("Shipment"), 0, 'sending'); - print ''; - - $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; - print ''; - - // Customer - print ''; - print ''; - print ""; - - // Linked documents - if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled)) - { - print ''; - print '\n"; - print ''; - } - if ($typeobject == 'propal' && $object->$typeobject->id && ! empty($conf->propal->enabled)) - { - print ''; - print '\n"; - print ''; - } - - // Ref customer - print ''; - print '\n"; - print ''; - - // Date creation - print ''; - print '\n"; - print ''; - - // Delivery date planed - print ''; - print '\n"; - print ''; - - print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); - print '
'.$langs->trans("Customer").''.$soc->getNomUrl(1).'
'; - $objectsrc=new Commande($db); - $objectsrc->fetch($object->$typeobject->id); - print $langs->trans("RefOrder").''; - print $objectsrc->getNomUrl(1,'commande'); - print "
'; - $objectsrc=new Propal($db); - $objectsrc->fetch($object->$typeobject->id); - print $langs->trans("RefProposal").''; - print $objectsrc->getNomUrl(1,'expedition'); - print "
'.$langs->trans("RefCustomer").''.$object->ref_customer."
'.$langs->trans("DateCreation").''.dol_print_date($object->date_creation,"day")."
'.$langs->trans("DateDeliveryPlanned").''.dol_print_date($object->date_delivery,"dayhourtext")."
'; - - print '
'; - - $colwidth=20; + + // Shipment card + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref='
'; + // Ref customer shipment + $morehtmlref.=$form->editfieldkey("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", '', $object->ref_customer, $object, $user->rights->expedition->creer, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + // Project + /* + if (! empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '
' . $langs->trans('Project') . ' '; + if ($user->rights->supplier_proposal->creer) { + if ($action != 'classify') { + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + } + if ($action == 'classify') { + // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref.='
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + + $cssclass='titlefield'; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; dol_fiche_end(); diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index cc5e770d02a..a8a19582b43 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -234,7 +234,8 @@ print '
'; // Show filter box print '
'; print ''; - print ''; + + print '
'; print ''; // Company print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -259,8 +260,8 @@ print '
'; print '

'; //} -print ''; -print ''; +print '
'; +print ''; print ''; print ''; /*print ''; @@ -268,13 +269,16 @@ print '';*/ print ''; $oldyear=0; +$var=true; foreach ($data as $val) { $year = $val['year']; while (! empty($year) && $oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + + $var=!$var; + print ''; print ''; print ''; @@ -283,7 +287,8 @@ foreach ($data as $val) print ''; } - print ''; + $var=!$var; + print ''; print ''; print ''; /*print ''; diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 6f71e964321..01ada4f3185 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -37,7 +37,12 @@ $lastftpentry=0; $action = GETPOST('action','alpha'); $entry = GETPOST('numero_entry','alpha'); -// Positionne la variable pour le nombre de rss externes + +/* + * Action + */ + +// Get value for $lastftpentry $sql ="select MAX(name) as name from ".MAIN_DB_PREFIX."const"; $sql.=" WHERE name like 'FTP_SERVER_%'"; $result=$db->query($sql); @@ -210,8 +215,6 @@ else '."\n"; - $sql ="select name, value, note from ".MAIN_DB_PREFIX."const"; $sql.=" WHERE name like 'FTP_SERVER_%'"; $sql.=" ORDER BY name"; @@ -235,9 +238,13 @@ else print ""; print ''; + print ''; + + print '
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").'
'.$oldyear.'0
'.$year.''.$val['nb'].''.price(price2num($val['total'],'MT'),1).'
'."\n"; - print ""; - print ""; + print ''; + print '"; + print ''; print ""; $var=!$var; @@ -281,12 +288,14 @@ else print "trans("Modify")."\">"; print "   "; print "trans("Delete")."\">"; - print ""; print ""; print ""; + print '
".$langs->trans("FTP")." ".($idrss)."
'.$langs->trans("FTP")." ".($idrss)."
'; + print ""; - + print '
'; + $i++; } } @@ -294,9 +303,6 @@ else { dol_print_error($db); } - - print '
'; - } llxFooter(); diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index b3dc15125a5..4658e9d09ec 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2008-2016 Laurent Destailleur * Copyright (C) 2008-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -20,7 +20,6 @@ * \file htdocs/ftp/index.php * \ingroup ftp * \brief Main page for FTP section area - * \author Laurent Destailleur */ require('../main.inc.php'); @@ -418,7 +417,6 @@ else if ($action == 'delete_section') { print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1); - } print $langs->trans("Server").': '.$ftp_server.'
'; @@ -646,8 +644,21 @@ else } else { - $s_ftp_server='FTP_SERVER_1'; - if (empty($s_ftp_server)) + $foundsetup=false; + $MAXFTP=20; + $i=1; + while ($i <= $MAXFTP) + { + $paramkey='FTP_NAME_'.$i; + //print $paramkey; + if (! empty($conf->global->$paramkey)) + { + $foundsetup=true; + break; + } + $i++; + } + if (! $foundsetup) { print $langs->trans("SetupOfFTPClientModuleNotComplete"); } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index ca53bc971a9..ad8f09205b7 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -58,8 +58,8 @@ ErrorCodeCantContainZero=Code can't contain value 0 DisableJavascript=Disable JavaScript and Ajax functions (Recommended for blind person or text browsers) UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -DelaiedFullListToSelectCompany=Wait you press a key before loading content of thirdparties combo list (This may increase performance if you have a large number of thirdparties) -DelaiedFullListToSelectContact=Wait you press a key before loading content of contact combo list (This may increase performance if you have a large number of contact) +DelaiedFullListToSelectCompany=Wait you press a key before loading content of thirdparties combo list (This may increase performance if you have a large number of thirdparties, but it is less convenient) +DelaiedFullListToSelectContact=Wait you press a key before loading content of contact combo list (This may increase performance if you have a large number of contact, but it is less convenient) NumberOfKeyToSearch=Nbr of characters to trigger search: %s NotAvailableWhenAjaxDisabled=Not available when Ajax disabled AllowToSelectProjectFromOtherCompany=On document of a third party, can choose a project linked to another third party @@ -1320,7 +1320,7 @@ ViewProductDescInFormAbility=Visualization of product descriptions in the forms MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal ViewProductDescInThirdpartyLanguageAbility=Visualization of products descriptions in the third party language UseSearchToSelectProductTooltip=Also if you have a large number of product (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectProduct=Use a search form to choose a product (rather than a drop-down list). +UseSearchToSelectProduct=Wait you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient) SetDefaultBarcodeTypeProducts=Default barcode type to use for products SetDefaultBarcodeTypeThirdParties=Default barcode type to use for third parties UseUnits=Define a unit of measure for Quantity during order, proposal or invoice lines edition diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 14a5219d31c..2675e3c95b0 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -94,7 +94,7 @@ dol_fiche_head($head, 'agentMargins', $titre, 0, $picto); print ''; print ''; -print ''; diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index 54b83aca42c..34463db14e2 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -90,7 +90,7 @@ if ($socid > 0) { if ($soc->client) { print ''; - print ''; @@ -102,7 +102,7 @@ if ($socid > 0) { } else { print ''; - print ''; diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index 7a2ac98a5f8..24150a1050c 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -105,20 +105,17 @@ print '
'.$langs->trans('SalesRepresentative').''; +print ''; print $form->select_dolusers($agentid, 'agentid', 1, '', $user->rights->margins->read->all ? 0 : 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans('ThirdPartyName').''; + print ''; print $form->select_company($socid, 'socid', 'client=1 OR client=3', 1, 0, 0); //$form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$socid,$socid,'socid','client=1 OR client=3',1,0,1); print '
'.$langs->trans('ThirdPartyName').''; + print ''; print $form->select_company(null, 'socid', 'client=1 OR client=3', 1, 0, 0); //$form->form_thirdparty($_SERVER['PHP_SELF'],null,'socid','client=1 OR client=3',1,0,1); print '
'; if ($id > 0) { print ''; - print ''; - print ''; - print ''; - if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="f.datef"; } else { print ''; - print ''; } @@ -339,10 +336,6 @@ print '
'.$langs->trans('ChooseProduct/Service').''; - print $form->select_produits($id,'id','',20,0,1,2,'',1); + print ''; + print $form->select_produits($id,'id','',20,0,1,2,'',1, array(), 0, 'All'); print '
'.$langs->trans('AllProducts').'
'.$langs->trans('ChooseProduct/Service').''; - print $form->select_produits('','id','',20,0,1,2,'',1); + print ''; + print $form->select_produits('','id','',20,0,1,2,'',1, array(), 0, 'All'); print '