diff --git a/html/js/managetable.js b/html/js/managetable.js index a9c4d4113..864b17230 100644 --- a/html/js/managetable.js +++ b/html/js/managetable.js @@ -64,6 +64,21 @@ How to call a function AFTER save ? You set a function afterSaveFct like in the example, it will be trigger after you submit the FORM + a function named afterSaveFct(r) where r is the row in HTML to display, with a attribute ctl_pk_id which is the primary key and id of the row + Example : + @code + document_attach_obj.afterSaveFct=function(e) { + var ctl_pk_id=e.getAttribute("ctl_pk_id"); + var formData = new FormData(); + var file_data=document.getElementById('da_file_name'); + formData.append('da_file_name', file_data.files[0]); + var xhr = new XMLHttpRequest(); + xhr.open("POST", "ajax.php?p_id="+ctl_pk_id+"&do=upload_document", true); + xhr.send(formData); +} + + @endcode + As a hidden parameter the Manage_Table:object_name must be set Example : @code @@ -231,7 +246,11 @@ var ManageTable = function (p_table_name) the current object * - * + * *Call the ajax with the action save , it is possible to call a function after the save by creating + * + * a function named afterSaveFct(r) where r is the row in HTML to display, with a attribute ctl_pk_id which is the + * + * primary key and id of the row + * + * + * + * As a hidden parameter the Manage_Table:object_name must be set * */ this.save = function (form_id) { diff --git a/include/class/acc_ledger_purchase.class.php b/include/class/acc_ledger_purchase.class.php index 46a9a7619..21f053aaa 100644 --- a/include/class/acc_ledger_purchase.class.php +++ b/include/class/acc_ledger_purchase.class.php @@ -1000,7 +1000,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger /* Insert supplier */ $acc_pay=new Acc_Operation($this->db); - $acc_pay->date=$e_date; + $acc_pay->date=$mp_date; $acc_pay->poste=$poste; $acc_pay->qcode=$e_client; $acc_pay->amount=abs(round($famount,2)); diff --git a/include/constant.php b/include/constant.php index 9b1e7bd4a..6cc75512c 100644 --- a/include/constant.php +++ b/include/constant.php @@ -116,7 +116,7 @@ if (!defined("NOALYSS_PACKAGE_REPOSITORY")) { if (!defined("SYSINFO_DISPLAY")) { define("SYSINFO_DISPLAY", TRUE); } -define("DBVERSION", 183); +define("DBVERSION", 184); define("MONO_DATABASE", 25); define("DBVERSIONREPO", 20); define('NOTFOUND', '--not found--'); diff --git a/include/sql/patch/upgrade183.sql b/include/sql/patch/upgrade183.sql new file mode 100644 index 000000000..59a899c93 --- /dev/null +++ b/include/sql/patch/upgrade183.sql @@ -0,0 +1,13 @@ +begin; +COMMENT ON COLUMN public.action_gestion.f_id_dest IS 'third party'; +COMMENT ON COLUMN public.action_gestion.ag_priority IS 'Low, medium, important'; +COMMENT ON COLUMN public.action_gestion.ag_dest IS 'is the profile which has to take care of this action'; +COMMENT ON COLUMN public.action_gestion.ag_owner IS 'is the owner of this action'; +COMMENT ON COLUMN public.action_gestion.ag_contact IS 'contact of the third part'; +COMMENT ON COLUMN public.action_gestion.ag_title IS 'title'; +COMMENT ON COLUMN public.action_gestion.ag_timestamp IS ''; +COMMENT ON COLUMN public.action_gestion.ag_ref IS 'its reference'; +COMMENT ON COLUMN public.action_gestion.ag_state IS 'state of the action same as document_state'; + +insert into version (val,v_description) values (184,'document table action_gestion'); +commit;