@@ -47,21 +47,6 @@ abstract class CommonObject
*/
public $error;
- /**
- * @var string[] Array of error strings
- */
- public $errors=array();
-
- /**
- * @var string Can be used to pass information when only object is provied to method
- */
- public $context=array();
-
- /**
- * @var string Contains canvas name if record is an alternative canvas record
- */
- public $canvas;
-
/**
* @var string Key value used to track if data is coming from import wizard
*/
@@ -89,7 +74,23 @@ abstract class CommonObject
- // Following var are used by some objects only. We keep this property here in CommonObject to be able to provide common method using them.
+ // Following vars are used by some objects only. We keep this property here in CommonObject to be able to provide common method using them.
+
+ /**
+ * @var string[] Array of error strings
+ */
+ public $errors=array();
+
+ /**
+ * @var string Can be used to pass information when only object is provided to method
+ */
+ public $context=array();
+
+ /**
+ * @var string Contains canvas name if record is an alternative canvas record
+ */
+ public $canvas;
+
public $name;
public $lastname;
diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
index 0c44708c6db..ee3a9d586b5 100755
--- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
+++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
@@ -207,8 +207,9 @@ UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type NOT IN (SELE
-- fk_user_author
ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_user_author (fk_user_author);
UPDATE llx_product_price set fk_user_author = null where fk_user_author = 0;
+UPDATE llx_product_price set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
--- fk_user_author
+-- fk_product
ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_product (fk_product);
DELETE from llx_product_price where fk_product NOT IN (SELECT rowid from llx_product);
ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 5ca742f0816..4cc34477fde 100755
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -398,7 +398,7 @@ ExtrafieldParamHelpsellist=Parameters list comes from a table
Syntax : table_
ExtrafieldParamHelpchkbxlst=Parameters list comes from a table
Syntax : table_name:label_field:id_field::filter
Example : c_typent:libelle:id::filter
filter can be a simple test (eg active=1) to display only active value
if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)
In order to have the list depending on another :
c_typent:libelle:id:parent_list_code|parent_column:filter
LibraryToBuildPDF=Library used to build PDF
WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.
To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'
-LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:
1 : local tax apply on products and services without vat (localtax is calculated on amount without tax)
2 : local tax apply on products and services including vat (localtax is calculated on amount + main tax)
3 : local tax apply on products without vat (localtax is calculated on amount without tax)
4 : local tax apply on products including vat (vat is calculated on amount + main vat)
5 : local tax apply on services without vat (localtax is calculated on amount without tax)
6 : local tax apply on services including vat (localtax is calculated on amount + tax)
+LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:
1 : local tax apply on products and services without vat (localtax is calculated on amount without tax)
2 : local tax apply on products and services including vat (localtax is calculated on amount + main tax)
3 : local tax apply on products without vat (localtax is calculated on amount without tax)
4 : local tax apply on products including vat (localtax is calculated on amount + main vat)
5 : local tax apply on services without vat (localtax is calculated on amount without tax)
6 : local tax apply on services including vat (localtax is calculated on amount + tax)
SMS=SMS
LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user %s
RefreshPhoneLink=Refresh link
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 8d0d4484a2e..33edc83dd85 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -1177,7 +1177,7 @@ else
print_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), "");
// Main official, simple, and not duplicated code
- print '';
}
-else
+else if ($id > 0 || ! empty($ref))
{
/*
* Fiche projet en mode visu
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 20ef1714164..02e1dd0edbb 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -392,10 +392,13 @@ if ($id > 0 || ! empty($ref))
print '';
print img_object('','user','class="hideonsmartphone"');
$contactsoftask=$object->getListContactId('internal');
- if (count($contactsoftask)>0) {
+ if (count($contactsoftask)>0)
+ {
$userid=$contactsoftask[0];
- print $form->select_dolusers($userid,'userid',0,'',0,'',$contactsoftask);
- }else {
+ print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid),'userid',0,'',0,'',$contactsoftask);
+ }
+ else
+ {
print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
}
print ' | ';