diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index d45571dd3..98879f3d7 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -2136,6 +2136,14 @@ class Acc_Ledger extends jrn_def_sql $orap->insert($jrn_concerned); } + /** + * Save the file is any + */ + if (isset($_FILES)) + { + $this->db->save_upload_document($seq); + } + } catch (Exception $a) { diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index bfdbcf15b..ee6670e22 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -947,8 +947,9 @@ class Acc_Ledger_Fin extends Acc_Ledger { if ($oid != 0) { - $this->db->exec_sql("update jrn set jr_pj=" . $oid . ", jr_pj_name='" . $_FILES['pj']['name'] . "', " . - "jr_pj_type='" . $_FILES['pj']['type'] . "' where jr_grpt_id=$seq"); + $this->db->exec_sql("update jrn set jr_pj=$1 , jr_pj_name=$2, + jr_pj_type=$3 where jr_grpt_id=$4", + array($oid,$_FILES['pj']['name'] ,$_FILES['pj']['type'],$seq)); } } } // for nbitem diff --git a/include/class_database.php b/include/class_database.php index 7599a97c7..23344c506 100644 --- a/include/class_database.php +++ b/include/class_database.php @@ -834,8 +834,9 @@ class Database pg_lo_unlink($cn, $old_oid); } // Load new document - $this->exec_sql("update jrn set jr_pj=".$oid.", jr_pj_name='".$_FILES['pj']['name']."', ". - "jr_pj_type='".$_FILES['pj']['type']."' where jr_grpt_id=$seq"); + $this->exec_sql("update jrn set jr_pj=$1 , jr_pj_name=$2, + jr_pj_type=$3 where jr_grpt_id=$4", + array($oid,$_FILES['pj']['name'] ,$_FILES['pj']['type'],$seq)); return $oid; } else diff --git a/include/operation_ods_confirm.inc.php b/include/operation_ods_confirm.inc.php index c2f958687..551fc8429 100644 --- a/include/operation_ods_confirm.inc.php +++ b/include/operation_ods_confirm.inc.php @@ -37,7 +37,7 @@ echo '