Compare commits

...

4 Commits
7.4.1 ... 7.4.2

Author SHA1 Message Date
Yuri Kuznetsov
506e96e333 float preventing same decimal mark and th separator 2023-04-07 17:38:06 +03:00
Yuri Kuznetsov
76a9177c46 v 2023-04-07 16:42:17 +03:00
Yuri Kuznetsov
a8baac3f92 missing counterpart link warning 2023-04-07 16:40:57 +03:00
Yuri Kuznetsov
8d9d073c16 fix currency decimal places null 2023-04-07 10:10:36 +03:00
5 changed files with 33 additions and 5 deletions

View File

@@ -33,12 +33,15 @@ use Espo\Core\Utils\Database\Orm\Defs\AttributeDefs;
use Espo\Core\Utils\Database\Orm\Defs\EntityDefs;
use Espo\Core\Utils\Database\Orm\Defs\RelationDefs;
use Espo\Core\Utils\Database\Orm\LinkConverter;
use Espo\Core\Utils\Log;
use Espo\ORM\Defs\RelationDefs as LinkDefs;
use Espo\ORM\Type\AttributeType;
use Espo\ORM\Type\RelationType;
class HasMany implements LinkConverter
{
public function __construct(private Log $log) {}
public function convert(LinkDefs $linkDefs, string $entityType): EntityDefs
{
if (!$linkDefs->hasForeignRelationName() && $linkDefs->getParam('disabled')) {
@@ -52,9 +55,20 @@ class HasMany implements LinkConverter
$foreignRelationName = $linkDefs->getForeignRelationName();
$hasField = $linkDefs->getParam('hasField');
$type = $linkDefs->hasRelationshipName() ?
$type = RelationType::HAS_MANY;
/*$type = $linkDefs->hasRelationshipName() ?
RelationType::MANY_MANY : // Revise.
RelationType::HAS_MANY;
RelationType::HAS_MANY;*/
if ($linkDefs->hasRelationshipName()) {
$this->log->warning(
"Issue with the link '{$name}' in '{$entityType}' entity type. Might be the foreign link " .
"'{$foreignRelationName}' in '{$foreignEntityType}' entity type is missing. " .
"Remove the problem link manually.");
return EntityDefs::create();
}
return EntityDefs::create()
->withAttribute(

View File

@@ -119,6 +119,12 @@ function (Dep, /** module:ui/select*/Select) {
showWarnings: false,
formulaMode: true,
};
if (this.decimalPlaces === null) {
this.autoNumericOptions.decimalPlaces = this.decimalPlacesRawValue;
this.autoNumericOptions.decimalPlacesRawValue = this.decimalPlacesRawValue;
this.autoNumericOptions.allowDecimalPadding = false;
}
},
getCurrencyFormat: function () {

View File

@@ -60,6 +60,14 @@ define('views/fields/float', ['views/fields/int'], function (Dep) {
else if (this.getConfig().has('decimalMark')) {
this.decimalMark = this.getConfig().get('decimalMark');
}
if (!this.decimalMark) {
this.decimalMark = '.';
}
if (this.decimalMark === this.thousandSeparator) {
this.thousandSeparator = '';
}
},
/**

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "espocrm",
"version": "7.4.1",
"version": "7.4.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "espocrm",
"version": "7.4.1",
"version": "7.4.2",
"hasInstallScript": true,
"license": "GPL-3.0",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "7.4.1",
"version": "7.4.2",
"description": "Open-source CRM.",
"repository": {
"type": "git",