Facility improve page_start
This commit is contained in:
parent
698b24e8af
commit
62ab35ef60
6 changed files with 22 additions and 23 deletions
|
|
@ -777,9 +777,6 @@ class Acc_Ledger_History_Generic extends Acc_Ledger_History
|
|||
if (count($this->data)==0)
|
||||
exit;
|
||||
$old_id="";
|
||||
/**
|
||||
* @todo add table headers
|
||||
*/
|
||||
foreach ($this->data[0] as $idx=>$op)
|
||||
{
|
||||
// should clean description : remove <b><i> tag and '; char
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class Facility
|
|||
static function page_start()
|
||||
{
|
||||
$noalyss_home=NOALYSS_HOME;
|
||||
echo <<<EOF
|
||||
$ret=<<<EOF
|
||||
<!doctype html>
|
||||
<HTML><HEAD><meta charset="utf-8"><META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<TITLE>PRINTJRN NOALYSS</TITLE>
|
||||
|
|
@ -50,16 +50,18 @@ class Facility
|
|||
<body>
|
||||
<div class="content">
|
||||
EOF;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a file with the content
|
||||
* @param type $p_dir
|
||||
* @param type $p_file
|
||||
* @param type $p_content
|
||||
* @param string $p_dir usually __DIR__
|
||||
* @param string $p_file name of the file
|
||||
* @param string $p_content content
|
||||
*/
|
||||
static function save_file($p_dir,$p_file,$p_content)
|
||||
static function save_file($p_dir, $p_file, $p_content)
|
||||
{
|
||||
$hFile=fopen($p_dir."/".$p_name,"w+");
|
||||
$hFile=fopen($p_dir."/".$p_name, "w+");
|
||||
fwrite($hFile, $content);
|
||||
fclose($hFile);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class Acc_Ledger_History_FinancialTest extends TestCase
|
|||
$name="acc_ledger_history_export_listing.html";
|
||||
$this->object->set_m_mode("L");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ class Acc_Ledger_History_FinancialTest extends TestCase
|
|||
$name="acc_ledger_history_export_accounting.html";
|
||||
$this->object->set_m_mode("E");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Acc_Ledger_History_GenericTest extends TestCase
|
|||
$name="acc_ledger_history_Generic_export_listing.html";
|
||||
$this->object->set_m_mode("L");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class Acc_Ledger_History_GenericTest extends TestCase
|
|||
$name="acc_ledger_history_Generic_export_extended.html";
|
||||
$this->object->set_m_mode("E");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ class Acc_Ledger_History_GenericTest extends TestCase
|
|||
$name="acc_ledger_history_Generic_export_detail.html";
|
||||
$this->object->set_m_mode("D");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ class Acc_Ledger_History_GenericTest extends TestCase
|
|||
$name="acc_ledger_history_Generic_export_accounting.html";
|
||||
$this->object->set_m_mode("D");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class Acc_Ledger_History_PurchaseTest extends TestCase
|
|||
$name="acc_ledger_history_purchase_export_listing.html";
|
||||
$this->object->set_m_mode("L");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ class Acc_Ledger_History_PurchaseTest extends TestCase
|
|||
$name="acc_ledger_history_purchase_export_extended.html";
|
||||
$this->object->set_m_mode("E");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ class Acc_Ledger_History_PurchaseTest extends TestCase
|
|||
$name="acc_ledger_history_purchase_export_detail.html";
|
||||
$this->object->set_m_mode("D");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ class Acc_Ledger_History_PurchaseTest extends TestCase
|
|||
$name="acc_ledger_history_purchase_export_accounting.html";
|
||||
$this->object->set_m_mode("D");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class Acc_Ledger_History_SaleTest extends TestCase
|
|||
$name="acc_ledger_history_sale_export_listing.html";
|
||||
$this->object->set_m_mode("L");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ class Acc_Ledger_History_SaleTest extends TestCase
|
|||
$name="acc_ledger_history_sale_export_extended.html";
|
||||
$this->object->set_m_mode("E");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ class Acc_Ledger_History_SaleTest extends TestCase
|
|||
$name="acc_ledger_history_sale_export_detail.html";
|
||||
$this->object->set_m_mode("D");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ class Acc_Ledger_History_SaleTest extends TestCase
|
|||
$name="acc_ledger_history_sale_export_accounting.html";
|
||||
$this->object->set_m_mode("D");
|
||||
ob_start();
|
||||
\Noalyss\Facility::page_start();
|
||||
echo \Noalyss\Facility::page_start();
|
||||
$this->object->export_html();
|
||||
$content=ob_get_contents();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue