From bd015b3250a5c87000069a4603064826efc2686c Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 19 Oct 2011 17:26:25 +0200 Subject: [PATCH 1/3] Fix: Can use POS module with several concurrent users. This also remove temporary table. --- ChangeLog | 1 + htdocs/install/mysql/migration/3.1.0-3.2.0.sql | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3bae74a477a..46951fd1344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ For users: - New: Can export into Excel 2007 format. - New: Add hidden option CASHDESK_FORCE_STOCK_ON_BILL - New: Can search on part of barcode into POS module. +- Fix: Can use POS module with several concurrent users. For developers: - New: Add webservice to get or create a product, service. diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 653a2203341..60bf0d26d74 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -65,3 +65,5 @@ ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_ ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur_price_fk_product_fournisseur; +DROP TABLE IF EXISTS llx_pos_tmp; + From 98f248ac8c40d4eed1b4b94579e03cc6c79e5652 Mon Sep 17 00:00:00 2001 From: Alexandre Spangaro Date: Thu, 20 Oct 2011 04:17:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Mise=20en=20place=20de=20la=20fonction=20in?= =?UTF-8?q?fo=20des=20notes=20de=20frais.=20Modification=20fonction=20upda?= =?UTF-8?q?te=20pour=20mettre=20=C3=A0=20jour=20l'id=20de=20l'auteur=20qui?= =?UTF-8?q?=20modifie=20la=20note?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deplacement/class/deplacement.class.php | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index f7182869870..fb4c34b86e5 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -172,6 +172,7 @@ class Deplacement extends CommonObject $sql .= " , dated = '".$this->db->idate($this->date)."'"; $sql .= " , type = '".$this->type."'"; $sql .= " , fk_user = ".$this->fk_user; + $sql .= " , fk_user_modif = ".$user->id; $sql .= " , fk_soc = ".($this->socid > 0?$this->socid:'null'); $sql .= " , note = ".($this->note?"'".$this->db->escape($this->note)."'":"null"); $sql .= " , note_public = ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); @@ -355,6 +356,49 @@ class Deplacement extends CommonObject return $ret; } + + /* + * \brief Information sur l'objet + * \param id id du deplacement dont il faut afficher les infos + */ + function info($id) + { + $sql = 'SELECT c.rowid, c.datec, c.fk_user_author, c.fk_user_modif,'; + $sql.= ' c.tms'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'deplacement as c'; + $sql.= ' WHERE c.rowid = '.$id; + + dol_syslog(get_class($this).'::info sql='.$sql); + $result = $this->db->query($sql); + + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + $this->id = $obj->rowid; + if ($obj->fk_user_author) + { + $cuser = new User($this->db); + $cuser->fetch($obj->fk_user_author); + $this->user_creation = $cuser; + } + if ($obj->fk_user_modif) + { + $muser = new User($this->db); + $muser->fetch($obj->fk_user_modif); + $this->user_modification = $muser; + } + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->tms); + } + $this->db->free($result); + } + else + { + dol_print_error($this->db); + } + } } From 33980c412a6c024efc0ece2d597c5ff57a86123a Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 19 Oct 2011 23:26:25 +0800 Subject: [PATCH 3/3] Fix: Can use POS module with several concurrent users. This also remove temporary table. --- ChangeLog | 1 + htdocs/install/mysql/migration/3.1.0-3.2.0.sql | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3bae74a477a..46951fd1344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ For users: - New: Can export into Excel 2007 format. - New: Add hidden option CASHDESK_FORCE_STOCK_ON_BILL - New: Can search on part of barcode into POS module. +- Fix: Can use POS module with several concurrent users. For developers: - New: Add webservice to get or create a product, service. diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 653a2203341..60bf0d26d74 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -65,3 +65,5 @@ ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_ ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur_price_fk_product_fournisseur; +DROP TABLE IF EXISTS llx_pos_tmp; +