mirror of
https://github.com/Karaka-Management/oms-SupplierManagement.git
synced 2026-02-16 08:38:40 +00:00
bug fixes
This commit is contained in:
parent
c61518fa61
commit
8a47e1fcac
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
|
|
@ -9,5 +9,5 @@ jobs:
|
||||||
- uses: actions/first-interaction@v1
|
- uses: actions/first-interaction@v1
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-message: 'Thank you for createing this issue. We will check it as soon as possible.'
|
issue-message: 'Thank you for creating this issue. We will check it as soon as possible.'
|
||||||
pr-message: 'Thank you for your pull request. We will check it as soon as possible.'
|
pr-message: 'Thank you for your pull request. We will check it as soon as possible.'
|
||||||
|
|
|
||||||
|
|
@ -12,19 +12,5 @@
|
||||||
"name": "Suppliers",
|
"name": "Suppliers",
|
||||||
"virtualPath": "/Modules/SupplierManagement",
|
"virtualPath": "/Modules/SupplierManagement",
|
||||||
"user": 1
|
"user": 1
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "type",
|
|
||||||
"name": "supplier_profile_image",
|
|
||||||
"l11n": [
|
|
||||||
{
|
|
||||||
"title": "Profile image",
|
|
||||||
"lang": "en"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Profilbild",
|
|
||||||
"lang": "de"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -23,6 +23,7 @@ return [
|
||||||
'dest' => '\Modules\SupplierManagement\Controller\SearchController:searchGeneral',
|
'dest' => '\Modules\SupplierManagement\Controller\SearchController:searchGeneral',
|
||||||
'verb' => RouteVerb::ANY,
|
'verb' => RouteVerb::ANY,
|
||||||
'active' => true,
|
'active' => true,
|
||||||
|
'order' => 5,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => SearchController::NAME,
|
'module' => SearchController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ final class ApiAttributeController extends Controller
|
||||||
->where('id', (int) $request->getData('type'))
|
->where('id', (int) $request->getData('type'))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
if (!$type->repeatable) {
|
if (!$type->isRepeatable) {
|
||||||
$attr = SupplierAttributeMapper::count()
|
$attr = SupplierAttributeMapper::count()
|
||||||
->with('type')
|
->with('type')
|
||||||
->where('type/id', $type->id)
|
->where('type/id', $type->id)
|
||||||
|
|
|
||||||
|
|
@ -372,7 +372,7 @@ final class ApiController extends Controller
|
||||||
basePath: __DIR__ . '/../../../Modules/Media/Files/Modules/SupplierManagement/Suppliers/' . ($request->getData('supplier') ?? '0'),
|
basePath: __DIR__ . '/../../../Modules/Media/Files/Modules/SupplierManagement/Suppliers/' . ($request->getData('supplier') ?? '0'),
|
||||||
virtualPath: '/Modules/SupplierManagement/Suppliers/' . ($request->getData('supplier') ?? '0'),
|
virtualPath: '/Modules/SupplierManagement/Suppliers/' . ($request->getData('supplier') ?? '0'),
|
||||||
pathSettings: PathSettings::FILE_PATH,
|
pathSettings: PathSettings::FILE_PATH,
|
||||||
type: $request->getDataInt('type'),
|
tag: $request->getDataInt('tag'),
|
||||||
rel: (int) $request->getData('supplier'),
|
rel: (int) $request->getData('supplier'),
|
||||||
mapper: SupplierMapper::class,
|
mapper: SupplierMapper::class,
|
||||||
field: 'files'
|
field: 'files'
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ namespace Modules\SupplierManagement\Controller;
|
||||||
use Modules\Attribute\Models\NullAttributeValue;
|
use Modules\Attribute\Models\NullAttributeValue;
|
||||||
use Modules\Auditor\Models\AuditMapper;
|
use Modules\Auditor\Models\AuditMapper;
|
||||||
use Modules\Media\Models\MediaMapper;
|
use Modules\Media\Models\MediaMapper;
|
||||||
use Modules\Media\Models\MediaTypeMapper;
|
|
||||||
use Modules\Organization\Models\Attribute\UnitAttributeMapper;
|
use Modules\Organization\Models\Attribute\UnitAttributeMapper;
|
||||||
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeL11nMapper;
|
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeL11nMapper;
|
||||||
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeMapper;
|
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeMapper;
|
||||||
|
|
@ -25,6 +24,7 @@ use Modules\SupplierManagement\Models\Attribute\SupplierAttributeValueL11nMapper
|
||||||
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeValueMapper;
|
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeValueMapper;
|
||||||
use Modules\SupplierManagement\Models\PermissionCategory;
|
use Modules\SupplierManagement\Models\PermissionCategory;
|
||||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||||
|
use Modules\Tag\Models\TagMapper;
|
||||||
use phpOMS\Account\PermissionType;
|
use phpOMS\Account\PermissionType;
|
||||||
use phpOMS\Asset\AssetType;
|
use phpOMS\Asset\AssetType;
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
|
|
@ -300,12 +300,12 @@ final class BackendController extends Controller
|
||||||
->on(SupplierMapper::HAS_MANY['files']['table'] . '.' . SupplierMapper::HAS_MANY['files']['self'], '=', SupplierMapper::TABLE . '.' . SupplierMapper::PRIMARYFIELD)
|
->on(SupplierMapper::HAS_MANY['files']['table'] . '.' . SupplierMapper::HAS_MANY['files']['self'], '=', SupplierMapper::TABLE . '.' . SupplierMapper::PRIMARYFIELD)
|
||||||
->leftJoin(MediaMapper::TABLE)
|
->leftJoin(MediaMapper::TABLE)
|
||||||
->on(SupplierMapper::HAS_MANY['files']['table'] . '.' . SupplierMapper::HAS_MANY['files']['external'], '=', MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD)
|
->on(SupplierMapper::HAS_MANY['files']['table'] . '.' . SupplierMapper::HAS_MANY['files']['external'], '=', MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD)
|
||||||
->leftJoin(MediaMapper::HAS_MANY['types']['table'])
|
->leftJoin(MediaMapper::HAS_MANY['tags']['table'])
|
||||||
->on(MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD, '=', MediaMapper::HAS_MANY['types']['table'] . '.' . MediaMapper::HAS_MANY['types']['self'])
|
->on(MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD, '=', MediaMapper::HAS_MANY['tags']['table'] . '.' . MediaMapper::HAS_MANY['tags']['self'])
|
||||||
->leftJoin(MediaTypeMapper::TABLE)
|
->leftJoin(TagMapper::TABLE)
|
||||||
->on(MediaMapper::HAS_MANY['types']['table'] . '.' . MediaMapper::HAS_MANY['types']['external'], '=', MediaTypeMapper::TABLE . '.' . MediaTypeMapper::PRIMARYFIELD)
|
->on(MediaMapper::HAS_MANY['tags']['table'] . '.' . MediaMapper::HAS_MANY['tags']['external'], '=', TagMapper::TABLE . '.' . TagMapper::PRIMARYFIELD)
|
||||||
->where(SupplierMapper::HAS_MANY['files']['self'], '=', $view->data['supplier']->id)
|
->where(SupplierMapper::HAS_MANY['files']['self'], '=', $view->data['supplier']->id)
|
||||||
->where(MediaTypeMapper::TABLE . '.' . MediaTypeMapper::getColumnByMember('name'), '=', 'supplier_profile_image');
|
->where(TagMapper::TABLE . '.' . TagMapper::getColumnByMember('name'), '=', 'profile_image');
|
||||||
|
|
||||||
$view->data['supplierImage'] = MediaMapper::get()
|
$view->data['supplierImage'] = MediaMapper::get()
|
||||||
->where('id', $results)
|
->where('id', $results)
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ namespace Modules\SupplierManagement\Controller;
|
||||||
|
|
||||||
use Modules\Admin\Models\ContactType;
|
use Modules\Admin\Models\ContactType;
|
||||||
use Modules\Media\Models\MediaMapper;
|
use Modules\Media\Models\MediaMapper;
|
||||||
use Modules\Media\Models\MediaTypeMapper;
|
|
||||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||||
|
use Modules\Tag\Models\TagMapper;
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
use phpOMS\DataStorage\Database\Query\Builder;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
|
@ -79,12 +79,12 @@ final class SearchController extends Controller
|
||||||
->on(SupplierMapper::HAS_MANY['files']['table'] . '.' . SupplierMapper::HAS_MANY['files']['self'], '=', SupplierMapper::TABLE . '.' . SupplierMapper::PRIMARYFIELD)
|
->on(SupplierMapper::HAS_MANY['files']['table'] . '.' . SupplierMapper::HAS_MANY['files']['self'], '=', SupplierMapper::TABLE . '.' . SupplierMapper::PRIMARYFIELD)
|
||||||
->leftJoin(MediaMapper::TABLE)
|
->leftJoin(MediaMapper::TABLE)
|
||||||
->on(SupplierMapper::HAS_MANY['files']['table'] . '.' . SupplierMapper::HAS_MANY['files']['external'], '=', MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD)
|
->on(SupplierMapper::HAS_MANY['files']['table'] . '.' . SupplierMapper::HAS_MANY['files']['external'], '=', MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD)
|
||||||
->leftJoin(MediaMapper::HAS_MANY['types']['table'])
|
->leftJoin(MediaMapper::HAS_MANY['tags']['table'])
|
||||||
->on(MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD, '=', MediaMapper::HAS_MANY['types']['table'] . '.' . MediaMapper::HAS_MANY['types']['self'])
|
->on(MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD, '=', MediaMapper::HAS_MANY['tags']['table'] . '.' . MediaMapper::HAS_MANY['tags']['self'])
|
||||||
->leftJoin(MediaTypeMapper::TABLE)
|
->leftJoin(TagMapper::TABLE)
|
||||||
->on(MediaMapper::HAS_MANY['types']['table'] . '.' . MediaMapper::HAS_MANY['types']['external'], '=', MediaTypeMapper::TABLE . '.' . MediaTypeMapper::PRIMARYFIELD)
|
->on(MediaMapper::HAS_MANY['tags']['table'] . '.' . MediaMapper::HAS_MANY['tags']['external'], '=', TagMapper::TABLE . '.' . TagMapper::PRIMARYFIELD)
|
||||||
->where(SupplierMapper::HAS_MANY['files']['self'], '=', $account->id)
|
->where(SupplierMapper::HAS_MANY['files']['self'], '=', $account->id)
|
||||||
->where(MediaTypeMapper::TABLE . '.' . MediaTypeMapper::getColumnByMember('name'), '=', 'supplier_profile_image');
|
->where(TagMapper::TABLE . '.' . TagMapper::getColumnByMember('name'), '=', 'profile_image');
|
||||||
|
|
||||||
$image = MediaMapper::get()
|
$image = MediaMapper::get()
|
||||||
->where('id', $iResults)
|
->where('id', $iResults)
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ final class SupplierAttributeTypeMapper extends DataMapperFactory
|
||||||
'suppliermgmt_attr_type_datatype' => ['name' => 'suppliermgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
|
'suppliermgmt_attr_type_datatype' => ['name' => 'suppliermgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
|
||||||
'suppliermgmt_attr_type_fields' => ['name' => 'suppliermgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
|
'suppliermgmt_attr_type_fields' => ['name' => 'suppliermgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
|
||||||
'suppliermgmt_attr_type_custom' => ['name' => 'suppliermgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
|
'suppliermgmt_attr_type_custom' => ['name' => 'suppliermgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
|
||||||
'suppliermgmt_attr_type_repeatable' => ['name' => 'suppliermgmt_attr_type_repeatable', 'type' => 'bool', 'internal' => 'repeatable'],
|
'suppliermgmt_attr_type_repeatable' => ['name' => 'suppliermgmt_attr_type_repeatable', 'type' => 'bool', 'internal' => 'isRepeatable'],
|
||||||
'suppliermgmt_attr_type_internal' => ['name' => 'suppliermgmt_attr_type_internal', 'type' => 'bool', 'internal' => 'isInternal'],
|
'suppliermgmt_attr_type_internal' => ['name' => 'suppliermgmt_attr_type_internal', 'type' => 'bool', 'internal' => 'isInternal'],
|
||||||
'suppliermgmt_attr_type_pattern' => ['name' => 'suppliermgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
|
'suppliermgmt_attr_type_pattern' => ['name' => 'suppliermgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
|
||||||
'suppliermgmt_attr_type_required' => ['name' => 'suppliermgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
|
'suppliermgmt_attr_type_required' => ['name' => 'suppliermgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ return ['SupplierManagement' => [
|
||||||
'Account' => 'Konto',
|
'Account' => 'Konto',
|
||||||
'EarningIndicator' => 'Verkaufssteuerkennzeichen',
|
'EarningIndicator' => 'Verkaufssteuerkennzeichen',
|
||||||
'CostIndicator' => 'Einkaufssteuerkennzeichen',
|
'CostIndicator' => 'Einkaufssteuerkennzeichen',
|
||||||
'Zip' => 'Reißverschluss',
|
'Postal' => 'Reißverschluss',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
'Bills' => 'Rechnungen',
|
'Bills' => 'Rechnungen',
|
||||||
'ViewAccount' => 'Buchhaltung',
|
'ViewAccount' => 'Buchhaltung',
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ return ['SupplierManagement' => [
|
||||||
'CostIndicator' => 'Purchase tax code',
|
'CostIndicator' => 'Purchase tax code',
|
||||||
'Wire' => 'Wire',
|
'Wire' => 'Wire',
|
||||||
'YTDSales' => 'YTD Sales',
|
'YTDSales' => 'YTD Sales',
|
||||||
'Zip' => 'Zip',
|
'Postal' => 'Postal',
|
||||||
'SLV' => 'SLV',
|
'SLV' => 'SLV',
|
||||||
'Bill' => 'Bill',
|
'Bill' => 'Bill',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<label>
|
<label>
|
||||||
<i class="filter g-icon">filter_alt</i>
|
<i class="filter g-icon">filter_alt</i>
|
||||||
</label>
|
</label>
|
||||||
<td><?= $this->getHtml('Zip'); ?>
|
<td><?= $this->getHtml('Postal'); ?>
|
||||||
<label for="iPurchaseSupplierList-sort-7">
|
<label for="iPurchaseSupplierList-sort-7">
|
||||||
<input type="radio" name="iPurchaseSupplierList-sort" id="iPurchaseSupplierList-sort-7">
|
<input type="radio" name="iPurchaseSupplierList-sort" id="iPurchaseSupplierList-sort-7">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
|
|
@ -107,7 +107,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->number); ?></a>
|
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->number); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->account->name1); ?> <?= $this->printHtml($value->account->name2); ?></a>
|
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->account->name1); ?> <?= $this->printHtml($value->account->name2); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('City'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->mainAddress->city); ?></a>
|
<td data-label="<?= $this->getHtml('City'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->mainAddress->city); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Zip'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->mainAddress->postal); ?></a>
|
<td data-label="<?= $this->getHtml('Postal'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->mainAddress->postal); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Address'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->mainAddress->address); ?></a>
|
<td data-label="<?= $this->getHtml('Address'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->mainAddress->address); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Country'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->mainAddress->country); ?></a>
|
<td data-label="<?= $this->getHtml('Country'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->mainAddress->country); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
||||||
|
|
@ -359,7 +359,7 @@ echo $this->data['nav']->render();
|
||||||
foreach ($supplier->files as $file) :
|
foreach ($supplier->files as $file) :
|
||||||
++$count;
|
++$count;
|
||||||
$url = UriFactory::build('{/base}/media/view?{?}&id=' . $file->id);
|
$url = UriFactory::build('{/base}/media/view?{?}&id=' . $file->id);
|
||||||
$extensionType = FileUtils::getExtensionType($value->extension);
|
$extensionType = FileUtils::getExtensionType($file->extension);
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>"
|
<tr data-href="<?= $url; ?>"
|
||||||
<?= \in_array($extensionType, [ExtensionType::IMAGE, ExtensionType::PDF]) ? 'data-preview="' . UriFactory::build('{/api}media/export?id=' . $file->id . '&type=html&csrf={$CSRF}') . '"' : ''; ?>>
|
<?= \in_array($extensionType, [ExtensionType::IMAGE, ExtensionType::PDF]) ? 'data-preview="' . UriFactory::build('{/api}media/export?id=' . $file->id . '&type=html&csrf={$CSRF}') . '"' : ''; ?>>
|
||||||
|
|
@ -1144,7 +1144,7 @@ echo $this->data['nav']->render();
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Logs', 'Auditor'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head"><?= $this->getHtml('Logs', 'Auditor'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
<table class="default sticky">
|
<table class="default sticky">
|
||||||
|
|
@ -1197,7 +1197,7 @@ echo $this->data['nav']->render();
|
||||||
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
|
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Admin": "1.0.0",
|
"Admin": "1.0.0",
|
||||||
"Media": "1.0.0",
|
"Media": "1.0.0",
|
||||||
"Purchase": "1.0.0",
|
|
||||||
"Payment": "1.0.0",
|
"Payment": "1.0.0",
|
||||||
"Editor": "1.0.0"
|
"Editor": "1.0.0"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ trait ApiControllerSupplierTrait
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
$request->setData('name', '123456 backend');
|
$request->setData('name', '123456 backend');
|
||||||
$request->setData('supplier', 1);
|
$request->setData('supplier', 1);
|
||||||
$request->setData('type', '1');
|
$request->setData('tag', '1');
|
||||||
|
|
||||||
TestUtils::setMember($request, 'files', [
|
TestUtils::setMember($request, 'files', [
|
||||||
'file1' => [
|
'file1' => [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user