Merge branch 'develop' of git://github.com/Dolibarr/dolibarr.git into webservices

This commit is contained in:
jfefe 2012-11-14 12:42:16 +01:00
commit 23e47b7156
111 changed files with 3402 additions and 2790 deletions

View File

@ -70,7 +70,7 @@
<Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords> <Keywords>dolibarr, erp, crm, invoices, commercial proposals, orders, accounting, stock, products, agenda, bank, business, company, foundation, management, sme, doliwamp</Keywords>
<Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45> <Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45>
<Char_Desc_80>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity</Char_Desc_80> <Char_Desc_80>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow.</Char_Desc_250> <Char_Desc_250>Dolibarr ERP &amp; CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage.</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450> <Char_Desc_450>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this.</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: <Char_Desc_2000>Dolibarr ERP &amp; CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple:
Simple to install Simple to install
@ -83,8 +83,8 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt
<Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45> <Char_Desc_45>Dolibarr ERP &amp; CRM</Char_Desc_45>
<Char_Desc_80>Dolibarr ERP &amp; CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80> <Char_Desc_80>Dolibarr ERP &amp; CRM, le gestionnaire simple pour gérer votre activité</Char_Desc_80>
<Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250> <Char_Desc_250>Dolibarr ERP &amp; CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations)</Char_Desc_250>
<Char_Desc_450>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450> <Char_Desc_450>Dolibarr ERP &amp; CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP).</Char_Desc_450>
<Char_Desc_2000>Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S): <Char_Desc_2000>Dolibarr ERP &amp; CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S):
Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle) Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle)
Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie) Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie)
Simple pour le développement (pas de frameworks lourds). Simple pour le développement (pas de frameworks lourds).

View File

@ -1763,290 +1763,6 @@ LOCK TABLES `llx_c_ziptown` WRITE;
/*!40000 ALTER TABLE `llx_c_ziptown` ENABLE KEYS */; /*!40000 ALTER TABLE `llx_c_ziptown` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_c_banques`
--
DROP TABLE IF EXISTS `llx_cabinetmed_c_banques`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_c_banques` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(8) NOT NULL,
`label` varchar(64) NOT NULL,
`active` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_c_banques`
--
LOCK TABLES `llx_cabinetmed_c_banques` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_c_banques` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_c_banques` (`rowid`, `code`, `label`, `active`) VALUES (1,'HSBC','HSBC',1);
/*!40000 ALTER TABLE `llx_cabinetmed_c_banques` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_c_examconclusion`
--
DROP TABLE IF EXISTS `llx_cabinetmed_c_examconclusion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_c_examconclusion` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(8) NOT NULL,
`label` varchar(64) NOT NULL,
`active` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_c_examconclusion`
--
LOCK TABLES `llx_cabinetmed_c_examconclusion` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_c_examconclusion` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_c_examconclusion` (`rowid`, `code`, `label`, `active`) VALUES (1,'AUTRE','Autre',1);
/*!40000 ALTER TABLE `llx_cabinetmed_c_examconclusion` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_cons`
--
DROP TABLE IF EXISTS `llx_cabinetmed_cons`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_cons` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`fk_soc` int(11) DEFAULT NULL,
`fk_user_creation` int(11) NOT NULL,
`datecons` date NOT NULL,
`typepriseencharge` varchar(8) DEFAULT NULL,
`motifconsprinc` varchar(64) DEFAULT NULL,
`diaglesprinc` varchar(64) DEFAULT NULL,
`motifconssec` text,
`diaglessec` text,
`hdm` text,
`examenclinique` text,
`examenprescrit` text,
`traitementprescrit` text,
`comment` text,
`typevisit` varchar(8) NOT NULL,
`infiltration` varchar(256) DEFAULT NULL,
`codageccam` varchar(16) DEFAULT NULL,
`montant_cheque` double(24,8) DEFAULT NULL,
`montant_espece` double(24,8) DEFAULT NULL,
`montant_carte` double(24,8) DEFAULT NULL,
`montant_tiers` double(24,8) DEFAULT NULL,
`banque` varchar(128) DEFAULT NULL,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`rowid`),
KEY `idx_cabinetmed_cons_fk_soc` (`fk_soc`),
KEY `idx_cabinetmed_cons_datecons` (`datecons`),
CONSTRAINT `fk_cabinetmed_cons_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_cons`
--
LOCK TABLES `llx_cabinetmed_cons` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_cons` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_cons` (`rowid`, `fk_soc`, `fk_user_creation`, `datecons`, `typepriseencharge`, `motifconsprinc`, `diaglesprinc`, `motifconssec`, `diaglessec`, `hdm`, `examenclinique`, `examenprescrit`, `traitementprescrit`, `comment`, `typevisit`, `infiltration`, `codageccam`, `montant_cheque`, `montant_espece`, `montant_carte`, `montant_tiers`, `banque`, `tms`) VALUES (2,2,1,'2011-04-17',NULL,'Cervicalgies Inflammatoires','Arthrite Microcristalline','','','','rrrr','','','','CS','','',NULL,55.00000000,NULL,NULL,'','2011-05-25 13:59:03'),(3,2,1,'2011-05-01',NULL,'Cervicalgies Mécaniques','Arthrite Goutteuse','yyyykk\r\nDorsalgie\r\nDorsalgies Inflammatoires\r\nDouleur Chevillep\r\nDouleur Genou\r\nDouleur Genou','','lll','','','','','CS','','',NULL,NULL,NULL,50.00000000,'','2011-05-25 13:59:03'),(4,4,1,'2011-05-02',NULL,'Autre','Arthrite Goutteuse','','','','','','','','CCAM','inf','ccam',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-25 13:59:03'),(5,5,1,'2011-05-02',NULL,'Cervicalgies Inflammatoires','Arthrite Microcristalline','','dgdfg','','','','','','CCAM','ingg','pp',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-28 15:22:22'),(6,5,1,'2011-05-02',NULL,'Cervicalgies Inflammatoires','Arthrose FémoroPatellaire','','','','','','kk','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-25 13:59:03'),(7,4,1,'2011-05-03',NULL,'Cervicalgies Mécaniques','Arthrite Goutteuse','Douleur Cheville','Arthrite Microcristalline','fd','fd','Bilan Phosphocalcique','fdf','fdfd','CCAM','lllll','kkk',NULL,NULL,NULL,0.00000000,'','2011-06-14 23:13:42'),(8,5,1,'2011-05-03',NULL,'Cervicalgies Mécaniques','gggg','','','pppljklj','','','','','CS','kmlkmlkml mlmlkmkm mk ml mlk','',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-28 15:00:27'),(10,3,1,'2011-05-07',NULL,'dfgdf','gfdgd','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-25 13:59:03'),(11,9,1,'2011-05-25',NULL,'Dérobement Membres Inférieurs','Arthrite Goutteuse','Dorsalgie\r\nDorsalgies Mécaniques','Lomboradiculalgie Discale\r\nLombosciatique L5 gauche','','','ArthroScanner Genou\r\nIRM Genou\r\nIRM Rachis Lombaire','1\r\n2\r\n3\r\n4\r\n5\r\n6','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-05-28 15:58:29'),(12,32,1,'2011-06-08',NULL,'Cervicalgies Inflammatoires','Arthrite Goutteuse','','','','','','','','CS','','',NULL,NULL,NULL,50.00000000,'','2011-06-08 14:38:10'),(13,26,1,'2011-06-13',NULL,'Cervicalgies Mécaniques','Arthrite Microcristalline','','','','','ArthroScanner Hanche','Traitement prescrit.','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-06-13 15:25:39'),(14,26,1,'2011-06-13',NULL,'Douleur Membre inférieur Gauche','Lombosciatique L5 gauche','','Lombalgie Discale','','','','AINS (biprohénide), murolaxan\r\ndoliprane\r\n+ rééduction','','CCAM','infiltr épidurale','AHLB001',90.00000000,NULL,NULL,NULL,'HSBC','2011-06-13 16:16:43'),(15,1,1,'2011-06-13',NULL,'Cervicalgies Mécaniques','Arthrite Microcristalline','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-06-13 18:07:26'),(16,36,1,'2011-06-15',NULL,'gdfgfd','gdfgdfgdf','','','','','ArthroScanner Epaule','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-06-15 00:28:43'),(17,36,1,'2011-06-15',NULL,'hfghfg','hgfhfghf','','','','','','','','CS','','',NULL,10.00000000,NULL,NULL,'','2011-06-15 00:31:57'),(18,65,1,'2011-07-06',NULL,'Cervicalgies Inflammatoires','aaaaa','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-07-06 20:17:20'),(19,67,1,'2011-07-11',NULL,'Cervicalgies Inflammatoires','Canal Carpien','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-07-10 21:23:30'),(20,68,1,'2011-07-13',NULL,'Cervicalgies Mécaniques','Autre','','','','','','','','CS','','',50.00000000,NULL,NULL,NULL,'HSBC','2011-07-13 16:26:21'),(21,68,1,'2011-07-13',NULL,'aaaa','bbbb','','','','','','','','CS','','',NULL,NULL,50.00000000,NULL,'','2011-07-13 18:18:29'),(22,68,1,'2011-07-13',NULL,'lll','llll','','','','','','','','CS','','',NULL,NULL,10.00000000,NULL,'','2011-07-13 18:21:57'),(23,68,1,'2011-07-13',NULL,'oo','oo','','','','','','','','CS','','',NULL,NULL,NULL,5.00000000,'','2011-07-13 18:26:18');
/*!40000 ALTER TABLE `llx_cabinetmed_cons` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_diaglec`
--
DROP TABLE IF EXISTS `llx_cabinetmed_diaglec`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_diaglec` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(8) NOT NULL,
`label` varchar(64) NOT NULL,
`active` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_diaglec`
--
LOCK TABLES `llx_cabinetmed_diaglec` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_diaglec` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_diaglec` (`rowid`, `code`, `label`, `active`) VALUES (1,'AUTRE','Autre',1),(2,'LOMBL5D','Lombosciatique L5 droite',1),(3,'LOMBL5G','Lombosciatique L5 gauche',1),(4,'LOMBS1D','Lombosciatique S1 droite',1),(5,'LOMBS1G','Lombosciatique S1 gauche',1),(6,'NCB','Névralgie cervico-brachiale',1),(7,'PR','Polyarthrite rhumatoide',1),(8,'SA','Spondylarthrite ankylosante',1),(9,'GFTI','Gonarthrose fémoro-tibaile interne',1),(10,'GFTE','Gonarthrose fémoro-tibiale externe',1),(11,'COX','Coxarthrose',1),(12,'CC','Canal Carpien',1),(16,'CLER','Canal Lombaire Etroit et/ou Rétréci',1),(22,'RH PSO','Rhumatisme Psoriasique',1),(23,'LEAD','Lupus',1),(24,'LBDISC','Lombalgie Discale',1),(25,'LBRADD','Lomboradiculalgie Discale',1),(26,'LBRADND','Lomboradiculalgie Non Discale',1),(27,'CH ROT','Chondropathie Rotulienne',1),(28,'AFP','Arthrose FémoroPatellaire',1),(29,'PPR','Pseudo Polyarthrite Rhizomélique',1),(30,'SHARP','Maladie de Sharp',1),(31,'SAPHO','SAPHO',1),(32,'OMARTHC','Omarthrose Centrée',1),(33,'RH CCA','Rhumatisme Chondro Calcinosique',1),(34,'GOUTTE','Arthrite Goutteuse',1),(35,'CCA','Arthrite Chondro Calcinosique',1),(36,'ARTH MCR','Arthrite Microcristalline',1),(37,'CSA','Conflit Sous Acromial',1),(38,'TDCALCE','Tendinopathie Calcifiante d\'Epaule',1),(39,'TDCALCH','Tendinopathie Calcifiante de Hanche',1),(40,'TBT','TendinoBursite Trochantérienne',1),(41,'OMARTHE','Omarthrose Excentrée',1);
/*!40000 ALTER TABLE `llx_cabinetmed_diaglec` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_examaut`
--
DROP TABLE IF EXISTS `llx_cabinetmed_examaut`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_examaut` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`fk_soc` int(11) DEFAULT NULL,
`dateexam` date NOT NULL,
`examprinc` varchar(64) DEFAULT NULL,
`examsec` text,
`concprinc` varchar(64) DEFAULT NULL,
`concsec` text,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_examaut`
--
LOCK TABLES `llx_cabinetmed_examaut` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_examaut` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_examaut` (`rowid`, `fk_soc`, `dateexam`, `examprinc`, `examsec`, `concprinc`, `concsec`, `tms`) VALUES (1,2,'2011-05-08','ArthroScanner Genou','ArthroScanner EpauleeeeArthroScanner HancheIRM EpauleggggBilan Radio ScolioseuuuuqqqqlIRM Rachis Cervical','Autre','','2011-05-01 14:47:57'),(2,2,'2011-05-02','dd','ArthroScanner Hanche\r\nBilan Radio Scoliose\r\neeee\r\nElectromiogramme','dd','','2011-05-01 23:49:59'),(3,32,'2011-06-08','ArthroScanner Genou','gdfgdfgdfgdfgdfgdfgd','Autre','','2011-06-08 14:54:45'),(4,32,'2011-06-08','IRM SacroIliaques','','fsdfsdfsdfsd','','2011-06-08 14:57:01'),(5,26,'2011-06-13','Bilan Radio Rhumatisme Inflammatoire','','Autre','','2011-06-13 15:27:39'),(6,26,'2011-06-13','ArthroScanner Genou','Autre','Autre','','2011-06-13 15:29:31'),(7,26,'2011-06-13','Scanner Lombaire','','Hernie discale L4-L5 gauche','','2011-06-13 16:20:47'),(8,65,'2011-07-06','ArthroScanner Hanche','','Autre','','2011-07-06 20:17:54');
/*!40000 ALTER TABLE `llx_cabinetmed_examaut` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_exambio`
--
DROP TABLE IF EXISTS `llx_cabinetmed_exambio`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_exambio` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`fk_soc` int(11) DEFAULT NULL,
`dateexam` date NOT NULL,
`resultat` text,
`conclusion` text,
`comment` text,
`suivipr_ad` int(11) DEFAULT NULL,
`suivipr_ag` int(11) DEFAULT NULL,
`suivipr_vs` int(11) DEFAULT NULL,
`suivipr_eva` int(11) DEFAULT NULL,
`suivipr_err` int(11) DEFAULT NULL,
`suivisa_fat` int(11) DEFAULT NULL,
`suivisa_dax` int(11) DEFAULT NULL,
`suivisa_dpe` int(11) DEFAULT NULL,
`suivisa_dpa` int(11) DEFAULT NULL,
`suivisa_rno` int(11) DEFAULT NULL,
`suivisa_dma` int(11) DEFAULT NULL,
`suivisa_basdai` double DEFAULT NULL,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`suivisa_das28` double DEFAULT NULL,
`suivipr_das28` double DEFAULT NULL,
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_exambio`
--
LOCK TABLES `llx_cabinetmed_exambio` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_exambio` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_exambio` (`rowid`, `fk_soc`, `dateexam`, `resultat`, `conclusion`, `comment`, `suivipr_ad`, `suivipr_ag`, `suivipr_vs`, `suivipr_eva`, `suivipr_err`, `suivisa_fat`, `suivisa_dax`, `suivisa_dpe`, `suivisa_dpa`, `suivisa_rno`, `suivisa_dma`, `suivisa_basdai`, `tms`, `suivisa_das28`, `suivipr_das28`) VALUES (1,2,'2011-05-01','aaajhkh','bbb','ccc',NULL,NULL,NULL,NULL,NULL,1,2,3,4,5,6,NULL,'2011-05-01 14:45:54',NULL,NULL),(3,2,'2011-05-01','dd','hfghfg','',1,2,6,9,NULL,2,2,2,2,2,2,NULL,'2011-05-01 15:24:06',NULL,NULL),(4,2,'2011-05-01','gdfgdf','1111','',NULL,NULL,NULL,NULL,NULL,1,7,8,9,10,11,NULL,'2011-05-01 15:25:17',NULL,NULL),(5,2,'2011-05-01','fdsfsdfsdfsd','ccccc','fsdfsdfs',1,2,4,3,NULL,1,2,3,4,5,6,NULL,'2011-05-01 16:37:51',NULL,NULL),(6,2,'2011-05-01','gfdgdfgdf','gdfgdf','',5,NULL,NULL,NULL,NULL,1,NULL,1,1,NULL,NULL,NULL,'2011-05-01 16:43:49',NULL,NULL),(8,1,'2011-05-01','lkjljkl','','',1,2,4,3,NULL,5,10,5,6,5,5,6.2,'2011-05-01 16:46:00',NULL,1.97),(9,32,'2011-06-08','retert','trete','',1,2,4,1,NULL,2,5,2,5,4,6,NULL,'2011-06-08 14:47:30',NULL,NULL),(10,32,'2011-06-08','fgdfgdfg','gfgdfgdf','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-08 14:54:23',NULL,NULL),(11,26,'2011-06-13','result bio 1','conclusion bio 1','',1,2,4,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-13 15:27:15',NULL,NULL),(12,26,'2011-06-13','result bio 2','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-13 15:27:25',NULL,NULL),(13,26,'2011-06-13','VS8\r\nCRP inférieur ) 5','Pas de syndrome inflammatoire.','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-13 16:19:08',NULL,NULL),(14,26,'2011-06-13','','','',NULL,NULL,NULL,NULL,NULL,1,2,2,4,5,6,NULL,'2011-06-13 16:19:38',NULL,NULL),(15,26,'2011-06-13','','','',1,2,4,3,NULL,1,2,3,4,5,6,0.31,'2011-06-13 17:50:25',NULL,1.97),(16,36,'2011-06-15','gdfgddfhghghhfghf','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-06-15 08:02:03',NULL,NULL),(17,65,'2011-07-06','hfghfghgf','Zob','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-07-06 20:17:33',NULL,NULL),(18,67,'2011-07-11','gfdg','gfdg','gfd',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-07-10 22:23:21',NULL,NULL),(19,62,'2011-07-13','dfgdf','gdfd','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2011-07-13 15:56:27',NULL,NULL);
/*!40000 ALTER TABLE `llx_cabinetmed_exambio` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_examenprescrit`
--
DROP TABLE IF EXISTS `llx_cabinetmed_examenprescrit`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_examenprescrit` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(8) NOT NULL,
`label` varchar(64) NOT NULL,
`biorad` varchar(8) NOT NULL,
`active` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_examenprescrit`
--
LOCK TABLES `llx_cabinetmed_examenprescrit` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_examenprescrit` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_examenprescrit` (`rowid`, `code`, `label`, `biorad`, `active`) VALUES (1,'AUTRE','Autre','AUTRE',1),(2,'IRMLOMB','IRM lombaire','RADIO',1),(5,'TDMLOMB','TDM lombaires','RADIO',1),(6,'RX BRL','Radios Bassin-Rachis Lombaire','RADIO',1),(7,'RX RL','Radios Rachis Lombaire','RADIO',1),(8,'RX BASS','Radios Bassin','RADIO',1),(9,'RX BH','Radios Bassin et Hanches','RADIO',1),(10,'RX GEN','Radios Genoux','RADIO',1),(11,'RX CHEV','Radios Chevilles','RADIO',1),(12,'RX AVPD','Radios Avants-Pieds','RADIO',1),(13,'RX EP','Radio Epaule','RADIO',1),(14,'RX MAINS','Radios Mains','RADIO',1),(15,'RX COUDE','Radios Coude','RADIO',1),(16,'RX RC','Radios Rachis Cervical','RADIO',1),(17,'RX RD','Radios Rachis Dorsal','RADIO',1),(18,'RX RCD','Radios Rachis CervicoDorsal','RADIO',1),(19,'RX RDL','Radios DorsoLombaire','RADIO',1),(20,'RX SCO','Bilan Radio Scoliose','RADIO',1),(21,'RX RIC','Bilan Radio Rhumatisme Inflammatoire','RADIO',1),(22,'TDM LOMB','Scanner Lombaire','RADIO',1),(23,'TDM DORS','Scanner Dorsal','RADIO',1),(24,'TDM CERV','Scanner Cervical','RADIO',1),(25,'TDM HANC','Scanner Hanche','RADIO',1),(26,'TDM GEN','Scanner Genou','RADIO',1),(27,'RX RDL','Radios Rachis DorsoLombaire','RADIO',1),(28,'ARTTDMG','ArthroScanner Genou','RADIO',1),(29,'ARTTDME','ArthroScanner Epaule','RADIO',1),(30,'ARTTDMH','ArthroScanner Hanche','RADIO',1),(31,'IRM GEN','IRM Genou','RADIO',1),(32,'IRM HANC','IRM Hanche','RADIO',1),(33,'IRM EP','IRM Epaule','RADIO',1),(34,'IRM SIL','IRM SacroIliaques','RADIO',1),(35,'IRM RL','IRM Rachis Lombaire','RADIO',1),(36,'IRM RD','IRM Rachis Dorsal','RADIO',1),(37,'IRM RC','IRM Rachis Cervical','RADIO',1),(38,'ELECMI','Electromiogramme','RADIO',1),(39,'NFS','NFS','BIO',1),(40,'BILPHO','Bilan Phosphocalcique','BIO',1),(41,'VSCRP','VS/CRP','BIO',1),(42,'EPP','Electrophorèse Protéine Plasmatique','BIO',1);
/*!40000 ALTER TABLE `llx_cabinetmed_examenprescrit` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_motifcons`
--
DROP TABLE IF EXISTS `llx_cabinetmed_motifcons`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_motifcons` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(8) NOT NULL,
`label` varchar(64) NOT NULL,
`active` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_motifcons`
--
LOCK TABLES `llx_cabinetmed_motifcons` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_motifcons` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_motifcons` (`rowid`, `code`, `label`, `active`) VALUES (5,'AUTRE','Autre',1),(6,'DORS','Dorsalgie',1),(7,'DOLMSD','Douleur Membre supérieur Droit',1),(8,'DOLMSG','Douleur Membre supérieur Gauche',1),(9,'DOLMID','Douleur Membre inférieur Droit',1),(10,'DOLMIG','Douleur Membre inférieur Gauche',1),(11,'PARESM','Paresthésie des mains',1),(12,'DOLEPG','Douleur épaule gauche',1),(13,'DOLEPD','Douleur épaule droite',1),(14,'GONAD','Gonaglie droite',1),(15,'GONAG','Gonalgie gauche',1),(16,'DOLPD','Douleur Pied Droit',1),(17,'DOUL MIN','Douleur Membre Inférieur',1),(18,'POLYAR','Polyarthralgie',1),(19,'SUIVIPR','Suivi PR',1),(20,'SUIVISPA','Suivi SPA',1),(21,'SUIVIRIC','Suivi RI',1),(22,'SUIVIPPR','Suivi PPR',1),(23,'DOLINGD','Douleur inguinale Droit',1),(24,'DOLINGG','Douleur inguinale Gauche',1),(25,'DOLCOUDD','Douleur coude Droit',1),(26,'DOLCOUDG','Douleur coude Gauche',1),(27,'TALAL','Talalgie',1),(28,'DOLTENDC','Douleur tandous Calcanien',1),(29,'DEROB','Dérobement Membres Inférieurs',1),(30,'LOMB MEC','Lombalgies Mécaniques',1),(31,'LOMB INF','Lombalgies Inflammatoires',1),(32,'DORS MEC','Dorsalgies Mécaniques',1),(33,'DORS INF','Dorsalgies Inflammatoires',1),(34,'CERV MEC','Cervicalgies Mécaniques',1),(35,'SCIAT','LomboSciatique ',1),(36,'CRUR','LomboCruralgie',1),(37,'DOUL SUP','Douleur Membre Supérieur',1),(38,'INGUINAL','Inguinalgie',1),(39,'CERV INF','Cervicalgies Inflammatoires',1),(40,'DOUL EP','Douleur Epaule',1),(41,'DOUL POI','Douleur Poignet',1),(42,'DOUL GEN','Douleur Genou',1),(43,'DOUL COU','Douleur Coude',1),(44,'DOUL HAN','Douleur Hanche',1),(45,'PAR MBRS','Paresthésies Membres Inférieurs',1),(46,'PAR MBRI','Paresthésies Membres Supérieurs',1),(47,'TR RACHI','Traumatisme Rachis',1),(48,'TR MBRS','Traumatisme Membres Supérieurs',1),(49,'TR MBRI','Traumatisme Membres Inférieurs',1),(50,'FAT MBRI','Fatiguabilité Membres Inférieurs',1),(51,'DOUL CHE','Douleur Cheville',1),(52,'DOUL PD','Douleur Pied',1),(53,'DOUL MA','Douleur Main',1);
/*!40000 ALTER TABLE `llx_cabinetmed_motifcons` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `llx_cabinetmed_patient`
--
DROP TABLE IF EXISTS `llx_cabinetmed_patient`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `llx_cabinetmed_patient` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`note_antemed` text,
`note_antechirgen` text,
`note_antechirortho` text,
`note_anterhum` text,
`note_other` text,
`note_traitclass` text,
`note_traitallergie` text,
`note_traitintol` text,
`note_traitspec` text,
PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `llx_cabinetmed_patient`
--
LOCK TABLES `llx_cabinetmed_patient` WRITE;
/*!40000 ALTER TABLE `llx_cabinetmed_patient` DISABLE KEYS */;
INSERT INTO `llx_cabinetmed_patient` (`rowid`, `note_antemed`, `note_antechirgen`, `note_antechirortho`, `note_anterhum`, `note_other`, `note_traitclass`, `note_traitallergie`, `note_traitintol`, `note_traitspec`) VALUES (2,'fffgfgfgf','','','','jjj','aaaagggggggg','','',''),(5,'a','b','c','d','','','','i','u'),(8,NULL,NULL,NULL,NULL,NULL,'','','','tr<span style=\"color: rgb(178, 34, 34);\"><strong>e tre tert</strong></span>er<br />\r\nt<br />\r\nter tert'),(26,NULL,NULL,NULL,NULL,NULL,'','','intol','spec pharma'),(46,'hfhf','dddd','','hfghfg','',NULL,'',NULL,NULL);
/*!40000 ALTER TABLE `llx_cabinetmed_patient` ENABLE KEYS */;
UNLOCK TABLES;
-- --
-- Table structure for table `llx_categorie` -- Table structure for table `llx_categorie`
-- --

File diff suppressed because one or more lines are too long

196
dev/initdata/savedemo.sh Executable file
View File

@ -0,0 +1,196 @@
#!/bin/sh
#------------------------------------------------------
# Script to extrac a database with demo values.
# Note: "dialog" tool need to be available if no parameter provided.
#
# Regis Houssin - regis@dolibarr.fr
# Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------
# Usage: savedemo.sh
# usage: savedemo.sh mysqldump_dolibarr_x.x.x.sql database port login pass
#------------------------------------------------------
export mydir=`echo "$0" | sed -e 's/savedemo.sh//'`;
if [ "x$mydir" = "x" ]
then
export mydir="."
fi
export id=`id -u`;
# ----------------------------- check if root
if [ "x$id" != "x0" -a "x$id" != "x1001" ]
then
echo "Script must be ran as root"
exit
fi
# ----------------------------- command line params
dumpfile=$1;
base=$2;
port=$3;
admin=$4;
passwd=$5;
# ----------------------------- if no params on command line
if [ "x$passwd" = "x" ]
then
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1`
export dumpfile=`basename $dumpfile`
# ----------------------------- input file
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Save Dolibarr with demo values" --clear \
--inputbox "Output dump file :" 16 55 $dumpfile 2> $fichtemp
valret=$?
case $valret in
0)
dumpfile=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
# ----------------------------- database name
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Save Dolibarr with demo values" --clear \
--inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp
valret=$?
case $valret in
0)
base=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
# ---------------------------- database port
DIALOG=${DIALOG=dialog}
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Save Dolibarr with demo values" --clear \
--inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp
valret=$?
case $valret in
0)
port=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
# ---------------------------- compte admin mysql
DIALOG=${DIALOG=dialog}
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Save Dolibarr with demo values" --clear \
--inputbox "Mysql root login (ex: root):" 16 55 root 2> $fichtemp
valret=$?
case $valret in
0)
admin=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
# ---------------------------- mot de passe admin mysql
DIALOG=${DIALOG=dialog}
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Save Dolibarr with demo values" --clear \
--inputbox "Password for Mysql root login :" 16 55 2> $fichtemp
valret=$?
case $valret in
0)
passwd=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
# ---------------------------- chemin d'acces du repertoire documents
#DIALOG=${DIALOG=dialog}
#fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
#trap "rm -f $fichtemp" 0 1 2 5 15
#$DIALOG --title "Save Dolibarr with demo values" --clear \
# --inputbox "Full path to documents directory (ex: /var/www/dolibarr/documents)- no / at end :" 16 55 2> $fichtemp
#valret=$?
#case $valret in
# 0)
#docs=`cat $fichtemp`;;
# 1)
#exit;;
# 255)
#exit;;
#esac
# ---------------------------- confirmation
DIALOG=${DIALOG=dialog}
$DIALOG --title "Save Dolibarr with demo values" --clear \
--yesno "Do you confirm ? \n Dump file : '$dumpfile' \n Dump dir : '$mydir' \n Mysql database : '$base' \n Mysql port : '$port' \n Mysql login: '$admin' \n Mysql password : '$passwd'" 15 55
case $? in
0) echo "Ok, start process...";;
1) exit;;
255) exit;;
esac
fi
# ---------------------------- run sql file
if [ "x$passwd" != "x" ]
then
export passwd="-p$passwd"
fi
export list="
--ignore-table=$base.llx_abonne
--ignore-table=$base.llx_abonne_extrafields
--ignore-table=$base.llx_abonne_type
--ignore-table=$base.llx_abonnement
--ignore-table=$base.llx_dolicloud_customers
--ignore-table=$base.llx_c_dolicloud_plans
--ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_ccam
--ignore-table=$base.llx_cabinetmed_c_examconclusion
--ignore-table=$base.llx_cabinetmed_cons
--ignore-table=$base.llx_cabinetmed_diaglec
--ignore-table=$base.llx_cabinetmed_examaut
--ignore-table=$base.llx_cabinetmed_exambio
--ignore-table=$base.llx_cabinetmed_examenprescrit
--ignore-table=$base.llx_cabinetmed_motifcons
--ignore-table=$base.llx_cabinetmed_patient"
echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile"
mysqldump -P$port -u$admin $passwd $list $base > $mydir/$dumpfile
export res=$?
if [ "x$res" = "x0" ]
then
echo "Success, file successfully loaded."
else
echo "Error, load failed."
fi
echo

View File

@ -0,0 +1 @@
http://www.taxrates.cc/index.html

View File

@ -35,8 +35,6 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
$langs->load("companies"); $langs->load("companies");
$langs->load("members"); $langs->load("members");
$mesg=isset($_GET["mesg"])?'<div class="ok">'.$_GET["mesg"].'</div>':'';
$id = GETPOST('id','int'); $id = GETPOST('id','int');
// Security check // Security check
@ -70,7 +68,7 @@ $form = new Form($db);
/* /*
* Fiche categorie de client et/ou fournisseur * Fiche categorie de client et/ou fournisseur
*/ */
if ($id) if ($object->id > 0)
{ {
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
@ -133,9 +131,6 @@ if ($id)
print '</div>'; print '</div>';
dol_htmloutput_mesg($mesg);
/* /*
* Barre d'action * Barre d'action
*/ */
@ -144,7 +139,9 @@ if ($id)
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))
{ {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>'; // FIXME socid parameters is not valid, a member is not a thirparty
//print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create">'.$langs->trans("AddAction").'</a>';
} }
print '</div>'; print '</div>';

View File

@ -473,7 +473,7 @@ llxHeader('',$langs->trans("Subscriptions"),'EN:Module_Foundations|FR:Module_Adh
if ($rowid) if ($rowid)
{ {
$res=$object->fetch($rowid,$ref); $res=$object->fetch($rowid);
if ($res < 0) { dol_print_error($db,$object->error); exit; } if ($res < 0) { dol_print_error($db,$object->error); exit; }
//$res=$object->fetch_optionals($object->id,$extralabels); //$res=$object->fetch_optionals($object->id,$extralabels);
//if ($res < 0) { dol_print_error($db); exit; } //if ($res < 0) { dol_print_error($db); exit; }
@ -558,10 +558,10 @@ if ($rowid)
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans("LinkedToDolibarrThirdParty"); print $langs->trans("LinkedToDolibarrThirdParty");
print '</td>'; print '</td>';
if ($_GET['action'] != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&amp;rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>'; if ($action != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&amp;rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td class="valeur">'; print '</td><td class="valeur">';
if ($_GET['action'] == 'editthirdparty') if ($action == 'editthirdparty')
{ {
$htmlname='socid'; $htmlname='socid';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="form'.$htmlname.'">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="form'.$htmlname.'">';
@ -813,7 +813,7 @@ if ($rowid)
print '<input type="hidden" name="action" value="cotisation">'; print '<input type="hidden" name="action" value="cotisation">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">'; print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="hidden" name="memberlabel" id="memberlabel" value="'.dol_escape_htmltag($object->getFullName($langs)).'">'; print '<input type="hidden" name="memberlabel" id="memberlabel" value="'.dol_escape_htmltag($object->getFullName($langs)).'">';
print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="'.dol_escape_htmltag($company->name).'">'; print '<input type="hidden" name="thirdpartylabel" id="thirdpartylabel" value="'.dol_escape_htmltag($object->name).'">';
print "<table class=\"border\" width=\"100%\">\n"; print "<table class=\"border\" width=\"100%\">\n";
$today=dol_now(); $today=dol_now();
@ -822,16 +822,16 @@ if ($rowid)
$paymentdate=-1; $paymentdate=-1;
// Date payment // Date payment
if ($_POST["paymentyear"] && $_POST["paymentmonth"] && $_POST["paymentday"]) if (GETPOST('paymentyear') && GETPOST('paymentmonth') && GETPOST('paymentday'))
{ {
$paymentdate=dol_mktime(0, 0, 0, $_POST["paymentmonth"], $_POST["paymentday"], $_POST["paymentyear"]); $paymentdate=dol_mktime(0, 0, 0, GETPOST('paymentmonth'), GETPOST('paymentday'), GETPOST('paymentyear'));
} }
// Date start subscription // Date start subscription
print '<tr><td width="30%" class="fieldrequired">'.$langs->trans("DateSubscription").'</td><td>'; print '<tr><td width="30%" class="fieldrequired">'.$langs->trans("DateSubscription").'</td><td>';
if ($_POST["reday"]) if (GETPOST('reday'))
{ {
$datefrom=dol_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]); $datefrom=dol_mktime(0,0,0,GETPOST('remonth'),GETPOST('reday'),GETPOST('reyear'));
} }
if (! $datefrom) if (! $datefrom)
{ {
@ -848,9 +848,9 @@ if ($rowid)
print "</td></tr>"; print "</td></tr>";
// Date end subscription // Date end subscription
if ($_POST["endday"]) if (GETPOST('endday'))
{ {
$dateto=dol_mktime(0,0,0,$_POST["endmonth"],$_POST["endday"],$_POST["endyear"]); $dateto=dol_mktime(0,0,0,GETPOST('endmonth'),GETPOST('endday'),GETPOST('endyear'));
} }
if (! $dateto) if (! $dateto)
{ {
@ -863,7 +863,7 @@ if ($rowid)
if ($adht->cotisation) if ($adht->cotisation)
{ {
// Amount // Amount
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="cotisation" size="6" value="'.$_POST["cotisation"].'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="cotisation" size="6" value="'.GETPOST('cotisation').'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
// Label // Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td>'; print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td>';
@ -926,33 +926,33 @@ if ($rowid)
// Bank account // Bank account
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("FinancialAccount").'</td><td>'; print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("FinancialAccount").'</td><td>';
$form->select_comptes($_POST["accountid"],'accountid',0,'',1); $form->select_comptes(GETPOST('accountid'),'accountid',0,'',1);
print "</td></tr>\n"; print "</td></tr>\n";
// Payment mode // Payment mode
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>'; print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("PaymentMode").'</td><td>';
$form->select_types_paiements($_POST["operation"],'operation','',2); $form->select_types_paiements(GETPOST('operation'),'operation','',2);
print "</td></tr>\n"; print "</td></tr>\n";
// Date of payment // Date of payment
print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>'; print '<tr class="bankswitchclass"><td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
$form->select_date($paymentdate?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1); $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1);
print "</td></tr>\n"; print "</td></tr>\n";
print '<tr class="bankswitchclass2"><td>'.$langs->trans('Numero'); print '<tr class="bankswitchclass2"><td>'.$langs->trans('Numero');
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>'; print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
print '</td>'; print '</td>';
print '<td><input id="fieldnum_chq" name="num_chq" type="text" size="8" value="'.(empty($_POST['num_chq'])?'':$_POST['num_chq']).'"></td></tr>'; print '<td><input id="fieldnum_chq" name="num_chq" type="text" size="8" value="'.(! GETPOST('num_chq')?'':GETPOST('num_chq')).'"></td></tr>';
print '<tr class="bankswitchclass2 fieldrequireddyn"><td>'.$langs->trans('CheckTransmitter'); print '<tr class="bankswitchclass2 fieldrequireddyn"><td>'.$langs->trans('CheckTransmitter');
print ' <em>('.$langs->trans("ChequeMaker").')</em>'; print ' <em>('.$langs->trans("ChequeMaker").')</em>';
print '</td>'; print '</td>';
print '<td><input id="fieldchqemetteur" name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->name:$_POST['chqemetteur']).'"></td></tr>'; print '<td><input id="fieldchqemetteur" name="chqemetteur" size="32" type="text" value="'.(! GETPOST('chqemetteur')?'':GETPOST('chqemetteur')).'"></td></tr>';
print '<tr class="bankswitchclass2"><td>'.$langs->trans('Bank'); print '<tr class="bankswitchclass2"><td>'.$langs->trans('Bank');
print ' <em>('.$langs->trans("ChequeBank").')</em>'; print ' <em>('.$langs->trans("ChequeBank").')</em>';
print '</td>'; print '</td>';
print '<td><input id="chqbank" name="chqbank" size="32" type="text" value="'.(empty($_POST['chqbank'])?'':$_POST['chqbank']).'"></td></tr>'; print '<td><input id="chqbank" name="chqbank" size="32" type="text" value="'.(! GETPOST('chqbank')?'':GETPOST('chqbank')).'"></td></tr>';
} }
} }
@ -972,7 +972,7 @@ if ($rowid)
$subjecttosend=$object->makeSubstitution($conf->global->ADHERENT_MAIL_COTIS_SUBJECT); $subjecttosend=$object->makeSubstitution($conf->global->ADHERENT_MAIL_COTIS_SUBJECT);
$texttosend=$object->makeSubstitution($adht->getMailOnSubscription()); $texttosend=$object->makeSubstitution($adht->getMailOnSubscription());
$tmp='<input name="sendmail" type="checkbox"'.((isset($_POST["sendmail"])?$_POST["sendmail"]:$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?' checked="checked"':'').'>'; $tmp='<input name="sendmail" type="checkbox"'.(GETPOST('sendmail')?GETPOST('sendmail'):(! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?' checked="checked"':'')).'>';
$helpcontent=''; $helpcontent='';
$helpcontent.='<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n"; $helpcontent.='<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n";
$helpcontent.='<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n"; $helpcontent.='<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";

View File

@ -1,10 +1,10 @@
<?php <?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> * Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2009-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -318,7 +318,7 @@ class Adherent extends CommonObject
$this->ref=$id; $this->ref=$id;
// Update minor fields // Update minor fields
$result=$this->update($user,1,1); // nosync is 1 to avoid update data of user $result=$this->update($user,1,1,0,0,'add'); // nosync is 1 to avoid update data of user
if ($result < 0) if ($result < 0)
{ {
$this->db->rollback(); $this->db->rollback();
@ -390,9 +390,10 @@ class Adherent extends CommonObject
* @param int $nosyncuser 0=Synchronize linked user (standard info), 1=Do not synchronize linked user * @param int $nosyncuser 0=Synchronize linked user (standard info), 1=Do not synchronize linked user
* @param int $nosyncuserpass 0=Synchronize linked user (password), 1=Do not synchronize linked user * @param int $nosyncuserpass 0=Synchronize linked user (password), 1=Do not synchronize linked user
* @param int $nosyncthirdparty 0=Synchronize linked thirdparty (standard info), 1=Do not synchronize linked thirdparty * @param int $nosyncthirdparty 0=Synchronize linked thirdparty (standard info), 1=Do not synchronize linked thirdparty
* @param string $action Current action for hookmanager
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0) function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0,$action='update')
{ {
global $conf, $langs; global $conf, $langs;
@ -470,11 +471,14 @@ class Adherent extends CommonObject
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) if (empty($reshook))
{ {
$result=$this->insertExtraFields(); if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if ($result < 0) {
{ $result=$this->insertExtraFields();
$error++; if ($result < 0)
} {
$error++;
}
}
} }
else if ($reshook < 0) $error++; else if ($reshook < 0) $error++;

View File

@ -196,8 +196,7 @@ if ($id > 0)
// List of document // List of document
$param='&socid='.$societe->id; $formfile->list_of_documents($filearray,$member,'member','', 0, get_exdir($member->id,2,0,1).'/'.$member->id.'/');
$formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($member->id,2,0,1).'/'.$member->id.'/');
print "<br><br>"; print "<br><br>";
} }

View File

@ -52,9 +52,6 @@ $typeid=GETPOST('typeid','int');
$userid=GETPOST('userid','int'); $userid=GETPOST('userid','int');
$socid=GETPOST('socid','int'); $socid=GETPOST('socid','int');
// Security check
$result=restrictedArea($user,'adherent',$rowid,'','','fk_soc', 'rowid', $objcanvas);
if (! empty($conf->mailmanspip->enabled)) if (! empty($conf->mailmanspip->enabled))
{ {
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
@ -78,6 +75,9 @@ if (! empty($canvas))
$objcanvas->getCanvas('adherent', 'membercard', $canvas); $objcanvas->getCanvas('adherent', 'membercard', $canvas);
} }
// Security check
$result=restrictedArea($user,'adherent',$rowid,'','','fk_soc', 'rowid', $objcanvas);
$errmsg=''; $errmsgs=array(); $errmsg=''; $errmsgs=array();
if ($rowid > 0) if ($rowid > 0)
@ -735,7 +735,7 @@ else
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
$object->canvas=$canvas; $object->canvas=$canvas;
$object->fk_departement = $_POST["departement_id"]; $object->fk_departement = GETPOST('departement_id', 'int');
// We set country_id, country_code and country for the selected country // We set country_id, country_code and country for the selected country
$object->country_id=GETPOST('country_id','int')?GETPOST('country_id','int'):$mysoc->country_id; $object->country_id=GETPOST('country_id','int')?GETPOST('country_id','int'):$mysoc->country_id;
@ -905,7 +905,7 @@ else
{ {
foreach($extrafields->attribute_label as $key=>$label) foreach($extrafields->attribute_label as $key=>$label)
{ {
$value=(isset($_POST["options_".$key])?GETPOST('options_'.$key,'alpha'):$object->array_options["options_".$key]); $value=(isset($_POST["options_".$key])?GETPOST('options_'.$key,'alpha'):(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
print '<tr><td'; print '<tr><td';
if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"'; if (! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
print '>'.$label.'</td><td>'; print '>'.$label.'</td><td>';
@ -1235,7 +1235,7 @@ else
dol_htmloutput_errors($errmsg,$errmsgs); dol_htmloutput_errors($errmsg,$errmsgs);
// Confirm create user // Confirm create user
if ($_GET["action"] == 'create_user') if ($action == 'create_user')
{ {
$login=$object->login; $login=$object->login;
if (empty($login)) if (empty($login))
@ -1261,7 +1261,7 @@ else
} }
// Confirm create third party // Confirm create third party
if ($_GET["action"] == 'create_thirdparty') if ($action == 'create_thirdparty')
{ {
$name = $object->getFullName($langs); $name = $object->getFullName($langs);
if (! empty($name)) if (! empty($name))
@ -1348,7 +1348,7 @@ else
// Cree un tableau formulaire // Cree un tableau formulaire
$formquestion=array(); $formquestion=array();
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?'true':'false')); if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false'));
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"])); if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
$ret=$form->form_confirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion); $ret=$form->form_confirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
@ -1495,10 +1495,10 @@ else
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans("LinkedToDolibarrThirdParty"); print $langs->trans("LinkedToDolibarrThirdParty");
print '</td>'; print '</td>';
if ($_GET['action'] != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&amp;rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>'; if ($action != 'editthirdparty' && $user->rights->adherent->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editthirdparty&amp;rowid='.$object->id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="2" class="valeur">'; print '</td><td colspan="2" class="valeur">';
if ($_GET['action'] == 'editthirdparty') if ($action == 'editthirdparty')
{ {
$htmlname='socid'; $htmlname='socid';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="form'.$htmlname.'">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" name="form'.$htmlname.'">';
@ -1533,7 +1533,7 @@ else
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans("LinkedToDolibarrUser"); print $langs->trans("LinkedToDolibarrUser");
print '</td>'; print '</td>';
if ($_GET['action'] != 'editlogin' && $user->rights->adherent->creer) if ($action != 'editlogin' && $user->rights->adherent->creer)
{ {
print '<td align="right">'; print '<td align="right">';
if ($user->rights->user->user->creer) if ($user->rights->user->user->creer)
@ -1544,7 +1544,7 @@ else
} }
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="2" class="valeur">'; print '</td><td colspan="2" class="valeur">';
if ($_GET['action'] == 'editlogin') if ($action == 'editlogin')
{ {
print $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid',''); print $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid','');
} }

View File

@ -169,11 +169,11 @@ if ($conf->use_javascript_ajax)
{ {
$datalabels[]=array($i,$adhtype->getNomUrl(0,dol_size(16))); $datalabels[]=array($i,$adhtype->getNomUrl(0,dol_size(16)));
$dataval['draft'][]=array($i,isset($MemberToValidate[$key])?$MemberToValidate[$key]:0); $dataval['draft'][]=array($i,isset($MemberToValidate[$key])?$MemberToValidate[$key]:0);
$dataval['notuptodate'][]=array($i,isset($MembersValidated[$key])?$MembersValidated[$key]-$MemberUpToDate[$key]:0); $dataval['notuptodate'][]=array($i,isset($MembersValidated[$key])?$MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0):0);
$dataval['uptodate'][]=array($i,isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0); $dataval['uptodate'][]=array($i,isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0);
$dataval['resiliated'][]=array($i,isset($MembersResiliated[$key])?$MembersResiliated[$key]:0); $dataval['resiliated'][]=array($i,isset($MembersResiliated[$key])?$MembersResiliated[$key]:0);
$SommeA+=isset($MemberToValidate[$key])?$MemberToValidate[$key]:0; $SommeA+=isset($MemberToValidate[$key])?$MemberToValidate[$key]:0;
$SommeB+=isset($MembersValidated[$key])?$MembersValidated[$key]-$MemberUpToDate[$key]:0; $SommeB+=isset($MembersValidated[$key])?$MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0):0;
$SommeC+=isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0; $SommeC+=isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0;
$SommeD+=isset($MembersResiliated[$key])?$MembersResiliated[$key]:0; $SommeD+=isset($MembersResiliated[$key])?$MembersResiliated[$key]:0;
$i++; $i++;
@ -336,7 +336,7 @@ foreach ($AdherentType as $key => $adhtype)
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td>'.$adhtype->getNomUrl(1, dol_size(32)).'</td>'; print '<td>'.$adhtype->getNomUrl(1, dol_size(32)).'</td>';
print '<td align="right">'.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->cotisation,0,3).'</td>'; print '<td align="right">'.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->cotisation,0,3).'</td>';
print '<td align="right">'.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-$MemberUpToDate[$key] > 0) ? $MembersValidated[$key]-$MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,0,3).'</td>'; print '<td align="right">'.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0) > 0) ? $MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0):'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,0,3).'</td>';
print '<td align="right">'.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,$now,3).'</td>'; print '<td align="right">'.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,$now,3).'</td>';
print '<td align="right">'.(isset($MembersResiliated[$key]) && $MembersResiliated[$key]> 0 ?$MembersResiliated[$key]:'').' '.$staticmember->LibStatut(0,$adhtype->cotisation,0,3).'</td>'; print '<td align="right">'.(isset($MembersResiliated[$key]) && $MembersResiliated[$key]> 0 ?$MembersResiliated[$key]:'').' '.$staticmember->LibStatut(0,$adhtype->cotisation,0,3).'</td>';
print "</tr>\n"; print "</tr>\n";

View File

@ -57,7 +57,7 @@ if ($action == 'update' && $user->rights->adherent->creer && ! $_POST["cancel"])
$res=$object->update_note($_POST["note"],$user); $res=$object->update_note($_POST["note"],$user);
if ($res < 0) if ($res < 0)
{ {
$mesg='<div class="error">'.$object->error.'</div>'; setEventMessage($object->error, 'errors');
$db->rollback(); $db->rollback();
} }
else else
@ -82,8 +82,6 @@ if ($id)
dol_fiche_head($head, 'note', $langs->trans("Member"), 0, 'user'); dol_fiche_head($head, 'note', $langs->trans("Member"), 0, 'user');
dol_htmloutput_errors($msg);
print "<form method=\"post\" action=\"note.php\">"; print "<form method=\"post\" action=\"note.php\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';

View File

@ -502,9 +502,9 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$result = $db->query($sql); $result = $db->query($sql);
if ($result) // Add is ok if ($result) // Add is ok
{ {
$oldid=$id; //$oldid=$id;
$_POST=array('id'=>$oldid); // Clean $_POST array, we keep only //$_POST=array('id'=>$oldid); // Clean $_POST array, we keep only
$_GET["id"]=$_POST["id"]; // Force affichage dictionnaire en cours d'edition //$_GET["id"]=$_POST["id"]; // Force affichage dictionnaire en cours d'edition
} }
else else
{ {
@ -558,12 +558,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
} }
if ($msg) $msg='<div class="error">'.$msg.'</div>'; if ($msg) $msg='<div class="error">'.$msg.'</div>';
$_GET["id"]=$_POST["id"]; // Force affichage dictionnaire en cours d'edition //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
} }
if (GETPOST('actioncancel')) if (GETPOST('actioncancel'))
{ {
$_GET["id"]=$_POST["id"]; // Force affichage dictionnaire en cours d'edition //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
} }
if ($action == 'confirm_delete' && $confirm == 'yes') // delete if ($action == 'confirm_delete' && $confirm == 'yes') // delete
@ -778,7 +778,7 @@ if ($id)
} }
$tmpaction = 'create'; $tmpaction = 'create';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$_GET["id"]]); $parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors; $error=$hookmanager->error; $errors=$hookmanager->errors;
@ -947,69 +947,69 @@ if ($id)
$valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
$valuetoshow=nl2br($valuetoshow); $valuetoshow=nl2br($valuetoshow);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_pays') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_pays') {
$key=$langs->trans("Country".strtoupper($obj->code)); $key=$langs->trans("Country".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_availability') { else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
$langs->load("propal"); $langs->load("propal");
$key=$langs->trans("AvailabilityType".strtoupper($obj->code)); $key=$langs->trans("AvailabilityType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_actioncomm') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') {
$key=$langs->trans("Action".strtoupper($obj->code)); $key=$langs->trans("Action".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if (! empty($obj->code_iso) && $fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_currencies') { else if (! empty($obj->code_iso) && $fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') {
$key=$langs->trans("Currency".strtoupper($obj->code_iso)); $key=$langs->trans("Currency".strtoupper($obj->code_iso));
$valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_typent') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') {
$key=$langs->trans(strtoupper($obj->code)); $key=$langs->trans(strtoupper($obj->code));
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_prospectlevel') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') {
$key=$langs->trans(strtoupper($obj->code)); $key=$langs->trans(strtoupper($obj->code));
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_civilite') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_civilite') {
$key=$langs->trans("Civility".strtoupper($obj->code)); $key=$langs->trans("Civility".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_type_contact') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
$key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); $key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_payment_term') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') {
$langs->load("bills"); $langs->load("bills");
$key=$langs->trans("PaymentConditionShort".strtoupper($obj->code)); $key=$langs->trans("PaymentConditionShort".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_paiement') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') {
$langs->load("bills"); $langs->load("bills");
$key=$langs->trans("PaymentType".strtoupper($obj->code)); $key=$langs->trans("PaymentType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_input_reason') { else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') {
$key=$langs->trans("DemandReasonType".strtoupper($obj->code)); $key=$langs->trans("DemandReasonType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_input_method') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') {
$langs->load("orders"); $langs->load("orders");
$key=$langs->trans($obj->code); $key=$langs->trans($obj->code);
$valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->$fieldlist[$field]; $valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->$fieldlist[$field];
} }
else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_shipment_mode') { else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') {
$langs->load("sendings"); $langs->load("sendings");
$key=$langs->trans("SendingMethod".strtoupper($obj->code)); $key=$langs->trans("SendingMethod".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); $valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field] == 'libelle' && $tabname[$_GET['id']]==MAIN_DB_PREFIX.'c_paper_format') else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format')
{ {
$key = $langs->trans('PaperFormat'.strtoupper($obj->code)); $key = $langs->trans('PaperFormat'.strtoupper($obj->code));
$valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->$fieldlist[$field]); $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->$fieldlist[$field]);
} }
else if ($fieldlist[$field] == 'libelle' && $tabname[$_GET['id']] == MAIN_DB_PREFIX.'c_type_fees') else if ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees')
{ {
$langs->load('trips'); $langs->load('trips');
$key = $langs->trans(strtoupper($obj->code)); $key = $langs->trans(strtoupper($obj->code));
@ -1022,7 +1022,7 @@ if ($id)
$valuetoshow = getCurrencySymbol($obj->code); $valuetoshow = getCurrencySymbol($obj->code);
} }
else if (($fieldlist[$field] == 'unit') && ($tabname[$_GET['id']] == MAIN_DB_PREFIX.'c_paper_format')) else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
{ {
$key = $langs->trans('SizeUnit'.strtolower($obj->unit)); $key = $langs->trans('SizeUnit'.strtolower($obj->unit));
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->$fieldlist[$field]); $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->$fieldlist[$field]);
@ -1269,7 +1269,7 @@ function fieldList($fieldlist,$obj='',$tabname='')
elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type') elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type')
{ {
print '<td align="center">'; print '<td align="center">';
print $form->selectarray($fieldlist[$field], $localtax_typeList,$obj->$fieldlist[$field]); print $form->selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:''));
print '</td>'; print '</td>';
} }
else else

View File

@ -63,7 +63,7 @@ class Categorie
* Load category into memory from database * Load category into memory from database
* *
* @param int $id Id of category * @param int $id Id of category
* @param strin $label Label of category * @param string $label Label of category
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch($id,$label='') function fetch($id,$label='')
@ -86,20 +86,27 @@ class Categorie
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql)
{ {
$res = $this->db->fetch_array($resql); if ($this->db->num_rows($resql) > 0)
{
$res = $this->db->fetch_array($resql);
$this->id = $res['rowid']; $this->id = $res['rowid'];
$this->fk_parent = $res['fk_parent']; $this->fk_parent = $res['fk_parent'];
$this->label = $res['label']; $this->label = $res['label'];
$this->description = $res['description']; $this->description = $res['description'];
$this->socid = $res['fk_soc']; $this->socid = $res['fk_soc'];
$this->visible = $res['visible']; $this->visible = $res['visible'];
$this->type = $res['type']; $this->type = $res['type'];
$this->entity = $res['entity']; $this->entity = $res['entity'];
$this->db->free($resql); $this->db->free($resql);
return 1; return 1;
}
else
{
return 0;
}
} }
else else
{ {
@ -695,9 +702,9 @@ class Categorie
/** /**
* Retourne toutes les categories * Retourne toutes les categories
* *
* @param int Type of category * @param int $type Type of category
* @param boolean Just parent categories if true * @param boolean $parent Just parent categories if true
* @return array Tableau d'objet Categorie * @return array Tableau d'objet Categorie
*/ */
function get_all_categories($type=null, $parent=false) function get_all_categories($type=null, $parent=false)
{ {
@ -800,7 +807,7 @@ class Categorie
/** /**
* Retourne les categories de premier niveau (qui ne sont pas filles) * Retourne les categories de premier niveau (qui ne sont pas filles)
* *
* @param int Type of category * @param int $type Type of category
* @return void * @return void
*/ */
function get_main_categories($type=null) function get_main_categories($type=null)

View File

@ -51,6 +51,7 @@ class ActionComm extends CommonObject
var $datep; // Date action start (datep) var $datep; // Date action start (datep)
var $datef; // Date action end (datep2) var $datef; // Date action end (datep2)
var $dateend; // ??
var $durationp = -1; // -1=Unkown duration var $durationp = -1; // -1=Unkown duration
var $fulldayevent = 0; // 1=Event on full day var $fulldayevent = 0; // 1=Event on full day
var $punctual = 1; // Milestone var $punctual = 1; // Milestone

View File

@ -381,54 +381,45 @@ if ($action == 'create')
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
print "\n".'<script type="text/javascript" language="javascript">'; print "\n".'<script type="text/javascript">';
print 'jQuery(document).ready(function () { print '$(document).ready(function () {
function setdatefields() function setdatefields()
{ {
if (jQuery("#fullday:checked").val() == null) if ($("#fullday:checked").val() == null) {
{ $(".fulldaystarthour").removeAttr("disabled");
jQuery(".fulldaystarthour").attr(\'disabled\', false); $(".fulldaystartmin").removeAttr("disabled");
jQuery(".fulldaystartmin").attr(\'disabled\', false); $(".fulldayendhour").removeAttr("disabled");
jQuery(".fulldayendhour").attr(\'disabled\', false); $(".fulldayendmin").removeAttr("disabled");
jQuery(".fulldayendmin").attr(\'disabled\', false); } else {
} $(".fulldaystarthour").attr("disabled","disabled").val("00");
else $(".fulldaystartmin").attr("disabled","disabled").val("00");
{ $(".fulldayendhour").attr("disabled","disabled").val("23");
jQuery(".fulldaystarthour").attr(\'disabled\', true); $(".fulldayendmin").attr("disabled","disabled").val("59");
jQuery(".fulldaystartmin").attr(\'disabled\', true); }
jQuery(".fulldayendhour").attr(\'disabled\', true); }
jQuery(".fulldayendmin").attr(\'disabled\', true);
jQuery(".fulldaystarthour").val("00");
jQuery(".fulldaystartmin").val("00");
//jQuery(".fulldayendhour").val("00");
//jQuery(".fulldayendmin").val("00");
jQuery(".fulldayendhour").val("23");
jQuery(".fulldayendmin").val("59");
}
}
setdatefields(); setdatefields();
jQuery("#fullday").change(function() { $("#fullday").change(function() {
setdatefields(); setdatefields();
}); });
jQuery("#selectcomplete").change(function() { $("#selectcomplete").change(function() {
if (jQuery("#selectcomplete").val() == 100) if ($("#selectcomplete").val() == 100)
{ {
if (jQuery("#doneby").val() <= 0) jQuery("#doneby").val(\''.$user->id.'\'); if ($("#doneby").val() <= 0) $("#doneby").val(\''.$user->id.'\');
} }
if (jQuery("#selectcomplete").val() == 0) if ($("#selectcomplete").val() == 0)
{ {
jQuery("#doneby").val(-1); $("#doneby").val(-1);
} }
}); });
jQuery("#actioncode").change(function() { $("#actioncode").change(function() {
if (jQuery("#actioncode").val() == \'AC_RDV\') jQuery("#dateend").addClass("fieldrequired"); if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired");
else jQuery("#dateend").removeClass("fieldrequired"); else $("#dateend").removeClass("fieldrequired");
}); });
})'; })';
print '</script>'."\n"; print '</script>'."\n";
} }
print '<form name="formaction" action="'.DOL_URL_ROOT.'/comm/action/fiche.php" method="POST">'; print '<form name="formaction" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add_action">'; print '<input type="hidden" name="action" value="add_action">';
if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">'; if ($backtopage) print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]).'">';
@ -647,43 +638,34 @@ if ($id)
if ($action == 'edit') if ($action == 'edit')
{ {
if ($conf->use_javascript_ajax) if (! empty($conf->use_javascript_ajax))
{ {
print "\n".'<script type="text/javascript" language="javascript">'; print "\n".'<script type="text/javascript">';
print 'jQuery(document).ready(function () { print '$(document).ready(function () {
function setdatefields() function setdatefields()
{ {
if (jQuery("#fullday:checked").val() == null) if ($("#fullday:checked").val() == null) {
{ $(".fulldaystarthour").removeAttr("disabled");
jQuery(".fulldaystarthour").attr(\'disabled\', false); $(".fulldaystartmin").removeAttr("disabled");
jQuery(".fulldaystartmin").attr(\'disabled\', false); $(".fulldayendhour").removeAttr("disabled");
jQuery(".fulldayendhour").attr(\'disabled\', false); $(".fulldayendmin").removeAttr("disabled");
jQuery(".fulldayendmin").attr(\'disabled\', false); } else {
} $(".fulldaystarthour").attr("disabled","disabled").val("00");
else $(".fulldaystartmin").attr("disabled","disabled").val("00");
{ $(".fulldayendhour").attr("disabled","disabled").val("23");
jQuery(".fulldaystarthour").attr(\'disabled\', true); $(".fulldayendmin").attr("disabled","disabled").val("59");
jQuery(".fulldaystartmin").attr(\'disabled\', true); }
jQuery(".fulldayendhour").attr(\'disabled\', true); }
jQuery(".fulldayendmin").attr(\'disabled\', true); setdatefields();
jQuery(".fulldaystarthour").val("00"); $("#fullday").change(function() {
jQuery(".fulldaystartmin").val("00"); setdatefields();
//jQuery(".fulldayendhour").val("00"); });
//jQuery(".fulldayendmin").val("00");
jQuery(".fulldayendhour").val("23");
jQuery(".fulldayendmin").val("59");
}
}
setdatefields();
jQuery("#fullday").change(function() {
setdatefields();
});
})'; })';
print '</script>'."\n"; print '</script>'."\n";
} }
// Fiche action en mode edition // Fiche action en mode edition
print '<form name="formaction" action="'.DOL_URL_ROOT.'/comm/action/fiche.php" method="post">'; print '<form name="formaction" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="id" value="'.$id.'">';

View File

@ -981,8 +981,22 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
// Define $color and $cssclass of event // Define $color and $cssclass of event
$color=-1; $cssclass=''; $colorindex=-1; $color=-1; $cssclass=''; $colorindex=-1;
if ($event->author->id == $user->id || $event->usertodo->id == $user->id || $event->userdone->id == $user->id) { $nummytasks++; $colorindex=1; $cssclass='family_mytasks'; } if ((! empty($event->author->id) && $event->author->id == $user->id)
else if ($event->type_code == 'ICALEVENT') { $numical++; $numicals[dol_string_nospecial($event->icalname)]++; $color=$event->icalcolor; $cssclass=($event->icalname?'family_'.dol_string_nospecial($event->icalname):'family_other'); } || (! empty($event->usertodo->id) && $event->usertodo->id == $user->id)
|| (! empty($event->userdone->id) && $event->userdone->id == $user->id)) {
$nummytasks++; $colorindex=1; $cssclass='family_mytasks';
}
else if ($event->type_code == 'ICALEVENT') {
$numical++;
if (! empty($event->icalname)) {
if (! isset($numicals[dol_string_nospecial($event->icalname)])) {
$numicals[dol_string_nospecial($event->icalname)] = 0;
}
$numicals[dol_string_nospecial($event->icalname)]++;
}
$color=$event->icalcolor;
$cssclass=(! empty($event->icalname)?'family_'.dol_string_nospecial($event->icalname):'family_other');
}
else if ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday'; } else if ($event->type_code == 'BIRTHDAY') { $numbirthday++; $colorindex=2; $cssclass='family_birthday'; }
else { $numother++; $colorindex=2; $cssclass='family_other'; } else { $numother++; $colorindex=2; $cssclass='family_other'; }
if ($color == -1) $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); if ($color == -1) $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);

View File

@ -473,7 +473,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
{ {
$langs->load("propal"); $langs->load("propal");
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp"; $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."propal as p"; $sql.= ", ".MAIN_DB_PREFIX."propal as p";
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@ -513,7 +513,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
print $propalstatic->getNomUrl(1); print $propalstatic->getNomUrl(1);
print '</td>'; print '</td>';
print '<td width="18" class="nobordernopadding" nowrap="nowrap">'; print '<td width="18" class="nobordernopadding" nowrap="nowrap">';
if ($db->jdate($obj->dp) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); if ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
print '</td>'; print '</td>';
print '<td width="16" align="center" class="nobordernopadding">'; print '<td width="16" align="center" class="nobordernopadding">';
$filename=dol_sanitizeFileName($obj->ref); $filename=dol_sanitizeFileName($obj->ref);

View File

@ -36,6 +36,8 @@ $langs->load('companies');
$langs->load('projects'); $langs->load('projects');
$langs->load('propal'); $langs->load('propal');
$action=GETPOST('action', 'alpha');
// Security check // Security check
$socid = GETPOST('socid','int'); $socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
@ -48,19 +50,19 @@ $object = new Prospect($db);
* Actions * Actions
*/ */
if ($_GET["action"] == 'cstc') if ($action == 'cstc')
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm = ".$_GET["stcomm"]; $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm = ".$_GET["stcomm"];
$sql .= " WHERE rowid = ".$_GET["socid"]; $sql .= " WHERE rowid = ".$socid;
$db->query($sql); $db->query($sql);
} }
// set prospect level // set prospect level
if ($_POST["action"] == 'setprospectlevel' && $user->rights->societe->creer) if ($action == 'setprospectlevel' && $user->rights->societe->creer)
{ {
$object->fetch($_GET["socid"]); $object->fetch($socid);
$object->fk_prospectlevel=$_POST['prospect_level_id']; $object->fk_prospectlevel=$_POST['prospect_level_id'];
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_prospectlevel='".$_POST['prospect_level_id']; $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_prospectlevel='".$_POST['prospect_level_id'];
$sql.= "' WHERE rowid='".$_GET["socid"]."'"; $sql.= " WHERE rowid = ".$socid;
$result = $db->query($sql); $result = $db->query($sql);
if (! $result) dol_print_error($result); if (! $result) dol_print_error($result);
} }
@ -111,7 +113,7 @@ if ($socid > 0)
print "</td></tr>"; print "</td></tr>";
// Zip / Town // Zip / Town
print '<tr><td nowrap="nowrap">'.$langs->trans('Zip').' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$societe->town.'</td>'; print '<tr><td nowrap="nowrap">'.$langs->trans('Zip').' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
print '</tr>'; print '</tr>';
// Country // Country
@ -136,18 +138,13 @@ if ($socid > 0)
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
print $langs->trans('ProspectLevelShort'); print $langs->trans('ProspectLevelShort');
print '<td>'; print '<td>';
if (($_GET['action'] != 'editlevel') && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetLevel'),1).'</a></td>'; if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&amp;socid='.$object->id.'">'.img_edit($langs->trans('SetLevel'),1).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="3">'; print '</td><td colspan="3">';
if ($_GET['action'] == 'editlevel') if ($action == 'editlevel')
{
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1); $formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
}
else else
{
print $object->getLibLevel(); print $object->getLibLevel();
//$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$objsoc->id,$objsoc->mode_reglement,'none');
}
print "</td>"; print "</td>";
print '</tr>'; print '</tr>';

View File

@ -266,7 +266,25 @@ else if ($action == 'setmode' && $user->rights->facture->creer)
else if ($action == 'setinvoicedate' && $user->rights->facture->creer) else if ($action == 'setinvoicedate' && $user->rights->facture->creer)
{ {
$object->fetch($id); $object->fetch($id);
$old_date_lim_reglement=$object->date_lim_reglement;
$object->date=dol_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']); $object->date=dol_mktime(12,0,0,$_POST['invoicedatemonth'],$_POST['invoicedateday'],$_POST['invoicedateyear']);
$new_date_lim_reglement=$object->calculate_date_lim_reglement();
if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement=$new_date_lim_reglement;
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement=$object->date;
$result=$object->update($user);
if ($result < 0) dol_print_error($db,$object->error);
}
else if ($action == 'setconditions' && $user->rights->facture->creer)
{
$object->fetch($id);
$object->cond_reglement_code=0; // To clean property
$object->cond_reglement_id=0; // To clean property
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
if ($result < 0) dol_print_error($db,$object->error);
$old_date_lim_reglement=$object->date_lim_reglement;
$new_date_lim_reglement=$object->calculate_date_lim_reglement();
if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement=$new_date_lim_reglement;
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement=$object->date; if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement=$object->date;
$result=$object->update($user); $result=$object->update($user);
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
@ -277,25 +295,17 @@ else if ($action == 'setpaymentterm' && $user->rights->facture->creer)
$object->date_lim_reglement=dol_mktime(12,0,0,$_POST['paymenttermmonth'],$_POST['paymenttermday'],$_POST['paymenttermyear']); $object->date_lim_reglement=dol_mktime(12,0,0,$_POST['paymenttermmonth'],$_POST['paymenttermday'],$_POST['paymenttermyear']);
if ($object->date_lim_reglement < $object->date) if ($object->date_lim_reglement < $object->date)
{ {
$object->date_lim_reglement=$object->date; $object->date_lim_reglement=$object->calculate_date_lim_reglement();
setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"),'warnings'); setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"),'warnings');
} }
$result=$object->update($user); $result=$object->update($user);
if ($result < 0) dol_print_error($db,$object->error); if ($result < 0) dol_print_error($db,$object->error);
} }
else if ($action == 'setconditions' && $user->rights->facture->creer)
{
$object->fetch($id);
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
if ($result < 0) dol_print_error($db,$object->error);
}
else if ($action == 'setremisepercent' && $user->rights->facture->creer) else if ($action == 'setremisepercent' && $user->rights->facture->creer)
{ {
$object->fetch($id); $object->fetch($id);
$result = $object->set_remise($user, $_POST['remise_percent']); $result = $object->set_remise($user, $_POST['remise_percent']);
} }
else if ($action == "setabsolutediscount" && $user->rights->facture->creer) else if ($action == "setabsolutediscount" && $user->rights->facture->creer)
{ {
// POST[remise_id] ou POST[remise_id_for_payment] // POST[remise_id] ou POST[remise_id_for_payment]
@ -764,7 +774,7 @@ else if ($action == 'add' && $user->rights->facture->creer)
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; }
if ($element == 'contract') { $element = $subelement = 'contrat'; } if ($element == 'contract') { $element = $subelement = 'contrat'; }
if ($element == 'inter') { $element = $subelement = 'ficheinter'; } if ($element == 'inter') { $element = $subelement = 'ficheinter'; }
if ($element == 'shipping') {$element = $subelement = 'expedition'; } if ($element == 'shipping') { $element = $subelement = 'expedition'; }
$object->origin = $_POST['origin']; $object->origin = $_POST['origin'];
$object->origin_id = $_POST['originid']; $object->origin_id = $_POST['originid'];
@ -2823,14 +2833,40 @@ else if ($id > 0 || ! empty($ref))
print '</table>'; print '</table>';
// Margin Infos // Margin Infos
if (! empty($conf->margin->enabled)) { if (! empty($conf->margin->enabled))
print '<br>'; {
$object->displayMarginInfos($object->statut > 0); print '<br>';
} $object->displayMarginInfos($object->statut > 0);
}
print '</td></tr>'; print '</td></tr>';
// Conditions de reglement
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('PaymentConditionsShort');
print '</td>';
if ($object->type != 2 && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;facid='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($object->type != 2)
{
if ($action == 'editconditions')
{
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
}
else
{
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'none');
}
}
else
{
print '&nbsp;';
}
print '</td></tr>';
// Date payment term // Date payment term
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
@ -2857,32 +2893,7 @@ else if ($id > 0 || ! empty($ref))
} }
print '</td></tr>'; print '</td></tr>';
// Conditions de reglement // Payment mode
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('PaymentConditionsShort');
print '</td>';
if ($object->type != 2 && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editconditions&amp;facid='.$object->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($object->type != 2)
{
if ($action == 'editconditions')
{
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
}
else
{
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'none');
}
}
else
{
print '&nbsp;';
}
print '</td></tr>';
// Mode de reglement
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('PaymentMode'); print $langs->trans('PaymentMode');
@ -2907,23 +2918,20 @@ else if ($id > 0 || ! empty($ref))
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right" colspan="2" nowrap>'.price($object->total_tva).'</td>'; print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right" colspan="2" nowrap>'.price($object->total_tva).'</td>';
print '<td>'.$langs->trans('Currency'.$conf->currency).'</td>'; print '<td>'.$langs->trans('Currency'.$conf->currency).'</td>';
print '</tr>'; print '</tr>';
// Amount Local Taxes // Amount Local Taxes
if ($mysoc->pays_code=='ES') if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
{ {
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>';
{ print '<td align="right" colspan="2" nowrap>'.price($object->total_localtax1).'</td>';
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
print '<td align="right" colspan="2" nowrap>'.price($object->total_localtax1).'</td>'; }
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>'; if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
} {
if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>';
{ print '<td align="right" colspan="2" nowrap>'.price($object->total_localtax2).'</td>';
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
print '<td align="right" colspan="2" nowrap>'.price($object->total_localtax2).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
}
} }
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right" colspan="2" nowrap>'.price($object->total_ttc).'</td>'; print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right" colspan="2" nowrap>'.price($object->total_ttc).'</td>';

View File

@ -446,12 +446,13 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$sql = 'SELECT f.rowid as facid, f.facnumber, f.total_ttc, f.type, '; $sql = 'SELECT f.rowid as facid, f.facnumber, f.total_ttc, f.type, ';
$sql.= ' f.datef as df'; $sql.= ' f.datef as df';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
$sql.= ' WHERE f.fk_soc = '.$facture->socid; $sql.= ' WHERE f.entity = '.$conf->entity;
$sql.= ' AND f.fk_soc = '.$facture->socid;
$sql.= ' AND f.paye = 0'; $sql.= ' AND f.paye = 0';
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => not validated, Statut=2 => canceled $sql.= ' AND f.fk_statut = 1'; // Statut=0 => not validated, Statut=2 => canceled
if ($facture->type != 2) if ($facture->type != 2)
{ {
$sql .= ' AND type in (0,1,3)'; // Standard invoice, replacement, deposit $sql .= ' AND type IN (0,1,3)'; // Standard invoice, replacement, deposit
} }
else else
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -36,8 +36,7 @@ $action=GETPOST("action");
// Security check // Security check
$socid = GETPOST('socid','int'); $socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'tax', $langs->trans("SocialContribution"), '', 'charges'); $result = restrictedArea($user, 'tax', $id, 'chargesociales','charges');

View File

@ -262,8 +262,12 @@ class ChargeSociales extends CommonObject
*/ */
function solde($year = 0) function solde($year = 0)
{ {
$sql = "SELECT sum(f.amount) as amount"; global $conf;
$sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as f WHERE paye = 0";
$sql = "SELECT SUM(f.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."chargesociales as f";
$sql.= " WHERE f.entity = ".$conf->entity;
$sql.= " AND paye = 0";
if ($year) { if ($year) {
$sql .= " AND f.datev >= '$y-01-01' AND f.datev <= '$y-12-31' "; $sql .= " AND f.datev >= '$y-01-01' AND f.datev <= '$y-12-31' ";
@ -300,8 +304,8 @@ class ChargeSociales extends CommonObject
*/ */
function set_paid($user) function set_paid($user)
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales"; $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET";
$sql.= " set paye=1"; $sql.= " paye = 1";
$sql.= " WHERE rowid = ".$this->id; $sql.= " WHERE rowid = ".$this->id;
$return = $this->db->query($sql); $return = $this->db->query($sql);
if ($return) return 1; if ($return) return 1;

View File

@ -35,7 +35,7 @@ $action=GETPOST("action");
// Security check // Security check
$socid = GETPOST('socid','int'); $socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'tax', $langs->trans("SocialContribution"), '', 'charges'); $result = restrictedArea($user, 'tax', $id, 'chargesociales','charges');
/* /*

View File

@ -148,7 +148,7 @@ class Contact extends CommonObject
if (! $error) if (! $error)
{ {
$result=$this->update($this->id, $user, 1); $result=$this->update($this->id, $user, 1, 'add');
if ($result < 0) if ($result < 0)
{ {
$error++; $error++;
@ -203,10 +203,11 @@ class Contact extends CommonObject
* *
* @param int $id Id of contact/address to update * @param int $id Id of contact/address to update
* @param User $user Objet user making change * @param User $user Objet user making change
* @param int $notrigger 0=no, 1=yesi * @param int $notrigger 0=no, 1=yes
* @param string $action Current action for hookmanager
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($id, $user=0, $notrigger=0) function update($id, $user=0, $notrigger=0, $action='update')
{ {
global $conf, $langs; global $conf, $langs;
@ -271,10 +272,13 @@ class Contact extends CommonObject
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) if (empty($reshook))
{ {
$result=$this->insertExtraFields(); if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if ($result < 0)
{ {
$error++; $result=$this->insertExtraFields();
if ($result < 0)
{
$error++;
}
} }
} }
else if ($reshook < 0) $error++; else if ($reshook < 0) $error++;

View File

@ -104,11 +104,15 @@ class CMailFile
{ {
global $conf; global $conf;
// We define end of line (RFC 822bis section 2.3) // We define end of line (RFC 821).
$this->eol="\r\n"; $this->eol="\r\n";
// eol2 is for header fields to manage bugged MTA with option MAIN_FIX_FOR_BUGGED_MTA // We define end of line for header fields (RFC 822bis section 2.3 says header must contains \r\n).
$this->eol2=$this->eol; $this->eol2="\r\n";
if (! empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) $this->eol2="\n"; if (! empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA))
{
$this->eol="\n";
$this->eol2="\n";
}
// On defini mixed_boundary // On defini mixed_boundary
$this->mixed_boundary = "multipart_x." . time() . ".x_boundary"; $this->mixed_boundary = "multipart_x." . time() . ".x_boundary";
@ -547,6 +551,7 @@ class CMailFile
/** /**
* Write content of a SMTP request into a dump file (mode = all) * Write content of a SMTP request into a dump file (mode = all)
* Used for debugging. * Used for debugging.
* Note that to see full SMTP protocol, you can use tcpdump -w /tmp/smtp -s 2000 port 25"
* *
* @return void * @return void
*/ */
@ -647,6 +652,10 @@ class CMailFile
// Sender // Sender
//$out.= "Sender: ".getValidAddress($this->addr_from,2)).$this->eol2; //$out.= "Sender: ".getValidAddress($this->addr_from,2)).$this->eol2;
$out.= "From: ".$this->getValidAddress($this->addr_from,3,1).$this->eol2; $out.= "From: ".$this->getValidAddress($this->addr_from,3,1).$this->eol2;
if (! empty($conf->global->MAIN_MAIL_SENDMAIL_FORCE_BA))
{
$out.= "To: ".$this->getValidAddress($this->addr_to,0,1).$this->eol2;
}
$out.= "Return-Path: ".$this->getValidAddress($this->addr_from,0,1).$this->eol2; $out.= "Return-Path: ".$this->getValidAddress($this->addr_from,0,1).$this->eol2;
if (isset($this->reply_to) && $this->reply_to) $out.= "Reply-To: ".$this->getValidAddress($this->reply_to,2).$this->eol2; if (isset($this->reply_to) && $this->reply_to) $out.= "Reply-To: ".$this->getValidAddress($this->reply_to,2).$this->eol2;
if (isset($this->errors_to) && $this->errors_to) $out.= "Errors-To: ".$this->getValidAddress($this->errors_to,2).$this->eol2; if (isset($this->errors_to) && $this->errors_to) $out.= "Errors-To: ".$this->getValidAddress($this->errors_to,2).$this->eol2;
@ -738,6 +747,10 @@ class CMailFile
// Make RFC821 Compliant, replace bare linefeeds // Make RFC821 Compliant, replace bare linefeeds
$strContent = preg_replace("/(?<!\r)\n/si", "\r\n", $strContent); $strContent = preg_replace("/(?<!\r)\n/si", "\r\n", $strContent);
if (! empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA))
{
$strContent = preg_replace("/\r\n/si", "\n", $strContent);
}
//$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems bugged //$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems bugged
$strContent = rtrim(wordwrap($strContent)); $strContent = rtrim(wordwrap($strContent));

View File

@ -160,19 +160,19 @@ class Conf
if ($value && preg_match('/^MAIN_MODULE_/',$key)) if ($value && preg_match('/^MAIN_MODULE_/',$key))
{ {
// If this is constant for a new tab page activated by a module. // If this is constant for a new tab page activated by a module.
if (preg_match('/^MAIN_MODULE_([A-Z_]+)_TABS_/i',$key)) if (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_TABS_/i',$key))
{ {
$params=explode(':',$value,2); $params=explode(':',$value,2);
$this->tabs_modules[$params[0]][]=$value; $this->tabs_modules[$params[0]][]=$value;
} }
// If this is constant for a sms engine // If this is constant for a sms engine
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_SMS$/i',$key,$reg)) elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_SMS$/i',$key,$reg))
{ {
$modulename=strtolower($reg[1]); $modulename=strtolower($reg[1]);
$this->sms_engine_modules[$modulename]=$modulename; // Add this module in list of modules that provide SMS $this->sms_engine_modules[$modulename]=$modulename; // Add this module in list of modules that provide SMS
} }
// If this is constant for all generic part activated by a module // If this is constant for all generic part activated by a module
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_([A-Z]+)$/i',$key,$reg)) elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_([A-Z]+)$/i',$key,$reg))
{ {
$modulename = strtolower($reg[1]); $modulename = strtolower($reg[1]);
$partname = strtolower($reg[2]); $partname = strtolower($reg[2]);
@ -185,7 +185,7 @@ class Conf
$this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value)); $this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value));
} }
// If this is a module constant (must be at end) // If this is a module constant (must be at end)
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)$/i',$key,$reg)) elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)$/i',$key,$reg))
{ {
$modulename=strtolower($reg[1]); $modulename=strtolower($reg[1]);
if ($modulename == 'propale') $modulename='propal'; if ($modulename == 'propale') $modulename='propal';

View File

@ -967,7 +967,9 @@ class DoliDBMssql
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type']; $sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")"; if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
$sql.="(".$field_desc['value'].")";
}
dol_syslog($sql,LOG_DEBUG); dol_syslog($sql,LOG_DEBUG);
if (! $this->query($sql)) if (! $this->query($sql))

View File

@ -1010,7 +1010,9 @@ class DoliDBMysql
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type']; $sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")"; if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
$sql.="(".$field_desc['value'].")";
}
if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL"; if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL";
dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG); dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG);

View File

@ -1004,7 +1004,9 @@ class DoliDBMysqli
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type']; $sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")"; if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
$sql.="(".$field_desc['value'].")";
}
if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL"; if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL";
dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG); dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG);

View File

@ -1219,7 +1219,9 @@ class DoliDBPgsql
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type']; $sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")"; if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
$sql.="(".$field_desc['value'].")";
}
// FIXME May not work with pgsql. May need to run a second request. If it works, just remove the FIXME tag // FIXME May not work with pgsql. May need to run a second request. If it works, just remove the FIXME tag
if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL"; if ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL') $sql.=" NOT NULL";

View File

@ -1153,7 +1153,9 @@ class DoliDBSqlite
{ {
$sql = "ALTER TABLE ".$table; $sql = "ALTER TABLE ".$table;
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type']; $sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
if ($field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') $sql.="(".$field_desc['value'].")"; if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') {
$sql.="(".$field_desc['value'].")";
}
dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG); dol_syslog(get_class($this)."::DDLUpdateField ".$sql,LOG_DEBUG);
if (! $this->query($sql)) if (! $this->query($sql))

View File

@ -587,7 +587,9 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
{ {
print '<td align="center"><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">'; print '<td align="center"><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
print img_object($langs->trans("Rendez-Vous"),"action"); print img_object($langs->trans("Rendez-Vous"),"action_rdv");
print '</a> <a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
print img_object($langs->trans("Event"),"action");
print '</a></td>'; print '</a></td>';
} }
@ -753,7 +755,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
{ {
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create'; $out.='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create';
if (get_class($object) == 'Societe') $out.='&amp;socid='.$object->id; if (get_class($object) == 'Societe') $out.='&amp;socid='.$object->id;
$out.='&amp;contactid='.$objcon->id.'&amp;backtopage=1&amp;percentage=-1">'; $out.=(! empty($objcon->id)?'&amp;contactid='.$objcon->id:'').'&amp;backtopage=1&amp;percentage=-1">';
$out.=$langs->trans("AddAnAction").' '; $out.=$langs->trans("AddAnAction").' ';
$out.=img_picto($langs->trans("AddAnAction"),'filenew'); $out.=img_picto($langs->trans("AddAnAction"),'filenew');
$out.="</a>"; $out.="</a>";
@ -776,10 +778,13 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
if (get_class($object) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; if (get_class($object) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
$sql.= " WHERE u.rowid = a.fk_user_author"; $sql.= " WHERE u.rowid = a.fk_user_author";
$sql.= " AND a.entity IN (".getEntity('actioncomm').")"; $sql.= " AND a.entity IN (".getEntity('actioncomm').")";
if (get_class($object) == 'Adherent') $sql.= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; if (get_class($object) == 'Adherent') {
if (get_class($object) == 'Adherent' && $object->id) $sql.= " AND a.fk_element = ".$object->id; $sql.= " AND a.fk_element = m.rowid AND a.elementtype = 'member'";
if (! empty($object->id))
$sql.= " AND a.fk_element = ".$object->id;
}
if (get_class($object) == 'Societe' && $object->id) $sql.= " AND a.fk_soc = ".$object->id; if (get_class($object) == 'Societe' && $object->id) $sql.= " AND a.fk_soc = ".$object->id;
if (is_object($objcon) && $objcon->id) $sql.= " AND a.fk_contact = ".$objcon->id; if (! empty($objcon->id)) $sql.= " AND a.fk_contact = ".$objcon->id;
$sql.= " AND c.id=a.fk_action"; $sql.= " AND c.id=a.fk_action";
$sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
$sql.= " ORDER BY a.datep DESC, a.id DESC"; $sql.= " ORDER BY a.datep DESC, a.id DESC";
@ -825,7 +830,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
$out.='<td colspan="2">'.$actionstatic->getNomUrl(1,40).'</td>'; $out.='<td colspan="2">'.$actionstatic->getNomUrl(1,40).'</td>';
// Contact pour cette action // Contact pour cette action
if (! $objcon->id && $obj->fk_contact > 0) if (empty($objcon->id) && $obj->fk_contact > 0)
{ {
$contactstatic->name=$obj->name; $contactstatic->name=$obj->name;
$contactstatic->firstname=$obj->firstname; $contactstatic->firstname=$obj->firstname;
@ -1029,11 +1034,11 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
$out.='</td>'; $out.='</td>';
$out.='<td colspan="5" align="right">'; $out.='<td colspan="5" align="right">';
$permok=$user->rights->agenda->myactions->create; $permok=$user->rights->agenda->myactions->create;
if (($object->id || $objcon->id) && $permok) if ((! empty($object->id) || ! empty($objcon->id)) && $permok)
{ {
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create'; $out.='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create';
if (get_class($object) == 'Societe') $out.='&amp;socid='.$object->id; if (get_class($object) == 'Societe') $out.='&amp;socid='.$object->id;
$out.='&amp;contactid='.$objcon->id.'&amp;backtopage=1&amp;percentage=-1">'; $out.=(! empty($objcon->id)?'&amp;contactid='.$objcon->id:'').'&amp;backtopage=1&amp;percentage=-1">';
$out.=$langs->trans("AddAnAction").' '; $out.=$langs->trans("AddAnAction").' ';
$out.=img_picto($langs->trans("AddAnAction"),'filenew'); $out.=img_picto($langs->trans("AddAnAction"),'filenew');
$out.="</a>"; $out.="</a>";

View File

@ -2681,13 +2681,15 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
} }
/** /**
* Return localtaxe rate for a particular vat * Return localtax rate for a particular vat, when selling a product with vat $tva, from a $thirdparty_buyer to a $thirdparty_seller
* Note: It applies same rule than get_default_tva
* *
* @param float $tva Vat taxe * @param float $tva Vat taxe
* @param int $local Local tax to search and return (1 or 2 return only tax rate 1 or tax rate 2) * @param int $local Local tax to search and return (1 or 2 return only tax rate 1 or tax rate 2)
* @param Societe $thirdparty_buyer Object of buying third party * @param Societe $thirdparty_buyer Object of buying third party
* @param Societe $thirdparty_seller Object of selling third party * @param Societe $thirdparty_seller Object of selling third party
* @return int 0 if not found, localtax if found * @return int 0 if not found, localtax if found
* @see get_default_tva
*/ */
function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="") function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
{ {
@ -2706,9 +2708,7 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
if (is_object($thirdparty_buyer)) if (is_object($thirdparty_buyer))
{ {
if ($code_country!=$thirdparty_buyer->country_code) return 0; if ($code_country != $thirdparty_buyer->country_code) return 0;
if ($local==1 && !$thirdparty_buyer->localtax1_assuj) return 0; // TODO Not sure this is good
elseif ($local==2 && !$thirdparty_buyer->localtax2_assuj) return 0; // TODO Not sure this is good
} }
// Search local taxes // Search local taxes
@ -2731,14 +2731,13 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
} }
/** /**
* Return vat rate of a product in a particular selling country or default country * Return vat rate of a product in a particular selling country or default country vat if product is unknown
* vat if product is unknown
* *
* @param int $idprod Id of product or 0 if not a predefined product * @param int $idprod Id of product or 0 if not a predefined product
* @param Societe $thirdparty_seller Thirdparty with a ->country_code defined (FR, US, IT, ...) * @param Societe $thirdparty_seller Thirdparty with a ->country_code defined (FR, US, IT, ...)
* @param int $idprodfournprice Id product_fournisseur_price (for supplier order/invoice) * @param int $idprodfournprice Id product_fournisseur_price (for supplier order/invoice)
* @return int <0 if KO, Vat rate if OK * @return int <0 if KO, Vat rate if OK
* TODO May be this should be better as a method of product class * @see get_product_localtax_for_country
*/ */
function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice=0) function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice=0)
{ {
@ -2804,25 +2803,71 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
} }
/** /**
* Return localtax rate of a product in a particular selling country * Return localtax vat rate of a product in a particular selling country or default country vat if product is unknown
* *
* @param int $idprod Id of product * @param int $idprod Id of product
* @param int $local 1 for localtax1, 2 for localtax 2 * @param int $local 1 for localtax1, 2 for localtax 2
* @param string $countrycode Country code (FR, US, IT, ...) * @param Societe $thirdparty_seller Thirdparty with a ->country_code defined (FR, US, IT, ...)
* @return int <0 if KO, Vat rate if OK * @return int <0 if KO, Vat rate if OK
* TODO May be this should be better as a method of product class * @see get_product_vat_for_country
*/ */
function get_product_localtax_for_country($idprod, $local, $countrycode) function get_product_localtax_for_country($idprod, $local, $thirdparty_seller)
{ {
global $db; global $db,$mysoc;
$product=new Product($db); if (! class_exists('Product')) {
$product->fetch($idprod); require DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
}
if ($local==1) return $product->localtax1_tx; $ret=0;
elseif ($local==2) return $product->localtax2_tx; $found=0;
return -1; if ($idprod > 0)
{
// Load product
$product=new Product($db);
$result=$product->fetch($idprod);
if ($mysoc->country_code == $thirdparty_seller->country_code) // If selling country is ours
{
/* Not defined yet, so we don't use this
if ($local==1) $ret=$product->localtax1_tx;
elseif ($local==2) $ret=$product->localtax2_tx;
$found=1;
*/
}
else
{
// TODO Read default product vat according to countrycode and product
}
}
if (! $found)
{
// If vat of product for the country not found or not defined, we return higher vat of country.
$sql = "SELECT taux as vat_rate, localtax1, localtax2";
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
$sql.= " WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$thirdparty_seller->country_code."'";
$sql.= " ORDER BY t.taux DESC, t.recuperableonly ASC";
$sql.= $db->plimit(1);
$resql=$db->query($sql);
if ($resql)
{
$obj=$db->fetch_object($resql);
if ($obj)
{
if ($local==1) $ret=$obj->localtax1;
elseif ($local==2) $ret=$obj->localtax2;
}
}
else dol_print_error($db);
}
dol_syslog("get_product_localtax_for_country: ret=".$ret);
return $ret;
} }
/** /**
@ -2839,6 +2884,7 @@ function get_product_localtax_for_country($idprod, $local, $countrycode)
* @param int $idprod Id product * @param int $idprod Id product
* @param int $idprodfournprice Id product_fournisseur_price (for supplier order/invoice) * @param int $idprodfournprice Id product_fournisseur_price (for supplier order/invoice)
* @return float Taux de tva a appliquer, -1 si ne peut etre determine * @return float Taux de tva a appliquer, -1 si ne peut etre determine
* @see get_default_localtax
*/ */
function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idprodfournprice=0) function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
{ {
@ -2926,36 +2972,40 @@ function get_default_npr($thirdparty_seller, $thirdparty_buyer, $idprod)
/** /**
* Function that return localtax of a product line (according to seller, buyer and product vat rate) * Function that return localtax of a product line (according to seller, buyer and product vat rate)
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* Si le (pays vendeur = pays acheteur) alors TVA par defaut=TVA du produit vendu. Fin de regle.
* Sinon TVA proposee par defaut=0. Fin de regle.
* *
* @param Societe $thirdparty_seller Objet societe vendeuse * @param Societe $thirdparty_seller Objet societe vendeuse
* @param Societe $thirdparty_buyer Objet societe acheteuse * @param Societe $thirdparty_buyer Objet societe acheteuse
* @param int $local Localtax to process (1 or 2) * @param int $local Localtax to process (1 or 2)
* @param int $idprod Id product * @param int $idprod Id product
* @return float Taux de localtax appliquer, -1 si ne peut etre determine * @return float localtax, -1 si ne peut etre determine
* @see get_default_tva
*/ */
function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod=0) function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod=0)
{ {
if (!is_object($thirdparty_seller)) return -1; if (!is_object($thirdparty_seller)) return -1;
if (!is_object($thirdparty_buyer)) return -1; if (!is_object($thirdparty_buyer)) return -1;
if ($thirdparty_seller->country_id=='ES' || $thirdparty_seller->country_code=='ES') if ($local==1) //RE
{ {
if ($local==1) //RE // Si vendeur non assujeti a RE, localtax1 par default=0
{ if (is_numeric($thirdparty_seller->localtax1_assuj) && ! $thirdparty_seller->localtax1_assuj) return 0;
// Si achatteur non assujeti a RE, localtax1 par default=0 if (! is_numeric($thirdparty_seller->localtax1_assuj) && $thirdparty_seller->localtax1_assuj=='localtax1off') return 0;
if (is_numeric($thirdparty_buyer->localtax1_assuj) && ! $thirdparty_buyer->localtax1_assuj) return 0;
if (! is_numeric($thirdparty_buyer->localtax1_assuj) && $thirdparty_buyer->localtax1_assuj=='localtax1off') return 0;
}
elseif ($local==2) //IRPF
{
// Si vendeur non assujeti a IRPF, localtax2 par default=0
if (is_numeric($thirdparty_seller->localtax2_assuj) && ! $thirdparty_seller->localtax2_assuj) return 0;
if (! is_numeric($thirdparty_seller->localtax2_assuj) && $thirdparty_seller->localtax2_assuj=='localtax2off') return 0;
} else return -1;
if ($idprod) return get_product_localtax_for_country($idprod, $local, $thirdparty_seller->country_code);
else return -1;
} }
elseif ($local==2) //IRPF
{
// Si vendeur non assujeti a IRPF, localtax2 par default=0
if (is_numeric($thirdparty_seller->localtax2_assuj) && ! $thirdparty_seller->localtax2_assuj) return 0;
if (! is_numeric($thirdparty_seller->localtax2_assuj) && $thirdparty_seller->localtax2_assuj=='localtax2off') return 0;
}
if ($thirdparty_seller->country_code == $thirdparty_buyer->country_code)
{
return get_product_localtax_for_country($idprod, $local, $thirdparty_seller);
}
return 0; return 0;
} }

View File

@ -38,9 +38,9 @@
* @param int $qty Quantity * @param int $qty Quantity
* @param float $pu Unit price (HT or TTC selon price_base_type) * @param float $pu Unit price (HT or TTC selon price_base_type)
* @param float $remise_percent_ligne Discount for line * @param float $remise_percent_ligne Discount for line
* @param float $txtva Vat rate * @param float $txtva 0=do not apply standard tax, Vat rate=apply
* @param float $localtax1_rate Localtax1 rate (used for some countries only, like spain). Can also be negative. TODO: Remove this param that is not used. * @param float $uselocaltax1_rate 0=do not use this localtax, >0=apply, -1=autodetect according to seller
* @param float $localtax2_rate Localtax2 rate (used for some countries only, like spain). Can also be negative. TODO: Remove this param that is not used. * @param float $uselocaltax2_rate 0=do not use this localtax, >0=apply, -1=autodetect according to seller
* @param float $remise_percent_global 0 * @param float $remise_percent_global 0
* @param string $price_base_type HT=on calcule sur le HT, TTC=on calcule sur le TTC * @param string $price_base_type HT=on calcule sur le HT, TTC=on calcule sur le TTC
* @param int $info_bits Miscellanous informations on line * @param int $info_bits Miscellanous informations on line
@ -48,14 +48,16 @@
* @param string $seller Thirdparty seller (we need $seller->country_code property). Provided only if seller is the supplier. * @param string $seller Thirdparty seller (we need $seller->country_code property). Provided only if seller is the supplier.
* @return result[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount, ...) * @return result[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount, ...)
*/ */
function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1_rate, $localtax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = '') function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = '')
{ {
global $conf,$mysoc,$db; global $conf,$mysoc,$db;
$result=array(); $result=array();
$countryid=$mysoc->country_id; // By default, seller is user company. if (empty($seller) || ! is_object($seller)) $seller=$mysoc; // If seller is a customer, $seller is not provided, we use $mysoc
if (! empty($seller) && is_object($seller)) $countryid=$seller->country_id; // If seller is a supplier, $seller is provided $countryid=$seller->country_id;
if ($uselocaltax1_rate < 0) $uselocaltax1_rate=$seller->localtax1_assuj;
if ($uselocaltax2_rate < 0) $uselocaltax2_rate=$seller->localtax2_assuj;
// Now we search localtaxes information ourself (rates and types). // Now we search localtaxes information ourself (rates and types).
$sql = "SELECT taux, localtax1, localtax2, localtax1_type, localtax2_type"; $sql = "SELECT taux, localtax1, localtax2, localtax1_type, localtax2_type";
@ -102,7 +104,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1
if ($type == 1) $apply_tax = true; if ($type == 1) $apply_tax = true;
break; break;
} }
if ($apply_tax) { if ($uselocaltax1_rate && $apply_tax) {
$result[14] = price2num(($tot_sans_remise * (1 + ( $localtax1_rate / 100))) - $tot_sans_remise, 'MT'); $result[14] = price2num(($tot_sans_remise * (1 + ( $localtax1_rate / 100))) - $tot_sans_remise, 'MT');
$localtaxes[0] += $result[14]; $localtaxes[0] += $result[14];
@ -125,7 +127,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1
if ($type == 1) $apply_tax = true; if ($type == 1) $apply_tax = true;
break; break;
} }
if ($apply_tax) { if ($uselocaltax2_rate && $apply_tax) {
$result[15] = price2num(($tot_sans_remise * (1 + ( $localtax2_rate / 100))) - $tot_sans_remise, 'MT'); $result[15] = price2num(($tot_sans_remise * (1 + ( $localtax2_rate / 100))) - $tot_sans_remise, 'MT');
$localtaxes[0] += $result[15]; $localtaxes[0] += $result[15];
@ -195,7 +197,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1
if ($type == 1) $apply_tax = true; if ($type == 1) $apply_tax = true;
break; break;
} }
if ($apply_tax) { if ($uselocaltax1_rate && $apply_tax) {
$result[14] = price2num(($tot_sans_remise * (1 + ( $localtax1_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax1 for total_ht_without_discount $result[14] = price2num(($tot_sans_remise * (1 + ( $localtax1_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax1 for total_ht_without_discount
$result[8] += $result[14]; // total_ttc_without_discount + tax1 $result[8] += $result[14]; // total_ttc_without_discount + tax1
@ -219,7 +221,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1
if ($type == 1) $apply_tax = true; if ($type == 1) $apply_tax = true;
break; break;
} }
if ($apply_tax) { if ($uselocaltax2_rate && $apply_tax) {
$result[15] = price2num(($tot_sans_remise * (1 + ( $localtax2_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax2 for total_ht_without_discount $result[15] = price2num(($tot_sans_remise * (1 + ( $localtax2_rate / 100))) - $tot_sans_remise, 'MT'); // amount tax2 for total_ht_without_discount
$result[8] += $result[15]; // total_ttc_without_discount + tax2 $result[8] += $result[15]; // total_ttc_without_discount + tax2

View File

@ -85,9 +85,9 @@ class ExportCsv extends ModeleExports
/** /**
* getDriverLabel * getDriverLabel
* *
* @return string * @return string Return driver label
*/ */
function getDriverLabel($key='') function getDriverLabel()
{ {
return $this->label; return $this->label;
} }
@ -97,7 +97,7 @@ class ExportCsv extends ModeleExports
* *
* @return string * @return string
*/ */
function getDriverDesc($key='') function getDriverDesc()
{ {
return $this->desc; return $this->desc;
} }
@ -117,7 +117,7 @@ class ExportCsv extends ModeleExports
* *
* @return string * @return string
*/ */
function getDriverVersion($key='') function getDriverVersion()
{ {
return $this->version; return $this->version;
} }
@ -127,7 +127,7 @@ class ExportCsv extends ModeleExports
* *
* @return string * @return string
*/ */
function getLibLabel($key='') function getLibLabel()
{ {
return $this->label_lib; return $this->label_lib;
} }
@ -137,7 +137,7 @@ class ExportCsv extends ModeleExports
* *
* @return string * @return string
*/ */
function getLibVersion($key='') function getLibVersion()
{ {
return $this->version_lib; return $this->version_lib;
} }

View File

@ -85,9 +85,9 @@ class ExportExcel extends ModeleExports
/** /**
* getDriverLabel * getDriverLabel
* *
* @return string * @return string Return driver label
*/ */
function getDriverLabel($key='') function getDriverLabel()
{ {
return $this->label; return $this->label;
} }
@ -97,7 +97,7 @@ class ExportExcel extends ModeleExports
* *
* @return string * @return string
*/ */
function getDriverDesc($key='') function getDriverDesc()
{ {
return $this->desc; return $this->desc;
} }
@ -117,7 +117,7 @@ class ExportExcel extends ModeleExports
* *
* @return string * @return string
*/ */
function getDriverVersion($key='') function getDriverVersion()
{ {
return $this->version; return $this->version;
} }
@ -127,7 +127,7 @@ class ExportExcel extends ModeleExports
* *
* @return string * @return string
*/ */
function getLibLabel($key='') function getLibLabel()
{ {
return $this->label_lib; return $this->label_lib;
} }
@ -137,7 +137,7 @@ class ExportExcel extends ModeleExports
* *
* @return string * @return string
*/ */
function getLibVersion($key='') function getLibVersion()
{ {
return $this->version_lib; return $this->version_lib;
} }

View File

@ -86,9 +86,9 @@ class ExportExcel2007 extends ExportExcel
/** /**
* getDriverLabel * getDriverLabel
* *
* @return string * @return string Return driver label
*/ */
function getDriverLabel($key='') function getDriverLabel()
{ {
return $this->label; return $this->label;
} }
@ -98,7 +98,7 @@ class ExportExcel2007 extends ExportExcel
* *
* @return string * @return string
*/ */
function getDriverDesc($key='') function getDriverDesc()
{ {
return $this->desc; return $this->desc;
} }
@ -118,7 +118,7 @@ class ExportExcel2007 extends ExportExcel
* *
* @return string * @return string
*/ */
function getDriverVersion($key='') function getDriverVersion()
{ {
return $this->version; return $this->version;
} }
@ -128,7 +128,7 @@ class ExportExcel2007 extends ExportExcel
* *
* @return string * @return string
*/ */
function getLibLabel($key='') function getLibLabel()
{ {
return $this->label_lib; return $this->label_lib;
} }
@ -138,7 +138,7 @@ class ExportExcel2007 extends ExportExcel
* *
* @return string * @return string
*/ */
function getLibVersion($key='') function getLibVersion()
{ {
return $this->version_lib; return $this->version_lib;
} }

View File

@ -80,9 +80,9 @@ class ExportTsv extends ModeleExports
/** /**
* getDriverLabel * getDriverLabel
* *
* @return string * @return string Return driver label
*/ */
function getDriverLabel($key='') function getDriverLabel()
{ {
return $this->label; return $this->label;
} }
@ -92,7 +92,7 @@ class ExportTsv extends ModeleExports
* *
* @return string * @return string
*/ */
function getDriverDesc($key='') function getDriverDesc()
{ {
return $this->desc; return $this->desc;
} }
@ -112,7 +112,7 @@ class ExportTsv extends ModeleExports
* *
* @return string * @return string
*/ */
function getDriverVersion($key='') function getDriverVersion()
{ {
return $this->version; return $this->version;
} }
@ -122,7 +122,7 @@ class ExportTsv extends ModeleExports
* *
* @return string * @return string
*/ */
function getLibLabel($key='') function getLibLabel()
{ {
return $this->label_lib; return $this->label_lib;
} }
@ -132,7 +132,7 @@ class ExportTsv extends ModeleExports
* *
* @return string * @return string
*/ */
function getLibVersion($key='') function getLibVersion()
{ {
return $this->version_lib; return $this->version_lib;
} }

View File

@ -99,7 +99,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
* @param string $key Key of driver * @param string $key Key of driver
* @return string Picto string * @return string Picto string
*/ */
function getPicto($key) function getPictoForKey($key)
{ {
return $this->picto[$key]; return $this->picto[$key];
} }
@ -110,7 +110,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
* @param string $key Key of driver * @param string $key Key of driver
* @return string Label * @return string Label
*/ */
function getDriverLabel($key) function getDriverLabelForKey($key)
{ {
return $this->driverlabel[$key]; return $this->driverlabel[$key];
} }
@ -121,7 +121,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
* @param string $key Key of driver * @param string $key Key of driver
* @return string Description * @return string Description
*/ */
function getDriverDesc($key) function getDriverDescForKey($key)
{ {
return $this->driverdesc[$key]; return $this->driverdesc[$key];
} }
@ -132,7 +132,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
* @param string $key Key of driver * @param string $key Key of driver
* @return string Driver version * @return string Driver version
*/ */
function getDriverVersion($key) function getDriverVersionForKey($key)
{ {
return $this->driverversion[$key]; return $this->driverversion[$key];
} }
@ -143,7 +143,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
* @param string $key Key of driver * @param string $key Key of driver
* @return string Label of library * @return string Label of library
*/ */
function getLibLabel($key) function getLibLabelForKey($key)
{ {
return $this->liblabel[$key]; return $this->liblabel[$key];
} }
@ -154,7 +154,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
* @param string $key Key of driver * @param string $key Key of driver
* @return string Version of library * @return string Version of library
*/ */
function getLibVersion($key) function getLibVersionForKey($key)
{ {
return $this->libversion[$key]; return $this->libversion[$key];
} }

View File

@ -596,6 +596,7 @@ class pdf_soleil extends ModelePDFFicheinter
* @param PDF &$pdf PDF * @param PDF &$pdf PDF
* @param Object $object Object to show * @param Object $object Object to show
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return void * @return void
*/ */
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)

View File

@ -99,10 +99,9 @@ class ImportCsv extends ModeleImports
/** /**
* getDriverLabel * getDriverLabel
* *
* @param string $key Key
* @return string Label * @return string Label
*/ */
function getDriverLabel($key='') function getDriverLabel()
{ {
return $this->label; return $this->label;
} }
@ -110,10 +109,9 @@ class ImportCsv extends ModeleImports
/** /**
* getDriverDesc * getDriverDesc
* *
* @param string $key Key
* @return string Description * @return string Description
*/ */
function getDriverDesc($key='') function getDriverDesc()
{ {
return $this->desc; return $this->desc;
} }
@ -131,10 +129,9 @@ class ImportCsv extends ModeleImports
/** /**
* getDriverVersion * getDriverVersion
* *
* @param string $key Key
* @return string Driver version * @return string Driver version
*/ */
function getDriverVersion($key='') function getDriverVersion()
{ {
return $this->version; return $this->version;
} }
@ -142,10 +139,9 @@ class ImportCsv extends ModeleImports
/** /**
* getDriverLabel * getDriverLabel
* *
* @param string $key Key
* @return string Label of external lib * @return string Label of external lib
*/ */
function getLibLabel($key='') function getLibLabel()
{ {
return $this->label_lib; return $this->label_lib;
} }
@ -153,10 +149,9 @@ class ImportCsv extends ModeleImports
/** /**
* getLibVersion * getLibVersion
* *
* @param string $key Key
* @return string Version of external lib * @return string Version of external lib
*/ */
function getLibVersion($key='') function getLibVersion()
{ {
return $this->version_lib; return $this->version_lib;
} }

View File

@ -116,7 +116,7 @@ class ModeleImports
* @param string $key Key * @param string $key Key
* @return string * @return string
*/ */
function getPicto($key) function getPictoForKey($key)
{ {
return $this->picto[$key]; return $this->picto[$key];
} }
@ -127,7 +127,7 @@ class ModeleImports
* @param string $key Key * @param string $key Key
* @return string * @return string
*/ */
function getDriverLabel($key) function getDriverLabelForKey($key)
{ {
return $this->_driverlabel[$key]; return $this->_driverlabel[$key];
} }
@ -138,7 +138,7 @@ class ModeleImports
* @param string $key Key * @param string $key Key
* @return string * @return string
*/ */
function getDriverDesc($key) function getDriverDescForKey($key)
{ {
return $this->_driverdesc[$key]; return $this->_driverdesc[$key];
} }
@ -149,7 +149,7 @@ class ModeleImports
* @param string $key Key * @param string $key Key
* @return string * @return string
*/ */
function getDriverVersion($key) function getDriverVersionForKey($key)
{ {
return $this->_driverversion[$key]; return $this->_driverversion[$key];
} }
@ -160,7 +160,7 @@ class ModeleImports
* @param string $key Key * @param string $key Key
* @return string * @return string
*/ */
function getLibLabel($key) function getLibLabelForKey($key)
{ {
return $this->_liblabel[$key]; return $this->_liblabel[$key];
} }
@ -171,7 +171,7 @@ class ModeleImports
* @param string $key Key * @param string $key Key
* @return string * @return string
*/ */
function getLibVersion($key) function getLibVersionForKey($key)
{ {
return $this->_libversion[$key]; return $this->_libversion[$key];
} }

View File

@ -140,7 +140,8 @@ class modCategorie extends DolibarrModules
$this->export_enabled[$r]='$conf->produit->enabled'; $this->export_enabled[$r]='$conf->produit->enabled';
$this->export_permission[$r]=array(array("categorie","lire"),array("produit","lire")); $this->export_permission[$r]=array(array("categorie","lire"),array("produit","lire"));
$this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'ProductId','p.ref'=>'Ref'); $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'ProductId','p.ref'=>'Ref');
$this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.rowid'=>'List:Product:label','p.ref'=>'Text'); //$this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.rowid'=>'List:Product:label','p.ref'=>'Text');
$this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.ref'=>'Text');
$this->export_entities_array[$r]=array('p.rowid'=>'product','p.ref'=>'product'); // We define here only fields that use another picto $this->export_entities_array[$r]=array('p.rowid'=>'product','p.ref'=>'product'); // We define here only fields that use another picto
$this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_product as cp, '.MAIN_DB_PREFIX.'product as p'; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_product as cp, '.MAIN_DB_PREFIX.'product as p';

View File

@ -174,7 +174,8 @@ class modCommande extends DolibarrModules
$this->export_label[$r]='CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_label[$r]='CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_permission[$r]=array(array("commande","commande","export")); $this->export_permission[$r]=array(array("commande","commande","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product');
$this->export_dependencies_array[$r]=array('order_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('order_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them

View File

@ -175,7 +175,8 @@ class modFacture extends DolibarrModules
$this->export_icon[$r]='bill'; $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export")); $this->export_permission[$r]=array(array("facture","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
@ -194,7 +195,8 @@ class modFacture extends DolibarrModules
$this->export_icon[$r]='bill'; $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export")); $this->export_permission[$r]=array(array("facture","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber');
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment');
$this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them

View File

@ -139,7 +139,8 @@ class modFicheinter extends DolibarrModules
$this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_permission[$r]=array(array("ficheinter","export")); $this->export_permission[$r]=array(array("ficheinter","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc");
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric");
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric");
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line');
$this->export_dependencies_array[$r]=array('inter_line'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('inter_line'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them

View File

@ -243,7 +243,8 @@ class modFournisseur extends DolibarrModules
$this->export_icon[$r]='bill'; $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("fournisseur","facture","export")); $this->export_permission[$r]=array(array("fournisseur","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
@ -261,7 +262,8 @@ class modFournisseur extends DolibarrModules
$this->export_icon[$r]='bill'; $this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("fournisseur","facture","export")); $this->export_permission[$r]=array(array("fournisseur","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber');
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment');
$this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them

View File

@ -150,7 +150,8 @@ class modProjet extends DolibarrModules
'p.rowid'=>"ProjectId",'p.ref'=>"ProjectRef",'p.datec'=>"DateCreation",'p.dateo'=>"DateDebutProjet",'p.datee'=>"DateFinProjet",'p.fk_statut'=>'ProjectStatus','p.description'=>"projectNote", 'p.rowid'=>"ProjectId",'p.ref'=>"ProjectRef",'p.datec'=>"DateCreation",'p.dateo'=>"DateDebutProjet",'p.datee'=>"DateFinProjet",'p.fk_statut'=>'ProjectStatus','p.description'=>"projectNote",
'pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateo",'pt.datee'=>"TaskDatee",'pt.duration_effective'=>"DurationEffective",'pt.duration_planned'=>"DurationPlanned",'pt.progress'=>"Progress",'pt.description'=>"TaskDesc"); 'pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateo",'pt.datee'=>"TaskDatee",'pt.duration_effective'=>"DurationEffective",'pt.duration_planned'=>"DurationPlanned",'pt.progress'=>"Progress",'pt.description'=>"TaskDesc");
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle', //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle',
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle',
's.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text', 's.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text',
'p.rowid'=>"List:projet:ref",'p.ref'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','p.description'=>"Text", 'p.rowid'=>"List:projet:ref",'p.ref'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','p.description'=>"Text",
'pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.duration_planned'=>"Duree",'pt.progress'=>"Number",'pt.description'=>"Text"); 'pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.duration_planned'=>"Duree",'pt.progress'=>"Number",'pt.description'=>"Text");

View File

@ -168,7 +168,8 @@ class modPropale extends DolibarrModules
$this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_permission[$r]=array(array("propale","export")); $this->export_permission[$r]=array(array("propale","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product');
$this->export_dependencies_array[$r]=array('propal_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('propal_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them

View File

@ -122,10 +122,13 @@ class modService extends DolibarrModules
$this->export_permission[$r]=array(array("service","export")); $this->export_permission[$r]=array(array("service","export"));
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification'); $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock')); if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock'));
//$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date');
$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date'); $this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date');
if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Number')); if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Number'));
if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.barcode'=>'Text'));
$this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.accountancy_code_sell'=>'service','p.accountancy_code_sell'=>'service','p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.tosell'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service"); $this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.accountancy_code_sell'=>'service','p.accountancy_code_sell'=>'service','p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.tosell'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service");
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.stock'=>'product')); if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.stock'=>'service'));
if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.barcode'=>'service'));
// Add extra fields // Add extra fields
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'"; $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'";
$resql=$this->db->query($sql); $resql=$this->db->query($sql);

View File

@ -247,9 +247,10 @@ class modSociete extends DolibarrModules
$this->export_label[$r]='ExportDataset_company_1'; $this->export_label[$r]='ExportDataset_company_1';
$this->export_icon[$r]='company'; $this->export_icon[$r]='company';
$this->export_permission[$r]=array(array("societe","export")); $this->export_permission[$r]=array(array("societe","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State');
if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix';
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid');
$this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid');
$this->export_entities_array[$r]=array(); // We define here only fields that use another picto $this->export_entities_array[$r]=array(); // We define here only fields that use another picto
// Add extra fields // Add extra fields
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'";

View File

@ -28,7 +28,7 @@ class LogHandler
} }
/** /**
* ¿Is the module active? * Is the module active ?
* *
* @return boolean * @return boolean
*/ */

View File

@ -1,12 +1,58 @@
<?php <?php
/**
* LogHandlerInterface
*/
interface LogHandlerInterface interface LogHandlerInterface
{ {
/**
* Return name of logger
*
* @return string Name of logger
*/
public function getName(); public function getName();
/**
* Return version of logger
*
* @return string Version of logger
*/
public function getVersion(); public function getVersion();
/**
* Return information on logger
*
* @return string Version of logger
*/
public function getInfo(); public function getInfo();
/**
* Return array of configuration data
*
* @return array Return array of configuration data
*/
public function configure(); public function configure();
/**
* Return if configuration is valid
*
* @return boolean True if configuration ok
*/
public function checkConfiguration(); public function checkConfiguration();
/**
* Return if logger active
*
* @return boolen True if active
*/
public function isActive(); public function isActive();
/**
* Output log content
*
* @param string $content Content to log
* @return void
*/
public function export($content); public function export($content);
} }

View File

@ -2,10 +2,15 @@
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
/**
* Class to manage logging to ChromPHP
*/
class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
{ {
/** /**
* {@inheritDoc} * Return name of logger
*
* @return string Name of logger
*/ */
public function getName() public function getName()
{ {
@ -13,7 +18,9 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')
*
* @return string
*/ */
public function getVersion() public function getVersion()
{ {
@ -21,7 +28,9 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Content of the info tooltip.
*
* @return false|string
*/ */
public function getInfo() public function getInfo()
{ {
@ -31,7 +40,9 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Is the module active ?
*
* @return boolean
*/ */
public function isActive() public function isActive()
{ {
@ -56,7 +67,9 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Return array of configuration data
*
* @return array Return array of configuration data
*/ */
public function configure() public function configure()
{ {
@ -73,7 +86,9 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Return if configuration is valid
*
* @return boolean True if configuration ok
*/ */
public function checkConfiguration() public function checkConfiguration()
{ {
@ -95,7 +110,10 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Output log content
*
* @param string $content Content to log
* @return void
*/ */
public function export($content) public function export($content)
{ {

View File

@ -2,10 +2,15 @@
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
/**
* Class to manage logging to a file
*/
class mod_syslog_file extends LogHandler implements LogHandlerInterface class mod_syslog_file extends LogHandler implements LogHandlerInterface
{ {
/** /**
* {@inheritDoc} * Return name of logger
*
* @return string Name of logger
*/ */
public function getName() public function getName()
{ {
@ -15,7 +20,9 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')
*
* @return string
*/ */
public function getVersion() public function getVersion()
{ {
@ -23,7 +30,9 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Content of the info tooltip.
*
* @return false|string
*/ */
public function getInfo() public function getInfo()
{ {
@ -33,7 +42,9 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Is the module active ?
*
* @return boolean
*/ */
public function isActive() public function isActive()
{ {
@ -41,7 +52,9 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Return array of configuration data
*
* @return array Return array of configuration data
*/ */
public function configure() public function configure()
{ {
@ -58,7 +71,9 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Return if configuration is valid
*
* @return boolean True if configuration ok
*/ */
public function checkConfiguration() public function checkConfiguration()
{ {
@ -79,6 +94,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
/** /**
* Return the parsed logfile path * Return the parsed logfile path
*
* @return string * @return string
*/ */
private function getFilename() private function getFilename()
@ -88,7 +104,9 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
/** /**
* Export the message * Export the message
* @param array $content Array containing the info about the message *
* @param array $content Array containing the info about the message
* @return void
*/ */
public function export($content) public function export($content)
{ {
@ -99,7 +117,9 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
if (!$filefd && ! defined("SYSLOG_FILE_NO_ERROR")) if (!$filefd && ! defined("SYSLOG_FILE_NO_ERROR"))
{ {
throw new Exception('Failed to open log file '.$logfile); // Do not break dolibarr usage if log fails
//throw new Exception('Failed to open log file '.basename($logfile));
print 'Failed to open log file '.basename($logfile);
} }
$logLevels = array( $logLevels = array(

View File

@ -2,10 +2,15 @@
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
/**
* Class to manage logging to a FirePHP
*/
class mod_syslog_firephp extends LogHandler implements LogHandlerInterface class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
{ {
/** /**
* {@inheritDoc} * Return name of logger
*
* @return string Name of logger
*/ */
public function getName() public function getName()
{ {
@ -13,7 +18,9 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')
*
* @return string
*/ */
public function getVersion() public function getVersion()
{ {
@ -21,7 +28,9 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Content of the info tooltip.
*
* @return false|string
*/ */
public function getInfo() public function getInfo()
{ {
@ -31,7 +40,9 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Is the module active ?
*
* @return boolean
*/ */
public function isActive() public function isActive()
{ {
@ -53,9 +64,11 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
return -1; return -1;
} }
// /** ///**
// * {@inheritDoc} // * Return array of configuration data
// */ // *
// * @return array Return array of configuration data
// */
// public function configure() // public function configure()
// { // {
// global $langs; // global $langs;
@ -71,7 +84,9 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
// } // }
/** /**
* {@inheritDoc} * Return if configuration is valid
*
* @return boolean True if configuration ok
*/ */
public function checkConfiguration() public function checkConfiguration()
{ {
@ -93,7 +108,10 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Output log content
*
* @param string $content Content to log
* @return void
*/ */
public function export($content) public function export($content)
{ {

View File

@ -2,10 +2,15 @@
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
/**
* Class to manage logging to syslog
*/
class mod_syslog_syslog extends LogHandler implements LogHandlerInterface class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
{ {
/** /**
* {@inheritDoc} * Return name of logger
*
* @return string Name of logger
*/ */
public function getName() public function getName()
{ {
@ -13,7 +18,9 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')
*
* @return string
*/ */
public function getVersion() public function getVersion()
{ {
@ -21,7 +28,9 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Content of the info tooltip.
*
* @return false|string
*/ */
public function getInfo() public function getInfo()
{ {
@ -31,7 +40,9 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Is the module active ?
*
* @return boolean
*/ */
public function isActive() public function isActive()
{ {
@ -45,7 +56,9 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Return array of configuration data
*
* @return array Return array of configuration data
*/ */
public function configure() public function configure()
{ {
@ -61,7 +74,9 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
} }
/** /**
* {@inheritDoc} * Return if configuration is valid
*
* @return boolean True if configuration ok
*/ */
public function checkConfiguration() public function checkConfiguration()
{ {
@ -87,7 +102,9 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
/** /**
* Export the message * Export the message
* @param array $content Array containing the info about the message *
* @param array $content Array containing the info about the message
* @return void
*/ */
public function export($content) public function export($content)
{ {

View File

@ -134,6 +134,12 @@ class InterfaceLdapsynchro
$ldap=new Ldap(); $ldap=new Ldap();
$ldap->connect_bind(); $ldap->connect_bind();
if (empty($object->oldcopy) || ! is_object($object->oldcopy))
{
dol_syslog("Trigger ".$action." was called by a function that did not set previously the property ->oldcopy onto object", LOG_WARNING);
$object->oldcopy=dol_clone($object);
}
$oldinfo=$object->oldcopy->_load_ldap_info(); $oldinfo=$object->oldcopy->_load_ldap_info();
$olddn=$object->oldcopy->_load_ldap_dn($oldinfo); $olddn=$object->oldcopy->_load_ldap_dn($oldinfo);
@ -165,6 +171,12 @@ class InterfaceLdapsynchro
$ldap=new Ldap(); $ldap=new Ldap();
$ldap->connect_bind(); $ldap->connect_bind();
if (empty($object->oldcopy) || ! is_object($object->oldcopy))
{
dol_syslog("Trigger ".$action." was called by a function that did not set previously the property ->oldcopy onto object", LOG_WARNING);
$object->oldcopy=dol_clone($object);
}
$oldinfo=$object->oldcopy->_load_ldap_info(); $oldinfo=$object->oldcopy->_load_ldap_info();
$olddn=$object->oldcopy->_load_ldap_dn($oldinfo); $olddn=$object->oldcopy->_load_ldap_dn($oldinfo);
@ -291,6 +303,7 @@ class InterfaceLdapsynchro
// Groupes // Groupes
elseif ($action == 'GROUP_CREATE') elseif ($action == 'GROUP_CREATE')
{ {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap')
{ {
$ldap=new Ldap(); $ldap=new Ldap();
@ -313,11 +326,18 @@ class InterfaceLdapsynchro
} }
elseif ($action == 'GROUP_MODIFY') elseif ($action == 'GROUP_MODIFY')
{ {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap')
{ {
$ldap=new Ldap(); $ldap=new Ldap();
$ldap->connect_bind(); $ldap->connect_bind();
if (empty($object->oldcopy) || ! is_object($object->oldcopy))
{
dol_syslog("Trigger ".$action." was called by a function that did not set previously the property ->oldcopy onto object", LOG_WARNING);
$object->oldcopy=dol_clone($object);
}
$oldinfo=$object->oldcopy->_load_ldap_info(); $oldinfo=$object->oldcopy->_load_ldap_info();
$olddn=$object->oldcopy->_load_ldap_dn($oldinfo); $olddn=$object->oldcopy->_load_ldap_dn($oldinfo);
@ -343,6 +363,7 @@ class InterfaceLdapsynchro
} }
elseif ($action == 'GROUP_DELETE') elseif ($action == 'GROUP_DELETE')
{ {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') if (! empty($conf->ldap->enabled) && ! empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap')
{ {
$ldap=new Ldap(); $ldap=new Ldap();
@ -388,6 +409,12 @@ class InterfaceLdapsynchro
$ldap=new Ldap(); $ldap=new Ldap();
$ldap->connect_bind(); $ldap->connect_bind();
if (empty($object->oldcopy) || ! is_object($object->oldcopy))
{
dol_syslog("Trigger ".$action." was called by a function that did not set previously the property ->oldcopy onto object", LOG_WARNING);
$object->oldcopy=dol_clone($object);
}
$oldinfo=$object->oldcopy->_load_ldap_info(); $oldinfo=$object->oldcopy->_load_ldap_info();
$olddn=$object->oldcopy->_load_ldap_dn($oldinfo); $olddn=$object->oldcopy->_load_ldap_dn($oldinfo);
@ -511,6 +538,12 @@ class InterfaceLdapsynchro
$ldap=new Ldap(); $ldap=new Ldap();
$ldap->connect_bind(); $ldap->connect_bind();
if (empty($object->oldcopy) || ! is_object($object->oldcopy))
{
dol_syslog("Trigger ".$action." was called by a function that did not set previously the property ->oldcopy onto object", LOG_WARNING);
$object->oldcopy=dol_clone($object);
}
$oldinfo=$object->oldcopy->_load_ldap_info(); $oldinfo=$object->oldcopy->_load_ldap_info();
$olddn=$object->oldcopy->_load_ldap_dn($oldinfo); $olddn=$object->oldcopy->_load_ldap_dn($oldinfo);

View File

@ -201,6 +201,8 @@ class Export
* *
* @param int $indice Indice of export * @param int $indice Indice of export
* @param array $array_selected Filter on array of fields to export * @param array $array_selected Filter on array of fields to export
* @param array $array_filterValue Filter on array of fields to export
* @param array $array_filtered Array with filters values
* @return string SQL String. Example "select s.rowid as r_rowid, s.status as s_status from ..." * @return string SQL String. Example "select s.rowid as r_rowid, s.status as s_status from ..."
*/ */
function build_sql($indice, $array_selected, $array_filterValue, $array_filtered) function build_sql($indice, $array_selected, $array_filterValue, $array_filtered)
@ -309,14 +311,16 @@ class Export
} }
/** /**
* conditionDate
* *
* @param unknown $Field * @param string $Field Field operand 1
* @param unknown $Value * @param string $Value Value operand 2
* @param unknown $Sens * @param string $Sens Comparison operator
* @return string * @return string
*/ */
function conditionDate($Field, $Value, $Sens) function conditionDate($Field, $Value, $Sens)
{ {
// FIXME date_format is forbidden, not performant and no portable. Use instead BETWEEN
if (strlen($Value)==4) $Condition=" date_format(".$Field.",'%Y') ".$Sens." ".$Value; if (strlen($Value)==4) $Condition=" date_format(".$Field.",'%Y') ".$Sens." ".$Value;
elseif (strlen($Value)==6) $Condition=" date_format(".$Field.",'%Y%m') ".$Sens." '".$Value."'"; elseif (strlen($Value)==6) $Condition=" date_format(".$Field.",'%Y%m') ".$Sens." '".$Value."'";
else $Condition=" date_format(".$Field.",'%Y%m%d') ".$Sens." ".$Value; else $Condition=" date_format(".$Field.",'%Y%m%d') ".$Sens." ".$Value;
@ -341,21 +345,21 @@ class Export
case 'Date': case 'Date':
case 'Duree': case 'Duree':
case 'Numeric': case 'Numeric':
$szFilterField="<input type=Text name=".$NameField." value='".$ValueField."'>"; $szFilterField='<input type="text" name='.$NameField." value='".$ValueField."'>";
break; break;
case 'Boolean': case 'Boolean':
$szFilterField="<select name=".$NameField.">"; $szFilterField="<select name=".$NameField.'" class="flat">';
$szFilterField.='<option '; $szFilterField.='<option ';
if ($ValueField=='') $szFilterField.=' selected '; if ($ValueField=='') $szFilterField.=' selected ';
$szFilterField.=' value="">Sans</option>'; $szFilterField.=' value="">&nbsp;</option>';
$szFilterField.='<option '; $szFilterField.='<option ';
if ($ValueField=='1') $szFilterField.=' selected '; if ($ValueField=='1') $szFilterField.=' selected ';
$szFilterField.=' value="1">Oui</option>'; $szFilterField.=' value="1">'.yn(1).'</option>';
$szFilterField.='<option '; $szFilterField.='<option ';
if ($ValueField=='0') $szFilterField.=' selected '; if ($ValueField=='0') $szFilterField.=' selected ';
$szFilterField.=' value="0">Non</option>'; $szFilterField.=' value="0">'.yn(0).'</option>';
$szFilterField.="</select>"; $szFilterField.="</select>";
break; break;
case 'List': case 'List':
@ -396,6 +400,8 @@ class Export
} }
} }
$szFilterField.="</select>"; $szFilterField.="</select>";
$this->db->close();
} }
break; break;
} }
@ -450,6 +456,8 @@ class Export
* @param string $model Export format * @param string $model Export format
* @param string $datatoexport Name of dataset to export * @param string $datatoexport Name of dataset to export
* @param array $array_selected Filter on array of fields to export * @param array $array_selected Filter on array of fields to export
* @param array $array_filterValue Filter on array of fields with a filter
* @param array $array_filtered Values of filters
* @param string $sqlquery If set, transmit a sql query instead of building it from arrays * @param string $sqlquery If set, transmit a sql query instead of building it from arrays
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
@ -708,7 +716,10 @@ class Export
} }
/** /**
* Output list all export models
* TODO Move this into a class htmlxxx.class.php
* *
* @return void
*/ */
function list_export_model() function list_export_model()
{ {

View File

@ -112,6 +112,9 @@ $sqlusedforexport='';
$upload_dir = $conf->export->dir_temp.'/'.$user->id; $upload_dir = $conf->export->dir_temp.'/'.$user->id;
$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1);
//$usefilters=1;
/* /*
* Actions * Actions
@ -182,6 +185,7 @@ if ($action=='unselectfield')
} }
} }
/*
if ($action=='selectFilterfield') if ($action=='selectFilterfield')
{ {
if ($_GET["field"]=='all') if ($_GET["field"]=='all')
@ -226,6 +230,7 @@ if ($action=='unselectFilterfield')
$_SESSION["export_filtered_fields"]=$array_filtered; $_SESSION["export_filtered_fields"]=$array_filtered;
} }
} }
*/
if ($action=='downfield' || $action=='upfield') if ($action=='downfield' || $action=='upfield')
{ {
@ -559,13 +564,13 @@ if ($step == 2 && $datatoexport)
// Select request if all fields are selected // Select request if all fields are selected
$sqlmaxforexport=$objexport->build_sql(0, array(), array(), array()); $sqlmaxforexport=$objexport->build_sql(0, array(), array(), array());
// $this->array_export_module[0]=$module; // $this->array_export_module[0]=$module;
// $this->array_export_code[0]=$module->export_code[$r]; // $this->array_export_code[0]=$module->export_code[$r];
// $this->array_export_label[0]=$module->export_label[$r]; // $this->array_export_label[0]=$module->export_label[$r];
// $this->array_export_sql[0]=$module->export_sql[$r]; // $this->array_export_sql[0]=$module->export_sql[$r];
// $this->array_export_fields[0]=$module->export_fields_array[$r]; // $this->array_export_fields[0]=$module->export_fields_array[$r];
// $this->array_export_entities[0]=$module->export_fields_entities[$r]; // $this->array_export_entities[0]=$module->export_fields_entities[$r];
// $this->array_export_alias[0]=$module->export_fields_alias[$r]; // $this->array_export_alias[0]=$module->export_fields_alias[$r];
$var=true; $var=true;
$i = 0; $i = 0;
@ -605,7 +610,6 @@ if ($step == 2 && $datatoexport)
print $form->textwithpicto($text,$htmltext); print $form->textwithpicto($text,$htmltext);
//print ' ('.$code.')'; //print ' ('.$code.')';
print '</td>'; print '</td>';
//$bit=1; FIXME not used ?
} }
else else
{ {
@ -617,11 +621,9 @@ if ($step == 2 && $datatoexport)
print '</td>'; print '</td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=selectfield&field='.$code.'">'.img_right().'</a></td>'; print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=selectfield&field='.$code.'">'.img_right().'</a></td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
//$bit=0; FIXME not used ?
} }
print '</tr>'; print '</tr>';
//$save_select.=$bit; FIXME not used ?
} }
print '</table>'; print '</table>';
@ -639,7 +641,7 @@ if ($step == 2 && $datatoexport)
if (count($array_selected)) if (count($array_selected))
{ {
// If filters exist // If filters exist
if ($conf->global->MAIN_FEATURES_LEVEL > 1 && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0]))
{ {
print '<a class="butAction" href="export.php?step=3&datatoexport='.$datatoexport.'">'.$langs->trans("NextStep").'</a>'; print '<a class="butAction" href="export.php?step=3&datatoexport='.$datatoexport.'">'.$langs->trans("NextStep").'</a>';
} }
@ -714,26 +716,17 @@ if ($step == 3 && $datatoexport)
print '<br>'; print '<br>';
// Combo list of export models // Combo list of export models
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; print $langs->trans("SelectFilterFields").'<br>';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="select_model">';
print '<input type="hidden" name="step" value="3">';
print '<input type="hidden" name="datatoexport" value="'.$datatoexport.'">';
print '<table><tr><td colspan="2">';
print $langs->trans("SelectExportFields").' ';
$htmlother->select_export_model($exportmodelid,'exportmodelid',$datatoexport,1);
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
print '</td></tr></table>';
print '</form>';
// un formulaire en plus pour recuperer les filtres // un formulaire en plus pour recuperer les filtres
print '<form action="export.php?step=4&action=submitFormField&datatoexport='.$datatoexport.'" name="FilterField" method="post">'; print '<form action="'.$_SERVER["PHP_SELF"].'?step=4&action=submitFormField&datatoexport='.$datatoexport.'" name="FilterField" method="post">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Entities").'</td>'; print '<td>'.$langs->trans("Entities").'</td>';
print '<td>'.$langs->trans("FilterableFields").'</td>'; //print '<td>'.$langs->trans("ExportableFields").'</td>';
print '<td align="center"></td>'; //print '<td align="center"></td>';
print '<td>'.$langs->trans("FilteredFields").'</td>'; print '<td>'.$langs->trans("ExportableFields").'</td>';
print '<td width="25%">'.$langs->trans("FilteredFieldsValues").'</td>'; print '<td width="25%">'.$langs->trans("FilteredFieldsValues").'</td>';
print '</tr>'; print '</tr>';
@ -748,14 +741,13 @@ if ($step == 3 && $datatoexport)
$var=true; $var=true;
$i = 0; $i = 0;
// on boucle sur les champs filtrable // on boucle sur les champs
foreach($Typefieldsarray as $code=>$label) foreach($fieldsarray as $code => $label)
{ {
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr ".$bc[$var].">";
$i++; $i++;
$entity=(! empty($objexport->array_export_entities[0][$code])?$objexport->array_export_entities[0][$code]:$objexport->array_export_icon[0]); $entity=(! empty($objexport->array_export_entities[0][$code])?$objexport->array_export_entities[0][$code]:$objexport->array_export_icon[0]);
$entityicon=(! empty($entitytoicon[$entity])?$entitytoicon[$entity]:$entity); $entityicon=(! empty($entitytoicon[$entity])?$entitytoicon[$entity]:$entity);
$entitylang=(! empty($entitytolang[$entity])?$entitytolang[$entity]:$entity); $entitylang=(! empty($entitytolang[$entity])?$entitytolang[$entity]:$entity);
@ -776,41 +768,28 @@ if ($step == 3 && $datatoexport)
$text=$langs->trans($labelName); $text=$langs->trans($labelName);
$tablename=getablenamefromfield($code,$sqlmaxforexport); $tablename=getablenamefromfield($code,$sqlmaxforexport);
$htmltext ='<b>'.$langs->trans("Name").':</b> '.$text.' ('.$label.')<br>'; $htmltext ='<b>'.$langs->trans("Name").':</b> '.$text.'<br>';
$htmltext.='<b>'.$langs->trans("Table")." -> ".$langs->trans("Field").":</b> ".$tablename." -> ".preg_replace('/^.*\./','',$code)."<br>"; $htmltext.='<b>'.$langs->trans("Table")." -> ".$langs->trans("Field").":</b> ".$tablename." -> ".preg_replace('/^.*\./','',$code)."<br>";
if (isset($array_filtered[$code]) && $array_filtered[$code]) print '<td>';
print $form->textwithpicto($text,$htmltext);
print '</td>';
print '<td>';
if (! empty($Typefieldsarray[$code]))
{ {
// Selected fields $szInfoFiltre=$objexport->genDocFilter($Typefieldsarray[$code]);
print '<td>&nbsp;</td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=3&datatoexport='.$datatoexport.'&action=unselectFilterfield&field='.$code.'">'.img_left().'</a></td>';
print '<td>';
print $form->textwithpicto($text,$htmltext);
print '</td>';
//$bit=1; FIXME not used?
// ici le filtre
print '<td>';
$szInfoFiltre=$objexport->genDocFilter($label);
if ($szInfoFiltre) if ($szInfoFiltre)
print $form->textwithpicto($objexport->build_filterField($label, $labelName, $ValueFilter), $szInfoFiltre); {
$tmp=$objexport->build_filterField($Typefieldsarray[$code], $code, $ValueFilter);
print $form->textwithpicto($tmp, $szInfoFiltre);
}
else else
print $objexport->build_filterField($label, $labelName, $ValueFilter); {
print '</td>'; print $objexport->build_filterField($Typefieldsarray[$code], $code, $ValueFilter);
} }
else
{
// Fields not selected
print '<td>';
//print $text.'-'.$htmltext."<br>";
print $form->textwithpicto($text,$htmltext);
//print ' ('.$code.')';
print '</td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=3&datatoexport='.$datatoexport.'&action=selectFilterfield&field='.$code.'">'.img_right().'</a></td>';
print '<td colspan=2>&nbsp;</td>';
//$bit=0; FIXME not used?
} }
print '</td>';
print '</tr>'; print '</tr>';
//$save_selectFilter.=$bit; FIXME not used?
} }
print '</table>'; print '</table>';
@ -839,6 +818,7 @@ if ($step == 4 && $datatoexport)
/* /*
* Affichage onglets * Affichage onglets
*/ */
$stepoffset=0;
$h = 0; $h = 0;
$head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=1'; $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=1';
@ -850,15 +830,16 @@ if ($step == 4 && $datatoexport)
$h++; $h++;
// If filters exist // If filters exist
if ($conf->global->MAIN_FEATURES_LEVEL > 1 && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0]))
{ {
$head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=3&datatoexport='.$datatoexport; $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=3&datatoexport='.$datatoexport;
$head[$h][1] = $langs->trans("Step")." 3"; $head[$h][1] = $langs->trans("Step")." 3";
$h++; $h++;
$stepoffset++;
} }
$head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=4&datatoexport='.$datatoexport; $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=4&datatoexport='.$datatoexport;
$head[$h][1] = $langs->trans("Step")." 4"; $head[$h][1] = $langs->trans("Step")." ".(3+$stepoffset);
$hselected=$h; $hselected=$h;
$h++; $h++;
@ -1055,6 +1036,7 @@ if ($step == 5 && $datatoexport)
* Affichage onglets * Affichage onglets
*/ */
$h = 0; $h = 0;
$stepoffset=0;
$head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=1'; $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=1';
$head[$h][1] = $langs->trans("Step")." 1"; $head[$h][1] = $langs->trans("Step")." 1";
@ -1065,19 +1047,20 @@ if ($step == 5 && $datatoexport)
$h++; $h++;
// si le filtrage est parametre pour l'export ou pas // si le filtrage est parametre pour l'export ou pas
if ($conf->global->MAIN_FEATURES_LEVEL > 1 && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0]))
{ {
$head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=3&datatoexport='.$datatoexport; $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=3&datatoexport='.$datatoexport;
$head[$h][1] = $langs->trans("Step")." 3"; $head[$h][1] = $langs->trans("Step")." 3";
$h++; $h++;
$stepoffset++;
} }
$head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=3&datatoexport='.$datatoexport; $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=4&datatoexport='.$datatoexport;
$head[$h][1] = $langs->trans("Step")." 4"; $head[$h][1] = $langs->trans("Step")." ".(3+$stepoffset);
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=5&datatoexport='.$datatoexport; $head[$h][0] = DOL_URL_ROOT.'/exports/export.php?step=5&datatoexport='.$datatoexport;
$head[$h][1] = $langs->trans("Step")." 5"; $head[$h][1] = $langs->trans("Step")." ".(4+$stepoffset);
$hselected=$h; $hselected=$h;
$h++; $h++;
@ -1152,10 +1135,10 @@ if ($step == 5 && $datatoexport)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td width="16">'.img_picto_common($key,$objmodelexport->getPicto($key)).'</td>'; print '<td width="16">'.img_picto_common($key,$objmodelexport->getPictoForKey($key)).'</td>';
$text=$objmodelexport->getDriverDesc($key); $text=$objmodelexport->getDriverDescForKey($key);
print '<td>'.$form->textwithpicto($objmodelexport->getDriverLabel($key),$text).'</td>'; print '<td>'.$form->textwithpicto($objmodelexport->getDriverLabelForKey($key),$text).'</td>';
print '<td>'.$objmodelexport->getLibLabel($key).'</td><td align="right">'.$objmodelexport->getLibVersion($key).'</td></tr>'."\n"; print '<td>'.$objmodelexport->getLibLabelForKey($key).'</td><td align="right">'.$objmodelexport->getLibVersionForKey($key).'</td></tr>'."\n";
} }
print '</table>'; print '</table>';

View File

@ -130,11 +130,11 @@ foreach($liste as $key => $val)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>'; print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key),$model->getPictoForKey($key)).'</td>';
$text=$model->getDriverDesc($key); $text=$model->getDriverDescForKey($key);
print '<td>'.$form->textwithpicto($model->getDriverLabel($key),$text).'</td>'; print '<td>'.$form->textwithpicto($model->getDriverLabelForKey($key),$text).'</td>';
print '<td>'.$model->getLibLabel($key).'</td>'; print '<td>'.$model->getLibLabelForKey($key).'</td>';
print '<td nowrap="nowrap" align="right">'.$model->getLibVersion($key).'</td>'; print '<td nowrap="nowrap" align="right">'.$model->getLibVersionForKey($key).'</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -42,7 +42,7 @@ $confirm=GETPOST('confirm','alpha');
// Security check // Security check
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'fournisseur', $facid, 'facture_fourn', 'facture'); $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
// Get parameters // Get parameters
$sortfield = GETPOST("sortfield",'alpha'); $sortfield = GETPOST("sortfield",'alpha');
@ -130,7 +130,7 @@ if ($object->id > 0)
// Ref // Ref
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">'; print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($object, 'facid', $linkback, 1, 'rowid', 'ref', $morehtmlref); print $form->showrefnav($object, 'facid', $linkback, 1, 'rowid', 'ref');
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
@ -172,12 +172,15 @@ if ($object->id > 0)
} }
print ')'; print ')';
} }
// FIXME $facidnext is not defined
/*
if ($facidnext > 0) if ($facidnext > 0)
{ {
$facthatreplace=new FactureFournisseur($db); $facthatreplace=new FactureFournisseur($db);
$facthatreplace->fetch($facidnext); $facthatreplace->fetch($facidnext);
print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')'; print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
} }
*/
print '</td></tr>'; print '</td></tr>';
// Label // Label

View File

@ -1471,16 +1471,15 @@ else
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($object->total_tva).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->currency).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($object->total_tva).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->currency).'</td></tr>';
// Amount Local Taxes // Amount Local Taxes
// TODO I use here $societe->localtax1_assuj. Before it was $mysoc->localtax1_assuj, but this is a supplier invoice, so made by supplier, so depends on supplier properties
if ($societe->localtax1_assuj=="1") //Localtax1 RE if ($societe->localtax1_assuj=="1") //Localtax1 RE
{ {
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>'; print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax1).'</td>'; print '<td align="right">'.price($object->total_localtax1).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
} }
if ($societe->localtax2_assuj=="1") //Localtax2 IRPF if ($societe->localtax2_assuj=="1") //Localtax2 IRPF
{ {
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>'; print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
print '<td align="right">'.price($object->total_localtax2).'</td>'; print '<td align="right">'.price($object->total_localtax2).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
} }
@ -1658,7 +1657,7 @@ else
print '<td>'; print '<td>';
if ($object->lines[$i]->fk_product) if ($object->lines[$i]->fk_product)
{ {
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne print '<a name="'.$object->lines[$i]->rowid.'"></a>'; // ancre pour retourner sur la ligne
$product_static=new ProductFournisseur($db); $product_static=new ProductFournisseur($db);
$product_static->fetch($object->lines[$i]->fk_product); $product_static->fetch($object->lines[$i]->fk_product);

View File

@ -36,7 +36,7 @@ $langs->load('bills');
$langs->load('banks'); $langs->load('banks');
$facid=GETPOST('facid','int'); $facid=GETPOST('facid','int');
$action=GETPOST('action'); $action=GETPOST('action','alpha');
$socid=GETPOST('socid','int'); $socid=GETPOST('socid','int');
$sortfield = GETPOST("sortfield",'alpha'); $sortfield = GETPOST("sortfield",'alpha');
@ -86,7 +86,7 @@ if ($action == 'add_paiement')
// Effectue les verifications des parametres // Effectue les verifications des parametres
if ($_POST['paiementid'] <= 0) if ($_POST['paiementid'] <= 0)
{ {
$mesg = '<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('PaymentMode')).'</div>'; setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), 'errors');
$error++; $error++;
} }
@ -96,20 +96,20 @@ if ($action == 'add_paiement')
// d'un paiement // d'un paiement
if (! $_POST['accountid']) if (! $_POST['accountid'])
{ {
$mesg = '<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')).'</div>'; setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), 'errors');
$error++; $error++;
} }
} }
if ($total == 0) if ($total == 0)
{ {
$mesg = '<div class="error">'.$langs->transnoentities('ErrorFieldRequired',$langs->trans('PaymentAmount')).'</div>'; setEventMessage($langs->trans('ErrorFieldRequired',$langs->trans('PaymentAmount')), 'errors');
$error++; $error++;
} }
if (empty($datepaye)) if (empty($datepaye))
{ {
$mesg = '<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('Date')).'</div>'; setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('Date')), 'errors');
$error++; $error++;
} }
@ -129,7 +129,7 @@ if ($action == 'add_paiement')
$paiement_id = $paiement->create($user,(GETPOST('closepaidinvoices')=='on'?1:0)); $paiement_id = $paiement->create($user,(GETPOST('closepaidinvoices')=='on'?1:0));
if ($paiement_id < 0) if ($paiement_id < 0)
{ {
$errmsg='<div class="error">'.$paiement->error.'</div>'; setEventMessage($paiement->error, 'errors');
$error++; $error++;
} }
} }
@ -139,7 +139,7 @@ if ($action == 'add_paiement')
$result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$_POST['accountid'],'',''); $result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$_POST['accountid'],'','');
if ($result < 0) if ($result < 0)
{ {
$errmsg='<div class="error">'.$paiement->error.'</div>'; setEventMessage($paiement->error, 'errors');
$error++; $error++;
} }
} }
@ -188,7 +188,7 @@ if ($action == 'create' || $action == 'add_paiement')
$facture = new FactureFournisseur($db); $facture = new FactureFournisseur($db);
$facture->fetch($facid); $facture->fetch($facid);
$datefacture=dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datefacture=dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$dateinvoice=($datefacture==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0):$datefacture); $dateinvoice=($datefacture==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0):$datefacture);
$sql = 'SELECT s.nom, s.rowid as socid,'; $sql = 'SELECT s.nom, s.rowid as socid,';
@ -210,9 +210,6 @@ if ($action == 'create' || $action == 'add_paiement')
print_fiche_titre($langs->trans('DoPayment')); print_fiche_titre($langs->trans('DoPayment'));
if ($mesg) dol_htmloutput_mesg($mesg);
if ($errmsg) dol_htmloutput_errors($errmsg);
print '<form name="addpaiement" action="paiement.php" method="post">'; print '<form name="addpaiement" action="paiement.php" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add_paiement">'; print '<input type="hidden" name="action" value="add_paiement">';
@ -237,7 +234,7 @@ if ($action == 'create' || $action == 'add_paiement')
$form->select_types_paiements(empty($_POST['paiementid'])?'':$_POST['paiementid'],'paiementid'); $form->select_types_paiements(empty($_POST['paiementid'])?'':$_POST['paiementid'],'paiementid');
print '</td>'; print '</td>';
print '<td rowspan="3" valign="top">'; print '<td rowspan="3" valign="top">';
print '<textarea name="comment" wrap="soft" cols="60" rows="'._ROWS_3.'">'.(empty($_POST['comment'])?'':$_POST['comment']).'</textarea></td></tr>'; print '<textarea name="comment" wrap="soft" cols="60" rows="'.ROWS_3.'">'.(empty($_POST['comment'])?'':$_POST['comment']).'</textarea></td></tr>';
print '<tr><td>'.$langs->trans('Numero').'</td><td><input name="num_paiement" type="text" value="'.(empty($_POST['num_paiement'])?'':$_POST['num_paiement']).'"></td></tr>'; print '<tr><td>'.$langs->trans('Numero').'</td><td><input name="num_paiement" type="text" value="'.(empty($_POST['num_paiement'])?'':$_POST['num_paiement']).'"></td></tr>';
if (! empty($conf->banque->enabled)) if (! empty($conf->banque->enabled))
{ {
@ -254,15 +251,15 @@ if ($action == 'create' || $action == 'add_paiement')
/* /*
* Autres factures impayees * Autres factures impayees
*/ */
$sql = 'SELECT f.rowid as facid,f.rowid as ref,f.facnumber,f.total_ttc, f.datef as df'; $sql = 'SELECT f.rowid as facid, f.rowid as ref, f.facnumber, f.total_ht, f.total_ttc, f.datef as df';
$sql.= ', sum(pf.amount) as am'; $sql.= ', SUM(pf.amount) as am';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
$sql.= " WHERE f.entity = ".$conf->entity; $sql.= " WHERE f.entity = ".$conf->entity;
$sql.= ' AND f.fk_soc = '.$facture->socid; $sql.= ' AND f.fk_soc = '.$facture->socid;
$sql.= ' AND f.paye = 0'; $sql.= ' AND f.paye = 0';
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee $sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee
$sql.= ' GROUP BY f.rowid,f.facnumber,f.total_ttc,f.datef'; $sql.= ' GROUP BY f.rowid, f.facnumber, f.total_ht, f.total_ttc, f.datef';
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {
@ -286,6 +283,7 @@ if ($action == 'create' || $action == 'add_paiement')
$var=True; $var=True;
$total=0; $total=0;
$total_ttc=0;
$totalrecu=0; $totalrecu=0;
while ($i < $num) while ($i < $num)
{ {
@ -311,7 +309,7 @@ if ($action == 'create' || $action == 'add_paiement')
$namef = 'amount_'.$objp->facid; $namef = 'amount_'.$objp->facid;
print '<input type="text" size="8" name="'.$namef.'" value="'.GETPOST($namef).'">'; print '<input type="text" size="8" name="'.$namef.'" value="'.GETPOST($namef).'">';
print "</td></tr>\n"; print "</td></tr>\n";
$total+=$objp->total; $total+=$objp->total_ht;
$total_ttc+=$objp->total_ttc; $total_ttc+=$objp->total_ttc;
$totalrecu+=$objp->am; $totalrecu+=$objp->am;
$i++; $i++;
@ -349,7 +347,7 @@ if ($action == 'create' || $action == 'add_paiement')
/* /*
* Show list * Show list
*/ */
if (! $_GET['action'] && ! $_POST['action']) if (empty($action))
{ {
if ($page == -1) $page = 0 ; if ($page == -1) $page = 0 ;
$limit = $conf->liste_limit; $limit = $conf->liste_limit;
@ -358,6 +356,12 @@ if (! $_GET['action'] && ! $_POST['action'])
if (! $sortorder) $sortorder='DESC'; if (! $sortorder) $sortorder='DESC';
if (! $sortfield) $sortfield='p.datep'; if (! $sortfield) $sortfield='p.datep';
$search_ref=GETPOST('search_ref');
$search_account=GETPOST('search_account');
$search_paymenttype=GETPOST('search_paymenttype');
$search_amount=GETPOST('search_amount');
$search_company=GETPOST('search_company');
$sql = 'SELECT p.rowid as pid, p.datep as dp, p.amount as pamount, p.num_paiement,'; $sql = 'SELECT p.rowid as pid, p.datep as dp, p.amount as pamount, p.num_paiement,';
$sql.= ' s.rowid as socid, s.nom,'; $sql.= ' s.rowid as socid, s.nom,';
$sql.= ' c.libelle as paiement_type,'; $sql.= ' c.libelle as paiement_type,';
@ -379,25 +383,25 @@ if (! $_GET['action'] && ! $_POST['action'])
$sql .= ' AND f.fk_soc = '.$socid; $sql .= ' AND f.fk_soc = '.$socid;
} }
// Search criteria // Search criteria
if ($_REQUEST["search_ref"]) if (! empty($search_ref))
{ {
$sql .= ' AND p.rowid='.$db->escape($_REQUEST["search_ref"]); $sql .= ' AND p.rowid='.$db->escape($search_ref);
} }
if ($_REQUEST["search_account"]) if (! empty($search_account))
{ {
$sql .= ' AND b.fk_account='.$db->escape($_REQUEST["search_account"]); $sql .= ' AND b.fk_account='.$db->escape($search_account);
} }
if ($_REQUEST["search_paymenttype"]) if (! empty($search_paymenttype))
{ {
$sql .= " AND c.code='".$db->escape($_REQUEST["search_paymenttype"])."'"; $sql .= " AND c.code='".$db->escape($search_paymenttype)."'";
} }
if ($_REQUEST["search_amount"]) if (! empty($search_amount))
{ {
$sql .= " AND p.amount=".price2num($_REQUEST["search_amount"]); $sql .= " AND p.amount=".price2num($search_amount);
} }
if ($_REQUEST["search_company"]) if (! empty($search_company))
{ {
$sql .= " AND s.nom LIKE '%".$db->escape($_REQUEST["search_company"])."%'"; $sql .= " AND s.nom LIKE '%".$db->escape($search_company)."%'";
} }
$sql.= " GROUP BY p.rowid, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.libelle, ba.rowid, ba.label"; $sql.= " GROUP BY p.rowid, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.libelle, ba.rowid, ba.label";
if (!$user->rights->societe->client->voir) $sql .= ", sc.fk_soc, sc.fk_user"; if (!$user->rights->societe->client->voir) $sql .= ", sc.fk_soc, sc.fk_user";
@ -412,9 +416,9 @@ if (! $_GET['action'] && ! $_POST['action'])
$var=True; $var=True;
$paramlist=''; $paramlist='';
$paramlist.=($_REQUEST["search_ref"]?"&search_ref=".$_REQUEST["search_ref"]:""); $paramlist.=(! empty($search_ref)?"&search_ref=".$search_ref:"");
$paramlist.=($_REQUEST["search_company"]?"&search_company=".$_REQUEST["search_company"]:""); $paramlist.=(! empty($search_company)?"&search_company=".$search_company:"");
$paramlist.=($_REQUEST["search_amount"]?"&search_amount=".$_REQUEST["search_amount"]:""); $paramlist.=(! empty($search_amount)?"&search_amount=".$search_amount:"");
print_barre_liste($langs->trans('SupplierPayments'), $page, 'paiement.php',$paramlist,$sortfield,$sortorder,'',$num); print_barre_liste($langs->trans('SupplierPayments'), $page, 'paiement.php',$paramlist,$sortfield,$sortorder,'',$num);
@ -436,20 +440,20 @@ if (! $_GET['action'] && ! $_POST['action'])
// Lines for filters fields // Lines for filters fields
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td align="left">'; print '<td align="left">';
print '<input class="fat" type="text" size="4" name="search_ref" value="'.$_REQUEST["search_ref"].'">'; print '<input class="fat" type="text" size="4" name="search_ref" value="'.$search_ref.'">';
print '</td>'; print '</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td align="left">'; print '<td align="left">';
print '<input class="fat" type="text" size="6" name="search_company" value="'.$_REQUEST["search_company"].'">'; print '<input class="fat" type="text" size="6" name="search_company" value="'.$search_company.'">';
print '</td>'; print '</td>';
print '<td>'; print '<td>';
$form->select_types_paiements($_REQUEST["search_paymenttype"],'search_paymenttype','',2,1,1); $form->select_types_paiements($search_paymenttype,'search_paymenttype','',2,1,1);
print '</td>'; print '</td>';
print '<td>'; print '<td>';
$form->select_comptes($_REQUEST["search_account"],'search_account',0,'',1); $form->select_comptes($search_account,'search_account',0,'',1);
print '</td>'; print '</td>';
print '<td align="right">'; print '<td align="right">';
print '<input class="fat" type="text" size="4" name="search_amount" value="'.$_REQUEST["search_amount"].'">'; print '<input class="fat" type="text" size="4" name="search_amount" value="'.$search_amount.'">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">'; print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";

View File

@ -1,20 +1,21 @@
<?php <?php
/* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com> * Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
* * Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * This program is free software; you can redistribute it and/or modify
* the Free Software Foundation; either version 2 of the License, or * it under the terms of the GNU General Public License as published by
* (at your option) any later version. * the Free Software Foundation; either version 2 of the License, or
* * (at your option) any later version.
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful,
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** /**
* \file holiday.class.php * \file holiday.class.php
@ -1182,12 +1183,12 @@ class Holiday extends CommonObject
// On séléctionne les utilisateurs qui ne sont pas déjà dans le module // On séléctionne les utilisateurs qui ne sont pas déjà dans le module
$sql = "SELECT u.fk_user"; $sql = "SELECT u.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as u"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as u";
$sql.= " WHERE u.fk_user NOT IN(".$listUsersDolibarr.")"; $sql.= " WHERE u.fk_user NOT IN (".$listUsersDolibarr.")";
$result = $this->db->query($sql); $resql = $this->db->query($sql);
// Si pas d'erreur SQL // Si pas d'erreur SQL
if($result) { if ($resql) {
$i = 0; $i = 0;
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);

View File

@ -43,14 +43,14 @@ if (empty($conf->holiday->enabled))
} }
$verifConf.= "SELECT value"; $sql = "SELECT value";
$verifConf.= " FROM ".MAIN_DB_PREFIX."holiday_config"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_config";
$verifConf.= " WHERE name = 'userGroup'"; $sql.= " WHERE name = 'userGroup'";
$result = $db->query($verifConf); $result = $db->query($sql);
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
if($obj->value == NULL) if ($obj->value == NULL)
{ {
llxHeader('',$langs->trans('CPTitreMenu')); llxHeader('',$langs->trans('CPTitreMenu'));
print '<div class="tabBar">'; print '<div class="tabBar">';

View File

@ -1,20 +1,21 @@
<?php <?php
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com> * Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
* * Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * This program is free software; you can redistribute it and/or modify
* the Free Software Foundation; either version 2 of the License, or * it under the terms of the GNU General Public License as published by
* (at your option) any later version. * the Free Software Foundation; either version 2 of the License, or
* * (at your option) any later version.
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * This program is distributed in the hope that it will be useful,
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** /**
* \file fiche.php * \file fiche.php
@ -33,14 +34,14 @@ require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
// Get parameters // Get parameters
$myparam = GETPOST("myparam"); $myparam = GETPOST("myparam");
$action=GETPOST('action'); $action=GETPOST('action', 'alpha');
$id=GETPOST('id'); $id=GETPOST('id', 'int');
// Protection if external user // Protection if external user
if ($user->societe_id > 0) accessforbidden(); if ($user->societe_id > 0) accessforbidden();
$user_id = $user->id; $user_id = $user->id;
$now=dol_now();
/******************************************************************* /*******************************************************************
@ -50,7 +51,6 @@ $user_id = $user->id;
// Si création de la demande // Si création de la demande
if ($action == 'create') if ($action == 'create')
{ {
// Si pas le droit de créer une demande // Si pas le droit de créer une demande
if(!$user->rights->holiday->write) if(!$user->rights->holiday->write)
{ {
@ -290,7 +290,6 @@ if ($action == 'confirm_send')
$delayForRequest = $cp->getConfCP('delayForRequest'); $delayForRequest = $cp->getConfCP('delayForRequest');
//$delayForRequest = $delayForRequest * (60*60*24); //$delayForRequest = $delayForRequest * (60*60*24);
$now=dol_now();
$nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd'); $nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd');
// Si l'option pour avertir le valideur en cas de délai trop court // Si l'option pour avertir le valideur en cas de délai trop court
@ -703,11 +702,11 @@ if (empty($id) || $action == 'add' || $action == 'request')
// Liste des utiliseurs du groupes choisi dans la config // Liste des utiliseurs du groupes choisi dans la config
$idGroupValid = $cp->getConfCP('userGroup'); $idGroupValid = $cp->getConfCP('userGroup');
$validator = new UserGroup($db,$idGroupValid); $validator = new UserGroup($db, $idGroupValid);
$valideurarray = $validator->listUsersForGroup(); $valideurarray = $validator->listUsersForGroup();
print '<td>'; print '<td>';
print $html->select_dolusers($valideur,"valideur",1,"",0,$valideurarray,''); print $html->select_dolusers($validator->id, "valideur", 1, "", 0, $valideurarray);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com> * Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -71,6 +71,7 @@ $search_statut = GETPOST('select_statut');
$max_year = 5; $max_year = 5;
$min_year = 10; $min_year = 10;
$filter='';
llxHeader(array(),$langs->trans('CPTitreMenu')); llxHeader(array(),$langs->trans('CPTitreMenu'));
@ -185,7 +186,7 @@ if($holiday_payes == '-1')
$var=true; $num = count($holiday->holiday); $var=true; $num = count($holiday->holiday);
$html = new Form($db); $html = new Form($db);
$htmlother = new FormOther($db); $htmlother = new FormOther($db);
print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num,$nbtotalofrecords); print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, "", $num);
print '<div class="tabBar">'; print '<div class="tabBar">';

View File

@ -442,9 +442,9 @@ if ($step == 2 && $datatoimport)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td width="16">'.img_picto_common($key,$objmodelimport->getPicto($key)).'</td>'; print '<td width="16">'.img_picto_common($key,$objmodelimport->getPictoForKey($key)).'</td>';
$text=$objmodelimport->getDriverDesc($key); $text=$objmodelimport->getDriverDescForKey($key);
print '<td>'.$form->textwithpicto($objmodelimport->getDriverLabel($key),$text).'</td>'; print '<td>'.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key),$text).'</td>';
print '<td align="center"><a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a></td>'; print '<td align="center"><a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a></td>';
// Action button // Action button
print '<td align="right">'; print '<td align="right">';
@ -510,8 +510,8 @@ if ($step == 3 && $datatoimport)
// Source file format // Source file format
print '<tr><td width="25%">'.$langs->trans("SourceFileFormat").'</td>'; print '<tr><td width="25%">'.$langs->trans("SourceFileFormat").'</td>';
print '<td>'; print '<td>';
$text=$objmodelimport->getDriverDesc($format); $text=$objmodelimport->getDriverDescForKey($format);
print $form->textwithpicto($objmodelimport->getDriverLabel($format),$text); print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format),$text);
print '</td><td align="right" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$format.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a>'; print '</td><td align="right" nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$format.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a>';
print '</td></tr>'; print '</td></tr>';
@ -715,8 +715,8 @@ if ($step == 4 && $datatoimport)
// Source file format // Source file format
print '<tr><td width="25%">'.$langs->trans("SourceFileFormat").'</td>'; print '<tr><td width="25%">'.$langs->trans("SourceFileFormat").'</td>';
print '<td>'; print '<td>';
$text=$objmodelimport->getDriverDesc($format); $text=$objmodelimport->getDriverDescForKey($format);
print $form->textwithpicto($objmodelimport->getDriverLabel($format),$text); print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format),$text);
print '</td></tr>'; print '</td></tr>';
// Separator and enclosure // Separator and enclosure
@ -1164,8 +1164,8 @@ if ($step == 5 && $datatoimport)
// Source file format // Source file format
print '<tr><td width="25%">'.$langs->trans("SourceFileFormat").'</td>'; print '<tr><td width="25%">'.$langs->trans("SourceFileFormat").'</td>';
print '<td>'; print '<td>';
$text=$objmodelimport->getDriverDesc($format); $text=$objmodelimport->getDriverDescForKey($format);
print $form->textwithpicto($objmodelimport->getDriverLabel($format),$text); print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format),$text);
print '</td></tr>'; print '</td></tr>';
// File to import // File to import
@ -1499,7 +1499,7 @@ if ($step == 6 && $datatoimport)
print '<tr><td width="25%">'.$langs->trans("SourceFileFormat").'</td>'; print '<tr><td width="25%">'.$langs->trans("SourceFileFormat").'</td>';
print '<td>'; print '<td>';
$text=$objmodelimport->getDriverDesc($format); $text=$objmodelimport->getDriverDesc($format);
print $form->textwithpicto($objmodelimport->getDriverLabel($format),$text); print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format),$text);
print '</td></tr>'; print '</td></tr>';
// File to import // File to import

View File

@ -121,11 +121,11 @@ foreach($liste as $key)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td width="16">'.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).'</td>'; print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key),$model->getPictoForKey($key)).'</td>';
$text=$model->getDriverDesc($key); $text=$model->getDriverDescForKey($key);
print '<td>'.$form->textwithpicto($model->getDriverLabel($key),$text).'</td>'; print '<td>'.$form->textwithpicto($model->getDriverLabelForKey($key),$text).'</td>';
print '<td>'.$model->getLibLabel($key).'</td>'; print '<td>'.$model->getLibLabelForKey($key).'</td>';
print '<td nowrap="nowrap" align="right">'.$model->getLibVersion($key).'</td>'; print '<td nowrap="nowrap" align="right">'.$model->getLibVersionForKey($key).'</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -34,4 +34,4 @@ insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (5,'60DENDMONTH', 5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (5,'60DENDMONTH', 5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PT_ORDER', 6,1, 'A réception de commande','A réception de commande',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PT_ORDER', 6,1, 'A réception de commande','A réception de commande',0,0);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (7,'PT_DELIVERY', 7,1, 'Livraison','Règlement à la livraison',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (7,'PT_DELIVERY', 7,1, 'Livraison','Règlement à la livraison',0,0);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (8,'PT_5050', 8,1, '50 et 50','Règlement 50% à la commande, 50% à la livraison',1,60); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (8,'PT_5050', 8,1, '50 et 50','Règlement 50% à la commande, 50% à la livraison',0,0);

View File

@ -202,9 +202,9 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (20
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (204,20, '0','0','VAT Rate 0', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (204,20, '0','0','VAT Rate 0', 1);
-- SWITZERLAND (id country=6) -- SWITZERLAND (id country=6)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 61, 6, '7.6','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 61, 6, '8','0','VAT standard rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 62, 6, '3.6','0','VAT reduced rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 62, 6, '3.8','0','VAT reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 63, 6, '2.4','0','VAT super-reduced rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 63, 6, '2.5','0','VAT super-reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 64, 6, '0','0','VAT Rate 0', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 64, 6, '0','0','VAT Rate 0', 1);
-- TUNISIA (id country=10) -- TUNISIA (id country=10)

View File

@ -253,15 +253,16 @@ UPDATE llx_c_actioncomm set type = 'systemauto' where code IN ('AC_PROP','AC_COM
-- update type of localtax1 for spain -- update type of localtax1 for spain
UPDATE llx_c_tva SET localtax1_type = '3' WHERE rowid = 41 AND fk_pays = 4 AND (localtax1_type = '0' OR localtax1_type='1'); UPDATE llx_c_tva SET taux='21', localtax1 = '5.2', localtax1_type = '3' WHERE rowid = 41 AND fk_pays = 4 AND (localtax1_type = '0' OR localtax1_type='1' OR localtax1_type='3');
UPDATE llx_c_tva SET localtax1_type = '3' WHERE rowid = 42 AND fk_pays = 4 AND (localtax1_type = '0' OR localtax1_type='1'); UPDATE llx_c_tva SET taux='10', localtax1 = '1.4', localtax1_type = '3' WHERE rowid = 42 AND fk_pays = 4 AND (localtax1_type = '0' OR localtax1_type='1' OR localtax1_type='3');
UPDATE llx_c_tva SET localtax1_type = '3' WHERE rowid = 43 AND fk_pays = 4 AND (localtax1_type = '0' OR localtax1_type='1'); UPDATE llx_c_tva SET taux='4', localtax1 = '0.5', localtax1_type = '3' WHERE rowid = 43 AND fk_pays = 4 AND (localtax1_type = '0' OR localtax1_type='1' OR localtax1_type='3');
-- update type of localtax2 for spain -- update type of localtax2 for spain
UPDATE llx_c_tva SET localtax2_type = '1' WHERE rowid = 41 AND fk_pays = 4 AND localtax2_type = '0'; UPDATE llx_c_tva SET localtax2 = '-15', localtax2_type = '1' WHERE rowid = 41 AND fk_pays = 4 AND (localtax2_type = '0' OR localtax2_type = '1');
UPDATE llx_c_tva SET localtax2_type = '1' WHERE rowid = 42 AND fk_pays = 4 AND localtax2_type = '0'; UPDATE llx_c_tva SET localtax2 = '-15', localtax2_type = '1' WHERE rowid = 42 AND fk_pays = 4 AND (localtax2_type = '0' OR localtax2_type = '1');
UPDATE llx_c_tva SET localtax2_type = '1' WHERE rowid = 43 AND fk_pays = 4 AND localtax2_type = '0'; UPDATE llx_c_tva SET localtax2 = '-15', localtax2_type = '1' WHERE rowid = 43 AND fk_pays = 4 AND (localtax2_type = '0' OR localtax2_type = '1');
-- update type of localtax for tunisia
UPDATE llx_c_tva set localtax1 = 1, localtax1_type = '4', localtax2 = 0.4, localtax2_type = '7' where rowid= 101 and fk_pays= 10 AND localtax1_type='0'; UPDATE llx_c_tva set localtax1 = 1, localtax1_type = '4', localtax2 = 0.4, localtax2_type = '7' where rowid= 101 and fk_pays= 10 AND localtax1_type='0';
UPDATE llx_c_tva set localtax1 = 1, localtax1_type = '4', localtax2 = 0.4, localtax2_type = '7' where rowid= 102 and fk_pays= 10 AND localtax1_type='0'; UPDATE llx_c_tva set localtax1 = 1, localtax1_type = '4', localtax2 = 0.4, localtax2_type = '7' where rowid= 102 and fk_pays= 10 AND localtax1_type='0';
UPDATE llx_c_tva set localtax1 = 1, localtax1_type = '4', localtax2 = 0.4, localtax2_type = '7' where rowid= 103 and fk_pays= 10 AND localtax1_type='0'; UPDATE llx_c_tva set localtax1 = 1, localtax1_type = '4', localtax2 = 0.4, localtax2_type = '7' where rowid= 103 and fk_pays= 10 AND localtax1_type='0';

View File

@ -124,3 +124,8 @@ BankCode=Bank code
DeskCode=Desk code DeskCode=Desk code
BankAccountNumber=Account number BankAccountNumber=Account number
BankAccountNumberKey=Key BankAccountNumberKey=Key
## filters
SelectFilterFields=If you want to filter on some values, just input values here.
FilterableFields=Champs Filtrables
FilteredFields=Filtered fields
FilteredFieldsValues=Value for filter

View File

@ -98,8 +98,8 @@ UpdateConfCPOK=Updated successfully.
ErrorUpdateConfCP=An error occurred during the update, please try again. ErrorUpdateConfCP=An error occurred during the update, please try again.
AddCPforUsers=Please add the balance of holidays of users by <a href="../define_holiday.php" style="font-weight: normal; color: red; text-decoration: underline;">clicking here</a>. AddCPforUsers=Please add the balance of holidays of users by <a href="../define_holiday.php" style="font-weight: normal; color: red; text-decoration: underline;">clicking here</a>.
DelayForSubmitCP=Deadline to apply for holidays DelayForSubmitCP=Deadline to apply for holidays
AlertValidatorDelayCP=Prevent the validator if the request for leave to meet the deadline AlertValidatorDelayCP=Prevent the validator if the holiday request does not match the deadline
AlertValidorSoldeCP=Prevent the validator if the user requests holidays exceeding the balance AlertValidorSoldeCP=Prevent the validator if the holiday request exceed the balance
nbUserCP=Number of users supported in the module holidays nbUserCP=Number of users supported in the module holidays
nbHolidayDeductedCP=Number of holidays to be deducted per day of holiday taken nbHolidayDeductedCP=Number of holidays to be deducted per day of holiday taken
nbHolidayEveryMonthCP=Number of holidays added every month nbHolidayEveryMonthCP=Number of holidays added every month

View File

@ -50,7 +50,7 @@ PredefinedMailTest=This is a test mail.\nThe two lines are separated by a carria
PredefinedMailTestHtml=This is a <b>test</b> mail (the word test must be in bold).<br>The two lines are separated by a carriage return.<br><br>__SIGNATURE__ PredefinedMailTestHtml=This is a <b>test</b> mail (the word test must be in bold).<br>The two lines are separated by a carriage return.<br><br>__SIGNATURE__
PredefinedMailContentSendInvoice=You will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ PredefinedMailContentSendInvoice=You will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendInvoiceReminder=We would like to warn you that the invoice __FACREF__ seems to not being payed. So this is the invoice in attachment again, as a reminder.\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ PredefinedMailContentSendInvoiceReminder=We would like to warn you that the invoice __FACREF__ seems to not being payed. So this is the invoice in attachment again, as a reminder.\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendProposal=You will find here the commercial propoal __PROPREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ PredefinedMailContentSendProposal=You will find here the commercial proposal __PROPREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendOrder=You will find here the order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ PredefinedMailContentSendOrder=You will find here the order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendSupplierOrder=You will find here our order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ PredefinedMailContentSendSupplierOrder=You will find here our order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendSupplierInvoice=You will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__ PredefinedMailContentSendSupplierInvoice=You will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__

View File

@ -125,6 +125,7 @@ DeskCode=Code guichet
BankAccountNumber=Numéro compte BankAccountNumber=Numéro compte
BankAccountNumberKey=Clé RIB BankAccountNumberKey=Clé RIB
## filters ## filters
SelectFilterFields=Si vous voulez filtrer sur certaines valeures, saisissez ces valeurs.
FilterableFields=Champs Filtrables FilterableFields=Champs Filtrables
FilteredFields=Champs Filtrés FilteredFields=Champs Filtrés
FilteredFieldsValues=Valeurs de filtrages FilteredFieldsValues=Valeurs de filtrages

File diff suppressed because it is too large Load Diff

View File

@ -93,7 +93,7 @@ ErrorInvoiceAvoirMustBeNegative=Fout, correctiefactuur moet een negatief bedrag
ErrorInvoiceOfThisTypeMustBePositive=Fout, dit type factuur moet een positief bedrag hebben ErrorInvoiceOfThisTypeMustBePositive=Fout, dit type factuur moet een positief bedrag hebben
ErrorCantCancelIfReplacementInvoiceNotValidated=Fout, kan geen factuur annuleren die is vervangen door een andere factuur die nog in klad status is ErrorCantCancelIfReplacementInvoiceNotValidated=Fout, kan geen factuur annuleren die is vervangen door een andere factuur die nog in klad status is
BillFrom=Van BillFrom=Van
BillTo=Factureren aan BillTo=Aan
ActionsOnBill=Acties op factuur ActionsOnBill=Acties op factuur
NewBill=Nieuwe factuur NewBill=Nieuwe factuur
Prélèvements=Domiciliëring Prélèvements=Domiciliëring
@ -279,3 +279,37 @@ PDFOursinDescription=Factuurmodel oursin
# tourteau PDF Model # tourteau PDF Model
PDFTourteauDescription=Factuurmodel Tourteau PDFTourteauDescription=Factuurmodel Tourteau
# NumRef Modules
# deneb
DenebNumRefModelDesc1=Geeft het nummer in de vorm, PREF-31-12-2004-01, waar pref het voorvoegsel is , gevolgd door de datum (31 december 2004) en een teller.
DenebNumRefModelDesc2=Indien de constante FACTURE_DENEB_DELTA is gedefiniëerd, een compensatie wordt toegepast op de meter
# mars
MarsNumRefModelDesc1=Numéro de facture sous la forme, PREF-10-2004-005, qui correspond à la 5ème facture d'octobre 2004 et où PREF est le préfix de la société.
MarsNumRefModelDesc2=Le nombre final est formaté sur 3 chiffres ou plus.
MarsNumRefModelDesc3=Si la constante FACTURE_MARS_DELTA est définie, un offset est appliqué sur le compteur
# neptune
NeptuneNumRefModelDesc1=Renvoie le numéro de facture sous une forme du préfix FA suivi de l'année sur 2 chiffres et d'un compteur simple sur 4 chiffres.
NeptuneNumRefModelDesc2=Si la constante FACTURE_NEPTUNE_DELTA est définie, un offset est appliqué sur le compteur
# orion
OrionNumRefModelDesc1=Return the number under the format FAYYNNNNN where YY is the year and NNNNN the increment number starting at 1.
OrionNumRefModelDesc2=The year is increased by 1 WITHOUT an initialisation to zero at the start of the fiscal year.
OrionNumRefModelDesc3=Define the variable SOCIETE_FISCAL_MONTH_START with the month at the start of the fiscal year, example: 9 for September.
OrionNumRefModelDesc4=In this example, we shall have on the 1st of September 2006 an invoice named FA700354.
# terre
TerreNumRefModelDesc1=Renvoie le numéro sous la forme %syymm-nnnn où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0
TerreNumRefModelError=Une facture commençant par $fayymm existe en base et est incompatible avec cette numérotation. Supprimer la ou renommer la pour activer ce module.
# titan
TitanNumRefModelDesc1=Return the number with format FAYYNNNNN where YY is the year and NNNNN is the increment number starting from 1.
TitanNumRefModelDesc2=The year is incremented by 1 and the increment number is initialized to zero at the start of the fiscal year.
TitanNumRefModelDesc3=Define the variable SOCIETE_FISCAL_MONTH_START with the month at the start of the fiscal year, example: 9 for September.
TitanNumRefModelDesc4=In this example, we shall have on the 1st September 2006 an invoice named FA0700001

View File

@ -1,22 +1,5 @@
# Dolibarr language file - nl_BE - marque pages # Dolibarr language file - nl_BE - marque pages
CHARSET=UTF-8 CHARSET=UTF-8
AddThisPageToBookmarks=Voeg deze pagina toe aan bladwijzers Bookm=Bladwijzers
Bookmark=Bladwijzer
Bookmarks=Bladwijzers
NewBookmark=Nieuwe bladwijzer NewBookmark=Nieuwe bladwijzer
ShowBookmark=Toon bladwijzer AddThisPageToBookmarks=Voeg deze pagina toe aan bladwijzers
BookmarkThisPage=Maak bladwijzer van deze pagina
OpenANewWindow=Open een nieuw venster
ReplaceWindow=Vervang huidig venster
BookmarkTargetNewWindowShort=Nieuw venster
BookmarkTargetReplaceWindowShort=Huidig venster
BookmarkTitle=Titel van de bladwijzer
UrlOrLink=URL
BehaviourOnClick=Gedrag bij het klikken op URL
CreateBookmark=Maak bladwijzer
SetHereATitleForLink=Stel hier een titel in voor de bladwijzer
UseAnExternalHttpLinkOrRelativeDolibarrLink=Gebruik een externe URL of een relatieve URL van Dolibarr
ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Selecteer of de bladwijzer moet openen in een nieuw venster of in het huidig venster van de pagina
BookmarksManagement=Bladwijzer beheer
ListOfBookmarks=Lijst van bladwijzers

View File

@ -1,77 +1,85 @@
# Dolibarr language file - nl_BE - commercial # Dolibarr language file - nl_BE - commercial =
CHARSET=UTF-8 CHARSET = UTF-8
Commercial=Commerciëel Commercial = Commerciëel
Customer=Klant CommercialArea = Commerciële ruimte
Customers=Klanten CommercialCard = Commerciële kaart
Prospect=Potentiële klant CustomerArea = Klanten ruimte
Prospects=Potentiële klanten Customer = Klant
CommercialArea=Commerciële ruimte Customers = Klanten
CommercialCard=Commerciële kaart Prospect = Potentiële klant
CustomerArea=Klanten ruimte Prospects = Potentiële klanten
DeleteAction=Verwijder een actie / taak DeleteAction = Verwijder een actie / taak
NewAction=Nieuwe actie / taak NewAction = Nieuwe actie / taak
AddAction=Toevoegen actie / taak AddAction = Toevoegen actie / taak
AddAnAction=Voeg een actie / taak AddAnAction = Voeg een actie / taak
AddActionRendezVous=Maak een afspraak AddActionRendezVous = Maak een afspraak
ConfirmDeleteAction=Weet u zeker dat u deze taak wilt verwijderen? Rendez-Vous = Bijeenkomst
CardAction=Actie kaart ConfirmDeleteAction = Weet u zeker dat u deze taak wilt verwijderen?
PercentDone=Percentage gedaan CardAction = Actie kaart
ActionOnCompany=Taak over bedrijf PercentDone = Percentage gedaan
ActionOnContact=Taak over contact ActionOnCompany = Taak over bedrijf
TaskRDV=Vergaderingen ActionOnContact = Taak over contact
TaskRDVWith=Ontmoeting met %s TaskRDV = Vergaderingen
ShowTask=Toon taak TaskRDVWith = Ontmoeting met %s
ShowAction=Toon actie ShowTask = Toon taak
ActionsReport=Verslag acties ShowAction = Toon actie
SalesRepresentative=Verkoopvertegenwoordiger ActionsReport = Verslag acties
SalesRepresentatives=Verkoopvertegenwoordigers SalesRepresentative = Verkoopvertegenwoordiger
SalesRepresentativeFollowUp=Verkoopvertegenwoordiger (opvolging) SalesRepresentatives = Verkoopvertegenwoordigers
SalesRepresentativeSignature=Verkoopvertegenwoordiger (handtekening) SalesRepresentativeFollowUp = Verkoopvertegenwoordiger (opvolging)
CommercialInterlocutor=Commerciëel gesprekspartner SalesRepresentativeSignature = Verkoopvertegenwoordiger (handtekening)
ErrorWrongCode=Verkeerde code CommercialInterlocutor = Commerciëel gesprekspartner
NoSalesRepresentativeAffected=Geen bijzondere verkoopvertegenwoordiger getroffen ErrorWrongCode = Verkeerde code
ShowCustomer=Toon klant NoSalesRepresentativeAffected = Geen bijzondere verkoopvertegenwoordiger getroffen
ShowProspect=Toon potentiële klant ShowCustomer = Toon klant
ListOfProspects=Lijst van Potentiële klanten ShowProspect = Toon potentiële klant
ListOfCustomers=Lijst van klanten ListOfProspects = Lijst van Potentiële klanten
LastDoneTasks=Laatste %s gedane taken ListOfCustomers = Lijst van klanten
LastRecordedTasks=Laatste taken LastDoneTasks = Laatste %s gedane taken
LastActionsToDo=Laatste %s oudste acties niet voltooid LastRecordedTasks = Laatste taken
DoneAndToDoActionsFor=Gedaan en taken nog te doen voor %s LastActionsToDo = Laatste %s oudste acties niet voltooid
DoneAndToDoActions=Gedaan en doe taken DoneAndToDoActionsFor = Gedaan en taken nog te doen voor %s
DoneActions=Gedane acties DoneAndToDoActions = Gedaan en doe taken
DoneActionsFor=Gedane acties voor %s DoneActions = Gedane acties
ToDoActions=Onvolledige acties DoneActionsFor = Gedane acties voor %s
ToDoActionsFor=Onvolledige acties voor %s ToDoActions = Onvolledige acties
SendPropalRef=Stuur commerciëel voorstel %s ToDoActionsFor = Onvolledige acties voor %s
SendOrderRef=Stuur bestelling %s SendPropalRef = Stuur commerciëel voorstel %s
NoRecordedProspects=Geen potentiële klant geregistreerd SendOrderRef = Stuur bestelling %s
StatusActionToDo=Te doen StatusNotApplicable = Niet beschikbaar
StatusActionDone=Gedaan StatusActionToDo = Te doen
MyActionsAsked=Acties die ik heb geregistreerd StatusActionDone = Gedaan
MyActionsToDo=Acties die ik moet doen MyActionsAsked = Acties die ik heb geregistreerd
MyActionsDone=Acties die ik heb gemaakt MyActionsToDo = Acties die ik moet doen
StatusActionInProcess=Gaande MyActionsDone = Acties die ik heb gemaakt
TasksHistoryForThisContact=Acties voor deze contactpersoon StatusActionInProcess = Gaande
LastProspectDoNotContact=Niet contacteren TasksHistoryForThisContact = Acties voor deze contactpersoon
LastProspectNeverContacted=Nog nooit gecontacteerd LastProspectDoNotContact = Niet contacteren
LastProspectToContact=Contact op te nemen met LastProspectNeverContacted = Nog nooit gecontacteerd
LastProspectContactInProcess=Contact in process LastProspectToContact = Contact op te nemen met
LastProspectContactDone=Gecontacteerd LastProspectContactInProcess = Contact in process
DateActionPlanned=Datum actie gepland voor LastProspectContactDone = Gecontacteerd
DateActionDone=Datum actie gedaan DateActionPlanned = Datum actie gepland voor
ActionAskedBy=Actie gevraagd door DateActionDone = Datum actie gedaan
ActionAffectedTo=Actie getroffen om ActionAskedBy = Actie gevraagd door
ActionDoneBy=Actie gedaan door ActionAffectedTo = Actie getroffen om
ActionUserAsk=Geregistreerd door ActionDoneBy = Actie gedaan door
ErrorStatusCantBeZeroIfStarted=Als veld '<b>Datum gedaan</b>' is ingevuld, de actie is gestart (of beëindigd), dus veld '<b>Status</b>' kan niet 0%% zijn. If field '<b>Date done</b>' is filled, action is started (or finished), so field '<b>Status</b>' can't be 0%%. ActionUserAsk = Geregistreerd door
ActionAC_TEL=Telefoongesprek ErrorStatusCantBeZeroIfStarted = Als veld '<b>Datum gedaan</b>' is ingevuld, de actie is gestart (of beëindigd), dus veld '<b>Status</b>' kan niet 0%% zijn. If field '<b>Date done</b>' is filled, action is started (or finished), so field '<b>Status</b>' can't be 0%%.
ActionAC_FAX=Verzend per fax ActionAC_TEL = Telefoongesprek
ActionAC_PROP=Verzend voorstel ActionAC_FAX = Verzend per fax
ActionAC_EMAIL=E-mail verzenden ActionAC_PROP = Verzend voorstel
ActionAC_RDV=Vergaderingen ActionAC_EMAIL = E-mail verzenden
ActionAC_FAC=Stuur factuur ActionAC_RDV = Vergaderingen
ActionAC_REL=Stuur factuur (herinnering) ActionAC_FAC = Stuur factuur
ActionAC_CLO=Sluiten ActionAC_REL = Stuur factuur (herinnering)
ActionAC_EMAILING=Stuur massa e-mail ActionAC_CLO = Sluiten
ActionAC_COM=Verzend bestelling per mail ActionAC_EMAILING = Stuur massa e-mail
ActionAC_COM = Verzend bestelling per mail
ActionAC_SHIP = Verstuur bestelling per post
ActionAC_SUP_ORD = Stuur leveranciersbestelling
ActionAC_SUP_INV = Stuur leveranciersfactuur
ActionAC_OTH = Ander
StatusProsp = Status van het prospect
DraftPropals = Klad commerciële voorstellen
SearchPropal = Zoek een commercieel voorstel

View File

@ -1,260 +1,394 @@
# Dolibarr language file - nl_BE - companies # Dolibarr language file - nl_BE - companies =
CHARSET=UTF-8 CHARSET = UTF-8
ErrorCompanyNameAlreadyExists=Bedrijfsnaam %s bestaat reeds. Kies een andere naam. ErrorCompanyNameAlreadyExists = Bedrijfsnaam %s bestaat reeds. Kies een andere naam.
ErrorPrefixAlreadyExists=Prefix %s bestaat reeds. Kies een ander prefix. ErrorPrefixAlreadyExists = Prefix %s bestaat reeds. Kies een ander prefix.
ErrorSetACountryFirst=Kies het land eerst ErrorSetACountryFirst = Kies het land eerst
ConfirmDeleteCompany=Bent u zeker dat u dit bedrijf en alle bijhorende informatie wil verwijderen? SelectThirdParty = Selecteer derde partij
MenuNewThirdParty=Nieuwe derde partij DeleteThirdParty = Verwijder een derde partij
MenuNewCompany=Nieuw bedrijf ConfirmDeleteCompany = Bent u zeker dat u dit bedrijf en alle bijhorende informatie wil verwijderen?
MenuNewCustomer=Nieuwe klant DeleteContact = Verwijder een contactpersoon
MenuNewProspect=Nieuwe potentiële klant ConfirmDeleteContact = Weet u zeker dat u deze contactpersoon met alle gegevens wil verwijderen?
MenuNewSupplier=Nieuwe leverancier MenuNewThirdParty = Nieuwe derde partij
MenuSocGroup=Groepen MenuNewCompany = Nieuw bedrijf
NewCompany=Nieuwe derde partij (potentiële klant, klant, leverancier,...) MenuNewCustomer = Nieuwe klant
NewThirdParty=Nieuwe derde partij (potentiële klant, klant, leverancier,...) MenuNewProspect = Nieuwe potentiële klant
NewSocGroup=Nieuw bedrijvengroep MenuNewSupplier = Nieuwe leverancier
ProspectionArea=Potentiëel gebied MenuNewPrivateIndividual = Nieuwe particulier
SocGroup=Groep van bedrijven MenuSocGroup = Groepen
IdCompany=Bedrijfs-id NewCompany = Nieuwe derde partij (potentiële klant, klant, leverancier,...)
IdContact=Contact-id NewThirdParty = Nieuwe derde partij (potentiële klant, klant, leverancier,...)
Contacts=Contacten NewSocGroup = Nieuw bedrijvengroep
Company=Bedrijf NewPrivateIndividual = Nieuwe particulier (potentiële klant, klant, leverancier)
CompanyName=Bedrijfsnaam ProspectionArea = Potentiëel gebied
Companies=Bedrijven SocGroup = Groep van bedrijven
ThirdParty=Derde partij IdThirdParty = Id derde partij
ThirdParties=Derde partijen IdCompany = Bedrijfs-id
ThirdPartyAll=Derde partijen (allemaal) IdContact = Contact-id
ThirdPartyProspects=Potentiële klant Contacts = Contacten
ThirdPartyCustomers=Klanten ThirdPartyContacts = Contactpersonen
ThirdPartyCustomersWithIdProf12=Klanten met %s of %s ThirdPartyContact = Contactpersoon
ThirdPartySuppliers=Leveranciers StatusContactValidated = Status van contactpersoon
ParentCompany=Moederbedrijf Company = Bedrijf
CivilityCode=Civility code CompanyName = Bedrijfsnaam
RegisteredOffice=Geregistreerd kantoor Companies = Bedrijven
Name=Naam CountryIsInEEC = Land binnen de Europese Economische Gemeenschap
Lastname=Familienaam ThirdPartyName = Naam
Firstname=Voornaam ThirdParty = Derde partij
PostOrFunction=Functie ThirdParties = Derde partijen
UserTitle=Titel ThirdPartyAll = Derde partijen (allemaal)
Surname=Familienaam/Pseudoniem ThirdPartyProspects = Potentiële klant
Address=Adres ThirdPartyCustomers = Klanten
State=Provincie ThirdPartyCustomersWithIdProf12 = Klanten met %s of %s
Region=Gebied ThirdPartySuppliers = Leveranciers
Country=Land ThirdPartyType = Derde partij soort
CountryCode=Landcode Company/Fundation = Organisatie
Phone=Tel.nr. Individual = Particulier
PhonePro=Prof. tel.nr. ToCreateContactWithSameName = Maakt automatisch een fysiek contact aan met dezelfde informatie
PhonePerso=Pers. tel.nr. ParentCompany = Moederbedrijf
PhoneMobile=Mobiel nr. Subsidiary = Dochteronderneming
Fax=Fax Subsidiaries = Dochterondernemingen
Zip=Postcode NoSubsidiary = Geen dochteronderneming
Town=Stad / Gemeente ReportByCustomers = Verslag door klanten
Web=Website ReportByQuarter = Verslag per kwartaal
VATIsUsed=Aan BTW onderworpen CivilityCode = Civility code
VATIsNotUsed=Niet onderworpen aan BTW RegisteredOffice = Geregistreerd kantoor
ThirdPartyEMail=%s Name = Naam
##### Professionnal ID ##### Lastname = Familienaam
ProfId1=Professioneel ID 1 Firstname = Voornaam
ProfId2=Professioneel ID 2 PostOrFunction = Functie
ProfId3=Professioneel ID 3 UserTitle = Titel
ProfId4=Professioneel ID 4 Surname = Familienaam/Pseudoniem
ProfId1AU=ABN Address = Adres
ProfId2AU=- State = Provincie
ProfId3AU=- Region = Gebied
ProfId4AU=- Country = Land
ProfId1BE=Professioneel nummer CountryCode = Landcode
ProfId2BE=- CountryId = Land ID
ProfId3BE=- Phone = Tel.nr.
ProfId4BE=- PhonePro = Prof. tel.nr.
ProfId1FR=SIREN PhonePerso = Pers. tel.nr.
ProfId2FR=SIRET PhoneMobile = Mobiel nr.
ProfId3FR=NAF (Old APE) Fax = Fax
ProfId4FR=RCS/RM Zip = Postcode
ProfId1GB=Registratienummer Town = Stad / Gemeente
ProfId2GB=- Web = Website
ProfId3GB=SIC Poste =
ProfId4GB=- DefaultLang = Standaard taal
ProfId1PT=NIPC VATIsUsed = Aan BTW onderworpen
ProfId2PT=Nummer sociale zekerheid VATIsNotUsed = Niet onderworpen aan BTW
ProfId3PT=Nummer Commercial Record ##### Local Taxes ##### =
ProfId4PT=Conservatory LocalTax1IsUsedES =
VATIntra=BTW nummer LocalTax1IsNotUsedES =
VATIntraShort=BTW nummer LocalTax2IsUsedES =
VATIntraVeryShort=BTW LocalTax2IsNotUsedES =
VATIntraSyntaxIsValid=Syntax is geldig ThirdPartyEMail = %s
VATIntraValueIsValid=Waarde is geldig WrongCustomerCode = Klantencode ongeldig
ProspectCustomer=Potentiële klant / Klant WrongSupplierCode = Leverancierscode ongeldig
Prospect=Potentiële klant CustomerCodeModel = Klantencode model
CustomerCard=Klantenkaart SupplierCodeModel = Leverancierscode model
Customer=Klant Gencod = Streepjescode
CustomerDiscount=Klantenkorting ##### Professional ID ##### =
CustomerRelativeDiscount=Relatieve klantenkorting ProfId1Short = Prof id 1
CustomerAbsoluteDiscount=Absolute klantenkorting ProfId2Short = Prof id 2
CustomerRelativeDiscountShort=Relatieve korting ProfId3Short = Prof id 3
CustomerAbsoluteDiscountShort=Absolute korting ProfId4Short = Prof id 4
CompanyHasRelativeDiscount=Deze klant heeft een korting van <b>%s%%</b> ProfId5Short =
CompanyHasNoRelativeDiscount=Deze klant heeft geen standaard relatieve korting ProfId6Short =
CompanyHasAbsoluteDiscount=Deze klant heeft nog een absolute korting van <b>%s %s</b> ProfId1 = Professioneel ID 1
CompanyHasNoAbsoluteDiscount=Deze klant heeft geen absolute korting ProfId2 = Professioneel ID 2
CustomerAbsoluteDiscountAllUsers=Absolute korting (toegekend door alle gebruikers) ProfId3 = Professioneel ID 3
CustomerAbsoluteDiscountMy=Absolute korting (door uzelf toegekend) ProfId4 = Professioneel ID 4
DefaultDiscount=Standaard korting ProfId5 = Professioneel ID 5
AvailableGlobalDiscounts=Beschikbare absolute kortingen ProfId6 = Professioneel ID 6
DiscountNone=Geen ProfId1AR =
Supplier=Leverancier ProfId2AR =
CompanyList=Bedrijvenlijst ProfId3AR =
AddContact=Voeg contact toe ProfId4AR =
Contact=Contact ProfId5AR =
DefaultContact=Standaard contact ProfId6AR =
AddCompany=Voeg bedrijf toe ProfId1AU = ABN
AddThirdParty=Voeg derde partij toe ProfId2AU = -
DeleteACompany=Verwijder een bedrijf ProfId3AU = -
PersonalInformations=Persoonlijke gegevens ProfId4AU = -
AccountancyCode=Boekhoudkundige code ProfId5AU =
CustomerCode=Klantencode ProfId6AU =
SupplierCode=Leverancierscode ProfId1BE = Professioneel nummer
CustomerAccount=Klanten account ProfId2BE = -
SupplierAccount=Leveranciers account ProfId3BE = RPR
LastProspect=Laatste ProfId4BE = -
ProspectToContact=Potentiële klant naar contact ProfId5BE =
CompanyDeleted=Bedrijf "%s" verwijderd uit de databank. ProfId6BE =
ListOfContacts=Lijst van contacten ProfId1BR =
ListOfProspectsContacts=Lijst van potentiële klanten contacten ProfId2BR =
ListOfCustomersContacts=Lijst van klanten contacten ProfId3BR =
ListOfSuppliersContacts=Lijst van leveranciers contacten ProfId4BR =
ListOfCompanies=Lijst van bedrijven #ProfId5BR=CNAE =
ListOfThirdParties=Lijst van derde partijen #ProfId6BR=INSS =
ShowCompany=Toon bedrijf ProfId1CH = -
ShowContact=Toon contact ProfId2CH = -
ContactsAllShort=Allemaal (geen filter) ProfId3CH = Prof. id 1 (Federale nummer)
ContactType=Contact type ProfId4CH = Prof. id 2 (Commerciële Record aantal)
ContactForOrders=Contact voor bestellingen ProfId5CH =
ContactForProposals=Contact voor voorstellen ProfId6CH =
ContactForContracts=Contact voor contracten ProfId1CL =
ContactForInvoices=Contact voor facturen ProfId2CL =
NoContactForAnyOrder=Dit contact is geen contact voor een order ProfId3CL =
NoContactForAnyProposal=Dit contact is geen contact voor een commerciëel voorstel ProfId4CL =
NoContactForAnyContract=Dit contact is geen contact voor een contract ProfId5CL =
NoContactForAnyInvoice=Dit contact is geen contact voor een factuur ProfId6CL =
NewContact=Nieuw contact ProfId1CO =
LastContacts=Laatste contacten ProfId2CO =
MyContacts=Mijn contacten ProfId3CO =
Phones=Tel.nrs. ProfId4CO =
Capital=Hoofdstad ProfId5CO =
CapitalOf=Hoofdstad van %s ProfId6CO =
EditCompany=Aanpassen bedrijf ProfId1DE =
ThisUserIsNot=Deze gebruiker is geen potentiële klant, klant of leverancier ProfId2DE =
VATIntraCheck=Controleer ProfId3DE =
VATIntraCheckDesc=De verbinding <b>%s</b> laat toe de europeese BTW testservice te bevragen. Een toegang tot het internet vanaf de server is vereist om deze dienst te laten werken. ProfId4DE =
VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do ProfId5DE =
VATIntraCheckableOnEUSite=Check Intracomunnautary VAT on European commision site ProfId6DE =
VATIntraManualCheck=U kan ook zelf de test doen via de europese website <a href="%s" target="_blank">%s</a> ProfId1ES =
ErrorVATCheckMS_UNAVAILABLE=Test niet mogelijk. Testservice wordt niet voorzien door de lidstaat (%s). ProfId2ES =
NorProspectNorCustomer=Geen potentiële klant of klant ProfId3ES =
JuridicalStatus=Juridische status ProfId4ES =
Staff=Personeel ProfId5ES =
TE_STARTUP=Starter ProfId6ES =
TE_GROUP=Groot bedrijf ProfId1FR = SIREN
TE_MEDIUM=Middelgroot bedrijf ProfId2FR = SIRET
TE_ADMIN=Overheidsinstelling ProfId3FR = NAF (Old APE)
TE_SMALL=Klein bedrijf ProfId4FR = RCS/RM
TE_RETAIL=Detailhandelaar ProfId5FR =
TE_WHOLE=Groothandelaar ProfId6FR =
TE_PRIVATE=Privé persoon ProfId1GB = Registratienummer
TE_OTHER=Ander ProfId2GB = -
StatusProspect-1=Niet contacteren ProfId3GB = SIC
StatusProspect0=Nooit gecontacteerd ProfId4GB = -
StatusProspect1=Te contacteren ProfId5GB =
StatusProspect2=Contact gaande ProfId6GB =
StatusProspect3=Contact afgelopen ProfId1HN =
ChangeDoNotContact=Verander toestand naar 'Niet contacteren' ProfId2HN =
ChangeNeverContacted=Verander toestand naar 'Nooit gecontacteerd' ProfId3HN =
ChangeToContact=Verander toestand naar 'Te contacteren' ProfId4HN =
ChangeContactInProcess=Verander toestand naar 'Contact gaande' ProfId5HN =
ChangeContactDone=Verander toestand naar 'Contact afgelopen' ProfId6HN =
ProspectsByStatus=Potentiële klanten volgens status ProfId1IN =
BillingContact=Facturatie contact ProfId2IN =
NbOfAttachedFiles=Lijst van toegevoegde bestanden ProfId3IN =
AttachANewFile=Voeg een nieuw bestand toe ProfId4IN =
FileWasRemoved=Bestand is verwijderd. ProfId5IN =
NoRIB=Geen RIB definieerd ProfId6IN =
NoParentCompany=Geen ProfId1MA =
ExportImport=Import-Export ProfId2MA =
ExportCardToFormat=Exporteer kaart naar formaat ProfId3MA =
ContactNotLinkedToCompany=Contact niet verbonden met een derde partij ProfId4MA =
DolibarrLogin=Dolibarr login ProfId5MA =
NoDolibarrAccess=Geen Dolibarr toegang ProfId6MA =
ExportDataset_company_1=Bedrijven/verenigingen en eigenschappen ProfId1MX =
ExportDataset_company_2=Contacten en eigenschappen ProfId2MX =
DeliveriesAddress=Leveringsadressen ProfId3MX =
DeliveryAddress=leveringsadres ProfId4MX =
DeliveryAddressLabel=leveringsadres label ProfId5MX =
DeleteDeliveryAddress=Verwijder een leveringsadres ProfId6MX =
ConfirmDeleteDeliveryAddress=Bent u zeker dat u dit leveringsadres wil verwijderen? ProfId1NL =
NewDeliveryAddress=Nieuw leveringsadres ProfId2NL =
AddDeliveryAddress=Voeg adres toe ProfId3NL =
AddAddress=Voeg adres toe ProfId4NL =
NoOtherDeliveryAddress=Geen alternatieve leveringsadres gedefiniëerd ProfId5NL =
JuridicalStatus200=Zelfstandige ProfId6NL =
DeleteThirdParty=Verwijder een derde partij ProfId1PT = NIPC
DeleteContact=Verwijder een contactpersoon ProfId2PT = Nummer sociale zekerheid
ConfirmDeleteContact=Weet u zeker dat u deze contactpersoon met alle gegevens wil verwijderen? ProfId3PT = Nummer Commercial Record
MenuNewPrivateIndividual=Nieuwe particulier ProfId4PT = Conservatory
NewPrivateIndividual=Nieuwe particulier (potentiële klant, klant, leverancier) ProfId5PT =
IdThirdParty=Id derde partij ProfId6PT =
CountryIsInEEC=Land binnen de Europese Economische Gemeenschap ProfId1SN =
ThirdPartyType=Derde partij soort ProfId2SN =
Individual=Particulier ProfId3SN =
ToCreateContactWithSameName=Maakt automatisch een fysiek contact aan met dezelfde informatie ProfId4SN =
ReportByCustomers=Verslag door klanten ProfId5SN =
ReportByQuarter=Verslag per kwartaal ProfId6SN =
WrongCustomerCode=Klantencode ongeldig ProfId1TN = Prof. id 1 (RC)
WrongSupplierCode=Leverancierscode ongeldig ProfId2TN = Prof. id 2 (Fiscale matricule)
CustomerCodeModel=Klantencode model ProfId3TN = Prof. Id 3 (Douane-code)
SupplierCodeModel=Leverancierscode model ProfId4TN = Prof. id 4 (BAN)
Gencod=Streepjescode ProfId5TN =
ProfId1Short=Prof id 1 ProfId6TN =
ProfId2Short=Prof id 2 ProfId1RU =
ProfId3Short=Prof id 3 ProfId2RU =
ProfId4Short=Prof id 4 ProfId3RU =
ProfId1CH=- ProfId4RU =
ProfId2CH=- ProfId5RU =
ProfId3CH=Prof. id 1 (Federale nummer) ProfId6RU =
ProfId4CH=Prof. id 2 (Commerciële Record aantal) VATIntra = BTW nummer
ProfId1TN=Prof. id 1 (RC) VATIntraShort = BTW nummer
ProfId2TN=Prof. id 2 (Fiscale matricule) VATIntraVeryShort = BTW
ProfId3TN=Prof. Id 3 (Douane-code) VATIntraSyntaxIsValid = Syntax is geldig
ProfId4TN=Prof. id 4 (BAN) VATIntraValueIsValid = Waarde is geldig
CompanyHasCreditNote=Deze klant heeft nog creditnota's voor <b>%s %s</b> ProspectCustomer = Potentiële klant / Klant
NoContactDefined=Geen contact gedefiniëerd voor deze derde partij Prospect = Potentiële klant
CustomerCodeDesc=Klantencode, uniek voor alle klanten CustomerCard = Klantenkaart
SupplierCodeDesc=Leverancierscode, uniek voor alle leveranciers Customer = Klant
RequiredIfCustomer=Vereist als derde partij een klant of potentiële klant is CustomerDiscount = Klantenkorting
RequiredIfSupplier=Vereist als derde partij een leverancier is CustomerRelativeDiscount = Relatieve klantenkorting
ValidityControledByModule=Geldigheid gecontroleerd door module CustomerAbsoluteDiscount = Absolute klantenkorting
ThisIsModuleRules=Dit zijn de regels voor deze module CustomerRelativeDiscountShort = Relatieve korting
EditDeliveryAddress=Bewerk leveringsadres CustomerAbsoluteDiscountShort = Absolute korting
VATIntraManualCheck=U kan dit ook manueel raadplegen via de europese website <a href="%s" target="_blank">%s</a> CompanyHasRelativeDiscount = Deze klant heeft een korting van <b>%s%%</b>
ProspectLevelShort=Potentiëel CompanyHasNoRelativeDiscount = Deze klant heeft geen standaard relatieve korting
ProspectLevel=Prospect potentiële CompanyHasAbsoluteDiscount = Deze klant heeft nog een absolute korting van <b>%s %s</b>
ContactPrivate=Privé CompanyHasCreditNote = Deze klant heeft nog creditnota's voor <b>%s %s</b>
ContactPublic=Gedeelde CompanyHasNoAbsoluteDiscount = Deze klant heeft geen absolute korting
ContactVisibility=Zichtbaarheid CustomerAbsoluteDiscountAllUsers = Absolute korting (toegekend door alle gebruikers)
OthersNotLinkedToThirdParty=Anderen, die niet gebonden zijn aan een derde partij CustomerAbsoluteDiscountMy = Absolute korting (door uzelf toegekend)
ProspectStatus=Prospect status DefaultDiscount = Standaard korting
PL_NONE=Geen AvailableGlobalDiscounts = Beschikbare absolute kortingen
PL_UNKNOWN=Onbekend DiscountNone = Geen
PL_LOW=Laag Supplier = Leverancier
PL_MEDIUM=Medium CompanyList = Bedrijvenlijst
PL_HIGH=Hoog AddContact = Voeg contact toe
TE_UNKNOWN=- AddContactAddress =
DeleteFile=Verwijder bestand EditContact =
ConfirmDeleteFile=Weet u zeker dat u dit bestand wilt verwijderen? EditContactAddress =
AllocateCommercial=Toewijzing van een commerciële Contact = Contact
SelectCountry=Kies een land ContactsAddresses =
SelectCompany=Selecteer een derde partij NoContactDefined = Geen contact gedefiniëerd voor deze derde partij
Organization=Organisatie DefaultContact = Standaard contact
AutomaticallyGenerated=Automatisch gegenereerd AddCompany = Voeg bedrijf toe
FiscalYearInformation=Informatie over het fiscale jaar AddThirdParty = Voeg derde partij toe
FiscalMonthStart=Startmaand van het boekjaar DeleteACompany = Verwijder een bedrijf
TigreNumRefModelDesc1=Terugkeer een aanpasbare klant / leverancier aantal volgens een omschreven masker. PersonalInformations = Persoonlijke gegevens
AccountancyCode = Boekhoudkundige code
CustomerCode = Klantencode
SupplierCode = Leverancierscode
CustomerAccount = Klanten account
SupplierAccount = Leveranciers account
CustomerCodeDesc = Klantencode, uniek voor alle klanten
SupplierCodeDesc = Leverancierscode, uniek voor alle leveranciers
RequiredIfCustomer = Vereist als derde partij een klant of potentiële klant is
RequiredIfSupplier = Vereist als derde partij een leverancier is
ValidityControledByModule = Geldigheid gecontroleerd door module
ThisIsModuleRules = Dit zijn de regels voor deze module
LastProspect = Laatste
ProspectToContact = Potentiële klant naar contact
CompanyDeleted = Bedrijf "%s" verwijderd uit de databank.
ListOfContacts = Lijst van contacten
ListOfContactsAddresses =
ListOfProspectsContacts = Lijst van potentiële klanten contacten
ListOfCustomersContacts = Lijst van klanten contacten
ListOfSuppliersContacts = Lijst van leveranciers contacten
ListOfCompanies = Lijst van bedrijven
ListOfThirdParties = Lijst van derde partijen
ShowCompany = Toon bedrijf
ShowContact = Toon contact
ContactsAllShort = Allemaal (geen filter)
ContactType = Contact type
ContactForOrders = Contact voor bestellingen
ContactForProposals = Contact voor voorstellen
ContactForContracts = Contact voor contracten
ContactForInvoices = Contact voor facturen
NoContactForAnyOrder = Dit contact is geen contact voor een order
NoContactForAnyProposal = Dit contact is geen contact voor een commerciëel voorstel
NoContactForAnyContract = Dit contact is geen contact voor een contract
NoContactForAnyInvoice = Dit contact is geen contact voor een factuur
NewContact = Nieuw contact
NewContactAddress =
LastContacts = Laatste contacten
MyContacts = Mijn contacten
Phones = Tel.nrs.
Capital = Kapitaal
CapitalOf = Kapitaal van %s
EditCompany = Aanpassen bedrijf
EditDeliveryAddress = Bewerk leveringsadres
ThisUserIsNot = Deze gebruiker is geen potentiële klant, klant of leverancier
VATIntraCheck = Controleer
VATIntraCheckDesc = De verbinding <b>%s</b> laat toe de europeese BTW testservice te bevragen. Een toegang tot het internet vanaf de server is vereist om deze dienst te laten werken.
VATIntraCheckURL = http://ec.europa.eu/taxation_customs/vies/vieshome.do
VATIntraCheckableOnEUSite = Check Intracomunnautary VAT on European commision site
VATIntraManualCheck = U kan dit ook manueel raadplegen via de europese website <a href="%s" target="_blank">%s</a>
ErrorVATCheckMS_UNAVAILABLE = Test niet mogelijk. Testservice wordt niet voorzien door de lidstaat (%s).
NorProspectNorCustomer = Geen potentiële klant of klant
JuridicalStatus = Juridische status
Staff = Personeel
ProspectLevelShort = Potentiëel
ProspectLevel = Prospect potentiële
ContactPrivate = Privé
ContactPublic = Gedeelde
ContactVisibility = Zichtbaarheid
OthersNotLinkedToThirdParty = Anderen, die niet gebonden zijn aan een derde partij
ProspectStatus = Prospect status
PL_NONE = Geen
PL_UNKNOWN = Onbekend
PL_LOW = Laag
PL_MEDIUM = Medium
PL_HIGH = Hoog
TE_UNKNOWN = -
TE_STARTUP = Starter
TE_GROUP = Groot bedrijf
TE_MEDIUM = Middelgroot bedrijf
TE_ADMIN = Overheidsinstelling
TE_SMALL = Klein bedrijf
TE_RETAIL = Detailhandelaar
TE_WHOLE = Groothandelaar
TE_PRIVATE = Privé persoon
TE_OTHER = Ander
StatusProspect-1 = Niet contacteren
StatusProspect0 = Nooit gecontacteerd
StatusProspect1 = Te contacteren
StatusProspect2 = Contact gaande
StatusProspect3 = Contact afgelopen
ChangeDoNotContact = Verander toestand naar 'Niet contacteren'
ChangeNeverContacted = Verander toestand naar 'Nooit gecontacteerd'
ChangeToContact = Verander toestand naar 'Te contacteren'
ChangeContactInProcess = Verander toestand naar 'Contact gaande'
ChangeContactDone = Verander toestand naar 'Contact afgelopen'
ProspectsByStatus = Potentiële klanten volgens status
BillingContact = Facturatie contact
NbOfAttachedFiles = Lijst van toegevoegde bestanden
AttachANewFile = Voeg een nieuw bestand toe
NoRIB = Geen RIB definieerd
NoParentCompany = Geen
ExportImport = Import-Export
ExportCardToFormat = Exporteer kaart naar formaat
ContactNotLinkedToCompany = Contact niet verbonden met een derde partij
DolibarrLogin = Dolibarr login
NoDolibarrAccess = Geen Dolibarr toegang
ExportDataset_company_1 = Bedrijven/verenigingen en eigenschappen
ExportDataset_company_2 = Contacten en eigenschappen
ImportDataset_company_1 =
ImportDataset_company_2 =
PriceLevel =
DeliveriesAddress = Leveringsadressen
DeliveryAddress = leveringsadres
DeliveryAddressLabel = leveringsadres label
DeleteDeliveryAddress = Verwijder een leveringsadres
ConfirmDeleteDeliveryAddress = Bent u zeker dat u dit leveringsadres wil verwijderen?
NewDeliveryAddress = Nieuw leveringsadres
AddDeliveryAddress = Voeg adres toe
AddAddress = Voeg adres toe
NoOtherDeliveryAddress = Geen alternatieve leveringsadres gedefiniëerd
SupplierCategory =
JuridicalStatus200 = Zelfstandige
DeleteFile = Verwijder bestand
ConfirmDeleteFile = Weet u zeker dat u dit bestand wilt verwijderen?
AllocateCommercial = Toewijzing van een commerciële
SelectCountry = Kies een land
SelectCompany = Selecteer een derde partij
Organization = Organisatie
AutomaticallyGenerated = Automatisch gegenereerd
FiscalYearInformation = Informatie over het fiscale jaar
FiscalMonthStart = Startmaand van het boekjaar
YouMustCreateContactFirst =
ListSuppliersShort =
ListProspectsShort =
ListCustomersShort =
ThirdPartiesArea =
LastModifiedThirdParties =
UniqueThirdParties =
InActivity =
ActivityCeased =
ActivityStateFilter =
# Monkey =
MonkeyNumRefModelDesc =
# Leopard =
LeopardNumRefModelDesc =

View File

@ -43,7 +43,7 @@ ECMDocsByOrders=Documenten in verband met klantenbestellingen
ECMDocsByContracts=Documenten in verband met contracten ECMDocsByContracts=Documenten in verband met contracten
ECMDocsByInvoices=Documenten in verband met klantenfacturen ECMDocsByInvoices=Documenten in verband met klantenfacturen
ECMDocsByProducts=Documenten in verband met producten ECMDocsByProducts=Documenten in verband met producten
ECMNoDirectoryYet=Geen directorie aangemaakt ECMNoDirecotyYet=Geen directorie aangemaakt
ShowECMSection=Toon directorie ShowECMSection=Toon directorie
DeleteSection=Verwijder directorie DeleteSection=Verwijder directorie
ConfirmDeleteSection=Kunt u bevestigen dat u directorie <b>%s</b> wilt verwijderen? ConfirmDeleteSection=Kunt u bevestigen dat u directorie <b>%s</b> wilt verwijderen?

View File

@ -1,4 +1,4 @@
# Dolibarr language file - nl_BE - main # Dolibarr language file - nl_BE - main
CHARSET=UTF-8 CHARSET=UTF-8
SeparatorDecimal=, SeparatorDecimal=,
SeparatorThousand= SeparatorThousand=
@ -53,8 +53,8 @@ Name=Naam
Parameter=Parameter Parameter=Parameter
Parameters=Parameters Parameters=Parameters
Value=Waarde Value=Waarde
Code=de code Code=Code
Type=Het type Type=Type
Language=Taal Language=Taal
Note=Aantekening Note=Aantekening
Label=Het etiket Label=Het etiket
@ -66,7 +66,7 @@ About=Over
Number=Aantal Number=Aantal
DevelopmentTeam=Ontwikkelingsteam DevelopmentTeam=Ontwikkelingsteam
Logout=Uitloggen Logout=Uitloggen
Setup=Opstelling Setup=Configuratie
Alert=Alarm Alert=Alarm
Previous=Vorig Previous=Vorig
Next=Volgend Next=Volgend
@ -375,7 +375,7 @@ File=Bestand
Files=Bestanden Files=Bestanden
NotAllowed=Niet toegestaan NotAllowed=Niet toegestaan
ReadPermissionNotAllowed=Lees toestemming niet toegestaan ReadPermissionNotAllowed=Lees toestemming niet toegestaan
AmountInCurrency=Bedrag in %s valuta AmountInCurrency=Bedrag in %s
Example=Voorbeeld Example=Voorbeeld
NoExample=Geen voorbeeld NoExample=Geen voorbeeld
FindBug=Rapporteer een bug FindBug=Rapporteer een bug

View File

@ -1,4 +1,4 @@
# Dolibarr language file - nl_NL - orders # Dolibarr language file - nl_BE - orders
CHARSET=UTF-8 CHARSET=UTF-8
OrdersArea=Bestellings gebied OrdersArea=Bestellings gebied
OrderCard=Bestellingskaart OrderCard=Bestellingskaart

View File

@ -78,6 +78,24 @@ EMailTextOrderApproved=Bestelling %s goedgekeurd
EMailTextOrderApprovedBy=Bestelling % is goedgekeurd door %s EMailTextOrderApprovedBy=Bestelling % is goedgekeurd door %s
EMailTextOrderRefused=Bestelling %s geweigerd EMailTextOrderRefused=Bestelling %s geweigerd
EMailTextOrderRefusedBy=Bestelling %s geweigerd door %s EMailTextOrderRefusedBy=Bestelling %s geweigerd door %s
Bookmark=Bladwijzer
Bookmarks=Bladwijzers
NewBookmark=Nieuwe bladwijzer
ShowBookmark=Toon bladwijzer
BookmarkThisPage=Maak bladwijzer van deze pagina
OpenANewWindow=Open een nieuw venster
ReplaceWindow=Vervang huidig venster
BookmarkTargetNewWindowShort=Nieuw venster
BookmarkTargetReplaceWindowShort=Huidig venster
BookmarkTitle=Titel van de bladwijzer
UrlOrLink=URL
BehaviourOnClick=Gedrag bij het klikken op URL
CreateBookmark=Maak bladwijzer
SetHereATitleForLink=Stel hier een titel in voor de bladwijzer
UseAnExternalHttpLinkOrRelativeDolibarrLink=Gebruik een externe URL of een relatieve URL van Dolibarr
ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Selecteer of de bladwijzer moet openen in een nieuw venster of in het huidig venster van de pagina
BookmarksManagement=Bladwijzer beheer
ListOfBookmarks=Lijst van bladwijzers
ErrorWebcalLoginNotDefined=The Webcalendar login associated to your Dolibarr login <b>%s</b> is not defined. ErrorWebcalLoginNotDefined=The Webcalendar login associated to your Dolibarr login <b>%s</b> is not defined.
ErrorPhenixLoginNotDefined=The Phenix login associated to your Dolibarr login <b>%s</b> is not defined. ErrorPhenixLoginNotDefined=The Phenix login associated to your Dolibarr login <b>%s</b> is not defined.
AddCalendarEntry=Voeg item toe in kalender %s AddCalendarEntry=Voeg item toe in kalender %s

View File

@ -1,4 +1,4 @@
# Dolibarr language file - nl_BE - trips # Dolibarr language file - nl_BE - trips
CHARSET=UTF-8 CHARSET=UTF-8
Trip=Verplaatsing Trip=Verplaatsing
Trips=Verplaatsingen Trips=Verplaatsingen

View File

@ -1520,7 +1520,8 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
print '<a class="help" target="_blank" title="'.$langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage': 'GoToHelpPage'); print '<a class="help" target="_blank" title="'.$langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage': 'GoToHelpPage');
if ($mode == 'wiki') print ' - '.$langs->trans("PageWiki").' &quot;'.dol_escape_htmltag(strtr($helppage,'_',' ')).'&quot;'; if ($mode == 'wiki') print ' - '.$langs->trans("PageWiki").' &quot;'.dol_escape_htmltag(strtr($helppage,'_',' ')).'&quot;';
print '" href="'; print '" href="';
print sprintf($helpbaseurl,urlencode(html_entity_decode($helppage))); if ($mode == 'wiki') print sprintf($helpbaseurl,urlencode(html_entity_decode($helppage)));
else print sprintf($helpbaseurl,$helppage);
print '">'; print '">';
print img_picto('', 'helpdoc').' '; print img_picto('', 'helpdoc').' ';
print $langs->trans($mode == 'wiki' ? 'OnlineHelp': 'Help'); print $langs->trans($mode == 'wiki' ? 'OnlineHelp': 'Help');
@ -1612,7 +1613,7 @@ function main_area($title='')
/** /**
* Return helpbaseurl, helppage and mode * Return helpbaseurl, helppage and mode
* *
* @param string $helppagename Page name (EN:xxx,ES:eee,FR:fff...) * @param string $helppagename Page name ('EN:xxx,ES:eee,FR:fff...' or 'http://localpage')
* @param Translate $langs Language * @param Translate $langs Language
* @return array Array of help urls * @return array Array of help urls
*/ */

View File

@ -326,7 +326,7 @@ class Product extends CommonObject
$result = $this->_log_price($user); $result = $this->_log_price($user);
if ($result > 0) if ($result > 0)
{ {
if ($this->update($id, $user, true) > 0) if ($this->update($id, $user, true, 'add') > 0)
{ {
// FIXME: not use here // FIXME: not use here
/* /*
@ -404,9 +404,10 @@ class Product extends CommonObject
* @param int $id Id of product * @param int $id Id of product
* @param User $user Object user making update * @param User $user Object user making update
* @param int $notrigger Disable triggers * @param int $notrigger Disable triggers
* @param string $action Current action for hookmanager
* @return int 1 if OK, -1 if ref already exists, -2 if other error * @return int 1 if OK, -1 if ref already exists, -2 if other error
*/ */
function update($id, $user, $notrigger=false) function update($id, $user, $notrigger=false, $action='update')
{ {
global $langs, $conf; global $langs, $conf;
@ -497,11 +498,14 @@ class Product extends CommonObject
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) if (empty($reshook))
{ {
$result=$this->insertExtraFields(); if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if ($result < 0) {
{ $result=$this->insertExtraFields();
$error++; if ($result < 0)
} {
$error++;
}
}
} }
else if ($reshook < 0) $error++; else if ($reshook < 0) $error++;

View File

@ -265,30 +265,37 @@ class Entrepot extends CommonObject
$result = $this->db->query($sql); $result = $this->db->query($sql);
if ($result) if ($result)
{ {
$obj=$this->db->fetch_object($result); if ($this->db->num_rows($result) > 0)
{
$obj=$this->db->fetch_object($result);
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->ref = $obj->rowid; $this->ref = $obj->rowid;
$this->libelle = $obj->label; $this->libelle = $obj->label;
$this->description = $obj->description; $this->description = $obj->description;
$this->statut = $obj->statut; $this->statut = $obj->statut;
$this->lieu = $obj->lieu; $this->lieu = $obj->lieu;
$this->address = $obj->address; $this->address = $obj->address;
$this->cp = $obj->zip; // deprecated $this->cp = $obj->zip; // deprecated
$this->ville = $obj->town; // deprecated $this->ville = $obj->town; // deprecated
$this->pays_id = $obj->country_id; // deprecated $this->pays_id = $obj->country_id; // deprecated
$this->zip = $obj->zip; $this->zip = $obj->zip;
$this->town = $obj->town; $this->town = $obj->town;
$this->country_id = $obj->country_id; $this->country_id = $obj->country_id;
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
$tmp=getCountry($this->country_id,'all'); $tmp=getCountry($this->country_id,'all');
$this->pays=$tmp['label']; // deprecated $this->pays=$tmp['label']; // deprecated
$this->pays_code=$tmp['code']; // deprecated $this->pays_code=$tmp['code']; // deprecated
$this->country=$tmp['label']; $this->country=$tmp['label'];
$this->country_code=$tmp['code']; $this->country_code=$tmp['code'];
return 1; return 1;
}
else
{
return 0;
}
} }
else else
{ {

View File

@ -29,7 +29,7 @@ define("NOLOGIN",1); // This means this output page does not require to be logg
define("NOCSRFCHECK",1); // We accept to go on this page from external web site. define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
global $user, $conf, $langs; global $user, $conf, $langs;

View File

@ -2,4 +2,5 @@ User-agent: *
Allow: /public/agenda/agendaexport.php Allow: /public/agenda/agendaexport.php
Allow: /public/demo/ Allow: /public/demo/
Allow: /index.php Allow: /index.php
#Allow: /$
Disallow: / Disallow: /

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Brice Davoleau <brice.davoleau@gmail.com> * Copyright (C) 2005 Brice Davoleau <brice.davoleau@gmail.com>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> * Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
@ -32,12 +32,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$langs->load("companies"); $langs->load("companies");
$mesg=isset($_GET["mesg"])?'<div class="ok">'.$_GET["mesg"].'</div>':'';
// Security check // Security check
$socid = GETPOST('socid','int'); $socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'societe', $socid); $result = restrictedArea($user, 'societe', $socid, '&societe');
/* /*
@ -145,9 +143,6 @@ if ($socid)
print '</div>'; print '</div>';
dol_htmloutput_mesg($mesg);
/* /*
* Barre d'action * Barre d'action
*/ */

View File

@ -580,11 +580,14 @@ class Societe extends CommonObject
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) if (empty($reshook))
{ {
$result=$this->insertExtraFields(); if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
if ($result < 0) {
{ $result=$this->insertExtraFields();
$error++; if ($result < 0)
} {
$error++;
}
}
} }
else if ($reshook < 0) $error++; else if ($reshook < 0) $error++;
@ -842,6 +845,7 @@ class Societe extends CommonObject
* @param array $filters Array of couple field name/value to filter the companies with the same name * @param array $filters Array of couple field name/value to filter the companies with the same name
* @param boolean $exact Exact string search (true/false) * @param boolean $exact Exact string search (true/false)
* @param boolean $case Case sensitive (true/false) * @param boolean $case Case sensitive (true/false)
* @param boolean $similar Add test if string inside name into database, or name into database inside string. Do not use this: Not compatible with other database.
* @param string $clause Clause for filters * @param string $clause Clause for filters
* @return array Array of thirdparties object * @return array Array of thirdparties object
*/ */
@ -877,7 +881,8 @@ class Societe extends CommonObject
$sql.= "("; $sql.= "(";
if ($similar) if ($similar)
{ {
// For test similitude // For test similitude (string inside name into database, or name into database inside string)
// Do not use this. Not compatible with other database.
$sql.= "(LOCATE('".$this->db->escape($name)."', nom) > 0 OR LOCATE(nom, '".$this->db->escape($name)."') > 0)"; $sql.= "(LOCATE('".$this->db->escape($name)."', nom) > 0 OR LOCATE(nom, '".$this->db->escape($name)."') > 0)";
} }
else else

View File

@ -1262,7 +1262,7 @@ else
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>'; print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
// EMail / Web // EMail / Web
print '<tr><td>'.$langs->trans('EMail').($conf->global->SOCIETE_MAIL_REQUIRED?'*':'').'</td><td><input type="text" name="email" size="32" value="'.$object->email.'"></td>'; print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td><input type="text" name="email" size="32" value="'.$object->email.'"></td>';
print '<td>'.$langs->trans('Web').'</td><td><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>'; print '<td>'.$langs->trans('Web').'</td><td><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
// Prof ids // Prof ids

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Some files were not shown because too many files have changed in this diff Show More