function input_value()
 {
     $code_invoice = new IText('code_invoice', $this->a_menu_def['code_invoice']);
     $code_follow = new IText('code_follow', $this->a_menu_def['code_follow']);
     echo '<p>' . _('Code pour création facture depuis gestion') . $code_invoice->input() . '</p>';
     echo '<p>' . _('Code pour appel gestion') . $code_follow->input() . '</p>';
 }
 /**
  * if an array if receive the keys are
  *  p_date
  *  p_depot
  *  f_idX f_id
  *  sg_codeX
  *  sg_type0
  *
  * @global $cn database connx
  * @param $p_array
  * if an array if receive the keys are
  *  p_date
  *  p_depot
  *  f_idX f_id
  *  sg_codeX
  *  sg_type0
  * @param $p_readonly true or false
  */
 function input($p_array = null, $p_readonly = false)
 {
     global $cn;
     if ($p_array != null) {
         extract($p_array);
     } else {
         $p_date = '';
         $p_motif = '';
         $p_depot = 0;
     }
     $date = new IDate('p_date', $p_date);
     $date->setReadOnly($p_readonly);
     $motif = new IText('p_motif', $p_motif);
     $motif->setReadOnly($p_readonly);
     $motif->size = 80;
     $idepo = HtmlInput::select_stock($cn, "p_depot", "W");
     $idepo->setReadOnly($p_readonly);
     if (count($idepo->value) == 0) {
         NoAccess();
         die;
     }
     $idepo->selected = $p_depot;
     if ($p_readonly) {
         $nb = $row;
     } else {
         if (isset($row)) {
             $nb = $row > MAX_ARTICLE_STOCK ? $row : MAX_ARTICLE_STOCK;
         } else {
             $nb = MAX_ARTICLE_STOCK;
         }
     }
     for ($e = 0; $e < $nb; $e++) {
         //ATTR_DEF_STOCKfiche_
         $sg_code[$e] = new ICard('sg_code' . $e);
         $sg_code[$e]->extra = "[sql]  fd_id = 500000";
         $sg_code[$e]->set_attribute("typecard", $sg_code[$e]->extra);
         $sg_code[$e]->set_attribute("label", "label" . $e);
         $sg_code[$e]->value = isset(${'sg_code' . $e}) ? ${'sg_code' . $e} : '';
         $sg_quantity[$e] = new INum('sg_quantity' . $e);
         $sg_quantity[$e]->value = isset(${'sg_quantity' . $e}) ? ${'sg_quantity' . $e} : '';
         $label[$e] = new ISpan("label{$e}");
         if (trim($sg_code[$e]->value) != '') {
             $label[$e]->value = $cn->get_value("select vw_name from vw_fiche_attr where quick_code=\$1", array($sg_code[$e]->value));
         }
         $sg_code[$e]->setReadOnly($p_readonly);
         $sg_quantity[$e]->setReadOnly($p_readonly);
         if (isset(${'sg_type' . $e})) {
             $sg_type[$e] = ${'sg_type' . $e} == 'c' ? 'OUT' : 'IN';
         }
         if (isset(${'f_id' . $e})) {
             $fiche[$e] = new Fiche($this->cn, ${'f_id' . $e});
         }
     }
     $select_exercice = new ISelect('p_exercice');
     $select_exercice->value = $cn->make_array('select distinct p_exercice,p_exercice from parm_periode order by 1 desc');
     require_once NOALYSS_INCLUDE . '/template/stock_inv.php';
 }
Beispiel #3
0
 function __construct($name = '', $value = '')
 {
     parent::__construct($name, $value);
     $this->size = 9;
     $this->style = 'class="inum"';
     $this->javascript = 'onchange="format_number(this,2);"';
 }
 /**
  * @brief Propose to save the operation into a predefined operation
  * @return HTML  string
  */
 static function save_propose()
 {
     $r = "";
     $r .= '<p class="decale">';
     $r .= _("Donnez un nom pour sauver cette opération comme modèle") . " <br>";
     $opd_name = new IText('opd_name');
     $r .= "Nom du modèle " . $opd_name->input();
     $opd_description = new ITextarea('od_description');
     $opd_description->style = ' class="itextarea" style="width:30em;height:4em;vertical-align:top"';
     $r .= '</p>';
     $r .= '<p class="decale">';
     $r .= _('Description (max 50 car.)');
     $r .= '<br>';
     $r .= $opd_description->input();
     $r .= '</p>';
     return $r;
 }
 /**
  * @brief show the form for loading a template
  * @param p_action for the field action = destination url
  *
  *
  * @return string containing the forms
  */
 function form()
 {
     $r = '<p class="notice">';
     $r .= 'Veuillez introduire les mod&egrave;les servant à g&eacute;n&eacute;rer vos documents';
     $r .= '</p>';
     $r .= '<form enctype="multipart/form-data"  method="post">';
     $r .= dossier::hidden();
     // we need to add the sub action as hidden
     $h = new IHidden();
     $h->name = "sa";
     $h->value = "add_document";
     $r .= $h->input();
     $r .= '<table>';
     $t = new IText();
     $t->name = "md_name";
     $r .= "<tr><td> Nom </td><td>" . $t->input() . "</td>";
     $r .= "</tr>";
     $r .= "<tr><td>Catégorie de document </td>";
     $w = new ISelect();
     $w->name = "md_type";
     $w->value = $this->cn->make_array('select dt_id,dt_value from document_type order by dt_value');
     $r .= "<td>" . $w->input() . "</td></tr>";
     $r .= '<tr>';
     $r .= td(_('Affectation'));
     $waffect = new ISelect();
     $waffect->name = 'md_affect';
     $waffect->value = array(array('value' => 'ACH', 'label' => _('Uniquement journaux achat')), array('value' => 'VEN', 'label' => _('Uniquement journaux vente')), array('value' => 'GES', 'label' => _('Partie gestion')));
     $r .= td($waffect->input());
     $r .= '</tr>';
     $f = new IFile();
     $f->name = "doc";
     $r .= "<tr><td>fichier</td><td> " . $f->input() . "</td></tr>";
     $start = new IText();
     $start->name = "start_seq";
     $start->size = 9;
     $start->value = "0";
     $r .= "<tr><td> Numerotation commence a</td><td> " . $start->input() . "</td>";
     $r .= '<td class="notice">Si vous laissez &agrave; 0, la num&eacute;rotation ne changera pas, la prochaine facture sera n+1, n étant le n° que vous avez donn&eacute;</td>';
     $r .= "</tr>";
     $r .= '</table>';
     $r .= HtmlInput::submit('add_document', 'Ajout');
     $r .= "</form></p>";
     return $r;
 }
    <?php 
    }
    ?>
</ul>
<?php 
} else {
    foreach ($a_tab as $idx => $a_value) {
        $a_tab[$idx]['display'] = 'block';
    }
}
?>


<?php 
$cmd = new IText('BON_COMMANDE', $obj->info->command);
$other = new IText('OTHER', $obj->info->other);
?>
        <div id="writing_div<?php 
echo $div;
?>
" class="myfieldset" style="display:<?php 
echo $a_tab['writing_div']['display'];
?>
">
          <?php 
// display title only in popup
if ($div == 'popup') {
    ?>
 
                <h1 class="legend"><?php 
    echo $a_tab['writing_div']['label'];
?>
    <?php 
echo HtmlInput::title_box("Modèle de document", "mod_doc", 'hide');
?>
<form  method="post" enctype="multipart/form-data">
<table>

<tr>
<td><?php 
echo _("Nom du document");
?>
</td>

<td>
<?php 
$a = new IText('md_name');
$a->value = $doc->md_name;
echo $a->input();
?>
</td>
</tr>

<tr>
<td>
<?php 
echo _("Catégorie de document");
?>
</td>
<td>
<?php 
// Load all the category
 function display_form($p_string = '')
 {
     $r = parent::display_form($p_string);
     // show the second plan
     $r .= '<span style="padding:5px;margin:5px;border:2px double  blue;display:block;">';
     $plan = new Anc_Plan($this->db);
     $plan_id = new ISelect("pa_id2");
     $plan_id->value = $this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name");
     $plan_id->selected = $this->pa_id2;
     $r .= "Plan Analytique :" . $plan_id->input();
     $r .= HtmlInput::request_to_hidden(array('ac'));
     $poste = new IText();
     $poste->size = 10;
     $r .= "Entre le poste " . $poste->input("from_poste2", $this->from_poste2);
     $choose = new IButton();
     $choose->name = "Choix Poste";
     $choose->label = _("Recherche");
     $choose->javascript = "onClick=search_ca(" . dossier::id() . ",'from_poste2','pa_id2')";
     $r .= $choose->input();
     $r .= " et le poste " . $poste->input("to_poste2", $this->to_poste2);
     $choose->javascript = "onClick=search_ca(" . dossier::id() . ",'to_poste2','pa_id2')";
     $r .= $choose->input();
     $r .= '<span class="notice" style="display:block">' . _('Selectionnez le plan qui vous int&eacute;resse avant de cliquer sur Recherche') . '</span>';
     $r .= '</span>';
     $r .= HtmlInput::submit('Affiche', _('Rechercher'));
     return $r;
 }
echo td($view_card_detail);
?>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <?php 
$itext = new IText('npj');
$itext->value = strip_tags($obj->det->jr_pj_number);
echo td(_('Pièce')) . td($itext->input());
?>
                            </td>
                        <tr>
                            <td>
                                <?php 
$itext = new IText('lib');
$itext->value = strip_tags($obj->det->jr_comment);
$itext->size = 40;
echo td(_('Libellé')) . td($itext->input(), ' colspan="2" ');
?>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>Payé</td>
                            <td>
                                <?php 
$ipaid = new ICheckBox("ipaid", 'paid');
$ipaid->selected = $obj->det->jr_rapt == 'paid';
echo $ipaid->input();
?>
Beispiel #10
0
/* histo ou summary */
$histo = new ISelect('histo');
$histo->value = array(array('value' => -1, 'label' => _('Liste')), array('value' => 0, 'label' => _('Historique')), array('value' => 1, 'label' => _('Historique Lettré')), array('value' => 6, 'label' => _('Historique Lettré et montants différents')), array('value' => 2, 'label' => _('Historique non Lettré')), array('value' => 3, 'label' => _('Résumé')), array('value' => 4, 'label' => _('Balance')), array('value' => 6, 'label' => _('Balance âgée')), array('value' => 7, 'label' => _('Balance âgée en-cours')), array('value' => 5, 'label' => _('Balance non soldée')));
$histo->javascript = 'onchange="if (this.value==3 || this.value==-1) {
                   g(&quot;trstart&quot;).style.display=&quot;none&quot;;g(&quot;trend&quot;).style.display=&quot;none&quot;;g(&quot;allcard&quot;).style.display=&quot;none&quot;;}
                   else  {g(&quot;trstart&quot;).style.display=&quot;&quot;;g(&quot;trend&quot;).style.display=&quot;&quot;;g(&quot;allcard&quot;).style.display=&quot;&quot;;}"';
$histo->selected = isset($_GET['histo']) ? $_GET['histo'] : -1;
$str_histo = $histo->input();
echo '<div class="content">';
echo '<FORM method="GET">';
echo dossier::hidden();
echo HtmlInput::hidden('ac', $_GET['ac']);
require_once NOALYSS_INCLUDE . '/template/impress_cat_card.php';
echo HtmlInput::submit('cat_display', _('Recherche'));
echo '</FORM>';
$search_card = new IText('card_search');
$search_card_js = sprintf('onclick="boxsearch_card(\'%d\')"', dossier::id());
?>
<div id="box_search_card">

		<?php 
echo _('Recherche de fiche');
?>
 <?php 
echo HtmlInput::infobulle(18);
?>
 :<?php 
echo $search_card->input();
?>
		<?php 
echo HtmlInput::button_anchor(_("Chercher"), "javascript:void(0)", "", $search_card_js, 'smallbutton');
 function Input()
 {
     $r = "";
     $h = new IHidden();
     $r .= '<li>Id          :' . $h->input('frd_id', $this->frd_id) . $this->frd_id . "</li>";
     $w = new IText();
     $r .= '<li>' . _('Commentaire ') . ' :' . $w->input('frd_text', $this->frd_text) . "</li>";
     $t = new IText();
     $r .= '<li>' . _('Poste de base') . ':' . $t->input('frd_class_base', $this->frd_class_base) . "</li>";
     return $r;
 }
 /**
  * display screen to enter a new ledger
  */
 function input_new()
 {
     $retry = HtmlInput::default_value_post("sa", "");
     //            if ( $retry == "add") {
     $default_type = HtmlInput::default_value_post("p_jrn_type", -1);
     $previous_jrn_def_pj_pref = HtmlInput::default_value_post("jrn_def_pj_pref", "");
     $previous_p_description = HtmlInput::default_value_post("p_description", "");
     $previous_p_jrn_name = HtmlInput::default_value_post('p_jrn_name', '');
     $previous_p_jrn_type = HtmlInput::default_value_post("p_jrn_type", "");
     //            }
     global $g_user;
     $f_add_button = new ISmallButton('add_card');
     $f_add_button->label = _('Créer une nouvelle fiche');
     $f_add_button->tabindex = -1;
     $f_add_button->set_attribute('jrn', -1);
     $f_add_button->javascript = " this.jrn=-1;select_card_type({type_cat:4});";
     $str_add_button = "";
     if ($g_user->check_action(FICADD) == 1) {
         $str_add_button = $f_add_button->input();
     }
     $wSearch = new IPoste();
     $wSearch->table = 3;
     $wSearch->set_attribute('ipopup', 'ipop_account');
     $wSearch->set_attribute('account', 'p_jrn_class_deb');
     $wSearch->set_attribute('no_overwrite', '1');
     $wSearch->set_attribute('noquery', '1');
     $wSearch->name = "p_jrn_class_deb";
     $wSearch->size = 20;
     $search = $wSearch->input();
     // default for ACH
     $default_deb_purchase = $this->get_default_card('ACH', 'D');
     $default_cred_purchase = $this->get_default_card('ACH', 'C');
     // default for VEN
     $default_deb_sale = $this->get_default_card('VEN', 'D');
     $default_cred_sale = $this->get_default_card('VEN', 'C');
     // default for FIN
     $default_fin = $this->get_default_card("FIN", "");
     //default ods
     $default_ods = $this->get_default_card("ODS", "");
     /* construct all the hidden */
     $hidden = HtmlInput::hidden('p_jrn', -1);
     $hidden .= HtmlInput::hidden('p_action', 'jrn');
     $hidden .= HtmlInput::hidden('sa', 'add');
     $hidden .= dossier::hidden();
     $hidden .= HtmlInput::hidden('p_jrn_deb_max_line', 10);
     $hidden .= HtmlInput::hidden('p_ech_lib', 'echeance');
     /* properties of the ledger */
     $name = $previous_p_jrn_name;
     $code = "";
     $wType = new ISelect();
     $a_jrn = $this->db->make_array("select '-1',' -- " . _("choix du type de journal") . " -- ' union select jrn_type_id,jrn_desc from jrn_type");
     $wType->selected = '-1';
     $wType->value = $a_jrn;
     $wType->name = "p_jrn_type";
     $wType->id = "p_jrn_type_select_id";
     $wType->javascript = ' onchange="show_ledger_div()"';
     $wType->selected = $default_type;
     $type = $wType->input();
     $rcred = $rdeb = array();
     $wPjPref = new IText();
     $wPjPref->name = 'jrn_def_pj_pref';
     $wPjPref->value = $previous_jrn_def_pj_pref;
     $pj_pref = $wPjPref->input();
     $pj_seq = '';
     $last_seq = 0;
     $new = 1;
     $description = new ITextarea('p_description');
     $description->style = 'class="itextarea" style="margin:0px;"';
     $description->value = $previous_p_description;
     $str_description = $description->input();
     /* bank card */
     $qcode_bank = '';
     /* Numbering (only FIN) */
     $num_op = new ICheckBox('numb_operation');
     echo dossier::hidden();
     echo HtmlInput::hidden('ac', $_REQUEST['ac']);
     echo $hidden;
     $cn = $this->db;
     $min_row = new INum("min_row", MAX_ARTICLE);
     $min_row->prec = 0;
     require_once NOALYSS_INCLUDE . '/template/param_jrn.php';
 }
 /**
  *@brief return an html with a form to add a new middle of payment
  */
 public function blank()
 {
     //label
     $lib = new IText('mp_lib');
     $f_lib = $lib->input();
     $ledger_source = new ISelect('jrn_def_id');
     $ledger_source->value = $this->cn->make_array("select jrn_def_id,jrn_Def_name from\n                              jrn_def where jrn_def_type  in ('ACH','VEN') order by jrn_def_name");
     $f_source = $ledger_source->input();
     // type of card
     $tcard = new ISelect('mp_fd_id');
     $tcard->value = $this->cn->make_array('select fd_id,fd_label from fiche_def join fiche_def_ref ' . ' using (frd_id) where frd_id in (25,4) order by fd_label');
     $f_type_fiche = $tcard->input();
     $ledger_record = new ISelect('mp_jrn_def_id');
     $ledger_record->value = $this->cn->make_array("select jrn_def_id,jrn_Def_name from\n                              jrn_def where jrn_def_type  in ('ODS','FIN')");
     $f_ledger_record = $ledger_record->input();
     // the card
     $qcode = new ICard();
     $qcode->noadd = true;
     $qcode->name = 'mp_qcode';
     $list = $this->cn->make_list('select fd_id from fiche_def where frd_id in (25,4)');
     $qcode->typecard = $list;
     $qcode->dblclick = 'fill_ipopcard(this);';
     $f_qcode = $qcode->input();
     $msg = "Ajout d'un nouveau moyen de paiement";
     ob_start();
     require_once NOALYSS_INCLUDE . '/template/new_mod_payment.php';
     $r = ob_get_contents();
     ob_end_clean();
     return $r;
 }
Beispiel #14
0
$check_periode->table = 1;
$check_periode->selected = $my->MY_CHECK_PERIODE;
$alpha_num = new ISelect();
$alpha_num->table = 1;
$alpha_num->value = $alpha_num_array;
$alpha_num->selected = $my->MY_ALPHANUM;
$updlab = new ISelect();
$updlab->table = 1;
$updlab->value = $updlab_array;
$updlab->selected = $my->MY_UPDLAB;
$stock = new ISelect('p_stock');
$stock->value = array(array('value' => 'N', 'label' => _('Non')), array('value' => 'Y', 'label' => _('Oui')));
$stock->selected = $my->MY_STOCK;
$stock->table = 1;
// other parameters
$all = new IText();
$all->table = 1;
echo '<form method="post" >';
echo dossier::hidden();
echo "<table class=\"result\" style=\"width:auto\">";
echo "<tr>" . td(_('Nom société'), 'style="text-align:right"') . $all->input("p_name", $my->MY_NAME) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Téléphone"), 'style="text-align:right"') . $all->input("p_tel", $my->MY_TEL) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Fax"), 'style="text-align:right"') . $all->input("p_fax", $my->MY_FAX) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Rue "), 'style="text-align:right"') . $all->input("p_street", $my->MY_STREET) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Numéro"), 'style="text-align:right"') . $all->input("p_no", $my->MY_NUMBER) . "</tr>";
$all->value = '';
echo "<tr>" . td(_("Code Postal"), 'style="text-align:right"') . $all->input("p_cp", $my->MY_CP) . "</tr>";
Beispiel #15
0
<?php

//This file is part of NOALYSS and is under GPL
//see licence.txt
echo Dossier::hidden();
echo HtmlInput::hidden('t_id', $data->t_id);
echo HtmlInput::hidden('ac', $_REQUEST['ac']);
$uos = new Tool_Uos('tag');
echo $uos->hidden();
$t_tag = new IText('t_tag', $data->t_tag);
$t_description = new ITextarea('t_description', $data->t_description);
$t_description->style = ' class="itextarea" style="height:5em;vertical-align: top;"';
?>
<p>
   <?php 
echo _("Etiquette (tag)");
?>
 : <?php 
echo $t_tag->input();
?>
</p>
<p>
<?php 
echo _("Description");
?>
 : <?php 
echo $t_description->input();
?>
</p>
<?php 
// If exist you can remove it
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_document_type.php';
if (isset($_POST['add'])) {
    $catDoc = new Document_Type($cn);
    $catDoc->insert($_POST['cat'], $_POST['prefix']);
}
if (isset($_POST['save'])) {
    $catDoc = new Document_Type($cn, $_POST['dt_id']);
    $catDoc->get();
    $catDoc->dt_value = trim($_POST['dt_name']);
    $catDoc->dt_prefix = trim($_POST['dt_prefix']);
    if ($catDoc->dt_value == "") {
        alert(_("Le nom ne peut pas être vide"));
    } else {
        $catDoc->update();
    }
    if ($_POST['seq'] != 0 && isNumber($_POST['seq']) == 1) {
        $catDoc->set_number($_POST['seq']);
    }
}
$aList = Document_Type::get_list($cn);
$addCat = new IText('cat');
$addPrefix = new IText('prefix');
$str_addCat = $addCat->input();
$str_addPrefix = $addPrefix->input();
$str_submit = HtmlInput::submit('add', _('Ajout'));
echo '<div class="content">';
require_once NOALYSS_INCLUDE . '/template/list_category_document.php';
echo '</div>';
Beispiel #17
0
 function DisplayAttribut($str = "")
 {
     if ($this->id == 0) {
         return;
     }
     $this->cn->exec_sql('select fiche_attribut_synchro($1)', array($this->id));
     $MaxLine = sizeof($this->attribut);
     $r = "<TABLE>";
     $r .= "<tr>" . th('Nom attribut') . th('') . th('Ordre', 'style="text-align:right"') . '</tr>';
     // Display each attribute
     $add_action = "";
     for ($i = 0; $i < $MaxLine; $i++) {
         $class = "even";
         if ($i % 2 == 0) {
             $class = "odd";
         }
         $r .= '<TR class="' . $class . '"><td>';
         // Can change the name
         if ($this->attribut[$i]->ad_id == ATTR_DEF_NAME) {
             continue;
         } else {
             if ($str == "remove") {
                 //Only for the not mandatory attribute (not defined in attr_min)
                 if ($this->cn->count_sql("select * from attr_min where frd_id=" . $this->fiche_def . " and ad_id = " . $this->attribut[$i]->ad_id) == 0 && $this->attribut[$i]->ad_id != ATTR_DEF_QUICKCODE && $this->attribut[$i]->ad_id != ATTR_DEF_ACCOUNT) {
                     $add_action = sprintf('</TD><TD> Supprimer <input type="checkbox" name="chk_remove[]" value="%d">', $this->attribut[$i]->ad_id);
                 } else {
                     $add_action = "</td><td>";
                 }
             }
             // The attribut.
             $a = sprintf('%s ', $this->attribut[$i]->ad_text);
             $r .= $a . $add_action;
             /*----------------------------------------  */
             /*  ORDER OF THE CARD */
             /*----------------------------------------  */
             $order = new IText();
             $order->name = 'jnt_order' . $this->attribut[$i]->ad_id;
             $order->size = 3;
             $order->value = $this->attribut[$i]->jnt_order;
             $r .= '</td><td> ' . $order->input();
         }
         $r .= '</td></tr>';
     }
     // Show the possible attribute which are not already attribute of the model
     // of card
     $Res = $this->cn->exec_sql("select ad_id,ad_text from attr_def\n                                 where\n                                 ad_id not in (select ad_id from fiche_def natural join jnt_fic_attr\n                                 where fd_id=\$1) order by ad_text", array($this->id));
     $M = Database::num_row($Res);
     // Show the unused attribute
     $r .= '<TR> <TD>';
     $r .= '<SELECT NAME="ad_id">';
     for ($i = 0; $i < $M; $i++) {
         $l = Database::fetch_array($Res, $i);
         $a = sprintf('<OPTION VALUE="%s"> %s', $l['ad_id'], $l['ad_text']);
         $r .= $a;
     }
     $r .= '</SELECT>';
     $r .= "</TABLE>";
     return $r;
 }
$itext->size = 40;
echo td(_('Libellé')) . td($itext->input());
?>
                    </td>
                </tr>
                 <tr>
                     <td>
                        <?php 
echo td(_('Montant')) . td(nbm($obj->det->jr_montant), ' class="inum"');
?>
                     </td>
                 </tr>
                  <tr>
                      <td>
                        <?php 
$itext = new IText('npj');
$itext->value = strip_tags($obj->det->jr_pj_number);
echo td(_('Pièce')) . td($itext->input());
?>
                    </td>
                  </tr>
            </table>
        </td>
                <td style="width:50%;height:100%;vertical-align:top;text-align: center">
                    <table style="width:99%;height:8rem;vertical-align:top;">
                        <tr style="height: 5%">
                            <td style="text-align:center;vertical-align: top">
                                Note
                            </td></tr>
                        <tr>
                            <td style="text-align:center;vertical-align: top">
Beispiel #19
0
			<tr>
				<td>
					Pays
				</td>
				<td>
					<?php 
$name = new IText("r_country", "");
echo $name->input();
?>
				</td>
			</tr>
			<tr>
				<td>
					Téléphone
				</td>
				<td>
					<?php 
$name = new IText("r_phone", "");
echo $name->input();
?>
				</td>
			</tr>

		</table>
		<?php 
echo HtmlInput::submit("add_stock", "Sauver");
?>
	</form>
	</div>
</div>
  <td>
	  <?php 
$name = new IText('dt_name', $doc_type->dt_value);
echo $name->input();
?>
  </td>
</tr>

<tr>
  <td><?php 
echo _('Préfixe');
?>
  </td>
  <td>
	  <?php 
$prefix = new IText('dt_prefix', $doc_type->dt_prefix);
echo $prefix->input();
?>
  </td>
</tr>

<tr>
  <td><?php 
echo _('numéro actuel');
?>
  </td>
  <td>
	<?php 
$ret = $cn->get_array("select last_value,is_called from seq_doc_type_" . $doc_type->dt_id);
$last = $ret[0]['last_value'];
/*!
Beispiel #21
0
        </tr>
    <?php 
}
?>
    </table>
</div>

<div id="add_todo_list" class="box" style="display:none">
	<script charset="utf-8" type="text/javascript" language="javascript">
		new Draggable($('add_todo_list'),{});
	</script>
<form method="post">
<?php 
$wDate = new IDate('p_date_todo');
$wDate->id = 'p_date_todo';
$wTitle = new IText('p_title');
$wDesc = new ITextArea('p_desc');
$wDesc->heigh = 5;
$wDesc->width = 40;
echo HtmlInput::title_box("Note", "add_todo_list", "hide");
echo _("Date") . " " . $wDate->input() . '<br>';
echo _("Titre") . " " . $wTitle->input() . '<br>';
echo _("Description") . "<br>" . $wDesc->input() . '<br>';
echo dossier::hidden();
echo HtmlInput::hidden('tl_id', 0);
echo HtmlInput::submit('save_todo_list', _('Sauve'), 'onClick="Effect.Fold(\'add_todo_list\');return true;"');
echo HtmlInput::button('hide', _('Annuler'), 'onClick="Effect.Fold(\'add_todo_list\');return true;"');
?>
</form>
</div>
Beispiel #22
0
 public function input($p_name = null, $p_value = null)
 {
     $this->name = $p_name == null ? $this->name : $p_name;
     $this->value = $p_value == null ? $this->value : $p_value;
     if ($this->readOnly == true) {
         return $this->display();
     }
     //--
     if (!isset($this->ctrl)) {
         $this->ctrl = 'none';
     }
     if (!isset($this->javascript)) {
         $this->javascript = "";
     }
     $this->id = $this->id == "" ? $this->name : $this->id;
     /* create the text  */
     $itext = new IText($this->name, $this->value, $this->id);
     if (isset($this->css_size)) {
         $itext->css_size = $this->css_size;
     } else {
         $itext->size = $this->size;
     }
     $itext->javascript = $this->javascript;
     /* create the button */
     $ibutton = $this->dsp_button();
     if ($this->table == 3) {
         $r = '<table>' . tr(td($itext->input()) . td($ibutton));
         $r .= '</table>';
         return $r;
     }
     $r = $itext->input() . $ibutton;
     if ($this->table == 1) {
         $r = td($r);
     }
     return $r;
     //--
 }
Beispiel #23
0
        $cn->commit();
    } catch (Exception $e) {
        alert($e->getMessage());
        $cn->rollback();
    }
}
/* show list of existing */
$gDossier = dossier::id();
$array = $fa->seek();
$select_type = new ISelect('type[]');
$select_type->table = 0;
$desc = new IText('desc[]');
$desc->size = 50;
$size = new INum('size[]');
$size->size = 5;
$extra = new IText('extra[]');
$select_type->value = array(array('value' => 'text', 'label' => _('Texte')), array('value' => 'numeric', 'label' => _('Nombre')), array('value' => 'date', 'label' => _('Date')), array('value' => 'zone', 'label' => _('Zone de texte')), array('value' => 'poste', 'label' => _('Poste Comptable')), array('value' => 'card', 'label' => _('Fiche')), array('value' => 'select', 'label' => _('Selection')));
echo '<div class="content">';
echo '<form method="post">';
echo HtmlInput::hidden('sa', 'fat');
echo HtmlInput::hidden('p_action', 'divers');
echo '<table id="tb_rmfa">';
echo '<tr>';
echo th(_("id"));
echo th(_("Description"));
echo th(_("Type"));
echo th(_("Taille"));
echo th(_("Paramètre"));
echo '</tr>';
for ($e = 0; $e < count($array); $e++) {
    $row = $array[$e];
Beispiel #24
0
    echo '<div id="calc">';
    echo IButton::show_calc();
    echo '</div>';
}
if ($cn->get_value("select count(*) from profile join profile_user using (p_id)\n\t\twhere user_name=\$1 and with_direct_form=true", array($_SESSION['g_user'])) == 1) {
    ?>
	<div id="direct">
	<form method="get">
		<?php 
    echo HtmlInput::default_value('ac', '', $_REQUEST);
    ?>
		<?php 
    echo Dossier::hidden();
    ?>
		<?php 
    $direct = new IText('ac');
    $direct->style = 'class="input_text"';
    $direct->value = '';
    $direct->size = 20;
    echo $direct->input();
    $gDossier = dossier::id();
    ?>
		<div id="ac_choices" class="autocomplete" style="width:150"></div>
		<?php 
    echo HtmlInput::submit('go', _('Aller'));
    ?>

	</form>
	<script>

		try {
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/**\file
 * \brief display a form to change the name of a predefined operation
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
ob_start();
require_once NOALYSS_INCLUDE . '/class_pre_operation.php';
$op = new Pre_Operation($cn, $_GET['id']);
$array = $op->load();
echo HtmlInput::anchor_close('mod_predf_op');
echo h2(_('Modification du nom'), ' class="title"');
echo '
    <form method="POST" onsubmit="save_predf_op(this);return false;">';
$name = new IText('opd_name');
$name->value = $op->od_name;
$name->size = 60;
echo "Nom =" . $name->input();
$opd_description = new ITextarea('od_description');
$opd_description->style = ' class="itextarea" style="width:30em;height:4em;vertical-align:top"';
$opd_description->value = $op->od_description;
echo '<p>';
echo _("Description (max 50 car.)");
echo $opd_description->input();
echo '</p>';
echo dossier::hidden() . HtmlInput::hidden('od_id', $_GET['id']);
echo "<hr>";
//////////////////////////////////////////////////////////////////////////////
// Detail operation
//////////////////////////////////////////////////////////////////////////////
Beispiel #26
0
} else {
    if ($sbaction == "delete") {
        //
        // Delete the user
        //
        $cn = new Database();
        $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\"> Utilisateur " . h($_POST['fname']) . " " . h($_POST['lname']) . " est effacé</H2></CENTER>";
        require_once NOALYSS_INCLUDE . '/class_iselect.php';
        require_once NOALYSS_INCLUDE . '/user.inc.php';
        return;
    }
}
$UserChange->load();
$it_pass = new IText('password');
$it_pass->value = "";
?>
<FORM  id="user_detail_frm" METHOD="POST">

<?php 
echo HtmlInput::hidden('UID', $uid);
?>
    <TABLE BORDER=0>
        <TR>

<?php 
printf('<td>login</td><td> %s</td>', $UserChange->login);
?>
            </TD>
        </tr>
 function form($p_line = 0)
 {
     $r = "";
     if ($p_line == 0) {
         $p_line = count($this->aAcc_Report_row);
     }
     $r .= dossier::hidden();
     $r .= HtmlInput::hidden('line', $p_line);
     $r .= HtmlInput::hidden('fr_id', $this->id);
     $wForm = new IText();
     $r .= "Nom du rapport : ";
     $r .= $wForm->input('form_nom', $this->name);
     $r .= '<TABLE id="rap1" width="100%">';
     $r .= "<TR>";
     $r .= "<TH> Position </TH>";
     $r .= "<TH> Texte </TH>";
     $r .= "<TH> Formule</TH>";
     $r .= '</TR>';
     $wName = new IText();
     $wName->size = 40;
     $wPos = new IText();
     $wPos->size = 3;
     $wForm = new IText();
     $wForm->size = 35;
     for ($i = 0; $i < $p_line; $i++) {
         $r .= "<TR>";
         $r .= "<TD>";
         $wPos->value = isset($this->aAcc_Report_row[$i]->fo_pos) ? $this->aAcc_Report_row[$i]->fo_pos : $i + 1;
         $r .= $wPos->input("pos" . $i);
         $r .= '</TD>';
         $r .= "<TD>";
         $wName->value = isset($this->aAcc_Report_row[$i]->fo_label) ? $this->aAcc_Report_row[$i]->fo_label : "";
         $r .= $wName->input("text" . $i);
         $r .= '</TD>';
         $r .= '<td>';
         $search = new IPoste("form" . $i);
         $search->size = 50;
         $search->value = isset($this->aAcc_Report_row[$i]->fo_formula) ? $this->aAcc_Report_row[$i]->fo_formula : "";
         $search->label = _("Recherche poste");
         $search->set_attribute('gDossier', dossier::id());
         $search->set_attribute('bracket', 1);
         $search->set_attribute('no_overwrite', 1);
         $search->set_attribute('noquery', 1);
         $search->set_attribute('account', $search->name);
         $search->set_attribute('ipopup', 'ipop_card');
         $r .= $search->input();
         $r .= '</td>';
         $r .= "</TR>";
     }
     $r .= "</TABLE>";
     $wButton = new IButton();
     $wButton->javascript = " rapport_add_row('" . dossier::id() . "')";
     $wButton->label = "Ajout d'une ligne";
     $r .= $wButton->input();
     return $r;
 }
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
// Copyright 2014 Author Dany De Bontridder danydb@aevalys.eu
// require_once '.php';
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
ob_start();
$ag_id = HtmlInput::default_value_get("ag_id", "0");
if ($ag_id == 0) {
    throw new Exception('ag_id is null');
}
require_once 'class_acc_ledger.php';
$r = HtmlInput::title_box(_("Détail fiche"), 'search_card');
$r .= '<form id="search_card1_frm" method="GET" onsubmit="action_add_concerned_card(this);return false;">';
$q = new IText('query');
$q->value = isset($query) ? $query : '';
$r .= '<span style="margin-left:50px">';
$r .= _('Fiche contenant') . HtmlInput::infobulle(19);
$r .= $q->input();
$r .= HtmlInput::submit('fs', _('Recherche'), "", "smallbutton");
$r .= '</span>';
$r .= dossier::hidden() . HtmlInput::hidden('op', 'add_concerned_card');
$r .= HtmlInput::request_to_hidden(array('ag_id'));
$r .= '</form>';
$query = HtmlInput::default_value_get("query", "");
$sql_array['query'] = $query;
$sql_array['typecard'] = 'all';
$fiche = new Fiche($cn);
/* Build the SQL and show result */
$sql = $fiche->build_sql($sql_array);
 function form()
 {
     $comment = new IText();
     $comment->name = 'p_comment';
     $comment->value = $this->p_comment;
     $comment->size = 45;
     $value = new IPoste();
     $value->name = 'p_value';
     $value->value = $this->p_value;
     $value->size = 7;
     $value->set_attribute('ipopup', 'ipop_account');
     $value->set_attribute('account', 'p_value');
     $poste = new IText();
     $poste->setReadOnly(true);
     $poste->size = strlen($this->p_code) + 1;
     $poste->name = 'p_code';
     $poste->value = $this->p_code;
     $r = "";
     $r .= '<tr>';
     $r .= '<td align="right"> Code </td>';
     $r .= '<TD>' . $poste->input() . '</TD>';
     $r .= '</tr>';
     $r .= '<tr>';
     $r .= '<td align="right"> Commentaire </td>';
     $r .= '<TD>' . $comment->input() . '</TD>';
     $r .= '</tr>';
     $r .= '<tr>';
     $r .= '<td align="right"> Poste comptable </td>';
     $r .= '<TD>' . $value->input();
     $r .= '<span id="p_value_label"></span></td>';
     $r .= '</tr>';
     $r .= Dossier::hidden();
     return $r;
 }
    exit('Pas de journal disponible');
}
echo '<div id="jrn_name_div">';
echo '<h2 id="jrn_name" style="display:inline">' . $Ledger->get_name() . '</h2>';
echo '</div>';
$wLedger->javascript = "onchange='this.form.submit()';";
echo $wLedger->input();
echo HtmlInput::submit('ref', 'Rafraîchir');
echo '</form>';
echo '<span id="bkname" style="display:block">' . hb(h($Ledger->get_bank_name())) . '</span>';
echo '<form method="post" id="rec1">';
echo dossier::hidden();
echo HtmlInput::get_to_hidden(array('sa', 'p_action', 'p_jrn'));
$operation = $cn->get_array("select jr_id,jr_internal,\n\t\t\t\t\t\t\t\tjr_comment,\n\t\t\t\t\t\t\t\tto_char(jr_date,'DD.MM.YYYY') as fmt_date,\n\t\t\t\t\t\t\t\tjr_montant,\n\t\t\t\t\t\t\t\tto_char(jr_date,'YYYYMMDD') as raw_date\n                              from jrn where jr_def_id=\$1 and (jr_pj_number is null or jr_pj_number='') order by jr_date", array($Ledger->id));
echo '<p>';
$iextrait = new IText('ext');
if (isset($_POST['ext'])) {
    $iextrait->value = $_POST['ext'];
} else {
    $iextrait->value = $Ledger->guess_pj();
}
$nstart_extrait = new INum('start_extrait');
if (isset($_POST['start_extrait'])) {
    $nstart_extrait->value = $_POST['start_extrait'];
}
$nend_extrait = new INum('end_extrait');
if (isset($_POST['end_extrait'])) {
    $nend_extrait->value = $_POST['end_extrait'];
}
echo "Extrait / relevé :" . $iextrait->input();
echo 'solde Début' . $nstart_extrait->input();