';
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 1bdf4e75e5d..cebe1b60c80 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -217,14 +217,14 @@ if ($id > 0)
print '
';
print '';
// Absolute discounts (Discounts-Drawbacks-Rebates)
@@ -365,7 +365,7 @@ if ($id > 0)
}
print '';
print '';
- print '
';
- }
-
// Multiprice level
if (! empty($conf->global->PRODUIT_MULTIPRICES))
{
@@ -399,7 +385,7 @@ if ($id > 0)
print '
';
- }
-
// Preferred shipping Method
if (! empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD)) {
print '
";
}
@@ -484,8 +440,8 @@ if ($id > 0)
{
$langs->load("members");
$langs->load("users");
- print '
'.$langs->trans("LinkedToDolibarrMember").' ';
+ print '';
$adh=new Adherent($db);
$result=$adh->fetch('','',$object->id);
if ($result > 0)
@@ -503,12 +459,47 @@ if ($id > 0)
print "";
+ print ' ';
+ print '
';
+ print '';
+
+ if ($object->client == 2 || $object->client == 3)
+ {
+ // Level of prospect
+ print '';
+ print '';
+ print ' ';
+ if ($action == 'editlevel')
+ $formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
+ else
+ print $object->getLibProspLevel();
+ print " ";
+ print ' ';
+
+ // Status
+ $object->loadCacheOfProspStatus();
+ print ''.$langs->trans("StatusProsp").' '.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']);
+ print ' ';
+ }
+ print "
";
+
print '';
// Nbre max d'elements des petites listes
- $MAXLIST=$conf->global->MAIN_SIZE_SHORTLISTE_LIMIT;
+ $MAXLIST=$conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
// Lien recap
$outstandingBills = $object->get_OutstandingBill();
@@ -519,14 +510,33 @@ if ($id > 0)
}
print '
';
+
print '';
print ''.$langs->trans("Summary").' ';
print ''.$langs->trans("ShowCustomerPreview").' ';
print ' ';
- print '';
+
+ // Max outstanding bill
+ if ($object->client)
+ {
+ print ' ';
+ print '';
+ print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
+ print ' ';
+ $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
+ print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
+ //if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
+
+ print ' ';
+ print ' ';
+ }
+
+ // Outstanding bill
+ print '';
print ''.$langs->trans("CurrentOutstandingBill").' ';
- print ''.price($outstandingBills).$warn.' ';
+ print ''.price($outstandingBills).$warn.' ';
print ' ';
+
print '
';
print '
';
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 68b59f528bd..bbdb503b873 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -2340,8 +2340,6 @@ if ($action == 'create')
if ($action != 'presend')
{
print '
';
- // print '
';
- // print ' '; // ancre
/*
* Documents generes
@@ -2354,7 +2352,7 @@ if ($action == 'create')
$var = true;
- $somethingshown = $formfile->show_documents('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
+ print $formfile->showdocuments('propal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('propal'));
@@ -2362,14 +2360,12 @@ if ($action == 'create')
print ' ';
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'propal', $socid);
- // print '
';
print '
';
}
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 6730bf99750..313fef16e2c 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2563,7 +2563,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
$genallowed = $user->rights->commande->creer;
$delallowed = $user->rights->commande->supprimer;
- $somethingshown = $formfile->show_documents('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
+ print $formfile->showdocuments('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
// Show links to link elements
diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php
index 3ca8eb21e6e..94686162687 100644
--- a/htdocs/compta/paiement/cheque/card.php
+++ b/htdocs/compta/paiement/cheque/card.php
@@ -801,7 +801,7 @@ if ($action != 'new')
$filedir=$dir.get_exdir($object->ref,0,1,0,$object,'cheque') . dol_sanitizeFileName($object->ref);
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
- $formfile->show_documents('remisecheque', $filename, $filedir, $urlsource, 1, 1);
+ print $formfile->showdocuments('remisecheque', $filename, $filedir, $urlsource, 1, 1);
print '
';
}
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index 31eb96d633f..23242559f1f 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -54,7 +54,6 @@ $confirm = GETPOST('confirm','alpha');
$backtopage = GETPOST('backtopage','alpha');
$id = GETPOST('id','int');
$socid = GETPOST('socid','int');
-if ($user->societe_id) $socid=$user->societe_id;
$object = new Contact($db);
$extrafields = new ExtraFields($db);
@@ -74,6 +73,7 @@ if (! empty($canvas))
}
// Security check
+if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php
index 8c79dfd1580..825c1e8dab5 100644
--- a/htdocs/contact/document.php
+++ b/htdocs/contact/document.php
@@ -37,9 +37,22 @@ $id = GETPOST('id','int');
$action = GETPOST("action");
$confirm = GETPOST('confirm', 'alpha');
+$object = new Contact($db);
+
+// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
+$object->getCanvas($id);
+$objcanvas=null;
+$canvas = (! empty($object->canvas)?$object->canvas:GETPOST("canvas"));
+if (! empty($canvas))
+{
+ require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';
+ $objcanvas = new Canvas($db, $action);
+ $objcanvas->getCanvas('contact', 'contactcard', $canvas);
+}
+
// Security check
if ($user->societe_id) $socid=$user->societe_id;
-$result = restrictedArea($user, 'contact', $id, '','');
+$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission
// Get parameters
$sortfield = GETPOST("sortfield",'alpha');
@@ -54,7 +67,6 @@ $pagenext = $page + 1;
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";
-$object = new Contact($db);
if ($id > 0) $object->fetch($id);
$upload_dir = $conf->societe->dir_output.'/contact/'.dol_sanitizeFileName($object->ref);
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index e8b8a990417..86e45ade086 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -2038,7 +2038,7 @@ else
$var = true;
- $somethingshown = $formfile->show_documents('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
+ print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
// Show links to link elements
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index b5d9ead05e3..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.='
';
- $out.=' ';
+ $events=null;
+
+ if ($conf->use_javascript_ajax && ! $forcecombo)
+ {
+ include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
+ $comboenhancement =ajax_combobox($htmlname, $events, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
+ $out.= $comboenhancement;
+ $nodatarole=($comboenhancement?' data-role="none"':'');
+ }
+
+ $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.=''.$textifempty.' ';
$i = 0;
while ($num && $i < $num)
@@ -3274,7 +3297,7 @@ class Form
* @param string $selectedchoice "" or "no" or "yes"
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
* @param int $height Force height of box
- * @param int $width Force width of bow
+ * @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones.
* @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form
*/
function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=200, $width=500)
@@ -3289,7 +3312,8 @@ class Form
// Clean parameters
$newselectedchoice=empty($selectedchoice)?"no":$selectedchoice;
-
+ if ($conf->browser->layout == 'phone') $width='95%';
+
if (is_array($formquestion) && ! empty($formquestion))
{
// First add hidden fields and value
@@ -4517,7 +4541,7 @@ class Form
}
}
- if ($d && $h) $retstring.=' ';
+ if ($d && $h) $retstring.=($h==2?' ':' ');
if ($h)
{
@@ -4684,7 +4708,7 @@ class Form
}
elseif ($typehour=='text')
{
- $retstring.=' ';
+ $retstring.=' ';
}
else return 'BadValueForParameterTypeHour';
@@ -4707,7 +4731,7 @@ class Form
}
elseif ($typehour=='text')
{
- $retstring.=' ';
+ $retstring.=' ';
}
$retstring.=' '.$langs->trans('MinuteShort');
$retstring.=" ";
@@ -5523,7 +5547,11 @@ class Form
//print "xx".$previous_ref."x".$next_ref;
$ret.='';
- if ($morehtmlleft) $ret.='
'.$morehtmlleft.'
';
+ if ($morehtmlleft)
+ {
+ if ($conf->browser->layout == 'phone') $ret.='
'.$morehtmlleft.'
';
+ else $ret.='
'.$morehtmlleft.'
';
+ }
$ret.='
';
@@ -5727,7 +5755,10 @@ class Form
}
else
{
- $ret.='
';
+ if ($conf->browser->layout != 'phone')
+ {
+ $ret.='
';
+ }
}
}
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 61f4f459091..3ad02cf60c2 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1454,13 +1454,16 @@ class FormFile
global $langs, $conf;
$out='';
- $urladvancedpreview=getAdvancedPreviewUrl($modulepart, $relativepath);
- if ($urladvancedpreview)
+ if ($conf->browser->layout != 'phone')
{
- $out.= '
';
- if (empty($ruleforpicto)) $out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail');
- else $out.= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']);
- $out.= ' ';
+ $urladvancedpreview=getAdvancedPreviewUrl($modulepart, $relativepath); // Return if a file is qualified for preview
+ if ($urladvancedpreview)
+ {
+ $out.= '
';
+ if (empty($ruleforpicto)) $out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail');
+ else $out.= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']);
+ $out.= ' ';
+ }
}
return $out;
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 892c6c1fc2b..921571a478c 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -944,7 +944,6 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
if ($object->element == 'user') $modulepart='userphoto';
if ($object->element == 'product') $modulepart='product';
- print '
';
if ($object->element == 'product')
{
$width=80; $cssclass='photoref';
@@ -958,7 +957,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$nophoto='';
$morehtmlleft.='
';
}
- else {
+ elseif ($conf->browser->layout != 'phone') { // Show no photo link
$nophoto='/public/theme/common/nophoto.png';
$morehtmlleft.='
';
}
@@ -969,21 +968,33 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
{
if ($showimage)
{
- $morehtmlleft.='
';
- if ($modulepart != 'unknown') $morehtmlleft.=$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos);
- else if ($object->element == 'action')
+ if ($modulepart != 'unknown')
{
- $cssclass='photorefcenter';
- $nophoto=img_picto('', 'title_agenda', '', false, 1);
- $morehtmlleft.='
';
+ $phototoshow = $form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos);
+ if ($phototoshow)
+ {
+ $morehtmlleft.='
';
+ $morehtmlleft.=$phototoshow;
+ $morehtmlleft.='
';
+ }
}
- else
+ elseif ($conf->browser->layout != 'phone') // Show no photo link
{
- $width=14; $cssclass='photorefcenter';
- $nophoto=img_picto('', 'object_'.$object->picto, '', false, 1);
- $morehtmlleft.='
';
+ $morehtmlleft.='
';
+ if ($object->element == 'action')
+ {
+ $cssclass='photorefcenter';
+ $nophoto=img_picto('', 'title_agenda', '', false, 1);
+ $morehtmlleft.='
';
+ }
+ else
+ {
+ $width=14; $cssclass='photorefcenter';
+ $nophoto=img_picto('', 'object_'.$object->picto, '', false, 1);
+ $morehtmlleft.='
';
+ }
+ $morehtmlleft.='
';
}
- $morehtmlleft.='
';
}
}
if ($showbarcode) $morehtmlleft.='
'.$form->showbarcode($object).'
';
@@ -1035,6 +1046,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlref.=$langs->trans("TechnicalID").': '.$object->id;
$morehtmlref.='
';
}
+
+ print '
';
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
print '
';
print '
';
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index cb78502f78f..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
@@ -840,7 +840,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
{
// Thirdparty
print '
';
- $thirdpartystatic->id=$lines[$i]->socid;
+ $thirdpartystatic->id=$lines[$i]->thirdparty_id;
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
print $thirdpartystatic->getNomUrl(1, 'project', 10);
print ' ';
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/don/card.php b/htdocs/don/card.php
index c5c5c402af8..125f6ea656e 100644
--- a/htdocs/don/card.php
+++ b/htdocs/don/card.php
@@ -805,7 +805,7 @@ if (! empty($id) && $action != 'edit')
print "
";
- print '
';
+ print '';
/*
* Documents generes
@@ -818,13 +818,11 @@ if (! empty($id) && $action != 'edit')
$var=true;
- print ' ';
- $formfile->show_documents('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
-
- print '
';
-
- print '
';
+ print $formfile->showdocuments('donation',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf);
+ print '
';
}
llxFooter();
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index b64d40eeb4a..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 ''.$langs->trans("Ref").' ';
- print '';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
- print ' ';
-
- // Customer
- print ''.$langs->trans("Customer").' ';
- print ''.$soc->getNomUrl(1).' ';
- print " ";*/
-
// Linked documents
if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled))
{
@@ -1909,7 +1897,7 @@ else if ($id || $ref)
$genallowed=$user->rights->expedition->lire;
$delallowed=$user->rights->expedition->supprimer;
- $somethingshown=$formfile->show_documents('expedition',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
+ print $formfile->showdocuments('expedition',$objectref,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang);
// Show links to link elements
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 '';
-
+ // 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 .= '
';
+ } 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 '
'.$langs->trans("Ref").' ';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
- print " ";
+ print '
';
- // Customer
- print ''.$langs->trans("Customer").' ';
- print ''.$object->thirdparty->getNomUrl(1).' ';
- print " ";
-
- // Linked documents
+ // Linked documents
if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled))
{
- print '';
- $objectsrc=new Commande($db);
- $objectsrc->fetch($object->$typeobject->id);
- print $langs->trans("RefOrder").' ';
- print '';
- print $objectsrc->getNomUrl(1,'commande');
- print " \n";
- print ' ';
+ print '';
+ $objectsrc=new Commande($db);
+ $objectsrc->fetch($object->$typeobject->id);
+ print $langs->trans("RefOrder").' ';
+ print '';
+ print $objectsrc->getNomUrl(1,'commande');
+ print " \n";
+ print ' ';
}
if ($typeobject == 'propal' && $object->$typeobject->id && ! empty($conf->propal->enabled))
{
- print '';
- $objectsrc=new Propal($db);
- $objectsrc->fetch($object->$typeobject->id);
- print $langs->trans("RefProposal").' ';
- print '';
- print $objectsrc->getNomUrl(1,'expedition');
- print " \n";
- print ' ';
+ print '';
+ $objectsrc=new Propal($db);
+ $objectsrc->fetch($object->$typeobject->id);
+ print $langs->trans("RefProposal").' ';
+ print '';
+ print $objectsrc->getNomUrl(1,'expedition');
+ print " \n";
+ print ' ';
}
-
- // Ref expedition client
- print '';
- print '';
- print $langs->trans('RefCustomer').' ';
- print ' ';
- print '
';
- print ' ';
- print $objectsrc->ref_client;
- print ' ';
- print ' ';
-
- // Delivery address
- if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT))
- {
- print '';
- print '';
- 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 '
';
+
+ 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 ''.$langs->trans("Ref").' ';
- print '';
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
- print ' ';
-
- // Customer
- print ''.$langs->trans("Customer").' ';
- print ''.$soc->getNomUrl(1).' ';
- print " ";
-
- // Linked documents
- if ($typeobject == 'commande' && $object->$typeobject->id && ! empty($conf->commande->enabled))
- {
- print '';
- $objectsrc=new Commande($db);
- $objectsrc->fetch($object->$typeobject->id);
- print $langs->trans("RefOrder").' ';
- print '';
- print $objectsrc->getNomUrl(1,'commande');
- print " \n";
- print ' ';
- }
- if ($typeobject == 'propal' && $object->$typeobject->id && ! empty($conf->propal->enabled))
- {
- print '';
- $objectsrc=new Propal($db);
- $objectsrc->fetch($object->$typeobject->id);
- print $langs->trans("RefProposal").' ';
- print '';
- print $objectsrc->getNomUrl(1,'expedition');
- print " \n";
- print ' ';
- }
-
- // Ref customer
- print ''.$langs->trans("RefCustomer").' ';
- print ''.$object->ref_customer." \n";
- print ' ';
-
- // Date creation
- print ''.$langs->trans("DateCreation").' ';
- print ''.dol_print_date($object->date_creation,"day")." \n";
- print ' ';
-
- // Delivery date planed
- print ''.$langs->trans("DateDeliveryPlanned").' ';
- print ''.dol_print_date($object->date_delivery,"dayhourtext")." \n";
- print ' ';
-
- print '
';
-
- 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 .= '
';
+ } 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 '