Merged revisions 4728-4736 via svnmerge from
file:///home/developper/svn/phpcompta/tags/rel600 ........ r4728 | danydb | 2012-01-23 10:50:01 +0100 (Mon, 23 Jan 2012) | 2 lines Renamed ........ r4729 | danydb | 2012-01-24 13:42:20 +0100 (Tue, 24 Jan 2012) | 2 lines Bug 517 : impossible d'effacer un utilisateur ........ r4730 | danydb | 2012-01-24 13:49:31 +0100 (Tue, 24 Jan 2012) | 2 lines typo ........ r4731 | danydb | 2012-01-25 00:42:14 +0100 (Wed, 25 Jan 2012) | 1 line probleme mise à jour fiche avec double poste comptable ........ r4732 | danydb | 2012-01-25 00:44:06 +0100 (Wed, 25 Jan 2012) | 1 line Esthetique : document généré ........ r4733 | danydb | 2012-01-25 00:56:11 +0100 (Wed, 25 Jan 2012) | 1 line Problème ajout ligne dans VEN / ACH si non assujetti TVA ........ r4734 | danydb | 2012-01-25 01:46:43 +0100 (Wed, 25 Jan 2012) | 1 line order in user ........
This commit is contained in:
parent
ff79e2c8ae
commit
dd406c8c45
7 changed files with 54 additions and 49 deletions
|
|
@ -163,7 +163,7 @@ function success_update_bank(req)
|
|||
}
|
||||
catch (e)
|
||||
{
|
||||
alert("success_update_bank".e.message);
|
||||
alert("success_update_bank"+e.message);
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
@ -265,11 +265,12 @@ function ledger_fin_add_row()
|
|||
*/
|
||||
function ledger_add_row()
|
||||
{
|
||||
try{
|
||||
style='class="input_text"';
|
||||
var mytable=g("sold_item").tBodies[0];
|
||||
var ofirstRow=mytable.rows[1];
|
||||
var line=mytable.rows.length;
|
||||
var nCell=9;
|
||||
var nCell=mytable.rows[1].cells.length;
|
||||
var row=mytable.insertRow(line);
|
||||
var nb=g("nb_item");
|
||||
for (var e=0;e<nCell;e++)
|
||||
|
|
@ -290,11 +291,12 @@ function ledger_add_row()
|
|||
g("e_march"+nb.value+"_price").value='0';
|
||||
g("e_march"+nb.value).value="";
|
||||
g("e_quant"+nb.value).value="1";
|
||||
g("e_march"+nb.value+"_tva_amount").value=0;
|
||||
if ($("e_march"+nb.value+"_tva_amount")) g("e_march"+nb.value+"_tva_amount").value=0;
|
||||
|
||||
nb.value++;
|
||||
|
||||
new_tt.evalScripts();
|
||||
} catch(e) { alert(e.message);}
|
||||
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ class Acc_Ledger_Fin extends Acc_Ledger
|
|||
if ( $this->bank_id == "" )
|
||||
{
|
||||
echo h2("Journal de banque non configuré ".$this->get_name(),' class="error"');
|
||||
echo '<span class="error"> vous devez donner à ce journal un compte en banque (fiche), modifiez dans CFGLEDGER</span>';
|
||||
echo '<span class="error"> vous devez donner à ce journal un compte en banque (fiche), modifiez dans CFGLED</span>';
|
||||
alert ("Journal de banque non configuré ".$this->get_name());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -723,7 +723,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
|
|||
if ( isset($_POST['gen_invoice']) )
|
||||
{
|
||||
$ref_doc= $this->create_document($internal,$p_array);
|
||||
$this->doc= _('Document généré')." : ";
|
||||
$this->doc= _('Document généré')." : "."<br>";
|
||||
$this->doc.='<A style="line" HREF="show_pj.php?'.dossier::get().'&jr_grpt_id='.$seq.'&jrn='.$this->id.'">'.$ref_doc.'</A>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
|
|||
if ( isset($_POST['gen_invoice']))
|
||||
{
|
||||
$file=$this->create_document($internal,$p_array);
|
||||
$this->doc= _('Document généré')." : ";
|
||||
$this->doc= _('Document généré')." : "."<br>";
|
||||
$this->doc.='<A class="line" HREF="show_pj.php?'.dossier::get().'&jr_grpt_id='.$seq.'&jrn='.$this->id.'">'.$file.'</A>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -934,47 +934,51 @@ class Fiche
|
|||
}
|
||||
|
||||
// account
|
||||
if ( $id == ATTR_DEF_ACCOUNT )
|
||||
{
|
||||
$v=sql_string($value);
|
||||
if ( trim($v) != '' )
|
||||
{
|
||||
if ( strpos($v,',') != 0)
|
||||
{
|
||||
$v=$this->cn->get_value('select format_account($1)',
|
||||
array($v));
|
||||
}
|
||||
$sql=sprintf("select account_update(%d,'%s')",
|
||||
$this->id,$v);
|
||||
try
|
||||
{
|
||||
$this->cn->exec_sql($sql);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
throw new Exception(__LINE__."Erreur : ce compte [$v] n'a pas de compte parent.".
|
||||
"L'opération est annulée");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if ( strlen (trim($v)) == 0 )
|
||||
{
|
||||
if ($id == ATTR_DEF_ACCOUNT)
|
||||
{
|
||||
$v = sql_string($value);
|
||||
if (trim($v) != '')
|
||||
{
|
||||
if (strpos($v, ',') != 0)
|
||||
{
|
||||
$ac_array = explode(",", $v);
|
||||
if (count($ac_array) <> 2)
|
||||
throw new Exception('Désolé, il y a trop de virgule dans le poste comptable ' . h($v));
|
||||
$part1 = $ac_array[0];
|
||||
$part2 = $ac_array[1];
|
||||
$part1 = $this->cn->get_value('select format_account($1)', array($part1));
|
||||
$part2 = $this->cn->get_value('select format_account($1)', array($part2));
|
||||
$v = $part1 . ',' . $part2;
|
||||
}
|
||||
$sql = sprintf("select account_update(%d,'%s')", $this->id, $v);
|
||||
try
|
||||
{
|
||||
$this->cn->exec_sql($sql);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
throw new Exception(__LINE__ . "Erreur : ce compte [$v] n'a pas de compte parent." .
|
||||
"L'opération est annulée");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (strlen(trim($v)) == 0)
|
||||
{
|
||||
|
||||
$sql=sprintf("select account_update(%d,null)",
|
||||
$this->id);
|
||||
try
|
||||
{
|
||||
$Ret=$this->cn->exec_sql($sql);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
throw new Exception(__LINE__."Erreur : ce compte [$v] n'a pas de compte parent.".
|
||||
"L'opération est annulée");
|
||||
}
|
||||
$sql = sprintf("select account_update(%d,null)", $this->id);
|
||||
try
|
||||
{
|
||||
$Ret = $this->cn->exec_sql($sql);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
throw new Exception(__LINE__ . "Erreur : ce compte [$v] n'a pas de compte parent." .
|
||||
"L'opération est annulée");
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// TVA
|
||||
if ( $id == ATTR_DEF_TVA )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ $compteur=0;
|
|||
$header=new Sort_Table();
|
||||
$url=basename($_SERVER['PHP_SELF'])."?action=".$_REQUEST['action'];
|
||||
$header->add("Login", $url," order by use_login asc", "order by use_login desc","la", "ld");
|
||||
$header->add("Nom", $url," order by use_login asc", "order by use_login desc","na", "nd");
|
||||
$header->add("Nom", $url," order by use_name asc,use_first_name asc", "order by use_name desc,use_first_name desc","na", "nd");
|
||||
$header->add('Dossier',$url,' order by ag_dossier asc','order by ag_dossier desc',
|
||||
'da','dd');
|
||||
$header->add("Actif", $url," order by use_active asc", "order by use_active desc","aa", "ad");
|
||||
|
|
|
|||
|
|
@ -86,12 +86,11 @@ else
|
|||
if (isset($_POST["DELETE"]))
|
||||
{
|
||||
$cn = new Database();
|
||||
$Res = $cn->exec_sql("delete from priv_user where priv_jnt in ( select jnt_id from jnt_use_dos where use_id=$1", array($uid));
|
||||
$Res = $cn->exec_sql("delete from priv_user where priv_jnt in ( select jnt_id from jnt_use_dos where use_id=$1)", array($uid));
|
||||
$Res = $cn->exec_sql("delete from jnt_use_dos where use_id=$1", array($uid));
|
||||
$Res = $cn->exec_sql("delete from ac_users where use_id=$1", array($uid));
|
||||
|
||||
echo "<center><H2 class=\"info\"> User " . h($_POST['fname']) . " " . h($_POST['lname']) . " (" .
|
||||
h($_POST['login']) . ") est effacé</H2></CENTER>";
|
||||
echo "<center><H2 class=\"info\"> User " . h($_POST['fname']) . " " . h($_POST['lname']) . " est effacé</H2></CENTER>";
|
||||
require_once("class_iselect.php");
|
||||
require_once("user.inc.php");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue