Clean code
This commit is contained in:
parent
1a535dc77b
commit
50ca9f4145
@ -1689,8 +1689,11 @@ function phpinfo_array()
|
||||
{
|
||||
ob_start();
|
||||
phpinfo();
|
||||
$phpinfostring = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$info_arr = array();
|
||||
$info_lines = explode("\n", strip_tags(ob_get_clean(), "<tr><td><h2>")); // end of ob_start()
|
||||
$info_lines = explode("\n", strip_tags($phpinfostring, "<tr><td><h2>"));
|
||||
$cat = "General";
|
||||
foreach ($info_lines as $line)
|
||||
{
|
||||
|
||||
@ -73,48 +73,3 @@ function inventoryPrepareHead(&$inventory, $title = 'Inventory', $get = '')
|
||||
array(dol_buildpath('/product/inventory/inventory.php?id='.$inventory->id.$get, 1), $langs->trans('Inventory'), 'inventory')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Define head array for tabs of inventory tools setup pages
|
||||
*
|
||||
* @param Inventory $inventory Object inventory
|
||||
*
|
||||
* @return string html of products
|
||||
*/
|
||||
function inventorySelectProducts(&$inventory)
|
||||
{
|
||||
global $conf, $db, $langs;
|
||||
|
||||
$except_product_id = array();
|
||||
|
||||
foreach ($inventory->Inventorydet as $Inventorydet)
|
||||
{
|
||||
$except_product_id[] = $Inventorydet->fk_product;
|
||||
}
|
||||
|
||||
ob_start();
|
||||
$form = new Form($db);
|
||||
$form->select_produits(-1, 'fk_product');
|
||||
|
||||
$TChildWarehouses = array($inventory->fk_warehouse);
|
||||
$e = new Entrepot($db);
|
||||
$e->fetch($inventory->fk_warehouse);
|
||||
if (method_exists($e, 'get_children_warehouses')) $e->get_children_warehouses($e->id, $TChildWarehouses);
|
||||
|
||||
$Tab = array();
|
||||
$sql = 'SELECT rowid, label
|
||||
FROM '.MAIN_DB_PREFIX.'entrepot WHERE rowid IN('.implode(', ', $TChildWarehouses).')';
|
||||
if (method_exists($e, 'get_children_warehouses')) $sql .= ' ORDER BY fk_parent';
|
||||
$resql = $db->query($sql);
|
||||
while ($res = $db->fetch_object($resql)) {
|
||||
$Tab[$res->rowid] = $res->label;
|
||||
}
|
||||
print ' ';
|
||||
print $langs->trans('Warehouse').' : '.$form::selectarray('fk_warehouse', $Tab);
|
||||
|
||||
$select_html = ob_get_clean();
|
||||
|
||||
return $select_html;
|
||||
}
|
||||
|
||||
@ -60,10 +60,12 @@ if ($action=="send")
|
||||
$model_id = $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE;
|
||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'facture_send', $user, $outputlangs, $model_id);
|
||||
$subject = $arraydefaultmessage->topic;
|
||||
|
||||
ob_start(); // turn on output receipt
|
||||
include 'receipt.php';
|
||||
$receipt = ob_get_contents(); // get the contents of the output buffer
|
||||
ob_end_clean();
|
||||
|
||||
$msg="<html>".$arraydefaultmessage->content."<br>".$receipt."</html>";
|
||||
$sendto=$email;
|
||||
$from=$mysoc->email;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user