Vous ne pouvez pas effacer tous taux'. - ' Si votre société n\'utilise pas la TVA, changer dans le menu société
'; - + echo 'Vous ne pouvez pas effacer tous taux' . + ' Si votre société n\'utilise pas la TVA, changer dans le menu société
'; } //----------------------------------------------------- // Record Change -if ( isset ($_POST['confirm_mod']) - || isset ($_POST['confirm_add'])) +if (isset($_POST['confirm_mod']) + || isset($_POST['confirm_add'])) { extract($_POST); // remove space - $tva_poste=str_replace (" ","",$tva_poste); - $err=0; // Error code + $tva_poste = str_replace(" ", "", $tva_poste); + $err = 0; // Error code - if ( isNumber($tva_rate) == 0 ) + if (isNumber($tva_rate) == 0) { - $err=2; + $err = 2; } - if ( $err == 0 ) + if ($err == 0) { - if ( isset ($_POST['confirm_add']) ) - { - $sql="select tva_insert($1,$2,$3,$4)"; + if (isset($_POST['confirm_add'])) + { + $sql = "select tva_insert($1,$2,$3,$4)"; - $res=$cn->exec_sql( - $sql, - array($tva_label, - $tva_rate, - $tva_comment, - $tva_poste) - ); - $err=Database::fetch_result($res); - } - if ( isset ($_POST['confirm_mod']) ) - { - $Res=$cn->exec_sql( - "select tva_modify($tva_id,'$tva_label', + $res = $cn->exec_sql( + $sql, array($tva_label, + $tva_rate, + $tva_comment, + $tva_poste) + ); + $err = Database::fetch_result($res); + } + if (isset($_POST['confirm_mod'])) + { + $Res = $cn->exec_sql( + "select tva_modify($tva_id,'$tva_label', '$tva_rate','$tva_comment','$tva_poste')"); - $Res=$cn->exec_sql( - "select tva_modify($1,$2,$3,$4,$5)", - array($tva_id,$tva_label,$tva_rate,$tva_comment,$tva_poste) - ); - $err=Database::fetch_result($Res); - } - + $Res = $cn->exec_sql( + "select tva_modify($1,$2,$3,$4,$5)", array($tva_id, $tva_label, $tva_rate, $tva_comment, $tva_poste) + ); + $err = Database::fetch_result($Res); + } } - if ( $err != 0 ) + if ($err != 0) { - $err_code=array(1=>"Tva id n\'est pas un nombre", - 2=>"Taux tva invalide", - 3=>"Label ne peut être vide", - 4=>"Poste invalide", - 5=>"Tva id doit être unique"); - $str_err=$err_code[$err]; - echo ""; - ; + $err_code = array(1 => "Tva id n\'est pas un nombre", + 2 => "Taux tva invalide", + 3 => "Label ne peut être vide", + 4 => "Poste invalide", + 5 => "Tva id doit être unique"); + $str_err = $err_code[$err]; + echo ""; + ; } } // If company not use VAT -$own=new Own($cn); -if ( $own->MY_TVA_USE=='N' ) +$own = new Own($cn); +if ($own->MY_TVA_USE == 'N') { echo 'Vous n\'êtes pas assujetti à la TVA
'; exit(); } //----------------------------------------------------- // Display -$sql="select tva_id,tva_label,tva_rate,tva_comment,tva_poste from tva_rate order by tva_label"; -$Res=$cn->exec_sql($sql); +$sql = "select tva_id,tva_label,tva_rate,tva_comment,tva_poste from tva_rate order by tva_label"; +$Res = $cn->exec_sql($sql); ?>| Label | -Taux | -Commentaire | -Poste | -
|---|---|---|---|
| Label | +Taux | +Commentaire | +Poste | +
| Label | +Taux | +Commentaire | +Poste | +
|---|---|---|---|
| + | + | + | + |