diff --git a/Admin/Install/db.json b/Admin/Install/db.json index c2e413f..2aeaab4 100755 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -226,13 +226,13 @@ "null": false }, "clientmgmt_attr_type_required": { - "description": "Every item must have this attribute type if set to true.", + "comment": "Every item must have this attribute type if set to true.", "name": "clientmgmt_attr_type_required", "type": "TINYINT(1)", "null": false }, "clientmgmt_attr_type_pattern": { - "description": "This is a regex validation pattern.", + "comment": "This is a regex validation pattern.", "name": "clientmgmt_attr_type_pattern", "type": "VARCHAR(255)", "null": false diff --git a/Admin/Installer.php b/Admin/Installer.php index 3b23edc..a8f318e 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -215,6 +215,10 @@ final class Installer extends InstallerAbstract $module = $app->moduleManager->get('ClientManagement', 'ApiAttribute'); foreach ($attributes as $attribute) { + if (!isset($attribute['values'])) { + continue; + } + $clientAttrValue[$attribute['name']] = []; /** @var array $value */ diff --git a/Docs/Dev/en/structure.md b/Docs/Dev/en/structure.md deleted file mode 100755 index 24f79ab..0000000 --- a/Docs/Dev/en/structure.md +++ /dev/null @@ -1,5 +0,0 @@ -# Structure - -## ER - -![ER](Modules/ClientManagement/Docs/Dev/img/er.png) \ No newline at end of file diff --git a/Docs/Dev/img/er.png b/Docs/Dev/img/er.png deleted file mode 100644 index b4b4986..0000000 Binary files a/Docs/Dev/img/er.png and /dev/null differ diff --git a/Docs/Help/de/SUMMARY.md b/Docs/Help/de/SUMMARY.md deleted file mode 100644 index bcbe68d..0000000 --- a/Docs/Help/de/SUMMARY.md +++ /dev/null @@ -1,3 +0,0 @@ -# User Content - -* [Attributes]({%}&page=Help/attributes) diff --git a/Docs/Help/de/accounting.md b/Docs/Help/de/accounting.md deleted file mode 100644 index e69de29..0000000 diff --git a/Docs/Help/de/attributes.md b/Docs/Help/de/attributes.md deleted file mode 100644 index 61eb812..0000000 --- a/Docs/Help/de/attributes.md +++ /dev/null @@ -1,59 +0,0 @@ -# Attributes - -## Default - -The module automatically installs the following default attributes which can be set in the attribute tab in the respective client. - -### General - -| Attribute | Description | Internal default value | -| --------- | ----------- | ---------------------- | -| abc_class | Custom client rating | | -| support_emails | Send email for support ticket changes | yes | -| support_email_address | Email address for support tickets | Account email | -| legal_form | Client legal form | | - -### Categories - -Clients can be put in categories for horizontal and vertical grouping. By default the system uses segment->section->client_group as categories as well as client_type. These categories also get used by other modules. Additional groups can be defined but are not used by other modules by default. - -| Attribute | Description | Internal default value | -| --------- | ----------- | ---------------------- | -| segment | Level 1 | 1 | -| section | Level 2 | 1 | -| client_group | Level 3 | 1 | -| client_type | **NOT** hierarchically. | 1 | -| client_area | **NOT** hierarchically. Area a client belongs to. Useful for grouping customers based on location or sales rep. | | - -| Level | > | > | > | > | > | > | Sample | -| :---: | :-----------------: | :-: | :-----------------: | :-: | :-----------------: | :-----------------: | :----------------: | -| 1 | > | > | > | > | Segment 1 | > | Segment 2 | -| 2 | > | > | Section 1.1 | > | Section 1.2 | > | Section 2.1 | -| 3 | Client Group 1.1.1 | > | Client Group 1.1.2 | > | Client Group 1.2.1 | Client Group 2.1.1 | Client Group 2.1.2 | - -> You could consider the client (number) itself `Level 4`. - -### Billing - -| Attribute | Description | Internal default value | -| --------- | ----------- | ---------------------- | -| bill_emails | Should bills get emailed to the customer | yes | -| bill_email_address | Email address used for sending bill via email | account email | -| bill_language | Language of the bill | Account language -> default bill language | -| bill_currency | Currency of the bill. Coming soon. | | - -### Purchase & Stock - -| Attribute | Description | Internal default value | -| --------- | ----------- | ---------------------- | -| minimum_order | Minimum order amount required from customer | | - -### Accounting - -| Attribute | Description | Internal default value | -| --------- | ----------- | ---------------------- | -| sales_tax_code | Tax code for sales | | -| vat_id | VAT id for european customers | | -| tax_id | Tax id for local tax id | | -| line_of_credit | Maximum amount allowed to be purchased taking unpaid invoices into account | | -| credit_rating | Credit rating | | \ No newline at end of file diff --git a/Docs/Help/de/introduction.md b/Docs/Help/de/introduction.md deleted file mode 100644 index 14e6a9e..0000000 --- a/Docs/Help/de/introduction.md +++ /dev/null @@ -1,54 +0,0 @@ -# Introduction - -The **Item Management** module is an essential module for any ERP application. This module handles basic item management and is deeply integrated into **Billing** and **Warehouse Management**. - -## Target Group - -The target group for this module is anyone who wants to manage their tangible and non-tangible products. - -# Setup - -This module doesn't have any additional setup requirements and can be simply installed through the module interface. - -# Features - -## Item master file - -The module provides basic item data management - -* Attach documents to items -* Write notes for items -* Overview of most recent notes, documents, invoices and sales statistics (requires **Billing**) - -## Localization - -Localizations allow you to define item names and descriptions in multiple languages. You can also define custom text elements for external use (e.g. descriptions to be exported to other systems such as your own shop system). - -## Attributes - -Attributes allow you to define various item characteristics such as color, medical device class, segmentation, hazardous good, brand, model and many more. - -## Pricing - -By installing the **Billing** module you are can define multiple purchase and sales prices. Prices and discounts can be defined for individual items, customers and suppliers and for customer groups. You may also define quantity based prices. - -## Procurement - -Together with the **Purchase** module you can define stock levels, order conditions and delivery times for automated order suggestion calculations making it a breeze to ensure sufficient stocks. - -## Accounting - -Together with the **Accounting** module you can define cost center, cost object and taxes for every item. - -## Stock - -Together with the **Warehouse Management** module you can also track your stocks and - -# Recommendation - -Other modules that work great with this one together are: - -* [Warehouse Management](WarehouseManagement) -* [Supplier Management](SupplierManagement) -* [Purchase](Purchase) -* [Accounting](Accounting) diff --git a/Docs/Help/de/localization.md b/Docs/Help/de/localization.md deleted file mode 100644 index 94aa062..0000000 --- a/Docs/Help/de/localization.md +++ /dev/null @@ -1,14 +0,0 @@ -# Localization - -## Default - -The module automatically installs the following default localizations which can be set in the localization tab in the respective item. - -* name1 - Primary item name -* name2 - Secondary item name -* info - Internal item info -* internal_matchcodes - Match code for finding item based on a specific name or short description -* description_short - Short item description -* description_long - Long item description -* shop_name1 - Primary item name for a shop system -* shop_name2 - Secondary item name for a shop system \ No newline at end of file diff --git a/Docs/Help/de/pricing.md b/Docs/Help/de/pricing.md deleted file mode 100644 index e69de29..0000000 diff --git a/Docs/Help/en/introduction.md b/Docs/Help/en/introduction.md index 14e6a9e..6f29d88 100644 --- a/Docs/Help/en/introduction.md +++ b/Docs/Help/en/introduction.md @@ -1,10 +1,10 @@ # Introduction -The **Item Management** module is an essential module for any ERP application. This module handles basic item management and is deeply integrated into **Billing** and **Warehouse Management**. +The **Client Management** module is an essential module for any ERP application. This module handles basic customer management and is deeply integrated into the **Billing** Modules. ## Target Group -The target group for this module is anyone who wants to manage their tangible and non-tangible products. +The target group for this module is the sales department for managing their customers. # Setup @@ -12,43 +12,22 @@ This module doesn't have any additional setup requirements and can be simply ins # Features -## Item master file +## Client master file -The module provides basic item data management +The module provides basic client data management -* Attach documents to items -* Write notes for items +* Attach documents to clients +* Write notes for clients * Overview of most recent notes, documents, invoices and sales statistics (requires **Billing**) -## Localization - -Localizations allow you to define item names and descriptions in multiple languages. You can also define custom text elements for external use (e.g. descriptions to be exported to other systems such as your own shop system). - ## Attributes Attributes allow you to define various item characteristics such as color, medical device class, segmentation, hazardous good, brand, model and many more. ## Pricing -By installing the **Billing** module you are can define multiple purchase and sales prices. Prices and discounts can be defined for individual items, customers and suppliers and for customer groups. You may also define quantity based prices. +By installing the **Billing** module you can define multiple purchase and sales prices. Prices and discounts can be defined for individual items, customers and suppliers and for customer groups. You may also define quantity based prices. -## Procurement +## Finance -Together with the **Purchase** module you can define stock levels, order conditions and delivery times for automated order suggestion calculations making it a breeze to ensure sufficient stocks. - -## Accounting - -Together with the **Accounting** module you can define cost center, cost object and taxes for every item. - -## Stock - -Together with the **Warehouse Management** module you can also track your stocks and - -# Recommendation - -Other modules that work great with this one together are: - -* [Warehouse Management](WarehouseManagement) -* [Supplier Management](SupplierManagement) -* [Purchase](Purchase) -* [Accounting](Accounting) +Together with the **Finance** module you can define the taxes for each customer. diff --git a/Models/Client.php b/Models/Client.php index 14aafea..62088e4 100755 --- a/Models/Client.php +++ b/Models/Client.php @@ -17,7 +17,6 @@ namespace Modules\ClientManagement\Models; use Modules\Admin\Models\Account; use Modules\Editor\Models\EditorDoc; use Modules\Payment\Models\Payment; -use Modules\Profile\Models\Profile; use Modules\Sales\Models\SalesRep; use phpOMS\Stdlib\Base\Address; use phpOMS\Stdlib\Base\NullAddress; diff --git a/Models/ClientMapper.php b/Models/ClientMapper.php index 42cbe67..02df117 100755 --- a/Models/ClientMapper.php +++ b/Models/ClientMapper.php @@ -49,7 +49,7 @@ final class ClientMapper extends DataMapperFactory 'clientmgmt_client_status' => ['name' => 'clientmgmt_client_status', 'type' => 'int', 'internal' => 'status'], 'clientmgmt_client_type' => ['name' => 'clientmgmt_client_type', 'type' => 'int', 'internal' => 'type'], 'clientmgmt_client_info' => ['name' => 'clientmgmt_client_info', 'type' => 'string', 'internal' => 'info'], - 'clientmgmt_client_rep' => ['name' => 'clientmgmt_client_rep', 'type' => 'int', 'internal' => 'rep'], + 'clientmgmt_client_rep' => ['name' => 'clientmgmt_client_rep', 'type' => 'int', 'internal' => 'rep'], 'clientmgmt_client_created_at' => ['name' => 'clientmgmt_client_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], 'clientmgmt_client_account' => ['name' => 'clientmgmt_client_account', 'type' => 'int', 'internal' => 'account'], 'clientmgmt_client_address' => ['name' => 'clientmgmt_client_address', 'type' => 'int', 'internal' => 'mainAddress'], diff --git a/Theme/Backend/Lang/Navigation.de.lang.php b/Theme/Backend/Lang/Navigation.de.lang.php index c6ca394..3112d30 100755 --- a/Theme/Backend/Lang/Navigation.de.lang.php +++ b/Theme/Backend/Lang/Navigation.de.lang.php @@ -13,8 +13,8 @@ declare(strict_types=1); return ['Navigation' => [ - 'Client' => 'Kunde', - 'Region' => 'Region', - 'SalesRep' => 'Verkäufer', + 'Client' => 'Kunde', + 'Region' => 'Region', + 'SalesRep' => 'Verkäufer', 'Attributes' => 'Attribute', ]]; diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index b8d8076..03d1fd0 100755 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -13,8 +13,8 @@ declare(strict_types=1); return ['Navigation' => [ - 'Client' => 'Client', - 'Region' => 'Region', - 'SalesRep' => 'SalesRep', + 'Client' => 'Client', + 'Region' => 'Region', + 'SalesRep' => 'SalesRep', 'Attributes' => 'Attributes', ]]; diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index 0759bac..ad285f9 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -92,7 +92,6 @@ return ['ClientManagement' => [ 'Website' => 'Webseite', 'Wire' => 'Kabel', 'YTDSales' => 'Ytd Sales', - 'Postal' => 'Postleitzahl', 'ItemProductGroup' => 'Artikel Produktgruppe', 'Promocode' => 'Promocode', 'Region' => 'Region', diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 6a3b279..9ae465a 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -72,7 +72,6 @@ return ['ClientManagement' => [ 'Payment' => 'Payment', 'PaymentTerm' => 'Payment Term', 'Phone' => 'Phone', - 'Postal' => 'Postal', 'Price' => 'Price', 'Prices' => 'Prices', 'Productgroup' => 'Product group', @@ -91,7 +90,7 @@ return ['ClientManagement' => [ 'Website' => 'Website', 'Wire' => 'Wire', 'YTDSales' => 'YTD Sales', - 'Postal' => 'Postal', + 'Postal' => 'Postal', 'ItemProductGroup' => 'Item Product Group', 'Promocode' => 'Promocode', 'Region' => 'Region', diff --git a/Theme/Backend/client-view.tpl.php b/Theme/Backend/client-view.tpl.php index cb835b2..99b0a0a 100644 --- a/Theme/Backend/client-view.tpl.php +++ b/Theme/Backend/client-view.tpl.php @@ -362,7 +362,7 @@ echo $this->data['nav']->render(); $count = 0; foreach ($client->files as $file) : ++$count; - $url = UriFactory::build('{/base}/media/view?{?}&id=' . $file->id); + $url = UriFactory::build('{/base}/media/view?{?}&id=' . $file->id); $extensionType = FileUtils::getExtensionType($file->extension); ?>