Merged revisions 4134-4141 via svnmerge from
svn+ssh://danydb@svn/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ètre -> 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èle à 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 ........
This commit is contained in:
parent
0123a56e3d
commit
39bd5bbecd
10 changed files with 38 additions and 24 deletions
|
|
@ -127,8 +127,7 @@ class Acc_Account_Ledger
|
|||
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 @@ class Acc_Account_Ledger
|
|||
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 @@ class Acc_Account_Ledger
|
|||
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 @@ class Acc_Account_Ledger
|
|||
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,10 +493,13 @@ class Acc_Account_Ledger
|
|||
$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 @@ class Acc_Account_Ledger
|
|||
if (isset($_REQUEST['poste_id'])) echo $hid->input("poste_id",$_REQUEST['poste_id']);
|
||||
|
||||
echo "</form></TD>";
|
||||
echo '</tr>';
|
||||
echo "</table>";
|
||||
echo '</div>';
|
||||
|
||||
|
||||
}
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -629,12 +629,12 @@ class Acc_Ledger
|
|||
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
|
||||
|
|
|
|||
|
|
@ -192,12 +192,12 @@ class Fiche_Attr
|
|||
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));
|
||||
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ class Lettering
|
|||
{
|
||||
$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 @@ class Lettering_Account extends Lettering
|
|||
* - $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 @@ class Lettering_Account extends Lettering
|
|||
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 @@ class Lettering_Card extends Lettering
|
|||
* - $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 @@ class Lettering_Card extends Lettering
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -112,13 +112,13 @@ if ( $def==1 || $def == 4 )
|
|||
|
||||
$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"));
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ require_once("impress_inc.php");
|
|||
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 @@ else
|
|||
{
|
||||
$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
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ if ( isset($poste_id) && strlen(trim($poste_id)) != 0 && isNumber($poste_id) )
|
|||
}
|
||||
else
|
||||
{
|
||||
$cond_poste='';
|
||||
$sql="select pcm_val from tmp_pcmn ";
|
||||
if ($from_poste != '')
|
||||
{
|
||||
|
|
@ -79,6 +80,7 @@ else
|
|||
}
|
||||
|
||||
$sql=$sql.$cond_poste.' order by pcm_val::text';
|
||||
|
||||
$a_poste=$cn->get_array($sql);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ $User->can_request(IMPBIL,0);
|
|||
$sql="select pcm_val from tmp_pcmn ";
|
||||
|
||||
extract($_GET);
|
||||
$cond_poste="";
|
||||
if ($from_poste != '')
|
||||
{
|
||||
$cond_poste = ' where ';
|
||||
|
|
|
|||
|
|
@ -110,8 +110,10 @@ echo '</div>';
|
|||
//-----------------------------------------------------
|
||||
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='';
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,9 @@ if ( isset( $_REQUEST['bt_html'] ) )
|
|||
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 @@ if ( isset( $_REQUEST['bt_html'] ) )
|
|||
// 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 @@ if ( isset( $_REQUEST['bt_html'] ) )
|
|||
echo $op->display_jrnx_detail(1);
|
||||
}
|
||||
echo '</table>';
|
||||
|
||||
echo Acc_Account_Ledger::HtmlTableHeader();
|
||||
}
|
||||
echo "</div>";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue