[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4146 - in phpcompta/trunk: . include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4146 - in phpcompta/trunk: . include |
Date: |
Sat, 28 May 2011 21:09:26 +0200 (CEST) |
Author: danydb
Date: 2011-05-28 21:09:25 +0200 (Sat, 28 May 2011)
New Revision: 4146
Modified:
phpcompta/trunk/
phpcompta/trunk/include/class_acc_account_ledger.php
phpcompta/trunk/include/class_acc_ledger.php
phpcompta/trunk/include/class_fiche_attr.php
phpcompta/trunk/include/class_lettering.php
phpcompta/trunk/include/compta_ven.inc.php
phpcompta/trunk/include/export_form_csv.php
phpcompta/trunk/include/export_gl_csv.php
phpcompta/trunk/include/export_gl_pdf.php
phpcompta/trunk/include/impress_gl_comptes.inc.php
phpcompta/trunk/include/impress_poste.inc.php
Log:
Merged revisions 4134-4141 via svnmerge from
svn+ssh://address@hidden/svn/phpcompta/branches/rel560
........
r4134 | danydb | 2011-05-25 23:49:07 +0200 (Wed, 25 May 2011) | 1 line
Fix bug Great Ledger for 8.2
........
r4135 | danydb | 2011-05-27 20:29:44 +0200 (Fri, 27 May 2011) | 2 lines
0000279: Param?\195?\168tre -> Attribut
........
r4136 | danydb | 2011-05-27 21:25:50 +0200 (Fri, 27 May 2011) | 2 lines
0000278: Lettrage
........
r4137 | danydb | 2011-05-27 21:33:42 +0200 (Fri, 27 May 2011) | 2 lines
0000277: impression -> rapport
........
r4138 | danydb | 2011-05-27 21:47:10 +0200 (Fri, 27 May 2011) | 1 line
0000276: Impression -> poste
........
r4139 | danydb | 2011-05-27 22:05:05 +0200 (Fri, 27 May 2011) | 2 lines
0000273: Mod?\195?\168le ?\195?\160 sauver
........
r4140 | danydb | 2011-05-27 22:08:16 +0200 (Fri, 27 May 2011) | 2 lines
0000272: Historique : tri des dates
........
r4141 | danydb | 2011-05-27 22:09:58 +0200 (Fri, 27 May 2011) | 1 line
0000275: Impression grand livre export PDF & CSV
........
Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
- /phpcompta/branches/rel560:1-4130,4133
+ /phpcompta/branches/rel560:1-4145
Modified: phpcompta/trunk/include/class_acc_account_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_account_ledger.php 2011-05-28
19:04:47 UTC (rev 4145)
+++ phpcompta/trunk/include/class_acc_account_ledger.php 2011-05-28
19:09:25 UTC (rev 4146)
@@ -127,8 +127,7 @@
if ( $solded == 1)
{
$filter=str_replace('jrn_def_id','jr_def_id',$filter_sql);
- $bal_sql=" select
sum(amount_deb) as s_deb,sum(amount_cred) as s_cred, j_poste from
- (select case when j_debit='t' then j_montant else 0 end
as amount_deb,
+ $bal_sql="select sum(amount_deb) as s_deb,sum(amount_cred) as
s_cred, j_poste from (select case when
j_debit='t' then j_montant else 0 end as amount_deb,
case when
j_debit='f' then j_montant else 0 end as amount_cred,
j_poste
from jrnx join
jrn on (j_grpt = jr_grpt_id)
@@ -136,7 +135,7 @@
j_poste=$1 and
$filter and
(
to_date($2,'DD.MM.YYYY') <= j_date and
- to_date($3,'DD.MM.YYYY') >= j_date )) as m
+ to_date($3,'DD.MM.YYYY') >= j_date )) as
signed_amount
group by j_poste
";
$r=$this->db->get_array($bal_sql,array($this->id,$p_from,$p_to));
@@ -442,7 +441,7 @@
exit;
}
$hid=new IHidden();
- echo '<div class="noprint">';
+
echo "<table >";
echo '<TR>';
$str_ople=(isset($_REQUEST['ople']))?HtmlInput::hidden('ople',$_REQUEST['ople']):'';
@@ -469,13 +468,13 @@
if ( isset($_REQUEST['solded'] )) echo HtmlInput::hidden('solded','1');
if (isset($_REQUEST['from_poste']))
- echo $hid->input('from_poste',$_REQUEST['from_poste']);
+ echo HtmlInput::hidden('from_poste',$_REQUEST['from_poste']);
if (isset($_REQUEST['to_poste']))
- echo $hid->input('to_poste',$_REQUEST['to_poste']);
+ echo HtmlInput::hidden('to_poste',$_REQUEST['to_poste']);
if (isset($_REQUEST['poste_id']))
- echo $hid->input("poste_id",$_REQUEST['poste_id']);
+ echo HtmlInput::hidden("poste_id",$_REQUEST['poste_id']);
if (isset($_REQUEST['poste_fille']))
echo $hid->input('poste_fille','on');
@@ -494,11 +493,14 @@
$hid->input("to_periode",$_REQUEST['to_periode']);
if (isset($_REQUEST['from_poste']))
- echo $hid->input('from_poste',$_REQUEST['from_poste']);
+ echo HtmlInput::hidden('from_poste',$_REQUEST['from_poste']);
if (isset($_REQUEST['to_poste']))
- echo $hid->input('to_poste',$_REQUEST['to_poste']);
+ echo HtmlInput::hidden('to_poste',$_REQUEST['to_poste']);
+ if (isset($_REQUEST['poste_id']))
+ echo HtmlInput::hidden("poste_id",$_REQUEST['poste_id']);
+
if ( isset($_REQUEST['letter'] )) echo HtmlInput::hidden('letter','2');
if ( isset($_REQUEST['solded'] )) echo HtmlInput::hidden('solded','1');
@@ -509,8 +511,9 @@
if (isset($_REQUEST['poste_id'])) echo
$hid->input("poste_id",$_REQUEST['poste_id']);
echo "</form></TD>";
+ echo '</tr>';
echo "</table>";
- echo '</div>';
+
}
/*!
Modified: phpcompta/trunk/include/class_acc_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger.php 2011-05-28 19:04:47 UTC
(rev 4145)
+++ phpcompta/trunk/include/class_acc_ledger.php 2011-05-28 19:09:25 UTC
(rev 4146)
@@ -629,12 +629,12 @@
case 'da':
// date asc
$sort_date="<th>$image_sel_asc Date <A class=\"mtitle\"
HREF=\"?$url&o=dd\">$image_desc</A></th>";
- $order=" order by jr_date_order
asc,substring(jr_pj_number,\'\\\d+$\')::numeric asc ";
+ $order=' order by jr_date_order
asc,substring(jr_pj_number,\'\\\d+$\')::numeric asc ';
break;
case 'dd':
$sort_date="<th> <A class=\"mtitle\"
HREF=\"?$url&o=da\">$image_asc</A> Date $image_sel_desc</th>";
// date desc
- $order=" order by jr_date_order
desc,substring(jr_pj_number,\'\\\d+$\')::numeric desc ";
+ $order=' order by jr_date_order
desc,substring(jr_pj_number,\'\\\d+$\')::numeric desc ';
break;
case 'ma':
// montant asc
Modified: phpcompta/trunk/include/class_fiche_attr.php
===================================================================
--- phpcompta/trunk/include/class_fiche_attr.php 2011-05-28 19:04:47 UTC
(rev 4145)
+++ phpcompta/trunk/include/class_fiche_attr.php 2011-05-28 19:09:25 UTC
(rev 4146)
@@ -192,12 +192,12 @@
public function delete()
{
if ($this->ad_id < 9000) return;
- $sql=$this->cn->exec_sql("delete from fiche_detail where ad_id=$1 )",
+ $sql=$this->cn->exec_sql("delete from fiche_detail where ad_id=$1 ",
array($this->ad_id));
- $sql="delete from jnt_fic_attr where ad_id=$1";
+ $sql="delete from jnt_fic_attr where ad_id=$1";
$res=$this->cn->exec_sql($sql,array($this->ad_id));
-
+
$sql="delete from attr_def where ad_id=$1";
$res=$this->cn->exec_sql($sql,array($this->ad_id));
Modified: phpcompta/trunk/include/class_lettering.php
===================================================================
--- phpcompta/trunk/include/class_lettering.php 2011-05-28 19:04:47 UTC (rev
4145)
+++ phpcompta/trunk/include/class_lettering.php 2011-05-28 19:09:25 UTC (rev
4146)
@@ -282,7 +282,7 @@
{
$j_debit=$this->db->get_value('select j_Debit from jrnx where
j_id=$1',array($p_jid));
$amount_init=$this->db->get_value('select j_montant from jrnx where
j_id=$1',array($p_jid));
- $this->get_filter();
+ $this->get_filter($p_jid);
// retrieve jnt_letter.id
$sql="select distinct(jl_id) from jnt_letter left outer join
letter_deb using (jl_id) left outer join letter_cred using (jl_id)
where letter_deb.j_id = $1 or letter_cred.j_id=$2";
@@ -341,7 +341,7 @@
* - $this->end max date
* - this->account: accounting
*/
- public function get_filter()
+ public function get_filter($p_jid=0)
{
$filter_deb='';
if (isset($this->fil_deb))
@@ -366,7 +366,7 @@
isNumber($this->fil_amount_max)==1 &&
isNumber($this->fil_amount_min)==1 &&
($this->fil_amount_max != 0 || $this->fil_amount_min != 0) )
- $filter_amount=" and j_montant >= $this->fil_amount_min and
j_montant<=$this->fil_amount_max ";
+ $filter_amount=" and (j_montant >= $this->fil_amount_min and
j_montant<=$this->fil_amount_max or
(coalesce(comptaproc.get_letter_jnt($p_jid),-1)=
coalesce(comptaproc.get_letter_jnt(j_id),-1) and
coalesce(comptaproc.get_letter_jnt($p_jid),-1) <> -1 )) ";
$sql="
select j_id,j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,
j_montant,j_debit,jr_comment,jr_internal,jr_id,jr_def_id,
@@ -458,7 +458,7 @@
* - $this->end max date
* - this->quick_code: quick_code
*/
- public function get_filter()
+ public function get_filter($p_jid=0)
{
$filter_deb='';
if (isset($this->fil_deb))
@@ -483,7 +483,7 @@
isNumber($this->fil_amount_max)==1 &&
isNumber($this->fil_amount_min)==1 &&
($this->fil_amount_max != 0 || $this->fil_amount_min != 0) )
- $filter_amount=" and j_montant between $this->fil_amount_min and
$this->fil_amount_max ";
+ $filter_amount=" and (j_montant between $this->fil_amount_min and
$this->fil_amount_max or (coalesce(comptaproc.get_letter_jnt($p_jid),-1)=
coalesce(comptaproc.get_letter_jnt(j_id),-1) and
coalesce(comptaproc.get_letter_jnt($p_jid),-1) <> -1 )) ";
$sql="
select j_id,j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,
j_montant,j_debit,jr_comment,jr_internal,jr_id,jr_def_id,
Modified: phpcompta/trunk/include/compta_ven.inc.php
===================================================================
--- phpcompta/trunk/include/compta_ven.inc.php 2011-05-28 19:04:47 UTC (rev
4145)
+++ phpcompta/trunk/include/compta_ven.inc.php 2011-05-28 19:09:25 UTC (rev
4146)
@@ -112,13 +112,13 @@
$chk=new ICheckBox();
$chk->selected=false;
- echo '<p>';
+ echo '<div style="clear:both">';
echo $chk->input('opd_save');
echo "Sauvez cette opération comme modèle d'opération ?";
echo '<br/>';
$opd_name=new IText('opd_name');
echo "Nom du modèle ".$opd_name->input();
- echo '</p>';
+ echo '</div>';
echo '<hr>';
echo
HtmlInput::submit("record",_("Enregistrement"),'onClick="return
verify_ca(\'\');"');
echo HtmlInput::submit('correct',_("Corriger"));
Modified: phpcompta/trunk/include/export_form_csv.php
===================================================================
--- phpcompta/trunk/include/export_form_csv.php 2011-05-28 19:04:47 UTC (rev
4145)
+++ phpcompta/trunk/include/export_form_csv.php 2011-05-28 19:09:25 UTC (rev
4146)
@@ -29,6 +29,7 @@
header('Pragma: public');
header('Content-type: application/csv');
header('Content-Disposition: attachment;filename="rapport.csv"',FALSE);
+
require_once('class_dossier.php');
$gDossier=dossier::id();
@@ -71,7 +72,7 @@
{
$periode=getPeriodeName($cn,$e);
if ( $periode == null ) continue;
- $array[]=$Form->get_row($e,$e);
+ $array[]=$Form->get_row($e,$e,$_GET['type_periode']);
$periode_name[]=$periode;
}
// Display column heading
Modified: phpcompta/trunk/include/export_gl_csv.php
===================================================================
--- phpcompta/trunk/include/export_gl_csv.php 2011-05-28 19:04:47 UTC (rev
4145)
+++ phpcompta/trunk/include/export_gl_csv.php 2011-05-28 19:09:25 UTC (rev
4146)
@@ -59,6 +59,7 @@
}
else
{
+ $cond_poste='';
$sql="select pcm_val from tmp_pcmn ";
if ($from_poste != '')
{
@@ -79,6 +80,7 @@
}
$sql=$sql.$cond_poste.' order by pcm_val::text';
+
$a_poste=$cn->get_array($sql);
}
Modified: phpcompta/trunk/include/export_gl_pdf.php
===================================================================
--- phpcompta/trunk/include/export_gl_pdf.php 2011-05-28 19:04:47 UTC (rev
4145)
+++ phpcompta/trunk/include/export_gl_pdf.php 2011-05-28 19:09:25 UTC (rev
4146)
@@ -46,6 +46,7 @@
$sql="select pcm_val from tmp_pcmn ";
extract($_GET);
+$cond_poste="";
if ($from_poste != '')
{
$cond_poste = ' where ';
Modified: phpcompta/trunk/include/impress_gl_comptes.inc.php
===================================================================
--- phpcompta/trunk/include/impress_gl_comptes.inc.php 2011-05-28 19:04:47 UTC
(rev 4145)
+++ phpcompta/trunk/include/impress_gl_comptes.inc.php 2011-05-28 19:09:25 UTC
(rev 4146)
@@ -110,8 +110,10 @@
//-----------------------------------------------------
if ( isset( $_REQUEST['bt_html'] ) )
{
- require_once("class_acc_account_ledger.php");
+ require_once("class_acc_account_ledger.php");
+ echo '<div class="content">';
echo Acc_Account_Ledger::HtmlTableHeader("gl_comptes");
+ echo '</div>';
$sql='select pcm_val from tmp_pcmn ';
$cond_poste='';
Modified: phpcompta/trunk/include/impress_poste.inc.php
===================================================================
--- phpcompta/trunk/include/impress_poste.inc.php 2011-05-28 19:04:47 UTC
(rev 4145)
+++ phpcompta/trunk/include/impress_poste.inc.php 2011-05-28 19:09:25 UTC
(rev 4146)
@@ -173,7 +173,9 @@
if ( ! isset($_REQUEST['oper_detail']) )
{
Acc_Account_Ledger::HtmlTableHeader();
+ echo '<div class="content">';
$Poste->HtmlTable(null,$_GET['ople']);
+ echo '</div>';
echo Acc_Account_Ledger::HtmlTableHeader();
}
else
@@ -182,9 +184,11 @@
// Detail
//----------------------------------------------------------------------
Acc_Account_Ledger::HtmlTableHeader();
+
$Poste->get_row_date( $_GET['from_periode'],
$_GET['to_periode'],$_GET['ople']);
if ( empty($Poste->row)) exit();
$Poste->load();
+
echo '<table class="result" style="width:80%;margin-left:10%">';
echo '<tr><td class="mtitle" style="width:auto" colspan="6"><h2
class="info">'. $_GET['poste_id'].' '.h($Poste->label).'</h2></td></tr>';
/* avoid duplicates */
@@ -201,6 +205,7 @@
echo $op->display_jrnx_detail(1);
}
echo '</table>';
+
echo Acc_Account_Ledger::HtmlTableHeader();
}
echo "</div>";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4146 - in phpcompta/trunk: . include,
phpcompta-dev <=