fix templates

This commit is contained in:
Dennis Eichhorn 2024-04-17 17:45:07 +00:00
parent d8d99d4fa1
commit f29e93b349
4 changed files with 6 additions and 118 deletions

View File

@ -213,21 +213,6 @@
"children": []
}
]
},
{
"id": 1004805201,
"pid": "/sales/item",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/base}/sales/item/create",
"target": "self",
"icon": null,
"order": 5,
"from": "ItemManagement",
"permission": { "permission": 4, "category": null, "element": null },
"parent": 1004805001,
"children": []
}
]
},
@ -275,21 +260,6 @@
"children": []
}
]
},
{
"id": 1004806201,
"pid": "/purchase/item",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/base}/purchase/item/create",
"target": "self",
"icon": null,
"order": 5,
"from": "ItemManagement",
"permission": { "permission": 4, "category": null, "element": null },
"parent": 1004806001,
"children": []
}
]
},
@ -337,21 +307,6 @@
"children": []
}
]
},
{
"id": 1004807201,
"pid": "/warehouse/item",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/base}/warehouse/item/create",
"target": "self",
"icon": null,
"order": 5,
"from": "ItemManagement",
"permission": { "permission": 4, "category": null, "element": null },
"parent": 1004807001,
"children": []
}
]
},
@ -399,21 +354,6 @@
"children": []
}
]
},
{
"id": 1004808201,
"pid": "/production/item",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/base}/production/item/create",
"target": "self",
"icon": null,
"order": 5,
"from": "ItemManagement",
"permission": { "permission": 4, "category": null, "element": null },
"parent": 1004807001,
"children": []
}
]
},

View File

@ -127,18 +127,6 @@ return [
],
],
],
'^/sales/item/create(\?.*$|$)' => [
[
'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementSalesCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::SALES_ITEM,
],
],
],
'^/sales/item/view(\?.*$|$)' => [
[
'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementSalesItem',
@ -164,18 +152,6 @@ return [
],
],
],
'^/purchase/item/create(\?.*$|$)' => [
[
'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementPurchaseCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::PURCHASE_ITEM,
],
],
],
'^/purchase/item/view(\?.*$|$)' => [
[
'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementPurchaseItem',
@ -201,18 +177,6 @@ return [
],
],
],
'.*/warehouse/item/create(\?.*$|$)' => [
[
'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementWarehousingCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::STOCK_ITEM,
],
],
],
'^/warehouse/item/view(\?.*$|$)' => [
[
'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementWarehouseItem',
@ -250,18 +214,6 @@ return [
],
],
],
'^/production/item/create(\?.*$|$)' => [
[
'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementProductionCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::SALES_ITEM,
],
],
],
'^/production/item/view(\?.*$|$)' => [
[
'dest' => '\Modules\ItemManagement\Controller\BackendController:viewItemManagementProductionItem',

View File

@ -185,7 +185,7 @@ final class BackendController extends Controller
->where('l11n/language', $response->header->l11n->language)
->where('l11n/type/title', ['name1', 'name2'], 'IN')
->where('files/types/name', 'item_profile_image')
->where('unit', $this->app->unitId)
->where('unit', [$this->app->unitId, null])
->limit(50)
->executeGetArray();
@ -503,9 +503,7 @@ final class BackendController extends Controller
'sales_tax_code', 'purchase_tax_code',
//'has_inventory', 'inventory_identifier', 'stocktaking_type',
], 'IN')
->where('defaults/l11n', (new Where($this->app->dbPool->get()))
->where(ItemAttributeValueL11nMapper::getColumnByMember('ref') ?? '', '=', null)
->orWhere(ItemAttributeValueL11nMapper::getColumnByMember('language') ?? '', '=', $response->header->l11n->language))
->where('defaults/l11n/language', [$response->header->l11n->language, null])
->executeGetArray();
$defaultAttributeTypes = [];
@ -520,9 +518,7 @@ final class BackendController extends Controller
->with('defaults')
->with('defaults/l11n')
->where('name', ['segment', 'section', 'client_group', 'client_type'], 'IN')
->where('defaults/l11n', (new Where($this->app->dbPool->get()))
->where(ClientAttributeValueL11nMapper::getColumnByMember('ref') ?? '', '=', null)
->orWhere(ClientAttributeValueL11nMapper::getColumnByMember('language') ?? '', '=', $response->header->l11n->language))
->where('defaults/l11n/language', [$response->header->l11n->language, null])
->executeGetArray();
$clientSegmentationTypes = [];

View File

@ -23,13 +23,13 @@ $isNew = $type->id === 0;
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<section class="portlet">
<form id="materialForm" method="<?= $isNew ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}item/material?csrf={$CSRF}'); ?>">
<div class="portlet-head"><?= $this->getHtml('Material'); ?></div>
<div class="portlet-body">
<div class="form-group">
<label for="iName"><?= $this->getHtml('Name'); ?></label>
<input type="text" name="code" id="iName" value="<?= $this->printHtml($type->title); ?>">
<input type="text" name="name" id="iName" value="<?= $this->printHtml($type->title); ?>">
</div>
</div>
@ -42,7 +42,7 @@ echo $this->data['nav']->render(); ?>
<?php endif; ?>
</div>
</form>
</div>
</section>
</div>
</div>