[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4914 - in phpcompta/trunk: include include/template sql
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4914 - in phpcompta/trunk: include include/template sql |
Date: |
Sat, 16 Jun 2012 20:19:00 +0200 (CEST) |
Author: danydb
Date: 2012-06-16 20:19:00 +0200 (Sat, 16 Jun 2012)
New Revision: 4914
Modified:
phpcompta/trunk/include/class_fiche.php
phpcompta/trunk/include/class_fiche_def.php
phpcompta/trunk/include/fiche.inc.php
phpcompta/trunk/include/template/stock_histo.php
phpcompta/trunk/include/user_common.php
phpcompta/trunk/sql/upgrade.sql
Log:
Mise ?\195?\160 jour script migration_stock
Correct erreur dans fiche.inc.php
Enl?\195?\168ve traitement lors sauvegarde pour ATTR_DEF_STOCK
Ajout lien d?\195?\169tail vers fiche stock dans historique
Modified: phpcompta/trunk/include/class_fiche.php
===================================================================
--- phpcompta/trunk/include/class_fiche.php 2012-06-16 17:36:55 UTC (rev
4913)
+++ phpcompta/trunk/include/class_fiche.php 2012-06-16 18:19:00 UTC (rev
4914)
@@ -539,7 +539,7 @@
$w->label = $attr->ad_text;
$w->name = "av_text" . $attr->ad_id;
- $r.="<TR>" . td($w->label, ' class="input_text" ') .
td($w->input()) . td("$msg")." </TR>";
+ $r.="<TR>" . td($w->label, ' class="input_text" ') .
td($w->input()." $msg")." </TR>";
}
$r.= '</table>';
return $r;
@@ -926,33 +926,6 @@
}
- if ( $id == ATTR_DEF_STOCK )
- {
- $st=$this->cn->count_sql('select * from stock_goods where
'.
- " f_id=".$this->id);
- if ( $st == 0 )
- {
- $exercice=$g_user->get_exercice();
- if ( $exercice == 0 ) throw new Exception ('Annee
invalide erreur');
-
- $str_stock=sprintf('insert into
stock_goods(f_id,sg_quantity,sg_comment,sg_code,sg_type,sg_exercice) '.
- ' values
(%d,0,\'%s\',upper(\'%s\'),\'d\',\'%s\')',
- $this->id,
- 'initial',
- sql_string($value),
- $exercice);
-
- $this->cn->exec_sql($str_stock);
- }
- else
- {
- $str_stock=sprintf("update stock_goods set
sg_code=upper('%s') where f_id=%d",
- sql_string($value),
- $this->id);
- $this->cn->exec_sql($str_stock);
- }
- }
-
// account
if ($id == ATTR_DEF_ACCOUNT)
{
Modified: phpcompta/trunk/include/class_fiche_def.php
===================================================================
--- phpcompta/trunk/include/class_fiche_def.php 2012-06-16 17:36:55 UTC (rev
4913)
+++ phpcompta/trunk/include/class_fiche_def.php 2012-06-16 18:19:00 UTC (rev
4914)
@@ -402,7 +402,7 @@
$span_mod='<TD><A href="?p_action=fiche&'.$str_dossier.
'&action=detail&fiche_id='.$l_line['f_id'].$str.'&fiche='.
-
$_GET['fiche'].'&ac='.$_REQUEST['ac'].'">'.$l_line['quick_code']
+
$_REQUEST['fiche'].'&ac='.$_REQUEST['ac'].'">'.$l_line['quick_code']
.'</A></TD>';
echo $span_mod.'<TD>'.h($l_line['vw_name'])."</TD>";
Modified: phpcompta/trunk/include/fiche.inc.php
===================================================================
--- phpcompta/trunk/include/fiche.inc.php 2012-06-16 17:36:55 UTC (rev
4913)
+++ phpcompta/trunk/include/fiche.inc.php 2012-06-16 18:19:00 UTC (rev
4914)
@@ -304,7 +304,7 @@
if ( $write != 0 )
{
$iselect=new ISelect('move_to');
- $iselect->value=$cn->make_array('select fd_id,fd_label from
fiche_def '); //where frd_id='.$fiche->get_fiche_def_ref_id());
+ $iselect->value=$cn->make_array('select fd_id,fd_label from
fiche_def order by fd_label'); //where frd_id='.$fiche->get_fiche_def_ref_id());
echo HtmlInput::submit("update_fiche","Mise à jour");
echo HtmlInput::submit("delete" ,"Effacer cette
fiche","onclick=\"return confirm('"._('Vous confirmez ?')."');\"");
@@ -401,15 +401,14 @@
$fiche_def=new Fiche_Def($cn,$_POST['fiche']);
$fiche_def->Get();
echo '<h2 class="info">'.$fiche_def->label.'</h2>';
- $url=$_SERVER['REQUEST_URI'];
$fiche=new Fiche($cn,0);
-
- echo '<form method="post"
action="'.$url.'&fiche='.$_POST['fiche'].'">';
+ var_dump($_SERVER);
+ echo '<form method="post" >';
echo dossier::hidden();
- echo HtmlInput::hidden('ac',$_REQUEST['ac']);
+ echo HtmlInput::hidden('ac',$_REQUEST['ac']);
+ echo HtmlInput::hidden('fiche',$_POST['fiche']);
echo $fiche->blank($_POST['fiche']);
echo HtmlInput::submit("add_fiche","Ajout");
- echo
HtmlInput::button_anchor(_('Annuler'),$url.'&fiche='.$_POST['fiche'].'&'.$str_dossier);
echo '</form>';
@@ -454,7 +453,7 @@
echo '<DIV class="redcontent" style="width:auto">';
$fiche=new Fiche($cn);
$fiche->Save($_REQUEST['fiche']);
- $fiche_def=new Fiche_Def($cn,$_GET['fiche']);
+ $fiche_def=new Fiche_Def($cn,$_REQUEST['fiche']);
$fiche_def->myList();
Modified: phpcompta/trunk/include/template/stock_histo.php
===================================================================
--- phpcompta/trunk/include/template/stock_histo.php 2012-06-16 17:36:55 UTC
(rev 4913)
+++ phpcompta/trunk/include/template/stock_histo.php 2012-06-16 18:19:00 UTC
(rev 4914)
@@ -53,13 +53,13 @@
<?=$row['cdate']?>
</td>
<td>
- <?=$row['sg_code']?>
+ <?=HtmlInput::card_detail($row['sg_code'],"",'
class="line" ')?>
</td>
<td>
<?=$row['r_name']?>
</td>
<td>
- <?=HtmlInput::card_detail($row['qcode'],$row['fname'])?>
+ <?=HtmlInput::card_detail($row['qcode'],$row['fname'],'
class="line" ')?>
</td>
<td>
<?=HtmlInput::detail_op($row['jr_id'],$row['jr_internal'])?>
Modified: phpcompta/trunk/include/user_common.php
===================================================================
--- phpcompta/trunk/include/user_common.php 2012-06-16 17:36:55 UTC (rev
4913)
+++ phpcompta/trunk/include/user_common.php 2012-06-16 18:19:00 UTC (rev
4914)
@@ -51,6 +51,9 @@
*/
function InsertStockGoods($p_cn, $p_j_id, $p_good, $p_quant, $p_type,$p_depot)
{
+ /**
+ address@hidden function insertStockGoods doit être déplacée dans
class_stock
+ */
global $g_user;
if ( $g_user->can_write_repo($p_depot) == false )
return false;
Modified: phpcompta/trunk/sql/upgrade.sql
===================================================================
--- phpcompta/trunk/sql/upgrade.sql 2012-06-16 17:36:55 UTC (rev 4913)
+++ phpcompta/trunk/sql/upgrade.sql 2012-06-16 18:19:00 UTC (rev 4914)
@@ -308,6 +308,7 @@
insert into fiche_detail (f_id,ad_id,ad_value) values
(n_fid,9,'Code stock '||rt_row);
insert into fiche_detail (f_id,ad_id,ad_value) values
(n_fid,23,'STOCK'||n_fid::text);
update fiche_detail set ad_value='STOCK'||n_fid::text where
ad_id=19 and ad_value=rt_row;
+ update stock_goods set sg_code='STOCK'||n_fid::text where
sg_code=rt_row;
end loop;
end;
@@ -315,4 +316,8 @@
select migrate_stock();
+select migrate_stock();
+
drop function migrate_stock();
+
+update attr_def set ad_type='card', ad_extra='[sql] fd_id = 500000 ' where
ad_id=19;
\ No newline at end of file
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4914 - in phpcompta/trunk: include include/template sql,
phpcompta-dev <=