[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4254 - phpcompta/trunk/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4254 - phpcompta/trunk/include |
Date: |
Fri, 28 Oct 2011 23:47:34 +0200 (CEST) |
Author: danydb
Date: 2011-10-28 23:47:32 +0200 (Fri, 28 Oct 2011)
New Revision: 4254
Modified:
phpcompta/trunk/include/class_acc_bilan.php
phpcompta/trunk/include/company.inc.php
phpcompta/trunk/include/compta_fin.inc.php
phpcompta/trunk/include/impress_bilan.inc.php
phpcompta/trunk/include/param_pcmn.inc.php
phpcompta/trunk/include/stock_inc.php
phpcompta/trunk/include/suivi_supplier.inc.php
Log:
integration menu dynamique
Modified: phpcompta/trunk/include/class_acc_bilan.php
===================================================================
--- phpcompta/trunk/include/class_acc_bilan.php 2011-10-28 21:33:16 UTC (rev
4253)
+++ phpcompta/trunk/include/class_acc_bilan.php 2011-10-28 21:47:32 UTC (rev
4254)
@@ -273,7 +273,7 @@
$form=fopen($this->b_file_form,'r');
if ( $form == false)
{
- echo __FILE__.":".__LINE__.'Cannot Open'.$this->b_file_form;
+ echo 'Cannot Open';
exit();
}
return $form;
@@ -285,7 +285,7 @@
$templ=fopen($this->b_file_template,'r');
if ( $templ == false)
{
- echo __FILE__.":".__LINE__.'Cannot Open'.$this->b_file_template;
+ echo 'Cannot Open';
exit();
}
return $templ;
@@ -296,8 +296,8 @@
* \param $p_handle the handle to the file
* \param
* \param
+ *
*
- *
* \return
*/
function compute_formula($p_handle)
@@ -305,8 +305,10 @@
while (! feof ($p_handle))
{
$buffer=trim(fgets($p_handle));
-
- if (strlen(trim($buffer))==0)
+ // $a=(CheckFormula($buffer) == true)?"$buffer ok<br>":'<font
color="red">'.'Pas ok '.$buffer."</font><br>";
+ // echo $a;
+ // blank line are skipped
+ if (strlen(trim($buffer))==0)
continue;
// skip comment
if ( strpos($buffer,'#') === true )
@@ -322,9 +324,9 @@
}// end read form line per line
}
/*!\brief generate the ods document
- * \param the handle to the template file
- * \return the xml
- address@hidden
+ * \param the handle to the template file
+ * \return the xml
+ address@hidden
* Sur une seule ligne il y a plusieurs données, donc il y a plusieurs
boucles, pour les autres documents
* cela devrait être fait aussi, actuellement ces documents, n'acceptent
qu'une formule par ligne.
address@hidden
@@ -350,13 +352,13 @@
ob_start();
/* unzip the document */
$zip = new Zip_Extended;
- if ($zip->open($work_file) === TRUE)
+ if ($zip->open($work_file) === TRUE)
{
$zip->extractTo($dirname.DIRECTORY_SEPARATOR);
$zip->close();
- } else
+ } else
{
- echo __FILE__.":".__LINE__."cannot unzip model ".$filename;
+ echo __FILE__.":".__LINE__."cannot unzip model ".$filename;
}
ob_end_clean();
@@ -389,7 +391,7 @@
// the line contains the magic <<
$tmp="";
-
+
while (preg_match_all($regex,$line_rtf,$f2) > 0 )
{
// the f2 array contains all the magic << in the line
@@ -604,13 +606,13 @@
case 'ods':
/* header("Pragma: public");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
- header("Cache-Control: must-revalidate");
+ header("Cache-Control: must-revalidate");
if ( $this->b_type == 'odt' )
header('Content-type: application/vnd.oasis.opendocument.text');
if ( $this->b_type == 'ods' )
header('Content-type:
application/vnd.oasis.opendocument.spreadsheet');
header('Content-Disposition:
attachment;filename="'.$this->b_name.'.odt"',FALSE);
- header("Accept-Ranges: bytes");
+ header("Accept-Ranges: bytes");
*/
ob_start();
// save the file in a temp folder
@@ -634,14 +636,14 @@
*/
ob_start();
$zip = new Zip_Extended;
- if ($zip->open($work_file) === TRUE)
+ if ($zip->open($work_file) === TRUE)
{
$zip->extractTo($dirname.DIRECTORY_SEPARATOR);
$zip->close();
- }
- else
+ }
+ else
{
- echo __FILE__.":".__LINE__."cannot unzip model ".$filename;
+ echo __FILE__.":".__LINE__."cannot unzip model ".$filename;
}
// Remove the file we do not need anymore
Modified: phpcompta/trunk/include/company.inc.php
===================================================================
--- phpcompta/trunk/include/company.inc.php 2011-10-28 21:33:16 UTC (rev
4253)
+++ phpcompta/trunk/include/company.inc.php 2011-10-28 21:47:32 UTC (rev
4254)
@@ -22,6 +22,8 @@
if ( $g_user->check_action(PARSTR)!=0) $m->MY_STRICT=$p_strict;
if ( $g_user->check_action(PARTVA)!=0)$m->MY_TVA_USE=$p_tva_use;
$m->MY_PJ_SUGGEST=$p_pj;
+ $m->MY_ALPHANUM=$p_alphanum;
+
$m->Update();
}
@@ -37,6 +39,9 @@
array('value'=>'Y','label'=>_('Oui'))
);
+ $alpha_num_array[0]=array('value'=>'N','label'=>_('Non'));
+ $alpha_num_array[1]=array('value'=>'Y','label'=>_('Oui'));
+
$compta=new ISelect();
$compta->table=1;
$compta->selected=$my->MY_ANALYTIC;
@@ -60,7 +65,12 @@
$check_periode=new ISelect();
$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;
+
// other parameters
$all=new IText();
$all->table=1;
@@ -93,6 +103,8 @@
echo "<tr>".td(_("Suggérer le numéro de pièce
justificative"),'style="text-align:right"').$pj_suggest->input("p_pj",$strict_array)."</tr>";
echo "<tr>".td(_("Suggérer la
date"),'style="text-align:right"').$date_suggest->input("p_date_suggest",$strict_array)."</tr>";
echo '<tr>'.td(_('Afficher la période comptable pour éviter les erreurs de
date'),'style="text-align:right"').$check_periode->input('p_check_periode',$strict_array).'</tr>';
+ echo '<tr>'.td(_('Utilisez des postes comptables
alphanumérique'),'style="text-align:right"').$alpha_num->input('p_alphanum').'</tr>';
+
echo "</table>";
echo HtmlInput::submit("record_company",_("Sauve"));
echo "</form>";
Modified: phpcompta/trunk/include/compta_fin.inc.php
===================================================================
--- phpcompta/trunk/include/compta_fin.inc.php 2011-10-28 21:33:16 UTC (rev
4253)
+++ phpcompta/trunk/include/compta_fin.inc.php 2011-10-28 21:47:32 UTC (rev
4254)
@@ -25,6 +25,7 @@
*/
require_once ('class_acc_ledger_fin.php');
require_once('class_ipopup.php');
+global $g_user;
$gDossier=dossier::id();
@@ -76,7 +77,7 @@
$def_ledger=$Ledger->get_first('fin');
$Ledger->id=$def_ledger['jrn_def_id'];
}
- $jrn_priv=$User->get_ledger_access($Ledger->id);
+ $jrn_priv=$g_user->get_ledger_access($Ledger->id);
// Check privilege
if ( isset($_REQUEST['p_jrn']) && ( $jrn_priv == 'X'))
{
@@ -187,7 +188,7 @@
/* by default we should the default period */
if ( ! isset($p_array['date_start']))
{
- $period=$User->get_periode();
+ $period=$g_user->get_periode();
$per=new Periode($cn,$period);
list($date_start,$date_end)=$per->get_date_limit();
$p_array['date_start']=$date_start;
@@ -246,7 +247,7 @@
.th('différence',' style="text-align:right"'));
// Filter the saldo
// on the current year
- $filter_year=" j_tech_per in (select p_id from parm_periode where
p_exercice='".$User->get_exercice()."')";
+ $filter_year=" j_tech_per in (select p_id from parm_periode where
p_exercice='".$g_user->get_exercice()."')";
// for highligting tje line
$idx=0;
bcscale(2);
@@ -265,7 +266,7 @@
$saldo_not_reconcilied=$array[$i]->get_bk_balance($filter_year."
and (trim(jr_pj_number) ='' or jr_pj_number is null)" );
/* get saldo for reconcilied operation */
-
+
$saldo_reconcilied=$array[$i]->get_bk_balance($filter_year." and (
trim(jr_pj_number) != '' and jr_pj_number is not null)" );
if ( $idx%2 != 0 )
@@ -314,7 +315,7 @@
}
else
$Ledger->id=$_REQUEST['p_jrn'];
- $jrn_priv=$User->get_ledger_access($Ledger->id);
+ $jrn_priv=$g_user->get_ledger_access($Ledger->id);
if ( isset($_GET["p_jrn"]) && $jrn_priv=="X")
{
NoAccess();
@@ -351,7 +352,7 @@
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');
-
+
$wLedger->javascript="onchange='this.form.submit()';";
echo $wLedger->input();
echo HtmlInput::submit('ref','Rafraîchir');
@@ -410,7 +411,7 @@
echo '</table>';
$bk_card=new Fiche($cn);
$bk_card->id=$Ledger->get_bank();
- $filter_year=" j_tech_per in (select p_id from parm_periode where
p_exercice='".$User->get_exercice()."')";
+ $filter_year=" j_tech_per in (select p_id from parm_periode where
p_exercice='".$g_user->get_exercice()."')";
/* get saldo for not reconcilied operations */
$saldo_not_reconcilied=$bk_card->get_solde_detail($filter_year." and
j_grpt in (select jr_grpt_id from jrn where trim(jr_pj_number) ='' or
jr_pj_number is null)" );
Modified: phpcompta/trunk/include/impress_bilan.inc.php
===================================================================
--- phpcompta/trunk/include/impress_bilan.inc.php 2011-10-28 21:33:16 UTC
(rev 4253)
+++ phpcompta/trunk/include/impress_bilan.inc.php 2011-10-28 21:47:32 UTC
(rev 4254)
@@ -32,9 +32,7 @@
// Show the jrn and date
//-----------------------------------------------------
require_once('class_database.php');
-
global $g_user;
-
//-----------------------------------------------------
// Form
//-----------------------------------------------------
@@ -54,18 +52,17 @@
$wex=$ex->select('exercice',$exercice,' onchange="submit(this)"');
echo $wex->input();
echo dossier::hidden();
-echo HtmlInput::get_to_hidden(array('p_action','type'));
+echo HtmlInput::get_to_hidden(array('ac','type'));
echo '</form>';
echo '</fieldset>';
$filter_year=" where p_exercice='".FormatString($exercice)."'";
echo '<FORM METHOD="GET">';
-echo HtmlInput::hidden('p_action','impress');
echo HtmlInput::hidden('type','bilan');
echo dossier::hidden();
echo $bilan->display_form ($filter_year);
echo HtmlInput::submit('verif',_('Verification comptabilite'));
-echo HtmlInput::get_to_hidden(array('exercice'));
+echo HtmlInput::get_to_hidden(array('ac','exercice'));
echo '</FORM>';
Modified: phpcompta/trunk/include/param_pcmn.inc.php
===================================================================
--- phpcompta/trunk/include/param_pcmn.inc.php 2011-10-28 21:33:16 UTC (rev
4253)
+++ phpcompta/trunk/include/param_pcmn.inc.php 2011-10-28 21:47:32 UTC (rev
4254)
@@ -196,8 +196,8 @@
if ( isset ( $p_val) && isset ( $p_lib ) )
{
- $p_val=$cn->get_value('select format_account($1)',array($p_val));
- $p_parent=$cn->get_value('select
format_account($1)',array($_POST["p_parent"]));
+ $p_val=trim($p_val);
+ $p_parent=$_POST["p_parent"];
if ( strlen ($p_val) != 0 && strlen ($p_lib) != 0 )
{
if (strlen ($p_val) == 1 )
Modified: phpcompta/trunk/include/stock_inc.php
===================================================================
--- phpcompta/trunk/include/stock_inc.php 2011-10-28 21:33:16 UTC (rev
4253)
+++ phpcompta/trunk/include/stock_inc.php 2011-10-28 21:47:32 UTC (rev
4254)
@@ -25,9 +25,9 @@
/*!
**************************************************
- * \brief show the listing of all goods
- *
+ * \brief show the listing of all goods
*
+ *
*\param $cn database connection
* \param $p_year exercice
* -
@@ -38,7 +38,7 @@
// build sql -- get the different merchandise sold or bought
// during the p_year
/* $sql=" select distinct sg_code
- from stock_goods
+ from stock_goods
left outer join jrnx on (stock_goods.j_id=jrnx.j_id)
right outer join parm_periode on (parm_periode.p_id=jrnx.j_tech_per)
where
@@ -75,7 +75,7 @@
// sg_code and link to details
$result.="<td>".'<a class="one"
-
HREF="?p_action=stock&action=detail&sg_code='.$r['sg_code'].'&year='.$p_year.
+
HREF="?ac='.$_REQUEST['ac'].'&action=detail&sg_code='.$r['sg_code'].'&year='.$p_year.
'&'.dossier::get().'">'.
$r['sg_code']."</A></td>";
@@ -116,12 +116,12 @@
/*!
************************************************************
* \brief return an array of f_id and f_name
- *
- *
+ *
+ *
* \param $p_cn database connection
* \param _sg_code stock_goods.sg_code
* \return
- * - array (f_id, f_label) or null if nothing is found
+ * - array (f_id, f_label) or null if nothing is found
*/
function getFicheNameCode ($p_cn,$p_sg_code)
{
@@ -153,9 +153,9 @@
}
/*!
**************************************************
- * \brief View the details of a stock
- *
- *
+ * \brief View the details of a stock
+ *
+ *
*\param $p_cn database connection
* \param$p_sg_code
* \param $p_year
@@ -315,9 +315,9 @@
}
/*!
**************************************************
- * \brief
- *
- * parm :
+ * \brief
+ *
+ * parm :
* -
* gen :
* -
@@ -344,7 +344,7 @@
}
/*!
- * \brief return the quantity of a sg_code for the period
+ * \brief return the quantity of a sg_code for the period
*
* \return number or NULL
*/
Modified: phpcompta/trunk/include/suivi_supplier.inc.php
===================================================================
--- phpcompta/trunk/include/suivi_supplier.inc.php 2011-10-28 21:33:16 UTC
(rev 4253)
+++ phpcompta/trunk/include/suivi_supplier.inc.php 2011-10-28 21:47:32 UTC
(rev 4254)
@@ -22,11 +22,10 @@
/*!\file
* \brief this file is used for the follow up of the customer (mail,
meeting...)
- * - p_action = supplier
- * - sb = detail
+ * - sb = detail
* - sc = sv
* - sd = this parameter is used here
- * - $cn = database connection
+ * - $cn = database connection
*/
require_once('class_action.php');
$g_user->can_request(GECOUR);
@@ -38,7 +37,8 @@
*/
$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list";
$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0;
-$base="ac=".$_REQUEST['ac']."&sc=sv&sb=detail&f_id=".$_REQUEST['f_id'];
+$p_action=$_REQUEST['ac'];
+$base="ac=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id'];
$retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base);
$fiche=new Fiche($cn,$_REQUEST['f_id']);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4254 - phpcompta/trunk/include,
phpcompta-dev <=