[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4482 - in phpcompta/trunk: doc html html/admin/sql/patc
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4482 - in phpcompta/trunk: doc html html/admin/sql/patch include |
Date: |
Sun, 27 Nov 2011 21:38:24 +0100 (CET) |
Author: danydb
Date: 2011-11-27 21:38:23 +0100 (Sun, 27 Nov 2011)
New Revision: 4482
Modified:
phpcompta/trunk/doc/manuel-fr.odt
phpcompta/trunk/html/admin/sql/patch/upgrade97.sql
phpcompta/trunk/html/export.php
phpcompta/trunk/include/ac_common.php
phpcompta/trunk/include/class_acc_ledger.php
phpcompta/trunk/include/class_print_ledger_simple.php
phpcompta/trunk/include/extension_choice.inc.php
phpcompta/trunk/include/extension_get.inc.php
phpcompta/trunk/include/history_operation.inc.php
Log:
Update manuel
Extension are now shown as menu
Fix bug with Acc_Ledger::get_operation for the periode
Historic of operation show the requested periode
Bug in patch : version 9.0 the "similar to" clause failed in trigger on pcmn
Bug in patch : renumbering of operation doesn't work with data before 1/1/2010
Modified: phpcompta/trunk/doc/manuel-fr.odt
===================================================================
(Binary files differ)
Modified: phpcompta/trunk/html/admin/sql/patch/upgrade97.sql
===================================================================
--- phpcompta/trunk/html/admin/sql/patch/upgrade97.sql 2011-11-27 02:23:06 UTC
(rev 4481)
+++ phpcompta/trunk/html/admin/sql/patch/upgrade97.sql 2011-11-27 20:38:23 UTC
(rev 4482)
@@ -218,13 +218,9 @@
begin
sResult := lower(p_account);
-sResult := translate(sResult,'éèêëàâäïîüûùöô','eeeeaaaiiuuuoo');
-sResult := translate(sResult,' $€µ£%.+-/\!(){}(),;_&|"#''^','');
+sResult := translate(sResult,'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
+sResult := translate(sResult,' $€µ£%.+-/\!(){}(),;_&|"#''^<>*','');
-if not sResult similar to '^[[:alnum:]_]+$' then
- raise exception 'Invalid character in %',p_account;
-end if;
-
return upper(sResult);
end;
@@ -960,7 +956,7 @@
insert into
menu_ref(me_code,me_menu,me_file,me_description,me_type,me_parameter) select
ex_code,ex_name,ex_file,ex_desC,'PL','plugin_code='||ex_code from extension;
insert into profile_menu (me_code,me_code_dep,p_id,p_type_display) select
me_code,'EXT',1,'S' from menu_ref where me_type='PL';
-update jrn set
jr_internal=substring(jr_internal,1,1)||lpad(upper(to_hex(jr_id+1)),6,'0');
+update jrn set
jr_internal=substr(jrn_def_type,1,1)||lpad(upper(to_hex(jr_id+1)),6,'0') from
jrn_def where jrn_def_id=jr_def_id;
update version set val=98;
Modified: phpcompta/trunk/html/export.php
===================================================================
--- phpcompta/trunk/html/export.php 2011-11-27 02:23:06 UTC (rev 4481)
+++ phpcompta/trunk/html/export.php 2011-11-27 20:38:23 UTC (rev 4482)
@@ -34,9 +34,9 @@
$user=new User($cn);
$user->Check();
-$act=$user->check_dossier($gDossier);
+$action=$user->check_dossier($gDossier);
-if ( $act=='X' || ! isset($_GET['act']) || $user->check_print($_GET['act'])==0
)
+if ( $action=='X' || ! isset($_GET['act']) ||
$user->check_print($_GET['act'])==0 )
{
echo alert('Accès interdit');
redirect("do.php?".dossier::get());
Modified: phpcompta/trunk/include/ac_common.php
===================================================================
--- phpcompta/trunk/include/ac_common.php 2011-11-27 02:23:06 UTC (rev
4481)
+++ phpcompta/trunk/include/ac_common.php 2011-11-27 20:38:23 UTC (rev
4482)
@@ -774,10 +774,14 @@
// if file is not a plugin, include the file, otherwise
// include the plugin launcher
- if ( $file[0]['me_type'] != 'PL')
- require_once $file[0]['me_file'];
- else
- require 'extension_get.inc.php';
+ if ($file[0]['me_type'] != 'PL')
+ {
+ require_once $file[0]['me_file'];
+ }
+ else
+ {
+ var_dump($file);
+ }
}
if ( $file[0]['me_javascript'] != '')
{
Modified: phpcompta/trunk/include/class_acc_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger.php 2011-11-27 02:23:06 UTC
(rev 4481)
+++ phpcompta/trunk/include/class_acc_ledger.php 2011-11-27 20:38:23 UTC
(rev 4482)
@@ -2456,10 +2456,12 @@
if ( ! isset ($date_start))
{
$user=new User($this->db);
- $period=$user->get_periode();
+ $exercice=$user->get_exercice();
- $per=new Periode($this->db,$period);
- list($date_start,$date_end)=$per->get_date_limit();
+ $per=new Periode($this->db);
+
list($per_start,$per_end)=$per->limit_year($exercice);
+ list($date_start,$none)=$per_start->get_date_limit();
+ list($none,$date_end)=$per_end->get_date_limit();
}
$desc='';
@@ -2697,8 +2699,10 @@
" to_char(jr_date,'DDMMYY') as date_fmt, ".
" jr_comment as comment, jr_montant as montant ,".
" jr_grpt_id,jr_def_id".
- " from jrn where jr_tech_per >= $1 ".
- ' and jr_tech_per <=$2 '.$jrn.' order by
jr_date,substring(jr_pj_number,\'\\\d+$\')::numeric asc';
+ " from jrn where ".
+ " jr_date >= (select p_start from parm_periode where
p_id = $1)
+ and jr_date <= (select p_end from
parm_periode where p_id = $2)" .
+ ' '.$jrn.' order by
jr_date,substring(jr_pj_number,\'\\\d+$\')::numeric asc';
$ret=$this->db->get_array($sql,array($p_from,$p_to));
return $ret;
}
Modified: phpcompta/trunk/include/class_print_ledger_simple.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_simple.php 2011-11-27
02:23:06 UTC (rev 4481)
+++ phpcompta/trunk/include/class_print_ledger_simple.php 2011-11-27
20:38:23 UTC (rev 4482)
@@ -93,11 +93,11 @@
}
$this->Cell(15,6,'Pièce');
$this->Cell(10,6,'Date');
- $this->Cell(20,6,'ref');
+ $this->Cell(13,6,'ref');
if ( $this->jrn_type=='ACH')
- $this->Cell(60,6,'Client');
+ $this->Cell(40,6,'Client');
else
- $this->Cell(60,6,'Fournisseur');
+ $this->Cell(40,6,'Fournisseur');
$flag_tva=(count($this->a_Tva) > 4)?true:false;
if ( !$flag_tva ) $this->Cell(65,6,'Description');
@@ -117,7 +117,7 @@
$this->SetFont('DejaVu','',6);
// page Header
- $this->Cell(170,6,'report',0,0,'R');
+ $this->Cell(143,6,'report',0,0,'R');
$this->Cell(15,6,nbm($this->rap_htva),0,0,'R'); /* HTVA */
if ( $this->jrn_type != 'VEN')
{
@@ -149,7 +149,7 @@
//Position at 3 cm from bottom
$this->SetY(-20);
/* write reporting */
- $this->Cell(170,6,'Total page ','T',0,'R'); /* HTVA */
+ $this->Cell(143,6,'Total page ','T',0,'R'); /* HTVA */
$this->Cell(15,6,nbm($this->tp_htva),'T',0,'R'); /* HTVA */
if ( $this->jrn_type !='VEN')
{
@@ -164,7 +164,7 @@
$this->Cell(15,6,nbm($this->tp_tvac),'T',0,'R'); /* Tvac */
$this->Ln(2);
- $this->Cell(170,6,'report',0,0,'R'); /* HTVA */
+ $this->Cell(143,6,'report',0,0,'R'); /* HTVA */
$this->Cell(15,6,nbm($this->rap_htva),0,0,'R'); /* HTVA */
if ( $this->jrn_type !='VEN')
{
@@ -219,31 +219,30 @@
for ($f=0;$f<count($aAmountVat);$f++)
{
$l=$aAmountVat[$f]['tva_id'];
- $atva_amount[$l]=$aAmountVat[$f]['sum_vat'];
- $this->tp_tva[$l]+=$aAmountVat[$f]['sum_vat'];
- $this->rap_tva[$l]+=$aAmountVat[$f]['sum_vat'];
+
$atva_amount[$l]=bcadd($atva_amount[$l],$aAmountVat[$f]['sum_vat']);
+
$this->tp_tva[$l]=bcadd($this->tp_tva[$l],$aAmountVat[$f]['sum_vat']);
+
$this->rap_tva[$l]=bcadd($this->rap_tva[$l],$aAmountVat[$f]['sum_vat']);
}
$row=$a_jrn[$i];
$this->Cell(15,5,($row['pj']),0,0);
$this->Cell(10,5,$row['date_fmt'],0,0);
- $this->Cell(20,5,$row['internal'],0,0);
+ $this->Cell(13,5,$row['internal'],0,0);
list($qc,$name)=$this->get_tiers($row['id'],$this->jrn_type);
- $this->Cell(20,5,$qc,0,0);
- $this->Cell(40,5,$name,0,0);
+ $this->Cell(40,5,"[".$qc."]".$name,0,0);
$this->Cell(65,5,substr($row['comment'],0,47),0,0);
/* get other amount (without vat, total vat included, private, ND
*/
$other=$this->ledger->get_other_amount($a_jrn[$i]['jr_grpt_id']);
- $this->tp_htva+=$other['price'];
- $this->tp_tvac+=$other['price']+$other['vat'];
- $this->tp_priv+=$other['priv'];
- $this->tp_nd+=$other['tva_nd'];
- $this->rap_htva+=$other['price'];
- $this->rap_tvac+=$other['price']+$other['vat'];
- $this->rap_priv+=$other['priv'];
- $this->rap_nd+=$other['tva_nd'];
+ $this->tp_htva=bcadd($this->tp_htva,$other['price']);
+ $this->tp_tvac=bcadd($this->tp_tvac,$other['price']+$other['vat']);
+ $this->tp_priv=bcadd($this->tp_priv,$other['priv']);
+ $this->tp_nd=bcadd($this->tp_nd,$other['tva_nd']);
+ $this->rap_htva=bcadd($this->rap_htva,$other['price']);
+
$this->rap_tvac=bcadd($this->rap_tvac,$other['price']+$other['vat']);
+ $this->rap_priv=bcadd($this->rap_priv,$other['priv']);
+ $this->rap_nd=bcadd($this->rap_nd,$other['tva_nd']);
$this->Cell(15,5,nbm($other['price']),0,0,'R');
@@ -252,10 +251,10 @@
$this->Cell(15,5,nbm($other['priv']),0,0,'R');
$this->Cell(15,5,nbm($other['tva_nd']),0,0,'R');
}
- foreach ($atva_amount as $row_atva_amount)
- {
- $this->Cell(15,5,nbm($row_atva_amount),0,0,'R');
- }
+ foreach ($atva_amount as $row_atva_amount)
+ {
+ $this->Cell(15, 5, nbm($row_atva_amount), 0, 0,
'R');
+ }
$l_tvac=bcadd($other['price'],$other['vat']);
$this->Cell(15,5,nbm($l_tvac),0,0,'R');
Modified: phpcompta/trunk/include/extension_choice.inc.php
===================================================================
--- phpcompta/trunk/include/extension_choice.inc.php 2011-11-27 02:23:06 UTC
(rev 4481)
+++ phpcompta/trunk/include/extension_choice.inc.php 2011-11-27 20:38:23 UTC
(rev 4482)
@@ -38,7 +38,7 @@
{
$_REQUEST['plugin_code']=$a->value[0]['value'];
}
-else
+/*else
{
if (!isset($_REQUEST['ac'])) echo_warning ("ac non positionné");
echo '<form method="get" action="do.php">';
@@ -47,9 +47,8 @@
echo _('Extension').$a->input().HtmlInput::submit('go',_("Choix de
l'extension"));
echo '</form>';
echo '<hr>';
-}
+}*/
-if ( isset($_REQUEST['plugin_code']))
- require_once 'extension_get.inc.php';
-
+//if ( isset($_REQUEST['plugin_code']))
+// require_once 'extension_get.inc.php';
?>
Modified: phpcompta/trunk/include/extension_get.inc.php
===================================================================
--- phpcompta/trunk/include/extension_get.inc.php 2011-11-27 02:23:06 UTC
(rev 4481)
+++ phpcompta/trunk/include/extension_get.inc.php 2011-11-27 20:38:23 UTC
(rev 4482)
@@ -18,7 +18,7 @@
global $cn,$g_user;
$ext=new Extension($cn);
-;
+
if ($ext->search($_REQUEST['plugin_code']) == -1)
{
echo_warning("plugin non trouvé");
Modified: phpcompta/trunk/include/history_operation.inc.php
===================================================================
--- phpcompta/trunk/include/history_operation.inc.php 2011-11-27 02:23:06 UTC
(rev 4481)
+++ phpcompta/trunk/include/history_operation.inc.php 2011-11-27 20:38:23 UTC
(rev 4482)
@@ -85,6 +85,7 @@
}
$p_array = $_GET;
+$msg="";
/* by default we should the default period */
if (!isset($p_array['date_start']))
{
@@ -93,7 +94,13 @@
list($date_start, $date_end) = $per->get_date_limit();
$p_array['date_start'] = $date_start;
$p_array['date_end'] = $date_end;
+ $msg='<h2 class="info2">'."Periode ".$date_start." au
".$date_end.'</h2>';
}
+else
+{
+ $msg='<h2 class="info2">'."Periode ".$_GET['date_start']." au
".$_GET['date_end'].'</h2>';
+
+}
/* compute the sql stmt */
list($sql, $where) = $Ledger->build_search_sql($p_array);
@@ -104,7 +111,7 @@
$offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
$bar = jrn_navigation_bar($offset, $max_line, $step, $page);
-
+echo $msg;
echo '<form method="GET" id="fpaida" class="print">';
echo HtmlInput::hidden("ac", $_REQUEST['ac']);
echo HtmlInput::hidden('ledger_type',$_REQUEST['ledger_type']);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4482 - in phpcompta/trunk: doc html html/admin/sql/patch include,
phpcompta-dev <=