mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-06 05:57:02 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
506e96e333 | ||
|
|
76a9177c46 | ||
|
|
a8baac3f92 | ||
|
|
8d9d073c16 |
@@ -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(
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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
4
package-lock.json
generated
@@ -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": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "7.4.1",
|
||||
"version": "7.4.2",
|
||||
"description": "Open-source CRM.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user