diff --git a/html/admin/sql/dossier1/schema.sql b/html/admin/sql/dossier1/schema.sql
index ddd80971c..d927332b3 100644
--- a/html/admin/sql/dossier1/schema.sql
+++ b/html/admin/sql/dossier1/schema.sql
@@ -135,7 +135,7 @@ CREATE TABLE import_tmp (
detail text,
num_compte text,
poste_comptable text,
- status char(1) default 'w' not null check (status in ('t','d','w')),
+ status varchar(1) default 'n' not null check (status in ('t','d','w','n')),
bq_account integer NOT NULL,
jrn integer NOT NULL
diff --git a/html/admin/sql/mod1/schema.sql b/html/admin/sql/mod1/schema.sql
index 1402eedba..56592ae05 100644
--- a/html/admin/sql/mod1/schema.sql
+++ b/html/admin/sql/mod1/schema.sql
@@ -377,7 +377,7 @@ CREATE TABLE import_tmp (
detail text,
num_compte text,
poste_comptable text,
- status char(1) default 'w' not null check (status in ('t','d','w')),
+ status varchar(1) default 'n' not null check (status in ('n','t','d','w')),
bq_account integer NOT NULL,
jrn integer NOT NULL
diff --git a/html/admin/sql/mod2/schema.sql b/html/admin/sql/mod2/schema.sql
index de0420964..f0a820608 100644
--- a/html/admin/sql/mod2/schema.sql
+++ b/html/admin/sql/mod2/schema.sql
@@ -151,7 +151,7 @@ CREATE TABLE import_tmp (
detail text,
num_compte text,
poste_comptable text,
- status char(1) default 'w' not null check (status in ('t','d','w')),
+ status varchar(1) default 'n' not null check (status in ('n','t','d','w')),
bq_account integer NOT NULL,
jrn integer NOT NULL
);
diff --git a/html/admin/sql/patch/upgrade14.sql b/html/admin/sql/patch/upgrade14.sql
index 979c9ab76..5b899e2ba 100644
--- a/html/admin/sql/patch/upgrade14.sql
+++ b/html/admin/sql/patch/upgrade14.sql
@@ -1,6 +1,6 @@
begin;
alter table import_tmp add column status varchar(1);
-alter table import_tmp alter status set default 'w';
+alter table import_tmp alter status set default 'n';
create or replace function trim_cvs_quote() returns trigger as $trim$
declare
modified import_tmp%ROWTYPE;
@@ -16,10 +16,10 @@ end;
$trim$ language plpgsql;
update import_tmp set status = 't' where ok=true;
-update import_tmp set status = 'w' where ok = false;
-update import_tmp set status = 'w' where ok is null;
+update import_tmp set status = 'n' where ok = false;
+update import_tmp set status = 'n' where ok is null;
-alter table import_tmp add constraint chk_status check (status in ('w','d','t'));
+alter table import_tmp add constraint chk_status check (status in ('n','w','d','t'));
alter table import_tmp drop column ok ;
@@ -42,4 +42,4 @@ end;
$trim$ language plpgsql;
update version set val=15;
-commit;
\ No newline at end of file
+commit;
diff --git a/include/argenta_be.inc.php b/include/argenta_be.inc.php
index 064508d2d..a776d75fe 100644
--- a/include/argenta_be.inc.php
+++ b/include/argenta_be.inc.php
@@ -87,7 +87,7 @@ echo "
";
detail,
bq_account ,
jrn,
- ok)
+ status)
values ('$code',
to_date('$date_exec','DD-MM-YYYY'),
to_date('$date_exec','DD-MM-YYYY'),
@@ -98,7 +98,7 @@ echo "
";
'".addslashes($detail)." ',
'$p_bq_account',
$p_jrn,
- false)";
+ 'n')";
if ( ExecSql($p_cn,$Sql) == false )
{
Rollback($p_cn); break;
diff --git a/include/cbc_be.inc.php b/include/cbc_be.inc.php
index 5419540c0..5fb2b84ae 100644
--- a/include/cbc_be.inc.php
+++ b/include/cbc_be.inc.php
@@ -69,7 +69,7 @@ while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
detail,
bq_account ,
jrn,
- ok)
+ status)
values (nextval('s_cbc'),
to_date('$date_exec','YYYYMMDD'),
to_date('$date_exec','YYYYMMDD'),
@@ -79,7 +79,7 @@ while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
'".addslashes($detail).$num_compte." ',
'$p_bq_account',
$p_jrn,
- false)";
+ 'n')";
if ( ExecSql($p_cn,$Sql) == false )
{
Rollback($p_cn);
diff --git a/include/eub_be.inc.php b/include/eub_be.inc.php
index 3c2ee7159..32ed617a3 100644
--- a/include/eub_be.inc.php
+++ b/include/eub_be.inc.php
@@ -61,7 +61,7 @@ while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
num_compte,
bq_account ,
jrn,
- ok)
+ status)
values ('$code',
'$date_exec',
'$date_exec',
@@ -70,11 +70,11 @@ while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
'".addslashes($detail)."',
'$p_bq_account',
$p_jrn,
- false)";
+ 'n')";
$Res=ExecSql($p_cn,$Sql);
}
} // for ($c=0;$c<$num;$c++)
$row++;
} // file is read
fclose($handle);
-?>
\ No newline at end of file
+?>
diff --git a/include/fortis_be.inc.php b/include/fortis_be.inc.php
index 8fb07b1bb..2c2b206f7 100644
--- a/include/fortis_be.inc.php
+++ b/include/fortis_be.inc.php
@@ -89,7 +89,7 @@ while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
num_compte,
bq_account ,
jrn,
- ok)
+ status)
values ('$code',
'$date_exec',
'$date_exec',
@@ -100,7 +100,7 @@ while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
'$num_compte',
$p_bq_account,
$p_jrn,
- false)";
+ 'n')";
$Res=ExecSql($p_cn,$Sql);
}
@@ -110,4 +110,4 @@ while (($data = fgetcsv($handle, 2000,'!@')) !== FALSE) {
$row++;
} // file is read
fclose($handle);
-?>
\ No newline at end of file
+?>
diff --git a/include/import_inc.php b/include/import_inc.php
index e17a97944..1cdc58ce0 100644
--- a/include/import_inc.php
+++ b/include/import_inc.php
@@ -67,7 +67,7 @@ function UpdateCSV($p_cn){
$code=$_POST['code'];
$count=$_POST['count'];
$poste=$_POST['poste'.$count];
- $sql = "update import_tmp set poste_comptable='".$poste."' where code='".$code."'";
+ $sql = "update import_tmp set poste_comptable='".$poste."' ,status='w' where code='".$code."'";
$Res=ExecSql($p_cn,$sql);
}
@@ -78,10 +78,11 @@ function UpdateCSV($p_cn){
* are not included in the function and must set in the calling proc.
* \param $p_val array (row from import_type)
* \param $counter a counter used in the form
+ * \param $p_cn database connection
* \param $p_form indicates if the button for the form is enable,
* modify the Quick Code or remove record poss.value are form, remove
*/
-function ShowBox($p_val,$counter,$p_form='form'){
+function ShowBox($p_val,$counter,$p_cn,$p_form='form'){
$w=new widget('js_search_only');
$w->name='poste'.$counter;
@@ -98,7 +99,7 @@ function ShowBox($p_val,$counter,$p_form='form'){
{
$w->value=$p_val['poste_comptable'];
$cn=DbConnect($_SESSION['g_dossier']);
- $f=new fiche($cn);
+ $f=new fiche($p_cn);
$f->GetByQCode($p_val['poste_comptable']);
$s->value=$f->strAttribut(ATTR_DEF_NAME);
}
@@ -106,24 +107,27 @@ function ShowBox($p_val,$counter,$p_form='form'){
echo '';
echo '
| '.$p_val['code'].' | '.$p_val['date_exec'].' | '.$p_val['montant'].' EUR |
| Journal : ".GetJrnName($p_cn,$p_val['jrn'])." | poste comptable Destination : ".$p_val['bq_account']." | |
| '.$p_val['detail'].' | ||
| '.$w->IOValue().' '.$s->IOValue('poste'.$counter.'_label').' | '; echo "n° compte : ".$p_val['num_compte']." | "; - if ( $p_form == 'form') - echo '|
| '; + echo ' | ||