[PATCH 3/3] fixup! Printtva , under some circumstance
This commit is contained in:
parent
741b71f622
commit
1710281c3d
4 changed files with 21 additions and 5 deletions
|
|
@ -80,7 +80,7 @@ class Acc_Ledger extends jrn_def_sql
|
|||
$this->db=$p_cn;
|
||||
$this->row=null;
|
||||
$this->nb=MAX_ARTICLE;
|
||||
parent::__construct($p_cn, $p_id);
|
||||
parent::__construct($p_cn, $p_id);
|
||||
}
|
||||
|
||||
function get_last_pj()
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class Tax_Summary
|
|||
";
|
||||
$cnt=$this->db->get_value($sql,[$this->date_start,$this->date_end]);
|
||||
if ($cnt == 0) {
|
||||
throw new Exception(_("Données manquantes"));
|
||||
throw new Exception(_("Données manquantes"),100);
|
||||
}
|
||||
/*-------------Purchase ---------------------------------*/
|
||||
$sql="select count(*)
|
||||
|
|
@ -131,7 +131,7 @@ class Tax_Summary
|
|||
";
|
||||
$cnt=$this->db->get_value($sql,[$this->date_start,$this->date_end]);
|
||||
if ($cnt > 0) {
|
||||
throw new Exception(_("Données manquantes"));
|
||||
throw new Exception(_("Données manquantes"),100);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,16 @@ require_once NOALYSS_INCLUDE."/class/tax_summary.class.php";
|
|||
require_once NOALYSS_INCLUDE."/lib/noalyss_csv.class.php";
|
||||
$http=new HttpInput();
|
||||
$tax_summary = new Tax_Summary($cn,$http->get("date_start"),$http->get("date_end"));
|
||||
$tax_summary->check();
|
||||
try {
|
||||
$tax_summary->check();
|
||||
}catch (Exception $e)
|
||||
{
|
||||
if ($e->getCode() <> 100) {
|
||||
echo $e->getMessage();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$csv=new Noalyss_Csv("summary_tva");
|
||||
$csv->send_header();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,14 @@ if ( $http->get("do","string","no") == "display")
|
|||
{
|
||||
$tax_summary=new Tax_Summary($cn,$start_periode->value,$end_periode->value);
|
||||
try {
|
||||
$tax_summary->check();
|
||||
try {
|
||||
$tax_summary->check();
|
||||
}catch (Exception $e)
|
||||
{
|
||||
echo '<span class="warning">';
|
||||
echo $e->getMessage();
|
||||
echo '</span>';
|
||||
}
|
||||
echo '<ul class="aligned-block">';
|
||||
echo '<li>';
|
||||
echo $tax_summary->form_export_csv();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue