예제 #1
0
    if (isset($_POST['ok'])) {
        if ($g_user->can_write_repo($_POST['r_id'])) {
            $cn->exec_sql('delete from stock_change where c_id=$1', array($_POST['c_id']));
        } else {
            alert(_("Vous ne pouvez pas modifier ce dépôt"));
        }
    } else {
        alert(_("Opération non effacée: vous n'avez pas confirmé"));
    }
}
$profile = $g_user->get_profile();
$gDossier = dossier::id();
$default_exercice = $g_user->get_exercice();
$p_exercice = HtmlInput::default_value_get("p_exercice", $default_exercice);
$a_change = $cn->get_array("select *,to_char(c_date,'DD.MM.YY') as str_date from stock_change as sc\n\t\t\tjoin stock_repository as sr on (sc.r_id=sr.r_id)\n\t\t\twhere sc.r_id in (select r_id from profile_sec_repository where p_id=\$1)\n                         and c_date >= (select min(p_start) from parm_periode where p_exercice = \$2)\n                        and c_date <= (select max(p_end) from parm_periode where p_exercice = \$2)\n\t\torder by c_date", array($profile, $p_exercice));
$exercice = new Exercice($cn);
?>
<div class="content">
    <form method="get" class="print">
      <?php 
echo HtmlInput::get_to_hidden(array('gDossier', 'ac'));
?>
      <?php 
echo $exercice->select('p_exercice', $p_exercice)->input();
?>
      <?php 
echo HtmlInput::submit("filter", _('Valider'));
?>
    </form>
<table class="result">
	<tr>
예제 #2
0
        }
        echo $old;
        $html = ob_get_contents();
        ob_end_clean();
    }
}
///////////////////////////////////////////////////////////////////////////
// for an account
///////////////////////////////////////////////////////////////////////////
if (isset($_REQUEST['pcm_val'])) {
    $poste = new Acc_Account_Ledger($cn, $_REQUEST['pcm_val']);
    $year = $g_user->get_exercice();
    if ($year == 0) {
        $html = _("erreur aucune période par défaut, allez dans préférence pour en choisir une");
    } else {
        $exercice = new Exercice($cn);
        $old = '';
        $per = new Periode($cn);
        $limit_periode = $per->get_limit($year);
        $array['from_periode'] = $limit_periode[0]->first_day();
        $array['to_periode'] = $limit_periode[1]->last_day();
        if (isset($_GET['ex'])) {
            $limit_periode = $per->get_limit($_GET['ex']);
            if ($_GET['ex'] < $year) {
                $array['from_periode'] = $limit_periode[0]->first_day();
            } else {
                $array['to_periode'] = $limit_periode[1]->last_day();
            }
        }
        /*
         * Add button to select another year
예제 #3
0
require_once NOALYSS_INCLUDE . '/class_icheckbox.php';
require_once NOALYSS_INCLUDE . '/class_ihidden.php';
require_once NOALYSS_INCLUDE . '/class_acc_ledger.php';
require_once NOALYSS_INCLUDE . '/class_periode.php';
require_once NOALYSS_INCLUDE . '/class_exercice.php';
global $g_user;
$gDossier = dossier::id();
$exercice = isset($_GET['exercice']) ? $_GET['exercice'] : $g_user->get_exercice();
echo '<div class="content">';
/*
 * Let you change the exercice
 */
echo '<fieldset  class="noprint"><legend>' . _('Exercice') . '</legend>';
echo '<form method="GET">';
echo _('Choisissez un autre exercice') . " : ";
$ex = new Exercice($cn);
$wex = $ex->select('exercice', $exercice, ' onchange="submit(this)"');
echo $wex->input();
echo dossier::hidden();
echo HtmlInput::get_to_hidden(array('ac', 'type'));
echo '</form>';
echo '</fieldset>';
// Show the form for period
echo '<FORM  method="get">';
echo HtmlInput::get_to_hidden(array('ac'));
echo HtmlInput::hidden('type', 'bal');
echo HtmlInput::get_to_hidden(array('exercice'));
echo dossier::hidden();
// filter on the current year
$from = HtmlInput::default_value_get("from_periode", "");
$input_from = new IPeriod("from_periode", $from, $exercice);
예제 #4
0
 *
 *   You should have received a copy of the GNU General Public License
 *   along with NOALYSS; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/*!\file
 * \brief show the status of a card
 */
if (!defined('ALLOWED')) {
    die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_exercice.php';
global $g_user;
echo '<div class="content" style="width:90%;margin-left:5%">';
$exercice = new Exercice($cn);
$old = '';
$fiche = new Fiche($cn, $_GET['f_id']);
$year = $g_user->get_exercice();
if ($year == 0) {
    $html = _("erreur aucune période par défaut, allez dans préférence pour en choisir une");
} else {
    $per = new Periode($cn);
    $limit_periode = $per->get_limit($year);
    $array['from_periode'] = $limit_periode[0]->first_day();
    $array['to_periode'] = $limit_periode[1]->last_day();
    if (isset($_GET['ex'])) {
        $limit_periode = $per->get_limit($_GET['ex']);
        $array['from_periode'] = $limit_periode[0]->first_day();
    }
    /*