Merge tag 'rel7008' into r700-currency

2018-07-21 : bug fixes

Conflicts:
	include/class/acc_ledger_history.class.php
This commit is contained in:
Dany De Bontridder 2018-07-21 20:31:59 +02:00
commit 2f1d694a8d
27 changed files with 1432 additions and 365 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -79,7 +79,7 @@ for ($i=0;$i< $nb_row;$i++) {
echo td($detail_row['po_name']);
}
$amount=$detail_row['oa_amount'];
if ( $detail_row['oa_positive']=="N") {$amount=bcmult($amount,-1);}
if ( $detail_row['oa_positive']=="N") {$amount=bcmul($amount,-1);}
echo td($amount,'style="text-align:right"');
$debit=($detail_row['oa_debit'] == 'f')?"C":"D";
echo td($debit);

View file

@ -58,7 +58,7 @@ echo '
<A class="mtitle" HREF="?ac='.$http->request("ac").'&new&'.$str_dossier.'"> '._('Nouveau').' </A>
</td>
<td class="mtitle" >
<A class="mtitle" HREF="?ac='.$http->request("ac").'&see&'.$str_dossier.'">'._('Liste opérations').' </A
<A class="mtitle" HREF="?ac='.$http->request("ac").'&see&'.$str_dossier.'">'._('Liste opérations').' </A>
</td>
</tr>
</table>

View file

@ -125,6 +125,11 @@ abstract class Acc_Ledger_History
/**
* Build the right object
* @param Database $cn database conx
* @param array $pa_ledger ledger of array
* @param integer $p_from periode id
* @param integer $p_to periode id
* @param char $p_mode L (list operation) E (extended detail) A (accouting writing) D (Detailled VAT)
* @return Acc_Ledger_History_Generic Acc_Ledger_History_Sale Acc_Ledger_History_Financial Acc_Ledger_History_Purchase
*/
static function factory(Database $cn, $pa_ledger, $p_from, $p_to, $p_mode)

View file

@ -119,8 +119,8 @@ class Acc_Ledger_History_Financial extends Acc_Ledger_History
tiers.qcode as tiers_qcode,
jr_id,
jr_pj_number,
jr_date,
jr_date_paid,
to_char(jr_date,'DD.MM.YYYY') as str_date,
to_char(jr_date_paid,'DD.MM.YYYY') as str_date_paid,
jr_internal,
jrn.jr_comment,
jr_pj_name,
@ -133,7 +133,8 @@ class Acc_Ledger_History_Financial extends Acc_Ledger_History
where
jr_def_id in ({$ledger_list})
and {$periode}
{$cond_limite}";
{$cond_limite}
order by jr_date, substring(jr_pj_number,'[0-9]+$')::numeric ";
$this->data=$this->db->get_array($sql);
}
/**

View file

@ -139,8 +139,8 @@ class Acc_Ledger_History_Purchase extends Acc_Ledger_History
qcode,
jr_id,
jr_pj_number,
jr_date,
jr_date_paid,
to_char(jr_date,'DD.MM.YYYY') as str_date,
to_char(jr_date_paid,'DD.MM.YYYY') as str_date_paid,
jr_internal,
qp_supplier,
jrn.jr_comment,
@ -161,7 +161,8 @@ class Acc_Ledger_History_Purchase extends Acc_Ledger_History
where
jr_def_id in ({$ledger_list})
and {$periode}
{$cond_limite}";
{$cond_limite}
order by jrn.jr_date, substring(jr_pj_number,'[0-9]+$')::numeric ";
$this->data=$this->db->get_array($sql);
}
@ -272,8 +273,8 @@ class Acc_Ledger_History_Purchase extends Acc_Ledger_History
foreach ($this->data as $line)
{
$export->add($line['jr_date']);
$export->add($line['jr_date_paid']);
$export->add($line['str_date']);
$export->add($line['str_date_paid']);
$export->add($line['jr_id']);
$export->add($line['jr_pj_number']);
$export->add($line['name']." ".

View file

@ -133,8 +133,8 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
qcode,
jr_id,
jr_pj_number,
jr_date,
jr_date_paid,
to_char(jr_date,'DD.MM.YYYY') as str_date,
to_char(jr_date_paid,'DD.MM.YYYY') as str_date_paid,
jr_internal,
qs_client,
jrn.jr_comment,
@ -150,7 +150,8 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
where
jr_def_id in ({$ledger_list})
and {$periode}
{$cond_limite}";
{$cond_limite}
order by jr_date, substring(jr_pj_number,'[0-9]+$')::numeric ";
$this->data=$this->db->get_array($sql);
}
@ -264,8 +265,8 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
foreach ($this->data as $line)
{
$export->add($line['jr_date']);
$export->add($line['jr_date_paid']);
$export->add($line['str_date']);
$export->add($line['str_date_paid']);
$export->add($line['jr_id']);
$export->add($line['jr_pj_number']);
$export->add($line['name']." ".

View file

@ -493,6 +493,7 @@ class Acc_Ledger_Search
" or upper(jr_internal) like upper('%".$desc."%')
or jr_grpt_id in (select j_grpt from jrnx where j_text ~* '".$desc."')
or jr_id in (select jr_id from jrn_info where ji_value is not null and ji_value ~* '$desc')
or jr_id in (select jr_id from jrn_note where upper(n_text) ~* '$desc' )
)";
$and=" and ";
}
@ -659,24 +660,30 @@ class Acc_Ledger_Search
$Max=Database::num_row($Res);
if ($Max==0)
{
return array(0, _("Aucun enregistrement trouvé"));
}
$r.='<table class="result">';
$r.="<tr >";
$r.="<th>"._("n° interne")."</th>";
if ($this->type=='ALL')
{
$r.=th('Journal');
}
$r.='<th>'.$table->get_header(0).'</th>';
if ($p_paid!=0)
{
$r.='<th>'.$table->get_header(1).'</td>';
}
if ($p_paid!=0)
{
$r.='<th>'.$table->get_header(2).'</th>';
}
$r.='<th>'.$table->get_header(3).'</th>';
$r.='<th>'.$table->get_header(4).'</th>';
$r.=th('Journal');
if ( $this->type != "ODS")
{
$r.='<th>'.$table->get_header(4).'</th>';
}
$r.="<th>"._("n° interne")."</th>";
$r.='<th>'.$table->get_header(6).'</th>';
$r.=th('Notes', ' style="width:15%"');
$r.='<th>'.$table->get_header(5).'</th>';
@ -698,24 +705,18 @@ class Acc_Ledger_Search
$row=Database::fetch_array($Res, $i);
if ($i%2==0)
{
$tr='<TR class="odd">';
}
else
{
$tr='<TR class="even">';
}
$r.=$tr;
//internal code
// button modify
$r.="<TD>";
// If url contains
//
$href=basename($_SERVER['PHP_SELF']);
$r.=sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>',
$row['jr_id'], $gDossier, $row['jr_internal']);
$r.="</TD>";
if ($this->type=='ALL')
$r.=td($row['jrn_def_name']);
// date
$r.="<TD>";
$r.=$row['str_jr_date'];
@ -735,10 +736,24 @@ class Acc_Ledger_Search
$r.="<TD>";
$r.=$row['jr_pj_number'];
$r.="</TD>";
// Ledger
$r.=td($row['jrn_def_name']);
// Tiers
$other=($row['quick_code']!='')?HtmlInput::card_detail($row['quick_code'],h($row['name'].' '.$row['first_name'])):'';
$r.=td($other);
if ($this->type != 'ODS')
{
// Tiers
$other=($row['quick_code']!='')?HtmlInput::card_detail($row['quick_code'],h($row['name'].' '.$row['first_name'])):'';
$r.=td($other);
}
// Internal number
$r.="<TD>";
$r.=sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>',
$row['jr_id'], $gDossier, $row['jr_internal']);
$r.="</TD>";
// comment
$r.="<TD>";
$tmp_jr_comment=h($row['jr_comment']);
@ -756,7 +771,9 @@ class Acc_Ledger_Search
$positive=$this->cn->get_value("select qf_amount from quant_fin where jr_id=$1",
array($row['jr_id']));
if ($this->cn->count()!=0)
{
$positive=($positive<0)?1:0;
}
}
$r.="<TD align=\"right\">";
$t_amount=$row['jr_montant'];
@ -787,9 +804,13 @@ class Acc_Ledger_Search
$h->name="set_jr_id".$row['jr_id'];
$r.='<TD>'.$w->input().$h->input().'</TD>';
if ($row['jr_rapt']=='paid')
{
$amount_paid=bcadd($amount_paid, $t_amount);
}
else
{
$amount_unpaid=bcadd($amount_unpaid, $t_amount);
}
}
// Rapprochement

View file

@ -319,6 +319,13 @@ order by
$r.= '</form>';
return $r;
}
/**
* Display the result of accountancy and analytic ,
* Axis / Card
* Card / Axis
* Accounting / Axis
* Axis / Accounting
*/
function display_html()
{
bcscale(2);
@ -377,7 +384,7 @@ order by
echo '</tr>';
echo '</table>';
echo '<h2>'._("Résultat global").nbm($tot_glob).'</h2>';
echo '<h2>'._("Résultat global")." ".nbm($tot_glob).'</h2>';
}
//---------------------------------------------------------------------------
// Accountancy - Analytic
@ -430,7 +437,7 @@ order by
echo '</tr>';
echo '</table>';
echo td(nbm($tot_card),' class="num"');
echo '<h2>'._("Résultat global")." ".nbm($tot_glob).'</h2>';
}
//---------------------------------------------------------------------------
// Acc after card
@ -482,7 +489,7 @@ order by
echo '</tr>';
echo '</table>';
echo td(nbm($tot_card),' class="num"');
echo '<h2>'._("Résultat global")." ".nbm($tot_glob).'</h2>';
}
//---------------------------------------------------------------------------
// Analytic - Accountancy
@ -536,7 +543,7 @@ order by
echo '</tr>';
echo '</table>';
echo '<h2> Résultat global '.nbm($tot_glob).'</h2>';
echo '<h2>'._("Résultat global")." ".nbm($tot_glob).'</h2>';
}
}

View file

@ -187,19 +187,20 @@ class Anc_Operation
$cond="$where (oa_date >= to_date('$p_from','DD.MM.YYYY') or oa_date >= to_date('$p_from','DD.MM.YYYY') )";
$where=" and ";
}
if ( $p_to!="" )
if ( $p_to!="" ) {
$cond.="$where (oa_date <=to_date('$p_to','DD.MM.YYYY') or oa_date <=to_date('$p_to','DD.MM.YYYY')) ";
$where=" and ";
}
$cond .= $where." j_id is null ";
$sql="
select distinct oa_group,
to_char(oa_date,'DD.MM.YYYY') as str_date ,
oa_date,
oa_description,
jr_pj_number,
jr_id
oa_description
from
operation_analytique as oa
left join (select jr_id,jr_pj_number,j_id from jrn join jrnx on (jr_grpt_id=j_grpt) ) as m on (m.j_id=oa.j_id)
$cond
order by oa_date ";
return $this->db->get_array($sql);
@ -308,7 +309,6 @@ class Anc_Operation
$ret.= "<table id=\"anc_operation_list_tb\"class=\"result\">";
$ret.=th(_("Date"));
$ret.=th(_("Libellé"));
$ret.=th(_("Num Pièce"));
$ret.=th("");
$ret.=th("");
$i=0;
@ -325,16 +325,10 @@ class Anc_Operation
$ret.="<tr $row_id $class>";
$ret.=td($row['str_date']);
$ret.=td(h($row['oa_description']));
$ret.=td(h($row['jr_pj_number']));
$js="anc_remove_operation(".$gDossier.",".$oldgroup.")";
$ret.="<td>".HtmlInput::image_click("trash-24.gif", $js, _("Effacer"))."</td>";
if ( $row['jr_id'] != "") {
$js="viewOperation({$row['jr_id']},{$gDossier})";
} else {
$js="anc_detail_op({$row['oa_group']},{$gDossier})";
}
$js="anc_detail_op({$row['oa_group']},{$gDossier})";
$ret .= "<td>". HtmlInput::image_click("crayon-mod-b24.png", $js, _("Modifier"))."</td>";
$ret.="</tr>";
}

View file

@ -42,9 +42,17 @@ class Package_Repository
*/
function __construct()
{
$content=file_get_contents(NOALYSS_PACKAGE_REPOSITORY."/web.xml");
// Check we can resolve the name
$host=parse_url(NOALYSS_PACKAGE_REPOSITORY,PHP_URL_HOST);
if (gethostbyname($host) != $host)
{
$content=file_get_contents(NOALYSS_PACKAGE_REPOSITORY."/web.xml");
$this->content=simplexml_load_string($content);
} else {
$this->content=NULL;
}
$this->content=simplexml_load_string($content);
}
public function getContent()
@ -72,6 +80,9 @@ class Package_Repository
function display_noalyss_info()
{
global $g_user;
if ( $this->content == NULL ) {
throw new Exception(_("Problème réseau"),10);
}
switch ($g_user->lang)
{
case 'fr_FR.utf8':
@ -94,6 +105,9 @@ class Package_Repository
*/
function find_plugin($p_code)
{
if ( $this->content == NULL ) {
throw new Exception(_("Problème réseau"),10);
}
$a_plugin=$this->content->xpath('//plugins/plugin');
$nb_plugin=count($a_plugin);
for ($i=0; $i<$nb_plugin; $i++)
@ -114,6 +128,9 @@ class Package_Repository
*/
function find_template($p_code)
{
if ( $this->content == NULL ) {
throw new Exception(_("Problème réseau"),10);
}
$a_template=$this->content->xpath('//database_template/dbtemplate');
$nb_template=count($a_template);
for ($i=0; $i<$nb_template; $i++)
@ -128,6 +145,9 @@ class Package_Repository
function make_object($p_type, $p_id)
{
if ( $this->content == NULL ) {
throw new Exception(_("Problème réseau"),10);
}
switch ($p_type)
{
case "core":

View file

@ -83,8 +83,14 @@ class Print_Ledger {
return $pdf;
}
}
else
elseif ($jrn_type=='FIN')
{
$pdf=new Print_Ledger_Financial($cn, $p_ledger);
return $pdf;
} else
{
return new Print_Ledger_Detail($cn, $p_ledger);
}
break;
case 'L':
@ -141,7 +147,7 @@ class Print_Ledger {
$jrn_type=$p_ledger->get_type();
if ($jrn_type=='FIN')
{
$pdf=new Print_Ledger_Financial($cn, $p_ledger);
$pdf=new Print_Ledger_Detail($cn, $p_ledger);
return $pdf;
;
}

View file

@ -40,12 +40,12 @@ class Print_Ledger_Misc extends PDF
//Line break
$this->Ln(20);
$this->SetFont('DejaVu', 'B', 7);
$this->Cell(30,6,'Piece');
$this->Cell(10,6,'Date');
$this->Cell(20,6,'Interne');
$this->Cell(25,6,'Tiers');
$this->Cell(80,6,'Commentaire');
$this->Cell(15,6,'Montant');
$this->Cell(10,6,_('Date'));
$this->Cell(30,6,_('Piece'));
$this->Cell(20,6,_('Interne'));
$this->Cell(25,6,_('Tiers'));
$this->Cell(80,6,_('Commentaire'));
$this->Cell(15,6,_('Montant'));
$this->Ln(6);
}
@ -78,8 +78,8 @@ class Print_Ledger_Misc extends PDF
{
$row=$a_jrn[$i];
$this->LongLine(30,5,$row['jr_pj_number']);
$this->write_cell(10,5, smaller_date($row['date']));
$this->LongLine(30,5,$row['jr_pj_number']);
$this->write_cell(20,5,$row['jr_internal']);
$type=$this->cn->get_value("select jrn_def_type from jrn_def where jrn_def_id=$1",array($a_jrn[$i]['jr_def_id']));
$other=mb_substr($this->ledger->get_tiers($type,$a_jrn[$i]['jr_id']),0,25);

View file

@ -106,7 +106,7 @@ if ( $get_option=="E")
{
if ($jrn_type=='FIN')
{
$get_option='L';
$get_option='A';
}
elseif ($jrn_type=='ODS'||$Jrn->id==0)
{
@ -178,6 +178,91 @@ if ($get_option=='A')
$acc_ledger_history->export_csv();
exit;
}
/**
* Mode list for ODS , FIN and GL
*/
if ($get_option=="L" && ($jrn_type=='ODS'||$jrn_type=='FIN'||$jrn_type=='GL') )
{
if ( $get_jrn==0) {
$Row=$Jrn->get_rowSimple($get_from_periode, $get_to_periode, $a_jrn);
}else {
$Row=$Jrn->get_rowSimple($get_from_periode, $get_to_periode);
}
$cn->prepare('reconcile_date_csv',
'select *
from
jrn
where
jr_id in
(select
jra_concerned
from
jrn_rapt
where jr_id = $1
union all
select
jr_id
from jrn_rapt
where jra_concerned=$1)');
$title=array();
$title[]=_("operation");
$title[]=_("Date");
$title[]=_("N° Pièce");
$title[]=_("QuickCode");
$title[]=_("Tiers");
$title[]=_("commentaire");
$title[]=_("internal");
$title[]=_("montant");
$export->write_header($title);
foreach ($Row as $line)
{
$tiers_id=$Jrn->get_tiers_id($line['jrn_def_type'], $line['jr_id']);
$fiche_tiers=new Fiche($cn, $tiers_id);
$tiers=$fiche_tiers->strAttribut(ATTR_DEF_NAME, 0)." ".$fiche_tiers->strAttribut(ATTR_DEF_FIRST_NAME,
0);
$export->add($line['num']);
$export->add($line['date']);
$export->add($line['jr_pj_number']);
$export->add($fiche_tiers->get_quick_code());
$export->add($tiers);
$export->add($line['comment']);
$export->add($line['jr_internal']);
// echo "<TD>".$line['pj'].";";
// If the ledger is financial :
// the credit must be negative and written in red
// Get the jrn type
if ($line['jrn_def_type']=='FIN')
{
$positive=$cn->get_value("select qf_amount from quant_fin ".
" where jr_id=$1", array($line['jr_id']));
$export->add($positive, "number");
$export->add("");
}
else
{
$export->add($line['montant'], "number");
}
//------ Add reconcilied operation ---------------
$ret_reconcile=$cn->execute('reconcile_date_csv',
array($line['jr_id']));
$max=Database::num_row($ret_reconcile);
if ($max>0)
{
for ($e=0; $e<$max; $e++)
{
$row=Database::fetch_array($ret_reconcile, $e);
$export->add($row['jr_date']);
$export->add($row['jr_internal']);
$export->add($row['jr_pj_number']);
}
}
$export->write();
}
return;
}
//-----------------------------------------------------------------------------
// Detail printing for ACH or VEN : 1 row resume the situation with VAT, DNA
// for Misc the amount
@ -187,87 +272,20 @@ if ($get_option=="L" || $get_option == 'D')
{
//-----------------------------------------------------
if ($jrn_type=='ODS'||$jrn_type=='FIN'||$jrn_type=='GL')
if ($jrn_type=='ODS'||$jrn_type=='FIN'||$jrn_type=='GL')
{
if ( $get_jrn==0) {
$Row=$Jrn->get_rowSimple($get_from_periode, $get_to_periode, $a_jrn);
}else {
$Row=$Jrn->get_rowSimple($get_from_periode, $get_to_periode);
}
$cn->prepare('reconcile_date_csv',
'select *
from
jrn
where
jr_id in
(select
jra_concerned
from
jrn_rapt
where jr_id = $1
union all
select
jr_id
from jrn_rapt
where jra_concerned=$1)');
$title=array();
$title[]=_("operation");
$title[]=_("Date");
$title[]=_("N° Pièce");
$title[]=_("QuickCode");
$title[]=_("Tiers");
$title[]=_("commentaire");
$title[]=_("internal");
$title[]=_("montant");
$export->write_header($title);
foreach ($Row as $line)
if ($get_jrn == 0 )
{
$tiers_id=$Jrn->get_tiers_id($line['jrn_def_type'], $line['jr_id']);
$fiche_tiers=new Fiche($cn, $tiers_id);
$tiers=$fiche_tiers->strAttribut(ATTR_DEF_NAME, 0)." ".$fiche_tiers->strAttribut(ATTR_DEF_FIRST_NAME,
0);
$acc_ledger_history=new Acc_Ledger_History_Generic($cn, $a_jrn,
$get_from_periode, $get_to_periode, 'D');
} else {
$acc_ledger_history=new Acc_Ledger_History_Generic($cn, array($a_jrn),
$get_from_periode, $get_to_periode, 'D');
$export->add($line['num']);
$export->add($line['date']);
$export->add($line['jr_pj_number']);
$export->add($fiche_tiers->get_quick_code());
$export->add($tiers);
$export->add($line['comment']);
$export->add($line['jr_internal']);
// echo "<TD>".$line['pj'].";";
// If the ledger is financial :
// the credit must be negative and written in red
// Get the jrn type
if ($line['jrn_def_type']=='FIN')
{
$positive=$cn->get_value("select qf_amount from quant_fin ".
" where jr_id=$1", array($line['jr_id']));
$export->add($positive, "number");
$export->add("");
}
else
{
$export->add($line['montant'], "number");
}
//------ Add reconcilied operation ---------------
$ret_reconcile=$cn->execute('reconcile_date_csv',
array($line['jr_id']));
$max=Database::num_row($ret_reconcile);
if ($max>0)
{
for ($e=0; $e<$max; $e++)
{
$row=Database::fetch_array($ret_reconcile, $e);
$export->add($row['jr_date']);
$export->add($row['jr_internal']);
$export->add($row['jr_pj_number']);
}
}
$export->write();
}
$acc_ledger_history->export_csv();
return;
}
//------------------------------------------------------------------------------
// One line summary with tiers, amount VAT, DNA, tva code ....
//

View file

@ -42,6 +42,7 @@ switch($ledger_type)
{
case 'ACH':
$ask_pay=1;
$p_array['ledger_type']='ACH';
break;
case 'ODS':
$ask_pay=0;
@ -53,9 +54,11 @@ switch($ledger_type)
break;
case 'VEN':
$ask_pay=1;
$p_array['ledger_type']='VEN';
break;
case 'FIN':
$ask_pay=0;
$p_array['ledger_type']='FIN';
break;
}
@ -95,7 +98,9 @@ if (!isset($p_array['date_start']))
}
else
{
$msg='<h2 class="info2">'._("Période ").$_GET['date_start']._(" au ").$_GET['date_end'].'</h2>';
$date_start=$http->get("date_start","string","");
$date_end=$http->get("date_end","string","");
$msg='<h2 class="info2">'.sprintf(_("Période %s au %s "),$date_start,$date_end) .'</h2>';
}
/* compute the sql stmt */
@ -118,7 +123,22 @@ echo dossier::hidden();
list($count, $html) = $Ledger->list_operation($sql, $offset, $ask_pay);
echo $html;
echo $bar;
$r = HtmlInput::get_to_hidden(array('l', 'date_start', 'date_end', 'desc', 'amount_min', 'amount_max', 'qcode', 'accounting', 'unpaid', 'gDossier', 'ledger_type', 'p_action'));
$r = HtmlInput::get_to_hidden(array('search_opnb_jrn',
'search_opqcode',
'l',
'date_start',
'date_end',
'date_paid_start',
'date_paid_end',
'desc',
'amount_min',
'amount_max',
'qcode',
'accounting',
'unpaid',
'gDossier',
'ledger_type',
'p_action'));
if (isset($_GET['r_jrn']))
{
foreach ($_GET['r_jrn'] as $k => $v)
@ -145,7 +165,8 @@ echo '<form action="export.php" method="get">';
echo $r;
echo HtmlInput::hidden('act', 'CSV:histo');
echo HtmlInput::submit('viewsearch', _('Export vers CSV'));
$qcode=$http->get("search_opqcode","string","");
echo HtmlInput::hidden('qcode',trim($qcode));
echo '</form>';
echo '</div>';

View file

@ -28,7 +28,9 @@ if (!defined('ALLOWED'))
?>
<table class="result">
<tr>
<th><?= _('Date') ?></th>
<th><?= _('Banque') ?></th>
<th><?=_('Pièce')?></th>
<th><?= _("Tiers") ?></th>
<th><?= _("Libellé") ?></th>
<th><?= _("Montant") ?></th>
@ -41,9 +43,15 @@ if (!defined('ALLOWED'))
$class=($i%2==0)?' class="even" ':' class="odd" ';
?>
<tr <?= $class ?> >
<td>
<?=$this->data[$i]['str_date']?>
</td>
<td>
<?= $this->data[$i]['bk_qcode']; ?>
</td>
<td>
<?= $this->data[$i]['jr_pj_number']; ?>
</td>
<td>
<?php
echo HtmlInput::history_card($this->data[$i]['tiers_f_id'],

View file

@ -79,8 +79,8 @@ foreach ($this->data as $line) {
echo "<TD>" . h($line['jr_pj_number']) . "</TD>";
// Date
echo "<TD>" . smaller_date($line['jr_date']) . "</TD>";
echo "<TD>" . smaller_date($line['jr_date_paid']) . "</TD>";
echo "<TD>" . smaller_date($line['str_date']) . "</TD>";
echo "<TD>" . smaller_date($line['str_date_paid']) . "</TD>";
// Internal with detail
echo "<TD>" . HtmlInput::detail_op($line['jr_id'], $line['jr_internal']) . "</TD>";

View file

@ -69,10 +69,10 @@ for ($i=0;$i<$nb_data;$i++):
?>
<tr <?=$odd?> >
<td>
<?=$this->data[$i]['jr_date']?>
<?=$this->data[$i]['str_date']?>
</td>
<td>
<?=$this->data[$i]['jr_date_paid']?>
<?=$this->data[$i]['str_date_paid']?>
</td>
<td>
<?=$this->data[$i]['jr_pj_number']?>

View file

@ -84,10 +84,10 @@ for ($i=0;$i<$nb_data;$i++):
?>
<tr <?=$odd?> >
<td>
<?=$this->data[$i]['jr_date']?>
<?=$this->data[$i]['str_date']?>
</td>
<td>
<?=$this->data[$i]['jr_date_paid']?>
<?=$this->data[$i]['str_date_paid']?>
</td>
<td>
<?=$this->data[$i]['jr_pj_number']?>

View file

@ -77,8 +77,8 @@ foreach ($this->data as $line) {
echo "<TD>" . h($line['jr_pj_number']) . "</TD>";
// Date
echo "<TD>" . smaller_date($line['jr_date']) . "</TD>";
echo "<TD>" . smaller_date($line['jr_date_paid']) . "</TD>";
echo "<TD>" . smaller_date($line['str_date']) . "</TD>";
echo "<TD>" . smaller_date($line['str_date_paid']) . "</TD>";
// Internal with detail
echo "<TD>" . HtmlInput::detail_op($line['jr_id'], $line['jr_internal']) . "</TD>";

View file

@ -69,10 +69,10 @@ for ($i=0;$i<$nb_data;$i++):
?>
<tr <?=$odd?> >
<td>
<?=$this->data[$i]['jr_date']?>
<?=$this->data[$i]['str_date']?>
</td>
<td>
<?=$this->data[$i]['jr_date_paid']?>
<?=$this->data[$i]['str_date_paid']?>
</td>
<td>
<?=$this->data[$i]['jr_pj_number']?>

View file

@ -70,10 +70,10 @@ for ($i=0;$i<$nb_data;$i++):
?>
<tr <?=$odd?> >
<td>
<?=$this->data[$i]['jr_date']?>
<?=$this->data[$i]['str_date']?>
</td>
<td>
<?=$this->data[$i]['jr_date_paid']?>
<?=$this->data[$i]['str_date_paid']?>
</td>
<td>
<?=$this->data[$i]['jr_pj_number']?>

View file

@ -32,6 +32,18 @@ printf (_(" La version de votre installation est %s "),$version_noalyss);
$core=new Package_Repository();
$xml=$core->getContent();
/*
* If xml is null , it means it was not possible to get the file , could be
* a network problem or a misconfiguration
*/
if ( $xml == NULL) {
echo '<h2 class="error">';
printf (_("Désolé , impossible de se connecter au serveur %s"),
NOALYSS_PACKAGE_REPOSITORY);
echo '</h2>';
return;
}
printf(h1(_("Version %s du %s")),$xml->core->version,$xml->core->date);
echo '<p>';
echo $xml->core->description;

View file

@ -35,6 +35,18 @@ require_once NOALYSS_INCLUDE.'/class/extension.class.php';
*/
$package_repository=new Package_Repository();
$xml=$package_repository->getContent();
/*
* If xml is null , it means it was not possible to get the file , could be
* a network problem or a misconfiguration
*/
if ( $xml == NULL) {
echo '<h2 class="error">';
printf (_("Désolé , impossible de se connecter au serveur %s"),
NOALYSS_PACKAGE_REPOSITORY);
echo '</h2>';
return;
}
$a_plugin=$xml->xpath('//plugins/plugin');
$nb_plugin=count($a_plugin);

View file

@ -30,6 +30,18 @@ require_once NOALYSS_INCLUDE.'/class/extension.class.php';
$package_repository=new Package_Repository();
$xml=$package_repository->getContent();
/*
* If xml is null , it means it was not possible to get the file , could be
* a network problem or a misconfiguration
*/
if ( $xml == NULL) {
echo '<h2 class="error">';
printf (_("Désolé , impossible de se connecter au serveur %s"),
NOALYSS_PACKAGE_REPOSITORY);
echo '</h2>';
return;
}
$a_template=$xml->xpath('//database_template/dbtemplate');