diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css index 01ef67236..00cc18cd7 100644 --- a/html/css/style-classic7.css +++ b/html/css/style-classic7.css @@ -44,7 +44,6 @@ input:focus { font-style: italic; background-color:transparent; font-size: 100%; - font-weight: 0; padding: 0px; margin: 0px; font-family: sans-serif; @@ -504,7 +503,6 @@ a.detail font-family: 'openSansRegular'; text-decoration: underline; display: block; - // color: #eb2208; font-weight: normal; background-color: transparent; } @@ -2395,6 +2393,7 @@ td.selectedmenu { { margin-top:1px; border:1px solid blue; + min-height: 5rem; } @media only screen and (max-width:850px) { @@ -3410,4 +3409,4 @@ li.li-active { z-index: 12; position: absolute; height: auto; - } \ No newline at end of file + } diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index 5952e76b9..9929335ed 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -801,6 +801,8 @@ function view_history_account(p_value, dossier, p_exercice) { onFailure: error_box, onSuccess: function (req, xml) { remove_waiting_box(); + if (req.responseText === 'NOCONX') { reconnect();return;} + add_div(popup); success_box(req, xml); $(idbox).style.top = calcy(140 + (layer * 3)) + "px"; @@ -840,6 +842,8 @@ function view_history_anc_account(p_value, dossier, p_exercice) { onFailure: error_box, onSuccess: function (req, xml) { remove_waiting_box(); + if (req.responseText === 'NOCONX') { reconnect();return;} + add_div(popup); $(idbox).innerHTML = req.responseText; $(idbox).style.top = calcy(140 + (layer * 3)) + "px"; @@ -874,6 +878,8 @@ function update_history_account(obj) { onFailure: error_box, onSuccess: function (req, xml) { remove_waiting_box(); + if (req.responseText === 'NOCONX') { reconnect();return;} + success_box(req, xml); g(obj.div).style.top = calcy(140 + (layer * 3)) + "px"; } @@ -915,6 +921,8 @@ function view_history_card(p_value, dossier, p_exercice) { onFailure: error_box, onSuccess: function (req, xml) { remove_waiting_box(); + if (req.responseText === 'NOCONX') { reconnect();return;} + add_div(popup); success_box(req, xml); g(idbox).style.top = calcy(140 + (layer * 3)) + "px"; @@ -947,6 +955,8 @@ function update_history_card(obj) { parameters: querystring, onFailure: error_box, onSuccess: function (req, xml) { + if (req.responseText === 'NOCONX') { reconnect();return;} + remove_waiting_box(); success_box(req, xml); g(obj.div).style.top = calcy(140 + (layer * 3)) + "px"; diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js index 4e8fdaacf..c70142b90 100644 --- a/html/js/noalyss_script.js +++ b/html/js/noalyss_script.js @@ -2430,6 +2430,7 @@ function set_preference(p_dossier) { onFailure: ajax_misc_failure, onSuccess: function (req) { remove_waiting_box(); + if (req.responseText === 'NOCONX') { reconnect();return;} add_div({id: 'preference_div', drag: 1}); $('preference_div').innerHTML = req.responseText; try diff --git a/include/action.common.inc.php b/include/action.common.inc.php index 2bb742526..ea1f14b7d 100644 --- a/include/action.common.inc.php +++ b/include/action.common.inc.php @@ -322,33 +322,32 @@ if ($sub_action == "save_action_st2") { $act = new Follow_Up($cn); $act->fromArray($_POST); - try { - $act->d_id = 0; - $act->ag_id=$http->request("ag_id","number"); - $act->md_id = $http->post('gen_doc','number',0); + try { + $act->d_id = 0; + $act->ag_id = $http->request("ag_id", "number"); + $act->md_id = $http->post('gen_doc', 'number', 0); - $act->verify(); - $sup_parameter=HtmlInput::array_to_string(["sc","sb","f_id","qcode"], $_REQUEST,"&"); - // insert into action_gestion - $act->update(); - - $url = "?sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get()."&ac=".$http->request("ac"). - $sup_parameter; - echo '
' . hb(_('Action Sauvée').' : ' . $act->ag_ref) . '
'; + $act->verify(); + $sup_parameter = HtmlInput::array_to_string(["sc", "sb", "f_id", "qcode"], $_REQUEST, "&"); + // insert into action_gestion + $act->update(); - Follow_Up::show_action_list($cn,$base); - $url = "?sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get()."&ac=".$http->request("ac"). - $sup_parameter; - echo '' . hb(_('Action Sauvée').' : ' . $act->ag_ref) . '
'; - } catch (Exception $e) - { - echo ''; - echo _("Erreur")." ".$e->getMessage(); - echo ''; - $sub_action="add_action"; - $error_id=$e->getCode(); - record_log($e); - } + $url = "?sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get() . "&ac=" . $http->request("ac") . + $sup_parameter; + echo '' . hb(_('Action Sauvée') . ' : ' . $act->ag_ref) . '
'; + + Follow_Up::show_action_list($cn, $base); + $url = "?sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get() . "&ac=" . $http->request("ac") . + $sup_parameter; + echo '' . hb(_('Action Sauvée') . ' : ' . $act->ag_ref) . '
'; + } catch (Exception $e) { + echo ''; + echo _("Erreur") . " " . $e->getMessage(); + echo ''; + $sub_action = "add_action"; + $error_id = $e->getCode(); + record_log($e); + } } //-------------------------------------------------------------------------------- // Add an action diff --git a/include/class/acc_account_ledger.class.php b/include/class/acc_account_ledger.class.php index d4f20e663..61d33887e 100644 --- a/include/class/acc_account_ledger.class.php +++ b/include/class/acc_account_ledger.class.php @@ -304,6 +304,18 @@ class Acc_Account_Ledger } return $this->name; } + /*! + * \brief Return the type of a account + * \returns string ACT,ACTINV,CHA,CHAINV,CON,PAS,PRO + */ + function get_type() + { + $type=$this->db->get_value( + "select pcm_type from tmp_pcmn where + pcm_val=$1",array($this->id)); + return $type; + } + /*!\brief check if the poste exist in the tmp_pcmn *\return the number of line (normally 1 or 0) */ @@ -446,6 +458,20 @@ class Acc_Account_Ledger $rep=""; + $type =$this->get_type(); + // label warning if the saldo is incorrect + $label=""; + if (in_array($type,array('CHA','ACT','PASINV','PROINV')) && $tot_deb<$tot_cred) + { + + $label.=_("Solde créditeur au lieu de débiteur").''; + } + if (in_array($type,array('PRO','PAS','ACTINV','CHAINV')) && $tot_deb>$tot_cred) + { + + $label.=_("Solde débiteur au lieu de créditeur")." ".''; + } + echo ''.$label.''; if ( $from_div == 1) echo "'; echo $reload->input(); - echo HtmlInput::button_close($p_div); + echo HtmlInput::button_close($p_div,'button'); echo '
'; diff --git a/include/lib/dbg.php b/include/lib/dbg.php index a0570b104..6cf096f11 100644 --- a/include/lib/dbg.php +++ b/include/lib/dbg.php @@ -79,6 +79,8 @@ EOF;= print_r($_GET) ?>$_REQUEST
= print_r($_REQUEST) ?>+ $_FILES +
= print_r($_FILES) ?>= \HtmlInput::button_hide($id) ?> diff --git a/include/lib/html_input.class.php b/include/lib/html_input.class.php index 4250f9394..de151e6d6 100755 --- a/include/lib/html_input.class.php +++ b/include/lib/html_input.class.php @@ -444,10 +444,11 @@ class HtmlInput * @see add_div modify_operation * @param $div_name is the name of the div to remove */ - static function button_close($div_name) + static function button_close($div_name,$class='smallbutton') { $a=new IButton('Fermer'); $a->label=_("Fermer"); + $a->class=$class; $a->javascript="removeDiv('".$div_name."')"; $html=$a->input(); diff --git a/include/lib/ifile.class.php b/include/lib/ifile.class.php index a0ee85fc0..60a3f38ba 100644 --- a/include/lib/ifile.class.php +++ b/include/lib/ifile.class.php @@ -31,10 +31,23 @@ class IFile extends HtmlInput { // if true , the size is tested and a box is displaid private $alert_on_size; + private $multiple ; // false by default, if true allow to select several files function __construct($p_name = "", $p_value = "", $p_id = "") { parent::__construct($p_name, $p_value, $p_id); $this->alert_on_size=false; + $this->multiple=false; + } + + public function get_multiple(): bool + { + return $this->multiple; + } + + public function set_multiple(bool $multiple): IFile + { + $this->multiple = $multiple; + return $this; } /** @@ -61,7 +74,11 @@ class IFile extends HtmlInput $this->value=($p_value==null)?$this->value:$p_value; if ( $this->readOnly==true) return $this->display(); if ($this->id=="") $this->id=uniqid("file_"); - $r=sprintf('', + $multiple=""; + if ( $this->multiple) $multiple=" multiple "; + + $r=sprintf('', + $multiple, $this->name, $this->id, $this->value); diff --git a/include/sql/patch/upgrade192.sql b/include/sql/patch/upgrade192.sql new file mode 100644 index 000000000..920f2cf42 --- /dev/null +++ b/include/sql/patch/upgrade192.sql @@ -0,0 +1,10 @@ +begin; +create table action_comment_document (acd_id bigint generated by default as identity primary key + , document_id bigint references document(d_id) on delete cascade on update cascade, + action_gestion_comment_id bigint references action_gestion_comment(agc_id) on delete cascade on update cascade); + +alter table action_comment_document + add constraint action_comment_document_un + unique (document_id, action_gestion_comment_id); +insert into version (val,v_description) values (193,' 2332: Suivi : ajout fichier lié aux commentaires'); +commit; \ No newline at end of file diff --git a/include/template/follow_up-display.php b/include/template/follow_up-display.php index 5d098abca..1c64f9fae 100644 --- a/include/template/follow_up-display.php +++ b/include/template/follow_up-display.php @@ -377,6 +377,7 @@ function small(p_id_textarea){ echo ''; } } + $dossier_id=Dossier::id(); if ( count($acomment) > 0 && Document_Option::can_add_comment($ag_id) && Document_Option::option_comment($this->dt_id) == "SOME_FIXED") @@ -395,7 +396,7 @@ function small(p_id_textarea){ $js=Icon_Action::trash("accom".$acomment[$c]['agc_id'], $rmComment); $comment= h($m_desc.' '.$acomment[$c]['agc_id'].'('.$acomment[$c]['tech_user']." ". $acomment[$c]['str_agc_date'].')').$js. - '