当前位置: 首页>>代码示例>>PHP>>正文


PHP dossier::get方法代码示例

本文整理汇总了PHP中dossier::get方法的典型用法代码示例。如果您正苦于以下问题:PHP dossier::get方法的具体用法?PHP dossier::get怎么用?PHP dossier::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dossier的用法示例。


在下文中一共展示了dossier::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: myList

 function myList()
 {
     $s = dossier::get();
     $sql = "select md_id,md_name,md_affect,dt_value from document_modele join document_type on(dt_id=md_type) order by md_name";
     $Res = $this->cn->exec_sql($sql);
     $all = Database::fetch_all($Res);
     $r = '';
     if (Database::num_row($Res) != 0) {
         $r .= '<p><form method="post">';
         $r .= dossier::hidden();
         $r .= "<table>";
         $r .= "<tr> ";
         $r .= th(_('Nom'));
         $r .= th(_('Catégorie'));
         $r .= th(_('Affect.'));
         $r .= th(_('Fichier'));
         $r .= th(_('Effacer'));
         $r .= "</tr>";
         foreach ($all as $row) {
             $r .= "<tr>";
             $r .= "<td>";
             $r .= h($row['md_name']);
             $r .= "</td>";
             $r .= "<td>";
             $r .= $row['dt_value'];
             $r .= "</td>";
             $r .= td(h($row['md_affect']));
             $r .= "<td>";
             $r .= '<A HREF="show_document_modele.php?md_id=' . $row['md_id'] . '&' . $s . '">Document</a>';
             $r .= "</td>";
             $r .= "<TD>";
             $c = new ICheckBox();
             $c->name = "dm_remove_" . $row['md_id'];
             $r .= $c->input();
             $r .= "</td>";
             $r .= td(HtmlInput::detail_modele_document($row['md_id'], 'Modifier'));
             $r .= "</tr>";
         }
         $r .= "</table>";
         // need hidden parameter for subaction
         $a = new IHidden();
         $a->name = "sa";
         $a->value = "rm_template";
         $r .= $a->input();
         $r .= HtmlInput::submit("rm_template", "Effacer la sélection");
     }
     $b = new IButton('show');
     $b->label = "Ajout d'un document";
     $b->javascript = "\$('add_modele').style.display='block';new Draggable('add_modele',{starteffect:function(){\n                      new Effect.Highlight(obj.id,{scroll:window,queue:'end'});}});";
     $r .= $b->input();
     $r .= "</form></p>";
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:53,代码来源:class_document_modele.php

示例2: anchor

 function anchor()
 {
     if ($this->d_id == 0) {
         return '';
     }
     $image = '<IMG SRC="image/insert_table.gif" title="' . $this->d_filename . '" border="0">';
     $r = "";
     $r = '<A class="mtitle" HREF="show_document.php?d_id=' . $this->d_id . '&' . dossier::get() . '">' . $image . '</A>';
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:10,代码来源:class_document.php

示例3:

<?php

//This file is part of NOALYSS and is under GPL
//see licence.txt
/**
 *@brief  show an iframe, the iframe contains either
 * - a input type to save a file
 * - a file name (which can be opened or removed
 */
$str = '?' . dossier::get() . "&div={$div}&act=file&jr_id={$jr_id}";
if (isset($_REQUEST['ajax'])) {
    $str .= "&ajax=1";
}
?>

<div id="document_operation_div<?php 
echo $div;
?>
" class="myfieldset noprint" style="display:<?php 
echo $a_tab['document_operation_div']['display'];
?>
">
<iframe frameborder=0 scrolling="no" style="margin:0px;padding: 0px;border:0px;width:100%;height:90px;overflow:hidden" src="<?php 
echo 'ajax_ledger.php' . $str;
?>
"></iframe>
</div>
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:27,代码来源:ledger_detail_file.php

示例4: die

/*!\file
 * \brief this file is used for the follow up of the customer (mail, meeting...)
 *  - sb = detail
 *  - sc = sv
 *  - sd = this parameter is used here
 *  - $cn = database connection
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_follow_up.php';
/**
 *\note problem with ShowActionList, this function is local
 * to the file action.inc.php. And this function must different for each
 *  suivi
 */
$sub_action = isset($_REQUEST['sa']) ? $_REQUEST['sa'] : "list";
$ag_id = isset($_REQUEST['ag_id']) ? $_REQUEST['ag_id'] : 0;
if (!isset($_GET['submit_query'])) {
    $_REQUEST['closed_action'] = 1;
    $_GET['closed_action'] = 1;
}
$p_action = $_REQUEST['ac'];
$base = "ac={$p_action}&sc=sv&sb=detail&f_id=" . $_REQUEST['f_id'] . "&" . HtmlInput::request_to_string(array("closed_action", "remind_date_end", "remind_date", "sag_ref", "only_internal", "state", "gDossier", "qcode", "ag_dest", "query", "tdoc", "date_start", "date_end", "hsstate", "searchtag", "sb", "sc"), "");
$retour = HtmlInput::button_anchor('Retour', '?' . dossier::get() . '&' . $base);
$fiche = new Fiche($cn, $_REQUEST['f_id']);
$_GET['qcode'] = $fiche->get_quick_code();
$_REQUEST['qcode'] = $fiche->get_quick_code();
echo '<div class="content">';
require_once NOALYSS_INCLUDE . '/action.common.inc.php';
echo '</div>';
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:category_followup.inc.php

示例5: h

    echo h($array[$i]['jrn_def_name']);
    ?>

		 </td>
		 <td style="text-align:center">
			 <?php 
    echo h($array[$i]['fd_label']);
    ?>

		 </td>
		 <td style="text-align:center">
			 <?php 
    echo h($array[$i]['jrn_target']);
    ?>
		 </td>
		 <td style="text-align:center">
			 <?php 
    echo h($array[$i]['vw_name']);
    ?>
		 </td>

<?php 
    echo $td . HtmlInput::button_anchor(_('Modifie'), '?ac=' . $_REQUEST['ac'] . '&sa=mp&sb=change&' . dossier::get() . '&id=' . $array[$i]['mp_id'], "", "", "smallbutton");
    ?>

	 </tr>
<?php 
}
?>

</table>
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:list_mod_payment.php

示例6: ISelect

<?php 
$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')));
$waffect->selected = $doc->md_affect;
echo $waffect->input();
?>
</td>
</tr>
<tr>

<tr>
<td>
<?php 
echo _("Fichier");
$s = dossier::get();
echo '<A HREF="show_document_modele.php?md_id=' . $doc->md_id . '&' . $s . '">(fichier actuel)</a>';
?>
</td>
<td>
<?php 
$file = new IFile('doc');
echo $file->input();
?>
</td>
</tr>

<tr>
<td>
<?php 
echo _("Dernier numéro utilisé pour ce type de document");
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:modele_document.php

示例7: _

        echo $anc->form_cat();
        echo HtmlInput::submit('mod_cat_save', _('Sauver'));
        echo '</form>';
        echo '</div>';
    }
}
/* * ********************************************************************
 * Display menu
 *
 *
 * ******************************************************************** */
// display button add and list of forecast to display
if ($sa == 'list') {
    $aForecast = Forecast::load_all($cn);
    $menu = array();
    $get_dossier = dossier::get();
    echo '<div class="content">';
    echo _('Filtre') . " " . HtmlInput::filter_table("forecast_table_id", '0', 1);
    echo '<TABLE id="forecast_table_id" class="vert_mtitle">';
    $href = "?ac=" . $_REQUEST['ac'] . "&sa=new&" . $get_dossier;
    echo '<TR><TD class="first"><A HREF="' . $href . '">' . _("Ajout d'une prévision") . '</A></TD></TR>';
    $def = isset($_REQUEST['f_id']) ? $_REQUEST['f_id'] : -1;
    for ($i = 0; $i < count($aForecast); $i++) {
        $href = "?ac=" . $_REQUEST['ac'] . "&sa=vw&" . $get_dossier . '&f_id=' . $aForecast[$i]['f_id'];
        $name = h($aForecast[$i]['f_name']);
        $menu[] = array($href, $name, $name, $aForecast[$i]['f_id']);
        echo '<TR><TD><A HREF="' . $href . '">' . h($name) . '</A></TD></TR>';
    }
    echo "</TABLE>";
    echo '</div>';
    return;
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:forecast.inc.php

示例8: define

 * \brief manage all the export to CSV or PDF
 *   act can be
 *
 */
define('ALLOWED', 1);
require_once '../include/constant.php';
global $g_user, $cn, $g_parameter;
require_once NOALYSS_INCLUDE . '/class_database.php';
require_once NOALYSS_INCLUDE . '/class_user.php';
$gDossier = dossier::id();
$cn = new Database($gDossier);
mb_internal_encoding("UTF-8");
$g_user = new User($cn);
$g_user->Check();
$action = $g_user->check_dossier($gDossier);
set_language();
if ($action == 'X' || !isset($_GET['act']) || $g_user->check_print($_GET['act']) == 0) {
    echo alert(_('Accès interdit'));
    redirect("do.php?" . dossier::get());
    exit;
}
// get file and execute it
$action = HtmlInput::default_value_get('act', null);
if ($action == null) {
    die(_('Appel invalide'));
}
$prfile = $cn->get_value("select me_file from menu_ref where me_code=\$1", array($action));
if ($prfile == "") {
    die(_('Export impossible'));
}
require_once $prfile;
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:export.php

示例9: die

/*!\file
 * \brief file included to manage all the sold operation
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_icheckbox.php';
require_once NOALYSS_INCLUDE . '/class_acc_ledger_sold.php';
require_once NOALYSS_INCLUDE . '/class_pre_op_ven.php';
require_once NOALYSS_INCLUDE . '/class_document.php';
require_once NOALYSS_INCLUDE . '/class_acc_ledger_info.php';
require_once NOALYSS_INCLUDE . '/class_ipopup.php';
$gDossier = dossier::id();
$cn = new Database(dossier::id());
//menu = show a list of ledger
$str_dossier = dossier::get();
$ac = "ac=" . $_REQUEST['ac'];
global $g_parameter;
$p_msg = "";
//----------------------------------------------------------------------
// Encode a new invoice
// empty form for encoding
//----------------------------------------------------------------------
$Ledger = new Acc_Ledger_Sold($cn, 0);
// Check privilege
if (isset($_REQUEST['p_jrn']) && $g_user->check_jrn($_REQUEST['p_jrn']) != 'W') {
    NoAccess();
    exit - 1;
}
/* if a new invoice is encoded, we display a form for confirmation */
if (isset($_POST['view_invoice'])) {
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:compta_ven.inc.php

示例10: display_form_periode

 function display_form_periode()
 {
     $str_dossier = dossier::get();
     if ($this->jrn_def_id == 0) {
         $Res = $this->cn->exec_sql("select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,p_central,p_closed,p_exercice,\n                                     (select count(jr_id) as count_op from jrn where jr_tech_per = p_id) as count_op\n                                     from parm_periode\n                                     order by p_start,p_end");
         $Max = Database::num_row($Res);
         echo '<form id="periode_frm" method="POST" onsubmit="return confirm_box(this,\'Confirmez-vous la fermeture des périodes choisies ?\')" >';
         echo HtmlInput::array_to_hidden(array('ac', 'gDossier', 'jrn_def_id', 'choose'), $_REQUEST);
         echo '<TABLE ALIGN="CENTER">';
         echo "</TR>";
         echo '<th>' . ICheckBox::toggle_checkbox("per_toggle", "periode_frm") . "</th>";
         echo '<TH> Date d&eacute;but </TH>';
         echo '<TH> Date fin </TH>';
         echo '<TH> Exercice </TH>';
         echo "</TR>";
         for ($i = 0; $i < $Max; $i++) {
             $l_line = Database::fetch_array($Res, $i);
             $class = "even";
             if ($i % 2 == 0) {
                 $class = "odd";
             }
             $style = '';
             if ($l_line['p_closed'] == 't') {
                 $style = "color:red";
             }
             echo '<TR class="' . $class . '" style="' . $style . '">';
             echo '<td>';
             if ($l_line['p_closed'] == 'f') {
                 $per_to_close = new ICheckBox('sel_per_close[]');
                 $per_to_close->value = $l_line['p_id'];
                 echo $per_to_close->input();
             }
             echo '</td>';
             echo '<TD ALIGN="CENTER"> ' . $l_line['date_start'] . '</TD>';
             echo '<TD  ALIGN="CENTER"> ' . $l_line['date_end'] . '</TD>';
             echo '<TD  ALIGN="CENTER"> ' . $l_line['p_exercice'] . '</TD>';
             if ($l_line['p_closed'] == 't') {
                 $closed = $l_line['p_central'] == 't' ? '<TD>Centralis&eacute;e</TD>' : '<TD>Ferm&eacute;e</TD>';
                 $change = '<TD></TD>';
                 $remove = sprintf(_('Nombre opérations %d'), $l_line['count_op']);
                 $remove = td($remove, ' class="mtitle" ');
                 $change = td('<A class="mtitle" HREF="javascript:void(0)"' . ' onclick="return confirm_box(null,\'' . _('Confirmez Réouverture') . ' ?\',function() {window.location=\'do.php?ac=' . $_REQUEST['ac'] . '&action=reopen&p_per=' . $l_line['p_id'] . '&' . $str_dossier . '\';} )"> Réouverture</A>', ' class="mtitle"');
             } else {
                 if ($l_line['count_op'] == 0) {
                     $change = HtmlInput::display_periode($l_line['p_id']);
                 } else {
                     $change = "Non modifiable";
                 }
                 $change = td($change, ' class="mtitle" ');
                 $reopen = td("");
                 $remove = '<TD class="mtitle">';
                 if ($l_line['count_op'] == 0) {
                     $go = 'do.php?' . http_build_query(array('ac' => $_REQUEST['ac'], 'action' => 'delete_per', 'p_per' => $l_line['p_id'], 'gDossier' => Dossier::id()));
                     $remove .= '<A class="mtitle" HREF="javascript:void(0)" ' . 'onclick="return confirm_box (null,\'' . _('Confirmez effacement ?') . '\',function() { window.location=\'' . $go . '\'});" >' . ' Efface</A>';
                 } else {
                     $remove .= sprintf(_('Nombre opérations %d'), $l_line['count_op']);
                 }
                 $remove .= '</td>';
             }
             echo $change;
             echo $remove;
             echo '</TR>';
         }
         echo '</table>';
         echo '<p style="text-align:center">';
         echo HtmlInput::hidden("close_per", 1);
         echo HtmlInput::submit('close_per_bt', 'Fermeture des périodes sélectionnées');
         echo '</p>';
         echo '</form>';
         $but = new IButton('show_per_add', 'Ajout d\'une période');
         $but->javascript = "\$('periode_add_div').show();";
         echo $but->input();
         echo '<div class="inner_box" style="width:40%;" id="periode_add_div">';
         echo HtmlInput::title_box("Ajout d'une période", "periode_add_div", "hide");
         echo '<FORM  METHOD="POST">';
         echo dossier::hidden();
         $istart = new IDate('p_date_start');
         $iend = new IDate('p_date_end');
         $iexercice = new INum('p_exercice');
         $iexercice->size = 5;
         echo '<table>';
         echo '<TR> ';
         echo td('Date de début');
         echo td($istart->input());
         echo '</tr><tr>';
         echo td('Date de fin');
         echo td($iend->input());
         echo '</tr><tr>';
         echo td('Exercice');
         echo td($iexercice->input());
         echo '</TABLE>';
         echo HtmlInput::submit('add_per', 'Valider');
         echo '</FORM>';
         echo '</div>';
         echo create_script("\$('periode_add_div').hide();new Draggable('periode_add_div',{starteffect:function()\n                                  {\n                                     new Effect.Highlight(obj.id,{scroll:window,queue:'end'});\n                                  }}\n                         );");
     } else {
         $Res = $this->cn->exec_sql("select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,status,p_exercice\n                                     from parm_periode join jrn_periode using (p_id) where jrn_def_id=" . $this->jrn_def_id . "\n                                     order by p_start,p_end");
         $Max = Database::num_row($Res);
         $r = $this->cn->exec_sql('select jrn_Def_name from jrn_Def where jrn_Def_id=' . $this->jrn_def_id);
         $jrn_name = Database::fetch_result($r, 0, 0);
//.........这里部分代码省略.........
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:101,代码来源:class_periode.php

示例11: Acc_Payment

    $row->from_array($_POST);
    $row->insert();
    $sb = "list";
}
//---------------------------------------------------------------------------
// Show form to enter a new one
//---------------------------------------------------------------------------
if ($sb == 'ins') {
    $mp = new Acc_Payment($cn);
    $r = $mp->blank();
    echo '<form method="POST" id="payment_frm" onsubmit="return confirm_box(this,\'Vous confirmez ?\')">';
    echo dossier::hidden();
    echo HtmlInput::hidden('ac', $_REQUEST['ac']), HtmlInput::hidden('insert', 0);
    echo $r;
    echo HtmlInput::submit('insertsub', _('Enregistre'));
    echo HtmlInput::button_anchor(_('Retour sans sauver'), '?p_action=divers&sa=mp&' . dossier::get() . "&ac=" . $_REQUEST['ac'], "", "", "smallbutton");
    echo '</form>';
    return;
}
//--------------------------------------------------------------------------------
//LIST
//--------------------------------------------------------------------------------
/* Get the data from database */
$header = new Sort_Table();
$base_url = $_SERVER['PHP_SELF'] . "?" . Dossier::get() . "&ac=" . $_REQUEST['ac'];
$header->add(_("Libelle"), $base_url, "order by mp_lib asc", "order by mp_lib desc", 'la', 'ld');
$header->add(_("Pour le journal"), $base_url, "order by jrn_def_name asc", "order by jrn_def_name  desc", 'ja', 'jd');
$header->add(_("Type de fiche"), $base_url, "order by fd_label asc", "order by fd_label desc", 'tc', 'td');
$header->add(_("Enregistré dans le journal"), $base_url, "order by jrn_target asc", "order by jrn_target desc", 'jta', 'jtd');
$header->add(_("Avec la fiche"), $base_url, "order by vw_name asc", "order by vw_name desc", 'na', 'nd');
$order = isset($_REQUEST['ord']) ? $_REQUEST['ord'] : 'la';
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:payment_middle.inc.php

示例12: Database

        $array[$i]['value'] = $r['dos_id'];
        $array[$i]['label'] = $r['dos_name'];
        $i++;
    }
    $wAvail->value = $array;
    echo 'Choix du dossier :' . $wAvail->input('f');
    echo HtmlInput::submit('ok', 'Continuer');
    echo '</form>';
    echo '</div>';
    echo '</div>';
    return;
}
/* --------------------------------------------------
 * Step 2 choose now the exercice of this folder
 */
$back = 'do.php?ac=' . $_REQUEST['ac'] . '&' . dossier::get();
if ($sa == 'step2') {
    echo '<div class="content">' . '<div><h1 class="legend">Etape 2</h1>' . '<h2 class="info">' . dossier::name($_REQUEST['f']) . '</h2>' . '<form class="print" method="post">' . ' Choisissez l\'exercice du dossier ';
    echo dossier::hidden();
    echo HtmlInput::hidden('ac', $_REQUEST['ac']);
    echo HtmlInput::hidden('sa', 'step3');
    echo HtmlInput::hidden('f', $_REQUEST['f']);
    $cn = new Database($_REQUEST['f']);
    $periode = $cn->make_array("select distinct p_exercice,p_exercice from parm_periode order by p_exercice");
    $w = new ISelect();
    $w->table = 0;
    $w->label = 'Periode';
    $w->readonly = false;
    $w->value = $periode;
    $w->name = "p_periode";
    echo 'P&eacute;riode : ' . $w->input();
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:opening.inc.php

示例13: input

 public function input($p_name = null, $p_value = null)
 {
     if ($p_name == null && $this->name == "") {
         throw new Exception('Le nom d une icard doit être donne');
     }
     $this->value = $p_value == null ? $this->value : $p_value;
     if ($this->readOnly == true) {
         return $this->display();
     }
     $this->id = $this->id == "" ? $this->name : $this->id;
     $label = '';
     if ($this->dblclick != '') {
         $e = sprintf(' ondblclick="%s" ', $this->dblclick);
         $this->dblclick = $e;
     }
     $input = sprintf('<INPUT TYPE="Text"  class="input_text"  ' . ' NAME="%s" ID="%s" VALUE="%s" SIZE="%d" %s %s>', $this->name, $this->name, $this->value, $this->size, $this->dblclick, $this->javascript);
     $div = sprintf('<div id="%s_choices"  class="autocomplete"></div>', $this->name);
     $query = "op=autoanc&" . dossier::get();
     // add parameter to search into a plan (pa_id) or get the value from
     // a HtmlObject
     if ($this->plan != 0) {
         $query .= "&pa_id=" . $this->plan;
     } elseif ($this->plan_ctl != '') {
         $this->set_attribute("plan_ctl", $this->plan_ctl);
     }
     $attr = $this->get_js_attr();
     $javascript = sprintf('try { new Ajax.Autocompleter("%s","%s_choices","ajax_misc.php?%s",' . '{paramName:"anccard",minChars:1,indicator:null, ' . 'callback:%s, ' . ' afterUpdateElement:%s});} catch (e){alert(e.message);};', $this->name, $this->name, $query, $this->callback, $this->fct);
     $javascript = create_script($javascript . $this->dblclick);
     $r = $label . $input . $attr . $div . $javascript;
     if ($this->table == 1) {
         $r = td($r);
     }
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:34,代码来源:class_ianccard.php

示例14: insert

 public function insert($p_array = null)
 {
     global $g_parameter;
     extract($p_array);
     $this->verify($p_array);
     $group = $this->db->get_next_seq("s_oa_group");
     /* for analytic */
     $seq = $this->db->get_next_seq('s_grpt');
     $this->id = $p_jrn;
     $internal = $this->compute_internal_code($seq);
     $this->internal = $internal;
     $oPeriode = new Periode($this->db);
     $check_periode = $this->check_periode();
     if ($check_periode == true) {
         $tperiode = $period;
     } else {
         $tperiode = $oPeriode->find_periode($e_date);
     }
     $cust = new Fiche($this->db);
     $cust->get_by_qcode($e_client);
     $sposte = $cust->strAttribut(ATTR_DEF_ACCOUNT);
     // if 2 accounts, take only the debit one for the customer
     //
     if (strpos($sposte, ',') != 0) {
         $array = explode(',', $sposte);
         $poste = $array[0];
     } else {
         $poste = $sposte;
     }
     bcscale(4);
     try {
         $tot_amount = 0;
         $tot_tva = 0;
         $tot_debit = 0;
         $this->db->start();
         $tva = array();
         /* Save all the items without vat */
         for ($i = 0; $i < $nb_item; $i++) {
             $n_both = 0;
             if (strlen(trim(${'e_march' . $i})) == 0) {
                 continue;
             }
             /* First we save all the items without vat */
             $fiche = new Fiche($this->db);
             $fiche->get_by_qcode(${"e_march" . $i});
             $amount = bcmul(${'e_march' . $i . '_price'}, ${'e_quant' . $i});
             $tot_amount = round(bcadd($tot_amount, $amount), 2);
             $acc_operation = new Acc_Operation($this->db);
             $acc_operation->date = $e_date;
             $sposte = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
             // if 2 accounts, take only the credit one
             if (strpos($sposte, ',') != 0) {
                 $array = explode(',', $sposte);
                 $poste_val = $array[1];
             } else {
                 $poste_val = $sposte;
             }
             $acc_operation->poste = $poste_val;
             $acc_operation->amount = $amount;
             $acc_operation->grpt = $seq;
             $acc_operation->jrn = $p_jrn;
             $acc_operation->type = 'c';
             $acc_operation->periode = $tperiode;
             if ($g_parameter->MY_UPDLAB == 'Y') {
                 $acc_operation->desc = strip_tags(${"e_march" . $i . "_label"});
             } else {
                 $acc_operation->desc = null;
             }
             $acc_operation->qcode = ${"e_march" . $i};
             if ($amount < 0) {
                 $tot_debit = bcadd($tot_debit, abs($amount));
             }
             $j_id = $acc_operation->insert_jrnx();
             if ($g_parameter->MY_TVA_USE == 'Y') {
                 /* Compute sum vat */
                 $oTva = new Acc_Tva($this->db);
                 $idx_tva = ${'e_march' . $i . '_tva_id'};
                 $tva_item = ${'e_march' . $i . '_tva_amount'};
                 $oTva->set_parameter("id", $idx_tva);
                 $oTva->load();
                 /* if empty then we need to compute it */
                 if (trim($tva_item) == '' || ${'e_march' . $i . '_tva_amount'} == 0) {
                     /* retrieve tva */
                     $l = new Acc_Tva($this->db, $idx_tva);
                     $l->load();
                     $tva_item = bcmul($amount, $l->get_parameter('rate'));
                 }
                 if (isset($tva[$idx_tva])) {
                     $tva[$idx_tva] += $tva_item;
                 } else {
                     $tva[$idx_tva] = $tva_item;
                 }
                 if ($oTva->get_parameter("both_side") == 0) {
                     $tot_tva = round(bcadd($tva_item, $tot_tva), 2);
                 } else {
                     $n_both = $tva_item;
                     if ($n_both < 0) {
                         $tot_debit = bcadd($tot_debit, abs($n_both));
                     }
                 }
//.........这里部分代码省略.........
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:101,代码来源:class_acc_ledger_sold.php

示例15: myList

 function myList()
 {
     $this->get();
     echo '<H2 class="info">' . $this->id . " " . $this->label . '</H2>';
     $step = $_SESSION['g_pagesize'];
     $sql_limit = "";
     $sql_offset = "";
     $bar = "";
     if ($step != -1) {
         $page = isset($_GET['page']) ? $_GET['page'] : 1;
         $offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
         $max_line = $this->cn->count_sql("select f_id,ad_value  from\n                                           fiche join fiche_detail using (f_id)\n                                           where fd_id='" . $this->id . "' and ad_id=" . ATTR_DEF_NAME . " order by f_id");
         $sql_limit = " limit " . $step;
         $sql_offset = " offset " . $offset;
         $bar = navigation_bar($offset, $max_line, $step, $page);
     }
     // Get all name the cards of the select category
     // 1 for attr_def.ad_id is always the name
     $Res = $this->cn->exec_sql("select f_id,vw_name,quick_code  from " . " vw_fiche_attr " . " where fd_id='" . $this->id . "' order by f_id {$sql_offset} {$sql_limit} ");
     $Max = Database::num_row($Res);
     echo $bar;
     $str = "";
     // save the url
     // with offet &offset=15&step=15&page=2&size=15
     if ($_SESSION['g_pagesize'] != -1) {
         $str = sprintf("&offset=%s&step=%s&page=%s&size=%s", $offset, $step, $page, $max_line);
     }
     echo '<FORM METHOD="POST" action="?p_action=fiche&action=vue' . $str . '">';
     echo HtmlInput::hidden('ac', $_REQUEST['ac']);
     echo dossier::hidden();
     echo HtmlInput::hidden("fiche", $this->id);
     echo HtmlInput::submit('add', 'Ajout fiche');
     echo '</FORM>';
     $str_dossier = dossier::get();
     echo '<table>';
     for ($i = 0; $i < $Max; $i++) {
         $l_line = Database::fetch_array($Res, $i);
         if ($i % 2 == 0) {
             echo '<TR class="odd">';
         } else {
             echo '<TR class="even">';
         }
         $span_mod = '<TD><A href="?p_action=fiche&' . $str_dossier . '&action=detail&fiche_id=' . $l_line['f_id'] . $str . '&fiche=' . $_REQUEST['fiche'] . '&ac=' . $_REQUEST['ac'] . '">' . $l_line['quick_code'] . '</A></TD>';
         echo $span_mod . '<TD>' . h($l_line['vw_name']) . "</TD>";
         echo '</tr>';
     }
     echo '</table>';
     echo '<FORM METHOD="POST" action="?p_action=fiche&action=vue' . $str . '">';
     echo HtmlInput::hidden('ac', $_REQUEST['ac']);
     echo dossier::hidden();
     echo HtmlInput::hidden("fiche", $this->id);
     echo HtmlInput::submit('add', 'Ajout fiche');
     echo '</FORM>';
     echo $bar;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:55,代码来源:class_fiche_def.php


注:本文中的dossier::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。