From 31fcf9aff942ab1760b1bb44f35d082cece331dd Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 10 Dec 2016 22:13:06 +0100 Subject: [PATCH] Fix warehouse presentation --- htdocs/core/lib/stock.lib.php | 2 +- htdocs/product/stock/card.php | 58 +++++++++++++++++------------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php index 758b2e96582..ac59ab230c7 100644 --- a/htdocs/core/lib/stock.lib.php +++ b/htdocs/core/lib/stock.lib.php @@ -35,7 +35,7 @@ function stock_prepare_head($object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/product/stock/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("WarehouseCard"); + $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index ad6ea9d6560..eb853539e01 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -193,7 +193,7 @@ if ($action == 'create') // Ref print ''.$langs->trans("Ref").''; - print ''.$langs->trans("LocationSummary").''; + print ''.$langs->trans("LocationSummary").''; // Parent entrepot print ''.$langs->trans("AddIn").''; @@ -289,30 +289,29 @@ else if (empty($reshook)) $formconfirm.=$hookmanager->resPrint; elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint; } - + // Print form confirm print $formconfirm; - + // Warehouse card $linkback = ''.$langs->trans("BackToList").''; - + $morehtmlref='
'; $morehtmlref.=$langs->trans("LocationSummary").' : '.$object->lieu; $morehtmlref.='
'; - + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'libelle', $morehtmlref); - - + print '
'; print '
'; print '
'; - + print ''; // Parent entrepot $e = new Entrepot($db); if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) { - + print ''; @@ -324,32 +323,32 @@ else $calcproductsunique=$object->nb_different_products(); $calcproducts=$object->nb_products(); - + // Total nb of different products print '"; - + // Nb of products print '"; - + print '
'.$langs->trans("ParentWarehouse").''; print $e->getNomUrl(3); print '
'.$langs->trans("NumberOfDifferentProducts").''; print empty($calcproductsunique['nb'])?'0':$calcproductsunique['nb']; print "
'.$langs->trans("NumberOfProducts").''; $valtoshow=price2num($calcproducts['nb'], 'MS'); print empty($valtoshow)?'0':$valtoshow; print "
'; - + print '
'; print '
'; print '
'; print '
'; - + print ''; - + // Value print '"; - + // Last movement $sql = "SELECT max(m.datem) as datem"; $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; @@ -375,15 +374,15 @@ else print $langs->trans("None"); } print ""; - + print "
'.$langs->trans("EstimatedStockValueShort").''; print price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency); print "
"; print '
'; print '
'; print '
'; - + print '
'; - + dol_fiche_end(); @@ -486,7 +485,7 @@ else $productstatic->entity=$objp->entity; print $productstatic->getNomUrl(1,'stock',16); print ''; - + // Label print ''.$objp->produit.''; @@ -498,7 +497,7 @@ else // Price buy PMP print ''.price(price2num($objp->ppmp,'MU')).''; - + // Total PMP print ''.price(price2num($objp->ppmp*$objp->value,'MT')).''; $totalvalue+=price2num($objp->ppmp*$objp->value,'MT'); @@ -580,41 +579,42 @@ else print ''; // Ref - print ''; + print ''; + + print ''; - print ''; - // Parent entrepot print ''; // Description - print ''; - print ''; // Zip / Town print ''; + print ''; // Country - print ''; - print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'
'.$langs->trans("LocationSummary").'
'.$langs->trans("LocationSummary").'
'.$langs->trans("AddIn").''; print $formproduct->selectWarehouses($object->fk_parent, 'fk_parent', '', 1); print '
'.$langs->trans("Description").''; + print '
'.$langs->trans("Description").''; // Editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor=new DolEditor('desc',$object->description,'',180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,ROWS_5,'90%'); $doleditor->Create(); print '
'.$langs->trans('Address').'
'.$langs->trans('Zip').''; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print '
'.$langs->trans('Town').''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; + print '
'.$langs->trans('Country').''; print $form->select_country($object->country_id?$object->country_id:$mysoc->country_code,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans("Status").''; + print '
'.$langs->trans("Status").''; print '