phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r371 - trunk/tva


From: phpcompta-dev
Subject: [Phpcompta-dev] r371 - trunk/tva
Date: Sun, 27 May 2012 23:02:13 +0200 (CEST)

Author: danydb
Date: 2012-05-27 23:02:12 +0200 (Sun, 27 May 2012)
New Revision: 371

Modified:
   trunk/tva/tva_param.inc.php
Log:
improve tab mechanisme


Modified: trunk/tva/tva_param.inc.php
===================================================================
--- trunk/tva/tva_param.inc.php 2012-05-27 20:38:36 UTC (rev 370)
+++ trunk/tva/tva_param.inc.php 2012-05-27 21:02:12 UTC (rev 371)
@@ -33,8 +33,15 @@
        foreach ( array('CRTVA','ATVA','DTTVA') as $i){
                $value=${$i};
                if ( trim(${$i})=='') $value=null;
+               if ( $cn->get_value("select count(*) from 
tva_belge.parameter_chld where pcode=$1",array($i))==0)
+               {
+                       $cn->exec_sql("insert into 
tva_belge.parameter_chld(pcode,pcm_val) values($1,$2) ",
+                                       array($i,$value));
+               }else {
+
                $cn->exec_sql("update tva_belge.parameter_chld set 
pcm_val=$1::account_type where pcode=$2",
                                array($value,$i));
+               }
        }
 
        unset($_POST['save_misc']);



---
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]