Test fixes
Some checks failed
Image optimization / general_image_workflow (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled
CI / general_module_workflow_js (push) Has been cancelled

This commit is contained in:
Dennis Eichhorn 2024-05-16 02:14:54 +00:00
parent 14c7490f51
commit 0812a2cb1b
19 changed files with 25 additions and 180 deletions

View File

@ -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

View File

@ -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 */

View File

@ -1,5 +0,0 @@
# Structure
## ER
![ER](Modules/ClientManagement/Docs/Dev/img/er.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

View File

@ -1,3 +0,0 @@
# User Content
* [Attributes]({%}&page=Help/attributes)

View File

@ -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 | |

View File

@ -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)

View File

@ -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

View File

@ -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.

View File

@ -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;

View File

@ -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'],

View File

@ -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',
]];

View File

@ -13,8 +13,8 @@
declare(strict_types=1);
return ['Navigation' => [
'Client' => 'Client',
'Region' => 'Region',
'SalesRep' => 'SalesRep',
'Client' => 'Client',
'Region' => 'Region',
'SalesRep' => 'SalesRep',
'Attributes' => 'Attributes',
]];

View File

@ -92,7 +92,6 @@ return ['ClientManagement' => [
'Website' => 'Webseite',
'Wire' => 'Kabel',
'YTDSales' => 'Ytd Sales',
'Postal' => 'Postleitzahl',
'ItemProductGroup' => 'Artikel Produktgruppe',
'Promocode' => 'Promocode',
'Region' => 'Region',

View File

@ -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',

View File

@ -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);
?>
<tr data-href="<?= $url; ?>"

View File

@ -12,7 +12,7 @@
},
"creator": {
"name": "Jingga",
"website": "jingga.app"
"website": "https://jingga.app"
},
"directory": "ClientManagement",
"dependencies": {