Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70e3289df5 | ||
|
|
b27b5d155e | ||
|
|
3b03a9e684 | ||
|
|
49c912cb45 | ||
|
|
5b6062f9be | ||
|
|
d9240e184d | ||
|
|
fc64ced7ea | ||
|
|
99bbbdca42 | ||
|
|
02bf9af08e | ||
|
|
bb3e18d7b4 | ||
|
|
032b03a6c9 | ||
|
|
ee4f7ab88a | ||
|
|
989974d556 | ||
|
|
6ff92c0900 | ||
|
|
b52354b1ad | ||
|
|
90de642685 | ||
|
|
b14c419f3f | ||
|
|
eff711a539 | ||
|
|
ff7f9160e4 | ||
|
|
3ef58b681f | ||
|
|
2a5f01004b | ||
|
|
b618ea78d4 | ||
|
|
161e6ea929 | ||
|
|
9eb590f7ba | ||
|
|
c4e0494417 | ||
|
|
c15fa08427 | ||
|
|
d937436f9e | ||
|
|
8e4b58b7cc | ||
|
|
d0ebab936a | ||
|
|
ba9307f01c | ||
|
|
298b88331b | ||
|
|
e7f01f7e10 | ||
|
|
ffd58bb196 | ||
|
|
0b5fa939d5 | ||
|
|
758328a8ef |
@@ -1,10 +1,27 @@
|
||||
# Xentral Installation
|
||||
# Xenomporio installation
|
||||
|
||||
1. aktuelle .tar.gz entpacken in einem Ordner
|
||||
2. per Browser auf auf Verzeichnis gehen
|
||||
3. setup durchfuehren (trotz Hinweis der Rechte (diese muessen passen) weiter klicken)
|
||||
4. Der Webserver-Pfad sollte dringend auf www gesetzte werden, sodass die
|
||||
Firmen kritischen Dateien auf keinen Fall durch eine fehlerhafte .htaccess
|
||||
Datei jemals online stehen (es geht primaer um den Ordner userdata und conf).
|
||||
## Place the installation files into a folder in /var/www/html/.
|
||||
|
||||
`cd /var/www/html`
|
||||
|
||||
e.g. Release 1.0:
|
||||
|
||||
`sudo wget https://github.com/xenomporio-org/Xenomporio/archive/refs/tags/V.1.0.zip`
|
||||
|
||||
`unzip V.1.0.zip`
|
||||
|
||||
## Set folder permissions:
|
||||
|
||||
`sudo chown www-data:www-data Xenomporio-V.1.0 -R`
|
||||
|
||||
## Fire up the setup page in a browser
|
||||
|
||||
http://yourserverip/Xenomporio-V.1.0 (watch out, its case sensitive)
|
||||
|
||||
<img src="doc/Install-10.png" width="800px">
|
||||
<img src="doc/Install-20.png" width="800px">
|
||||
<img src="doc/Install-30.png" width="800px">
|
||||
<img src="doc/Install-40.png" width="800px">
|
||||
<img src="doc/Install-50.png" width="800px">
|
||||
<img src="doc/Install-60.png" width="800px">
|
||||
<img src="doc/Install-done.png" width="800px">
|
||||
|
||||
@@ -13,4 +13,9 @@ Xenomporio ist eine umfassende webbasierte Anwendung zur Abwicklung aller kaufm
|
||||
* Aufgaben- und Terminverwaltung
|
||||
* Zeitabrechnung
|
||||
|
||||
|
||||
[Hier gehts zur Server Installation](SERVER_INSTALL.md)
|
||||
|
||||
[Hier gehts zur Xenomporio Installation](INSTALL.md)
|
||||
|
||||
Xenomporio ist freie Software, lizensiert unter AGPL 3 und basiert auf der Open Source Version von Xentral https://xentral.com/
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
# Server Install (Example for ubuntu-22.04-live-server-amd64.iso)
|
||||
|
||||
## Create new server instance
|
||||
e.g. 8 GB RAM, 128 GB hard drive, 4 CPUs.
|
||||
|
||||
## Install the operating system
|
||||
|
||||
(...)
|
||||
It is recommended install OpenSSH during install.
|
||||
|
||||
## Refresh the update system
|
||||
`sudo apt-get update`
|
||||
|
||||
## Install the webserver
|
||||
`sudo apt-get install apache2`
|
||||
|
||||
-> Test the webserver (http://IP_ADDRESS)
|
||||
|
||||
It should show the "Apache2 Default Page".
|
||||
|
||||
## Install PHP (8.1)
|
||||
`sudo apt-get install php libapache2-mod-php`
|
||||
|
||||
`php -v` should output:
|
||||
|
||||
```PHP 8.1.2 (cli) (built: Jun 13 2022 13:52:54) (NTS)
|
||||
Copyright (c) The PHP Group
|
||||
Zend Engine v4.1.2, Copyright (c) Zend Technologies
|
||||
with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies
|
||||
```
|
||||
|
||||
## Install PHP modules
|
||||
`sudo apt-get install php-mysql php-cli php-imap php-curl php-xml php-soap php-zip php-mbstring php-gd`
|
||||
|
||||
## Configure PHP
|
||||
|
||||
Add the following lines to `/etc/php/8.1/apache2/php.ini` and `/etc/php/8.1/cli/php.ini`:
|
||||
|
||||
```
|
||||
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,dl,highlight_file,show_source,proc_open,popen
|
||||
post_max_size = 100M
|
||||
upload_max_filesize = 100M
|
||||
|
||||
max_execution_time = 3600
|
||||
max_input_time = 3600
|
||||
magic_quotes_gpc = Off
|
||||
file_uploads = Yes (gesetzt: file_uploads = On)
|
||||
max_file_uploads = 20
|
||||
short_open_tag = On
|
||||
max_input_vars=3000
|
||||
memory_limit = 256M
|
||||
```
|
||||
|
||||
## Install additional zip
|
||||
`sudo apt-get install zip`
|
||||
|
||||
## Install mysql client
|
||||
`sudo apt-get install mysql-client`
|
||||
|
||||
## Install database server
|
||||
`sudo apt-get install mariadb-server`
|
||||
|
||||
## Configure database server
|
||||
`sudo mysql_secure_installation`
|
||||
```
|
||||
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
|
||||
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
|
||||
|
||||
In order to log into MariaDB to secure it, we'll need the current
|
||||
password for the root user. If you've just installed MariaDB, and
|
||||
haven't set the root password yet, you should just press enter here.
|
||||
|
||||
Enter current password for root (enter for none):
|
||||
OK, successfully used password, moving on...
|
||||
|
||||
Setting the root password or using the unix_socket ensures that nobody
|
||||
can log into the MariaDB root user without the proper authorisation.
|
||||
|
||||
You already have your root account protected, so you can safely answer 'n'.
|
||||
|
||||
Switch to unix_socket authentication [Y/n] n
|
||||
... skipping.
|
||||
|
||||
You already have your root account protected, so you can safely answer 'n'.
|
||||
|
||||
Change the root password? [Y/n] y
|
||||
New password:
|
||||
Re-enter new password:
|
||||
Password updated successfully!
|
||||
Reloading privilege tables..
|
||||
... Success!
|
||||
|
||||
|
||||
By default, a MariaDB installation has an anonymous user, allowing anyone
|
||||
to log into MariaDB without having to have a user account created for
|
||||
them. This is intended only for testing, and to make the installation
|
||||
go a bit smoother. You should remove them before moving into a
|
||||
production environment.
|
||||
|
||||
Remove anonymous users? [Y/n] y
|
||||
... Success!
|
||||
|
||||
Normally, root should only be allowed to connect from 'localhost'. This
|
||||
ensures that someone cannot guess at the root password from the network.
|
||||
|
||||
Disallow root login remotely? [Y/n] y
|
||||
... Success!
|
||||
|
||||
By default, MariaDB comes with a database named 'test' that anyone can
|
||||
access. This is also intended only for testing, and should be removed
|
||||
before moving into a production environment.
|
||||
|
||||
Remove test database and access to it? [Y/n] y
|
||||
- Dropping test database...
|
||||
... Success!
|
||||
- Removing privileges on test database...
|
||||
... Success!
|
||||
|
||||
Reloading the privilege tables will ensure that all changes made so far
|
||||
will take effect immediately.
|
||||
|
||||
Reload privilege tables now? [Y/n] y
|
||||
... Success!
|
||||
|
||||
Cleaning up...
|
||||
|
||||
All done! If you've completed all of the above steps, your MariaDB
|
||||
installation should now be secure.
|
||||
|
||||
Thanks for using MariaDB!
|
||||
```
|
||||
## Create database for xenomporio
|
||||
`mysql -u root -p`
|
||||
|
||||
```
|
||||
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
||||
Your MariaDB connection id is 41
|
||||
Server version: 10.6.7-MariaDB-2ubuntu1 Ubuntu 22.04
|
||||
|
||||
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
|
||||
|
||||
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
||||
|
||||
MariaDB [(none)]> CREATE DATABASE xenomporio;
|
||||
Query OK, 1 row affected (0.001 sec)
|
||||
|
||||
MariaDB [(none)]> CREATE USER 'xenomporio'@'localhost' IDENTIFIED BY 'enteryourpasswordhere';
|
||||
Query OK, 0 rows affected (0.015 sec)
|
||||
|
||||
MariaDB [(none)]> GRANT ALL PRIVILEGES ON xenomporio.* TO 'xenomporio'@'localhost' WITH GRANT OPTION;
|
||||
Query OK, 0 rows affected (0.012 sec)
|
||||
|
||||
MariaDB [(none)]> FLUSH PRIVILEGES;
|
||||
Query OK, 0 rows affected (0.002 sec)
|
||||
|
||||
MariaDB [(none)]> quit
|
||||
Bye
|
||||
|
||||
```
|
||||
|
||||
You can test your database like this:
|
||||
`mysql -u xenomporio -p`
|
||||
|
||||
```
|
||||
Enter password:
|
||||
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
||||
Your MariaDB connection id is 44
|
||||
Server version: 10.6.7-MariaDB-2ubuntu1 Ubuntu 22.04
|
||||
|
||||
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
|
||||
|
||||
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
||||
|
||||
MariaDB [(none)]> show databases;
|
||||
+--------------------+
|
||||
| Database |
|
||||
+--------------------+
|
||||
| information_schema |
|
||||
| xenomporio |
|
||||
+--------------------+
|
||||
2 rows in set (0.001 sec)
|
||||
|
||||
MariaDB [(none)]> quit
|
||||
Bye
|
||||
```
|
||||
## --> Reset your server
|
||||
|
||||
Continue with [Xenomporio Installation](INSTALL.md)
|
||||
@@ -12,7 +12,7 @@
|
||||
class Config
|
||||
{
|
||||
/** @var string */
|
||||
public $updateHost = 'update.xentral.biz';
|
||||
public $updateHost = 'removed.upgrade.host';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/*
|
||||
include(dirname(__FILE__)."/../conf/main.conf.php");
|
||||
include(dirname(__FILE__)."/../phpwf/plugins/class.mysql.php");
|
||||
include(dirname(__FILE__)."/../www/lib/imap.inc.php");
|
||||
include(dirname(__FILE__)."/../www/lib/class.erpapi.php");
|
||||
|
||||
class app_t {
|
||||
var $DB;
|
||||
var $user;
|
||||
}
|
||||
*/
|
||||
// ende debug
|
||||
|
||||
/*
|
||||
$debugfile = "/var/www/html/Xenomporio/debug.txt";
|
||||
|
||||
function file_append($filename,$text) {
|
||||
$oldtext = file_get_contents($filename);
|
||||
file_put_contents($filename,$oldtext.$text);
|
||||
}
|
||||
|
||||
file_put_contents($debugfile,"1");
|
||||
*/
|
||||
|
||||
if(empty($app)){
|
||||
$app = new app_t();
|
||||
}
|
||||
$DEBUG = 0;
|
||||
|
||||
if(empty($app->Conf)){
|
||||
$conf = new Config();
|
||||
$app->Conf = $conf;
|
||||
}
|
||||
if(empty($app->DB) || empty($app->DB->connection)){
|
||||
$app->DB = new DB($app->Conf->WFdbhost, $app->Conf->WFdbname, $app->Conf->WFdbuser, $app->Conf->WFdbpass, null, $app->Conf->WFdbport);
|
||||
}
|
||||
if(empty($app->erp)){
|
||||
if(class_exists('erpAPICustom')){
|
||||
$erp = new erpAPICustom($app);
|
||||
}else{
|
||||
$erp = new erpAPI($app);
|
||||
}
|
||||
$app->erp = $erp;
|
||||
}
|
||||
$app->String = new WawiString();
|
||||
if(class_exists('RemoteCustom'))
|
||||
{
|
||||
$app->remote = new RemoteCustom($app);
|
||||
}else{
|
||||
$app->remote = new Remote($app);
|
||||
}
|
||||
$app->Secure = new Secure($app);
|
||||
$app->User = new User($app);
|
||||
if(!defined('FPDF_FONTPATH'))
|
||||
{
|
||||
define('FPDF_FONTPATH',dirname(__DIR__) . '/www/lib/pdf/font/');
|
||||
}
|
||||
|
||||
$cronjobname = 'autoversand_manuell';
|
||||
|
||||
$mutex = $app->DB->Select(
|
||||
"SELECT MAX(`mutex`) FROM `prozessstarter` WHERE (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
if($mutex){
|
||||
$app->DB->Update(
|
||||
"UPDATE `prozessstarter`
|
||||
SET `mutexcounter`=`mutexcounter`+1
|
||||
WHERE `mutex` = 1 AND (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
|
||||
file_append($debugfile,"MUTEX");
|
||||
|
||||
return;
|
||||
}
|
||||
$app->DB->Update(
|
||||
"UPDATE `prozessstarter` SET `mutex`='1', `mutexcounter` = 0 WHERE (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
|
||||
// START APPLICATION
|
||||
|
||||
$objAuftrag = $app->loadModule('auftrag');
|
||||
if($objAuftrag == null || !method_exists($objAuftrag, 'AuftragVersand')) {
|
||||
$app->erp->LogFile($cronjobname." failed. Error while loading module 'auftrag'.");
|
||||
exit;
|
||||
}
|
||||
|
||||
$pendingorders = $app->DB->SelectArr(
|
||||
"SELECT id
|
||||
FROM auftrag AS a
|
||||
WHERE a.id!='' AND (a.belegnr!=0 OR a.belegnr!='')
|
||||
AND a.status='freigegeben' AND a.cronjobkommissionierung > 0"
|
||||
);
|
||||
|
||||
if (!is_null($pendingorders)) {
|
||||
|
||||
$processed_orders_num = 0;
|
||||
foreach ($pendingorders as $pendingorder) {
|
||||
/* Process each order */
|
||||
|
||||
if($objAuftrag->AuftragVersand($pendingorder['id'],true)) { // Ignore shipdate -> The order has been marked, send it
|
||||
$processed_orders_num++;
|
||||
} else {
|
||||
}
|
||||
// Limit to 10 per call
|
||||
if ($processed_orders_num > 10) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// END APPLICATION
|
||||
|
||||
$app->DB->Update("UPDATE prozessstarter SET mutex = 0 , mutexcounter = 0, letzteausfuerhung = now() WHERE (parameter = '".$cronjobname."' ) AND aktiv = 1");
|
||||
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Fetch all mails for accounts with ticket function
|
||||
* Create tickets or sort mails to existing tickets
|
||||
*/
|
||||
|
||||
use Xentral\Components\Logger\Logger;
|
||||
use Xentral\Components\MailClient\MailClientFactory;
|
||||
use Xentral\Modules\SystemMailClient\MailClientConfigProvider;
|
||||
use Xentral\Modules\SystemMailer\Service\EmailAccountGateway;
|
||||
use Xentral\Modules\Ticket\Importer\TicketFormatter;
|
||||
use Xentral\Modules\Ticket\Task\TicketImportHelperFactory;
|
||||
|
||||
$DEBUG = 0;
|
||||
|
||||
|
||||
$debugfile = "/var/www/html/Xenomporio/debug.txt";
|
||||
|
||||
function file_append($filename,$text) {
|
||||
$oldtext = file_get_contents($filename);
|
||||
file_put_contents($filename,$oldtext.$text);
|
||||
}
|
||||
|
||||
file_put_contents($debugfile,"0");
|
||||
|
||||
/** @var ApplicationCore $app */
|
||||
|
||||
$erp = $app->erp;
|
||||
$conf = $app->Conf;
|
||||
|
||||
/** @var Logger $logger */
|
||||
$logger = $app->Container->get('Logger');
|
||||
|
||||
$cronjobname = 'tickets';
|
||||
/*
|
||||
$mutex = $app->DB->Select(
|
||||
"SELECT MAX(`mutex`) FROM `prozessstarter` WHERE (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
if($mutex){
|
||||
$app->DB->Update(
|
||||
"UPDATE `prozessstarter`
|
||||
SET `mutexcounter`=`mutexcounter`+1
|
||||
WHERE `mutex` = 1 AND (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
|
||||
file_append($debugfile,"MUTEX");
|
||||
|
||||
return;
|
||||
}
|
||||
$app->DB->Update(
|
||||
"UPDATE `prozessstarter` SET `mutex`='1', `mutexcounter` = 0 WHERE (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
*/
|
||||
|
||||
// get all email Accounts that have the ticket system active
|
||||
/** @var EmailAccountGateway $accountGateway */
|
||||
$accountGateway = $app->Container->get('EmailAccountGateway');
|
||||
$accounts = $accountGateway->getAccountsWithTicketActive();
|
||||
|
||||
file_append($debugfile,"Accs:".count($accounts).";");
|
||||
|
||||
|
||||
// only load services if there is at least one account to import (performance)
|
||||
$ticketModule = null;
|
||||
$factory = null;
|
||||
$configProvider = null;
|
||||
$formatHelper = null;
|
||||
$importHelperFactory = null;
|
||||
if(!empty($accounts)){
|
||||
/** @var Ticket $ticketModule */
|
||||
$ticketModule = $app->erp->LoadModul('ticket');
|
||||
/** @var MailClientFactory $factory */
|
||||
$factory = $app->Container->get('MailClientFactory');
|
||||
/** @var MailClientConfigProvider $configProvider */
|
||||
$configProvider = $app->Container->get('MailClientConfigProvider');
|
||||
/** @var TicketFormatter $formatHelper */
|
||||
$formatHelper = $app->Container->get('TicketFormatter');
|
||||
/** @var TicketImportHelperFactory $importHelperFactory */
|
||||
$importHelperFactory = $app->Container->get('TicketImportHelperFactory');
|
||||
}
|
||||
|
||||
$totalEmailsImportCount = 0;
|
||||
foreach ($accounts as $account) {
|
||||
$logger->debug(
|
||||
'Start imap ticket import for {email}',
|
||||
['email' => $account->getEmailAddress(), 'account' => $account]
|
||||
);
|
||||
|
||||
file_append($debugfile,"Account ".$account->getemailAddress());
|
||||
|
||||
// create mail client
|
||||
try {
|
||||
$mailConfig = $configProvider->createImapConfigFromAccount($account);
|
||||
$mailClient = $factory->createImapClient($mailConfig);
|
||||
} catch (Exception $e) {
|
||||
$logger->error('Failed to create email client', ['error' => (string)$e, 'account' => $account]);
|
||||
|
||||
file_append($debugfile,"Failed 1");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
file_append($debugfile,"Connect to ".."SSL: ".$configProvider->isSslEnabled()." auth ".getAuthType()."\n");
|
||||
|
||||
// connect mail client
|
||||
try {
|
||||
try {
|
||||
$mailClient->connect();
|
||||
|
||||
file_append($debugfile,"Meh");
|
||||
|
||||
} catch (Exception $e) {
|
||||
$logger->error('Error during imap connection', ['error' => (string)$e, 'account' => $account]);
|
||||
|
||||
file_append($debugfile,"Error ".(string)$e);
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
file_append($debugfile,"2");
|
||||
|
||||
// connet to INBOX folder
|
||||
try {
|
||||
$mailClient->selectFolder('INBOX');
|
||||
} catch (Exception $e) {
|
||||
$logger->error('Failed to select INBOX folder', ['error' => (string)$e, 'account' => $account]);
|
||||
|
||||
|
||||
file_append($debugfile,"Failed 2");
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$projectId = $account->getProjectId() > 0 ? $account->getProjectId() : 1;
|
||||
$delete_msg = 0;
|
||||
$daysold = $account->getBackupDeleteAfterDays();
|
||||
|
||||
// determine search criteria for new messages
|
||||
$datet = '2012-12-24';
|
||||
if ($account->getImportStartDateAsString() !== '0000-00-00') {
|
||||
$datesince = date('d-M-Y', strtotime($account->getImportStartDateAsString()));
|
||||
$criteria = 'UNSEEN SINCE ' . $datesince;
|
||||
} else {
|
||||
$criteria = 'UNSEEN';
|
||||
}
|
||||
|
||||
file_append($debugfile,"3");
|
||||
|
||||
// search new messages
|
||||
try {
|
||||
$searchResult = $mailClient->searchMessages($criteria);
|
||||
} catch (Exception $e) {
|
||||
$logger->error('Error during imap search', ['exception' => $e]);
|
||||
|
||||
file_append($debugfile,"Failed 3");
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
$logger->debug('unread emails to import: {message_count}', ['message_count' => count($searchResult)]);
|
||||
|
||||
// set mutex if there is more than 5 emails to import
|
||||
if (count($searchResult) > 5) {
|
||||
$app->DB->Update(
|
||||
"UPDATE `prozessstarter`
|
||||
SET `mutex`=1, `mutexcounter` = 0, `letzteausfuerhung` = NOW()
|
||||
WHERE (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
}
|
||||
$importer = $importHelperFactory->create($mailClient, $account, $projectId);
|
||||
$insertedMailsCount = $importer->importMessages($searchResult);
|
||||
$totalEmailsImportCount += $insertedMailsCount;
|
||||
|
||||
// set mutex if the total amount of imported emails is more than 10
|
||||
if ($totalEmailsImportCount > 10) {
|
||||
$app->DB->Update(
|
||||
"UPDATE `prozessstarter`
|
||||
SET `mutex`=1, `mutexcounter` = 0, `letzteausfuerhung` = NOW()
|
||||
WHERE (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
}
|
||||
|
||||
$mailClient->expunge();
|
||||
$mailClient->disconnect();
|
||||
|
||||
if (
|
||||
method_exists($app->erp, 'canRunCronjob')
|
||||
&& !$app->erp->canRunCronjob(['supportmails', 'tickets'])
|
||||
) {
|
||||
|
||||
$logger->error('Tickets error');
|
||||
|
||||
file_append($debugfile,"Failed 5");
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
$app->DB->Update(
|
||||
"UPDATE `prozessstarter`
|
||||
SET `mutex`=1, `mutexcounter` = 0, `letzteausfuerhung` = NOW()
|
||||
WHERE (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
}
|
||||
|
||||
$app->DB->Update(
|
||||
"UPDATE `prozessstarter` SET `mutex`=0,`mutexcounter`=0 WHERE (`parameter` = '".$cronjobname."')"
|
||||
);
|
||||
|
||||
file_append($debugfile,"END");
|
||||
@@ -10365,7 +10365,7 @@ CREATE TABLE IF NOT EXISTS `proformarechnung_protokoll` (
|
||||
CREATE TABLE IF NOT EXISTS `projekt` (
|
||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||
`name` text NOT NULL,
|
||||
`abkuerzung` text NOT NULL,
|
||||
`abkuerzung` varchar(128) NOT NULL,
|
||||
`verantwortlicher` text NOT NULL,
|
||||
`beschreibung` text NOT NULL,
|
||||
`sonstiges` text NOT NULL,
|
||||
|
||||
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 147 KiB |
@@ -2089,7 +2089,7 @@ public function NavigationHooks(&$menu)
|
||||
// @refactor FileLock Komponente
|
||||
function ProzessUnlock($fp)
|
||||
{
|
||||
if(!$fp)return;
|
||||
if(gettype($fp) != 'resource') return;
|
||||
fflush($fp); // leere Ausgabepuffer bevor die Sperre frei gegeben wird
|
||||
flock($fp, LOCK_UN); // Gib Sperre frei
|
||||
fclose($fp);
|
||||
@@ -22154,19 +22154,17 @@ function Gegenkonto($ust_befreit,$ustid='', $doctype = '', $doctypeId = 0)
|
||||
function GetGeschaeftsBriefText($subjekt,$sprache='',$projekt='',$dokument='',$dokumentid=0)
|
||||
{
|
||||
|
||||
$dbcheck = $this->app->DB->Select("SHOW TABLES LIKE '$dokument'");
|
||||
|
||||
if ($dbcheck) {
|
||||
$abweichend = $this->app->DB->Select("SELECT abweichendebezeichnung FROM $dokument WHERE id='$dokumentid' LIMIT 1");
|
||||
$text = '';
|
||||
if ($dokument != '') {
|
||||
$dbcheck = $this->app->DB->Select("SHOW TABLES LIKE '$dokument'");
|
||||
if (!empty($dbcheck)) {
|
||||
$abweichend = $this->app->DB->Select("SELECT abweichendebezeichnung FROM $dokument WHERE id='$dokumentid' LIMIT 1");
|
||||
}
|
||||
if($abweichend>0 && !preg_match('/_Abweichend/',$subjekt))
|
||||
{
|
||||
$text = $this->GetGeschaeftsBriefText($subjekt."_Abweichend",$sprache,$projekt,$dokument,$dokumentid);
|
||||
}
|
||||
}
|
||||
if($abweichend>0 && !preg_match('/_Abweichend/',$subjekt))
|
||||
{
|
||||
$text = $this->GetGeschaeftsBriefText($subjekt."_Abweichend",$sprache,$projekt,$dokument,$dokumentid);
|
||||
}else{
|
||||
$text = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($text=='')
|
||||
{
|
||||
@@ -22200,14 +22198,16 @@ function Gegenkonto($ust_befreit,$ustid='', $doctype = '', $doctypeId = 0)
|
||||
function GetGeschaeftsBriefBetreff($subjekt,$sprache="",$projekt="",$dokument="",$dokumentid=0)
|
||||
{
|
||||
|
||||
$dbcheck = $this->app->DB->Select("SHOW TABLES LIKE '$dokument'");
|
||||
|
||||
if ($dbcheck) {
|
||||
$abweichend = $this->app->DB->Select("SELECT abweichendebezeichnung FROM $dokument WHERE id='$dokumentid' LIMIT 1");
|
||||
}
|
||||
if($abweichend>0 && !preg_match('/_Abweichend/',$subjekt))
|
||||
{
|
||||
$text = $this->GetGeschaeftsBriefBetreff($subjekt."_Abweichend",$sprache,$projekt,$dokument,$dokumentid);
|
||||
$text = '';
|
||||
if ($dokument != '') {
|
||||
$dbcheck = $this->app->DB->Select("SHOW TABLES LIKE '$dokument'");
|
||||
if ($dbcheck) {
|
||||
$abweichend = $this->app->DB->Select("SELECT abweichendebezeichnung FROM $dokument WHERE id='$dokumentid' LIMIT 1");
|
||||
}
|
||||
if($abweichend>0 && !preg_match('/_Abweichend/',$subjekt))
|
||||
{
|
||||
$text = $this->GetGeschaeftsBriefBetreff($subjekt."_Abweichend",$sprache,$projekt,$dokument,$dokumentid);
|
||||
}
|
||||
}
|
||||
|
||||
if($text=="")
|
||||
@@ -32659,7 +32659,6 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
||||
$sendmail_error
|
||||
);
|
||||
}
|
||||
|
||||
if($sysMailerSent === false) {
|
||||
$this->app->erp->LogFile("Mailer Error: " . $sendmail_error);
|
||||
$this->MailLogFile($from,$from_name,$to,$to_name,$betreff,$text,$files,$projekt,$signature,$cc,$bcc,$system);
|
||||
@@ -32673,7 +32672,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
||||
}
|
||||
// schreiben in post ausgang
|
||||
$this->MailLogFile($from,$from_name,$to,$to_name,$betreff,$text,$files,$projekt,$signature,$cc,$bcc,$system);
|
||||
$imap_aktiv = $this->app->DB->Select("SELECT imap_sentfolder_aktiv FROM emailbackup WHERE email='".$fromm."' AND imap_sentfolder!='' AND geloescht!=1 LIMIT 1");
|
||||
$imap_aktiv = $this->app->DB->Select("SELECT imap_sentfolder_aktiv FROM emailbackup WHERE email='".$from."' AND imap_sentfolder!='' AND geloescht!=1 LIMIT 1");
|
||||
if($imap_aktiv=="1" && !preg_match("/Xentral Kopie/",$to_name) && !preg_match("/WaWision Kopie/",$to_name))
|
||||
{
|
||||
$imap_data = $this->app->DB->SelectRow("SELECT * FROM emailbackup WHERE email='".$from."' AND geloescht!=1 LIMIT 1");
|
||||
@@ -32693,7 +32692,9 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
||||
$client = $clientProvider->createMailClientFromAccount($account);
|
||||
$client->connect();
|
||||
$client->appendMessage($imapCopyMessage, $account->getImapOutgoingFolder());
|
||||
} catch (Exception $e) {}
|
||||
} catch (Exception $e) {
|
||||
$this->app->erp->LogFile("Mailer Error: " . (string)$e);
|
||||
}
|
||||
|
||||
$this->app->erp->LogFile("IMAP Ausgang FROM ".$from." S $server P $port T $type SP $server_path B ".$imap_data['benutzername']." SF ".$imap_data['imap_sentfolder']);
|
||||
}
|
||||
@@ -33040,20 +33041,23 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
||||
if($field === 'mysql55') {
|
||||
return '1';
|
||||
}
|
||||
if(strpos($field,'next') !== false)
|
||||
|
||||
if(strpos($field,'next') != false)
|
||||
{
|
||||
$firmendatenid = (int)$this->app->DB->Select('SELECT MAX(id) FROM firmendaten LIMIT 1');
|
||||
|
||||
if ($this->app->DB->Select("SHOW COLUMNS FROM firmendaten LIKE '$field'")) {
|
||||
$firmendaten_value = $this->app->DB->Select(
|
||||
sprintf(
|
||||
'SELECT `%s` FROM firmendaten WHERE id = %d LIMIT 1',
|
||||
$field, $firmendatenid)
|
||||
);
|
||||
}
|
||||
if ($this->app->DB->Select("SHOW COLUMNS FROM firmendaten LIKE '$field'")) {
|
||||
$firmendaten_value = $this->app->DB->Select(
|
||||
sprintf(
|
||||
'SELECT `%s` FROM firmendaten WHERE id = %d LIMIT 1',
|
||||
$field, $firmendatenid)
|
||||
);
|
||||
}
|
||||
|
||||
if(!$this->app->DB->error()) {
|
||||
return $firmendaten_value;
|
||||
}
|
||||
|
||||
$firmendaten_value = $this->app->DB->SelectRow(
|
||||
sprintf('SELECT id, wert FROM firmendaten_werte WHERE `name` = \'%s\' LIMIT 1', $field)
|
||||
);
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-2">[TABTEXT2]</a></li>
|
||||
[VORTABS3UEBERSCHRIFT]<li><a href="#tabs-3">[TABTEXT3]</a></li>[NACHTABS3UEBERSCHRIFT]
|
||||
</ul>
|
||||
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||
[VORTABS2UEBERSCHRIFT]<li><a href="#tabs-2">[TABTEXT2]</a></li>[NACHTABS2UEBERSCHRIFT]
|
||||
</ul>
|
||||
|
||||
|
||||
<div id="tabs-2">
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
[AUTOVERSANDBERECHNEN]
|
||||
|
||||
<form action="#tabs-2" id="frmauto" name="frmauto" method="post">
|
||||
|
||||
<form action="#tabs-1" id="frmauto" name="frmauto" method="post">
|
||||
<div class="filter-box filter-usersave">
|
||||
<div class="filter-block filter-inline">
|
||||
<div class="filter-title">{|Filter|}</div>
|
||||
@@ -34,13 +32,12 @@
|
||||
<input type="checkbox" id="auftrag_lieferdatum">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="auftrag_lieferdatum">{|nur Aufträge mit zukünftigem Lieferdatum|}</label>
|
||||
<label for="auftrag_lieferdatum">{|inkl. Aufträge mit zukünftigem Lieferdatum|}</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
[TAB2]
|
||||
[TAB1]
|
||||
<fieldset>
|
||||
<legend>Stapelverarbeitung</legend>
|
||||
<input type="checkbox" value="1" id="autoalle" checked="checked" /> alle markieren
|
||||
@@ -59,32 +56,17 @@
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div id="tabs-3">
|
||||
[VORTABS3UEBERSCHRIFT]
|
||||
<form action="#tabs-3" method="post">
|
||||
|
||||
<div class="filter-box filter-usersave">
|
||||
<div class="filter-block filter-inline">
|
||||
<div class="filter-title">{|Filter|}</div>
|
||||
<ul class="filter-list">
|
||||
<li class="filter-item">
|
||||
<label for="autoallewartend" class="switch">
|
||||
<input type="checkbox" value="1" id="autoallewartend" checked="checked" />
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="autoallewartend">{|Alle|}</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
[TAB3]
|
||||
<table width="100%"><tr><td><input type="submit" value="Aufträge aus Liste entfernen" name="entfernen"></td>
|
||||
<div id="tabs-2">
|
||||
[VORTABS2UEBERSCHRIFT]
|
||||
<form action="#tabs-2" method="post">
|
||||
[TAB2]
|
||||
<table width="100%"><tr><td><input type="submit" value="Gewählte Aufträge zurücksetzen" name="entfernen"></td>
|
||||
</tr></table>
|
||||
</form>
|
||||
[NACHTABS3UEBERSCHRIFT]
|
||||
[NACHTABS2UEBERSCHRIFT]
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ document.onkeydown = function(evt) {
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">{|Aufträge|}</a></li>
|
||||
<li><a href="#tabs-5">{|in Bearbeitung|}</a></li>
|
||||
<li><a href="#tabs-5">{|in Bearbeitung|}[TABTEXT5]</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
|
||||
@@ -113,10 +113,6 @@ document.onkeydown = function(evt) {
|
||||
<div id="tabs-5">
|
||||
[TAB5]
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div id="lagermehrpopup" style="display:none;">
|
||||
<div id="lagermehrpopupinhalt">
|
||||
|
||||
@@ -283,8 +283,8 @@ $width = array('10%'); // Fill out manually later
|
||||
$result[0]['email'],
|
||||
$result[0]['angezeigtername'],
|
||||
'Xenomporio ERP: Testmail',
|
||||
'Dies ist eine Testmail',
|
||||
'',0,true,'','',
|
||||
'Dies ist eine Testmail für Account "'.$result[0]['email'].'".',
|
||||
'',0,false,'','',
|
||||
true
|
||||
)
|
||||
) {
|
||||
@@ -294,7 +294,7 @@ $width = array('10%'); // Fill out manually later
|
||||
}
|
||||
else {
|
||||
$msg = $this->app->erp->base64_url_encode(
|
||||
'<div class="error">Die Testmail wurde nicht versendet: '.$this->app->erp->mail_error.'</div>'
|
||||
'<div class="error">Fehler beim Versende der Testmail: '.$this->app->erp->mail_error.'</div>'
|
||||
);
|
||||
}
|
||||
$this->app->Location->execute("index.php?module=emailbackup&id=$id&action=edit&msg=$msg");
|
||||
|
||||
@@ -480,7 +480,7 @@ class Firmendaten {
|
||||
}
|
||||
else {
|
||||
$msg = $this->app->erp->base64_url_encode(
|
||||
'<div class="error">Die Testmail wurde nicht versendet: '.$this->app->erp->mail_error.'</div>'
|
||||
'<div class="error">Fehler beim Versenden der Testmail: '.$this->app->erp->mail_error.'</div>'
|
||||
);
|
||||
}
|
||||
$this->app->Location->execute("index.php?module=firmendaten&action=edit&msg=$msg#tabs-4");
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
|
||||
<div id="tabs-3">
|
||||
<div class="row">
|
||||
<!-- <div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-sm-height">
|
||||
<div class="inside_white inside-full-height">
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
@@ -148,7 +148,7 @@
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-sm-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<fieldset disabled>
|
||||
<legend>{|Stufe 2 (Pack) an Versandstation|}</legend>
|
||||
<table border="0" width="100%" class="mkTable">
|
||||
<tr><td width="300"></td><td>{|Drucker|}</td><td width="30%">{|Anzahl Exemplare|}</td><td width="30%">{|E-Mail|}</td></tr>
|
||||
|
||||
@@ -19,7 +19,12 @@ class WidgetProjekt extends WidgetGenProjekt
|
||||
$id = $this->app->Secure->GetGET("id");
|
||||
$kommissionierverfahren = array(
|
||||
'rechnungsmail'=>'Ohne Lagerbuchung',
|
||||
'lieferschein'=>'Einfache Lagerbuchung ohne weiteren Prozess');
|
||||
'lieferschein'=>'Einfache Lagerbuchung ohne weiteren Prozess'
|
||||
// 'lieferscheinscan'=>'Lieferscheinscan',
|
||||
// 'lieferscheinlagerscan'=>'Lieferscheinlagerscan',
|
||||
// 'lieferscheinlager'=>'Lieferscheinlager',
|
||||
// 'zweistufig'=>'Zweistufig'
|
||||
);
|
||||
$field = new HTMLSelect("kommissionierverfahren",0);
|
||||
$field->AddOptionsAsocSimpleArray($kommissionierverfahren);
|
||||
$this->form->NewField($field);
|
||||
|
||||