';
+ print img_picto('', 'bank_account', 'pictofixedwidth');
$form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1); // List of bank account available
print '
'; // TODO Use a denormalized field
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1652,27 +1652,27 @@ if ($resql) {
}
// Amount HT
if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
- print '
'.price($obj->multicurrency_total_ht)."
\n";
+ print '
'.price($obj->multicurrency_total_ht)."
\n";
if (!$i) {
$totalarray['nbfield']++;
}
}
// Amount VAT
if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) {
- print '
'.price($obj->multicurrency_total_vat)."
\n";
+ print '
'.price($obj->multicurrency_total_vat)."
\n";
if (!$i) {
$totalarray['nbfield']++;
}
}
// Amount TTC
if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) {
- print '
'.price($obj->multicurrency_total_ttc)."
\n";
+ print '
'.price($obj->multicurrency_total_ttc)."
\n";
if (!$i) {
$totalarray['nbfield']++;
}
}
if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) {
- print '
'; // TODO Use a denormalized field
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1680,9 +1680,9 @@ if ($resql) {
// Pending amount
if (!empty($arrayfields['multicurrency_rtp']['checked'])) {
- print '
'; // TODO Use a denormalized field
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1695,6 +1695,7 @@ if ($resql) {
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
+
// Date creation
if (!empty($arrayfields['f.datec']['checked'])) {
print '
';
diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php
index a876f5753b9..000b5def498 100644
--- a/htdocs/fourn/paiement/list.php
+++ b/htdocs/fourn/paiement/list.php
@@ -34,28 +34,9 @@
*/
require '../../main.inc.php';
-
-// Security check
-if ($user->socid) {
- $socid = $user->socid;
-}
-
-// doesn't work :-(
-// restrictedArea($user, 'fournisseur');
-
-// doesn't work :-(
-// require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
-// $object = new PaiementFourn($db);
-// restrictedArea($user, $object->element);
-
-if (!$user->rights->fournisseur->facture->lire) {
- accessforbidden();
-}
-
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
-
// Load translation files required by the page
$langs->loadLangs(array('companies', 'bills', 'banks', 'compta'));
@@ -120,9 +101,28 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
$hookmanager->initHooks(array('paymentsupplierlist'));
$object = new PaiementFourn($db);
+// Security check
+if ($user->socid) {
+ $socid = $user->socid;
+}
+
+// doesn't work :-(
+// restrictedArea($user, 'fournisseur');
+// doesn't work :-(
+// require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
+// $object = new PaiementFourn($db);
+// restrictedArea($user, $object->element);
+if (empty($conf->fournisseur->enabled)) {
+ accessforbidden();
+}
+if (!$user->rights->fournisseur->facture->lire) {
+ accessforbidden();
+}
+
+
/*
-* Actions
-*/
+ * Actions
+ */
$parameters = array('socid'=>$socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@@ -520,7 +520,7 @@ while ($i < min($num, $limit)) {
// Amount
if (!empty($arrayfields['p.amount']['checked'])) {
- print '
'.price($objp->pamount).'
';
+ print '
'.price($objp->pamount).'
';
if (!$i) {
$totalarray['nbfield']++;
}
diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql
index b054ca383ef..09981e7d339 100644
--- a/htdocs/install/mysql/data/llx_10_c_regions.sql
+++ b/htdocs/install/mysql/data/llx_10_c_regions.sql
@@ -47,6 +47,17 @@
-- 7 United Kingdom (NOT England)
--
+-- CONTENT -------------------------------------------------------------------
+--
+-- Algeria
+-- Argentina
+-- Australia
+-- Austria
+-- Barbados
+-- Belgium
+-- Bolivia
+-- Brazil
+
-- TEMPLATE ----------------------------------------------------------------------------------------
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 0, 0, '0',0,'-');
@@ -73,7 +84,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 4
-- Barbados Regions (id country=46)
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 46, 4601, '', 0, 'Barbados');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 46, 4601, '', 0, 'Barbados');
-- Belgium Regions (id country=2)
@@ -82,6 +93,18 @@ insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 2
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 2, 203, '',3,'Bruxelles-Capitale');
+-- Bolivia Regions (id country=52)
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5201, '', 0, 'Chuquisaca');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5202, '', 0, 'La Paz');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5203, '', 0, 'Cochabamba');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5204, '', 0, 'Oruro');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5205, '', 0, 'Potosí');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5206, '', 0, 'Tarija');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5207, '', 0, 'Santa Cruz');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5208, '', 0, 'El Beni');
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 52, 5209, '', 0, 'Pando');
+
+
-- Brazil Regions (id country=56)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 56, 5601, '', 0, 'Brasil');
@@ -90,6 +113,10 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 5
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 14, 1401, '', 0, 'Canada');
+-- Colombie Regions (id country=70)
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 70, 7001, '', 0, 'Colombie');
+
+
-- Regions France (id country=1)
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 1,'97105',3,'Guadeloupe');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 2,'97209',3,'Martinique');
@@ -217,21 +244,6 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 17, 1701, '', 0,'Provincies van Nederland ', 1);
--- Regions Bolivia (id country=52)
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5201, '', 0, 'Chuquisaca', 1);
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5202, '', 0, 'La Paz', 1);
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5203, '', 0, 'Cochabamba', 1);
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5204, '', 0, 'Oruro', 1);
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5205, '', 0, 'Potosí', 1);
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5206, '', 0, 'Tarija', 1);
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5207, '', 0, 'Santa Cruz', 1);
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5208, '', 0, 'El Beni', 1);
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5209, '', 0, 'Pando', 1);
-
-
--- Regions Colombie (id country=70)
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 70, 7001, '', 0, 'Colombie', 1);
-
-- Regions Chile (id country=67)
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6701, 67, NULL, NULL, 'Tarapacá', 1);
INSERT INTO llx_c_regions ( code_region, fk_pays, cheflieu, tncc, nom, active) values ( 6702, 67, NULL, NULL, 'Antofagasta', 1);
diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql
index 1b5da7602e2..d41f2a7454a 100644
--- a/htdocs/install/mysql/data/llx_20_c_departements.sql
+++ b/htdocs/install/mysql/data/llx_20_c_departements.sql
@@ -32,11 +32,12 @@
-- Do not concatenate the values in a single query, for the same reason.
--- NOTES -----------------------------------------------------------------------
+-- NOTES/CONTENT ---------------------------------------------------------------
-- Departements/Cantons/Provinces/States
--
-- Algeria
-- Andorra
+-- Angola
-- Argentina
-- Australia
-- Austria
@@ -113,6 +114,27 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-008', 'AD700', NULL, NULL, 'Escaldes-Engordany');
+-- Angola Provinces (postal districts) (id country=35)
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-ABO', NULL, NULL, 'BENGO', 'Bengo');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-BGU', NULL, NULL, 'BENGUELA', 'Benguela');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-BIE', NULL, NULL, 'BIÉ', 'Bié');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CAB', NULL, NULL, 'CABINDA', 'Cabinda');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CCU', NULL, NULL, 'KUANDO KUBANGO', 'Kuando Kubango');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CNO', NULL, NULL, 'KWANZA NORTE', 'Kwanza Norte');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CUS', NULL, NULL, 'KWANZA SUL', 'Kwanza Sul');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-CNN', NULL, NULL, 'CUNENE', 'Cunene');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-HUA', NULL, NULL, 'HUAMBO', 'Huambo');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-HUI', NULL, NULL, 'HUÍLA', 'Huila');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LUA', NULL, NULL, 'LUANDA', 'Luanda');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LNO', NULL, NULL, 'LUNDA-NORTE', 'Lunda-Norte');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-LSU',NULL, NULL, 'LUNDA-SUL', 'Lunda-Sul');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-MAL', NULL, NULL, 'MALANGE', 'Malange');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-MOX', NULL, NULL, 'MOXICO', 'Moxico');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-NAM', NULL, NULL, 'NAMÍBE', 'Namíbe');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-UIG', NULL, NULL, 'UÍGE', 'Uíge');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (35001, 'AO-ZAI', NULL, NULL, 'ZAÍRE', 'Zaíre');
+
+
-- Argentina Provinces / provincias (id country=23)
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2301', '', 0, 'CATAMARCA', 'Catamarca');
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (2301, '2302', '', 0, 'JUJUY', 'Jujuy');
@@ -1638,25 +1660,6 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI043', NULL, NULL, 'GORIZIA', 'Gorizia');
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI044', NULL, NULL, 'COASTAL–KARST', 'Coastal–Karst');
--- Provinces (postal districts) Angola (rowid country=35)
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-ABO', NULL, NULL, 'BENGO', 'Bengo');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-BGU', NULL, NULL, 'BENGUELA', 'Benguela');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-BIE', NULL, NULL, 'BIÉ', 'Bié');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CAB', NULL, NULL, 'CABINDA', 'Cabinda');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CCU', NULL, NULL, 'KUANDO KUBANGO', 'Kuando Kubango');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CNO', NULL, NULL, 'KWANZA NORTE', 'Kwanza Norte');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CUS', NULL, NULL, 'KWANZA SUL', 'Kwanza Sul');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-CNN', NULL, NULL, 'CUNENE', 'Cunene');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-HUA', NULL, NULL, 'HUAMBO', 'Huambo');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-HUI', NULL, NULL, 'HUÍLA', 'Huila');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LUA', NULL, NULL, 'LUANDA', 'Luanda');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LNO', NULL, NULL, 'LUNDA-NORTE', 'Lunda-Norte');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-LSU',NULL, NULL, 'LUNDA-SUL', 'Lunda-Sul');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-MAL', NULL, NULL, 'MALANGE', 'Malange');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-MOX', NULL, NULL, 'MOXICO', 'Moxico');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-NAM', NULL, NULL, 'NAMÍBE', 'Namíbe');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-UIG', NULL, NULL, 'UÍGE', 'Uíge');
-INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('35001', 'AO-ZAI', NULL, NULL, 'ZAÍRE', 'Zaíre');
-- Provinces Taiwan (rowid country=886)
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, nom) VALUES (21301, 'TW-KLU', 'KLU', NULL, '基隆市');
diff --git a/htdocs/install/mysql/data/llx_c_type_contact.sql b/htdocs/install/mysql/data/llx_c_type_contact.sql
index f16cf5ca5df..78fdade6e9a 100644
--- a/htdocs/install/mysql/data/llx_c_type_contact.sql
+++ b/htdocs/install/mysql/data/llx_c_type_contact.sql
@@ -93,9 +93,12 @@ INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, m
INSERT INTO llx_c_type_contact (rowid, element, source, code, libelle, active, module) VALUES(158, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1, NULL);
-- Supplier proposal
-
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110, 'supplier_proposal', 'internal', 'SALESREPFOLL', 'Responsable suivi de la demande', 1);
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (111, 'supplier_proposal', 'external', 'BILLING', 'Contact fournisseur facturation', 1);
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (112, 'supplier_proposal', 'external', 'SHIPPING', 'Contact fournisseur livraison', 1);
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (113, 'supplier_proposal', 'external', 'SERVICE', 'Contact fournisseur prestation', 1);
+-- Event Organization
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index af32340170e..1988fd5c294 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -359,3 +359,9 @@ ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_signature FOREIGN KEY (f
UPDATE llx_propal SET fk_user_signature = fk_user_cloture WHERE fk_user_signature IS NULL AND fk_user_cloture IS NOT NULL;
UPDATE llx_propal SET date_signature = date_cloture WHERE date_signature IS NULL AND date_cloture IS NOT NULL;
+
+ALTER TABLE llx_product ADD COLUMN batch_mask VARCHAR(32) NULL;
+
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (210, 'conferenceorbooth', 'internal', 'MANAGER', 'Conference or Booth manager', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (211, 'conferenceorbooth', 'external', 'SPEAKER', 'Conference Speaker', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (212, 'conferenceorbooth', 'external', 'RESPONSIBLE', 'Booth responsible', 1);
diff --git a/htdocs/install/mysql/tables/llx_c_ticket_category.sql b/htdocs/install/mysql/tables/llx_c_ticket_category.sql
index 317be25e142..10d16331a06 100644
--- a/htdocs/install/mysql/tables/llx_c_ticket_category.sql
+++ b/htdocs/install/mysql/tables/llx_c_ticket_category.sql
@@ -1,4 +1,5 @@
-- Copyright (C) 2013-2018 Jean-François FERRY
+-- Copyright (C) 2020-2021 Laurent Destailleur
--
-- 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
@@ -12,20 +13,22 @@
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see .
+
--
---
+-- Table with the categories of a ticket
+--
create table llx_c_ticket_category
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1,
- code varchar(32) NOT NULL,
+ code varchar(32) NOT NULL, -- Example: TIGRP-COMMERCIAL, TIGRP-TECHNICALISSUE, ...
label varchar(128) NOT NULL,
- pos integer DEFAULT 0 NOT NULL,
public integer DEFAULT 0,
use_default integer DEFAULT 1,
- active integer DEFAULT 1,
fk_parent integer DEFAULT 0 NOT NULL, -- Parent group
force_severity varchar(32) NULL, -- To force the severity if we choosed this category
- description varchar(255)
+ description varchar(255), -- A long description of ticket
+ pos integer DEFAULT 0 NOT NULL,
+ active integer DEFAULT 1
)ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql
index 2431c884c62..da8c2ff693c 100644
--- a/htdocs/install/mysql/tables/llx_product.sql
+++ b/htdocs/install/mysql/tables/llx_product.sql
@@ -51,7 +51,7 @@ create table llx_product
recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT
localtax1_tx double(6,3) DEFAULT 0,
localtax1_type varchar(10) NOT NULL DEFAULT '0',
- localtax2_tx double(6,3) DEFAULT 0,
+ localtax2_tx double(6,3) DEFAULT 0,
localtax2_type varchar(10) NOT NULL DEFAULT '0',
fk_user_author integer DEFAULT NULL, -- user making creation
fk_user_modif integer, -- user making last change
@@ -59,6 +59,7 @@ create table llx_product
tobuy tinyint DEFAULT 1, -- Product you buy
onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it on portal (module website must be on)
tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management)
+ batch_mask varchar(32), -- If the product has batch feature, you may want to use a batch mask per product
fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module)
duration varchar(6),
seuil_stock_alerte float DEFAULT NULL,
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 7fc9646c489..50ac450e136 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -111,22 +111,32 @@ class Project extends CommonObject
public $budget_amount;
/**
- * @var boolean Use to bill task spend time
+ * @var integer Can use projects to follow opportunities
+ */
+ public $usage_opportunity;
+
+ /**
+ * @var integer Can follow tasks on project and enter time spent on it
+ */
+ public $usage_task;
+
+ /**
+ * @var integer Use to bill task spend time
*/
public $usage_bill_time; // Is the time spent on project must be invoiced or not
/**
- * @var boolean Event organization: Use Event Organization
- */
+ * @var integer Event organization: Use Event Organization
+ */
public $usage_organize_event;
/**
- * @var boolean Event organization: Allow unknown people to suggest conferences
+ * @var integer Event organization: Allow unknown people to suggest new conferences
*/
public $accept_conference_suggestions;
/**
- * @var boolean Event organization: Allow unknown people to suggest booth
+ * @var integer Event organization: Allow unknown people to suggest new booth
*/
public $accept_booth_suggestions;
diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php
index afd152fb785..323e2c74c5a 100755
--- a/htdocs/salaries/card.php
+++ b/htdocs/salaries/card.php
@@ -45,6 +45,7 @@ if (!empty($conf->projet->enabled)) {
}
$id = GETPOSTINT('id');
+$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'aZ09');
$accountid = GETPOST('accountid', 'int') > 0 ? GETPOST('accountid', 'int') : 0;
@@ -63,13 +64,6 @@ $dateep = dol_mktime(12, 0, 0, GETPOST("dateepmonth", 'int'), GETPOST("dateepday
$label = GETPOST('label', 'alphanohtml');
$fk_user = GETPOSTINT('userid');
-// Security check
-$socid = GETPOSTINT('socid');
-if ($user->socid) {
- $socid = $user->socid;
-}
-$result = restrictedArea($user, 'salaries', '', '', '');
-
$object = new Salary($db);
$extrafields = new ExtraFields($db);
@@ -79,6 +73,18 @@ $extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('salarycard', 'globalcard'));
+$object = new Salary($db);
+if ($id > 0 || !empty($ref)) {
+ $object->fetch($id, $ref);
+}
+
+// Security check
+$socid = GETPOSTINT('socid');
+if ($user->socid) {
+ $socid = $user->socid;
+}
+restrictedArea($user, 'salaries', $object->id, 'salary', '');
+
/**
* Actions
@@ -885,21 +891,22 @@ if ($id) {
/*
* Action bar
*/
+
print '
'."\n";
if ($action != 'edit') {
// Reopen
if ($object->paye && $user->rights->salaries->write) {
- print "