phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4859 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4859 - phpcompta/trunk/include
Date: Sat, 2 Jun 2012 13:22:51 +0200 (CEST)

Author: danydb
Date: 2012-06-02 13:22:50 +0200 (Sat, 02 Jun 2012)
New Revision: 4859

Modified:
   phpcompta/trunk/include/class_follow_up.php
   phpcompta/trunk/include/class_follow_up_detail.php
Log:
Do not record lines without Card

Modified: phpcompta/trunk/include/class_follow_up.php
===================================================================
--- phpcompta/trunk/include/class_follow_up.php 2012-06-02 11:22:03 UTC (rev 
4858)
+++ phpcompta/trunk/include/class_follow_up.php 2012-06-02 11:22:50 UTC (rev 
4859)
@@ -164,8 +164,9 @@
                );
 
                // List opération liées
-               $operation = $this->db->get_array("select 
ago_id,j.jr_id,j.jr_internal,j.jr_comment from jrn as j join 
action_gestion_operation as ago on (j.jr_id=ago.jr_id)
-                       where ag_id=$1", array($this->ag_id));
+               $operation = $this->db->get_array("select 
ago_id,j.jr_id,j.jr_internal,j.jr_comment,to_char(j.jr_date,'DD.MM.YY') as 
str_date
+                       from jrn as j join action_gestion_operation as ago on 
(j.jr_id=ago.jr_id)
+                       where ag_id=$1 order by jr_date", array($this->ag_id));
                $iconcerned = new IConcerned('operation');
 
                // List related action
@@ -459,14 +460,14 @@
 
                        $itva->name = 'e_march' . $i . '_tva_id';
                        $itva->value = ($tmp_ad) ? 
$tmp_ad->get_parameter('tva_id') : 0;
-                       $itva->javascript = ' 
onchange="format_number(this);clean_tva(' . $i . ');compute_ledger(' . $i . 
')"';
+                       $itva->js = ' onchange="format_number(this);clean_tva(' 
. $i . ');compute_ledger(' . $i . ')"';
                        $itva->set_attribute('compute', $i);
 
                        $aArticle[$i]['tvaid'] = $itva->input();
 
                        $num->name = "e_march" . $i . "_tva_amount";
                        $num->value = ($tmp_ad) ? 
$tmp_ad->get_parameter('tva_amount') : 0;
-                       $num->javascript = ' onchange="compute_ledger(' . $i . 
')"';
+                       $num->javascript = " onchange=\"compute_ledger(' . $i . 
')\"";
                        $num->size = 8;
                        $aArticle[$i]['tva'] = $num->input();
 
@@ -632,6 +633,7 @@
                {
                        $act = new Follow_Up_Detail($this->db);
                        $act->from_array($_POST, $i);
+                       if ($act->f_id == 0 )continue;
                        $act->ag_id = $this->ag_id;
                        $act->save();
                }
@@ -934,6 +936,7 @@
                {
                        $act = new Follow_Up_Detail($this->db);
                        $act->from_array($_POST, $i);
+                       if ($act->f_id == 0 ) continue;
                        $act->save();
                }
                if (trim($this->ag_comment) != '')

Modified: phpcompta/trunk/include/class_follow_up_detail.php
===================================================================
--- phpcompta/trunk/include/class_follow_up_detail.php  2012-06-02 11:22:03 UTC 
(rev 4858)
+++ phpcompta/trunk/include/class_follow_up_detail.php  2012-06-02 11:22:50 UTC 
(rev 4859)
@@ -148,7 +148,7 @@
     {
         $sql="SELECT ad_id, f_id, ad_text, ad_pu, ad_quant, ad_tva_id, 
ad_tva_amount,
              ad_total_amount, ag_id   FROM action_detail ".
-             " where ag_id=$1";
+             " where ag_id=$1 order by ad_id";
         $res=$this->db->get_array(
                  $sql,
                  array($this->ag_id)



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]