noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
company.inc.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  *   This file is part of NOALYSS.
00004  *
00005  *   NOALYSS is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   NOALYSS is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with NOALYSS; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00020 
00021 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00022 global $g_user;
00023 echo '<div class="content">';
00024 require_once("class_own.php");
00025 if (isset($_POST['record_company']))
00026 {
00027         $m = new Own($cn);
00028         extract($_POST);
00029         $m->MY_NAME = $p_name;
00030         $m->MY_TVA = $p_tva;
00031         $m->MY_STREET = $p_street;
00032         $m->MY_NUMBER = $p_no;
00033         $m->MY_CP = $p_cp;
00034         $m->MY_COMMUNE = $p_Commune;
00035         $m->MY_TEL = $p_tel;
00036         $m->MY_FAX = $p_fax;
00037         $m->MY_PAYS = $p_pays;
00038         $m->MY_CHECK_PERIODE = $p_check_periode;
00039         $m->MY_DATE_SUGGEST = $p_date_suggest;
00040         $m->MY_ANALYTIC = $p_compta;
00041         $m->MY_STRICT = $p_strict;
00042         $m->MY_TVA_USE = $p_tva_use;
00043         $m->MY_PJ_SUGGEST = $p_pj;
00044         $m->MY_ALPHANUM = $p_alphanum;
00045         $m->MY_UPDLAB = $p_updlab;
00046         $m->MY_STOCK = $p_stock;
00047 
00048         $m->Update();
00049 }
00050 
00051 $my = new Own($cn);
00052 ///// Compta analytic
00053 $array = array(
00054         array("value" => "ob", 'label' => _("obligatoire")),
00055         array("value" => "op", 'label' => _("optionnel")),
00056         array("value" => "nu", 'label' => _("non utilisé"))
00057 );
00058 $strict_array = array(
00059         array('value' => 'N', 'label' => _('Non')),
00060         array('value' => 'Y', 'label' => _('Oui'))
00061 );
00062 
00063 $alpha_num_array[0] = array('value' => 'N', 'label' => _('Non'));
00064 $alpha_num_array[1] = array('value' => 'Y', 'label' => _('Oui'));
00065 
00066 $updlab_array[0] = array('value' => 'N', 'label' => _('Non'));
00067 $updlab_array[1] = array('value' => 'Y', 'label' => _('Oui'));
00068 
00069 $compta = new ISelect();
00070 $compta->table = 1;
00071 $compta->selected = $my->MY_ANALYTIC;
00072 
00073 $strict = new ISelect();
00074 $strict->table = 1;
00075 $strict->selected = $my->MY_STRICT;
00076 
00077 $tva_use = new ISelect();
00078 $tva_use->table = 1;
00079 $tva_use->selected = $my->MY_TVA_USE;
00080 
00081 $pj_suggest = new ISelect();
00082 $pj_suggest->table = 1;
00083 $pj_suggest->selected = $my->MY_PJ_SUGGEST;
00084 
00085 $date_suggest = new ISelect();
00086 $date_suggest->table = 1;
00087 $date_suggest->selected = $my->MY_DATE_SUGGEST;
00088 
00089 $check_periode = new ISelect();
00090 $check_periode->table = 1;
00091 $check_periode->selected = $my->MY_CHECK_PERIODE;
00092 $alpha_num = new ISelect();
00093 $alpha_num->table = 1;
00094 $alpha_num->value = $alpha_num_array;
00095 $alpha_num->selected = $my->MY_ALPHANUM;
00096 
00097 $updlab = new ISelect();
00098 $updlab->table = 1;
00099 $updlab->value = $updlab_array;
00100 $updlab->selected = $my->MY_UPDLAB;
00101 
00102 $stock = new ISelect('p_stock');
00103 $stock->value = array(
00104         array('value' => 'N', 'label' => _('Non')),
00105         array('value' => 'Y', 'label' => _('Oui'))
00106 );
00107 $stock->selected = $my->MY_STOCK;
00108 $stock->table = 1;
00109 
00110 // other parameters
00111 $all = new IText();
00112 $all->table = 1;
00113 echo '<form method="post" >';
00114 echo dossier::hidden();
00115 echo "<table class=\"result\" style=\"width:auto\">";
00116 echo "<tr>" . td(_('Nom société'), 'style="text-align:right"') . $all->input("p_name", $my->MY_NAME) . "</tr>";
00117 $all->value = '';
00118 echo "<tr>" . td(_("Téléphone"), 'style="text-align:right"') . $all->input("p_tel", $my->MY_TEL) . "</tr>";
00119 $all->value = '';
00120 echo "<tr>" . td(_("Fax"), 'style="text-align:right"') . $all->input("p_fax", $my->MY_FAX) . "</tr>";
00121 $all->value = '';
00122 echo "<tr>" . td(_("Rue "), 'style="text-align:right"') . $all->input("p_street", $my->MY_STREET) . "</tr>";
00123 $all->value = '';
00124 echo "<tr>" . td(_("Numéro"), 'style="text-align:right"') . $all->input("p_no", $my->MY_NUMBER) . "</tr>";
00125 $all->value = '';
00126 echo "<tr>" . td(_("Code Postal"), 'style="text-align:right"') . $all->input("p_cp", $my->MY_CP) . "</tr>";
00127 $all->value = '';
00128 echo "<tr>" . td(_("Commune"), 'style="text-align:right"') . $all->input("p_Commune", $my->MY_COMMUNE) . "</tr>";
00129 $all->value = '';
00130 echo "<tr>" . td(_("Pays"), 'style="text-align:right"') . $all->input("p_pays", $my->MY_PAYS) . "</tr>";
00131 $all->value = '';
00132 echo "<tr>" . td(_("Numéro de Tva"), 'style="text-align:right"') . $all->input("p_tva", $my->MY_TVA) . "</tr>";
00133 echo "<tr>" . td(_("Utilisation de la compta. analytique"), 'style="text-align:right"') . $compta->input("p_compta", $array) . "</tr>";
00134 echo "<tr>" . td(_("Utilisation des stocks"), 'style="text-align:right"') . $stock->input() . "</tr>";
00135 
00136 echo "<tr>" . td(_("Utilisation du mode strict "), 'style="text-align:right"') . $strict->input("p_strict", $strict_array) . "</tr>";
00137 echo "<tr>" . td(_("Assujetti à la tva"), 'style="text-align:right"') . $tva_use->input("p_tva_use", $strict_array) . "</tr>";
00138 echo "<tr>" . td(_("Suggérer le numéro de pièce justificative"), 'style="text-align:right"') . $pj_suggest->input("p_pj", $strict_array) . "</tr>";
00139 echo "<tr>" . td(_("Suggérer la date"), 'style="text-align:right"') . $date_suggest->input("p_date_suggest", $strict_array) . "</tr>";
00140 echo '<tr>' . td(_('Afficher la période comptable pour éviter les erreurs de date'), 'style="text-align:right"') . $check_periode->input('p_check_periode', $strict_array) . '</tr>';
00141 echo '<tr>' . td(_('Utilisez des postes comptables alphanumérique'), 'style="text-align:right"') . $alpha_num->input('p_alphanum') . '</tr>';
00142 echo '<tr>' . td(_('Changer le libellé des détails'), 'style="text-align:right"') . $updlab->input('p_updlab') . '</tr>';
00143 
00144 echo "</table>";
00145 echo HtmlInput::submit("record_company", _("Sauve"));
00146 echo "</form>";
00147 echo '</div>';
00148 exit();
00149 ?>
 All Data Structures Namespaces Files Functions Variables Enumerations