[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r5424 - in phpcompta/trunk: . include include/template s
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r5424 - in phpcompta/trunk: . include include/template sql |
Date: |
Thu, 26 Sep 2013 20:44:12 +0200 (CEST) |
Author: danydb
Date: 2013-09-26 20:44:12 +0200 (Thu, 26 Sep 2013)
New Revision: 5424
Modified:
phpcompta/trunk/include/cfgtags.inc.php
phpcompta/trunk/include/class_tag.php
phpcompta/trunk/include/template/action_search.php
phpcompta/trunk/include/template/tag_choose.php
phpcompta/trunk/include/template/tag_detail.php
phpcompta/trunk/include/template/tag_select.php
phpcompta/trunk/release-note
phpcompta/trunk/sql/upgrade.sql
Log:
Si aucun quickcode donn?\195?\169, un calcul?\195?\169 un en se basant sur le
nom de la fiche
Modified: phpcompta/trunk/include/cfgtags.inc.php
===================================================================
--- phpcompta/trunk/include/cfgtags.inc.php 2013-09-26 17:56:20 UTC (rev
5423)
+++ phpcompta/trunk/include/cfgtags.inc.php 2013-09-26 18:44:12 UTC (rev
5424)
@@ -49,9 +49,9 @@
?>
<div style="margin-left:10%;width:80%">
<p class="notice">
- Vous pouvez utiliser ceci comme des tags pour marquer des documents
ou
+ Vous pouvez utiliser ceci comme des étiquettes pour marquer des
documents ou
comme des dossiers pour rassembler des documents. Un document peut
appartenir
- à plusieurs dossiers ou avoir plusieurs tags.
+ à plusieurs dossiers ou avoir plusieurs étiquettes.
</p>
<?php
$tag->show_list();
Modified: phpcompta/trunk/include/class_tag.php
===================================================================
--- phpcompta/trunk/include/class_tag.php 2013-09-26 17:56:20 UTC (rev
5423)
+++ phpcompta/trunk/include/class_tag.php 2013-09-26 18:44:12 UTC (rev
5424)
@@ -66,8 +66,8 @@
{
if ( trim($p_array['t_tag'])=="" ) return ;
$this->data->t_id=$p_array['t_id'];
-
$this->data->t_tag=str_ireplace('<script>','<_script_>',$p_array['t_tag']);
-
$this->data->t_description=str_ireplace('<script>','<_script_>',$p_array['t_description']);
+ $this->data->t_tag= strip_tags($p_array['t_tag']);
+ $this->data->t_description=strip_tags($p_array['t_description']);
$this->data->save();
}
function remove($p_array)
@@ -82,7 +82,7 @@
function choose()
{
$r="";
- $r.=HtmlInput::button("choose_tag", "Tag",
'onclick="choose_tag('.Dossier::id().')"', "smallbutton");
+ $r.=HtmlInput::button("choose_tag", "Etiquette",
'onclick="choose_tag('.Dossier::id().')"', "smallbutton");
return $r;
}
/**
Modified: phpcompta/trunk/include/template/action_search.php
===================================================================
--- phpcompta/trunk/include/template/action_search.php 2013-09-26 17:56:20 UTC
(rev 5423)
+++ phpcompta/trunk/include/template/action_search.php 2013-09-26 18:44:12 UTC
(rev 5424)
@@ -64,7 +64,7 @@
<td><?php echo $closed_action->input();?></td>
</tr>
<tr>
- <td style="width:180px;text-align:right"> Tag</td>
+ <td style="width:180px;text-align:right"><?php echo
_('Etiquette'); ?></td>
<td id="tag_choose_td">
<?php echo $tag->choose(); ?>
</td>
Modified: phpcompta/trunk/include/template/tag_choose.php
===================================================================
--- phpcompta/trunk/include/template/tag_choose.php 2013-09-26 17:56:20 UTC
(rev 5423)
+++ phpcompta/trunk/include/template/tag_choose.php 2013-09-26 18:44:12 UTC
(rev 5424)
@@ -1,8 +1,8 @@
<?php
-echo HtmlInput::title_box('Tag', 'tag_div');
+echo HtmlInput::title_box('Etiquette', 'tag_div');
$max=$this->cn->count($ret);
if ( $max == 0 ) {
- echo h2("Aucun tag disponible",' class="notice"');
+ echo h2("Aucune étiquette disponible",' class="notice"');
return;
}
?>
@@ -40,5 +40,5 @@
</table>
<?php
$js=sprintf("onclick=\"show_tag('%s','%s','%s','j')\"",Dossier::id(),"none",'-1');
- echo HtmlInput::button("tag_add", "Ajout d'un tag", $js);
+ echo HtmlInput::button("tag_add", "Ajout d'une étiquette", $js);
?>
\ No newline at end of file
Modified: phpcompta/trunk/include/template/tag_detail.php
===================================================================
--- phpcompta/trunk/include/template/tag_detail.php 2013-09-26 17:56:20 UTC
(rev 5423)
+++ phpcompta/trunk/include/template/tag_detail.php 2013-09-26 18:44:12 UTC
(rev 5424)
@@ -9,7 +9,7 @@
$t_description->style=' class="itextarea"
style="width:50em;height:5em;vertical-align: top;"';
?>
<p>
- Nom de Dossier (tag) : <?php echo $t_tag->input(); ?>
+ Etiquette (tag) : <?php echo $t_tag->input(); ?>
</p>
<p>
Description (tag) : <?php echo $t_description->input(); ?>
Modified: phpcompta/trunk/include/template/tag_select.php
===================================================================
--- phpcompta/trunk/include/template/tag_select.php 2013-09-26 17:56:20 UTC
(rev 5423)
+++ phpcompta/trunk/include/template/tag_select.php 2013-09-26 18:44:12 UTC
(rev 5424)
@@ -2,7 +2,7 @@
echo HtmlInput::title_box('Tag', 'tag_div');
$max=$this->cn->count($ret);
if ( $max == 0 ) {
- echo h2("Aucun tag disponible",' class="notice"');
+ echo h2("Aucune étiquette disponible",' class="notice"');
return;
}
?>
Modified: phpcompta/trunk/release-note
===================================================================
--- phpcompta/trunk/release-note 2013-09-26 17:56:20 UTC (rev 5423)
+++ phpcompta/trunk/release-note 2013-09-26 18:44:12 UTC (rev 5424)
@@ -43,7 +43,11 @@
Pour VEN indiquer Client (C) et Services ou Marchandises vendus
Pour FIN indiquer Compte tiers (D/C) et surtout permettre de créer un fiche de
type trésorerie (frd_id=4)
-Ajout de journaux dans jrn_type
+Fiche
+=====
+Si aucun quickcode donné, un calculé un en se basant sur le nom de la fiche
(5ière lettre) + n° si duplicate
+code php
+fiche_def.inc.php
===================================================================
|| A faire
@@ -58,13 +62,12 @@
Par journal
ou par profil
+Stock
+=====
+Inventaire annuel
-Fiche
-=====
-Si aucun quickcode donné, un calculé un en se basant sur le nom de la fiche
(5ière lettre) + n° si duplicate
-code php
-fiche_def.inc.php
+
Modified: phpcompta/trunk/sql/upgrade.sql
===================================================================
--- phpcompta/trunk/sql/upgrade.sql 2013-09-26 17:56:20 UTC (rev 5423)
+++ phpcompta/trunk/sql/upgrade.sql 2013-09-26 18:44:12 UTC (rev 5424)
@@ -196,3 +196,75 @@
update jrn_def set jrn_def_name='Trésorerie' where jrn_def_id=1;
update jrn_type set jrn_desc = 'Trésorerie' where jrn_type_id='FIN';
+CREATE OR REPLACE FUNCTION comptaproc.insert_quick_code(nf_id integer,
tav_text text)
+ RETURNS integer AS
+$BODY$
+ declare
+ ns integer;
+ nExist integer;
+ tText text;
+ tBase text;
+ tName text;
+ nCount Integer;
+ nDuplicate Integer;
+ begin
+ raise info 'Value %',tText;
+ tText := lower(trim(tav_text));
+ raise info 'Value %',tText;
+ tText := replace(tText,' ','');
+ raise info 'Value %',tText;
+ tText := translate(tText,E' $€µ£%.+-/\\!(){}(),;_&|"#''^<>*','');
+ raise info 'Value %',tText;
+ tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
+ raise info 'Value %',tText;
+ nDuplicate := 0;
+ raise info 'Value %',tText;
+ tBase := tText;
+ loop
+ raise info 'Value % duplicate %',tText,nDuplicate;
+ -- take the next sequence
+ select nextval('s_jnt_fic_att_value') into ns;
+ if length (tText) = 0 or tText is null then
+ select count(*) into nCount from fiche_detail where
f_id=nf_id and ad_id=1;
+ if nCount = 0 then
+ tText := 'FICHE'||ns::text;
+ else
+ select ad_value into tName from fiche_detail
where f_id=nf_id and ad_id=1;
+
+ tName := lower(trim(tName));
+ tName := substr(tName,1,6);
+ tName := replace(tName,' ','');
+ tName := translate(tName,E'
$€µ£%.+-/\\!(){}(),;_&|"#''^<>*','');
+ tName :=
translate(tName,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
+ tBase := tName;
+ if nDuplicate = 0 then
+ tText := tName;
+ else
+ tText := tName||nDuplicate::text;
+ end if;
+ end if;
+ end if;
+ -- av_text already used ?
+ select count(*) into nExist
+ from fiche_detail
+ where
+ ad_id=23 and ad_value=upper(tText);
+
+ if nExist = 0 then
+ exit;
+ end if;
+ nDuplicate := nDuplicate + 1 ;
+ tText := tBase || nDuplicate::text;
+
+ if nDuplicate > 9999 then
+ raise Exception 'too many duplicate % duplicate#
%',tText,nDuplicate;
+ end if;
+ end loop;
+
+
+ insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values
(ns,nf_id,23,upper(tText));
+ return ns;
+ end;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+
---
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] r5424 - in phpcompta/trunk: . include include/template sql,
phpcompta-dev <=