diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 3015ea17d34..a4371df96ad 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2155,8 +2155,8 @@ if ($id > 0) { } print ''; } - - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { + + if ($action == 'edit' && ($rowid == (isset($obj->rowid) ? $obj->rowid : $obj->code))) { $tmpaction = 'edit'; $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -2169,7 +2169,7 @@ if ($id > 0) { } print ''; - print '
'; + print '
'; print ''; print ''; if (!is_null($withentity)) { diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index dfefc4b38cc..4bc59bbeb05 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -461,12 +461,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").''; @@ -523,12 +523,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 ''; @@ -554,7 +554,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -614,12 +614,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").''; @@ -671,12 +671,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 ''; @@ -701,7 +701,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -795,12 +795,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").''; @@ -876,12 +876,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 ''; @@ -894,7 +894,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -965,12 +965,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").''; @@ -1046,12 +1046,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 ''; @@ -1065,7 +1065,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 39c02faec08..d15fa78652b 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -93,7 +93,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 c2e2f2aefee..a886c5672cd 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1082,7 +1082,9 @@ if ($action == 'create') { } print ''; print ''; print '
'.$langs->trans("ThirdParty").''; - print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); + $filter = '((s.client:IN:'.Societe::CUSTOMER.', '.Societe::PROSPECT.', '.Societe::CUSTOMER_AND_PROSPECT.') AND (s.status:=:1))'; + + print $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); 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 d17370ce0cc..78c79b2f5cf 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);