diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php
index 73e59b2f9f0..b11d53b2708 100644
--- a/htdocs/comm/remx.php
+++ b/htdocs/comm/remx.php
@@ -469,12 +469,12 @@ if ($socid > 0) {
print '
'.$langs->trans("ReasonDiscount").' | ';
print ''.$langs->trans("ConsumedBy").' | ';
print ''.$langs->trans("AmountHT").' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.$langs->trans("MulticurrencyAmountHT").' | ';
}
print ''.$langs->trans("VATRate").' | ';
print ''.$langs->trans("AmountTTC").' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.$langs->trans("MulticurrencyAmountTTC").' | ';
}
print ''.$langs->trans("DiscountOfferedBy").' | ';
@@ -531,12 +531,12 @@ if ($socid > 0) {
print ''.price($obj->amount_ht).' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.price($obj->multicurrency_amount_ht).' | ';
}
print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).' | ';
print ''.price($obj->amount_ttc).' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.price($obj->multicurrency_amount_ttc).' | ';
}
print '';
@@ -562,7 +562,7 @@ if ($socid > 0) {
}
} else {
$colspan = 8;
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
$colspan += 2;
}
print ' | | '.$langs->trans("None").' |
';
@@ -622,12 +622,12 @@ if ($socid > 0) {
print ''.$langs->trans("ReasonDiscount").' | ';
print ''.$langs->trans("ConsumedBy").' | ';
print ''.$langs->trans("AmountHT").' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.$langs->trans("MulticurrencyAmountHT").' | ';
}
print ''.$langs->trans("VATRate").' | ';
print ''.$langs->trans("AmountTTC").' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.$langs->trans("MulticurrencyAmountTTC").' | ';
}
print ''.$langs->trans("DiscountOfferedBy").' | ';
@@ -679,12 +679,12 @@ if ($socid > 0) {
}
print ''.$langs->trans("NotConsumed").' | ';
print ''.price($obj->amount_ht).' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.price($obj->multicurrency_amount_ht).' | ';
}
print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).' | ';
print ''.price($obj->amount_ttc).' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.price($obj->multicurrency_amount_ttc).' | ';
}
print '';
@@ -709,7 +709,7 @@ if ($socid > 0) {
}
} else {
$colspan = 8;
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
$colspan += 2;
}
print ' | | '.$langs->trans("None").' |
';
@@ -803,12 +803,12 @@ if ($socid > 0) {
print ''.$langs->trans("ReasonDiscount").' | ';
print ''.$langs->trans("ConsumedBy").' | ';
print ''.$langs->trans("AmountHT").' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.$langs->trans("MulticurrencyAmountHT").' | ';
}
print ''.$langs->trans("VATRate").' | ';
print ''.$langs->trans("AmountTTC").' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.$langs->trans("MulticurrencyAmountTTC").' | ';
}
print ''.$langs->trans("Author").' | ';
@@ -884,12 +884,12 @@ if ($socid > 0) {
}
print '';
print ''.price($obj->amount_ht).' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.price($obj->multicurrency_amount_ht).' | ';
}
print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).' | ';
print ''.price($obj->amount_ttc).' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.price($obj->multicurrency_amount_ttc).' | ';
}
print '';
@@ -902,7 +902,7 @@ if ($socid > 0) {
}
} else {
$colspan = 8;
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
$colspan += 2;
}
print ' | | '.$langs->trans("None").' |
';
@@ -973,12 +973,12 @@ if ($socid > 0) {
print ''.$langs->trans("ReasonDiscount").' | ';
print ''.$langs->trans("ConsumedBy").' | ';
print ''.$langs->trans("AmountHT").' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.$langs->trans("MulticurrencyAmountHT").' | ';
}
print ''.$langs->trans("VATRate").' | ';
print ''.$langs->trans("AmountTTC").' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.$langs->trans("MulticurrencyAmountTTC").' | ';
}
print ''.$langs->trans("Author").' | ';
@@ -1054,12 +1054,12 @@ if ($socid > 0) {
}
print '';
print ''.price($obj->amount_ht).' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.price($obj->multicurrency_amount_ht).' | ';
}
print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).' | ';
print ''.price($obj->amount_ttc).' | ';
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
print ''.price($obj->multicurrency_amount_ttc).' | ';
}
print '';
@@ -1073,7 +1073,7 @@ if ($socid > 0) {
}
} else {
$colspan = 8;
- if (isModEnabled('multicompany')) {
+ if (isModEnabled('multicurrency')) {
$colspan += 2;
}
print ' | | '.$langs->trans("None").' |
';
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index bc5b5a925c8..23795db4265 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -95,7 +95,7 @@ class modSociete extends DolibarrModules
$this->const[$r][0] = "SOCIETE_FISCAL_MONTH_START";
$this->const[$r][1] = "chaine";
- $this->const[$r][2] = "0";
+ $this->const[$r][2] = "1";
$this->const[$r][3] = "Enter the month number of the first month of the fiscal year, e. g. 9 for September";
$this->const[$r][4] = 0;
$r++;
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 3dbfd068f57..4bebdf0dfd1 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -1165,8 +1165,10 @@ if ($action == 'create') {
}
print '';
print '| '.$langs->trans("ThirdParty").' | ';
- print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300');
- print ' ';
+ $filter = '(s.status:=:1)';
+
+ print $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, null, 0, 'minwidth300');
+ print ' ';
print ' |
';
print '
';
diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql
index ce0f72decde..ed7a1baafb0 100644
--- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql
+++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql
@@ -489,7 +489,7 @@ ALTER TABLE llx_partnership ADD COLUMN email_partnership varchar(64) after fk_me
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut);
-ALTER TABLE fk_product_price_product DROP FOREIGN KEY fk_product_price_product;
+ALTER TABLE llx_product_price DROP FOREIGN KEY fk_product_price_product;
ALTER TABLE llx_societe_rib ADD COLUMN ext_payment_site varchar(128);
@@ -679,7 +679,7 @@ ALTER TABLE llx_product_lot_extrafields CHANGE COLUMN tms tms timestamp DEFAULT
ALTER TABLE llx_product_lot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_product_price_by_qty CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_product_price CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
-ALTER TABLE llx_product_stock_entrepot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
+ALTER TABLE llx_product_warehouse_properties CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_product_stock CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_projet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE llx_projet CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
@@ -721,3 +721,6 @@ ALTER TABLE llx_user CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP O
ALTER TABLE llx_salary_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
-- 15.0 -> 16.0 rename llx_advtargetemailing to llx_mailing_advtarget
ALTER TABLE llx_mailing_advtarget CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
+
+-- 3.6 -> 3.7 typo on llx_adherents ('end with s') and varchar is 128
+ALTER TABLE llx_adherent MODIFY COLUMN societe VARCHAR(128);
diff --git a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql
index 36259f40cfc..a6918580a4f 100644
--- a/htdocs/install/mysql/migration/18.0.0-19.0.0.sql
+++ b/htdocs/install/mysql/migration/18.0.0-19.0.0.sql
@@ -234,3 +234,5 @@ UPDATE llx_menu SET url = CONCAT(url, '&mode=init') WHERE fk_mainmenu = 'ticket'
-- VMYSQL4.1 ALTER TABLE llx_asset_depreciation_options_economic MODIFY COLUMN accelerated_depreciation_option boolean DEFAULT false;
-- VPGSQL8.2 ALTER TABLE llx_asset ALTER COLUMN llx_asset_depreciation_options_economic DROP DEFAULT, ALTER COLUMN llx_asset_depreciation_options_economic TYPE boolean USING llx_asset_depreciation_options_economic::integer <> 0, ALTER COLUMN llx_asset_depreciation_options_economic SET DEFAULT false;
+
+ALTER TABLE llx_adherent MODIFY COLUMN societe VARCHAR(128);