Ejemplo n.º 1
0
 function fill_from_action(&$p_array, $p_style)
 {
     global $g_user;
     $profile = $g_user->get_profile();
     $cn = new Database(dossier::id());
     $sql = "select ag_id,to_char(ag_remind_date,'DD')::integer as ag_timestamp_day,ag_title,ag_hour,\n             coalesce(name,'interne') as str_name\n\t\t\t" . " from action_gestion " . "  left join vw_fiche_name  on (f_id=f_id_dest) " . " where " . " to_char(ag_remind_date,'MM')::integer=\$1 " . " and to_char(ag_remind_date,'YYYY')::integer=\$2 " . "  and ag_dest in (select p_granted from user_sec_action_profile where p_id =\$3)\n\t\t\t\t and ag_state IN (2, 3)\n\t\t\t\t";
     $array = $cn->get_array($sql, array($this->month, $this->year, $profile));
     for ($i = 0; $i < count($array); $i++) {
         $ind = $array[$i]['ag_timestamp_day'];
         $this->action[$ind][] = $array[$i]['ag_id'];
         $this->title[$ind][] = $array[$i]['ag_title'];
         $this->hour[$ind][] = $array[$i]['ag_hour'];
         $this->str_name[$ind][] = $array[$i]['str_name'];
     }
     /*
      * Fill foreach day
      */
     if ($p_style == "short") {
         foreach ($this->action as $day => $aAction) {
             if ($p_array[$day] == "") {
                 $p_array[$day] = '<span class="input_text" onclick="display_task(\'tsk' . $day . '\');">' . " " . count($aAction) . " " . _("Tâches") . '</span>';
             }
             $this->action_div[$day] = '<div id="tsk' . $day . '" class="inner_box" style="width:200;display:none">';
             $this->action_div[$day] .= HtmlInput::title_box($day . "/" . $this->month . "/" . $this->year, "tsk" . $day, "hide");
             $this->action_div[$day] .= "<ol>";
             for ($i = 0; $i < count($aAction); $i++) {
                 $this->action_div[$day] .= '<li>' . HtmlInput::detail_action($aAction[$i], $this->title[$day][$i]) . '</li>';
             }
             $this->action_div[$day] .= '</ol></div>';
         }
     } else {
         if ($p_style == "long") {
             foreach ($this->action as $day => $aAction) {
                 $p_array[$day] .= "<ol>";
                 for ($i = 0; $i < count($aAction); $i++) {
                     $p_array[$day] .= '<li>' . hb($this->str_name[$day][$i]) . '&rarr;' . HtmlInput::detail_action($aAction[$i], $this->hour[$day][$i] . " " . $this->title[$day][$i]) . '</li>';
                 }
                 $p_array[$day] .= '</ol>';
             }
         }
     }
 }
Ejemplo n.º 2
0
            $m_desc = "";
        }
    }
    ?>
        <h4 class="info" >   <?php 
    echo $m_desc;
    ?>
</h4>

	<?php 
    if ($p_view != 'READ') {
        $rmComment = sprintf("return confirm_box(null,'" . _('Voulez-vous effacer ce commentaire') . " ?',function() {remove_comment('%s','%s');});", dossier::id(), $acomment[$c]['agc_id']);
        $js = '<a class="tinybutton" id="accom' . $acomment[$c]['agc_id'] . '" href="javascript:void(0)" onclick="' . $rmComment . '">' . SMALLX . '</a>';
        echo hb('n°' . $acomment[$c]['agc_id'] . '(' . $acomment[$c]['tech_user'] . " " . $acomment[$c]['str_agc_date'] . ')') . $js . '<pre style="white-space: -moz-pre-wrap;white-space: pre-wrap;border:1px solid blue;width:80%;" id="com' . $acomment[$c]['agc_id'] . '"> ' . " " . h($acomment[$c]['agc_comment']) . '</pre>';
    } else {
        echo hb('n°' . $acomment[$c]['agc_id'] . '(' . $acomment[$c]['tech_user'] . " " . $acomment[$c]['str_agc_date'] . ')') . '<pre style="white-space: -moz-pre-wrap;white-space: pre-wrap;border:1px solid blue;width:80%;" id="com' . $acomment[$c]['agc_id'] . '"> ' . " " . h($acomment[$c]['agc_comment']) . '</pre>';
    }
}
echo '<span class="noprint">';
echo $desc->input();
echo '</span>';
if ($p_view != "READ") {
    ?>
<p class="noprint">
<input type="button" id="bt_enlarge" <?php 
    echo $style_enl;
    ?>
 value="+" onclick="enlarge('ag_comment');return false;">
<input type="button" id="bt_small"  <?php 
    echo $style_small;
    ?>
Ejemplo n.º 3
0
// Stage 2 : Save a NEW action + Files and generate eventually a document
//--------------------------------------------------------------------------------
if ($sub_action == "save_action_st2") {
    $act = new Follow_Up($cn);
    $act->fromArray($_POST);
    try {
        $act->d_id = 0;
        $act->md_id = isset($_POST['gen_doc']) ? $_POST['gen_doc'] : 0;
        $act->verify();
        // insert into action_gestion
        echo $act->save();
        $url = "?{$base}&sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get();
        echo '<p><a class="mtitle" href="' . $url . '">' . hb(_('Evènement Sauvée') . '  : ' . $act->ag_ref) . '</a></p>';
        Follow_Up::show_action_list($cn, $base);
        $url = "?{$base}&sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get();
        echo '<p><a class="mtitle" href="' . $url . '">' . hb(_('Evènement Sauvée') . '  : ' . $act->ag_ref) . '</a></p>';
    } catch (Exception $e) {
        echo '<span class="notice">';
        echo _("Erreur") . " " . $e->getMessage();
        echo '</span>';
        $sub_action = "add_action";
        $error_id = $e->getCode();
    }
}
//--------------------------------------------------------------------------------
// Add an action
if ($sub_action == "add_action") {
    $act = new Follow_Up($cn);
    $act->fromArray($_POST);
    $act->ag_id = 0;
    $act->d_id = 0;
Ejemplo n.º 4
0
            echo '<table  style="width:100%;margin-left:0%">';
            foreach ($a_poste as $poste_id) {
                $Poste = new Acc_Account_Ledger($cn, $poste_id['pcm_val']);
                $Poste->load();
                $Poste->get_row_date($_GET['from_periode'], $_GET['to_periode'], $_GET['ople']);
                if (empty($Poste->row)) {
                    continue;
                }
                echo '<tr><td  class="mtitle" style="width:auto" colspan="6"><h2 class="title">' . $poste_id['pcm_val'] . ' ' . h($Poste->label) . '</h2></td></tr>';
                $detail = $Poste->row[0];
                $old = array();
                foreach ($Poste->row as $detail) {
                    /* avoid duplicates */
                    if (in_array($detail['jr_id'], $old) == TRUE) {
                        continue;
                    }
                    $old[] = $detail['jr_id'];
                    echo tr(td("Journal :" . $detail['jrn_def_name'], ''), 'style="width:auto" colspan="6"');
                    echo '<tr><td class="mtitle" style="width:auto" colspan="6">' . $detail['j_date'] . ' ' . $detail['jr_internal'] . ' ' . hb($detail['description']) . ' ' . hi($detail['jr_pj_number']) . '</td></tr>';
                    $op = new Acc_Operation($cn);
                    $op->poste = $poste_id['pcm_val'];
                    $op->jr_id = $detail['jr_id'];
                    echo $op->display_jrnx_detail(1);
                }
            }
            echo '</table>';
            echo Acc_Account_Ledger::HtmlTableHeader();
        }
        exit;
    }
}
Ejemplo n.º 5
0
//-------------------------
echo '<div class="content">';
echo '<form method="get">';
echo HtmlInput::get_to_hidden(array('gDossier', 'ledger_type', 'ac', 'sa'));
$wLedger = $Ledger->select_ledger('FIN', 3);
if ($wLedger == null) {
    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'];
}
Ejemplo n.º 6
0
<?php 
if ($UserChange->admin == 0) {
    ?>
        <!-- Show all database and rights -->
        <H2 class="info"> Accès aux dossiers</H2>
        <p class="notice">
            Les autres droits doivent être réglés dans les dossiers (paramètre->sécurité), le fait de changer un utilisateur d'administrateur à utilisateur
			normal ne change pas le profil administrateur dans les dossiers.
			Il faut aller dans CFGSECURITY pour diminuer ses privilèges.
        </p>
     
<?php 
    $array = array(array('value' => 'X', 'label' => 'Aucun Accès'), array('value' => 'R', 'label' => 'Utilisateur normal'));
    $repo = new Dossier(0);
    if ($repo->count() == 0) {
        echo hb('* Aucun Dossier *');
        echo '</div>';
        return;
    }
    $Dossier = $repo->show_dossier('R', $UserChange->login);
    $mod_user = new User(new Database(), $uid);
    ?>
           <TABLE id="database_list" class="result">
<?php 
    //
    // Display all the granted folders
    //
    $i = 0;
    foreach ($Dossier as $rDossier) {
        $i++;
        $class = $i % 2 == 0 ? ' even ' : 'odd ';
Ejemplo n.º 7
0
                </a>
            </td>
            <td>
                <?php 
    echo $a_bookmark[$i]['me_description'];
    ?>
            </td>
        </tr>
        <?php 
}
?>
    </table>
<?php 
if (count($a_bookmark) > 0) {
    echo HtmlInput::submit("bookmark_delete", _("Supprimez favoris sélectionnés"), "", "smallbutton");
}
?>
</form>
<form id="bookmark_frm" method="get" onsubmit="save_bookmark();return false">
<?php 
echo _("Menu actuel") . " : " . hb($_GET['ac']);
echo HtmlInput::array_to_hidden(array("gDossier", "ac"), $_REQUEST);
?>
<p>
<?php 
echo HtmlInput::submit("bookmark_add", _("Ajoutez le menu  actuel à vos favoris"), "", "smallbutton");
?>
</form>


</div>
Ejemplo n.º 8
0
    function confirm($p_array, $p_summary = false)
    {
        global $g_parameter;
        extract($p_array);
        // don't need to verify for a summary
        if (!$p_summary) {
            $this->verify($p_array);
        }
        $anc = null;
        // to show a select list for the analytic & VAT USE
        // if analytic is op (optionnel) there is a blank line
        bcscale(4);
        $client = new Fiche($this->db);
        $client->get_by_qcode($e_client, true);
        $client_name = $client->getName() . ' ' . $client->strAttribut(ATTR_DEF_ADRESS) . ' ' . $client->strAttribut(ATTR_DEF_CP) . ' ' . $client->strAttribut(ATTR_DEF_CITY);
        $lPeriode = new Periode($this->db);
        if ($this->check_periode() == true) {
            $lPeriode->p_id = $period;
        } else {
            $lPeriode->find_periode($e_date);
        }
        $date_limit = $lPeriode->get_date_limit();
        $r = "";
        $r .= '<TABLE>';
        if ($p_summary) {
            $jr_id = $this->db->get_value('select jr_id from jrn where jr_internal=$1', array($this->internal));
            $r .= "<tr>";
            $r .= '<td>';
            $r .= _('Détail opération ');
            $r .= '</td>';
            $r .= '<td>';
            $r .= sprintf('<a class="line" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a>', $jr_id, dossier::id(), $this->internal);
            $r .= '</td>';
            $r .= "</tr>";
        }
        $r .= '<tr>';
        if (!$p_summary) {
            $r .= '<td>' . _('Numéro Pièce') . '</td><td>' . hb($e_pj) . '</td>';
        } else {
            if (strcmp($this->pj, $e_pj) != 0) {
                $r .= '<td>' . _('Numéro Pièce') . '</td><td>' . hb($this->pj) . '<span class="notice"> ' . _('Attention numéro pièce existante, elle a du être adaptée') . '</span></td>';
            } else {
                $r .= '<td>' . _('Numéro Pièce') . '</td><td>' . hb($this->pj) . '</td>';
            }
        }
        $r .= '</tr>';
        $r .= '<tr>';
        $r .= '<td> ' . _('Date') . '</td><td> ' . hb($e_date) . '</td>';
        $r .= '</tr>';
        $r .= '<tr>';
        $r .= '<td>' . _('Echeance') . '</td><td> ' . hb($e_ech) . '</td>';
        $r .= '</tr>';
        $r .= '<tr>';
        $r .= '<td> ' . _('Période Comptable') . '</td><td> ' . hb($date_limit['p_start'] . '-' . $date_limit['p_end']) . '</td>';
        $r .= '</tr>';
        $r .= '<tr>';
        $r .= '<td> ' . _('Journal') . '</td><td> ' . hb($this->get_name()) . '</td>';
        $r .= '</tr>';
        $r .= '<tr>';
        $r .= '<td> ' . _('Libellé') . '</td><td> ' . hb($e_comm) . '</td>';
        $r .= '</tr>';
        $r .= '<tr>';
        $r .= '<td> ' . _('Client') . '</td><td> ' . hb($e_client . ':' . $client_name) . '</td>';
        $r .= '</tr>';
        $r .= '</table>';
        $r .= '<h2>' . _('Détail articles vendus') . '</h2>';
        $r .= '<p class="decale">';
        $r .= '<table class="result" >';
        $r .= '<TR>';
        $r .= "<th>" . _('Code') . "</th>";
        $r .= "<th>" . _('Dénomination') . "</th>";
        $r .= "<th style=\"text-align:right\">" . _('prix') . "</th>";
        $r .= "<th style=\"text-align:right\">" . _('quantité') . "</th>";
        if ($g_parameter->MY_TVA_USE == 'Y') {
            $r .= "<th style=\"text-align:right\">" . _('tva') . "</th>";
            $r .= '<th style="text-align:right"> ' . _('Montant TVA') . '</th>';
            $r .= '<th style="text-align:right">' . _('Montant HTVA') . '</th>';
            $r .= '<th style="text-align:right">' . _('Montant TVAC') . '</th>';
        } else {
            $r .= '<th style="text-align:right">' . _('Montant') . '</th>';
        }
        /* if we use the AC */
        if ($g_parameter->MY_ANALYTIC != 'nu') {
            $anc = new Anc_Plan($this->db);
            $a_anc = $anc->get_list();
            $x = count($a_anc);
            /* set the width of the col */
            $r .= '<th colspan="' . $x . '">' . _('Compt. Analytique') . '</th>';
            /* add hidden variables pa[] to hold the value of pa_id */
            $r .= Anc_Plan::hidden($a_anc);
        }
        $r .= '</tr>';
        $tot_amount = 0.0;
        $tot_tva = 0.0;
        for ($i = 0; $i < $nb_item; $i++) {
            if (strlen(trim(${"e_march" . $i})) == 0) {
                continue;
            }
            /* retrieve information for card */
            $fiche = new Fiche($this->db);
            $fiche->get_by_qcode(${"e_march" . $i});
            if ($g_parameter->MY_UPDLAB == 'Y') {
                $fiche_name = h(${"e_march" . $i . "_label"});
            } else {
                $fiche_name = $fiche->strAttribut(ATTR_DEF_NAME);
            }
            if ($g_parameter->MY_TVA_USE == 'Y') {
                $oTva = new Acc_Tva($this->db);
                $idx_tva = ${"e_march" . $i . "_tva_id"};
                $oTva->set_parameter('id', $idx_tva);
                $oTva->load();
            }
            $op = new Acc_Compute();
            $amount = bcmul(${"e_march" . $i . "_price"}, ${'e_quant' . $i});
            $op->set_parameter("amount", $amount);
            if ($g_parameter->MY_TVA_USE == 'Y') {
                $op->set_parameter('amount_vat_rate', $oTva->get_parameter('rate'));
                $op->compute_vat();
                $tva_computed = $op->get_parameter('amount_vat');
                $tva_item = ${"e_march" . $i . "_tva_amount"};
                if (isset($tva[$idx_tva])) {
                    $tva[$idx_tva] += $tva_item;
                } else {
                    $tva[$idx_tva] = $tva_item;
                }
                $tot_tva = round(bcadd($tva_item, $tot_tva), 2);
            }
            $tot_amount = round(bcadd($tot_amount, $amount), 2);
            $r .= '<tr>';
            $r .= '<td>';
            $r .= ${"e_march" . $i};
            $r .= '</td>';
            $r .= '<TD style="border-bottom:1px dotted grey;">';
            $r .= $fiche_name;
            $r .= '</td>';
            $r .= '<td class="num">';
            $r .= nbm(${"e_march" . $i . "_price"});
            $r .= '</td>';
            $r .= '<td class="num">';
            $r .= nbm(${"e_quant" . $i});
            $r .= '</td>';
            $both_side = 0;
            if ($g_parameter->MY_TVA_USE == 'Y') {
                $r .= '<td class="num">';
                $r .= $oTva->get_parameter('label');
                $r .= '</td>';
                $both_side = $oTva->get_parameter("both_side");
                /* warning if tva_computed and given are not the
                   same */
                if (bcsub($tva_item, $tva_computed) != 0 && !($tva_item == 0 && $both_side == 1)) {
                    $r .= '<td style="background-color:red" class="num">';
                    $r .= HtmlInput::infobulle(28);
                    $r .= '<a href="#" class="error" style="display:inline" title="' . _("Attention Différence entre TVA calculée et donnée") . '">' . nbm($tva_item) . '<a>';
                } else {
                    $r .= '<td  class="num">';
                    $r .= nbm($tva_item);
                }
                $r .= '</td>';
                $r .= '<td class="num">';
                $r .= nbm($amount);
                $r .= '</td>';
                $tot_row = bcadd($tva_item, $amount);
                $r .= td(nbm($tot_row), 'class="num"');
            } else {
                $r .= '<td class="num">';
                $r .= nbm($amount);
                $r .= '</td>';
            }
            // encode the pa
            if ($g_parameter->MY_ANALYTIC != 'nu') {
                // use of AA
                // show form
                $anc_op = new Anc_Operation($this->db);
                $null = $g_parameter->MY_ANALYTIC == 'op' ? 1 : 0;
                $r .= '<td>';
                $p_mode = $p_summary == false ? 1 : 0;
                $p_array['pa_id'] = $a_anc;
                /* op is the operation it contains either a sequence or a jrnx.j_id */
                $r .= HtmlInput::hidden('op[]=', $i);
                $r .= $anc_op->display_form_plan($p_array, $null, $p_mode, $i, $amount);
                $r .= '</td>';
            }
            $r .= '</tr>';
        }
        // end loop item
        //
        // Add the sum
        $decalage = $g_parameter->MY_TVA_USE == 'Y' ? '<td></td><td></td><td></td><td></td>' : '<td></td>';
        $tot = round(bcadd($tot_amount, $tot_tva), 2);
        $tot_tva = nbm($tot_tva);
        $tot = nbm($tot);
        $str_tot = _('Totaux');
        $tot_amount = nbm($tot_amount);
        $r .= <<<EOF
<tr class="highlight">
    {$decalage}            
     <td>
                {$str_tot}
     </td>
    <td class="num">
        {$tot_tva}
    </td>
    <td class="num">
        {$tot_amount}
    </td>
    <td class="num">
        {$tot}
    </td>
EOF;
        $r .= '</table>';
        $r .= '</p>';
        if ($g_parameter->MY_ANALYTIC != 'nu' && !$p_summary) {
            // use of AA
            $r .= '<input type="button" class="button" value="' . _('Vérifiez Imputation Analytique') . '" onClick="verify_ca(\'\');">';
        }
        $r .= !$p_summary ? '<div id="total_div_id" >' : '<div>';
        $r .= '<h2>Totaux</h2>';
        /* use VAT */
        if ($g_parameter->MY_TVA_USE == 'Y') {
            $r .= '<table>';
            $r .= '<tr><td>Total HTVA</td>';
            $r .= td(hb($tot_amount), 'class="num"');
            foreach ($tva as $i => $value) {
                $oTva->set_parameter('id', $i);
                $oTva->load();
                $r .= '<tr><td>  TVA ' . $oTva->get_parameter('label') . '</td>';
                $r .= td(hb(nbm($tva[$i])), 'class="num"');
            }
            $r .= '<tr>' . td(_('Total TVA')) . td(hb($tot_tva), 'class="num"');
            $r .= '<tr>' . td(_('Total TVAC')) . td(hb($tot), 'class="num"');
            $r .= '</table>';
        } else {
            $r .= '<br>Total ' . hb($tot);
        }
        $r .= '</div>';
        /*  Add hidden */
        $r .= HtmlInput::hidden('e_client', $e_client);
        $r .= HtmlInput::hidden('nb_item', $nb_item);
        $r .= HtmlInput::hidden('p_jrn', $p_jrn);
        $mt = microtime(true);
        $r .= HtmlInput::hidden('mt', $mt);
        if (isset($period)) {
            $r .= HtmlInput::hidden('period', $period);
        }
        /* \todo comment les types hidden gérent ils des contenus avec des quotes, double quote ou < > ??? */
        $r .= HtmlInput::hidden('e_comm', $e_comm);
        $r .= HtmlInput::hidden('e_date', $e_date);
        $r .= HtmlInput::hidden('e_ech', $e_ech);
        $r .= HtmlInput::hidden('e_pj', $e_pj);
        $r .= HtmlInput::hidden('e_pj_suggest', $e_pj_suggest);
        $e_mp = isset($e_mp) ? $e_mp : 0;
        $r .= HtmlInput::hidden('e_mp', $e_mp);
        if (isset($repo)) {
            // Show the available repository
            $r .= $this->select_depot($p_summary, $repo);
        }
        /* if the paymethod is not 0 and if a quick code is given */
        if ($e_mp != 0 && strlen(trim(${'e_mp_qcode_' . $e_mp})) != 0) {
            $r .= HtmlInput::hidden('e_mp_qcode_' . $e_mp, ${'e_mp_qcode_' . $e_mp});
            $r .= HtmlInput::hidden('acompte', $acompte);
            $r .= HtmlInput::hidden('e_comm_paiement', $e_comm_paiement);
            /* needed for generating a invoice */
            $r .= HtmlInput::hidden('qcode_benef', ${'e_mp_qcode_' . $e_mp});
            $fname = new Fiche($this->db);
            $fname->get_by_qcode(${'e_mp_qcode_' . $e_mp});
            $r .= '<h2>' . "Payé par " . ${'e_mp_qcode_' . $e_mp} . " " . $fname->getName() . '</h2> ' . '<p class="decale">' . _('Déduction acompte ') . h($acompte) . '</p>' . _('Libellé :') . h($e_comm_paiement);
            $r .= '<br>';
        }
        $r .= HtmlInput::hidden('jrn_type', $jrn_type);
        for ($i = 0; $i < $nb_item; $i++) {
            $r .= HtmlInput::hidden("e_march" . $i, ${"e_march" . $i});
            if (isset(${"e_march" . $i . "_label"})) {
                $r .= HtmlInput::hidden("e_march" . $i . "_label", ${"e_march" . $i . "_label"});
            }
            $r .= HtmlInput::hidden("e_march" . $i . "_price", ${"e_march" . $i . "_price"});
            if ($g_parameter->MY_TVA_USE == 'Y') {
                $r .= HtmlInput::hidden("e_march" . $i . "_tva_id", ${"e_march" . $i . "_tva_id"});
                $r .= HtmlInput::hidden("e_march" . $i . "_tva_amount", ${"e_march" . $i . "_tva_amount"});
            }
            $r .= HtmlInput::hidden("e_quant" . $i, ${"e_quant" . $i});
        }
        return $r;
    }
Ejemplo n.º 9
0
//---------------------------------------------------------------------------
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_customer.php';
if (isset($_POST['mod'])) {
    // modification is asked
    $f_id = $_REQUEST['f_id'];
    $supplier = new Customer($cn, $f_id);
    $supplier->Save();
}
echo '<div class="u_content">';
$f_id = $_REQUEST['f_id'];
echo '<div class="content" style="width:50%">';
if (isset($_POST['mod'])) {
    echo hb(_('Information sauvée'));
}
$supplier = new Fiche($cn, $f_id);
$p_readonly = $g_user->check_action(FICADD) == 0 ? true : false;
if (!$p_readonly) {
    echo '<form id="catergory_detail_frm" method="post">';
}
echo dossier::hidden();
echo HtmlInput::hidden('sb', 'detail');
echo HtmlInput::hidden('dc', 'cc');
echo $supplier->Display($p_readonly);
$w = new IHidden();
$w->name = "p_action";
$w->value = "supplier";
echo $w->input();
$w->name = "f_id";
Ejemplo n.º 10
0
//This file is part of NOALYSS and is under GPL
//see licence.txt
?>
<div class="bxbutton">
<?php 
if ($div != "popup") {
    $callback = $_SERVER['PHP_SELF'];
    // create the url for the ajax (for zoom feature)
    $str = http_build_query(array('gDossier' => Dossier::id(), 'jr_id' => $obj->det->jr_id, 'act' => 'de', 'div' => $div, 'ajax' => $callback));
    $msg_close = _('Fermer');
    $msg_pop = _('Ouvrir dans une fenêtre séparée');
    echo '<A id="close_div" title="' . $msg_pop . '" onclick="var a=window.open(\'popup.php?' . $str . '\',\'\',\'titlebar=no,location=no,statusbar=no,menubar=no,toolbar=no,fullscreen=yes,scrollbars=yes,resizable=yes,status=no\'); a.focus();removeDiv(\'' . $div . '\')">&#11036;
</A>';
    echo '<A id="close_div" title="' . $msg_close . '"  onclick="removeDiv(\'' . $div . '\');">&#10761;</A>';
}
?>
</div>
<div>
   <?php 
echo h2($oLedger->get_name(), 'class="title"');
?>
</div>
<?php 
echo _("Opération ID") . "=" . hb($obj->det->jr_internal);
?>
<div id="<?php 
echo $div . 'info';
?>
" class="divinfo"></div>
<?php 
require_once NOALYSS_INCLUDE . '/class_itextarea.php';