switch from print to echo
This commit is contained in:
parent
7abf23c471
commit
4b90157aa2
@ -264,23 +264,23 @@ if ($resql) {
|
|||||||
$num);
|
$num);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form action="replenish.php" method="post" name="formulaire">';
|
echo '<form action="replenish.php" method="post" name="formulaire">',
|
||||||
print '<input type="hidden" name="token" value="' .$_SESSION['newtoken'] . '">';
|
'<input type="hidden" name="token" value="' .$_SESSION['newtoken'] . '">',
|
||||||
print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
|
'<input type="hidden" name="sortfield" value="' . $sortfield . '">',
|
||||||
print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
|
'<input type="hidden" name="sortorder" value="' . $sortorder . '">',
|
||||||
print '<input type="hidden" name="type" value="' . $type . '">';
|
'<input type="hidden" name="type" value="' . $type . '">',
|
||||||
print '<input type="hidden" name="linecount" value="' . $num . '">';
|
'<input type="hidden" name="linecount" value="' . $num . '">',
|
||||||
print '<input type="hidden" name="action" value="order">';
|
'<input type="hidden" name="action" value="order">',
|
||||||
|
|
||||||
print '<table class="liste" width="100%">';
|
'<table class="liste" width="100%">';
|
||||||
|
|
||||||
$param = (isset($type)? '&type=' . $type : '');
|
$param = (isset($type)? '&type=' . $type : '');
|
||||||
$param .= '&fourn_id=' . $fourn_id . '&snom='. $snom;
|
$param .= '&fourn_id=' . $fourn_id . '&snom='. $snom;
|
||||||
$param .= '&sref=' . $sref;
|
$param .= '&sref=' . $sref;
|
||||||
|
|
||||||
// Lignes des titres
|
// Lignes des titres
|
||||||
print '<tr class="liste_titre">';
|
echo '<tr class="liste_titre">',
|
||||||
print '<td> </td>';
|
'<td> </td>';
|
||||||
print_liste_field_titre($langs->trans('Ref'),
|
print_liste_field_titre($langs->trans('Ref'),
|
||||||
'replenish.php',
|
'replenish.php',
|
||||||
'p.ref',
|
'p.ref',
|
||||||
@ -360,32 +360,32 @@ if ($resql) {
|
|||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
print '<td> </td>';
|
echo '<td> </td>',
|
||||||
print '</tr>';
|
'</tr>',
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<tr class="liste_titre">';
|
'<tr class="liste_titre">',
|
||||||
print '<td class="liste_titre"> </td>';
|
'<td class="liste_titre"> </td>',
|
||||||
print '<td class="liste_titre">';
|
'<td class="liste_titre">',
|
||||||
print '<input class="flat" type="text" name="sref" value="' . $sref . '">';
|
'<input class="flat" type="text" name="sref" value="' . $sref . '">',
|
||||||
print '</td>';
|
'</td>',
|
||||||
print '<td class="liste_titre">';
|
'<td class="liste_titre">',
|
||||||
print '<input class="flat" type="text" name="snom" value="' . $snom . '">';
|
'<input class="flat" type="text" name="snom" value="' . $snom . '">',
|
||||||
print '</td>';
|
'</td>';
|
||||||
if (!empty($conf->service->enabled) && $type == 1) {
|
if (!empty($conf->service->enabled) && $type == 1) {
|
||||||
print '<td class="liste_titre">';
|
echo '<td class="liste_titre">',
|
||||||
print ' ';
|
' ',
|
||||||
print '</td>';
|
'</td>';
|
||||||
}
|
}
|
||||||
print '<td class="liste_titre"> </td>';
|
echo '<td class="liste_titre"> </td>',
|
||||||
print '<td class="liste_titre"> </td>';
|
'<td class="liste_titre"> </td>',
|
||||||
print '<td class="liste_titre" align="right"> </td>';
|
'<td class="liste_titre" align="right"> </td>',
|
||||||
print '<td class="liste_titre"> </td>';
|
'<td class="liste_titre"> </td>',
|
||||||
print '<td class="liste_titre"> </td>';
|
'<td class="liste_titre"> </td>',
|
||||||
print '<td class="liste_titre" align="right">';
|
'<td class="liste_titre" align="right">',
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" alt="' . $langs->trans("Search") . '">';
|
'<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" alt="' . $langs->trans("Search") . '">',
|
||||||
print '</td>';
|
'</td>',
|
||||||
print '</tr>';
|
'</tr>';
|
||||||
|
|
||||||
$prod = new Product($db);
|
$prod = new Product($db);
|
||||||
|
|
||||||
@ -410,34 +410,34 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$form = new Form($db);
|
||||||
$var =! $var;
|
$var =! $var;
|
||||||
print '<tr ' . $bc[$var] . '>';
|
|
||||||
print '<td><input type="checkbox" name="' . $i . '"></td>';
|
|
||||||
print '<td class="nowrap">';
|
|
||||||
$prod->ref = $objp->ref;
|
$prod->ref = $objp->ref;
|
||||||
$prod->id = $objp->rowid;
|
$prod->id = $objp->rowid;
|
||||||
$prod->type = $objp->fk_product_type;
|
$prod->type = $objp->fk_product_type;
|
||||||
print $prod->getNomUrl(1, '', 16);
|
echo '<tr ' . $bc[$var] . '>',
|
||||||
print '</td>';
|
'<td><input type="checkbox" name="' . $i . '"></td>',
|
||||||
print '<td>' . $objp->label . '</td>';
|
'<td class="nowrap">',
|
||||||
print '<input type="hidden" name="desc' . $i . '" value="' . $objp->label . '" >';
|
$prod->getNomUrl(1, '', 16),
|
||||||
|
'</td>',
|
||||||
|
'<td>' . $objp->label . '</td>',
|
||||||
|
'<input type="hidden" name="desc' . $i . '" value="' . $objp->label . '" >';
|
||||||
|
|
||||||
if (!empty($conf->service->enabled) && $type == 1) {
|
if (!empty($conf->service->enabled) && $type == 1) {
|
||||||
print '<td align="center">';
|
|
||||||
if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) {
|
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)) {
|
} 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)) {
|
} elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) {
|
||||||
print $regs[1] . ' ' . $langs->trans('DurationDay');
|
$duration = $regs[1] . ' ' . $langs->trans('DurationDay');
|
||||||
} else {
|
} else {
|
||||||
print $objp->duration;
|
$duration = $objp->duration;
|
||||||
}
|
}
|
||||||
print '</td>';
|
echo '<td align="center">',
|
||||||
|
$duration,
|
||||||
|
'</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">' . $objp->desiredstock . '</td>';
|
|
||||||
print '<td align="right">';
|
|
||||||
if (!$objp->stock_physique) {
|
if (!$objp->stock_physique) {
|
||||||
$objp->stock_physique = 0;
|
$objp->stock_physique = 0;
|
||||||
}
|
}
|
||||||
@ -461,38 +461,39 @@ if ($resql) {
|
|||||||
if ($objp->seuil_stock_alerte
|
if ($objp->seuil_stock_alerte
|
||||||
&& ($stock < $objp->seuil_stock_alerte)) {
|
&& ($stock < $objp->seuil_stock_alerte)) {
|
||||||
$warn = $langs->trans('StockTooLow');
|
$warn = $langs->trans('StockTooLow');
|
||||||
print img_warning($warn) . ' ';
|
$stock = img_warning($warn) . ' ' . $stock;
|
||||||
}
|
}
|
||||||
print $stock;
|
|
||||||
print '</td>';
|
|
||||||
//depending on conf, use either physical stock or
|
//depending on conf, use either physical stock or
|
||||||
//virtual stock to compute the stock to buy value
|
//virtual stock to compute the stock to buy value
|
||||||
$stocktobuy = $objp->desiredstock - $stock;
|
$stocktobuy = $objp->desiredstock - $stock;
|
||||||
print '<td align="right">'.$stocktobuy.'</td>';
|
echo '<td align="right">' . $objp->desiredstock . '</td>',
|
||||||
print '<input type="hidden" name="tobuy' . $i . '" value="' . $stocktobuy . '" >';
|
'<td align="right">',
|
||||||
print '<td align="right">';
|
$stock,
|
||||||
print ordered($prod->id);
|
'</td>',
|
||||||
print '</td>';
|
'<td align="right">'.$stocktobuy.'</td>',
|
||||||
$form = new Form($db);
|
'<input type="hidden" name="tobuy' . $i . '" value="' . $stocktobuy . '" >',
|
||||||
print '<td align="right">';
|
'<td align="right">',
|
||||||
print $form->select_product_fourn_price($prod->id,
|
ordered($prod->id),
|
||||||
|
'</td>',
|
||||||
|
'<td align="right">',
|
||||||
|
$form->select_product_fourn_price($prod->id,
|
||||||
'fourn' . $i,
|
'fourn' . $i,
|
||||||
1
|
1
|
||||||
);
|
),
|
||||||
print '</td>';
|
'</td>',
|
||||||
print '<td> </td>';
|
'<td> </td>',
|
||||||
print "</tr>";
|
'</tr>';
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
|
||||||
print '</div>';
|
|
||||||
print '<table width="100%">';
|
|
||||||
print '<tr><td align="right">';
|
|
||||||
$value = $langs->trans("CreateOrders");
|
$value = $langs->trans("CreateOrders");
|
||||||
print '<input class="butAction" type="submit" value="' . $value . '">';
|
echo '</table>',
|
||||||
print '</td></tr></table>';
|
'</div>',
|
||||||
print '</form>';
|
'<table width="100%">',
|
||||||
|
'<tr><td align="right">',
|
||||||
|
'<input class="butAction" type="submit" value="' . $value . '">',
|
||||||
|
'</td></tr></table>',
|
||||||
|
'</form>';
|
||||||
|
|
||||||
if ($num > $conf->liste_limit) {
|
if ($num > $conf->liste_limit) {
|
||||||
if ($sref || $snom || $sall || GETPOST('search')) {
|
if ($sref || $snom || $sall || GETPOST('search')) {
|
||||||
|
|||||||
@ -143,9 +143,9 @@ if ($resql) {
|
|||||||
'',
|
'',
|
||||||
$num
|
$num
|
||||||
);
|
);
|
||||||
print '<form action="replenishorders.php" method="GET">';
|
echo '<form action="replenishorders.php" method="GET">',
|
||||||
print '<table class="noborder" width="100%">';
|
'<table class="noborder" width="100%">',
|
||||||
print '<tr class="liste_titre">';
|
'<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans('Ref'),
|
print_liste_field_titre($langs->trans('Ref'),
|
||||||
$_SERVER['PHP_SELF'],
|
$_SERVER['PHP_SELF'],
|
||||||
'cf.ref',
|
'cf.ref',
|
||||||
@ -200,30 +200,29 @@ if ($resql) {
|
|||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
print '</tr>';
|
echo '</tr>',
|
||||||
|
'<tr class="liste_titre">',
|
||||||
print '<tr class="liste_titre">';
|
'<td class="liste_titre">',
|
||||||
print '<td class="liste_titre">';
|
'<input type="text" class="flat" name="search_ref" value="' . $sref . '">',
|
||||||
print '<input type="text" class="flat" name="search_ref" value="' . $sref . '">';
|
'</td>',
|
||||||
print '</td>';
|
'<td class="liste_titre">',
|
||||||
print '<td class="liste_titre">';
|
'<input type="text" class="flat" name="search_nom" value="' . $snom . '">',
|
||||||
print '<input type="text" class="flat" name="search_nom" value="' . $snom . '">';
|
'</td>',
|
||||||
print '</td>';
|
'<td class="liste_titre">',
|
||||||
print '<td class="liste_titre">';
|
'<input type="text" class="flat" name="search_user" value="' . $suser . '">',
|
||||||
print '<input type="text" class="flat" name="search_user" value="' . $suser . '">';
|
'</td>',
|
||||||
print '</td>';
|
'<td class="liste_titre">',
|
||||||
print '<td class="liste_titre">';
|
'<input type="text" class="flat" name="search_ttc" value="' . $sttc . '">',
|
||||||
print '<input type="text" class="flat" name="search_ttc" value="' . $sttc . '">';
|
'</td>',
|
||||||
print '</td>';
|
'<td class="liste_titre">',
|
||||||
print '<td class="liste_titre">';
|
'<input type="text" class="flat" name="search_date" value="' . $sdate . '">',
|
||||||
print '<input type="text" class="flat" name="search_date" value="' . $sdate . '">';
|
'</td>',
|
||||||
print '</td>';
|
'<td class="liste_titre" align="right">';
|
||||||
print '<td class="liste_titre" align="right">';
|
|
||||||
$src = DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png';
|
$src = DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png';
|
||||||
$value = dol_escape_htmltag($langs->trans('Search'));
|
$value = dol_escape_htmltag($langs->trans('Search'));
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="' . $src . '" value="' . $value . '" title="' . $value . '">';
|
echo '<input type="image" class="liste_titre" name="button_search" src="' . $src . '" value="' . $value . '" title="' . $value . '">',
|
||||||
print '</td>';
|
'</td>',
|
||||||
print '</tr>';
|
'</tr>';
|
||||||
|
|
||||||
$var = true;
|
$var = true;
|
||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
@ -232,54 +231,54 @@ if ($resql) {
|
|||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
|
||||||
// Ref
|
|
||||||
print '<td>';
|
|
||||||
$href = DOL_URL_ROOT . '/fourn/commande/fiche.php?id=' . $obj->rowid;
|
$href = DOL_URL_ROOT . '/fourn/commande/fiche.php?id=' . $obj->rowid;
|
||||||
print '<a href="' . $href . '">';
|
echo '<tr ' . $bc[$var] . '>',
|
||||||
print img_object($langs->trans('ShowOrder'), 'order') . ' ' . $obj->ref;
|
// Ref
|
||||||
print '</a></td>';
|
'<td>',
|
||||||
|
'<a href="' . $href . '">',
|
||||||
|
img_object($langs->trans('ShowOrder'), 'order') . ' ' . $obj->ref,
|
||||||
|
'</a></td>';
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<td>';
|
|
||||||
$href = DOL_URL_ROOT . '/fourn/fiche.php?socid=' . $obj->socid;
|
$href = DOL_URL_ROOT . '/fourn/fiche.php?socid=' . $obj->socid;
|
||||||
print '<a href="' . $href .'">';
|
echo '<td>',
|
||||||
print img_object($langs->trans('ShowCompany'), 'company') . ' ';
|
'<a href="' . $href .'">',
|
||||||
print $obj->nom . '</a></td>';
|
img_object($langs->trans('ShowCompany'), 'company'), ' ',
|
||||||
|
$obj->nom . '</a></td>';
|
||||||
|
|
||||||
// Author
|
// Author
|
||||||
$userstatic->id = $obj->fk_user_author;
|
$userstatic->id = $obj->fk_user_author;
|
||||||
$userstatic->login = $obj->login;
|
$userstatic->login = $obj->login;
|
||||||
print '<td>';
|
|
||||||
|
|
||||||
if ($userstatic->id) {
|
if ($userstatic->id) {
|
||||||
print $userstatic->getLoginUrl(1);
|
$txt = $userstatic->getLoginUrl(1);
|
||||||
} else {
|
} else {
|
||||||
print ' ';
|
$txt = ' ';
|
||||||
}
|
}
|
||||||
|
echo '<td>',
|
||||||
print '</td>';
|
$txt,
|
||||||
|
'</td>',
|
||||||
// Amount
|
// Amount
|
||||||
print '<td>';
|
'<td>',
|
||||||
print price($obj->total_ttc);
|
price($obj->total_ttc),
|
||||||
print '</td>';
|
'</td>';
|
||||||
// Date
|
// Date
|
||||||
print '<td>';
|
|
||||||
if ($obj->dc) {
|
if ($obj->dc) {
|
||||||
print dol_print_date($db->jdate($obj->dc), 'day');
|
$date = dol_print_date($db->jdate($obj->dc), 'day');
|
||||||
} else {
|
} else {
|
||||||
print '-';
|
$date = '-';
|
||||||
}
|
}
|
||||||
print '</td>';
|
echo '<td>',
|
||||||
|
$date,
|
||||||
|
'</td>',
|
||||||
// Statut
|
// Statut
|
||||||
print '<td align="right">';
|
'<td align="right">',
|
||||||
print $commandestatic->LibStatut($obj->fk_statut, 5);
|
$commandestatic->LibStatut($obj->fk_statut, 5),
|
||||||
print '</td>';
|
'</td>',
|
||||||
print '</tr>';
|
'</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '</table>';
|
echo '</table>',
|
||||||
print '</form>';
|
'</form>';
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user