Exemplo n.º 1
0
 /**
  * @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;
 }
Exemplo n.º 2
0
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
//////////////////////////////////////////////////////////////////////////////
echo $op->display();
echo HtmlInput::submit('save', _('Sauve'));
echo HtmlInput::button('close', _('Annuler'), 'onclick="removeDiv(\'mod_predf_op\')"');
echo '</form>';
Exemplo n.º 3
0
 function input_base()
 {
     $r = "";
     $r .= _('Label');
     $label = new IText('label', $this->label);
     $r .= $label->input();
     $r .= '<br>';
     /* the accounting item */
     $class_base = new IPoste('class_base', $this->class_base);
     $class_base->set_attribute('ipopup', 'ipop_account');
     $class_base->set_attribute('account', 'class_base');
     $class_base->set_attribute('label', 'acc_label');
     $fd_description = new ITextarea('fd_description', $this->fd_description);
     $fd_description->width = 80;
     $fd_description->heigh = 4;
     $fd_description->style = 'class="itextarea" style="margin-left:0px;vertical-align:text-top"';
     $r .= _('Poste Comptable de base') . ' : ';
     $r .= $class_base->input();
     $r .= '<span id="acc_label"></span><br>';
     $r .= '<br/>';
     $r .= " Description " . $fd_description->input();
     /* auto Create */
     $r .= '<br/>';
     $ck = new ICheckBox('create');
     $ck->selected = $this->create_account == 'f' ? false : true;
     $r .= _('Chaque fiche aura automatiquement son propre poste comptable : ');
     $r .= $ck->input();
     return $r;
 }
Exemplo n.º 4
0
?>
                            </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">
                                <?php 
$inote = new ITextarea('jrn_note');
$inote->style = ' class="itextarea" style="width:90%;height:100%;"';
$inote->value = strip_tags($obj->det->note);
echo $inote->input();
?>

                            </td>
                        </tr>
                    </table>
                </td>
            </tr>

        </table>
        <div class="myfieldset">
            <table class="result">
                <?php 
Exemplo n.º 5
0
 /**
  * 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';
 }
Exemplo n.º 6
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
Exemplo n.º 7
0
    ?>
</td>
        </tr>
        <tr><td  align="right"> Taux de tva </td>

    	<td> <?php 
    $w = new Itext();
    $w->size = 5;
    echo $w->input('tva_rate', $tva_array[$index]['tva_rate']);
    ?>
</td>
        </tr>
        <tr>
    	<td  align="right"> Commentaire </td>
    	<td> <?php 
    $w = new ITextarea();
    $w->heigh = 5;
    $w->width = 50;
    echo $w->input('tva_comment', $tva_array[$index]['tva_comment']);
    ?>
</td>
        </tr>
        <tr>
    	<td  align="right">Poste comptable utilisés format :debit,credit</td>

    	<td> <?php 
    $w = new IText();
    $w->size = 20;
    echo $w->input('tva_poste', $tva_array[$index]['tva_poste']);
    ?>
</td>
Exemplo n.º 8
0
    $wNom = new IText();
    $wNom->name = "database";
    $wNom->size = 30;
    echo '<td>' . $wNom->input() . '</td></tr>';
    echo '<tr><td>' . _("Type de backup") . " :" . '</td>';
    $chk = new IRadio();
    $chk->name = "t";
    $chk->value = "d";
    echo '<td> ' . $chk->input() . _("Dossier") . '</td>';
    echo '</tr><tr><td></td>';
    $chk->name = "t";
    $chk->value = "m";
    echo '<td>' . $chk->input() . _("Modele") . '</td>';
    echo '<tr>';
    $file = new IFile();
    $file->name = "file";
    $file->value = "mod";
    echo td(_('Fichier ')) . td($file->input());
    $desc = new ITextarea('desc');
    echo '</tr>';
    echo '</table>';
    echo "<p>Description </p>";
    $desc->heigh = 4;
    $desc->width = 60;
    echo $desc->input();
    echo '<p>';
    echo HtmlInput::submit("", _("Restauration"));
    echo '</p>';
    echo '</form>';
    echo '</div>';
}
Exemplo n.º 9
0
* 
*/
/**
 * @file
 * @brief  call from follow_up::display_short display a small form to
 * enter a new event
 */
global $g_user;
// Date of the event
$date = new IDate("date_event");
$date->id = "date_event_action_short";
$title = new IText('title_event');
$title->css_isze = "60%";
// Description
$summary = new ITextarea('summary');
$summary->style .= 'class="itextarea" style="padding:0px;margin:0px"';
// Type of document / event
$type = new ISelect("type_event");
$type->name = "type_event";
$type->value = $cn->make_array("select dt_id,dt_value from document_type order by dt_value", 1);
$type->selected = 0;
// Available for the profile
$profile = new ISelect('event_group');
$profile->value = $cn->make_array("select  p_id as value, " . "p_name as label " . " from profile  " . "where " . "p_id in " . " (select p_granted " . "     from user_sec_action_profile " . "     where ua_right='W' and p_id=" . $g_user->get_profile() . ") " . "order by 2");
// priority
$priority = new ISelect('event_priority');
$priority->value = array(array('value' => 1, 'label' => _('Haute')), array('value' => 2, 'label' => _('Moyenne')), array('value' => 3, 'label' => _('Basse')));
$priority->selected = 2;
// Card
$dest = new ICard('dest');