Add a quickcode for contact
This commit is contained in:
parent
4473470052
commit
f3b7b106e8
3 changed files with 30 additions and 8 deletions
|
|
@ -470,6 +470,11 @@ if ( DEBUG=='false' ) ob_start();
|
|||
if ( GetVersion($db) == 16 ) {
|
||||
ExecuteScript($db,'sql/patch/upgrade16.sql');
|
||||
} // version
|
||||
if ( GetVersion($db) == 17 ) {
|
||||
ExecuteScript($db,'sql/patch/upgrade17.sql');
|
||||
$max=getDbValue($db,'select last_value from s_jnt_fic_att_value');
|
||||
AlterSequence($db,'s_jnt_fic_att_value',$max+1);
|
||||
} // version
|
||||
|
||||
if ( DEBUG == 'false') ob_end_clean();
|
||||
}//for
|
||||
|
|
@ -553,6 +558,11 @@ if (DEBUG == 'false' ) ob_start();
|
|||
if ( GetVersion($db) == 16 ) {
|
||||
ExecuteScript($db,'sql/patch/upgrade16.sql');
|
||||
} // version
|
||||
if ( GetVersion($db) == 17 ) {
|
||||
ExecuteScript($db,'sql/patch/upgrade17.sql');
|
||||
$max=getDbValue($db,'select last_value from s_jnt_fic_att_value');
|
||||
AlterSequence($db,'s_jnt_fic_att_value',$max+1);
|
||||
} // version
|
||||
|
||||
if ( DEBUG == 'false') ob_end_clean();
|
||||
}
|
||||
|
|
|
|||
14
html/admin/sql/patch/upgrade17.sql
Normal file
14
html/admin/sql/patch/upgrade17.sql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
begin;
|
||||
-- add quick code for contact
|
||||
insert into attr_min (frd_id,ad_id) values (16,23);
|
||||
|
||||
|
||||
|
||||
insert into jnt_fic_attr select fd_id,23 from fiche_Def where frd_id=16;
|
||||
insert into jnt_fic_att_value(jft_id,f_id,ad_id) select nextval('s_jnt_fic_att_value')+200,f_id,23 from fiche
|
||||
where fd_id in (select fd_id from fiche_Def where frd_id=16);
|
||||
insert into attr_value select jft_id,'FID'||f_id from jnt_fic_att_value join fiche using(f_id) where ad_id=23 and
|
||||
fd_id in (select fd_id from fiche_Def where frd_id=16);
|
||||
|
||||
update version set val=18;
|
||||
commit;
|
||||
|
|
@ -430,12 +430,10 @@ function ViewFiche($p_cn,$p_type) {
|
|||
|
||||
// Get all name the cards of the select category
|
||||
// 1 for attr_def.ad_id is always the name
|
||||
$Res=ExecSql($p_cn,"select f_id,av_text,j_qcode from
|
||||
fiche join jnt_fic_att_value using (f_id)
|
||||
join attr_value using (jft_id)
|
||||
left outer join vw_poste_qcode using(f_id)
|
||||
where fd_id='".$p_type.
|
||||
"' and ad_id=".ATTR_DEF_NAME." order by f_id $sql_offset $sql_limit ");
|
||||
$Res=ExecSql($p_cn,"select f_id,vw_name,quick_code from ".
|
||||
" vw_fiche_attr ".
|
||||
" where fd_id='".$p_type.
|
||||
"' order by f_id $sql_offset $sql_limit ");
|
||||
$Max=pg_NumRows($Res);
|
||||
echo $bar;
|
||||
|
||||
|
|
@ -447,12 +445,12 @@ function ViewFiche($p_cn,$p_type) {
|
|||
else
|
||||
echo '<TR class="even">';
|
||||
|
||||
$span_mod='<TD><A href="fiche.php?action=detail&fiche_id='.$l_line['f_id'].'">'.$l_line['j_qcode'].'</A></TD>';
|
||||
$span_mod='<TD><A href="fiche.php?action=detail&fiche_id='.$l_line['f_id'].'">'.$l_line['quick_code'].'</A></TD>';
|
||||
$span_del='<TD>'.
|
||||
'<A href="fiche.php?f_fd_id='.$p_type.'&action=delete&fiche_id='.$l_line['f_id'].
|
||||
'"> delete</A></td>';
|
||||
|
||||
echo $span_del.$span_mod.'<TD>'.$l_line['av_text']."</TD>";
|
||||
echo $span_del.$span_mod.'<TD>'.$l_line['vw_name']."</TD>";
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue