mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
935e7e6d31
|
|
@ -673,7 +673,7 @@ WARNING:
|
|||
--------
|
||||
|
||||
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* If a filter is defined into and extrafields "Select from a table", this filter MUST use the Universai Search Filter syntax (field:=:value) instead of field=value.
|
||||
* If a filter is defined into an extrafield, this filter MUST use the Universai Search Filter syntax (field:=:value) instead of th eunsecured SQL code field=value.
|
||||
See https://wiki.dolibarr.org/index.php?title=Universal_Search_Filter_Syntax
|
||||
* The parameter $filter of methods fetchAll() does not accept array of SQL commands but must be a string of an Universal Search Filter syntax.
|
||||
See https://wiki.dolibarr.org/index.php?title=Universal_Search_Filter_Syntax
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
74734
dev/initdemo/mysqldump_dolibarr_21.0.0.sql
Normal file
74734
dev/initdemo/mysqldump_dolibarr_21.0.0.sql
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -666,7 +666,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
if ($price_base_type == 'HT') {
|
||||
$pu = $pu_ht;
|
||||
} else {
|
||||
|
|
@ -894,7 +894,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
if (empty($qty) && empty($special_code)) {
|
||||
$special_code = 3; // Set option tag
|
||||
}
|
||||
|
|
|
|||
|
|
@ -457,6 +457,7 @@ class PropaleLigne extends CommonObjectLine
|
|||
dol_syslog(get_class($this)."::insert rang=".$this->rang);
|
||||
|
||||
$pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'.
|
||||
$this->pa_ht = (float) $this->pa_ht; // convert to float after check if empty value
|
||||
|
||||
// Clean parameters
|
||||
if (empty($this->tva_tx)) {
|
||||
|
|
@ -501,9 +502,6 @@ class PropaleLigne extends CommonObjectLine
|
|||
if (!is_numeric($this->qty)) {
|
||||
$this->qty = 0;
|
||||
}
|
||||
if (empty($this->pa_ht)) {
|
||||
$this->pa_ht = 0;
|
||||
}
|
||||
if (empty($this->multicurrency_subprice)) {
|
||||
$this->multicurrency_subprice = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3177,7 +3177,7 @@ class Commande extends CommonOrder
|
|||
$remise_percent = (float) price2num($remise_percent);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pa_ht = (float) price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
|
|
|
|||
|
|
@ -3946,11 +3946,13 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
$remise_percent = (float) price2num($remise_percent);
|
||||
|
||||
$qty = (float) price2num($qty);
|
||||
$pu_ht = (float) price2num($pu_ht);
|
||||
$pu_ht_devise = (float) price2num($pu_ht_devise);
|
||||
$pu_ttc = (float) price2num($pu_ttc);
|
||||
$pa_ht = (float) price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
|
|
@ -4208,10 +4210,12 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
$remise_percent = (float) price2num($remise_percent);
|
||||
|
||||
$qty = (float) price2num($qty);
|
||||
$pu = (float) price2num($pu);
|
||||
$pu_ht_devise = (float) price2num($pu_ht_devise);
|
||||
$pa_ht = (float) price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,6 +302,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||
$error = 0;
|
||||
|
||||
$pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'.
|
||||
$this->pa_ht = (float) $this->pa_ht; // convert to float but after checking if value is empty
|
||||
|
||||
dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG);
|
||||
|
||||
|
|
@ -356,9 +357,6 @@ class FactureLigne extends CommonInvoiceLine
|
|||
$this->situation_percent = 100;
|
||||
}
|
||||
|
||||
if (empty($this->pa_ht)) {
|
||||
$this->pa_ht = 0;
|
||||
}
|
||||
if (empty($this->multicurrency_subprice)) {
|
||||
$this->multicurrency_subprice = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ class ImportCsv extends ModeleImports
|
|||
ini_set('auto_detect_line_endings', 1); // For MAC compatibility
|
||||
|
||||
$handle = fopen(dol_osencode($file), "r");
|
||||
if (!$this->handle) {
|
||||
if (!$handle) {
|
||||
$langs->load("errors");
|
||||
$this->error = $langs->trans("ErrorFailToOpenFile", $file);
|
||||
$ret = -1;
|
||||
|
|
|
|||
|
|
@ -268,7 +268,6 @@ class ImportXlsx extends ModeleImports
|
|||
public function import_open_file($file)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$ret = 1;
|
||||
|
||||
dol_syslog(get_class($this) . "::open_file file=" . $file);
|
||||
|
|
|
|||
|
|
@ -562,6 +562,8 @@ if ($step == 3 && $datatoimport) {
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
|
@ -976,6 +978,8 @@ if ($step == 4 && $datatoimport) {
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
|
@ -984,7 +988,7 @@ if ($step == 4 && $datatoimport) {
|
|||
|
||||
// Source file format
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("SourceFileFormat").'</td>';
|
||||
print '<td>';
|
||||
print '<td class="nowraponall">';
|
||||
$text = $objmodelimport->getDriverDescForKey($format);
|
||||
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
|
||||
print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text);
|
||||
|
|
@ -1646,6 +1650,8 @@ if ($step == 5 && $datatoimport) {
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
|
@ -1654,7 +1660,7 @@ if ($step == 5 && $datatoimport) {
|
|||
|
||||
// Source file format
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("SourceFileFormat").'</td>';
|
||||
print '<td>';
|
||||
print '<td class="nowraponall">';
|
||||
$text = $objmodelimport->getDriverDescForKey($format);
|
||||
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
|
||||
print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text);
|
||||
|
|
@ -1757,6 +1763,7 @@ if ($step == 5 && $datatoimport) {
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("InformationOnTargetTables"), '', 'file-import');
|
||||
|
||||
|
|
@ -2135,15 +2142,17 @@ if ($step == 6 && $datatoimport) {
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', 'file-export');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<div class="fichecenter">';
|
||||
print '<table width="100%" class="border">';
|
||||
print '<table width="100%" class="border tableforfield">';
|
||||
|
||||
// Source file format
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("SourceFileFormat").'</td>';
|
||||
print '<td>';
|
||||
print '<td class="nowraponall">';
|
||||
$text = $objmodelimport->getDriverDescForKey($format);
|
||||
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
|
||||
print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
--------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
-- Accounting Journals
|
||||
-- Accounting Journals
|
||||
|
||||
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('VT', 'ACCOUNTING_SELL_JOURNAL', 2, 1, 1);
|
||||
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('AC', 'ACCOUNTING_PURCHASE_JOURNAL', 3, 1, 1);
|
||||
|
|
@ -59,15 +59,11 @@ INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES
|
|||
|
||||
-- Accounting Charts / Plans (Templates) for Countries
|
||||
|
||||
-- Description of chart of account FR PCG99-ABREGE
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG99-ABREGE', 'The simple accountancy french plan', 1);
|
||||
-- Description of chart of account FR PCG99-BASE
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG99-BASE', 'The base accountancy french plan', 1);
|
||||
-- Description of chart of account FR PCG14-DEV
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG14-DEV', 'The developed accountancy french plan 2014', 1);
|
||||
-- Description of chart of account FR PCG25-DEV
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG25-DEV', 'The developed accountancy french plan 2025', 1);
|
||||
-- Description of chart of account FR PCG18-ASSOC
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG18-ASSOC', 'French foundation chart of accounts 2018', 1);
|
||||
-- Description of chart of account FR PCGAFR14-DEV
|
||||
-- Description of chart of account FR PCGAFR14-DEV
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCGAFR14-DEV', 'The developed farm accountancy french plan 2014', 1);
|
||||
|
||||
-- Description of chart of account BE PCMN-BASE
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -27,7 +27,6 @@ EndBankBalance=End balance
|
|||
CurrentBalance=Current balance
|
||||
FutureBalance=Future balance
|
||||
ShowAllTimeBalance=Show balance from start
|
||||
AllTime=From start
|
||||
Reconciliation=Reconciliation
|
||||
RIB=Bank Account Number
|
||||
IBAN=IBAN number
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ NowClickToTestTheImport=Check that the file format (field and string delimiters)
|
|||
RunSimulateImportFile=Run Import Simulation
|
||||
FieldNeedSource=This field requires data from the source file
|
||||
SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file
|
||||
InformationOnSourceFile=Information on source file
|
||||
InformationOnTargetTables=Information on target fields
|
||||
InformationOnSourceFile=Source file
|
||||
InformationOnTargetTables=Target fields
|
||||
SelectAtLeastOneField=Switch at least one source field in the column of fields to export
|
||||
SelectFormat=Choose this import file format
|
||||
RunImportFile=Import Data
|
||||
|
|
|
|||
|
|
@ -1345,3 +1345,4 @@ IsNotDefined=Is not defined
|
|||
SpecialLine=Special Line
|
||||
EcoTax=Eco-Tax
|
||||
GroupingLine=Grouping line
|
||||
AllTime=From start
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ NowClickToTestTheImport=Vérifiez les paramètres d'import que vous avez défini
|
|||
RunSimulateImportFile=Lancer la simulation d'import
|
||||
FieldNeedSource=Ce champ en base requiert obligatoirement une donnée source
|
||||
SomeMandatoryFieldHaveNoSource=Certains champs obligatoires n'ont pas de champ source issus du fichier
|
||||
InformationOnSourceFile=Informations sur le fichier source
|
||||
InformationOnTargetTables=Informations sur les champs cibles
|
||||
InformationOnSourceFile=Fichier source
|
||||
InformationOnTargetTables=Champs destination
|
||||
SelectAtLeastOneField=Basculez au moins un champ source dans la colonne des champs à exporter
|
||||
SelectFormat=Choisir ce format de fichier import
|
||||
RunImportFile=Importer les données
|
||||
|
|
|
|||
|
|
@ -293,7 +293,9 @@ class Inventory extends CommonObject
|
|||
if (!empty($include_sub_warehouse) && getDolGlobalInt('INVENTORY_INCLUDE_SUB_WAREHOUSE')) {
|
||||
$TChildWarehouses = array();
|
||||
$this->getChildWarehouse($this->fk_warehouse, $TChildWarehouses);
|
||||
$sql .= " OR ps.fk_entrepot IN (".$this->db->sanitize(implode(',', $TChildWarehouses)).")";
|
||||
if (!empty($TChildWarehouses)) {
|
||||
$sql .= " OR ps.fk_entrepot IN (" . $this->db->sanitize(implode(',', $TChildWarehouses)) . ")";
|
||||
}
|
||||
}
|
||||
$sql .= ')';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -785,11 +785,13 @@ class Reception extends CommonObject
|
|||
$this->fetch_origin();
|
||||
if ($this->origin_object instanceof CommonObject && empty($this->origin_object->lines)) {
|
||||
$res = $this->origin_object->fetch_lines();
|
||||
if ($this->origin_object instanceof CommandeFournisseur) {
|
||||
$this->commandeFournisseur = $this->origin_object; // deprecated
|
||||
} else {
|
||||
$this->commandeFournisseur = null; // deprecated
|
||||
$this->commandeFournisseur = null; // deprecated
|
||||
if ($res < 0) {
|
||||
return $res;
|
||||
}
|
||||
} elseif ($this->origin_object instanceof CommandeFournisseur && empty($this->origin_object->lines)) {
|
||||
$res = $this->origin_object->fetch_lines();
|
||||
$this->commandeFournisseur = $this->origin_object; // deprecated
|
||||
if ($res < 0) {
|
||||
return $res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af
|
|||
}
|
||||
.tmenu .dropdown-menu, .login_block .dropdown-menu, .topnav .dropdown-menu {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
right: 1px;
|
||||
<?php echo $left; ?>: auto;
|
||||
line-height:1.3em;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3327,7 +3327,7 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
print '<span class="valignmiddle disabled opacitymedium">'.img_picto($langs->trans($text_off), 'switch_on').'</span>';
|
||||
}
|
||||
} else {
|
||||
print ajax_object_onoff($websitepage, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle inline-block'.(empty($websitepage->id) ? ' opacitymedium disabled' : ''), 'statuswebsitepage', 1, 'pageid='.$websitepage->id);
|
||||
print ajax_object_onoff($websitepage, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle inline-block'.(empty($websitepage->id) ? ' opacitymedium disabled' : ''), 'statuswebsitepage', 1, 'website='.urlencode($website->ref).'&pageid='.((int) $websitepage->id));
|
||||
}
|
||||
//print '</div>';
|
||||
print '</span>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user