From 4b90157aa24cfa6818f18b196b5057b782027c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Fri, 14 Jun 2013 12:27:32 +0200 Subject: [PATCH] switch from print to echo --- htdocs/product/stock/replenish.php | 141 ++++++++++++----------- htdocs/product/stock/replenishorders.php | 107 +++++++++-------- 2 files changed, 124 insertions(+), 124 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 105fe45c739..728c5713261 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -264,23 +264,23 @@ if ($resql) { $num); } - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + echo '', + '', + '', + '', + '', + '', + '', - print ''; + '
'; $param = (isset($type)? '&type=' . $type : ''); $param .= '&fourn_id=' . $fourn_id . '&snom='. $snom; $param .= '&sref=' . $sref; // Lignes des titres - print ''; - print ''; + echo '', + ''; print_liste_field_titre($langs->trans('Ref'), 'replenish.php', 'p.ref', @@ -360,32 +360,32 @@ if ($resql) { $sortfield, $sortorder ); - print ''; - print ''; + echo '', + '', // Lignes des champs de filtre - print ''; - print ''; - print ''; - print ''; + '', + '', + '', + ''; if (!empty($conf->service->enabled) && $type == 1) { - print ''; + echo ''; } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + echo '', + '', + '', + '', + '', + '', + ''; $prod = new Product($db); @@ -410,34 +410,34 @@ if ($resql) { } } } - + $form = new Form($db); $var =! $var; - print ''; - print ''; - print ''; - print ''; - print ''; + echo '', + '', + '', + '', + ''; if (!empty($conf->service->enabled) && $type == 1) { - print ''; + echo ''; } - print ''; - print ''; //depending on conf, use either physical stock or //virtual stock to compute the stock to buy value $stocktobuy = $objp->desiredstock - $stock; - print ''; - print ''; - print ''; - $form = new Form($db); - print '', + '', + '', + '', + '', + ''; - print ''; - print ""; + ), + '', + '', + ''; } $i++; } - print "
 
  
 
 '; - print ''; - print ''; - print ''; - print '
 ', + '', + '', + '', + ''; - print ' '; - print '', + ' ', + '     '; - print ''; - print '
     ', + '', + '
'; $prod->ref = $objp->ref; $prod->id = $objp->rowid; $prod->type = $objp->fk_product_type; - print $prod->getNomUrl(1, '', 16); - print '' . $objp->label . '
', + $prod->getNomUrl(1, '', 16), + '' . $objp->label . ''; if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { - print $regs[1] . ' ' . $langs->trans('DurationYear'); + $duration = $regs[1] . ' ' . $langs->trans('DurationYear'); } elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) { - print $regs[1] . ' ' . $langs->trans('DurationMonth'); + $duration = $regs[1] . ' ' . $langs->trans('DurationMonth'); } elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) { - print $regs[1] . ' ' . $langs->trans('DurationDay'); + $duration = $regs[1] . ' ' . $langs->trans('DurationDay'); } else { - print $objp->duration; + $duration = $objp->duration; } - print '', + $duration, + '' . $objp->desiredstock . ''; + if (!$objp->stock_physique) { $objp->stock_physique = 0; } @@ -461,38 +461,39 @@ if ($resql) { if ($objp->seuil_stock_alerte && ($stock < $objp->seuil_stock_alerte)) { $warn = $langs->trans('StockTooLow'); - print img_warning($warn) . ' '; + $stock = img_warning($warn) . ' ' . $stock; } - print $stock; - print ''.$stocktobuy.''; - print ordered($prod->id); - print ''; - print $form->select_product_fourn_price($prod->id, + echo '' . $objp->desiredstock . '', + $stock, + ''.$stocktobuy.'', + ordered($prod->id), + '', + $form->select_product_fourn_price($prod->id, 'fourn' . $i, 1 - ); - print ' 
 
"; - print ''; - print ''; - print '
'; $value = $langs->trans("CreateOrders"); - print ''; - print '
'; - print '
'; + echo '', + '', + '', + '
', + '', + '
', + ''; if ($num > $conf->liste_limit) { if ($sref || $snom || $sall || GETPOST('search')) { diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index d3fd138b01d..8fd3a110205 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -143,9 +143,9 @@ if ($resql) { '', $num ); - print '
'; - print ''; - print ''; + echo '', + '
', + ''; print_liste_field_titre($langs->trans('Ref'), $_SERVER['PHP_SELF'], 'cf.ref', @@ -200,30 +200,29 @@ if ($resql) { $sortfield, $sortorder ); - print ''; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print '', + '', + '', + '', + '', + '', + '', + ''; - print ''; + echo '', + '', + ''; $var = true; $userstatic = new User($db); @@ -232,54 +231,54 @@ if ($resql) { $obj = $db->fetch_object($resql); $var = !$var; - print ""; - // Ref - print ''; + echo '', + // Ref + ''; // Company - print ''; + echo ''; // Author $userstatic->id = $obj->fk_user_author; $userstatic->login = $obj->login; - print ''; + echo '', // Amount - print ''; + ''; // Date - print ''; + echo '', // Statut - print ''; - print ''; + '', + ''; $i++; } - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + echo '
', + '', + '', + '', + '', + '', + '', + '', + '', + '', + ''; $src = DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png'; $value = dol_escape_htmltag($langs->trans('Search')); - print ''; - print '
'; $href = DOL_URL_ROOT . '/fourn/commande/fiche.php?id=' . $obj->rowid; - print ''; - print img_object($langs->trans('ShowOrder'), 'order') . ' ' . $obj->ref; - print '
', + '', + img_object($langs->trans('ShowOrder'), 'order') . ' ' . $obj->ref, + ''; $href = DOL_URL_ROOT . '/fourn/fiche.php?socid=' . $obj->socid; - print ''; - print img_object($langs->trans('ShowCompany'), 'company') . ' '; - print $obj->nom . '', + '', + img_object($langs->trans('ShowCompany'), 'company'), ' ', + $obj->nom . ''; - if ($userstatic->id) { - print $userstatic->getLoginUrl(1); + $txt = $userstatic->getLoginUrl(1); } else { - print ' '; + $txt = ' '; } - - print '', + $txt, + ''; - print price($obj->total_ttc); - print '', + price($obj->total_ttc), + ''; if ($obj->dc) { - print dol_print_date($db->jdate($obj->dc), 'day'); + $date = dol_print_date($db->jdate($obj->dc), 'day'); } else { - print '-'; + $date = '-'; } - print '', + $date, + ''; - print $commandestatic->LibStatut($obj->fk_statut, 5); - print '
', + $commandestatic->LibStatut($obj->fk_statut, 5), + '
'; - print '
'; + echo '', + ''; $db->free($resql); }