noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 75/119: Fix : by default new contact options


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 75/119: Fix : by default new contact options were not added to document_type
Date: Mon, 26 Oct 2020 18:27:27 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit fb60db4018aebfbeb4413665b5445c8dc8aae4bb
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sun Oct 11 10:24:31 2020 +0200

    Fix : by default new contact options were not added to document_type
---
 include/class/action_document_type_mtable.class.php | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/class/action_document_type_mtable.class.php 
b/include/class/action_document_type_mtable.class.php
index 03a7d2d..f02f56d 100644
--- a/include/class/action_document_type_mtable.class.php
+++ b/include/class/action_document_type_mtable.class.php
@@ -168,6 +168,18 @@ class Action_Document_Type_MTable extends Manage_Table_SQL
         // Detail option contact
         $table=$this->get_table();
         $cn=$table->cn;
+        // insert new contact options
+        $cn->exec_sql("insert into   jnt_document_option_contact 
(jdoc_enable,document_type_id,
+                                contact_option_ref_id) 
+                         select 0 , $1, cor_id 
+                         from contact_option_ref 
+                        where
+                        cor_id not in (select cor_id from 
+                                        jnt_document_option_contact a 
+                                        where 
a.document_type_id=$1)",[$table->dt_id]);
+        
+        // Select all
+        
         $aOption=$cn->get_array("select 
cor_id,cor_label,cor_type,document_type_id ,coalesce(jdoc_enable,0) jdoc_enable
                 from 
                 contact_option_ref cor  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]