Compare commits
172
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74aeb90758 | ||
|
|
7c4c9e64d6 | ||
|
|
6695369af7 | ||
|
|
fdafc13e2c | ||
|
|
bd0392698d | ||
|
|
dc58045423 | ||
|
|
a9f3292f8f | ||
|
|
ac723e9fda | ||
|
|
5408f197fd | ||
|
|
c0a9156f0e | ||
|
|
fd0a5a5d4c | ||
|
|
1daf876976 | ||
|
|
7a29151bdd | ||
|
|
623b041a5f | ||
|
|
6242024451 | ||
|
|
0262c31e93 | ||
|
|
5557c54fd6 | ||
|
|
7df897d9d7 | ||
|
|
1a94af6b0b | ||
|
|
fa4125d63b | ||
|
|
ac0048c788 | ||
|
|
f430b7f5ac | ||
|
|
83e739d378 | ||
|
|
a32c201a91 | ||
|
|
cb2b75a3ca | ||
|
|
1f27f9a5f5 | ||
|
|
81e2cdb222 | ||
|
|
5b49171a74 | ||
|
|
869c888947 | ||
|
|
322ca715eb | ||
|
|
ab4e9f001e | ||
|
|
51b70aed0d | ||
|
|
08579804a8 | ||
|
|
64241842f6 | ||
|
|
f5c61ca6eb | ||
|
|
aa32bd1276 | ||
|
|
e6960f0030 | ||
|
|
b02da95c2f | ||
|
|
9994f8c18d | ||
|
|
ce5f359a75 | ||
|
|
57e398e7d4 | ||
|
|
ca5e5c52a1 | ||
|
|
6f5272717f | ||
|
|
2eabd85b91 | ||
|
|
1be7ba66ee | ||
|
|
56e743334a | ||
|
|
e125a29fa9 | ||
|
|
63a99b1a6e | ||
|
|
1ea3d3a175 | ||
|
|
fcb9b0aeb7 | ||
|
|
53bb9fcdf9 | ||
|
|
2b2f84a020 | ||
|
|
f3587501f2 | ||
|
|
4b40c27c84 | ||
|
|
265d815534 | ||
|
|
7c17b2aed9 | ||
|
|
174909c178 | ||
|
|
b8cfa9efbb | ||
|
|
5da0490260 | ||
|
|
9fbd0eb85a | ||
|
|
1c1c7034f1 | ||
|
|
2c7f113d6b | ||
|
|
1f6caa8632 | ||
|
|
73725a31bb | ||
|
|
06686a6020 | ||
|
|
1e04647dae | ||
|
|
62cca6fe3c | ||
|
|
bf10c0d807 | ||
|
|
d9ff872a98 | ||
|
|
05699986eb | ||
|
|
dcedcec0f2 | ||
|
|
6fc74f1bf3 | ||
|
|
33b5c1e171 | ||
|
|
3f7cf88d99 | ||
|
|
1ebaa24473 | ||
|
|
5ca3a7297b | ||
|
|
88e1e2ebc2 | ||
|
|
5a4c73d9b8 | ||
|
|
d294daa08b | ||
|
|
75bd00770c | ||
|
|
674c7b9958 | ||
|
|
60611a2d03 | ||
|
|
2e70e1f2dc | ||
|
|
7548c601f5 | ||
|
|
ac8407faed | ||
|
|
14e727500e | ||
|
|
011f2915c1 | ||
|
|
38cf7c3bc2 | ||
|
|
209364f8c3 | ||
|
|
fea7a173dc | ||
|
|
33d2ca9497 | ||
|
|
9002a66085 | ||
|
|
c8426bcbc0 | ||
|
|
25cf7de75b | ||
|
|
2d938e96a0 | ||
|
|
4ffeafa5ac | ||
|
|
2533e4ca4f | ||
|
|
a144e2183b | ||
|
|
30ce445ac1 | ||
|
|
51d7ad7f17 | ||
|
|
f6d71cbbc8 | ||
|
|
1bf58aa8ba | ||
|
|
63dbedc1a8 | ||
|
|
cd3c0f2113 | ||
|
|
b497d65d81 | ||
|
|
87a884bd8a | ||
|
|
3efbcb82d9 | ||
|
|
f0f468c94e | ||
|
|
b82d17d6f4 | ||
|
|
9db337ce95 | ||
|
|
62f6df1aeb | ||
|
|
828c1b1a75 | ||
|
|
7de88ca3b5 | ||
|
|
5794301826 | ||
|
|
1a28b5d75b | ||
|
|
df292c9c02 | ||
|
|
f0a24b7e5b | ||
|
|
50df55e35e | ||
|
|
4720cc8e94 | ||
|
|
64d6b90312 | ||
|
|
17bdb1c5e1 | ||
|
|
c1d42f6ceb | ||
|
|
c4eaaa966a | ||
|
|
a43ac720b6 | ||
|
|
170a33687f | ||
|
|
ea6a6a5dda | ||
|
|
69172672b2 | ||
|
|
667b70eaf5 | ||
|
|
44af8f3b3d | ||
|
|
82fc367405 | ||
|
|
828af9ab50 | ||
|
|
e79f2839e2 | ||
|
|
7aab51a390 | ||
|
|
3dfba163df | ||
|
|
4a4b1f8320 | ||
|
|
03f0f7217b | ||
|
|
c6a4cf0d23 | ||
|
|
92f016d06b | ||
|
|
222b0ac239 | ||
|
|
1e59009862 | ||
|
|
76740aee02 | ||
|
|
06bc38e66a | ||
|
|
ad4599e381 | ||
|
|
b1349afb6b | ||
|
|
820dc9fec6 | ||
|
|
46f9e0728d | ||
|
|
8bdedcb72f | ||
|
|
ebd50b4f28 | ||
|
|
85094921a0 | ||
|
|
d97f41e293 | ||
|
|
b701a880a4 | ||
|
|
2b573268fa | ||
|
|
689fdb0490 | ||
|
|
c223e7c956 | ||
|
|
a15d7b0b41 | ||
|
|
3715c2f205 | ||
|
|
95d26d5c6e | ||
|
|
5bc7a64c8c | ||
|
|
b7153c423c | ||
|
|
1637bf965a | ||
|
|
9a6ed1ae75 | ||
|
|
49dfd255e4 | ||
|
|
791a12b731 | ||
|
|
62e16cfcc1 | ||
|
|
c220639e82 | ||
|
|
6a566a99af | ||
|
|
e356051f5a | ||
|
|
1f52278758 | ||
|
|
ab91715c20 | ||
|
|
8dd78dfa55 | ||
|
|
71883d34ae | ||
|
|
73dbbb061a |
@@ -0,0 +1,151 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n;
|
||||||
|
|
||||||
|
use Xentral\Components\Database\Database;
|
||||||
|
use Xentral\Components\Http\Request;
|
||||||
|
use Xentral\Components\Http\Session\Session;
|
||||||
|
use Xentral\Core\DependencyInjection\ServiceContainer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Factory for localization object.
|
||||||
|
*
|
||||||
|
* @see Localization
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
final class Bootstrap
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function registerServices(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'Localization' => 'onInitLocalization',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces umlauts with their 2 character representation.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
*
|
||||||
|
* @return array|string|string[]
|
||||||
|
*/
|
||||||
|
public static function replaceUmlauts(string $string)
|
||||||
|
{
|
||||||
|
$search = ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü', 'ß'];
|
||||||
|
$replace = ['ae', 'oe', 'ue', 'Ae', 'Oe', 'Ue', 'ss'];
|
||||||
|
return str_replace($search, $replace, $string);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find the language information from the given string.
|
||||||
|
*
|
||||||
|
* @param string $lang
|
||||||
|
*
|
||||||
|
* @return array|null
|
||||||
|
*/
|
||||||
|
public static function findLanguage(string $lang): ?array
|
||||||
|
{
|
||||||
|
$subject = strtolower($lang);
|
||||||
|
foreach ((new Iso639()) as $key => $val) {
|
||||||
|
if (array_filter($val, function ($str) use ($subject) {
|
||||||
|
return $str && ((strtolower($str) == $subject) || (self::replaceUmlauts(strtolower($str)) == $subject));
|
||||||
|
})) {
|
||||||
|
return $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find the region information from the given string.
|
||||||
|
*
|
||||||
|
* @param string $region
|
||||||
|
*
|
||||||
|
* @return array|null
|
||||||
|
*/
|
||||||
|
public static function findRegion(string $region): ?array
|
||||||
|
{
|
||||||
|
$subject = strtolower($region);
|
||||||
|
foreach ((new Iso3166()) as $key => $val) {
|
||||||
|
if (array_filter($val, function ($str) use ($subject) {
|
||||||
|
return $str && ((strtolower($str) == $subject) || (self::replaceUmlauts(strtolower($str)) == $subject));
|
||||||
|
})) {
|
||||||
|
return $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the factory for the Localization object.
|
||||||
|
*
|
||||||
|
* @param ServiceContainer $container
|
||||||
|
*
|
||||||
|
* @return Localization
|
||||||
|
*/
|
||||||
|
public static function onInitLocalization(ServiceContainer $container): Localization
|
||||||
|
{
|
||||||
|
/** @var Request $request */
|
||||||
|
$request = $container->get('Request');
|
||||||
|
/** @var Session $session */
|
||||||
|
$session = $container->get('Session');
|
||||||
|
/** @var \erpooSystem $app */
|
||||||
|
$app = $container->get('LegacyApplication');
|
||||||
|
/** @var Database $db */
|
||||||
|
$db = $container->get('Database');
|
||||||
|
|
||||||
|
$config=[];
|
||||||
|
$firmaLang=null;
|
||||||
|
$firmaRegion=null;
|
||||||
|
// Get language from system settings and normalize to 3-letter-code and 2-letter-code
|
||||||
|
if ($firmaLang = self::findLanguage($app->erp->Firmendaten('preferredLanguage'))) {
|
||||||
|
$config[Localization::LANGUAGE_DEFAULT] = $firmaLang[Iso639\Key::ALPHA_3];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get region from system settings and normalize to 2-letter-code
|
||||||
|
if ($firmaLang && ($firmaRegion = self::findRegion($app->erp->Firmendaten('land')))) {
|
||||||
|
$config[Localization::LOCALE_DEFAULT] = "{$firmaLang[Iso639\Key::ALPHA_2]}_{$firmaRegion[Iso3166\Key::ALPHA_2]}";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get User
|
||||||
|
$usersettings = [];
|
||||||
|
if ($user = $app->User) {
|
||||||
|
// Get User's address from user
|
||||||
|
$userAddress = $db->fetchRow(
|
||||||
|
$db->select()->cols(['*'])->from('adresse')->where('id=:id'),
|
||||||
|
['id' => $user->GetAdresse()]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Get language from user account and normalize to 3-letter-code and 2-letter-code
|
||||||
|
if ($userLang = self::findLanguage($user->GetSprache())) {
|
||||||
|
$usersettings['language'] = $userLang[Iso639\Key::ALPHA_3];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get region from user account and normalize to 2-letter-code
|
||||||
|
if ($userLang && ($userRegion = self::findRegion($userAddress['land']))) {
|
||||||
|
$usersettings['locale'] = "{$userLang[Iso639\Key::ALPHA_2]}_{$userRegion[Iso3166\Key::ALPHA_2]}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create Localization object
|
||||||
|
return new Localization($request, $session, $usersettings, $config);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Dataaccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides array access functions to the data provider.
|
||||||
|
*
|
||||||
|
* @see \ArrayAccess
|
||||||
|
* @see DataProvider
|
||||||
|
* @see DataProviderInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
trait ArrayAccessTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Whether an offset exists.
|
||||||
|
*
|
||||||
|
* @param string $offset
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function offsetExists($offset): bool
|
||||||
|
{
|
||||||
|
return array_key_exists($offset, $this->DataProvider_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Offset to retrieve.
|
||||||
|
*
|
||||||
|
* @param string $offset
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function offsetGet($offset): array
|
||||||
|
{
|
||||||
|
return $this->DataProvider_DATA[$offset];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assign a value to the specified offset.
|
||||||
|
* No function since data set is read only.
|
||||||
|
*
|
||||||
|
* @param string $offset
|
||||||
|
* @param array $value
|
||||||
|
*/
|
||||||
|
public function offsetSet($offset, $value)
|
||||||
|
{
|
||||||
|
// $this->DataProvider_DATA[$offset]=$value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unset an offset.
|
||||||
|
* No function since data set is read only.
|
||||||
|
*
|
||||||
|
* @param string $offset
|
||||||
|
*/
|
||||||
|
public function offsetUnset($offset)
|
||||||
|
{
|
||||||
|
// unset($this->DataProvider_DATA[$offset]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Dataaccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides countable functions to the data provider.
|
||||||
|
*
|
||||||
|
* @see \Countable
|
||||||
|
* @see DataProvider
|
||||||
|
* @see DataProviderInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
trait CountableTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Counts the number of records in the private $data array.
|
||||||
|
*
|
||||||
|
* @return int Number of records
|
||||||
|
*/
|
||||||
|
public function count(): int
|
||||||
|
{
|
||||||
|
return count($this->DataProvider_DATA);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Dataaccess;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract filter class.
|
||||||
|
*
|
||||||
|
* @see DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
abstract class DataFilter implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Pointer to next filter in chain.
|
||||||
|
*
|
||||||
|
* @var DataFilterInterface
|
||||||
|
*/
|
||||||
|
private $nextFilter = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::then()
|
||||||
|
*/
|
||||||
|
public function then(DataFilterInterface $filter): DataFilterInterface
|
||||||
|
{
|
||||||
|
if (!$this->nextFilter) {
|
||||||
|
$this->nextFilter = $filter;
|
||||||
|
} else {
|
||||||
|
$this->nextFilter->then($filter);
|
||||||
|
}
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the filter to the data and executes the next filter
|
||||||
|
* if present.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::__invoke()
|
||||||
|
*/
|
||||||
|
public function __invoke(array $data): array
|
||||||
|
{
|
||||||
|
// echo get_called_class()."::__invoke(\$data)".PHP_EOL;
|
||||||
|
|
||||||
|
$filteredData = [];
|
||||||
|
foreach ($data as $key => $val) {
|
||||||
|
if ($this->selectItem($key, $val)) {
|
||||||
|
$filteredData[$key] = $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->nextFilter) {
|
||||||
|
$filteredData = ($this->nextFilter)($filteredData);
|
||||||
|
}
|
||||||
|
return $filteredData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the current item is to be selected for
|
||||||
|
* the dataset.
|
||||||
|
*
|
||||||
|
* @param mixed $key
|
||||||
|
* @param mixed $val
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
abstract protected function selectItem(&$key, &$val): bool;
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Dataaccess;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter Interface.
|
||||||
|
*
|
||||||
|
* @see DataFilter
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
interface DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Add a filter to the end of the filter chain.
|
||||||
|
*
|
||||||
|
* @param DataFilterInterface $filter Filter to add
|
||||||
|
*
|
||||||
|
* @return DataFilterInterface Start of filter chain
|
||||||
|
*/
|
||||||
|
function then(DataFilterInterface $filter): DataFilterInterface;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the filter to the data and executes the next filter
|
||||||
|
* if present.
|
||||||
|
*
|
||||||
|
* @see \Ruga\I18n\Dataaccess\DataFilterInterface::__invoke()
|
||||||
|
*/
|
||||||
|
function __invoke(array $data): array;
|
||||||
|
}
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Dataaccess;
|
||||||
|
|
||||||
|
use ArrayAccess;
|
||||||
|
use Countable;
|
||||||
|
use Iterator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract implementation of a general data provider.
|
||||||
|
*
|
||||||
|
* @see DataProviderInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
abstract class DataProvider implements Countable, Iterator, ArrayAccess, DataProviderInterface
|
||||||
|
{
|
||||||
|
use CountableTrait;
|
||||||
|
use IteratorTrait;
|
||||||
|
use ArrayAccessTrait;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds filtered data.
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
private $DataProvider_DATA = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the object and apply data filter.
|
||||||
|
*
|
||||||
|
* @param DataFilterInterface|null $filter
|
||||||
|
*/
|
||||||
|
public function __construct(DataFilterInterface $filter = null)
|
||||||
|
{
|
||||||
|
if ($filter) {
|
||||||
|
$this->DataProvider_DATA = $filter($this->getOriginalData());
|
||||||
|
} else {
|
||||||
|
$this->DataProvider_DATA = $this->getOriginalData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the original data array).
|
||||||
|
* Raw data before any filtering takes place.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
abstract protected function getOriginalData(): array;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array suitable for select fields.
|
||||||
|
* The key of the filtered data set is used as key of the
|
||||||
|
* array and $desiredName field is used as value.
|
||||||
|
*
|
||||||
|
* @param string $desiredName
|
||||||
|
*
|
||||||
|
* @return array;
|
||||||
|
*/
|
||||||
|
public function getMultiOptions($desiredName = 'NAME_deu'): array
|
||||||
|
{
|
||||||
|
$a = [];
|
||||||
|
foreach ($this as $key => $l) {
|
||||||
|
$a[$key] = $l[$desiredName];
|
||||||
|
}
|
||||||
|
return $a;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the field $desiredName from the record $id.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
|
* @param string $desiredName
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getString($id, $desiredName): string
|
||||||
|
{
|
||||||
|
if (!isset($this[$id])) {
|
||||||
|
throw new Exception\OutOfRangeException("Index '{$id}' not found");
|
||||||
|
}
|
||||||
|
$d = $this[$id];
|
||||||
|
if ($desiredName) {
|
||||||
|
if ($desiredName == 'POST') {
|
||||||
|
return strtoupper($this->getString($id, 'NAME_eng'));
|
||||||
|
}
|
||||||
|
return $d[$desiredName];
|
||||||
|
}
|
||||||
|
throw new Exception\OutOfRangeException("No '{$desiredName}' data for '{$id}'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the item at position $id.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getData($id)
|
||||||
|
{
|
||||||
|
if (empty($id)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (!isset($this[$id])) {
|
||||||
|
throw new Exception\OutOfRangeException("Index '{$id}' not found.");
|
||||||
|
}
|
||||||
|
return $this[$id];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Dataaccess;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface to the general data provider class.
|
||||||
|
*
|
||||||
|
* @see DataProvider
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
interface DataProviderInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Returns an array suitable for select fields.
|
||||||
|
* The key of the filtered data set is used as key of the
|
||||||
|
* array and $desiredName field is used as value.
|
||||||
|
*
|
||||||
|
* @param string $desiredName
|
||||||
|
*
|
||||||
|
* @return array;
|
||||||
|
*/
|
||||||
|
public function getMultiOptions($desiredName): array;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the field $desiredName from the record $id.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
|
* @param string $desiredName
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getString($id, $desiredName): string;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the item at position $id.
|
||||||
|
*
|
||||||
|
* @param string $id
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getData($id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Dataaccess\Exception;
|
||||||
|
|
||||||
|
class OutOfRangeException extends \OutOfRangeException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Dataaccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides iterator functions to the data provider.
|
||||||
|
*
|
||||||
|
* @see \Iterator
|
||||||
|
* @see DataProvider
|
||||||
|
* @see DataProviderInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
trait IteratorTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Index of the current element's key.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $IteratorTrait_index = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of keys of the data set.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $IteratorTrait_keys = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the current element.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function current()
|
||||||
|
{
|
||||||
|
return $this->valid() ? $this->DataProvider_DATA[$this->key()] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the key of the current element.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function key()
|
||||||
|
{
|
||||||
|
return static::valid() ? $this->IteratorTrait_keys[$this->IteratorTrait_index] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move forward to next element.
|
||||||
|
*
|
||||||
|
* @return bool false if invalid
|
||||||
|
*/
|
||||||
|
public function next()
|
||||||
|
{
|
||||||
|
$this->IteratorTrait_index++;
|
||||||
|
if (!$this->valid()) {
|
||||||
|
$this->IteratorTrait_index = null;
|
||||||
|
}
|
||||||
|
return $this->valid();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rewind the Iterator to the first element.
|
||||||
|
*/
|
||||||
|
public function rewind()
|
||||||
|
{
|
||||||
|
$this->IteratorTrait_keys = array_keys($this->DataProvider_DATA);
|
||||||
|
sort($this->IteratorTrait_keys);
|
||||||
|
$this->IteratorTrait_index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if current position is valid.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function valid(): bool
|
||||||
|
{
|
||||||
|
return ($this->IteratorTrait_index !== null)
|
||||||
|
&& array_key_exists($this->IteratorTrait_index, $this->IteratorTrait_keys)
|
||||||
|
&& array_key_exists($this->IteratorTrait_keys[$this->IteratorTrait_index], $this->DataProvider_DATA);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Exception;
|
||||||
|
|
||||||
|
class LanguageNotInitializedException extends \RuntimeException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Exception;
|
||||||
|
|
||||||
|
class UnsupportedLocaleStringException extends \RuntimeException
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataProvider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Country Codes - ISO 3166.
|
||||||
|
* Loads the data and holds the filtered (if desired) list.
|
||||||
|
*
|
||||||
|
* @see https://www.iso.org/iso-3166-country-codes.html
|
||||||
|
* @see DataProvider
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* @license AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
class Iso3166 extends DataProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataProvider::getOriginalData()
|
||||||
|
*/
|
||||||
|
protected function getOriginalData(): array
|
||||||
|
{
|
||||||
|
return include(__DIR__ . '/data/Iso3166data.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso3166\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilter;
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This filter returns all records from the data set (aka dummy filter).
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class All extends DataFilter implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem()
|
||||||
|
*/
|
||||||
|
function selectItem(&$key, &$val): bool
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso3166\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
use Xentral\Components\I18n\Iso3166\Key;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies a filter to only select central european countries.
|
||||||
|
*
|
||||||
|
* @see Custom
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class CentralEurope extends Custom implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Countries in Europe.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
const CentralEurope_Countries = ['CHE', 'DEU', 'AUT', 'ITA', 'FRA', 'ESP', 'PRT', 'GBR'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set predefined values.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(static::CentralEurope_Countries, Key::ALPHA_3);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso3166\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilter;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This filter can be used to change the main key
|
||||||
|
* of the data set.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class ChangeKey extends DataFilter implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* New key to use for the data set.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $ChangeKey_key = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize filter and set the new key.
|
||||||
|
*
|
||||||
|
* @param mixed $key
|
||||||
|
*/
|
||||||
|
public function __construct($key)
|
||||||
|
{
|
||||||
|
$this->ChangeKey_key = $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem()
|
||||||
|
*/
|
||||||
|
protected function selectItem(&$key, &$val): bool
|
||||||
|
{
|
||||||
|
$key = $val[$this->ChangeKey_key];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso3166\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilter;
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply a custom filter to the data set.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class Custom extends DataFilter implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Array of wanted values.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $Custom_values = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Key to check for the values in $this->Custom_values.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $Custom_key = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set values for filter.
|
||||||
|
*
|
||||||
|
* @param array $values
|
||||||
|
* @param mixed $key
|
||||||
|
*/
|
||||||
|
public function __construct(array $values, $key)
|
||||||
|
{
|
||||||
|
$this->Custom_values = $values;
|
||||||
|
$this->Custom_key = $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem()
|
||||||
|
*/
|
||||||
|
protected function selectItem(&$key, &$val): bool
|
||||||
|
{
|
||||||
|
$needle = $val[$this->Custom_key];
|
||||||
|
return in_array($needle, $this->Custom_values);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso3166\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
use Xentral\Components\I18n\Iso3166\Key;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies a filter to only select european countries.
|
||||||
|
*
|
||||||
|
* @see Custom
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class Europe extends Custom implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Set predefined values.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(['150'], Key::REGION_CODE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso3166;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Keys for the iso3166 list.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Iso3166
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
abstract class Key/* extends Ruga_Enum*/
|
||||||
|
{
|
||||||
|
/** Key: Alpha-2 code */
|
||||||
|
const ALPHA_2 = 'A2';
|
||||||
|
|
||||||
|
/** Key: Alpha-3 code */
|
||||||
|
const ALPHA_3 = 'A3';
|
||||||
|
|
||||||
|
/** Key: Numeric code */
|
||||||
|
const NUMERIC = 'NUM';
|
||||||
|
|
||||||
|
/** Key: Top Level Domain */
|
||||||
|
const TLD = 'TLD';
|
||||||
|
|
||||||
|
/** Key: Currency Code */
|
||||||
|
const CURRENCY_CODE = 'CURRENCY_CODE';
|
||||||
|
const TELEPHONE_CODE = 'TEL_CODE';
|
||||||
|
const REGION = 'REGION';
|
||||||
|
const REGION_CODE = 'REGION_CODE';
|
||||||
|
const SUBREGION = 'SUBREGION';
|
||||||
|
const SUBREGION_CODE = 'SUBREGION_CODE';
|
||||||
|
const INTERMEDIATEREGION = 'INTERMEDIATEREGION';
|
||||||
|
const INTERMEDIATEREGION_CODE = 'INTERMEDIATEREGION_CODE';
|
||||||
|
const NAME_eng = 'NAME_eng';
|
||||||
|
const NAME_fra = 'NAME_fra';
|
||||||
|
const NAME_deu = 'NAME_deu';
|
||||||
|
|
||||||
|
|
||||||
|
/** Key: Postal country name */
|
||||||
|
const POST = 'POST';
|
||||||
|
|
||||||
|
|
||||||
|
const DEFAULT = self::ALPHA_3;
|
||||||
|
|
||||||
|
|
||||||
|
protected static $fullnameMap = [
|
||||||
|
self::ALPHA_2 => 'ISO 3166 Alpha-2',
|
||||||
|
self::ALPHA_3 => 'ISO 3166 Alpha-3',
|
||||||
|
self::NUMERIC => 'ISO 3166 Numerisch',
|
||||||
|
self::TLD => 'Top Level Domain',
|
||||||
|
self::CURRENCY_CODE => 'Währung',
|
||||||
|
self::TELEPHONE_CODE => 'Landesvorwahl',
|
||||||
|
self::REGION => 'Region',
|
||||||
|
self::REGION_CODE => 'Region Code',
|
||||||
|
self::SUBREGION => 'Unter-Region',
|
||||||
|
self::SUBREGION_CODE => 'Unter-Region Code',
|
||||||
|
self::INTERMEDIATEREGION => 'Intermediate-Region',
|
||||||
|
self::INTERMEDIATEREGION_CODE => 'Intermediate-Region Code',
|
||||||
|
self::NAME_eng => 'Englische Bezeichnung',
|
||||||
|
self::NAME_fra => 'Französische Bezeichnung',
|
||||||
|
self::NAME_deu => 'Deutsche Bezeichnung',
|
||||||
|
|
||||||
|
self::POST => 'Landesbezeichung Postadresse',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso3166;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Names for the iso3166 list.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Iso3166
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
abstract class Name/* extends Ruga_Enum */
|
||||||
|
{
|
||||||
|
/** Englisch */
|
||||||
|
const ENG = 'NAME_eng';
|
||||||
|
/** Französisch */
|
||||||
|
const FRA = 'NAME_fra';
|
||||||
|
/** Deutsch */
|
||||||
|
const DEU = 'NAME_deu';
|
||||||
|
|
||||||
|
|
||||||
|
protected static $fullnameMap = [
|
||||||
|
self::ENG => 'Englische Bezeichnung',
|
||||||
|
self::FRA => 'Französische Bezeichnung',
|
||||||
|
self::DEU => 'Deutsche Bezeichnung',
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataProvider;
|
||||||
|
use Xentral\Components\I18n\Dataaccess\Exception\OutOfRangeException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Codes for the Representation of Names of Languages - ISO 639.
|
||||||
|
* Loads the data and holds the filtered (if desired) list.
|
||||||
|
*
|
||||||
|
* @see https://www.iso.org/iso-639-language-codes.html
|
||||||
|
* @see DataProvider
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class Iso639 extends DataProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataProvider::getOriginalData()
|
||||||
|
*/
|
||||||
|
protected function getOriginalData(): array
|
||||||
|
{
|
||||||
|
return include(__DIR__ . '/data/Iso639data.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the field $desiredName from the record $id.
|
||||||
|
*
|
||||||
|
* @param mixed $id
|
||||||
|
* @param string $desiredName
|
||||||
|
* @param null $default
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function find($id, $desiredName, $default = null): string
|
||||||
|
{
|
||||||
|
$id = strtolower($id);
|
||||||
|
try {
|
||||||
|
return $this->getString($id, $desiredName);
|
||||||
|
} catch (OutOfRangeException $e) {
|
||||||
|
try {
|
||||||
|
return (new \Xentral\Components\I18n\Iso639(
|
||||||
|
(new \Xentral\Components\I18n\Iso639\Filter\All())
|
||||||
|
->then(new \Xentral\Components\I18n\Iso639\Filter\ChangeKey(\Xentral\Components\I18n\Iso639\Key::ALPHA_2))
|
||||||
|
))->getString($id, $desiredName);
|
||||||
|
} catch (OutOfRangeException $e) {
|
||||||
|
try {
|
||||||
|
$id = strtoupper($id);
|
||||||
|
return (new \Xentral\Components\I18n\Iso639(
|
||||||
|
(new \Xentral\Components\I18n\Iso639\Filter\All())
|
||||||
|
->then(new \Xentral\Components\I18n\Iso639\Filter\ChangeKey(\Xentral\Components\I18n\Iso639\Key::ONELETTER))
|
||||||
|
))->getString($id, $desiredName);
|
||||||
|
} catch (OutOfRangeException $e) {
|
||||||
|
if ($default === null) {
|
||||||
|
throw $e;
|
||||||
|
} else {
|
||||||
|
return $this->getString($default, $desiredName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso639\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilter;
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This filter returns all records from the data set (aka dummy filter).
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class All extends DataFilter implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem()
|
||||||
|
*/
|
||||||
|
function selectItem(&$key, &$val): bool
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso639\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
use Xentral\Components\I18n\Iso639\Key;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies a filter to only select central european countries.
|
||||||
|
*
|
||||||
|
* @see Custom
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class CentralEurope extends Custom implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Countries in Europe.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
const CentralEurope_Languages = ['deu', 'fra', 'ita', 'roh', 'spa', 'por', 'eng'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set predefined values.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct(static::CentralEurope_Languages, Key::ALPHA_3);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso639\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilter;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This filter can be used to change the main key
|
||||||
|
* of the data set.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class ChangeKey extends DataFilter implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* New key to use for the data set.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $ChangeKey_key = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize filter and set the new key.
|
||||||
|
*
|
||||||
|
* @param mixed $key
|
||||||
|
*/
|
||||||
|
public function __construct($key)
|
||||||
|
{
|
||||||
|
$this->ChangeKey_key = $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem()
|
||||||
|
*/
|
||||||
|
protected function selectItem(&$key, &$val): bool
|
||||||
|
{
|
||||||
|
$key = $val[$this->ChangeKey_key] ?? null;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso639\Filter;
|
||||||
|
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilter;
|
||||||
|
use Xentral\Components\I18n\Dataaccess\DataFilterInterface;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply a custom filter to the data set.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilter
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
class Custom extends DataFilter implements DataFilterInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Array of wanted values.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private $Custom_values = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Key to check for the values in $this->Custom_values.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
private $Custom_key = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set values for filter.
|
||||||
|
*
|
||||||
|
* @param array $values
|
||||||
|
* @param mixed $key
|
||||||
|
*/
|
||||||
|
public function __construct(array $values, $key)
|
||||||
|
{
|
||||||
|
$this->Custom_values = $values;
|
||||||
|
$this->Custom_key = $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem()
|
||||||
|
*/
|
||||||
|
protected function selectItem(&$key, &$val): bool
|
||||||
|
{
|
||||||
|
$needle = $val[$this->Custom_key];
|
||||||
|
return in_array($needle, $this->Custom_values);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso639;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Keys for the iso639 list.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Iso639
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
abstract class Key/* extends Ruga_Enum*/
|
||||||
|
{
|
||||||
|
/** Key: Alpha-2 code */
|
||||||
|
const ALPHA_2 = '639-1';
|
||||||
|
const ISO639_1 = '639-1';
|
||||||
|
|
||||||
|
/** Key: Alpha-3 code */
|
||||||
|
const ALPHA_3 = '639-2';
|
||||||
|
const ISO639_2 = '639-2';
|
||||||
|
|
||||||
|
/** Key: Top Level Domain */
|
||||||
|
const ONELETTER = '1L';
|
||||||
|
|
||||||
|
/** Key: Name */
|
||||||
|
const NAME_eng = 'NAME_eng';
|
||||||
|
const NAME_fra = 'NAME_fra';
|
||||||
|
const NAME_deu = 'NAME_deu';
|
||||||
|
|
||||||
|
|
||||||
|
const DEFAULT = self::ALPHA_3;
|
||||||
|
|
||||||
|
|
||||||
|
protected static $fullnameMap = [
|
||||||
|
self::ALPHA_2 => 'ISO 639 Alpha-2',
|
||||||
|
self::ALPHA_3 => 'ISO 639 Alpha-3',
|
||||||
|
self::ONELETTER => 'ISO 639 Alpha-1',
|
||||||
|
self::NAME_eng => 'Englische Bezeichnung',
|
||||||
|
self::NAME_fra => 'Französische Bezeichnung',
|
||||||
|
self::NAME_deu => 'Deutsche Bezeichnung',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n\Iso639;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Names for the iso639 list.
|
||||||
|
*
|
||||||
|
* @see \Xentral\Components\I18n\Iso639
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
abstract class Name/* extends Ruga_Enum */
|
||||||
|
{
|
||||||
|
/** Englisch */
|
||||||
|
const ENG = 'NAME_eng';
|
||||||
|
/** Französisch */
|
||||||
|
const FRA = 'NAME_fra';
|
||||||
|
/** Deutsch */
|
||||||
|
const DEU = 'NAME_deu';
|
||||||
|
|
||||||
|
|
||||||
|
protected static $fullnameMap = [
|
||||||
|
self::ENG => 'Englische Bezeichnung',
|
||||||
|
self::FRA => 'Französische Bezeichnung',
|
||||||
|
self::DEU => 'Deutsche Bezeichnung',
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,244 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n;
|
||||||
|
|
||||||
|
use Locale;
|
||||||
|
use Xentral\Components\Http\Request;
|
||||||
|
use Xentral\Components\Http\Session\Session;
|
||||||
|
use Xentral\Components\I18n\Exception\LanguageNotInitializedException;
|
||||||
|
use Xentral\Components\I18n\Exception\UnsupportedLocaleStringException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides a central service for localization.
|
||||||
|
*
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
final class Localization implements LocalizationInterface
|
||||||
|
{
|
||||||
|
private array $config;
|
||||||
|
|
||||||
|
private ?Request $request;
|
||||||
|
|
||||||
|
private ?Session $session;
|
||||||
|
|
||||||
|
private array $usersettings = [];
|
||||||
|
|
||||||
|
private array $language = [];
|
||||||
|
|
||||||
|
private array $locale = [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct(?Request $request, ?Session $session, array $usersettings = [], array $config = [])
|
||||||
|
{
|
||||||
|
$this->request = $request;
|
||||||
|
$this->session = $session;
|
||||||
|
$this->usersettings = $usersettings;
|
||||||
|
$this->config = $config;
|
||||||
|
$this->process();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function process()
|
||||||
|
{
|
||||||
|
// Hardcoded defaults if config is not available
|
||||||
|
$localeDefault = $this->config[Localization::LOCALE_DEFAULT] ?? 'de_DE';
|
||||||
|
$localeAttrName = $this->config[Localization::LOCALE_ATTRIBUTE_NAME] ?? 'locale';
|
||||||
|
$langDefault = $this->config[Localization::LANGUAGE_DEFAULT] ?? 'deu';
|
||||||
|
$langAttrName = $this->config[Localization::LANGUAGE_ATTRIBUTE_NAME] ?? 'language';
|
||||||
|
|
||||||
|
$segmentName = 'i18n';
|
||||||
|
|
||||||
|
// Get the locale from the session, if available
|
||||||
|
if ($this->session && ($locale = $this->session->getValue($segmentName, $localeAttrName))) {
|
||||||
|
} else {
|
||||||
|
// Get locale from request, fallback to the user's browser preference
|
||||||
|
if ($this->request) {
|
||||||
|
$locale = $this->request->attributes->get(
|
||||||
|
$localeAttrName,
|
||||||
|
Locale::acceptFromHttp(
|
||||||
|
$this->request->getHeader('Accept-Language', $localeDefault)
|
||||||
|
) ?? $localeDefault
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$locale = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? $localeDefault);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Get locale from user
|
||||||
|
// This overrides all previous attempts to find a locale
|
||||||
|
if (array_key_exists('locale', $this->usersettings)) {
|
||||||
|
$locale = $this->usersettings['locale'];
|
||||||
|
}
|
||||||
|
// Get locale from query string
|
||||||
|
// This overrides all previous attempts to find a locale
|
||||||
|
if ($this->request) {
|
||||||
|
$locale = $this->request->getParam($localeAttrName, $locale ?? $localeDefault);
|
||||||
|
} else {
|
||||||
|
$locale = $_GET[$localeAttrName] ?? $locale ?? $localeDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get the language from the session, if available
|
||||||
|
if ($this->session && ($language = $this->session->getValue($segmentName, $langAttrName))) {
|
||||||
|
} else {
|
||||||
|
// Get language from request, fallback to the current locale
|
||||||
|
if ($this->request) {
|
||||||
|
$language = $this->request->attributes->get($langAttrName, Locale::getPrimaryLanguage($locale));
|
||||||
|
} else {
|
||||||
|
$language = Locale::getPrimaryLanguage($locale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Get language from user
|
||||||
|
// This overrides all previous attempts to find a language
|
||||||
|
if (array_key_exists('language', $this->usersettings)) {
|
||||||
|
$language = $this->usersettings['language'];
|
||||||
|
}
|
||||||
|
// Get language from query string
|
||||||
|
// This overrides all previous attempts to find a language
|
||||||
|
if ($this->request) {
|
||||||
|
$language = $this->request->getParam($langAttrName, $language ?? $langDefault);
|
||||||
|
} else {
|
||||||
|
$language = $language ?? $langDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check language against the data from Iso639 (and normalize to 3-letter-code)
|
||||||
|
$language = (new Iso639())->find($language, Iso639\Key::DEFAULT, $langDefault);
|
||||||
|
|
||||||
|
|
||||||
|
// Store the locale and language to the LocalizationInterface
|
||||||
|
$this->setLanguage($language);
|
||||||
|
$this->setLocale($locale);
|
||||||
|
|
||||||
|
// Store the locale and language to the session
|
||||||
|
if ($this->session) {
|
||||||
|
$this->session->setValue($segmentName, $localeAttrName, $locale);
|
||||||
|
$this->session->setValue($segmentName, $langAttrName, $language);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the locale and language as a request attribute
|
||||||
|
if ($this->request) {
|
||||||
|
$this->request->attributes->set($localeAttrName, $locale);
|
||||||
|
$this->request->attributes->set($langAttrName, $language);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the default locale
|
||||||
|
Locale::setDefault($locale);
|
||||||
|
// error_log(self::class . ": {$locale}");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the language.
|
||||||
|
*
|
||||||
|
* @param string $language
|
||||||
|
*/
|
||||||
|
public function setLanguage(string $language)
|
||||||
|
{
|
||||||
|
$this->language[Iso639\Key::DEFAULT] = (new \Xentral\Components\I18n\Iso639())->find(
|
||||||
|
$language,
|
||||||
|
Iso639\Key::DEFAULT
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the language string as defined by $key.
|
||||||
|
*
|
||||||
|
* @param string|null $key A constant from Iso639\Key
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getLanguage(string $key = null): string
|
||||||
|
{
|
||||||
|
if (!$key) {
|
||||||
|
$key = Iso639\Key::DEFAULT;
|
||||||
|
}
|
||||||
|
if (!($this->language[$key] ?? null)) {
|
||||||
|
if (!($this->language[Iso639\Key::DEFAULT] ?? null)) {
|
||||||
|
throw new LanguageNotInitializedException("Language is not set for key '" . Iso639\Key::DEFAULT . "'");
|
||||||
|
}
|
||||||
|
$this->language[$key] = (new \Xentral\Components\I18n\Iso639())->find(
|
||||||
|
$this->language[Iso639\Key::DEFAULT],
|
||||||
|
$key
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return $this->language[$key];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the locale.
|
||||||
|
*
|
||||||
|
* @param string $locale
|
||||||
|
*/
|
||||||
|
public function setLocale(string $locale)
|
||||||
|
{
|
||||||
|
$parsedLocale = Locale::parseLocale($locale);
|
||||||
|
$locale = Locale::composeLocale([
|
||||||
|
'language' => $parsedLocale['language'],
|
||||||
|
'region' => $parsedLocale['region'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
if(!$locale) throw new UnsupportedLocaleStringException("The given locale string '{$locale}' is not supported");
|
||||||
|
|
||||||
|
$this->locale[Iso3166\Key::DEFAULT] = $locale;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the locale string as defined by $key.
|
||||||
|
*
|
||||||
|
* @param string|null $key A constant from Iso3166\Key
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getLocale(string $key = null): string
|
||||||
|
{
|
||||||
|
return $this->locale[Iso3166\Key::DEFAULT];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a new localization object using the given adresse array as source for language and region.
|
||||||
|
*
|
||||||
|
* @param array $adresse
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function withAdresse(array $adresse): self
|
||||||
|
{
|
||||||
|
$localization = clone $this;
|
||||||
|
|
||||||
|
// Find language from address array or keep current language
|
||||||
|
if (!$lang = Bootstrap::findLanguage($adresse['sprache'])) {
|
||||||
|
$lang = Bootstrap::findLanguage($this->getLanguage());
|
||||||
|
}
|
||||||
|
if ($lang) {
|
||||||
|
$localization->setLanguage($lang[Iso639\Key::ALPHA_3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find region from address or keep current region
|
||||||
|
if (!$region = Bootstrap::findRegion($adresse['land'])) {
|
||||||
|
$parsedLocale = Locale::parseLocale($this->getLocale());
|
||||||
|
$region = Bootstrap::findRegion($parsedLocale['region']);
|
||||||
|
}
|
||||||
|
if ($lang && $region) {
|
||||||
|
$localization->setLocale("{$lang[Iso639\Key::ALPHA_2]}_{$region[Iso3166\Key::ALPHA_2]}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return $localization;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Xentral\Components\I18n;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface LocalizationInterface
|
||||||
|
*
|
||||||
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
||||||
|
*/
|
||||||
|
interface LocalizationInterface
|
||||||
|
{
|
||||||
|
const LOCALE_DEFAULT = 'locale_default';
|
||||||
|
const LOCALE_ATTRIBUTE_NAME = 'locale_attr_name';
|
||||||
|
const LANGUAGE_DEFAULT = 'language_default';
|
||||||
|
const LANGUAGE_ATTRIBUTE_NAME = 'language_attr_name';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the language.
|
||||||
|
*
|
||||||
|
* @param string $language
|
||||||
|
*/
|
||||||
|
public function setLanguage(string $language);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the language string as defined by $key.
|
||||||
|
*
|
||||||
|
* @param string|null $key A constant from Iso639\Key
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getLanguage(string $key = null): string;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the locale.
|
||||||
|
*
|
||||||
|
* @param string $locale
|
||||||
|
*/
|
||||||
|
public function setLocale(string $locale);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the locale string as defined by $key.
|
||||||
|
*
|
||||||
|
* @param string|null $key A constant from Iso3166\Key
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getLocale(string $key = null): string;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,159 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Data extracted from https://www.iso.org/iso-639-language-codes.html
|
||||||
|
*/
|
||||||
|
return [
|
||||||
|
|
||||||
|
'aar' => [
|
||||||
|
'639-2' => 'aar',
|
||||||
|
'639-1' => 'aa',
|
||||||
|
'NAME_eng' => 'Afar',
|
||||||
|
'NAME_fra' => 'afar',
|
||||||
|
'NAME_deu' => 'Danakil-Sprache',
|
||||||
|
],
|
||||||
|
'abk' => [
|
||||||
|
'639-2' => 'abk',
|
||||||
|
'639-1' => 'ab',
|
||||||
|
'NAME_eng' => 'Abkhazian',
|
||||||
|
'NAME_fra' => 'abkhaze',
|
||||||
|
'NAME_deu' => 'Abchasisch',
|
||||||
|
],
|
||||||
|
'ace' => [
|
||||||
|
'639-2' => 'ace',
|
||||||
|
'639-1' => null,
|
||||||
|
'NAME_eng' => 'Achinese',
|
||||||
|
'NAME_fra' => 'aceh',
|
||||||
|
'NAME_deu' => 'Aceh-Sprache',
|
||||||
|
],
|
||||||
|
'ach' => [
|
||||||
|
'639-2' => 'ach',
|
||||||
|
'639-1' => null,
|
||||||
|
'NAME_eng' => 'Acoli',
|
||||||
|
'NAME_fra' => 'acoli',
|
||||||
|
'NAME_deu' => 'Acholi-Sprache',
|
||||||
|
],
|
||||||
|
'ada' => [
|
||||||
|
'639-2' => 'ada',
|
||||||
|
'639-1' => null,
|
||||||
|
'NAME_eng' => 'Adangme',
|
||||||
|
'NAME_fra' => 'adangme',
|
||||||
|
'NAME_deu' => 'Adangme-Sprache',
|
||||||
|
],
|
||||||
|
'ady' => [
|
||||||
|
'639-2' => 'ady',
|
||||||
|
'639-1' => null,
|
||||||
|
'NAME_eng' => 'Adyghe',
|
||||||
|
'NAME_fra' => 'adyghé',
|
||||||
|
'NAME_deu' => 'Adygisch',
|
||||||
|
],
|
||||||
|
'afa' => [
|
||||||
|
'639-2' => 'afa',
|
||||||
|
'639-1' => null,
|
||||||
|
'NAME_eng' => 'Afro-Asiatic languages',
|
||||||
|
'NAME_fra' => 'afro-asiatiques, langues',
|
||||||
|
'NAME_deu' => 'Hamitosemitische Sprachen (Andere)',
|
||||||
|
],
|
||||||
|
'afh' => [
|
||||||
|
'639-2' => 'afh',
|
||||||
|
'639-1' => null,
|
||||||
|
'NAME_eng' => 'Afrihili',
|
||||||
|
'NAME_fra' => 'afrihili',
|
||||||
|
'NAME_deu' => 'Afrihili',
|
||||||
|
],
|
||||||
|
'afr' => [
|
||||||
|
'639-2' => 'afr',
|
||||||
|
'639-1' => 'af',
|
||||||
|
'NAME_eng' => 'Afrikaans',
|
||||||
|
'NAME_fra' => 'afrikaans',
|
||||||
|
'NAME_deu' => 'Afrikaans',
|
||||||
|
],
|
||||||
|
'ain' => [
|
||||||
|
'639-2' => 'ain',
|
||||||
|
'639-1' => null,
|
||||||
|
'NAME_eng' => 'Ainu',
|
||||||
|
'NAME_fra' => 'aïnou',
|
||||||
|
'NAME_deu' => 'Ainu-Sprache',
|
||||||
|
],
|
||||||
|
'aka' => [
|
||||||
|
'639-2' => 'aka',
|
||||||
|
'639-1' => 'ak',
|
||||||
|
'NAME_eng' => 'Akan',
|
||||||
|
'NAME_fra' => 'akan',
|
||||||
|
'NAME_deu' => 'Akan-Sprache',
|
||||||
|
],
|
||||||
|
'akk' => [
|
||||||
|
'639-2' => 'akk',
|
||||||
|
'639-1' => null,
|
||||||
|
'NAME_eng' => 'Akkadian',
|
||||||
|
'NAME_fra' => 'akkadien',
|
||||||
|
'NAME_deu' => 'Akkadisch',
|
||||||
|
],
|
||||||
|
'sqi' => [
|
||||||
|
'639-2' => 'sqi',
|
||||||
|
'639-1' => 'sq',
|
||||||
|
'NAME_eng' => 'Albanian',
|
||||||
|
'NAME_fra' => 'albanais',
|
||||||
|
'NAME_deu' => 'Albanisch',
|
||||||
|
'639-2-B' => 'alb',
|
||||||
|
],
|
||||||
|
|
||||||
|
'deu' => [
|
||||||
|
'639-2' => 'deu',
|
||||||
|
'639-1' => 'de',
|
||||||
|
'NAME_eng' => 'German',
|
||||||
|
'NAME_fra' => 'allemand',
|
||||||
|
'NAME_deu' => 'Deutsch',
|
||||||
|
'639-2-B' => 'ger',
|
||||||
|
'1L' => 'D',
|
||||||
|
],
|
||||||
|
'eng' => [
|
||||||
|
'639-2' => 'eng',
|
||||||
|
'639-1' => 'en',
|
||||||
|
'NAME_eng' => 'English',
|
||||||
|
'NAME_fra' => 'anglais',
|
||||||
|
'NAME_deu' => 'Englisch',
|
||||||
|
'1L' => 'E',
|
||||||
|
],
|
||||||
|
'fra' => [
|
||||||
|
'639-2' => 'fra',
|
||||||
|
'639-1' => 'fr',
|
||||||
|
'NAME_eng' => 'French',
|
||||||
|
'NAME_fra' => 'français',
|
||||||
|
'NAME_deu' => 'Französisch',
|
||||||
|
'639-2-B' => 'fre',
|
||||||
|
'1L' => 'F',
|
||||||
|
],
|
||||||
|
'ita' => [
|
||||||
|
'639-2' => 'ita',
|
||||||
|
'639-1' => 'it',
|
||||||
|
'NAME_eng' => 'Italian',
|
||||||
|
'NAME_fra' => 'italien',
|
||||||
|
'NAME_deu' => 'Italienisch',
|
||||||
|
'1L' => 'I',
|
||||||
|
],
|
||||||
|
'spa' => [
|
||||||
|
'639-2' => 'spa',
|
||||||
|
'639-1' => 'es',
|
||||||
|
'NAME_eng' => 'Spanish',
|
||||||
|
'NAME_fra' => 'espagnol',
|
||||||
|
'NAME_deu' => 'Spanisch',
|
||||||
|
],
|
||||||
|
'por' => [
|
||||||
|
'639-2' => 'por',
|
||||||
|
'639-1' => 'pt',
|
||||||
|
'NAME_eng' => 'Portuguese',
|
||||||
|
'NAME_fra' => 'portugais',
|
||||||
|
'NAME_deu' => 'Portugiesisch',
|
||||||
|
],
|
||||||
|
'roh' => [
|
||||||
|
'639-2' => 'roh',
|
||||||
|
'639-1' => 'rm',
|
||||||
|
'NAME_eng' => 'Romansh',
|
||||||
|
'NAME_fra' => 'romanche',
|
||||||
|
'NAME_deu' => 'Rätoromanisch',
|
||||||
|
],
|
||||||
|
'dut' => ['639-2' => 'dut', '639-1' => 'nl', 'NAME_eng' => 'Dutch', 'NAME_fra' => 'néerlandais', 'NAME_deu' => 'Niederländisch', 'NAME_deu_alt' => 'Holländisch'],
|
||||||
|
'swe' => ['639-2' => 'swe', '639-1' => 'sv', 'NAME_eng' => 'Swedish', 'NAME_fra' => 'suédois', 'NAME_deu' => 'Schwedisch'],
|
||||||
|
'dan' => ['639-2' => 'dan', '639-1' => 'da', 'NAME_eng' => 'Danish', 'NAME_fra' => 'danois', 'NAME_deu' => 'Dänisch'],
|
||||||
|
'nor' => ['639-2' => 'nor', '639-1' => 'no', 'NAME_eng' => 'Norwegian', 'NAME_fra' => 'norvégien', 'NAME_deu' => 'Norwegisch'],
|
||||||
|
];
|
||||||
@@ -128,7 +128,7 @@ final class ImapMailClient implements MailClientInterface
|
|||||||
$message = $this->imap->getMessage($msgNumber);
|
$message = $this->imap->getMessage($msgNumber);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new MessageNotFoundException(
|
throw new MessageNotFoundException(
|
||||||
sprintf('Message number %s not found.', $msgNumber)
|
sprintf("Message number %s could not be fetched.\n\r%s", $msgNumber,print_r($e,true))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace Xentral\Components\MailClient\Data;
|
namespace Xentral\Components\MailClient\Data;
|
||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
use DateTimeImmutable;
|
||||||
use DateTimeInterface;
|
use DateTimeInterface;
|
||||||
use JsonSerializable;
|
use JsonSerializable;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
@@ -307,10 +308,13 @@ final class MailMessageData implements MailMessageInterface, JsonSerializable
|
|||||||
if ($date === null) {
|
if ($date === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$dateTime = date_create($date->getValue());
|
/* $dateTime = date_create($date->getValue());
|
||||||
if ($dateTime === false) {
|
if ($dateTime === false) {
|
||||||
|
throw new InvalidArgumentException('Invalid date: '.$date->getValue());
|
||||||
return null;
|
return null;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
$dateTime = new DateTimeImmutable($date->getValue());
|
||||||
|
|
||||||
return $dateTime;
|
return $dateTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ final class Psr4ClassNameResolver
|
|||||||
{
|
{
|
||||||
// Normalize inputs
|
// Normalize inputs
|
||||||
$prefix = trim($prefix, '\\') . '\\';
|
$prefix = trim($prefix, '\\') . '\\';
|
||||||
$baseDir = rtrim($baseDir, '/') . '/';
|
$baseDir = rtrim($baseDir, '/\\') . DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
$this->prefixes[$prefix] = $baseDir;
|
$this->prefixes[$prefix] = $baseDir;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -492,6 +492,8 @@ final class ReportService
|
|||||||
$testResult['messagetype'] = 'error';
|
$testResult['messagetype'] = 'error';
|
||||||
$testResult['message'] = sprintf("QUERY FAILED:\n%s", $e->getMessage());
|
$testResult['message'] = sprintf("QUERY FAILED:\n%s", $e->getMessage());
|
||||||
|
|
||||||
|
$testResult['message'] .= "\n\r".$compiled;
|
||||||
|
|
||||||
return $testResult;
|
return $testResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,6 +502,9 @@ final class ReportService
|
|||||||
if(count($rows) < 101){
|
if(count($rows) < 101){
|
||||||
$message = sprintf('Query successful: %s datasets found', count($rows));
|
$message = sprintf('Query successful: %s datasets found', count($rows));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$message .= "\n\r".print_r($rows[0],true);
|
||||||
|
|
||||||
$testResult = [
|
$testResult = [
|
||||||
'messagetype' => 'success',
|
'messagetype' => 'success',
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ class TicketImportHelper
|
|||||||
$queue_id = $this->mailAccount->getTicketQueueId();
|
$queue_id = $this->mailAccount->getTicketQueueId();
|
||||||
|
|
||||||
if (!empty($queue_id)) {
|
if (!empty($queue_id)) {
|
||||||
$queue_label = $this->db->Select("SELECT label FROM warteschlangen WHERE id = ".$queue_id." LIMIT 1");
|
$queue_label = $this->db->Select("SELECT label FROM warteschlangen WHERE label = '".$queue_id."' LIMIT 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
$insertTicket = "INSERT INTO `ticket` (
|
$insertTicket = "INSERT INTO `ticket` (
|
||||||
@@ -408,9 +408,6 @@ class TicketImportHelper
|
|||||||
$this->logger->error('Failed to insert ticket message into db', ['exception' => $e]);
|
$this->logger->error('Failed to insert ticket message into db', ['exception' => $e]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->applyTicketRules($messageId);
|
|
||||||
|
|
||||||
return($result);
|
return($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -440,7 +437,7 @@ class TicketImportHelper
|
|||||||
|
|
||||||
foreach ($ruleArray as $rule) {
|
foreach ($ruleArray as $rule) {
|
||||||
|
|
||||||
$this->logger->debug('ticket rule applies',['rule_id' => $rule['id']]);
|
$this->logger->debug('ticket rule applies',['rule_id' => $rule['id'],'rule' => print_r($rule,true)]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$update = $this->db->update();
|
$update = $this->db->update();
|
||||||
@@ -461,12 +458,16 @@ class TicketImportHelper
|
|||||||
$this->db->perform($sql, ['ticket_id' => $ticketId]);
|
$this->db->perform($sql, ['ticket_id' => $ticketId]);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($rule['is_spam'] === 1) {
|
if ($rule['is_spam'] == 1) {
|
||||||
$sql = "UPDATE `ticket_nachricht` SET `status` = \'spam\' WHERE `id` = '".$ticketMessageId."'";
|
$status = 'spam';
|
||||||
$this->db->Update($sql);
|
} else {
|
||||||
|
$status = 'neu';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."', `warteschlange` = '".$rule['queue_id']."' WHERE `id` = '".$ticketId."'";
|
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."', `warteschlange` = '".$rule['queue_id']."', `status` = '".$status."' WHERE `id` = '".$ticketId."'";
|
||||||
|
|
||||||
|
$this->logger->debug('ticket rule sql',['sql' => $sql]);
|
||||||
|
|
||||||
$this->db->Update($sql);
|
$this->db->Update($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -511,7 +512,10 @@ class TicketImportHelper
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
$this->logger->error('Error during email import '.$messageNumber, ['message' => substr(print_r($message,true),0,1000)]);
|
|
||||||
|
$exception_message = $e->getMessage();
|
||||||
|
|
||||||
|
$this->logger->error('Error during email import '.$messageNumber, ['exc-message' => $exception_message ,'message2' => substr(print_r($message,true),0,1000)]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -573,14 +577,17 @@ class TicketImportHelper
|
|||||||
$this->logger->debug('Text (converted)',['plain' => $action, 'html' => $action_html]);
|
$this->logger->debug('Text (converted)',['plain' => $action, 'html' => $action_html]);
|
||||||
|
|
||||||
// Import database emailbackup
|
// Import database emailbackup
|
||||||
$date = $message->getDate();
|
try {
|
||||||
if (is_null($date)) { // This should not be happening -> Todo check getDate function
|
$date = $message->getDate();
|
||||||
$this->logger->debug('Null date',['subject' => $message->getSubject(), $message->getHeader('date')->getValue()]);
|
|
||||||
return(false);
|
|
||||||
} else {
|
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
$frommd5 = md5($from . $subject . $timestamp);
|
|
||||||
}
|
}
|
||||||
|
catch (exception $e) {
|
||||||
|
$this->logger->debug('Invalid date',['exc-message' => $e->getMessage(),'subject' => $message->getSubject(), $message->getHeader('date')->getValue()]);
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$timestamp = $date->getTimestamp();
|
||||||
|
$frommd5 = md5($from . $subject . $timestamp);
|
||||||
|
|
||||||
$empfang = $date->format('Y-m-d H:i:s');
|
$empfang = $date->format('Y-m-d H:i:s');
|
||||||
$sql = "SELECT COUNT(id)
|
$sql = "SELECT COUNT(id)
|
||||||
FROM `emailbackup_mails`
|
FROM `emailbackup_mails`
|
||||||
@@ -693,6 +700,12 @@ class TicketImportHelper
|
|||||||
$from
|
$from
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Only for new tickets: apply filter rules
|
||||||
|
if (!$ticketexists) {
|
||||||
|
$this->applyTicketRules($ticketnachricht);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($ticketnachricht > 0 && $emailbackup_mails_id > 0) {
|
if ($ticketnachricht > 0 && $emailbackup_mails_id > 0) {
|
||||||
$this->db->Update(
|
$this->db->Update(
|
||||||
"UPDATE `emailbackup_mails`
|
"UPDATE `emailbackup_mails`
|
||||||
@@ -837,8 +850,8 @@ class TicketImportHelper
|
|||||||
$this->mailAccount->isAutoresponseEnabled()
|
$this->mailAccount->isAutoresponseEnabled()
|
||||||
&& $this->mailAccount->getAutoresponseText() !== ''
|
&& $this->mailAccount->getAutoresponseText() !== ''
|
||||||
&& (
|
&& (
|
||||||
$this->erpApi->AutoresponderBlacklist($from) !== 1
|
// $this->erpApi->AutoresponderBlacklist($from) !== 1 ||
|
||||||
|| $this->mailAccount->isAutoresponseLimitEnabled() === false
|
$this->mailAccount->isAutoresponseLimitEnabled() === false
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ $factoryServiceMap = @include $serviceCacheFile;
|
|||||||
|
|
||||||
if (!is_file($serviceCacheFile)) {
|
if (!is_file($serviceCacheFile)) {
|
||||||
|
|
||||||
// Installer ausführen wenn ServiceMap nicht vorhanden ist
|
// Installer ausführen, wenn ServiceMap nicht vorhanden ist
|
||||||
$resolver = new Psr4ClassNameResolver();
|
$resolver = new Psr4ClassNameResolver();
|
||||||
$resolver->addNamespace('Xentral\\', __DIR__);
|
$resolver->addNamespace('Xentral\\', __DIR__);
|
||||||
$resolver->excludeFile(__DIR__ . '/bootstrap.php');
|
$resolver->excludeFile(__DIR__ . DIRECTORY_SEPARATOR . 'bootstrap.php');
|
||||||
|
|
||||||
$generator = new ClassMapGenerator($resolver, __DIR__);
|
$generator = new ClassMapGenerator($resolver, __DIR__);
|
||||||
$installer = new Installer($generator, $resolver);
|
$installer = new Installer($generator, $resolver);
|
||||||
|
|||||||
@@ -125,9 +125,9 @@ $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1");
|
|||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
if($anzargs > 2){
|
if($anzargs > 2){
|
||||||
$message .= $app->erp->LagerSync($articleId, true, $shopByIds);
|
$message .= $app->erp->LagerSync($articleId, false, $shopByIds); // 2nd parameter is print_echo -> prints via echo to logfile (big print_r)
|
||||||
}else{
|
}else{
|
||||||
$message .= $app->erp->LagerSync($articleId, true);
|
$message .= $app->erp->LagerSync($articleId, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $exception) {
|
catch (Exception $exception) {
|
||||||
|
|||||||
@@ -1252,7 +1252,7 @@ Options -Indexes
|
|||||||
# Deny access to all *.php
|
# Deny access to all *.php
|
||||||
Order deny,allow
|
Order deny,allow
|
||||||
Allow from all
|
Allow from all
|
||||||
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js)$">
|
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map|js.map)$">
|
||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
Allow from all
|
Allow from all
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
@@ -1271,6 +1271,10 @@ Allow from all
|
|||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
Allow from all
|
Allow from all
|
||||||
</Files>
|
</Files>
|
||||||
|
<Files robots.txt>
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</Files>
|
||||||
# end
|
# end
|
||||||
');
|
');
|
||||||
|
|
||||||
|
|||||||
@@ -1424,7 +1424,7 @@ class DB{
|
|||||||
if(empty($TableName) || empty($IDFieldName) || empty($IDToDuplicate)) {
|
if(empty($TableName) || empty($IDFieldName) || empty($IDToDuplicate)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
$sql = "SELECT * FROM $TableName WHERE $IDFieldName = $IDToDuplicate";
|
$sql = "SELECT * FROM $TableName WHERE $IDFieldName = $IDToDuplicate";
|
||||||
$result = @mysqli_query($this->connection,$sql);
|
$result = @mysqli_query($this->connection,$sql);
|
||||||
if(empty($result)) {
|
if(empty($result)) {
|
||||||
@@ -1442,6 +1442,23 @@ class DB{
|
|||||||
}
|
}
|
||||||
$sql .= $RowKeys[$i] . " = '" . $this->real_escape_string($RowValues[$i]) . "'";
|
$sql .= $RowKeys[$i] . " = '" . $this->real_escape_string($RowValues[$i]) . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mysqli_query($this->connection,$sql);
|
||||||
|
*/
|
||||||
|
|
||||||
|
$sql = "INSERT INTO ".$TableName." SELECT ";
|
||||||
|
$fields = $this->GetColAssocArray($TableName);
|
||||||
|
$comma = "";
|
||||||
|
foreach ($fields as $field => $value) {
|
||||||
|
if ($field != $IDFieldName) {
|
||||||
|
$sql .= $comma."`".$field."`";
|
||||||
|
} else {
|
||||||
|
$sql .= "NULL";
|
||||||
|
}
|
||||||
|
$comma = ", ";
|
||||||
|
}
|
||||||
|
$sql .= " FROM ".$TableName." WHERE id = ".$IDToDuplicate;
|
||||||
|
|
||||||
@mysqli_query($this->connection,$sql);
|
@mysqli_query($this->connection,$sql);
|
||||||
|
|
||||||
$id = $this->GetInsertID();
|
$id = $this->GetInsertID();
|
||||||
|
|||||||
+119
-96
@@ -1259,7 +1259,7 @@ class YUI {
|
|||||||
}elseif($check[0]['sort'] < $check2[0]['pos'])
|
}elseif($check[0]['sort'] < $check2[0]['pos'])
|
||||||
{
|
{
|
||||||
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
||||||
if(count($kinderartikel)){
|
if((empty($kinderartikel)?0:count($kinderartikel))){
|
||||||
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
||||||
$zuverschiebendezwischenpositionen = $this->app->DB->SelectArr("SELECT ID,pos FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos <='$maxsortkind' AND pos >= '".$check[0]['sort']."'");
|
$zuverschiebendezwischenpositionen = $this->app->DB->SelectArr("SELECT ID,pos FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos <='$maxsortkind' AND pos >= '".$check[0]['sort']."'");
|
||||||
$zwipos = "(".implode(",", $zuverschiebendezwischenpositionen).")";
|
$zwipos = "(".implode(",", $zuverschiebendezwischenpositionen).")";
|
||||||
@@ -1273,13 +1273,13 @@ class YUI {
|
|||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = ".$check2[0]['pos']." WHERE $module = '$id' AND id = '".$check[0]['id']."'");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = ".$check2[0]['pos']." WHERE $module = '$id' AND id = '".$check[0]['id']."'");
|
||||||
if(!empty($kinderartikel)){
|
if(!empty($kinderartikel)){
|
||||||
$elternsort = $check[0]['sort'];
|
$elternsort = $check[0]['sort'];
|
||||||
$ckinderartikel = count($kinderartikel);
|
$ckinderartikel = (empty($kinderartikel)?0:count($kinderartikel));
|
||||||
for ($i=0; $i < $ckinderartikel; $i++) {
|
for ($i=0; $i < $ckinderartikel; $i++) {
|
||||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = pos - 1 WHERE doctype = '".$module."' AND doctypeid = '$id' AND pos < '".($check2[0]['pos'])."' AND pos >= '".$check[0]['sort']."'");
|
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = pos - 1 WHERE doctype = '".$module."' AND doctypeid = '$id' AND pos < '".($check2[0]['pos'])."' AND pos >= '".$check[0]['sort']."'");
|
||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort - 1 WHERE $module = '$id' AND sort > '$elternsort' AND sort <= '".$check2[0]['pos']."'");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort - 1 WHERE $module = '$id' AND sort > '$elternsort' AND sort <= '".$check2[0]['pos']."'");
|
||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".($check2[0]['pos']-$i)."' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".($check2[0]['pos']-$i)."' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
||||||
}
|
}
|
||||||
if(count($zuverschiebendezwischenpositionen)){
|
if((empty($zuverschiebendezwischenpositionen)?0:count($zuverschiebendezwischenpositionen))){
|
||||||
$positionsanzahl = $this->app->DB->Select("SELECT sort-".$check[0]['sort']." FROM auftrag_position WHERE id = '".$check[0]['id']."'");
|
$positionsanzahl = $this->app->DB->Select("SELECT sort-".$check[0]['sort']." FROM auftrag_position WHERE id = '".$check[0]['id']."'");
|
||||||
foreach ($zuverschiebendezwischenpositionen as $zkey => $zvalue) {
|
foreach ($zuverschiebendezwischenpositionen as $zkey => $zvalue) {
|
||||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = ".$zvalue['pos']." + $positionsanzahl WHERE id = '".$zvalue['ID']."'");
|
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = ".$zvalue['pos']." + $positionsanzahl WHERE id = '".$zvalue['ID']."'");
|
||||||
@@ -1293,7 +1293,7 @@ class YUI {
|
|||||||
{
|
{
|
||||||
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
||||||
$zuverschiebendezwischenpositionen= array(0);
|
$zuverschiebendezwischenpositionen= array(0);
|
||||||
if(count($kinderartikel)){
|
if((empty($kinderartikel)?0:count($kinderartikel))){
|
||||||
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
||||||
$zuverschiebendezwischenpositionentmp = $this->app->DB->SelectArr("SELECT ID FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos <='$maxsortkind' AND pos >= '".$check[0]['sort']."'");
|
$zuverschiebendezwischenpositionentmp = $this->app->DB->SelectArr("SELECT ID FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos <='$maxsortkind' AND pos >= '".$check[0]['sort']."'");
|
||||||
$zuverschiebendezwischenpositionen = array(0);
|
$zuverschiebendezwischenpositionen = array(0);
|
||||||
@@ -1319,7 +1319,7 @@ class YUI {
|
|||||||
if(!empty($kinderartikel)){
|
if(!empty($kinderartikel)){
|
||||||
$elternsort = $check2[0]['pos']+1;
|
$elternsort = $check2[0]['pos']+1;
|
||||||
$zielpos = $elternsort+1;
|
$zielpos = $elternsort+1;
|
||||||
$ckinderartikel = count($kinderartikel);
|
$ckinderartikel = (empty($kinderartikel)?0:count($kinderartikel));
|
||||||
for ($i=0; $i < $ckinderartikel; $i++) {
|
for ($i=0; $i < $ckinderartikel; $i++) {
|
||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort + 1 WHERE $module = '$id' AND sort < '".$kinderartikel[$i]['sort']."' AND sort > '".($elternsort+$i)."'");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort + 1 WHERE $module = '$id' AND sort < '".$kinderartikel[$i]['sort']."' AND sort > '".($elternsort+$i)."'");
|
||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".($zielpos+$i)."' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".($zielpos+$i)."' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
||||||
@@ -1355,12 +1355,12 @@ class YUI {
|
|||||||
if($check[0]['sort'] < $check2[0]['sort'])
|
if($check[0]['sort'] < $check2[0]['sort'])
|
||||||
{
|
{
|
||||||
$maxsort = $check[0]['sort'];
|
$maxsort = $check[0]['sort'];
|
||||||
$zuverschiebendezwischenpositionen = '';
|
$zuverschiebendezwischenpositionen = array(0);
|
||||||
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
||||||
if(count($kinderartikel)){
|
if((empty($kinderartikel)?0:count($kinderartikel))){
|
||||||
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
||||||
$zuverschiebendezwischenpositionentmp = $this->app->DB->SelectArr("SELECT ID FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos >='$maxsort' AND pos <= '$maxsortkind'");
|
$zuverschiebendezwischenpositionentmp = $this->app->DB->SelectArr("SELECT ID FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos >='$maxsort' AND pos <= '$maxsortkind'");
|
||||||
$zuverschiebendezwischenpositionen = array();
|
$zuverschiebendezwischenpositionen = array(0);
|
||||||
if(is_array($zuverschiebendezwischenpositionentmp)){
|
if(is_array($zuverschiebendezwischenpositionentmp)){
|
||||||
foreach ($zuverschiebendezwischenpositionentmp as $key => $value) {
|
foreach ($zuverschiebendezwischenpositionentmp as $key => $value) {
|
||||||
$zuverschiebendezwischenpositionen[] = $value['ID'];
|
$zuverschiebendezwischenpositionen[] = $value['ID'];
|
||||||
@@ -1376,10 +1376,10 @@ class YUI {
|
|||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".$check2[0]['sort']."' WHERE $module = '$id' AND id = '".$check[0]['id']."' LIMIT 1");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".$check2[0]['sort']."' WHERE $module = '$id' AND id = '".$check[0]['id']."' LIMIT 1");
|
||||||
|
|
||||||
if(!empty($kinderartikel)){
|
if(!empty($kinderartikel)){
|
||||||
$differenzwert = $check2[0]['sort'] - $check[0]['sort']-count($kinderartikel);
|
$differenzwert = $check2[0]['sort'] - $check[0]['sort']-(empty($kinderartikel)?0:count($kinderartikel));
|
||||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos=pos+$differenzwert WHERE id IN $zwipos");
|
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos=pos+$differenzwert WHERE id IN $zwipos");
|
||||||
$elternsort = $check2[0]['sort'];
|
$elternsort = $check2[0]['sort'];
|
||||||
$ckinderartikel = count($kinderartikel);
|
$ckinderartikel = (empty($kinderartikel)?0:count($kinderartikel));
|
||||||
for ($i=0; $i < $ckinderartikel; $i++) {
|
for ($i=0; $i < $ckinderartikel; $i++) {
|
||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort - 1 WHERE $module = '$id' AND sort > '".$kinderartikel[$i]['sort']."' AND sort < '$elternsort'");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort - 1 WHERE $module = '$id' AND sort > '".$kinderartikel[$i]['sort']."' AND sort < '$elternsort'");
|
||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '$elternsort' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '$elternsort' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
||||||
@@ -1412,7 +1412,7 @@ class YUI {
|
|||||||
$differenzwert = $check[0]['sort'] - ($check2[0]['sort'] + 1);
|
$differenzwert = $check[0]['sort'] - ($check2[0]['sort'] + 1);
|
||||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos=pos-$differenzwert WHERE id IN $zwipos");
|
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos=pos-$differenzwert WHERE id IN $zwipos");
|
||||||
$elternsort = $check2[0]['sort']+1;
|
$elternsort = $check2[0]['sort']+1;
|
||||||
$ckinderartikel = count($kinderartikel);
|
$ckinderartikel = (empty($kinderartikel)?0:count($kinderartikel));
|
||||||
for ($i=0; $i < $ckinderartikel; $i++) {
|
for ($i=0; $i < $ckinderartikel; $i++) {
|
||||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = pos + 1 WHERE doctype = '".$module."' AND doctypeid = '$id' AND pos >= '".$check2[0]['sort']."' AND pos <= '$maxsortkind' AND NOT id IN $zwipos");
|
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = pos + 1 WHERE doctype = '".$module."' AND doctypeid = '$id' AND pos >= '".$check2[0]['sort']."' AND pos <= '$maxsortkind' AND NOT id IN $zwipos");
|
||||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort + 1 WHERE $module = '$id' AND sort < '".$maxsortkind."' AND sort > '$elternsort'");
|
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort + 1 WHERE $module = '$id' AND sort < '".$maxsortkind."' AND sort > '$elternsort'");
|
||||||
@@ -1455,6 +1455,8 @@ class YUI {
|
|||||||
$cmd = $this->app->Secure->GetGET('cmd');
|
$cmd = $this->app->Secure->GetGET('cmd');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$priceCol = 'b.preis';
|
||||||
|
|
||||||
if($cmd === 'getpreise') {
|
if($cmd === 'getpreise') {
|
||||||
$ret = null;
|
$ret = null;
|
||||||
//$scol = $this->app->Secure->GetPOST('scol');
|
//$scol = $this->app->Secure->GetPOST('scol');
|
||||||
@@ -1472,7 +1474,6 @@ class YUI {
|
|||||||
$projekt = $moduleArr['projekt'];//$this->app->DB->Select("SELECT projekt FROM $module WHERE id = '$id' LIMIT 1");
|
$projekt = $moduleArr['projekt'];//$this->app->DB->Select("SELECT projekt FROM $module WHERE id = '$id' LIMIT 1");
|
||||||
$adresse = $moduleArr['adresse'];//$this->app->DB->Select("SELECT adresse FROM $module WHERE id = '$id' LIMIT 1");
|
$adresse = $moduleArr['adresse'];//$this->app->DB->Select("SELECT adresse FROM $module WHERE id = '$id' LIMIT 1");
|
||||||
$funktion = ucfirst($module).'MitUmsatzeuer';
|
$funktion = ucfirst($module).'MitUmsatzeuer';
|
||||||
$priceCol = 'b.preis';
|
|
||||||
$join = '';
|
$join = '';
|
||||||
$anrede = 'firma';
|
$anrede = 'firma';
|
||||||
if(!$this->app->erp->AnzeigeBelegNettoAdresse($anrede, $module, $projekt, $adresse, $id)
|
if(!$this->app->erp->AnzeigeBelegNettoAdresse($anrede, $module, $projekt, $adresse, $id)
|
||||||
@@ -1507,7 +1508,7 @@ class YUI {
|
|||||||
$positionsIds = [];
|
$positionsIds = [];
|
||||||
foreach($prices as $priceInForm) {
|
foreach($prices as $priceInForm) {
|
||||||
$priceSplit = explode(':', $priceInForm);
|
$priceSplit = explode(':', $priceInForm);
|
||||||
if(count($priceSplit) == 2) {
|
if((empty($priceSplit)?0:count($priceSplit)) == 2) {
|
||||||
$elementId = $priceSplit[0];
|
$elementId = $priceSplit[0];
|
||||||
$price = trim($priceSplit[1]);
|
$price = trim($priceSplit[1]);
|
||||||
$idSplit = explode('split', $elementId);
|
$idSplit = explode('split', $elementId);
|
||||||
@@ -1519,7 +1520,7 @@ class YUI {
|
|||||||
}
|
}
|
||||||
foreach($quantities as $quantityInForm) {
|
foreach($quantities as $quantityInForm) {
|
||||||
$quantitySplittet = explode(':', $quantityInForm);
|
$quantitySplittet = explode(':', $quantityInForm);
|
||||||
if(count($quantitySplittet) == 2) {
|
if((empty($quantitySplittet)?0:count($quantitySplittet)) == 2) {
|
||||||
$elementId = $quantitySplittet[0];
|
$elementId = $quantitySplittet[0];
|
||||||
$quantity = $this->app->erp->ReplaceMenge(1, trim($quantitySplittet[1]), 1);
|
$quantity = $this->app->erp->ReplaceMenge(1, trim($quantitySplittet[1]), 1);
|
||||||
if(!is_numeric($quantity)) {
|
if(!is_numeric($quantity)) {
|
||||||
@@ -1541,7 +1542,7 @@ class YUI {
|
|||||||
if(!empty($positionsIds)) {
|
if(!empty($positionsIds)) {
|
||||||
$positions = $this->app->DB->SelectArr(
|
$positions = $this->app->DB->SelectArr(
|
||||||
sprintf(
|
sprintf(
|
||||||
"SELECT b.id, %s AS `preis`, b.menge
|
"SELECT b.id, %s AS `preis`, trim(b.menge)+0 as menge
|
||||||
FROM `%s` AS `b`
|
FROM `%s` AS `b`
|
||||||
%s
|
%s
|
||||||
WHERE b.`%s` = %d AND b.id IN (%s)",
|
WHERE b.`%s` = %d AND b.id IN (%s)",
|
||||||
@@ -1560,8 +1561,8 @@ class YUI {
|
|||||||
) {
|
) {
|
||||||
$price = rtrim(number_format($position['preis'], 8, ',', '.'), '0');
|
$price = rtrim(number_format($position['preis'], 8, ',', '.'), '0');
|
||||||
$priceSplit = explode(',', $price);
|
$priceSplit = explode(',', $price);
|
||||||
if(strlen($priceSplit[count($priceSplit)-1]) < 2) {
|
if(strlen($priceSplit[(empty($priceSplit)?0:count($priceSplit))-1]) < 2) {
|
||||||
$price .= str_repeat('0',2-strlen($priceSplit[count($priceSplit)-1]));
|
$price .= str_repeat('0',2-strlen($priceSplit[(empty($priceSplit)?0:count($priceSplit))-1]));
|
||||||
}
|
}
|
||||||
$ret[] = ['elid' => $arr[$positionId]['price_id'], 'value' => $price];
|
$ret[] = ['elid' => $arr[$positionId]['price_id'], 'value' => $price];
|
||||||
}
|
}
|
||||||
@@ -2251,7 +2252,7 @@ class YUI {
|
|||||||
$allestaffelpreise = array();
|
$allestaffelpreise = array();
|
||||||
$allestaffelpreise = $this->app->DB->SelectArr("SELECT * FROM verkaufspreise WHERE artikel='$artikel_id' AND geloescht = 0 AND (gueltig_bis >= '".date("Y-m-d")."' OR gueltig_bis = '0000-00-00') AND (gueltig_ab <= '".date("Y-m-d")."' OR gueltig_ab = '0000-00-00') AND (adresse='0' OR adresse='$adresse') AND (gruppe='0') AND inbelegausblenden=0");
|
$allestaffelpreise = $this->app->DB->SelectArr("SELECT * FROM verkaufspreise WHERE artikel='$artikel_id' AND geloescht = 0 AND (gueltig_bis >= '".date("Y-m-d")."' OR gueltig_bis = '0000-00-00') AND (gueltig_ab <= '".date("Y-m-d")."' OR gueltig_ab = '0000-00-00') AND (adresse='0' OR adresse='$adresse') AND (gruppe='0') AND inbelegausblenden=0");
|
||||||
$anzeigepreise = array();
|
$anzeigepreise = array();
|
||||||
for ($i=0; $i < count($allestaffelpreise); $i++) {
|
for ($i=0; $i < (empty($allestaffelpreise)?0:count($allestaffelpreise)); $i++) {
|
||||||
if(!isset($anzeigepreise[$allestaffelpreise[$i]['ab_menge']])){
|
if(!isset($anzeigepreise[$allestaffelpreise[$i]['ab_menge']])){
|
||||||
$anzeigepreise[$allestaffelpreise[$i]['ab_menge']] = $allestaffelpreise[$i];
|
$anzeigepreise[$allestaffelpreise[$i]['ab_menge']] = $allestaffelpreise[$i];
|
||||||
}else{
|
}else{
|
||||||
@@ -2260,7 +2261,7 @@ class YUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(count($anzeigepreise)>1){
|
if((empty($anzeigepreise)?0:count($anzeigepreise))>1){
|
||||||
ksort($anzeigepreise);
|
ksort($anzeigepreise);
|
||||||
$staffelpreistext = '';
|
$staffelpreistext = '';
|
||||||
$belegsprache = $this->app->DB->Select("SELECT sprache FROM $module WHERE id='$id' LIMIT 1");
|
$belegsprache = $this->app->DB->Select("SELECT sprache FROM $module WHERE id='$id' LIMIT 1");
|
||||||
@@ -2580,7 +2581,7 @@ class YUI {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, ".$this->app->erp->FormatMenge('b.menge')." as menge, ".$this->FormatPreis($preiscell)." as preis,b.waehrung, ".$this->FormatPreis('b.rabatt')." as rabatt, ";
|
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis($preiscell)." as preis,b.waehrung, ".$this->FormatPreis('b.rabatt')." as rabatt, ";
|
||||||
|
|
||||||
|
|
||||||
$sql .= "b.id as id
|
$sql .= "b.id as id
|
||||||
@@ -2600,7 +2601,7 @@ class YUI {
|
|||||||
as Artikel,
|
as Artikel,
|
||||||
|
|
||||||
|
|
||||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, ".$this->app->erp->FormatMenge('b.menge')." as menge, if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert, b.id as id
|
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert, b.id as id
|
||||||
FROM $table b
|
FROM $table b
|
||||||
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
|
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
|
||||||
WHERE b.$module='$id'";
|
WHERE b.$module='$id'";
|
||||||
@@ -2655,7 +2656,7 @@ class YUI {
|
|||||||
|
|
||||||
|
|
||||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum,
|
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum,
|
||||||
".$this->app->erp->FormatMenge('b.menge')." as menge,
|
trim(b.menge)+0 as menge,
|
||||||
if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert,
|
if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert,
|
||||||
if(b.menge_eingang, ".$this->app->erp->FormatMenge('b.menge_eingang')." ,'-') as `Eingang`,
|
if(b.menge_eingang, ".$this->app->erp->FormatMenge('b.menge_eingang')." ,'-') as `Eingang`,
|
||||||
if(b.menge_gutschrift, ".$this->app->erp->FormatMenge('b.menge_gutschrift')." ,'-') as `Menge Gutschrift`,
|
if(b.menge_gutschrift, ".$this->app->erp->FormatMenge('b.menge_gutschrift')." ,'-') as `Menge Gutschrift`,
|
||||||
@@ -2677,7 +2678,7 @@ class YUI {
|
|||||||
as Artikel,
|
as Artikel,
|
||||||
|
|
||||||
|
|
||||||
p.abkuerzung as projekt, b.nummer as nummer, ".$this->app->erp->FormatMenge('b.menge')." as menge,
|
p.abkuerzung as projekt, b.nummer as nummer, trim(b.menge)+0 as menge,
|
||||||
".$this->FormatPreis(' b.preis')." as preis,
|
".$this->FormatPreis(' b.preis')." as preis,
|
||||||
|
|
||||||
b.id as id
|
b.id as id
|
||||||
@@ -2694,7 +2695,7 @@ class YUI {
|
|||||||
as Artikel,
|
as Artikel,
|
||||||
|
|
||||||
|
|
||||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(b.lieferdatum,'%d.%m.%Y') as lieferdatum, ".$this->app->erp->FormatMenge('b.menge')." as menge,
|
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(b.lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge,
|
||||||
|
|
||||||
b.id as id
|
b.id as id
|
||||||
FROM $table b
|
FROM $table b
|
||||||
@@ -2716,7 +2717,7 @@ class YUI {
|
|||||||
if(CHAR_LENGTH(b.bezeichnunglieferant)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnunglieferant,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnunglieferant,' *')),
|
if(CHAR_LENGTH(b.bezeichnunglieferant)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnunglieferant,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnunglieferant,' *')),
|
||||||
if(CHAR_LENGTH(b.bezeichnunglieferant)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnunglieferant,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnunglieferant)))
|
if(CHAR_LENGTH(b.bezeichnunglieferant)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnunglieferant,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnunglieferant)))
|
||||||
as Artikel,
|
as Artikel,
|
||||||
p.abkuerzung as projekt, a.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum,".$this->app->erp->FormatMenge('b.menge')." as menge, ".$this->FormatPreis(' b.preis')." as preis, b.waehrung, b.id as id
|
p.abkuerzung as projekt, a.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis(' b.preis')." as preis, b.waehrung, b.id as id
|
||||||
FROM $table b
|
FROM $table b
|
||||||
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
|
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
|
||||||
WHERE b.$module='$id'";
|
WHERE b.$module='$id'";
|
||||||
@@ -3419,7 +3420,7 @@ class YUI {
|
|||||||
$check = $this->app->DB->Select("SELECT id FROM `auftragsampel_auftrageinstellungen` LIMIT 1");
|
$check = $this->app->DB->Select("SELECT id FROM `auftragsampel_auftrageinstellungen` LIMIT 1");
|
||||||
$deaktivertok = false;
|
$deaktivertok = false;
|
||||||
if(!$this->app->DB->error())$deaktivertok = true;
|
if(!$this->app->DB->error())$deaktivertok = true;
|
||||||
$anzahl3 = count($auftragsampel);
|
$anzahl3 = (empty($auftragsampel)?0:count($auftragsampel));
|
||||||
$anzahl += $anzahl3;
|
$anzahl += $anzahl3;
|
||||||
$ifextra2a[] = " a.status = 'abgeschlossen' ";
|
$ifextra2a[] = " a.status = 'abgeschlossen' ";
|
||||||
foreach($auftragsampel as $k => $ampel)
|
foreach($auftragsampel as $k => $ampel)
|
||||||
@@ -3440,7 +3441,7 @@ class YUI {
|
|||||||
if($deaktivertok) $_extra2e = "),'<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/abgeschlossen.png\" title=\"Auftragsampel deaktivert\" border=\"0\" style=\"margin-right:1px\">'
|
if($deaktivertok) $_extra2e = "),'<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/abgeschlossen.png\" title=\"Auftragsampel deaktivert\" border=\"0\" style=\"margin-right:1px\">'
|
||||||
|
|
||||||
)";
|
)";
|
||||||
if($deaktivertok) $_extra2e = "),'".str_repeat($_extra2icon,count($auftragsampel))."')";
|
if($deaktivertok) $_extra2e = "),'".str_repeat($_extra2icon,(empty($auftragsampel)?0:count($auftragsampel)))."')";
|
||||||
$extra3 .= ",'".$abgeschlossen."'";
|
$extra3 .= ",'".$abgeschlossen."'";
|
||||||
$ifextra2a[] = "
|
$ifextra2a[] = "
|
||||||
substring(ifnull(aac.status,'".str_repeat('0', $anzahl3)."'),$k2,1) = '1' ";
|
substring(ifnull(aac.status,'".str_repeat('0', $anzahl3)."'),$k2,1) = '1' ";
|
||||||
@@ -3452,7 +3453,7 @@ class YUI {
|
|||||||
$check = $this->app->DB->Select("SELECT id FROM `auftragsampel_auftrageinstellungen` LIMIT 1");
|
$check = $this->app->DB->Select("SELECT id FROM `auftragsampel_auftrageinstellungen` LIMIT 1");
|
||||||
$deaktivertok = false;
|
$deaktivertok = false;
|
||||||
if(!$this->app->DB->error())$deaktivertok = true;
|
if(!$this->app->DB->error())$deaktivertok = true;
|
||||||
$anzahl3 = count($auftragsampel);
|
$anzahl3 = (empty($auftragsampel)?0:count($auftragsampel));
|
||||||
$anzahl += $anzahl3;
|
$anzahl += $anzahl3;
|
||||||
$ifextra2a[] = " a.status = 'abgeschlossen' ";
|
$ifextra2a[] = " a.status = 'abgeschlossen' ";
|
||||||
foreach($auftragsampel as $ampel)
|
foreach($auftragsampel as $ampel)
|
||||||
@@ -3462,7 +3463,7 @@ class YUI {
|
|||||||
if($deaktivertok) $_extra2a = ",if(isnull((SELECT aae.id FROM auftragsampel_auftrageinstellungen aae WHERE aae.auftrag = a.id AND aae.deaktiviert = 1 LIMIT 1)),concat(''";
|
if($deaktivertok) $_extra2a = ",if(isnull((SELECT aae.id FROM auftragsampel_auftrageinstellungen aae WHERE aae.auftrag = a.id AND aae.deaktiviert = 1 LIMIT 1)),concat(''";
|
||||||
$extra2 .= "IF(isnull( (SELECT aampa.id FROM auftragsampel_auftrag aampa WHERE aampa.auftrag = a.id AND aampa.auftragsampel = '".$ampel['id']."' AND aampa.erledigt = 1) ), "."'<img src=\"./pages/icons/".str_replace('_go_','_stop_',$ampel['icon'])."\" title=\"".$ampel['beschriftung']."\" border=\"0\" style=\"margin-right:1px\">'".","."'<img src=\"./pages/icons/".$ampel['icon']."\" title=\"".$ampel['beschriftung']."\" border=\"0\" style=\"margin-right:1px\">'". ") ";
|
$extra2 .= "IF(isnull( (SELECT aampa.id FROM auftragsampel_auftrag aampa WHERE aampa.auftrag = a.id AND aampa.auftragsampel = '".$ampel['id']."' AND aampa.erledigt = 1) ), "."'<img src=\"./pages/icons/".str_replace('_go_','_stop_',$ampel['icon'])."\" title=\"".$ampel['beschriftung']."\" border=\"0\" style=\"margin-right:1px\">'".","."'<img src=\"./pages/icons/".$ampel['icon']."\" title=\"".$ampel['beschriftung']."\" border=\"0\" style=\"margin-right:1px\">'". ") ";
|
||||||
if($deaktivertok) $_extra2e = "),'<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/abgeschlossen.png\" title=\"Auftragsampel deaktivert\" border=\"0\" style=\"margin-right:1px\">')";
|
if($deaktivertok) $_extra2e = "),'<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/abgeschlossen.png\" title=\"Auftragsampel deaktivert\" border=\"0\" style=\"margin-right:1px\">')";
|
||||||
if($deaktivertok) $_extra2e = "),'".str_repeat($_extra2icon,count($auftragsampel))."')";
|
if($deaktivertok) $_extra2e = "),'".str_repeat($_extra2icon,(empty($auftragsampel)?0:count($auftragsampel)))."')";
|
||||||
$extra3 .= ",'".$abgeschlossen."'";
|
$extra3 .= ",'".$abgeschlossen."'";
|
||||||
$ifextra2a[] = "
|
$ifextra2a[] = "
|
||||||
not isnull( (SELECT aampa.id FROM auftragsampel_auftrag aampa WHERE aampa.auftrag = a.id AND aampa.auftragsampel = '".$ampel['id']."' AND aampa.erledigt = 1) ) ";
|
not isnull( (SELECT aampa.id FROM auftragsampel_auftrag aampa WHERE aampa.auftrag = a.id AND aampa.auftragsampel = '".$ampel['id']."' AND aampa.erledigt = 1) ) ";
|
||||||
@@ -3747,7 +3748,7 @@ class YUI {
|
|||||||
$module = $this->app->Secure->GetGET("module");
|
$module = $this->app->Secure->GetGET("module");
|
||||||
$this->app->Tpl->Add('JAVASCRIPT', 'function ' . $name . 'fnFormatDetails ( nTr ) {
|
$this->app->Tpl->Add('JAVASCRIPT', 'function ' . $name . 'fnFormatDetails ( nTr ) {
|
||||||
//var aData = oTable' . $name . '.fnGetData( nTr );
|
//var aData = oTable' . $name . '.fnGetData( nTr );
|
||||||
var str = aData[' . (isset($menucol)?$menucol:count($heading)-1) . '];
|
var str = aData[' . (isset($menucol)?$menucol:(empty($heading)?0:count($heading))-1) . '];
|
||||||
|
|
||||||
var match = str.match(/[1-9]{1}[0-9]*/);
|
var match = str.match(/[1-9]{1}[0-9]*/);
|
||||||
|
|
||||||
@@ -3770,14 +3771,14 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
|||||||
}
|
}
|
||||||
');
|
');
|
||||||
}
|
}
|
||||||
$colspan = count($heading);
|
$colspan = (empty($heading)?0:count($heading));
|
||||||
|
|
||||||
//<tr><th colspan="' . $colspan . '"><br></th></tr>
|
//<tr><th colspan="' . $colspan . '"><br></th></tr>
|
||||||
$this->app->Tpl->Add($parsetarget, '
|
$this->app->Tpl->Add($parsetarget, '
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="' . $name . '">
|
<table cellpadding="0" cellspacing="0" border="0" class="display" id="' . $name . '">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>');
|
<tr>');
|
||||||
for ($i = 0;$i < count($heading);$i++) {
|
for ($i = 0;$i < (empty($heading)?0:count($heading));$i++) {
|
||||||
$this->app->Tpl->Add($parsetarget, '<th width="' . $width[$i] . '">' . $heading[$i] . '</th>');
|
$this->app->Tpl->Add($parsetarget, '<th width="' . $width[$i] . '">' . $heading[$i] . '</th>');
|
||||||
}
|
}
|
||||||
$this->app->Tpl->Add($parsetarget, '</tr>
|
$this->app->Tpl->Add($parsetarget, '</tr>
|
||||||
@@ -3791,7 +3792,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
|||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
');
|
');
|
||||||
for ($i = 0;$i < count($heading);$i++) {
|
for ($i = 0;$i < (empty($heading)?0:count($heading));$i++) {
|
||||||
$this->app->Tpl->Add($parsetarget, '<th>' . $heading[$i] . '</th>');
|
$this->app->Tpl->Add($parsetarget, '<th>' . $heading[$i] . '</th>');
|
||||||
}
|
}
|
||||||
$this->app->Tpl->Add($parsetarget, '
|
$this->app->Tpl->Add($parsetarget, '
|
||||||
@@ -5816,7 +5817,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
|||||||
if ($more_data3 == 1) $subwhere[] = " l.lieferantenretoure=1 ";
|
if ($more_data3 == 1) $subwhere[] = " l.lieferantenretoure=1 ";
|
||||||
|
|
||||||
// ENDE EXTRA more
|
// ENDE EXTRA more
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
$where = " l.id!='' AND l.status!='angelegt' $tmp " . $this->app->erp->ProjektRechte('p.id', true, 'l.vertriebid');
|
$where = " l.id!='' AND l.status!='angelegt' $tmp " . $this->app->erp->ProjektRechte('p.id', true, 'l.vertriebid');
|
||||||
|
|
||||||
/* STAMMDATEN */
|
/* STAMMDATEN */
|
||||||
@@ -6081,11 +6082,11 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
|||||||
|
|
||||||
|
|
||||||
$heading = array('', '', 'Gutschrift', 'Vom', 'Kd-Nr.', 'Kunde', 'Land', 'Projekt',
|
$heading = array('', '', 'Gutschrift', 'Vom', 'Kd-Nr.', 'Kunde', 'Land', 'Projekt',
|
||||||
'Zahlweise', 'Betrag (brutto)', 'bezahlt','RE-Nr.', 'Status','Monitor' ,'Menü'
|
'Zahlweise', 'Betrag (brutto)', 'Zahlstatus','Differenz','RE-Nr.', 'Status','Monitor' ,'Menü'
|
||||||
);
|
);
|
||||||
|
|
||||||
$width = array('1%', '1%', '10%', '10%', '10%', '25%', '5%', '1%', '1%', '1%', '1%', '1%','5%', '1%','1%', '1%');
|
$width = array('1%', '1%', '10%', '10%', '10%', '25%', '5%', '1%', '1%', '1%', '1%', '1%', '1%','5%', '1%','1%', '1%');
|
||||||
$findcols = array('open', 'r.belegnr', 'r.belegnr', 'r.datum', 'adr.kundennummer', 'r.name', 'r.land', 'p.abkuerzung', 'r.zahlungsweise', 'r.soll','re.belegnr', 'r.zahlungsstatus', 'r.status', 'pt.payement_status' ,'id');
|
$findcols = array('open', 'r.belegnr', 'r.belegnr', 'r.datum', 'adr.kundennummer', 'r.name', 'r.land', 'p.abkuerzung', 'r.zahlungsweise', 'r.soll', 'r.zahlungsstatus','r.soll-r.ist', 're.belegnr', 'r.status', 'id');
|
||||||
$searchsql = array('DATE_FORMAT(r.datum,\'%d.%m.%Y\')', 'r.belegnr', 'adr.kundennummer', 'r.name', 'r.land', 'p.abkuerzung','re.belegnr', 'r.status', "FORMAT(r.soll,2{$extended_mysql55})", 'adr.freifeld1', 'r.ihrebestellnummer','r.internebezeichnung','au.internet');
|
$searchsql = array('DATE_FORMAT(r.datum,\'%d.%m.%Y\')', 'r.belegnr', 'adr.kundennummer', 'r.name', 'r.land', 'p.abkuerzung','re.belegnr', 'r.status', "FORMAT(r.soll,2{$extended_mysql55})", 'adr.freifeld1', 'r.ihrebestellnummer','r.internebezeichnung','au.internet');
|
||||||
$defaultorder = 13; //Optional wenn andere Reihenfolge gewuenscht
|
$defaultorder = 13; //Optional wenn andere Reihenfolge gewuenscht
|
||||||
|
|
||||||
@@ -6127,20 +6128,31 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
|||||||
$menu .= "</table>";
|
$menu .= "</table>";
|
||||||
|
|
||||||
|
|
||||||
$menucol = 14;
|
$menucol = 15;
|
||||||
|
|
||||||
$parameter = $this->app->User->GetParameter('table_filter_gutschrift');
|
$parameter = $this->app->User->GetParameter('table_filter_gutschrift');
|
||||||
$parameter = base64_decode($parameter);
|
$parameter = base64_decode($parameter);
|
||||||
$parameter = json_decode($parameter, true);
|
$parameter = json_decode($parameter, true);
|
||||||
|
|
||||||
// SQL statement
|
// SQL statement
|
||||||
$sql = "SELECT SQL_CALC_FOUND_ROWS r.id,'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' as open, concat('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',r.id,'\" />')as auswahl,
|
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||||
r.belegnr,
|
r.id,
|
||||||
DATE_FORMAT(r.datum,'%d.%m.%Y') as vom, adr.kundennummer as kundennummer,
|
'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' as open,
|
||||||
CONCAT(" . $this->app->erp->MarkerUseredit("r.name", "r.useredittimestamp") . ", if(r.internebezeichnung!='',CONCAT('<br><i style=color:#999>',r.internebezeichnung,'</i>'),'')) as kunde,
|
concat('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',r.id,'\" />')as auswahl,
|
||||||
r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
r.belegnr,
|
||||||
FORMAT(r.soll,2{$extended_mysql55}) as soll, r.zahlungsstatus as zahlung, re.belegnr as rechnung, UPPER(r.status) as status,
|
DATE_FORMAT(r.datum,'%d.%m.%Y') as vom,
|
||||||
".$this->IconsSQLReturnOrder()." ,r.id
|
adr.kundennummer as kundennummer,
|
||||||
|
CONCAT(" . $this->app->erp->MarkerUseredit("r.name", "r.useredittimestamp") . ", if(r.internebezeichnung!='',CONCAT('<br><i style=color:#999>',r.internebezeichnung,'</i>'),'')) as kunde,
|
||||||
|
r.land as land,
|
||||||
|
p.abkuerzung as projekt,
|
||||||
|
r.zahlungsweise as zahlungsweise,
|
||||||
|
".$this->app->erp->FormatMenge('r.soll',2)." as soll,
|
||||||
|
r.zahlungsstatus as zahlung,
|
||||||
|
".$this->app->erp->FormatMenge('r.soll-r.ist',2)." as differenz,
|
||||||
|
re.belegnr as rechnung,
|
||||||
|
UPPER(r.status) as status,
|
||||||
|
".$this->IconsSQLReturnOrder().",
|
||||||
|
r.id
|
||||||
FROM gutschrift r
|
FROM gutschrift r
|
||||||
LEFT JOIN rechnung re ON re.id=r.rechnungid
|
LEFT JOIN rechnung re ON re.id=r.rechnungid
|
||||||
LEFT JOIN projekt p ON p.id=r.projekt
|
LEFT JOIN projekt p ON p.id=r.projekt
|
||||||
@@ -6173,7 +6185,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
|||||||
|
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
if (!is_null($subwhere)) {
|
if (!is_null($subwhere)) {
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
}
|
}
|
||||||
|
|
||||||
$where = " r.status!='angelegt' AND r.id!='' ".$tmp ." ". $this->app->erp->ProjektRechte('p.id', true, 'r.vertriebid');
|
$where = " r.status!='angelegt' AND r.id!='' ".$tmp ." ". $this->app->erp->ProjektRechte('p.id', true, 'r.vertriebid');
|
||||||
@@ -6551,13 +6563,24 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
|||||||
// $columnfilter = true;
|
// $columnfilter = true;
|
||||||
|
|
||||||
// SQL statement
|
// SQL statement
|
||||||
$sql = "SELECT SQL_CALC_FOUND_ROWS r.id,'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' as open,concat('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',r.id,'\" />')as auswahl, r.belegnr, DATE_FORMAT(r.datum,'%d.%m.%Y') as vom,
|
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||||
if(r.kundennummer <> '',r.kundennummer,adr.kundennummer),
|
r.id,
|
||||||
|
'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' as open,
|
||||||
CONCAT(" . $this->app->erp->MarkerUseredit("r.name", "r.useredittimestamp") . ", if(r.internebezeichnung!='',CONCAT('<br><i style=color:#999>',r.internebezeichnung,'</i>'),'')) as kunde,
|
concat('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',r.id,'\" />') as auswahl,
|
||||||
r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise, FORMAT(r.soll,2{$extended_mysql55} ) as soll, ifnull(r.waehrung,'EUR'),
|
r.belegnr,
|
||||||
if(r.soll-r.ist+r.skonto_gegeben!=0 AND r.ist > 0 AND r.zahlungsstatus!='bezahlt','teilbezahlt',r.zahlungsstatus) as zahlung,
|
DATE_FORMAT(r.datum,'%d.%m.%Y') as vom,
|
||||||
if(r.soll-r.ist+r.skonto_gegeben!=0 AND r.ist > 0,FORMAT(r.ist-r.soll+r.skonto_gegeben,2{$extended_mysql55}),FORMAT((r.soll-r.ist+r.skonto_gegeben)*-1,2{$extended_mysql55})) as fehlt, if(r.status = 'storniert' AND r.teilstorno = 1,'TEILSTORNO',UPPER(r.status)) as status, ".(!empty($zusatzcols)?implode(', ',$zusatzcols).',':'')." r.id
|
if(r.kundennummer <> '',r.kundennummer,adr.kundennummer),
|
||||||
|
CONCAT(" . $this->app->erp->MarkerUseredit("r.name", "r.useredittimestamp") . ", if(r.internebezeichnung!='',CONCAT('<br><i style=color:#999>',r.internebezeichnung,'</i>'),'')) as kunde,
|
||||||
|
r.land as land,
|
||||||
|
p.abkuerzung as projekt,
|
||||||
|
r.zahlungsweise as zahlungsweise,
|
||||||
|
FORMAT(r.soll,2{$extended_mysql55} ) as soll,
|
||||||
|
ifnull(r.waehrung,'EUR'),
|
||||||
|
r.zahlungsstatus as zahlung,
|
||||||
|
if(r.soll-r.ist!=0 AND r.ist > 0,FORMAT(r.ist-r.soll,2{$extended_mysql55}),FORMAT((r.soll-r.ist)*-1,2{$extended_mysql55})) as fehlt,
|
||||||
|
if(r.status = 'storniert' AND r.teilstorno = 1,'TEILSTORNO',UPPER(r.status)) as status,
|
||||||
|
".(!empty($zusatzcols)?implode(', ',$zusatzcols).',':'')."
|
||||||
|
r.id
|
||||||
FROM rechnung r LEFT JOIN projekt p ON p.id=r.projekt LEFT JOIN adresse adr ON r.adresse=adr.id LEFT JOIN auftrag au ON au.id = r.auftragid ";
|
FROM rechnung r LEFT JOIN projekt p ON p.id=r.projekt LEFT JOIN adresse adr ON r.adresse=adr.id LEFT JOIN auftrag au ON au.id = r.auftragid ";
|
||||||
if(isset($parameter['artikel']) && !empty($parameter['artikel'])) {
|
if(isset($parameter['artikel']) && !empty($parameter['artikel'])) {
|
||||||
$artikelid = $this->app->DB->Select("SELECT id FROM artikel where geloescht != 1 AND nummer != 'DEL' AND nummer != '' AND nummer = '".$this->app->DB->real_escape_string(reset(explode(' ',trim($parameter['artikel']))))."' LIMIT 1");
|
$artikelid = $this->app->DB->Select("SELECT id FROM artikel where geloescht != 1 AND nummer != 'DEL' AND nummer != '' AND nummer = '".$this->app->DB->real_escape_string(reset(explode(' ',trim($parameter['artikel']))))."' LIMIT 1");
|
||||||
@@ -6589,7 +6612,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
|||||||
if ($more_data4 == 1) {
|
if ($more_data4 == 1) {
|
||||||
$subwhere[] = " r.status='storniert' ";
|
$subwhere[] = " r.status='storniert' ";
|
||||||
}
|
}
|
||||||
$csubwhere = !empty($subwhere)?count($subwhere):0;
|
$csubwhere = !empty($subwhere)?(empty($subwhere)?0:count($subwhere)):0;
|
||||||
for ($j = 0;$j < $csubwhere;$j++) {
|
for ($j = 0;$j < $csubwhere;$j++) {
|
||||||
$tmp.= " AND " . $subwhere[$j];
|
$tmp.= " AND " . $subwhere[$j];
|
||||||
}
|
}
|
||||||
@@ -6858,7 +6881,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
|||||||
if ($more_data1 == 1) $subwhere[] = " a.lagerartikel='1' ";
|
if ($more_data1 == 1) $subwhere[] = " a.lagerartikel='1' ";
|
||||||
|
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
$csubwhere = !empty($subwhere)?count($subwhere):0;
|
$csubwhere = !empty($subwhere)?(empty($subwhere)?0:count($subwhere)):0;
|
||||||
for ($j = 0;$j < $csubwhere;$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < $csubwhere;$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
|
|
||||||
if($liefertermine)
|
if($liefertermine)
|
||||||
@@ -7040,7 +7063,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
|||||||
$more_data7 = $this->app->Secure->GetGET("more_data7");
|
$more_data7 = $this->app->Secure->GetGET("more_data7");
|
||||||
|
|
||||||
// SQL statement
|
// SQL statement
|
||||||
$sql = "SELECT
|
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||||
b.id,'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' AS `open`,
|
b.id,'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' AS `open`,
|
||||||
CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',b.id,'\" />') AS `auswahl`,
|
CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',b.id,'\" />') AS `auswahl`,
|
||||||
IF(b.status='storniert',CONCAT(b.belegnr),b.belegnr) AS `belegnr`,
|
IF(b.status='storniert',CONCAT(b.belegnr),b.belegnr) AS `belegnr`,
|
||||||
@@ -7195,7 +7218,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($subwhere)) {
|
if (!is_null($subwhere)) {
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
}
|
}
|
||||||
|
|
||||||
// START EXTRA more
|
// START EXTRA more
|
||||||
@@ -7650,7 +7673,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
if($fteilprojektfilter) {
|
if($fteilprojektfilter) {
|
||||||
$subwhere[] = " a.teilprojekt = '$fteilprojektfilter' ";
|
$subwhere[] = " a.teilprojekt = '$fteilprojektfilter' ";
|
||||||
}
|
}
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
|
|
||||||
$where = " a.projekt='" . $id."'".$tmp;
|
$where = " a.projekt='" . $id."'".$tmp;
|
||||||
$count = "SELECT COUNT(a.id) FROM aufgabe a WHERE $where ";
|
$count = "SELECT COUNT(a.id) FROM aufgabe a WHERE $where ";
|
||||||
@@ -7738,7 +7761,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
$where = " (z.adresse_abrechnung='" . $id . "' OR p.kunde='$id') $tmp";
|
$where = " (z.adresse_abrechnung='" . $id . "' OR p.kunde='$id') $tmp";
|
||||||
|
|
||||||
$count = "SELECT COUNT(z.id) FROM zeiterfassung z LEFT JOIN adresse a ON a.id=z.adresse LEFT JOIN projekt p ON p.id=z.projekt WHERE $where";
|
$count = "SELECT COUNT(z.id) FROM zeiterfassung z LEFT JOIN adresse a ON a.id=z.adresse LEFT JOIN projekt p ON p.id=z.projekt WHERE $where";
|
||||||
@@ -7829,7 +7852,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
}else{
|
}else{
|
||||||
$subwhere[] = " z.abgerechnet <> 1 ";
|
$subwhere[] = " z.abgerechnet <> 1 ";
|
||||||
}
|
}
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
$where = " z.projekt ='" . $id . "' $tmp";
|
$where = " z.projekt ='" . $id . "' $tmp";
|
||||||
$count = "SELECT COUNT(z.id) FROM zeiterfassung z LEFT JOIN arbeitspaket arb ON z.arbeitspaket = arb.id WHERE $where";
|
$count = "SELECT COUNT(z.id) FROM zeiterfassung z LEFT JOIN arbeitspaket arb ON z.arbeitspaket = arb.id WHERE $where";
|
||||||
|
|
||||||
@@ -7969,7 +7992,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
|
|
||||||
|
|
||||||
$tmp = '';
|
$tmp = '';
|
||||||
$csubwhere = !empty($subwhere)?count($subwhere):0;
|
$csubwhere = !empty($subwhere)?(empty($subwhere)?0:count($subwhere)):0;
|
||||||
for ($j = 0;$j < $csubwhere;$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < $csubwhere;$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
$where = " a.id!='' AND a.status!='angelegt' $tmp " . $this->app->erp->ProjektRechte();
|
$where = " a.id!='' AND a.status!='angelegt' $tmp " . $this->app->erp->ProjektRechte();
|
||||||
|
|
||||||
@@ -8329,7 +8352,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
|
|
||||||
// $more_data2 = $this->app->Secure->GetGET("more_data2"); if($more_data2==1) $subwhere[] = " a.datum=CURDATE() AND a.status='freigegeben'";
|
// $more_data2 = $this->app->Secure->GetGET("more_data2"); if($more_data2==1) $subwhere[] = " a.datum=CURDATE() AND a.status='freigegeben'";
|
||||||
|
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
$id = $this->app->Secure->GetGET("id");
|
$id = $this->app->Secure->GetGET("id");
|
||||||
$where = " ap.aufgabe IS NOT NULL $tmp AND ap.projekt='$id' GROUP by Datum,ap.id ";
|
$where = " ap.aufgabe IS NOT NULL $tmp AND ap.projekt='$id' GROUP by Datum,ap.id ";
|
||||||
|
|
||||||
@@ -8392,7 +8415,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
$more_data1 = $this->app->Secure->GetGET("more_data1");
|
$more_data1 = $this->app->Secure->GetGET("more_data1");
|
||||||
|
|
||||||
if ($more_data1 == 1) $subwhere[] = " OR ( ap.abgenommen='1') ";
|
if ($more_data1 == 1) $subwhere[] = " OR ( ap.abgenommen='1') ";
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " " . $subwhere[$j];
|
||||||
|
|
||||||
// if($tmp!="")$tmp .= " AND e.geloescht='1' ";
|
// if($tmp!="")$tmp .= " AND e.geloescht='1' ";
|
||||||
|
|
||||||
@@ -8611,7 +8634,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
|
|
||||||
if (!is_null($subwhere))
|
if (!is_null($subwhere))
|
||||||
{
|
{
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($more_data1 == 1)
|
if ($more_data1 == 1)
|
||||||
@@ -8677,7 +8700,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
if ($more_data1 == 1) $subwhere[] = " AND ap.status='abgerechnet' ";
|
if ($more_data1 == 1) $subwhere[] = " AND ap.status='abgerechnet' ";
|
||||||
else $subwhere[] = " AND ap.status!='abgerechnet' ";
|
else $subwhere[] = " AND ap.status!='abgerechnet' ";
|
||||||
|
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " " . $subwhere[$j];
|
||||||
|
|
||||||
|
|
||||||
// Fester filter
|
// Fester filter
|
||||||
@@ -8770,7 +8793,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
if ($more_data1 == 1) $subwhere[] = " z.abrechnen='1' AND z.abgerechnet!='1' ";
|
if ($more_data1 == 1) $subwhere[] = " z.abrechnen='1' AND z.abgerechnet!='1' ";
|
||||||
|
|
||||||
// $more_data2 = $this->app->Secure->GetGET("more_data2"); if($more_data2==1) $subwhere[] = " a.datum=CURDATE() AND a.status='freigegeben'";
|
// $more_data2 = $this->app->Secure->GetGET("more_data2"); if($more_data2==1) $subwhere[] = " a.datum=CURDATE() AND a.status='freigegeben'";
|
||||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||||
$where = " z.id!='' AND z.adresse='" . $id . "' $tmp";
|
$where = " z.id!='' AND z.adresse='" . $id . "' $tmp";
|
||||||
$count = "SELECT COUNT(z.id) FROM zeiterfassung z WHERE z.adresse='" . $id . "'";
|
$count = "SELECT COUNT(z.id) FROM zeiterfassung z WHERE z.adresse='" . $id . "'";
|
||||||
$moreinfo = true;
|
$moreinfo = true;
|
||||||
@@ -9455,7 +9478,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
if(bearbeiter!="",bearbeiter,a2.name) as bearbeiter,
|
if(bearbeiter!="",bearbeiter,a2.name) as bearbeiter,
|
||||||
CONCAT(UCASE(LEFT(d.typ, 1)), SUBSTRING(d.typ, 2)) as art,
|
CONCAT(UCASE(LEFT(d.typ, 1)), SUBSTRING(d.typ, 2)) as art,
|
||||||
CONCAT(IF(d.sent = 1, "JA", "NEIN"),"<a data-type=dokumente data-id=", d.id, "></a>") as gesendet,
|
CONCAT(IF(d.sent = 1, "JA", "NEIN"),"<a data-type=dokumente data-id=", d.id, "></a>") as gesendet,
|
||||||
"" as pdf,
|
concat("<a href=\"index.php?module=dateien&action=send&id=",(SELECT datei FROM datei_stichwoerter WHERE subjekt="anhang" AND objekt="dokument" AND parameter = d.id LIMIT 1),"\"><img src=./themes/' . $this->app->Conf->WFconf['defaulttheme'] . '/images/pdf.svg></a>") as pdf,
|
||||||
concat("1","-",d.id) as did,d.content as suchtext,d.internebezeichnung
|
concat("1","-",d.id) as did,d.content as suchtext,d.internebezeichnung
|
||||||
FROM
|
FROM
|
||||||
dokumente d
|
dokumente d
|
||||||
@@ -9799,7 +9822,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
*/
|
*/
|
||||||
$this->app->User->SetParameter('stammdatenbereinigen_list_param', implode(';',$paramsGroupBy));
|
$this->app->User->SetParameter('stammdatenbereinigen_list_param', implode(';',$paramsGroupBy));
|
||||||
|
|
||||||
if(count($groupABy)>0)
|
if((empty($groupABy)?0:count($groupABy))>0)
|
||||||
{
|
{
|
||||||
$groupby = '
|
$groupby = '
|
||||||
GROUP BY ' . implode(',', $groupABy) . '
|
GROUP BY ' . implode(',', $groupABy) . '
|
||||||
@@ -10822,7 +10845,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
}
|
}
|
||||||
if(isset($alignright))
|
if(isset($alignright))
|
||||||
{
|
{
|
||||||
for ($aligni = 0;$aligni < count($alignright);$aligni++) {
|
for ($aligni = 0;$aligni < (empty($alignright)?0:count($alignright));$aligni++) {
|
||||||
$this->app->Tpl->Add('YUICSS', '
|
$this->app->Tpl->Add('YUICSS', '
|
||||||
#' . $name . ' > tbody > tr > td:nth-child(' . $alignright[$aligni] . ') {
|
#' . $name . ' > tbody > tr > td:nth-child(' . $alignright[$aligni] . ') {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -10832,7 +10855,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
}
|
}
|
||||||
if(isset($aligncenter))
|
if(isset($aligncenter))
|
||||||
{
|
{
|
||||||
for ($aligni = 0;$aligni < count($aligncenter);$aligni++) {
|
for ($aligni = 0;$aligni < (empty($aligncenter)?0:count($aligncenter));$aligni++) {
|
||||||
$this->app->Tpl->Add('YUICSS', '
|
$this->app->Tpl->Add('YUICSS', '
|
||||||
#' . $name . ' > tbody > tr > td:nth-child(' . $aligncenter[$aligni] . ') {
|
#' . $name . ' > tbody > tr > td:nth-child(' . $aligncenter[$aligni] . ') {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -10842,7 +10865,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
}
|
}
|
||||||
if(isset($hide320))
|
if(isset($hide320))
|
||||||
{
|
{
|
||||||
for ($h = 0;$h < count($hide320);$h++) {
|
for ($h = 0;$h < (empty($hide320)?0:count($hide320));$h++) {
|
||||||
$this->app->Tpl->Add('YUICSS', '
|
$this->app->Tpl->Add('YUICSS', '
|
||||||
@media screen and (max-width: 320px){
|
@media screen and (max-width: 320px){
|
||||||
#' . $name . ' > thead > tr > th:nth-child(' . $hide320[$h] . ') {
|
#' . $name . ' > thead > tr > th:nth-child(' . $hide320[$h] . ') {
|
||||||
@@ -10861,7 +10884,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
|
|
||||||
if(isset($nowrap) && is_array($nowrap))
|
if(isset($nowrap) && is_array($nowrap))
|
||||||
{
|
{
|
||||||
for ($h = 0;$h < count($nowrap);$h++) {
|
for ($h = 0;$h < (empty($nowrap)?0:count($nowrap));$h++) {
|
||||||
$this->app->Tpl->Add('YUICSS', '
|
$this->app->Tpl->Add('YUICSS', '
|
||||||
@media screen and (max-width: 767px){
|
@media screen and (max-width: 767px){
|
||||||
#' . $name . ' > tbody > tr > td:nth-child(' . $hide767[$h] . '){
|
#' . $name . ' > tbody > tr > td:nth-child(' . $hide767[$h] . '){
|
||||||
@@ -10875,7 +10898,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
|
|
||||||
if(isset($hide767))
|
if(isset($hide767))
|
||||||
{
|
{
|
||||||
for ($h = 0;$h < count($hide767);$h++) {
|
for ($h = 0;$h < (empty($hide767)?0:count($hide767));$h++) {
|
||||||
$this->app->Tpl->Add('YUICSS', '
|
$this->app->Tpl->Add('YUICSS', '
|
||||||
@media screen and (max-width: 767px){
|
@media screen and (max-width: 767px){
|
||||||
#' . $name . ' > thead > tr > th:nth-child(' . $hide767[$h] . ') {
|
#' . $name . ' > thead > tr > th:nth-child(' . $hide767[$h] . ') {
|
||||||
@@ -10894,7 +10917,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
}
|
}
|
||||||
if(isset($hide480))
|
if(isset($hide480))
|
||||||
{
|
{
|
||||||
for ($h = 0;$h < count($hide480);$h++) {
|
for ($h = 0;$h < (empty($hide480)?0:count($hide480));$h++) {
|
||||||
$this->app->Tpl->Add('YUICSS', '
|
$this->app->Tpl->Add('YUICSS', '
|
||||||
@media screen and (max-width: 479px){
|
@media screen and (max-width: 479px){
|
||||||
#' . $name . ' > thead > tr > th:nth-child(' . $hide480[$h] . ') {
|
#' . $name . ' > thead > tr > th:nth-child(' . $hide480[$h] . ') {
|
||||||
@@ -10939,7 +10962,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($hidecolumns) && $hidecolumns && is_array($hidecolumns) && count($hidecolumns) > 2)
|
if(isset($hidecolumns) && $hidecolumns && is_array($hidecolumns) && (empty($hidecolumns)?0:count($hidecolumns)) > 2)
|
||||||
{
|
{
|
||||||
$hidecolumnsitem = $hidecolumns[0];
|
$hidecolumnsitem = $hidecolumns[0];
|
||||||
if(!is_array($hidecolumns[2]))$hidecolumns[2][0] = $hidecolumns[2];
|
if(!is_array($hidecolumns[2]))$hidecolumns[2][0] = $hidecolumns[2];
|
||||||
@@ -11306,7 +11329,7 @@ $directlink=0;
|
|||||||
if( (($this->app->erp->RechteVorhanden($_module,"edit") && $_action=="list") ||
|
if( (($this->app->erp->RechteVorhanden($_module,"edit") && $_action=="list") ||
|
||||||
(!empty($forcerowclick))) && !empty($rowclick))
|
(!empty($forcerowclick))) && !empty($rowclick))
|
||||||
{
|
{
|
||||||
if($menucol > 0 || count($heading) > 0) {
|
if($menucol > 0 || (empty($heading)?0:count($heading)) > 0) {
|
||||||
if(!empty($doppelteids)){
|
if(!empty($doppelteids)){
|
||||||
$doppelteids = '\-[1-9]{1}[0-9]*';
|
$doppelteids = '\-[1-9]{1}[0-9]*';
|
||||||
}else{
|
}else{
|
||||||
@@ -11316,11 +11339,11 @@ if( (($this->app->erp->RechteVorhanden($_module,"edit") && $_action=="list") ||
|
|||||||
{
|
{
|
||||||
$tmpmenucol=$menucol;
|
$tmpmenucol=$menucol;
|
||||||
} else {
|
} else {
|
||||||
$tmpmenucol=!empty($heading)?count($heading)-1:0;
|
$tmpmenucol=!empty($heading)?(empty($heading)?0:count($heading))-1:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!empty($menucol) && $menucol > 0 || count($heading) > 0) {
|
if(!empty($menucol) && $menucol > 0 || (empty($heading)?0:count($heading)) > 0) {
|
||||||
if(isset($doppelteids)&& $doppelteids){
|
if(isset($doppelteids)&& $doppelteids){
|
||||||
$doppelteids = '\-[1-9]{1}[0-9]*';
|
$doppelteids = '\-[1-9]{1}[0-9]*';
|
||||||
}
|
}
|
||||||
@@ -11331,7 +11354,7 @@ if(!empty($menucol) && $menucol > 0 || count($heading) > 0) {
|
|||||||
{
|
{
|
||||||
$tmpmenucol=$menucol;
|
$tmpmenucol=$menucol;
|
||||||
} else {
|
} else {
|
||||||
$tmpmenucol=count($heading)-1;
|
$tmpmenucol=(empty($heading)?0:count($heading))-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($rowclickaction) || $rowclickaction=="")
|
if(empty($rowclickaction) || $rowclickaction=="")
|
||||||
@@ -11389,7 +11412,7 @@ if((isset($extra_anzahl_datensaetze) && (int)$extra_anzahl_datensaetze > 0) || (
|
|||||||
{
|
{
|
||||||
if(!empty($aLengthMenuArr))
|
if(!empty($aLengthMenuArr))
|
||||||
{
|
{
|
||||||
if($aLengthMenuArr[count($aLengthMenuArr)-1] < $maxrows)
|
if($aLengthMenuArr[(empty($aLengthMenuArr)?0:count($aLengthMenuArr))-1] < $maxrows)
|
||||||
{
|
{
|
||||||
$aLengthMenuArr[] = (int)$maxrows;
|
$aLengthMenuArr[] = (int)$maxrows;
|
||||||
break;
|
break;
|
||||||
@@ -12028,7 +12051,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
|||||||
}
|
}
|
||||||
');
|
');
|
||||||
}
|
}
|
||||||
$colspan = !empty($heading)?count($heading):1;
|
$colspan = !empty($heading)?(empty($heading)?0:count($heading)):1;
|
||||||
//<tr><th colspan="' . $colspan . '"><br></th></tr>
|
//<tr><th colspan="' . $colspan . '"><br></th></tr>
|
||||||
$this->app->Tpl->Add($parsetarget, '
|
$this->app->Tpl->Add($parsetarget, '
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@@ -12036,7 +12059,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>');
|
<tr>');
|
||||||
if(!empty($heading)){
|
if(!empty($heading)){
|
||||||
$cHeading = count($heading);
|
$cHeading = (empty($heading)?0:count($heading));
|
||||||
for ($i = 0; $i < $cHeading; $i++) {
|
for ($i = 0; $i < $cHeading; $i++) {
|
||||||
$this->app->Tpl->Add(
|
$this->app->Tpl->Add(
|
||||||
$parsetarget,
|
$parsetarget,
|
||||||
@@ -12050,7 +12073,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
|||||||
if(empty($columnfilter) && !(isset($columnfilter) && $columnfilter === false)) {
|
if(empty($columnfilter) && !(isset($columnfilter) && $columnfilter === false)) {
|
||||||
$this->app->Tpl->Add($parsetarget, '</tr><tr>');
|
$this->app->Tpl->Add($parsetarget, '</tr><tr>');
|
||||||
if(!empty($heading)){
|
if(!empty($heading)){
|
||||||
$cHeading = count($heading);
|
$cHeading = (empty($heading)?0:count($heading));
|
||||||
for ($i = 0; $i < $cHeading; $i++) {
|
for ($i = 0; $i < $cHeading; $i++) {
|
||||||
$this->app->Tpl->Add(
|
$this->app->Tpl->Add(
|
||||||
$parsetarget,
|
$parsetarget,
|
||||||
@@ -12073,7 +12096,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
|||||||
<tr>
|
<tr>
|
||||||
');
|
');
|
||||||
if(!empty($heading)){
|
if(!empty($heading)){
|
||||||
$cheader = count($heading);
|
$cheader = (empty($heading)?0:count($heading));
|
||||||
for ($i = 0; $i < $cheader; $i++) {
|
for ($i = 0; $i < $cheader; $i++) {
|
||||||
$this->app->Tpl->Add(
|
$this->app->Tpl->Add(
|
||||||
$parsetarget,
|
$parsetarget,
|
||||||
@@ -13815,7 +13838,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
function ChartDB($sql, $parsetarget, $width, $height, $limitmin = 0, $limitmax = 100, $gridy = 5) {
|
function ChartDB($sql, $parsetarget, $width, $height, $limitmin = 0, $limitmax = 100, $gridy = 5) {
|
||||||
|
|
||||||
$result = $this->app->DB->SelectArr($sql);
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
for ($i = 0;$i < count($result);$i++) {
|
for ($i = 0;$i < (empty($result)?0:count($result));$i++) {
|
||||||
$lables[] = $result[$i]['legende'];
|
$lables[] = $result[$i]['legende'];
|
||||||
$values[] = $result[$i]['wert'];
|
$values[] = $result[$i]['wert'];
|
||||||
}
|
}
|
||||||
@@ -13828,7 +13851,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
function Chart($parsetarget, $labels, $width = 400, $height = 200, $limitmin = 0, $limitmax = 100, $gridy = 5) {
|
function Chart($parsetarget, $labels, $width = 400, $height = 200, $limitmin = 0, $limitmax = 100, $gridy = 5) {
|
||||||
$werte = '';
|
$werte = '';
|
||||||
$values = $labels;
|
$values = $labels;
|
||||||
for ($i = 0;$i < count($values) - 1;$i++) {
|
for ($i = 0;$i < (empty($values)?0:count($values)) - 1;$i++) {
|
||||||
$werte = $werte . "'" . $values[$i] . "',";
|
$werte = $werte . "'" . $values[$i] . "',";
|
||||||
}
|
}
|
||||||
$werte = $werte . "'" . $values[$i + 1] . "'";
|
$werte = $werte . "'" . $values[$i + 1] . "'";
|
||||||
@@ -13837,7 +13860,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
$this->app->Tpl->Set('CHART_HEIGHT', $height);
|
$this->app->Tpl->Set('CHART_HEIGHT', $height);
|
||||||
$this->app->Tpl->Set('LIMITMIN', $limitmin);
|
$this->app->Tpl->Set('LIMITMIN', $limitmin);
|
||||||
$this->app->Tpl->Set('LIMITMAX', $limitmax);
|
$this->app->Tpl->Set('LIMITMAX', $limitmax);
|
||||||
$this->app->Tpl->Set('GRIDX', count($values));
|
$this->app->Tpl->Set('GRIDX', (empty($values)?0:count($values)));
|
||||||
$this->app->Tpl->Set('GRIDY', $gridy);
|
$this->app->Tpl->Set('GRIDY', $gridy);
|
||||||
$this->app->Tpl->Parse($parsetarget, "chart.tpl");
|
$this->app->Tpl->Parse($parsetarget, "chart.tpl");
|
||||||
}
|
}
|
||||||
@@ -13866,7 +13889,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
|
|
||||||
function ChartAdd($color, $values) {
|
function ChartAdd($color, $values) {
|
||||||
$werte = '';
|
$werte = '';
|
||||||
for ($i = 0;$i < count($values) - 1;$i++) {
|
for ($i = 0;$i < (empty($values)?0:count($values)) - 1;$i++) {
|
||||||
$werte = $werte . $values[$i] . ",";
|
$werte = $werte . $values[$i] . ",";
|
||||||
}
|
}
|
||||||
$werte = $werte . $values[$i + 1];
|
$werte = $werte . $values[$i + 1];
|
||||||
@@ -13931,7 +13954,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
LEFT JOIN datei_version v ON v.datei=v2.datei AND v.version = v2.version WHERE $where ORDER BY s.sort DESC LIMIT 2 ";
|
LEFT JOIN datei_version v ON v.datei=v2.datei AND v.version = v2.version WHERE $where ORDER BY s.sort DESC LIMIT 2 ";
|
||||||
$query = $this->app->DB->SelectArr($sql);
|
$query = $this->app->DB->SelectArr($sql);
|
||||||
$status = 0;
|
$status = 0;
|
||||||
if($query && count($query) == 2)
|
if($query && (empty($query)?0:count($query)) == 2)
|
||||||
{
|
{
|
||||||
$status = 1;
|
$status = 1;
|
||||||
$this->app->DB->Update("UPDATE datei_stichwoerter SET sort = '".$query[1]['sort']."' WHERE id = '".$query[0]['id']."' LIMIT 1");
|
$this->app->DB->Update("UPDATE datei_stichwoerter SET sort = '".$query[1]['sort']."' WHERE id = '".$query[0]['id']."' LIMIT 1");
|
||||||
@@ -13964,7 +13987,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
LEFT JOIN datei_version v ON v.datei=v2.datei AND v.version = v2.version WHERE $where ORDER BY s.sort LIMIT 2 ";
|
LEFT JOIN datei_version v ON v.datei=v2.datei AND v.version = v2.version WHERE $where ORDER BY s.sort LIMIT 2 ";
|
||||||
$query = $this->app->DB->SelectArr($sql);
|
$query = $this->app->DB->SelectArr($sql);
|
||||||
$status = 0;
|
$status = 0;
|
||||||
if($query && count($query) == 2)
|
if($query && (empty($query)?0:count($query)) == 2)
|
||||||
{
|
{
|
||||||
$status = 1;
|
$status = 1;
|
||||||
$this->app->DB->Update("UPDATE datei_stichwoerter SET sort = '".$query[1]['sort']."' WHERE id = '".$query[0]['id']."' LIMIT 1");
|
$this->app->DB->Update("UPDATE datei_stichwoerter SET sort = '".$query[1]['sort']."' WHERE id = '".$query[0]['id']."' LIMIT 1");
|
||||||
@@ -14075,7 +14098,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
}
|
}
|
||||||
if(!$found)unset($auswahl[$k]);
|
if(!$found)unset($auswahl[$k]);
|
||||||
}
|
}
|
||||||
if(!$auswahl || count($auswahl) == 0)
|
if(!$auswahl || (empty($auswahl)?0:count($auswahl)) == 0)
|
||||||
{
|
{
|
||||||
echo 'Keine PDF-Dateien ausgewählt!';
|
echo 'Keine PDF-Dateien ausgewählt!';
|
||||||
exit;
|
exit;
|
||||||
@@ -14146,7 +14169,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
}
|
}
|
||||||
if(!$found)unset($auswahl[$k]);
|
if(!$found)unset($auswahl[$k]);
|
||||||
}
|
}
|
||||||
if(!$auswahl || count($auswahl) == 0)
|
if(!$auswahl || (empty($auswahl)?0:count($auswahl)) == 0)
|
||||||
{
|
{
|
||||||
echo 'Keine Dateien ausgewählt!';
|
echo 'Keine Dateien ausgewählt!';
|
||||||
exit;
|
exit;
|
||||||
@@ -14267,7 +14290,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
$tmp = $this->app->DB->SelectArr("SELECT * FROM datei_stichwortvorlagen WHERE modul='' ORDER by beschriftung");
|
$tmp = $this->app->DB->SelectArr("SELECT * FROM datei_stichwortvorlagen WHERE modul='' ORDER by beschriftung");
|
||||||
for($i=0;$i<count($tmp);$i++)
|
for($i=0;$i<(empty($tmp)?0:count($tmp));$i++)
|
||||||
$this->app->Tpl->Add('EXTRASTICHWOERTER','<option value="'.$tmp[$i]['beschriftung'].'">'.$tmp[$i]['beschriftung'].'</option>');
|
$this->app->Tpl->Add('EXTRASTICHWOERTER','<option value="'.$tmp[$i]['beschriftung'].'">'.$tmp[$i]['beschriftung'].'</option>');
|
||||||
*/
|
*/
|
||||||
$maxsize = 0;
|
$maxsize = 0;
|
||||||
@@ -15080,7 +15103,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
|||||||
$summenarray[] = '<input type="hidden" id="mcol" value="'.$mengencol.'" /><input type="hidden" id="rcol" value="'.$rabattcol.'" /><input type="hidden" id="scol" value="'.$summencol.'" /><span id="zwischensumme">'.number_format($zwischensumme,4,'.','').'</span>';
|
$summenarray[] = '<input type="hidden" id="mcol" value="'.$mengencol.'" /><input type="hidden" id="rcol" value="'.$rabattcol.'" /><input type="hidden" id="scol" value="'.$summencol.'" /><span id="zwischensumme">'.number_format($zwischensumme,4,'.','').'</span>';
|
||||||
if($module != 'verbindlichkeit')$summenarray[] = '';
|
if($module != 'verbindlichkeit')$summenarray[] = '';
|
||||||
$summenarray[] = '';
|
$summenarray[] = '';
|
||||||
$summenarray[count($summenarray)-1] .= $js;
|
$summenarray[(empty($summenarray)?0:count($summenarray))-1] .= $js;
|
||||||
if($mengencol && $summencol && $module!='produktion')$table->AddRow($summenarray);
|
if($mengencol && $summencol && $module!='produktion')$table->AddRow($summenarray);
|
||||||
|
|
||||||
//$this->app->YUI->AutoComplete(ARTIKELAUTO,"artikel",array('name_de','warengruppe'),"nummer");
|
//$this->app->YUI->AutoComplete(ARTIKELAUTO,"artikel",array('name_de','warengruppe'),"nummer");
|
||||||
@@ -15602,11 +15625,11 @@ function IframeDialog($width, $height, $src = "") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<div id=\"preistabellediv\" style=\"display:none;\"><div id=\"preiserror\">".(count($waehrungen) > 1?"":"Bitte legen Sie erst Währungen an!")."</div>
|
<div id=\"preistabellediv\" style=\"display:none;\"><div id=\"preiserror\">".((empty($waehrungen)?0:count($waehrungen)) > 1?"":"Bitte legen Sie erst Währungen an!")."</div>
|
||||||
|
|
||||||
";
|
";
|
||||||
$i = -1;
|
$i = -1;
|
||||||
if(count($waehrungen) > 1)
|
if((empty($waehrungen)?0:count($waehrungen)) > 1)
|
||||||
{
|
{
|
||||||
$htmltabelle .= "<table><tr><th>Währung</th><th>Kurs</th><th>umgerechnter Preis</th><th>Aktion</th></tr>";
|
$htmltabelle .= "<table><tr><th>Währung</th><th>Kurs</th><th>umgerechnter Preis</th><th>Aktion</th></tr>";
|
||||||
foreach($waehrungen as $waehrung => $kurs)
|
foreach($waehrungen as $waehrung => $kurs)
|
||||||
|
|||||||
+11102
-7812
File diff suppressed because it is too large
Load Diff
@@ -365,6 +365,9 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
|
|||||||
foreach ($compare_differences as $compare_difference) {
|
foreach ($compare_differences as $compare_difference) {
|
||||||
$comma = "";
|
$comma = "";
|
||||||
foreach ($compare_difference as $key => $value) {
|
foreach ($compare_difference as $key => $value) {
|
||||||
|
if (is_array($value)) {
|
||||||
|
$value = implode(',',$value);
|
||||||
|
}
|
||||||
echo_out($comma."$key => [$value]");
|
echo_out($comma."$key => [$value]");
|
||||||
$comma = ", ";
|
$comma = ", ";
|
||||||
}
|
}
|
||||||
@@ -415,6 +418,10 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
|
|||||||
$counter++;
|
$counter++;
|
||||||
echo_out("\rUpgrade step $counter of $number_of_statements... ");
|
echo_out("\rUpgrade step $counter of $number_of_statements... ");
|
||||||
|
|
||||||
|
if ($verbose) {
|
||||||
|
echo_out("\n".$sql."\n");
|
||||||
|
}
|
||||||
|
|
||||||
$query_result = mysqli_query($mysqli, $sql);
|
$query_result = mysqli_query($mysqli, $sql);
|
||||||
if (!$query_result) {
|
if (!$query_result) {
|
||||||
$error = " not ok: ". mysqli_error($mysqli);
|
$error = " not ok: ". mysqli_error($mysqli);
|
||||||
|
|||||||
+76
-35
@@ -67,6 +67,7 @@ $mustal_replacers = [
|
|||||||
['on update current_timestamp','on update current_timestamp()']
|
['on update current_timestamp','on update current_timestamp()']
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
// Load all db_def from a DB connection into a db_def array
|
// Load all db_def from a DB connection into a db_def array
|
||||||
function mustal_load_tables_from_db(string $host, string $schema, string $user, string $passwd, array $replacers) : array {
|
function mustal_load_tables_from_db(string $host, string $schema, string $user, string $passwd, array $replacers) : array {
|
||||||
|
|
||||||
@@ -79,20 +80,22 @@ function mustal_load_tables_from_db(string $host, string $schema, string $user,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get db_def and views
|
// Get db_def and views
|
||||||
$sql = "SHOW FULL tables WHERE Table_type = 'BASE TABLE'";
|
$sql = "SHOW TABLE STATUS WHERE engine IS NOT NULL";
|
||||||
$query_result = mysqli_query($mysqli, $sql);
|
$query_result = mysqli_query($mysqli, $sql);
|
||||||
if (!$query_result) {
|
if (!$query_result) {
|
||||||
return(array());
|
return(array());
|
||||||
}
|
}
|
||||||
while ($row = mysqli_fetch_assoc($query_result)) {
|
while ($row = mysqli_fetch_assoc($query_result)) {
|
||||||
$table = array();
|
$table = array();
|
||||||
$table['name'] = $row['Tables_in_'.$schema];
|
$table['name'] = $row['Name'];
|
||||||
$table['type'] = $row['Table_type'];
|
$table['collation'] = $row['Collation'];
|
||||||
|
$table['type'] = 'BASE TABLE';
|
||||||
$tables[] = $table; // Add table to list of tables
|
$tables[] = $table; // Add table to list of tables
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get and add columns of the table
|
// Get and add columns of the table
|
||||||
foreach ($tables as &$table) {
|
foreach ($tables as &$table) {
|
||||||
|
|
||||||
$sql = "SHOW FULL COLUMNS FROM ".$table['name'];
|
$sql = "SHOW FULL COLUMNS FROM ".$table['name'];
|
||||||
$query_result = mysqli_query($mysqli, $sql);
|
$query_result = mysqli_query($mysqli, $sql);
|
||||||
|
|
||||||
@@ -109,6 +112,10 @@ function mustal_load_tables_from_db(string $host, string $schema, string $user,
|
|||||||
$column['Default'] = mustal_mysql_put_text_type_in_quotes($column['Type'],$column['Default']);
|
$column['Default'] = mustal_mysql_put_text_type_in_quotes($column['Type'],$column['Default']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($column['Collation']) && mustal_is_string_type($column['Type'])) {
|
||||||
|
$column['Collation'] = $table['collation'];
|
||||||
|
}
|
||||||
|
|
||||||
$columns[] = $column; // Add column to list of columns
|
$columns[] = $column; // Add column to list of columns
|
||||||
}
|
}
|
||||||
$table['columns'] = $columns;
|
$table['columns'] = $columns;
|
||||||
@@ -135,6 +142,13 @@ function mustal_load_tables_from_db(string $host, string $schema, string $user,
|
|||||||
$composed_key['Key_name'] = $key['Key_name'];
|
$composed_key['Key_name'] = $key['Key_name'];
|
||||||
$composed_key['Index_type'] = $key['Index_type'];
|
$composed_key['Index_type'] = $key['Index_type'];
|
||||||
$composed_key['columns'][] = $key['Column_name'];
|
$composed_key['columns'][] = $key['Column_name'];
|
||||||
|
|
||||||
|
if ($key['Key_name'] != 'PRIMARY') {
|
||||||
|
$composed_key['Non_unique'] = ($key['Non_unique'] == 1)?'':'UNIQUE';
|
||||||
|
} else {
|
||||||
|
$composed_key['Non_unique'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
$composed_keys[] = $composed_key;
|
$composed_keys[] = $composed_key;
|
||||||
} else {
|
} else {
|
||||||
// Given key, add column
|
// Given key, add column
|
||||||
@@ -161,9 +175,16 @@ function mustal_load_tables_from_db(string $host, string $schema, string $user,
|
|||||||
|
|
||||||
foreach ($views as &$view) {
|
foreach ($views as &$view) {
|
||||||
$sql = "SHOW CREATE VIEW ".$view['name'];
|
$sql = "SHOW CREATE VIEW ".$view['name'];
|
||||||
$query_result = mysqli_query($mysqli, $sql);
|
|
||||||
|
try {
|
||||||
|
$query_result = mysqli_query($mysqli, $sql);
|
||||||
|
}
|
||||||
|
catch (exception $e) {
|
||||||
|
$query_result = false; // VIEW is erroneous
|
||||||
|
}
|
||||||
if (!$query_result) {
|
if (!$query_result) {
|
||||||
return(array());
|
$view['Create'] = '';
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
$viewdef = mysqli_fetch_assoc($query_result);
|
$viewdef = mysqli_fetch_assoc($query_result);
|
||||||
|
|
||||||
@@ -330,19 +351,17 @@ function mustal_compare_table_array(array $nominal, string $nominal_name, array
|
|||||||
// Compare the properties of the sql_indexs
|
// Compare the properties of the sql_indexs
|
||||||
if ($check_column_definitions) {
|
if ($check_column_definitions) {
|
||||||
$found_sql_index = $found_table['keys'][$sql_index_key];
|
$found_sql_index = $found_table['keys'][$sql_index_key];
|
||||||
|
|
||||||
foreach ($sql_index as $key => $value) {
|
foreach ($sql_index as $key => $value) {
|
||||||
if ($found_sql_index[$key] != $value) {
|
if ($found_sql_index[$key] != $value) {
|
||||||
|
$compare_difference = array();
|
||||||
// if ($key != 'permissions') {
|
$compare_difference['type'] = "Key definition";
|
||||||
$compare_difference = array();
|
$compare_difference['table'] = $database_table['name'];
|
||||||
$compare_difference['type'] = "Key definition";
|
$compare_difference['key'] = $sql_index['Key_name'];
|
||||||
$compare_difference['table'] = $database_table['name'];
|
$compare_difference['property'] = $key;
|
||||||
$compare_difference['key'] = $sql_index['Key_name'];
|
$compare_difference[$nominal_name] = $value;
|
||||||
$compare_difference['property'] = $key;
|
$compare_difference[$actual_name] = $found_sql_index[$key];
|
||||||
$compare_difference[$nominal_name] = implode(',',$value);
|
$compare_differences[] = $compare_difference;
|
||||||
$compare_difference[$actual_name] = implode(',',$found_sql_index[$key]);
|
|
||||||
$compare_differences[] = $compare_difference;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($value);
|
unset($value);
|
||||||
@@ -401,9 +420,11 @@ function mustal_compare_table_array(array $nominal, string $nominal_name, array
|
|||||||
// Generate SQL to create or modify column
|
// Generate SQL to create or modify column
|
||||||
function mustal_column_sql_definition(string $table_name, array $column, array $reserved_words_without_quote) : string {
|
function mustal_column_sql_definition(string $table_name, array $column, array $reserved_words_without_quote) : string {
|
||||||
|
|
||||||
|
$column_is_string_type = mustal_is_string_type($column['Type']);
|
||||||
|
|
||||||
foreach($column as $key => &$value) {
|
foreach($column as $key => &$value) {
|
||||||
$value = (string) $value;
|
$value = (string) $value;
|
||||||
$value = mustal_column_sql_create_property_definition($key,$value,$reserved_words_without_quote);
|
$value = mustal_column_sql_create_property_definition($key,$value,$reserved_words_without_quote,$column_is_string_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default handling here
|
// Default handling here
|
||||||
@@ -422,7 +443,7 @@ function mustal_column_sql_definition(string $table_name, array $column, array $
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate SQL to modify a single column property
|
// Generate SQL to modify a single column property
|
||||||
function mustal_column_sql_create_property_definition(string $property, string $property_value, array $reserved_words_without_quote) : string {
|
function mustal_column_sql_create_property_definition(string $property, string $property_value, array $reserved_words_without_quote, $column_is_string_type) : string {
|
||||||
|
|
||||||
switch ($property) {
|
switch ($property) {
|
||||||
case 'Type':
|
case 'Type':
|
||||||
@@ -453,8 +474,10 @@ function mustal_column_sql_create_property_definition(string $property, string $
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'Collation':
|
case 'Collation':
|
||||||
if ($property_value != '') {
|
if ($property_value != '' && $column_is_string_type) {
|
||||||
$property_value = " COLLATE ".$property_value;
|
$property_value = " COLLATE ".$property_value;
|
||||||
|
} else {
|
||||||
|
$property_value = "";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -468,9 +491,9 @@ function mustal_column_sql_create_property_definition(string $property, string $
|
|||||||
// Replaces different variants of the same function mustal_to allow comparison
|
// Replaces different variants of the same function mustal_to allow comparison
|
||||||
function mustal_sql_replace_reserved_functions(array &$column, array $replacers) {
|
function mustal_sql_replace_reserved_functions(array &$column, array $replacers) {
|
||||||
|
|
||||||
$result = strtolower($column['Default']);
|
$result = $column['Default'];
|
||||||
foreach ($replacers as $replace) {
|
foreach ($replacers as $replace) {
|
||||||
if ($result == $replace[0]) {
|
if (strtolower($column['Default']) == $replace[0]) {
|
||||||
$result = $replace[1];
|
$result = $replace[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -561,14 +584,7 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
|
|||||||
if ($key['Key_name'] == 'PRIMARY') {
|
if ($key['Key_name'] == 'PRIMARY') {
|
||||||
$keystring = "PRIMARY KEY ";
|
$keystring = "PRIMARY KEY ";
|
||||||
} else {
|
} else {
|
||||||
|
$keystring = mustal_key_type(" ".$key['Non_unique']." KEY `".$key['Key_name']."` ",$key['Index_type']);
|
||||||
if(array_key_exists('Index_type', $key)) {
|
|
||||||
$index_type = $key['Index_type'];
|
|
||||||
} else {
|
|
||||||
$index_type = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
$keystring = $index_type." KEY `".$key['Key_name']."` ";
|
|
||||||
}
|
}
|
||||||
$sql .= $comma.$keystring."(`".implode("`,`",$key['columns'])."`) ";
|
$sql .= $comma.$keystring."(`".implode("`,`",$key['columns'])."`) ";
|
||||||
}
|
}
|
||||||
@@ -651,10 +667,7 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
|
|||||||
|
|
||||||
if ($key_key !== false) {
|
if ($key_key !== false) {
|
||||||
$key = $table['keys'][$key_key];
|
$key = $table['keys'][$key_key];
|
||||||
|
$sql = "ALTER TABLE `$table_name` ADD ".mustal_key_type(" ".$key['Non_unique']." KEY `".$key['Key_name']."` "."(`".implode("`,`",$key['columns'])."`)",$key['Index_type']).";";
|
||||||
$sql = "ALTER TABLE `$table_name` ADD KEY `".$key_name."` ";
|
|
||||||
$sql .= "(`".implode("`,`",$key['columns'])."`)";
|
|
||||||
$sql .= ";";
|
|
||||||
$upgrade_sql[] = $sql;
|
$upgrade_sql[] = $sql;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -682,7 +695,7 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
|
|||||||
$sql = "ALTER TABLE `$table_name` DROP KEY `".$key_name."`;";
|
$sql = "ALTER TABLE `$table_name` DROP KEY `".$key_name."`;";
|
||||||
$upgrade_sql[] = $sql;
|
$upgrade_sql[] = $sql;
|
||||||
|
|
||||||
$sql = "ALTER TABLE `$table_name` ADD KEY `".$key_name."` ";
|
$sql = "ALTER TABLE `$table_name` ADD ".mustal_key_type(" ".$key['Non_unique']." KEY `".$key['Key_name']."` ",$key['Index_type']);
|
||||||
$sql .= "(`".implode("`,`",$key['columns'])."`)";
|
$sql .= "(`".implode("`,`",$key['columns'])."`)";
|
||||||
$sql .= ";";
|
$sql .= ";";
|
||||||
$upgrade_sql[] = $sql;
|
$upgrade_sql[] = $sql;
|
||||||
@@ -743,6 +756,34 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
|
|||||||
array_unshift($upgrade_sql,"SET SQL_MODE='ALLOW_INVALID_DATES';","SET SESSION innodb_strict_mode=OFF;");
|
array_unshift($upgrade_sql,"SET SQL_MODE='ALLOW_INVALID_DATES';","SET SESSION innodb_strict_mode=OFF;");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return($result);
|
return($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if given type is a string, relevant for collation
|
||||||
|
function mustal_is_string_type(string $type) {
|
||||||
|
$mustal_string_types = array('varchar','char','text','tinytext','mediumtext','longtext');
|
||||||
|
foreach($mustal_string_types as $string_type) {
|
||||||
|
if (stripos($type,$string_type) === 0) {
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// create correct index type syntax
|
||||||
|
function mustal_key_type(string $key_definition_string, string $key_type) {
|
||||||
|
|
||||||
|
// Key types with using syntax
|
||||||
|
$mustal_key_types_using_mapping = [
|
||||||
|
'BTREE',
|
||||||
|
'HASH'
|
||||||
|
];
|
||||||
|
|
||||||
|
if (in_array($key_type,$mustal_key_types_using_mapping)) {
|
||||||
|
return ($key_definition_string." USING ".$key_type);
|
||||||
|
} else {
|
||||||
|
return ($key_type." ".$key_definition_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$version="OSS";
|
$version="OSS";
|
||||||
$version_revision="1.8";
|
$version_revision="1.10";
|
||||||
$githash = file_get_contents("../githash.txt");
|
$githash = file_get_contents("../githash.txt");
|
||||||
if (!empty($githash)) {
|
if (!empty($githash)) {
|
||||||
$version_revision .= " (".substr($githash,0,8).")";
|
$version_revision .= " (".substr($githash,0,8).")";
|
||||||
|
|||||||
+5
-1
@@ -4,7 +4,7 @@ Options -Indexes
|
|||||||
# Deny access to all *.php
|
# Deny access to all *.php
|
||||||
Order deny,allow
|
Order deny,allow
|
||||||
Allow from all
|
Allow from all
|
||||||
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js)$">
|
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map|js.map)$">
|
||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
Allow from all
|
Allow from all
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
@@ -23,4 +23,8 @@ Allow from all
|
|||||||
Order Allow,Deny
|
Order Allow,Deny
|
||||||
Allow from all
|
Allow from all
|
||||||
</Files>
|
</Files>
|
||||||
|
<Files robots.txt>
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</Files>
|
||||||
# end
|
# end
|
||||||
|
|||||||
+5
-2
@@ -440,12 +440,15 @@ class erpooSystem extends Application
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Creates user specific items
|
// Creates user specific items
|
||||||
|
|
||||||
|
$offene_tickets = $this->erp->AnzahlOffeneTickets(false);
|
||||||
|
$offene_tickets_user = $this->erp->AnzahlOffeneTickets(true);
|
||||||
|
|
||||||
$possibleUserItems = [
|
$possibleUserItems = [
|
||||||
'Tickets' => [
|
'Tickets' => [
|
||||||
'link' => 'index.php?module=ticket&action=list',
|
'link' => 'index.php?module=ticket&action=list',
|
||||||
'counter' => $this->erp->AnzahlOffeneTickets()
|
'counter' => ($offene_tickets+$offene_tickets_user > 0)?$offene_tickets_user."/".$offene_tickets:""
|
||||||
],
|
],
|
||||||
'Aufgaben' => [
|
'Aufgaben' => [
|
||||||
'link' => 'index.php?module=aufgaben&action=list',
|
'link' => 'index.php?module=aufgaben&action=list',
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* Fix scrolling to middle of page bug
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(() => {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
})
|
||||||
+349
-197
@@ -1517,6 +1517,11 @@ public function NavigationHooks(&$menu)
|
|||||||
// return "replace(trim($spalte)+0,'.',',')";
|
// return "replace(trim($spalte)+0,'.',',')";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function FormatUCfirst($spalte)
|
||||||
|
{
|
||||||
|
return ('CONCAT(UCASE(LEFT('.$spalte.', 1)),SUBSTRING('.$spalte.', 2))');
|
||||||
|
}
|
||||||
|
|
||||||
static function add_alias(string $text, $alias = false) {
|
static function add_alias(string $text, $alias = false) {
|
||||||
if (empty($alias)) {
|
if (empty($alias)) {
|
||||||
return($text);
|
return($text);
|
||||||
@@ -2642,6 +2647,24 @@ public function NavigationHooks(&$menu)
|
|||||||
return "if(" . $fieldstroke . ",CONCAT('<s>'," . $field . ",'</s>')," . $field . ")";
|
return "if(" . $fieldstroke . ",CONCAT('<s>'," . $field . ",'</s>')," . $field . ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @refactor DbHelper Komponente
|
||||||
|
// creates a CONCAT sql statement with strings or sql expressions
|
||||||
|
// Use like this: ConcatSQL('<a href=index.php?id=',['sql'] => 'id','>','click here</a>');
|
||||||
|
function ConcatSQL(array $fields) {
|
||||||
|
$result = "CONCAT(";
|
||||||
|
$comma = "";
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
if (gettype($field) == 'array') {
|
||||||
|
$result .= $comma.$field['sql'];
|
||||||
|
} else {
|
||||||
|
$result .= $comma."'".$field."'";
|
||||||
|
}
|
||||||
|
$comma = ",";
|
||||||
|
}
|
||||||
|
$result .= ")";
|
||||||
|
return($result);
|
||||||
|
}
|
||||||
|
|
||||||
// @refactor Formater Komponente
|
// @refactor Formater Komponente
|
||||||
function Dateinamen($text) {
|
function Dateinamen($text) {
|
||||||
$text = $this->UmlauteEntfernen($text);
|
$text = $this->UmlauteEntfernen($text);
|
||||||
@@ -2673,7 +2696,14 @@ public function NavigationHooks(&$menu)
|
|||||||
|
|
||||||
public function AnzahlOffeneTickets($eigene=true)
|
public function AnzahlOffeneTickets($eigene=true)
|
||||||
{
|
{
|
||||||
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND ((t.warteschlange = '') OR (t.warteschlange IN (SELECT w.label FROM warteschlangen w WHERE w.adresse = '".$this->app->User->GetAdresse()."')))";
|
|
||||||
|
if ($eigene) {
|
||||||
|
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND (t.warteschlange IN (SELECT w.label FROM warteschlangen w WHERE w.adresse = '".$this->app->User->GetAdresse()."'))";
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND (t.warteschlange = '')";
|
||||||
|
}
|
||||||
|
|
||||||
return (int)$this->app->DB->Select($sql);
|
return (int)$this->app->DB->Select($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5396,6 +5426,18 @@ title: 'Abschicken',
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Replace {VARS} with texts given in array
|
||||||
|
* Input array(key => value)
|
||||||
|
*/
|
||||||
|
function ParseVars(array $mapping, $text) {
|
||||||
|
foreach ($mapping as $key => $value) {
|
||||||
|
$text = str_replace('{'.strtoupper($key).'}',$value,$text);
|
||||||
|
}
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// @refactor Document Komponente
|
// @refactor Document Komponente
|
||||||
function CheckBearbeiter($id,$module)
|
function CheckBearbeiter($id,$module)
|
||||||
{
|
{
|
||||||
@@ -7095,6 +7137,8 @@ title: 'Abschicken',
|
|||||||
$navarray['menu']['admin'][$menu]['sec'][] = array('Arbeitsnachweis','arbeitsnachweis','list');
|
$navarray['menu']['admin'][$menu]['sec'][] = array('Arbeitsnachweis','arbeitsnachweis','list');
|
||||||
$navarray['menu']['admin'][$menu]['sec'][] = array('Gutschrift / '.$this->Firmendaten("bezeichnungstornorechnung"),'gutschrift','list');
|
$navarray['menu']['admin'][$menu]['sec'][] = array('Gutschrift / '.$this->Firmendaten("bezeichnungstornorechnung"),'gutschrift','list');
|
||||||
$navarray['menu']['admin'][$menu]['sec'][] = array('Proformarechnung','proformarechnung','list');
|
$navarray['menu']['admin'][$menu]['sec'][] = array('Proformarechnung','proformarechnung','list');
|
||||||
|
$navarray['menu']['admin'][$menu]['sec'][] = array('Kontoauszüge','kontoauszuege','list');
|
||||||
|
$navarray['menu']['admin'][$menu]['sec'][] = array('Buchungen','fibu_buchungen','list');
|
||||||
$navarray['menu']['admin'][$menu]['sec'][] = array('Abolauf','rechnungslauf','list');
|
$navarray['menu']['admin'][$menu]['sec'][] = array('Abolauf','rechnungslauf','list');
|
||||||
$navarray['menu']['admin'][$menu]['sec'][] = array('Mahnwesen','mahnwesen','list');
|
$navarray['menu']['admin'][$menu]['sec'][] = array('Mahnwesen','mahnwesen','list');
|
||||||
|
|
||||||
@@ -12658,9 +12702,8 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
|
|||||||
//$this->app->DB->Update("UPDATE auftrag_position ap, artikel a SET ap.preis='0' WHERE ap.auftrag='$auftrag' AND a.id=ap.artikel AND a.porto='1'");
|
//$this->app->DB->Update("UPDATE auftrag_position ap, artikel a SET ap.preis='0' WHERE ap.auftrag='$auftrag' AND a.id=ap.artikel AND a.porto='1'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Vorkasse Check
|
||||||
//Vorkasse Check
|
$auftrag_ist_vorkasse = false;
|
||||||
//ist genug geld da? zusammenzaehlen der kontoauszuege_zahlungseingang
|
|
||||||
$summe_eingang = 0;
|
$summe_eingang = 0;
|
||||||
$auftrag_gesamtsumme = 0;
|
$auftrag_gesamtsumme = 0;
|
||||||
$zahlungsweise = '';
|
$zahlungsweise = '';
|
||||||
@@ -12669,37 +12712,37 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
|
|||||||
$auftrag_gesamtsumme = $auftragarr['gesamtsumme'];// $this->app->DB->Select("SELECT gesamtsumme FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
$auftrag_gesamtsumme = $auftragarr['gesamtsumme'];// $this->app->DB->Select("SELECT gesamtsumme FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
||||||
$zahlungsweise = $auftragarr['zahlungsweise'];// $this->app->DB->Select("SELECT zahlungsweise FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
$zahlungsweise = $auftragarr['zahlungsweise'];// $this->app->DB->Select("SELECT zahlungsweise FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
||||||
$vorabbezahltmarkieren = $auftragarr['vorabbezahltmarkieren'];// $this->app->DB->Select("SELECT vorabbezahltmarkieren FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
$vorabbezahltmarkieren = $auftragarr['vorabbezahltmarkieren'];// $this->app->DB->Select("SELECT vorabbezahltmarkieren FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
||||||
|
$waehrung = $auftragarr['waehrung'];
|
||||||
}
|
}
|
||||||
//TODO zahlungsweisemodul
|
|
||||||
$zahlungsweise = strtolower($zahlungsweise);
|
$zahlungsweise = strtolower($zahlungsweise);
|
||||||
|
|
||||||
if($zahlungsweisenmodule = $this->app->DB->SelectArr("SELECT id, modul, verhalten FROM zahlungsweisen WHERE type = '".$this->app->DB->real_escape_string($zahlungsweise)."' AND
|
// Check behaviour
|
||||||
(projekt = '$projekt' OR projekt = 0) ORDER BY projekt = '$projekt' DESC LIMIT 1
|
$zahlungsweisenmodule = $this->app->DB->SelectArr("SELECT id, modul, verhalten FROM zahlungsweisen WHERE type = '".$this->app->DB->real_escape_string($zahlungsweise)."' AND (projekt = '$projekt' OR projekt = 0) ORDER BY projekt = '$projekt' DESC LIMIT 1");
|
||||||
"))
|
if (!empty($zahlungsweisenmodule)) {
|
||||||
{
|
if ($zahlungsweisenmodule[0]['verhalten'] == 'vorkasse') {
|
||||||
if( ( $zahlungsweisenmodule[0]['verhalten'] == 'vorkasse' && (($summe_eingang + $toleranz>=$auftrag_gesamtsumme) || $vorabbezahltmarkieren)) || ($zahlungsweisenmodule[0]['verhalten'] == 'lastschrift') || ($zahlungsweisenmodule[0]['verhalten'] == '') || ($zahlungsweisenmodule[0]['verhalten'] == 'rechnung') )
|
$auftrag_ist_vorkasse = true;
|
||||||
{
|
}
|
||||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='1' WHERE id='$auftrag' LIMIT 1");
|
} else if ($zahlungsweise == 'vorkasse') {
|
||||||
}elseif($summe_eingang > 0)
|
$auftrag_ist_vorkasse = true;
|
||||||
{
|
|
||||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='2' WHERE id='$auftrag' LIMIT 1");
|
|
||||||
}else{
|
|
||||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='0' WHERE id='$auftrag' LIMIT 1");
|
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
if($summe_eingang+$toleranz>=$auftrag_gesamtsumme || ($zahlungsweise=="rechnung" || $zahlungsweise=="amazon" || $zahlungsweise=="amazon_bestellung" || $zahlungsweise=="secupay"
|
// Check fibu_buchungen saldo
|
||||||
|| $zahlungsweise=="nachnahme" || $zahlungsweise=="einzugsermaechtigung" || $zahlungsweise=="lastschrift" || $zahlungsweise=="bar") || $auftrag_gesamtsumme==0 || $vorabbezahltmarkieren=="1")
|
$saldo = $this->app->erp->GetSaldoDokument($auftrag,'auftrag');
|
||||||
{
|
if (!empty($saldo)) {
|
||||||
//TODO ok bei amazon und amazon_bestellung nur wenn transaktionsnummer vorhanden?
|
if ($saldo['waehrung'] == $waehrung && $saldo['betrag'] >= $auftrag_gesamtsumme) {
|
||||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='1' WHERE id='$auftrag' LIMIT 1");
|
$saldo_ok = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ($summe_eingang > 0) {
|
|
||||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='2' WHERE id='$auftrag' LIMIT 1");
|
// Decide condition
|
||||||
|
if ($auftrag_ist_vorkasse && !$saldo_ok && !$vorabbezahltmarkieren) {
|
||||||
|
$vorkasse_ok = '0';
|
||||||
|
} else {
|
||||||
|
$vorkasse_ok = '1';
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='0' WHERE id='$auftrag' LIMIT 1");
|
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='$vorkasse_ok' WHERE id='$auftrag'");
|
||||||
}
|
|
||||||
}
|
|
||||||
//nachnahme gebuehr check!!!!
|
//nachnahme gebuehr check!!!!
|
||||||
//$nachnahme = $this->app->DB->Select("SELECT id FROM auftrag_position WHERE auftrag='$auftrag' AND nummer='200001' LIMIT 1");
|
//$nachnahme = $this->app->DB->Select("SELECT id FROM auftrag_position WHERE auftrag='$auftrag' AND nummer='200001' LIMIT 1");
|
||||||
$nachnahme = $this->app->DB->Select("SELECT COUNT(ap.id) FROM auftrag_position ap, artikel a WHERE ap.auftrag='$auftrag' AND ap.artikel=a.id AND a.porto=1 AND ap.preis >= 0
|
$nachnahme = $this->app->DB->Select("SELECT COUNT(ap.id) FROM auftrag_position ap, artikel a WHERE ap.auftrag='$auftrag' AND ap.artikel=a.id AND a.porto=1 AND ap.preis >= 0
|
||||||
@@ -13749,6 +13792,19 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ReplaceKontorahmen($db,$value,$fromform = null) {
|
||||||
|
$value = $this->app->DB->real_escape_string($value);
|
||||||
|
|
||||||
|
if ($db) {
|
||||||
|
$sachkonto = explode(' ',$value)[0];
|
||||||
|
$kontoid = $this->app->DB->Select("SELECT id FROM kontorahmen WHERE sachkonto = '$sachkonto' LIMIT 1");
|
||||||
|
return($kontoid);
|
||||||
|
} else {
|
||||||
|
$sachkonto = $this->app->DB->Select("SELECT CONCAT(sachkonto,' ',beschriftung) FROM kontorahmen WHERE id = '$value' LIMIT 1");
|
||||||
|
return($sachkonto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// @refactor FormHelper Komponente
|
// @refactor FormHelper Komponente
|
||||||
function ReplaceLieferant($db,$value,$fromform)
|
function ReplaceLieferant($db,$value,$fromform)
|
||||||
{
|
{
|
||||||
@@ -14504,156 +14560,6 @@ function get_emails ($str)
|
|||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// @refactor Mahnwesen Modul
|
|
||||||
function MahnwesenBody($id,$als,$_datum=null,$sprache='')
|
|
||||||
{
|
|
||||||
if($id > 0)
|
|
||||||
{
|
|
||||||
$rechnungarr = $this->app->DB->SelectRow("SELECT r.*,DATE_FORMAT(datum,'%d.%m.%Y') as datum_de,DATE_FORMAT(mahnwesen_datum,'%d.%m.%Y') as mahnwesen_datum_de,r.mahnwesen_datum
|
|
||||||
FROM rechnung AS r WHERE r.id=$id LIMIT 1");
|
|
||||||
}
|
|
||||||
if(empty($rechnungarr))
|
|
||||||
{
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$adresse = $rechnungarr['adresse'];
|
|
||||||
if($sprache==''){
|
|
||||||
$sprache = $rechnungarr['sprache'];
|
|
||||||
}
|
|
||||||
if($sprache==''){
|
|
||||||
$sprache = $this->app->DB->Select("SELECT sprache FROM adresse WHERE id='$adresse' LIMIT 1");
|
|
||||||
}
|
|
||||||
// OfferNo, customerId, OfferDate
|
|
||||||
|
|
||||||
$kundennummer = $rechnungarr['kundennummer'];
|
|
||||||
$projekt = $rechnungarr['projekt'];
|
|
||||||
$auftrag= $rechnungarr['auftrag'];
|
|
||||||
$buchhaltung= $rechnungarr['buchhaltung'];
|
|
||||||
$lieferschein = $rechnungarr['lieferschein'];
|
|
||||||
$lieferscheinid = $lieferschein;
|
|
||||||
if($lieferscheinid){
|
|
||||||
$lieferschein = $this->app->DB->Select("SELECT belegnr FROM lieferschein WHERE id='$lieferschein' LIMIT 1");
|
|
||||||
}else{
|
|
||||||
$lieferschein = '';
|
|
||||||
}
|
|
||||||
$bestellbestaetigung = $rechnungarr['kundennummer'];
|
|
||||||
$datum = $rechnungarr['datum_de'];
|
|
||||||
$datum_sql = $rechnungarr['datum'];
|
|
||||||
$belegnr = $rechnungarr['belegnr'];
|
|
||||||
$doppel = $rechnungarr['doppel'];
|
|
||||||
$freitext = $rechnungarr['freitext'];
|
|
||||||
$ustid = $rechnungarr['ustid'];
|
|
||||||
$soll = $rechnungarr['soll'];
|
|
||||||
$ist = $rechnungarr['ist'];
|
|
||||||
$land = $rechnungarr['land'];
|
|
||||||
$mahnwesen_datum = $rechnungarr['mahnwesen_datum'];
|
|
||||||
$mahnwesen_datum_deutsch = $rechnungarr['mahnwesen_datum_de'];
|
|
||||||
$zahlungsweise = $rechnungarr['zahlungsweise'];
|
|
||||||
$zahlungsstatus = $rechnungarr['zahlungsstatus'];
|
|
||||||
$zahlungszieltage = $rechnungarr['zahlungszieltage'];
|
|
||||||
$zahlungszieltageskonto = $rechnungarr['zahlungszieltageskonto'];
|
|
||||||
$zahlungszielskonto = $rechnungarr['zahlungszielskonto'];
|
|
||||||
$waehrung = $rechnungarr['waehrung'];
|
|
||||||
|
|
||||||
$zahlungdatum = $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD(datum, INTERVAL $zahlungszieltage DAY),'%d.%m.%Y') FROM rechnung WHERE id='$id' LIMIT 1");
|
|
||||||
|
|
||||||
if($_datum!=null)
|
|
||||||
{
|
|
||||||
$mahnwesen_datum = $this->app->String->Convert($_datum,'%1.%2.%3','%3-%2-%1');
|
|
||||||
$mahnwesen_datum_deutsch = $_datum;
|
|
||||||
}
|
|
||||||
|
|
||||||
$zahlungsweise = strtolower($zahlungsweise);
|
|
||||||
|
|
||||||
if($als=='zahlungserinnerung')
|
|
||||||
{
|
|
||||||
$body = $this->GetGeschaeftsBriefText("MahnwesenZahlungserinnerung",$sprache,$projekt,"rechnung",$id);
|
|
||||||
$tage = $this->GetKonfiguration('mahnwesen_m1_tage');
|
|
||||||
}
|
|
||||||
else if($als=='mahnung1')
|
|
||||||
{
|
|
||||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung1",$sprache,$projekt,"rechnung",$id);
|
|
||||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m1_gebuehr');
|
|
||||||
$tage = $this->GetKonfiguration('mahnwesen_m2_tage');
|
|
||||||
}
|
|
||||||
else if($als=='mahnung2')
|
|
||||||
{
|
|
||||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung2",$sprache,$projekt,"rechnung",$id);
|
|
||||||
$tage = $this->GetKonfiguration('mahnwesen_m3_tage');
|
|
||||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m2_gebuehr');
|
|
||||||
}
|
|
||||||
else if($als=='mahnung3')
|
|
||||||
{
|
|
||||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung3",$sprache,$projekt,"rechnung",$id);
|
|
||||||
$tage = $this->GetKonfiguration('mahnwesen_ik_tage');
|
|
||||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m3_gebuehr');
|
|
||||||
}
|
|
||||||
else if($als=='inkasso')
|
|
||||||
{
|
|
||||||
$body = $this->GetGeschaeftsBriefText("MahnwesenInkasso",$sprache,$projekt,"rechnung",$id);
|
|
||||||
//$tage = $this->GetKonfiguration("mahnwesen_ik_tage");
|
|
||||||
$tage = 3; //eigentlich vorbei
|
|
||||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_ik_gebuehr');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$body = $this->app->erp->Beschriftung("dokument_anschreiben");
|
|
||||||
}
|
|
||||||
|
|
||||||
if($tage <=0) $tage = 0;
|
|
||||||
|
|
||||||
$datummahnung= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$mahnwesen_datum', INTERVAL $tage DAY),'%d.%m.%Y')");
|
|
||||||
$datumrechnungzahlungsziel= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$datum_sql', INTERVAL $zahlungszieltage DAY),'%d.%m.%Y')");
|
|
||||||
|
|
||||||
$tage_ze = $zahlungszieltage + $this->GetKonfiguration('mahnwesen_m1_tage');
|
|
||||||
$datumzahlungserinnerung= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$datum_sql', INTERVAL $tage_ze DAY),'%d.%m.%Y')");
|
|
||||||
|
|
||||||
// checkstamp $this->CheckStamp("jhdskKUHsiusakiakuhsd"); // errechnet aus laufzeit und kundenid // wenn es nicht drinnen ist darf es nicht gehen
|
|
||||||
|
|
||||||
if($mahngebuehr=='' || !is_numeric($mahngebuehr))
|
|
||||||
$mahngebuehr = 0;
|
|
||||||
|
|
||||||
//$offen= '11,23';
|
|
||||||
$body = str_replace('{RECHNUNG}',$belegnr,$body);
|
|
||||||
$body = str_replace('{BELEGNR}',$belegnr,$body);
|
|
||||||
$body = str_replace('{DATUMRECHNUNG}',$datum,$body);
|
|
||||||
$body = str_replace('{TAGE}',$tage,$body);
|
|
||||||
$body = str_replace('{OFFEN}',$this->formatMoney($soll - $ist,$waehrung),$body);
|
|
||||||
$body = str_replace('{SOLL}',$this->formatMoney($soll,$waehrung),$body);
|
|
||||||
$body = str_replace('{SUMME}',$this->formatMoney($soll - $ist + $mahngebuehr,$waehrung),$body);
|
|
||||||
$body = str_replace('{IST}',$this->formatMoney($ist,$waehrung),$body);
|
|
||||||
$body = str_replace('{DATUM}',$datummahnung,$body);
|
|
||||||
$body = str_replace('{MAHNGEBUEHR}',$this->formatMoney($mahngebuehr,$waehrung),$body);
|
|
||||||
$body = str_replace('{OFFENMITMAHNGEBUEHR}',$this->formatMoney($mahngebuehr + $soll - $ist,$waehrung),$body);
|
|
||||||
$body = str_replace('{MAHNDATUM}',$mahnwesen_datum_deutsch,$body);
|
|
||||||
|
|
||||||
|
|
||||||
// Im Protokoll suchen Datum von Zahlungserinnerung, Mahnung 1, Mahnung 2, Mahnung 3
|
|
||||||
|
|
||||||
$mahnung1 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$id'
|
|
||||||
AND grund LIKE 'Mahnung1 versendet%' ORDER by Zeit DESC LIMIT 1");
|
|
||||||
|
|
||||||
$mahnung2 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$id'
|
|
||||||
AND grund LIKE 'Mahnung2 versendet%' ORDER by Zeit DESC LIMIT 1");
|
|
||||||
|
|
||||||
$mahnung3 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$id'
|
|
||||||
AND grund LIKE 'Mahnung3 versendet%' ORDER by Zeit DESC LIMIT 1");
|
|
||||||
|
|
||||||
$body = str_replace('{DATUMMAHNUNG1}',$mahnung1,$body);
|
|
||||||
$body = str_replace('{DATUMMAHNUNG2}',$mahnung2,$body);
|
|
||||||
$body = str_replace('{DATUMMAHNUNG3}',$mahnung3,$body);
|
|
||||||
|
|
||||||
$body = str_replace('{DATUMZAHLUNGSERINNERUNGFAELLIG}',$datumzahlungserinnerung,$body);
|
|
||||||
$body = str_replace('{DATUMZAHLUNGSERINNERUNG}',$datumzahlungserinnerung,$body);
|
|
||||||
$body = str_replace('{DATUMRECHNUNGZAHLUNGSZIEL}',$datumrechnungzahlungsziel,$body);
|
|
||||||
|
|
||||||
$body = $this->ParseUserVars('rechnung',$id,$body);
|
|
||||||
|
|
||||||
return $body;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**@deprecated */
|
/**@deprecated */
|
||||||
function AufragZuDTA($auftrag,$rechnung="1")
|
function AufragZuDTA($auftrag,$rechnung="1")
|
||||||
{
|
{
|
||||||
@@ -18077,7 +17983,8 @@ function Gegenkonto($ust_befreit,$ustid='', $doctype = '', $doctypeId = 0)
|
|||||||
created = NOW(),
|
created = NOW(),
|
||||||
uhrzeit = "' . $data['uhrzeit'] . '",
|
uhrzeit = "' . $data['uhrzeit'] . '",
|
||||||
projekt = "' . $data['projekt'] . '",
|
projekt = "' . $data['projekt'] . '",
|
||||||
bearbeiter = "' . $data['bearbeiter'] . '"
|
bearbeiter = "' . $data['bearbeiter'] . '",
|
||||||
|
sent = "' . $data['sent'] . '"
|
||||||
');
|
');
|
||||||
|
|
||||||
return $this->app->DB->GetInsertID();
|
return $this->app->DB->GetInsertID();
|
||||||
@@ -22193,8 +22100,8 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
$this->app->DB->Delete("DELETE lager_charge FROM lager_charge INNER JOIN lager_platz ON lager_platz.id=lager_charge.lager_platz
|
$this->app->DB->Delete("DELETE lager_charge FROM lager_charge INNER JOIN lager_platz ON lager_platz.id=lager_charge.lager_platz
|
||||||
WHERE lager_platz.verbrauchslager='1' AND lager_platz.id = '$regal'");
|
WHERE lager_platz.verbrauchslager='1' AND lager_platz.id = '$regal'");
|
||||||
|
|
||||||
$this->app->DB->Delete("DELETE lager_seriennummer FROM lager_seriennummer
|
$this->app->DB->Delete("DELETE FROM lager_seriennummern
|
||||||
INNER JOIN lager_platz ON lager_platz.id=lager_seriennummer.lager_platz
|
INNER JOIN lager_platz ON lager_platz.id=lager_seriennummern.lager_platz
|
||||||
WHERE lager_platz.verbrauchslager='1' AND lager_platz.id = '$regal'");
|
WHERE lager_platz.verbrauchslager='1' AND lager_platz.id = '$regal'");
|
||||||
|
|
||||||
$this->app->DB->Delete("DELETE lager_mindesthaltbarkeitsdatum FROM lager_mindesthaltbarkeitsdatum
|
$this->app->DB->Delete("DELETE lager_mindesthaltbarkeitsdatum FROM lager_mindesthaltbarkeitsdatum
|
||||||
@@ -22212,8 +22119,8 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
$this->app->DB->Delete("DELETE lager_charge FROM lager_charge INNER JOIN lager_platz ON lager_platz.id=lager_charge.lager_platz
|
$this->app->DB->Delete("DELETE lager_charge FROM lager_charge INNER JOIN lager_platz ON lager_platz.id=lager_charge.lager_platz
|
||||||
WHERE lager_platz.verbrauchslager='1'");
|
WHERE lager_platz.verbrauchslager='1'");
|
||||||
|
|
||||||
$this->app->DB->Delete("DELETE lager_seriennummer FROM lager_seriennummer
|
$this->app->DB->Delete("DELETE FROM lager_seriennummern
|
||||||
INNER JOIN lager_platz ON lager_platz.id=lager_seriennummer.lager_platz
|
INNER JOIN lager_platz ON lager_platz.id=lager_seriennummern.lager_platz
|
||||||
WHERE lager_platz.verbrauchslager='1'");
|
WHERE lager_platz.verbrauchslager='1'");
|
||||||
|
|
||||||
$this->app->DB->Delete("DELETE lager_mindesthaltbarkeitsdatum FROM lager_mindesthaltbarkeitsdatum
|
$this->app->DB->Delete("DELETE lager_mindesthaltbarkeitsdatum FROM lager_mindesthaltbarkeitsdatum
|
||||||
@@ -22703,22 +22610,17 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->LogFile('*** UPDATE '.$lagerartikel[$ij]['nummer'].' '.$lagerartikel[$ij]['name_de'].' Shop: '.$shop.' Lagernd: '.$verkaufbare_menge.' Korrektur: '.round((float) ($verkaufbare_menge_korrektur - $verkaufbare_menge),7).' Pseudolager: '.round((float) $pseudolager,8));
|
|
||||||
|
|
||||||
$cacheQuantity = (int) $verkaufbare_menge_korrektur + (int) $pseudolager;
|
|
||||||
$this->app->DB->Update(
|
|
||||||
"UPDATE `artikel` SET `cache_lagerplatzinhaltmenge` = '{$cacheQuantity}'
|
|
||||||
WHERE `id`= '{$lagerartikel[$ij]['id']}' LIMIT 1"
|
|
||||||
);
|
|
||||||
|
|
||||||
$extnummer = null;
|
$extnummer = null;
|
||||||
$anzges = 0;
|
$anzges = 0;
|
||||||
$anzfehler = 0;
|
$anzfehler = 0;
|
||||||
|
|
||||||
|
$result = null; // 1 on success
|
||||||
|
|
||||||
if(!empty($extnummer) && is_array($extnummer)) {
|
if(!empty($extnummer) && is_array($extnummer)) {
|
||||||
foreach($extnummer as $nummer) {
|
foreach($extnummer as $nummer) {
|
||||||
$anzges++;
|
$anzges++;
|
||||||
try {
|
try {
|
||||||
$this->app->remote->RemoteSendArticleList($shop, array($lagerartikel[$ij]['id']), array($nummer['nummer']), true);
|
$result = $this->app->remote->RemoteSendArticleList($shop, array($lagerartikel[$ij]['id']), array($nummer['nummer']), true);
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
$this->app->erp->LogFile($this->app->DB->real_escape_string('Lagersync Fehler '.$shop.' '.$nummer['nummer'].' '.$e->getMessage()));
|
$this->app->erp->LogFile($this->app->DB->real_escape_string('Lagersync Fehler '.$shop.' '.$nummer['nummer'].' '.$e->getMessage()));
|
||||||
@@ -22729,7 +22631,7 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
else{
|
else{
|
||||||
$anzges++;
|
$anzges++;
|
||||||
try {
|
try {
|
||||||
$this->app->remote->RemoteSendArticleList($shop,array($lagerartikel[$ij]['id']),!empty($extnummer)? array($extnummer):'',true);
|
$result = $this->app->remote->RemoteSendArticleList($shop,array($lagerartikel[$ij]['id']),!empty($extnummer)? array($extnummer):'',true);
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
$this->app->erp->LogFile($this->app->DB->real_escape_string('Lagersync Fehler '.$shop.' '.(!empty($extnummer)? array($extnummer):$lagerartikel[$ij]['nummer']).' '.$e->getMessage()));
|
$this->app->erp->LogFile($this->app->DB->real_escape_string('Lagersync Fehler '.$shop.' '.(!empty($extnummer)? array($extnummer):$lagerartikel[$ij]['nummer']).' '.$e->getMessage()));
|
||||||
@@ -22741,6 +22643,19 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
if($print_echo) {
|
if($print_echo) {
|
||||||
echo '*** UPDATE ' . $lagerartikel[$ij]['nummer'] . ' ' . $lagerartikel[$ij]['name_de'] . ' Lagernd: ' . ($verkaufbare_menge) . ' Korrekturwert: ' . round($verkaufbare_menge_korrektur - $verkaufbare_menge, 7) . "\r\n";
|
echo '*** UPDATE ' . $lagerartikel[$ij]['nummer'] . ' ' . $lagerartikel[$ij]['name_de'] . ' Lagernd: ' . ($verkaufbare_menge) . ' Korrekturwert: ' . round($verkaufbare_menge_korrektur - $verkaufbare_menge, 7) . "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$this->LogFile('*** UPDATE '.$lagerartikel[$ij]['nummer'].' '.$lagerartikel[$ij]['name_de'].' Shop: '.$shop.' Lagernd: '.$verkaufbare_menge.' Korrektur: '.round((float) ($verkaufbare_menge_korrektur - $verkaufbare_menge),7).' Pseudolager: '.round((float) $pseudolager,8).' Result: '.gettype($result).' '.$result);
|
||||||
|
|
||||||
|
if ($result == 1) {
|
||||||
|
$cacheQuantity = (int) $verkaufbare_menge_korrektur + (int) $pseudolager;
|
||||||
|
$this->app->DB->Update(
|
||||||
|
"UPDATE `artikel` SET `cache_lagerplatzinhaltmenge` = '{$cacheQuantity}'
|
||||||
|
WHERE `id`= '{$lagerartikel[$ij]['id']}' LIMIT 1"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->app->DB->Update(
|
$this->app->DB->Update(
|
||||||
@@ -26542,6 +26457,9 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
$to_name = $this->app->DB->Select("SELECT name FROM adresse WHERE id='$adresse' AND geloescht=0 LIMIT 1");
|
$to_name = $this->app->DB->Select("SELECT name FROM adresse WHERE id='$adresse' AND geloescht=0 LIMIT 1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$to_name = str_replace(",","",$to_name); // , is not allowed in names, because mailsend will interpret it as a list
|
||||||
|
|
||||||
// wenn emailadresse from email from user name von benutzer sonst firmenname
|
// wenn emailadresse from email from user name von benutzer sonst firmenname
|
||||||
if($drucker==$this->app->User->GetEmail())
|
if($drucker==$this->app->User->GetEmail())
|
||||||
$from_name = $this->app->User->GetName();
|
$from_name = $this->app->User->GetName();
|
||||||
@@ -27118,7 +27036,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
|||||||
$to_name_csv .= $item;
|
$to_name_csv .= $item;
|
||||||
}
|
}
|
||||||
} else if (!empty($to_name)) {
|
} else if (!empty($to_name)) {
|
||||||
foreach (explode(',',str_replace(" ","",$to_name)) as $item) {
|
foreach (explode(',',$to_name) as $item) {
|
||||||
$to_name_array[] = $item;
|
$to_name_array[] = $item;
|
||||||
$to_name_csv .= $item;
|
$to_name_csv .= $item;
|
||||||
}
|
}
|
||||||
@@ -34500,7 +34418,7 @@ function Firmendaten($field,$projekt="")
|
|||||||
$this->CopyBelegZwischenpositionen('rechnung',$id,'gutschrift',$newid);
|
$this->CopyBelegZwischenpositionen('rechnung',$id,'gutschrift',$newid);
|
||||||
$this->app->DB->Update("UPDATE gutschrift SET stornorechnung='$stornorechnung', ohne_briefpapier='".$ohnebriefpapier."' WHERE id='$newid,' LIMIT 1");
|
$this->app->DB->Update("UPDATE gutschrift SET stornorechnung='$stornorechnung', ohne_briefpapier='".$ohnebriefpapier."' WHERE id='$newid,' LIMIT 1");
|
||||||
|
|
||||||
$this->app->DB->Update("UPDATE rechnung SET schreibschutz='1',status='storniert',zahlungsstatus='bezahlt' WHERE id='$id' LIMIT 1");
|
$this->app->DB->Update("UPDATE rechnung SET schreibschutz='1',status='storniert' WHERE id='$id' LIMIT 1");
|
||||||
$this->RechnungProtokoll($id, $grund);
|
$this->RechnungProtokoll($id, $grund);
|
||||||
$this->SchnellFreigabe("gutschrift",$newid);
|
$this->SchnellFreigabe("gutschrift",$newid);
|
||||||
return $newid;
|
return $newid;
|
||||||
@@ -35641,7 +35559,7 @@ function Firmendaten($field,$projekt="")
|
|||||||
$rechnungid = $this->app->DB->Select("SELECT rechnungid FROM gutschrift WHERE id='$id' LIMIT 1");
|
$rechnungid = $this->app->DB->Select("SELECT rechnungid FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
if($rechnungid > 0 && $this->Firmendaten("mahnwesenmitkontoabgleich")=="1")
|
if($rechnungid > 0 && $this->Firmendaten("mahnwesenmitkontoabgleich")=="1")
|
||||||
{
|
{
|
||||||
$this->app->DB->Update("UPDATE rechnung SET ist=0, zahlungsstatus='offen' WHERE id='$rechnungid' AND mahnwesenfestsetzen!=1 LIMIT 1");
|
$this->app->DB->Update("UPDATE rechnung SET zahlungsstatus='offen' WHERE id='$rechnungid' AND mahnwesenfestsetzen!=1 LIMIT 1");
|
||||||
$this->RechnungNeuberechnen($rechnungid);
|
$this->RechnungNeuberechnen($rechnungid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35819,6 +35737,240 @@ function Firmendaten($field,$projekt="")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Retrieve the associated documents regarding payments
|
||||||
|
* Gutschrift -> Rechnung -> Auftrag OR Verbindlichkeit
|
||||||
|
* Results array of ids, types, belegnr
|
||||||
|
*/
|
||||||
|
public function GetZahlungenAssociatedDocuments(int $id, string $type, string $lastlevel = 'auftrag') : array {
|
||||||
|
|
||||||
|
$assocs = array(
|
||||||
|
array(
|
||||||
|
'type' => 'auftrag',
|
||||||
|
'below' => 'rechnung',
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'above' => 'auftrag',
|
||||||
|
'type' => 'rechnung',
|
||||||
|
'below' => 'gutschrift'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'above' => 'rechnung',
|
||||||
|
'type' => 'gutschrift'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'type' => 'verbindlichkeit'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
if ($id <= 0) {
|
||||||
|
throw new exception('no id provided');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($type, array('rechnung','gutschrift','auftrag','verbindlichkeit'))) {
|
||||||
|
throw new exception('invalid type '.$type);
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
|
// Go to highest level
|
||||||
|
$above = $assocs[array_search($type,array_column($assocs,'type'))]['above'];
|
||||||
|
while ($above) {
|
||||||
|
|
||||||
|
if ($type == $lastlevel) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT ".$above."id as id FROM ".$type." WHERE id = ".$id;
|
||||||
|
$above_id = $this->app->DB->SelectArr($sql)[0];
|
||||||
|
if (!empty($above)) {
|
||||||
|
$type = $above;
|
||||||
|
$id = $above_id['id'];
|
||||||
|
}
|
||||||
|
$above = $assocs[array_search($type,array_column($assocs,'type'))]['above'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cascade down and retrieve all documents
|
||||||
|
$result_documents = array();
|
||||||
|
$ids = array($id);
|
||||||
|
$ref = 'id';
|
||||||
|
do {
|
||||||
|
$sql = "SELECT id, '".$type."' AS type, belegnr FROM ".$type." WHERE ".$ref." IN (".implode(",",$ids).")";
|
||||||
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
|
if (!empty($result)) {
|
||||||
|
$result_documents = array_merge($result_documents, $result);
|
||||||
|
$ids = array_column($result,'id');
|
||||||
|
$ref = $type."id";
|
||||||
|
$type = $assocs[array_search($type,array_column($assocs,'type'))]['below'];
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while ($type);
|
||||||
|
|
||||||
|
return($result_documents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Calculate the payments of a document (rechnung, gutschrift, auftrag, verbindlichkeit)
|
||||||
|
* Results array of payments (datum, doc_type, doc_id, doc_inof, betrag, waehrung)
|
||||||
|
* Gutschrift -> Rechnungid, Rechnung -> Auftragid
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function GetZahlungen(int $id, string $type, string $cascadelevel = '') : array {
|
||||||
|
|
||||||
|
if ($cascadelevel != '') {
|
||||||
|
$documents = $this->GetZahlungenAssociatedDocuments($id, $type, $cascadelevel);
|
||||||
|
} else {
|
||||||
|
$documents = array(array('id' => $id, 'type' => $type));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($documents)) {
|
||||||
|
return(array());
|
||||||
|
}
|
||||||
|
|
||||||
|
$ids = array();
|
||||||
|
|
||||||
|
foreach ($documents as $document) {
|
||||||
|
$ids[] = $document['type'].$document['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "
|
||||||
|
SELECT
|
||||||
|
typ,
|
||||||
|
id,
|
||||||
|
".$this->app->erp->FormatDate('datum')." as datum,
|
||||||
|
doc_typ,
|
||||||
|
doc_id,
|
||||||
|
doc_info,
|
||||||
|
".$this->app->erp->FormatMenge('betrag',2)." as betrag,
|
||||||
|
waehrung
|
||||||
|
FROM
|
||||||
|
fibu_buchungen_alle
|
||||||
|
WHERE
|
||||||
|
CONCAT(typ,id) IN ('".implode("','",$ids)."')
|
||||||
|
ORDER BY
|
||||||
|
(SELECT datum) ASC
|
||||||
|
";
|
||||||
|
|
||||||
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
|
|
||||||
|
if (empty($result)) {
|
||||||
|
return(array());
|
||||||
|
}
|
||||||
|
return($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Calculate the payment saldo information of a document
|
||||||
|
* Auftrag: gesamtsumme, rechnung: soll, gutschrift: soll verbindlichkeit: betrag
|
||||||
|
* returns array(array(betrag, waehrung)) one line per waehrung
|
||||||
|
*/
|
||||||
|
public function GetSaldenDokument(int $id, string $type, string $cascadelevel = '') : array {
|
||||||
|
|
||||||
|
if ($cascadelevel != '') {
|
||||||
|
$documents = $this->GetZahlungenAssociatedDocuments($id, $type, $cascadelevel);
|
||||||
|
} else {
|
||||||
|
$documents = array(array('id' => $id, 'type' => $type));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($documents)) {
|
||||||
|
return(array());
|
||||||
|
}
|
||||||
|
|
||||||
|
$ids = array();
|
||||||
|
|
||||||
|
foreach ($documents as $document) {
|
||||||
|
$ids[] = $document['type'].$document['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "
|
||||||
|
SELECT
|
||||||
|
".$this->app->erp->FormatMenge('SUM(betrag)',2)." as betrag,
|
||||||
|
waehrung
|
||||||
|
FROM
|
||||||
|
fibu_buchungen_alle
|
||||||
|
WHERE
|
||||||
|
CONCAT(typ,id) IN ('".implode("','",$ids)."')
|
||||||
|
GROUP BY
|
||||||
|
waehrung";
|
||||||
|
|
||||||
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
|
|
||||||
|
if (!empty($result)) {
|
||||||
|
return($result);
|
||||||
|
}
|
||||||
|
return(array());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Calculate the payment amount of a document
|
||||||
|
* Auftrag: gesamtsumme, rechnung: soll, gutschrift: soll verbindlichkeit: betrag
|
||||||
|
* returns array(betrag, waehrung) or empty array if multiple
|
||||||
|
*/
|
||||||
|
public function GetSaldoDokument(int $id, string $type, string $buchungsart = '', string $datum_bis = '') : array {
|
||||||
|
|
||||||
|
$sql = "
|
||||||
|
SELECT
|
||||||
|
SUM(betrag) as betrag,
|
||||||
|
waehrung
|
||||||
|
FROM
|
||||||
|
fibu_buchungen_alle
|
||||||
|
WHERE
|
||||||
|
typ = '".$type."'
|
||||||
|
AND
|
||||||
|
id = ".$id."
|
||||||
|
AND
|
||||||
|
(buchungsart = '".$buchungsart."' OR '".$buchungsart."' = '')
|
||||||
|
AND
|
||||||
|
(datum <= '".$datum_bis."' OR '".$datum_bis."' = '')
|
||||||
|
GROUP BY
|
||||||
|
waehrung";
|
||||||
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
|
|
||||||
|
if (!empty($result)) {
|
||||||
|
if (count($result) == 1) {
|
||||||
|
return($result[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(array());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a fibu buchung
|
||||||
|
* using module fibu_buchungen
|
||||||
|
*/
|
||||||
|
public function fibu_buchungen_buchen(string $von_typ, int $von_id, string $nach_typ, int $nach_id, $betrag, string $waehrung, $datum, string $internebemerkung) {
|
||||||
|
$fibu_buchungen = $this->app->loadModule('fibu_buchungen', false);
|
||||||
|
if($fibu_buchungen !== null && method_exists($fibu_buchungen, 'fibu_buchungen_buchen')) {
|
||||||
|
return $fibu_buchungen->fibu_buchungen_buchen($von_typ, $von_id, $nach_typ, $nach_id, $betrag, $waehrung, $datum, $internebemerkung);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Refresh fibu buchung_alle tables
|
||||||
|
* using module fibu_buchungen
|
||||||
|
*/
|
||||||
|
public function fibu_rebuild_tables() {
|
||||||
|
$fibu_buchungen = $this->app->loadModule('fibu_buchungen', false);
|
||||||
|
if($fibu_buchungen !== null && method_exists($fibu_buchungen, 'fibu_buchungen_buchen')) {
|
||||||
|
return $fibu_buchungen->fibu_rebuild_tables();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Recalculate payment status and skonto
|
||||||
|
* using module rechnung
|
||||||
|
*/
|
||||||
|
public function rechnung_zahlstatus_berechnen() {
|
||||||
|
$rechnung = $this->app->loadModule('rechnung', false);
|
||||||
|
if($rechnung !== null && method_exists($rechnung, 'rechnung_zahlstatus_berechnen')) {
|
||||||
|
return $rechnung->rechnung_zahlstatus_berechnen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function ANABREGSNeuberechnen($id,$art,$force=false)
|
public function ANABREGSNeuberechnen($id,$art,$force=false)
|
||||||
{
|
{
|
||||||
if($id <= 0 || empty($art))
|
if($id <= 0 || empty($art))
|
||||||
|
|||||||
@@ -631,8 +631,17 @@ class Remote
|
|||||||
}
|
}
|
||||||
$arr['projekt'] = $shopexportArr['projekt'];
|
$arr['projekt'] = $shopexportArr['projekt'];
|
||||||
$arr['name_de'] = $ret['name'];
|
$arr['name_de'] = $ret['name'];
|
||||||
$arr['uebersicht_de'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:'';
|
$arr['uebersicht_de'] = $ret['uebersicht_de'] ?? '';
|
||||||
$arr['kurztext_de'] = isset($ret['kurztext_de'])?$ret['kurztext_de']:'';
|
$arr['kurztext_de'] = $ret['kurztext_de'] ?? '';
|
||||||
|
$arr['name_en'] = $ret['name_en'];
|
||||||
|
$arr['uebersicht_en'] = $ret['uebersicht_en'] ?? '';
|
||||||
|
$arr['kurztext_en'] = $ret['kurztext_en'] ?? '';
|
||||||
|
$arr['metakeywords_de'] = $ret['metakeywords_de'] ?? '';
|
||||||
|
$arr['metakeywords_en'] = $ret['metakeywords_en'] ?? '';
|
||||||
|
$arr['metatitle_de'] = $ret['metatitle_de'] ?? '';
|
||||||
|
$arr['metatitle_en'] = $ret['metatitle_en'] ?? '';
|
||||||
|
$arr['metadescription_de'] = $ret['metadescription_de'] ?? '';
|
||||||
|
$arr['metadescription_en'] = $ret['metadescription_en'] ?? '';
|
||||||
//$arr['anabregs_text'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:'';
|
//$arr['anabregs_text'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:'';
|
||||||
if(isset($ret['ean']) && $ret['ean'] != '')
|
if(isset($ret['ean']) && $ret['ean'] != '')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4030,7 +4030,11 @@ class Briefpapier extends SuperFPDF {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->SetX($x+$abstand_links);
|
$this->SetX($x+$abstand_links);
|
||||||
$this->Cell_typed($descWidth,4,$this->WriteHTML($html));
|
|
||||||
|
$text = $this->WriteHTML($html);
|
||||||
|
$text = empty($text)?"":$text;
|
||||||
|
|
||||||
|
$this->Cell_typed($descWidth,4,);
|
||||||
$this->SetX($x+$abstand_links+$descWidth);
|
$this->SetX($x+$abstand_links+$descWidth);
|
||||||
//$this->SetX($x);
|
//$this->SetX($x);
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ class RechnungPDF extends BriefpapierCustom {
|
|||||||
parent::__construct($this->app,$projekt,$styleData);
|
parent::__construct($this->app,$projekt,$styleData);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetRechnung($id,$als="",$doppeltmp=0, $_datum = null)
|
public function GetRechnung($id, $titel_abw="",$doppeltmp=0, $_datum = null, $text_abw = '')
|
||||||
{
|
{
|
||||||
$this->parameter = $als;
|
|
||||||
if($this->app->erp->Firmendaten("steuerspalteausblenden")=="1")
|
if($this->app->erp->Firmendaten("steuerspalteausblenden")=="1")
|
||||||
{
|
{
|
||||||
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
|
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
|
||||||
@@ -124,10 +124,10 @@ class RechnungPDF extends BriefpapierCustom {
|
|||||||
|
|
||||||
$lieferschein = $this->app->DB->Select("SELECT belegnr FROM lieferschein WHERE id='$lieferscheinid' LIMIT 1");
|
$lieferschein = $this->app->DB->Select("SELECT belegnr FROM lieferschein WHERE id='$lieferscheinid' LIMIT 1");
|
||||||
|
|
||||||
if(empty($als) || $als === 'doppel') {
|
/* if(empty($als) || $als === 'doppel') {
|
||||||
$rechnungsnummeranzeigen = false;
|
$rechnungsnummeranzeigen = false;
|
||||||
}
|
}
|
||||||
elseif(!empty($belegnr)){
|
else*/if(!empty($belegnr)){
|
||||||
$rechnungsnummeranzeigen = true;
|
$rechnungsnummeranzeigen = true;
|
||||||
}
|
}
|
||||||
$projektabkuerzung = $this->app->DB->Select(sprintf('SELECT abkuerzung FROM projekt WHERE id = %d', $projekt));
|
$projektabkuerzung = $this->app->DB->Select(sprintf('SELECT abkuerzung FROM projekt WHERE id = %d', $projekt));
|
||||||
@@ -172,7 +172,7 @@ class RechnungPDF extends BriefpapierCustom {
|
|||||||
$zahlungsweisetext = $this->app->erp->Zahlungsweisetext("rechnung",$id);
|
$zahlungsweisetext = $this->app->erp->Zahlungsweisetext("rechnung",$id);
|
||||||
|
|
||||||
|
|
||||||
if($doppel==1) $als = "doppel";
|
// if($doppel==1) $als = "doppel";
|
||||||
|
|
||||||
if($belegnr=="" || $belegnr=="0") $belegnr = "- ".$this->app->erp->Beschriftung("dokument_entwurf");
|
if($belegnr=="" || $belegnr=="0") $belegnr = "- ".$this->app->erp->Beschriftung("dokument_entwurf");
|
||||||
else {
|
else {
|
||||||
@@ -181,7 +181,7 @@ class RechnungPDF extends BriefpapierCustom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$posanzeigen = true;
|
$posanzeigen = true;
|
||||||
if($als=="zahlungserinnerung")
|
/* if($als=="zahlungserinnerung")
|
||||||
{
|
{
|
||||||
$this->doctypeOrig=$this->app->erp->Beschriftung("dokument_zahlungserinnerung")." ".(is_null($_datum)?$mahnwesen_datum:$_datum);
|
$this->doctypeOrig=$this->app->erp->Beschriftung("dokument_zahlungserinnerung")." ".(is_null($_datum)?$mahnwesen_datum:$_datum);
|
||||||
if($this->app->erp->GetKonfiguration("mahnwesen_ze_pos") === '0')$posanzeigen = false;
|
if($this->app->erp->GetKonfiguration("mahnwesen_ze_pos") === '0')$posanzeigen = false;
|
||||||
@@ -207,14 +207,12 @@ class RechnungPDF extends BriefpapierCustom {
|
|||||||
if($this->app->erp->GetKonfiguration("mahnwesen_inkasso_pos") === '0')$posanzeigen = false;
|
if($this->app->erp->GetKonfiguration("mahnwesen_inkasso_pos") === '0')$posanzeigen = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{*/
|
||||||
if($rechnungersatz)
|
if($rechnungersatz)
|
||||||
$this->doctypeOrig=($this->app->erp->Beschriftung("bezeichnungrechnungersatz")?$this->app->erp->Beschriftung("bezeichnungrechnungersatz"):$this->app->erp->Beschriftung("dokument_rechnung"))." $belegnr";
|
$this->doctypeOrig=($this->app->erp->Beschriftung("bezeichnungrechnungersatz")?$this->app->erp->Beschriftung("bezeichnungrechnungersatz"):$this->app->erp->Beschriftung("dokument_rechnung"))." $belegnr";
|
||||||
else
|
else
|
||||||
$this->doctypeOrig=$this->app->erp->Beschriftung("dokument_rechnung")." $belegnr";
|
$this->doctypeOrig=$this->app->erp->Beschriftung("dokument_rechnung")." $belegnr";
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->zusatzfooter = " (RE$belegnr)";
|
$this->zusatzfooter = " (RE$belegnr)";
|
||||||
|
|
||||||
@@ -407,12 +405,12 @@ class RechnungPDF extends BriefpapierCustom {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($als!="" && $als!="doppel")
|
/* if($als!="" && $als!="doppel")
|
||||||
{
|
{
|
||||||
$body = $this->app->erp->MahnwesenBody($id,$als,$_datum);
|
$body = $this->app->erp->MahnwesenBody($id,$als,$_datum);
|
||||||
$footer =$this->app->erp->ParseUserVars("rechnung",$id, $this->app->erp->Beschriftung("rechnung_footer"));
|
$footer =$this->app->erp->ParseUserVars("rechnung",$id, $this->app->erp->Beschriftung("rechnung_footer"));
|
||||||
}
|
}
|
||||||
else {
|
else {*/
|
||||||
$body = $this->app->erp->Beschriftung("rechnung_header");
|
$body = $this->app->erp->Beschriftung("rechnung_header");
|
||||||
if($bodyzusatz!="") $body=$body."\r\n".$bodyzusatz;
|
if($bodyzusatz!="") $body=$body."\r\n".$bodyzusatz;
|
||||||
$body = $this->app->erp->ParseUserVars("rechnung",$id,$body);
|
$body = $this->app->erp->ParseUserVars("rechnung",$id,$body);
|
||||||
@@ -442,6 +440,14 @@ class RechnungPDF extends BriefpapierCustom {
|
|||||||
$footer = $versandinfo."$freitext"."\r\n".$this->app->erp->ParseUserVars("rechnung",$id,$this->app->erp->Beschriftung("rechnung_footer").
|
$footer = $versandinfo."$freitext"."\r\n".$this->app->erp->ParseUserVars("rechnung",$id,$this->app->erp->Beschriftung("rechnung_footer").
|
||||||
"\r\n$steuer\r\n$zahlungsweisetext").$systemfreitext;
|
"\r\n$steuer\r\n$zahlungsweisetext").$systemfreitext;
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
|
if ($titel_abw != '') {
|
||||||
|
$this->doctypeOrig = $titel_abw;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($text_abw != '') {
|
||||||
|
$body = $text_abw;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setTextDetails(array(
|
$this->setTextDetails(array(
|
||||||
@@ -686,10 +692,10 @@ class RechnungPDF extends BriefpapierCustom {
|
|||||||
$tmp_name = str_replace(' ','',trim($this->recipient['enterprise']));
|
$tmp_name = str_replace(' ','',trim($this->recipient['enterprise']));
|
||||||
$tmp_name = str_replace('.','',$tmp_name);
|
$tmp_name = str_replace('.','',$tmp_name);
|
||||||
|
|
||||||
if($als=="" || $als=="doppel")
|
if($titel_abw != "")
|
||||||
$this->filename = $datum2."_RE".$belegnr.".pdf";
|
$this->filename = $datum2."_RE".$belegnr."_INFO.pdf";
|
||||||
else
|
else
|
||||||
$this->filename = $datum2."_MA".$belegnr.".pdf";
|
$this->filename = $datum2."_RE".$belegnr.".pdf";
|
||||||
|
|
||||||
$this->setBarcode($belegnr);
|
$this->setBarcode($belegnr);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -2054,7 +2054,7 @@ $table_kontakte = '';
|
|||||||
$ckontakte = !empty($kontakte)?count($kontakte):0;
|
$ckontakte = !empty($kontakte)?count($kontakte):0;
|
||||||
for($i=0;$i<$ckontakte;$i++)
|
for($i=0;$i<$ckontakte;$i++)
|
||||||
{
|
{
|
||||||
$tabindex = $tabindex+i;
|
$tabindex = $tabindex+$i;
|
||||||
$table_kontakte .= "<tr><td>".$kontakte[$i]['bezeichnung'].":
|
$table_kontakte .= "<tr><td>".$kontakte[$i]['bezeichnung'].":
|
||||||
</td><td><input type=text name=\"adresse_kontakte[".$kontakte[$i]['id']."]\" value=\"".$kontakte[$i]['kontakt']."\" size=\"30\" tabindex=\"$tabindex\"> <a href=\"#\" onclick=\"if(!confirm('".$kontakte[$i]['bezeichnung']." wirklich entfernen?')) return false; else window.location.href='index.php?module=adresse&action=delkontakt&id=".$id."&lid=".$kontakte[$i]['id']."';\">x</a></td></tr>";
|
</td><td><input type=text name=\"adresse_kontakte[".$kontakte[$i]['id']."]\" value=\"".$kontakte[$i]['kontakt']."\" size=\"30\" tabindex=\"$tabindex\"> <a href=\"#\" onclick=\"if(!confirm('".$kontakte[$i]['bezeichnung']." wirklich entfernen?')) return false; else window.location.href='index.php?module=adresse&action=delkontakt&id=".$id."&lid=".$kontakte[$i]['id']."';\">x</a></td></tr>";
|
||||||
}
|
}
|
||||||
@@ -6417,7 +6417,7 @@ function AdresseVerein()
|
|||||||
if(bearbeiter!="",bearbeiter,a2.name) as bearbeiter,
|
if(bearbeiter!="",bearbeiter,a2.name) as bearbeiter,
|
||||||
CONCAT(UCASE(LEFT(d.typ, 1)), SUBSTRING(d.typ, 2)) as art,
|
CONCAT(UCASE(LEFT(d.typ, 1)), SUBSTRING(d.typ, 2)) as art,
|
||||||
CONCAT(IF(d.sent = 1, "JA", "NEIN"),"<a data-type=dokumente data-id=", d.id, "></a>") as gesendet,
|
CONCAT(IF(d.sent = 1, "JA", "NEIN"),"<a data-type=dokumente data-id=", d.id, "></a>") as gesendet,
|
||||||
"" as pdf,
|
concat("<a href=\"index.php?module=dateien&action=send&id=",(SELECT datei FROM datei_stichwoerter WHERE subjekt="anhang" AND objekt="dokument" AND parameter = d.id LIMIT 1),"\"><img src=./themes/' . $this->app->Conf->WFconf['defaulttheme'] . '/images/pdf.svg></a>") as pdf,
|
||||||
concat("1","-",d.id) as did,
|
concat("1","-",d.id) as did,
|
||||||
d.content as suchtext,
|
d.content as suchtext,
|
||||||
d.internebezeichnung
|
d.internebezeichnung
|
||||||
|
|||||||
@@ -2072,6 +2072,20 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
|
|||||||
$newarr[] = $arr[$i]['name'];
|
$newarr[] = $arr[$i]['name'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "fibu_objekte":
|
||||||
|
$arr = $this->app->DB->SelectArr("SELECT CONCAT(".$this->app->erp->FormatUCfirst('typ').",'-',id,'-',info) as objekt FROM fibu_objekte WHERE info LIKE '%$term%' LIMIT 20");
|
||||||
|
$carr = !empty($arr)?count($arr):0;
|
||||||
|
for($i = 0; $i < $carr; $i++)
|
||||||
|
$newarr[] = $arr[$i]['objekt'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "fibu_belege":
|
||||||
|
$arr = $this->app->DB->SelectArr("SELECT CONCAT(".$this->app->erp->FormatUCfirst('typ').",'-',id,'-',info) as objekt FROM fibu_objekte WHERE info LIKE '%$term%' AND typ IN ('auftrag','rechnung','gutschrift','verbindlichkeit') LIMIT 20");
|
||||||
|
$carr = !empty($arr)?count($arr):0;
|
||||||
|
for($i = 0; $i < $carr; $i++)
|
||||||
|
$newarr[] = $arr[$i]['objekt'];
|
||||||
|
break;
|
||||||
|
|
||||||
case "vpeartikel":
|
case "vpeartikel":
|
||||||
$arr = $this->app->DB->SelectArr("SELECT DISTINCT vpe FROM verkaufspreise WHERE geloescht=0 AND vpe LIKE '%$term%' ORDER by vpe");
|
$arr = $this->app->DB->SelectArr("SELECT DISTINCT vpe FROM verkaufspreise WHERE geloescht=0 AND vpe LIKE '%$term%' ORDER by vpe");
|
||||||
$carr = !empty($arr)?count($arr):0;
|
$carr = !empty($arr)?count($arr):0;
|
||||||
|
|||||||
+21
-22
@@ -907,14 +907,14 @@ class Artikel extends GenArtikel {
|
|||||||
$defaultorder = 7;
|
$defaultorder = 7;
|
||||||
|
|
||||||
// headings
|
// headings
|
||||||
$heading = array('Artikel', 'Nummer','Menge', 'Einheit', 'Lager', 'Reserviert', 'Menü');
|
$heading = array('Artikel', 'Nummer','Referenz','Menge', 'Einheit', 'Lager', 'Reserviert', 'Menü');
|
||||||
$width = array('50%', '10%', '5%', '5%','5%', '5%', '9%');
|
$width = array('50%', '10%', '5%', '5%', '5%','5%', '5%', '9%');
|
||||||
$findcols = array('a.name_de', 'a.nummer', 's.menge','a.einheit',
|
$findcols = array('a.name_de', 'a.nummer','s.referenz', 's.menge','a.einheit',
|
||||||
'lag.menge', 'CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0
|
'lag.menge', 'CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0
|
||||||
THEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id)
|
THEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id)
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END','id');
|
END','id');
|
||||||
$searchsql = array('a.name_de', 'a.nummer','a.einheit', 's.menge','s.art',"CONCAT(IF(s.art='' OR s.art='et','Einkaufsteil',''),IF(s.art='it','Informationsteil/Dienstleistung',''),IF(s.art='bt','Beistellung',''))");
|
$searchsql = array('a.name_de', 'a.nummer','s.referenz','a.einheit', 's.menge','s.art',"CONCAT(IF(s.art='' OR s.art='et','Einkaufsteil',''),IF(s.art='it','Informationsteil/Dienstleistung',''),IF(s.art='bt','Beistellung',''))");
|
||||||
|
|
||||||
$menu = "<table cellpadding=0 cellspacing=0>";
|
$menu = "<table cellpadding=0 cellspacing=0>";
|
||||||
$menu .= "<tr>";
|
$menu .= "<tr>";
|
||||||
@@ -932,20 +932,19 @@ class Artikel extends GenArtikel {
|
|||||||
|
|
||||||
$alignright = array(3,5,6);
|
$alignright = array(3,5,6);
|
||||||
// SQL statement
|
// SQL statement
|
||||||
$sql = "SELECT SQL_CALC_FOUND_ROWS s.id,
|
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||||
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.name_de,'</a> ',
|
s.id,
|
||||||
IF(s.art='it','<br><i style=color:#999>- Informationsteil/Dienstleistung</i>',''),IF(s.art='bt','<br><i style=color:#999>- Beistellung</i>',''), COALESCE((SELECT GROUP_CONCAT('<br><i style=color:#999>- ', art.nummer, ' ', art.name_de, ' (', alt.reason, ')', '</i>' SEPARATOR '') FROM parts_list_alternative AS alt INNER JOIN artikel AS art ON art.id = alt.alternative_article_id WHERE alt.parts_list_id = s.id), '')) as artikel,
|
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.name_de,'</a> ',
|
||||||
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.nummer,'</a>') as nummer,
|
IF(s.art='it','<br><i style=color:#999>- Informationsteil/Dienstleistung</i>',''),IF(s.art='bt','<br><i style=color:#999>- Beistellung</i>',''), COALESCE((SELECT GROUP_CONCAT('<br><i style=color:#999>- ', art.nummer, ' ', art.name_de, ' (', alt.reason, ')', '</i>' SEPARATOR '') FROM parts_list_alternative AS alt INNER JOIN artikel AS art ON art.id = alt.alternative_article_id WHERE alt.parts_list_id = s.id), '')) as artikel,
|
||||||
".$this->app->erp->FormatMenge('s.menge').' as menge, a.einheit,
|
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.nummer,'</a>') as nummer,
|
||||||
|
s.referenz,
|
||||||
'.$this->app->erp->FormatMenge('ifnull(lag.menge,0)').' as lager,
|
trim(s.menge)+0 as menge, a.einheit,
|
||||||
|
".$this->app->erp->FormatMenge('ifnull(lag.menge,0)').' as lager,
|
||||||
CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0
|
CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0
|
||||||
THEN (SELECT '.$this->app->erp->FormatMenge('SUM(lr.menge)')." FROM lager_reserviert lr WHERE lr.artikel=a.id)
|
THEN (SELECT '.$this->app->erp->FormatMenge('SUM(lr.menge)')." FROM lager_reserviert lr WHERE lr.artikel=a.id)
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END as reserviert,
|
END as reserviert,
|
||||||
|
s.id as menu
|
||||||
s.id as menu
|
|
||||||
FROM stueckliste s
|
FROM stueckliste s
|
||||||
INNER JOIN artikel a ON s.artikel=a.id
|
INNER JOIN artikel a ON s.artikel=a.id
|
||||||
LEFT JOIN (SELECT sum(lpi.menge) as menge ,lpi.artikel
|
LEFT JOIN (SELECT sum(lpi.menge) as menge ,lpi.artikel
|
||||||
@@ -6090,7 +6089,7 @@ class Artikel extends GenArtikel {
|
|||||||
|
|
||||||
$stueck = $this->app->erp->ArtikelAnzahlLagerStueckliste($id);
|
$stueck = $this->app->erp->ArtikelAnzahlLagerStueckliste($id);
|
||||||
|
|
||||||
$this->ArtikelStuecklisteImport('TAB3');
|
// $this->ArtikelStuecklisteImport('TAB3');
|
||||||
$url = 'index.php?module=artikel&action=stueckliste&cmd=getbaum&id='.$id;
|
$url = 'index.php?module=artikel&action=stueckliste&cmd=getbaum&id='.$id;
|
||||||
$this->app->Tpl->Set('URL',$url);
|
$this->app->Tpl->Set('URL',$url);
|
||||||
$this->app->Tpl->Add('TAB1',"<center>");
|
$this->app->Tpl->Add('TAB1',"<center>");
|
||||||
@@ -6255,8 +6254,8 @@ class Artikel extends GenArtikel {
|
|||||||
{
|
{
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
if($id > 0){
|
if($id > 0){
|
||||||
$result = $this->app->DB->SelectArr("SELECT a.nummer, a.name_de, a.hersteller,a.herstellernummer, REPLACE(TRIM(s.menge)+0,'.',',') as menge, s.referenz, s.place, s.layer, s.wert, s.bauform, s.zachse,s.xpos, s.ypos, s.art FROM stueckliste s
|
$sql = "SELECT avon.nummer as stuecklistevon, a.nummer, a.name_de, a.hersteller,a.herstellernummer, REPLACE(TRIM(s.menge)+0,'.',',') as menge, s.referenz, s.place, s.layer, s.wert, s.bauform, s.zachse,s.xpos, s.ypos, s.art FROM stueckliste s LEFT JOIN artikel a ON a.id=s.artikel LEFT JOIN artikel avon ON avon.id=s.stuecklistevonartikel WHERE s.stuecklistevonartikel='$id'";
|
||||||
LEFT JOIN artikel a ON a.id=s.artikel WHERE s.stuecklistevonartikel='$id'");
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
}
|
}
|
||||||
header('Content-type: text/csv');
|
header('Content-type: text/csv');
|
||||||
header('Content-Disposition: attachment; filename=file.csv');
|
header('Content-Disposition: attachment; filename=file.csv');
|
||||||
@@ -6322,7 +6321,7 @@ class Artikel extends GenArtikel {
|
|||||||
|
|
||||||
$id = (int)$this->app->Secure->GetPOST('id');
|
$id = (int)$this->app->Secure->GetPOST('id');
|
||||||
|
|
||||||
$data = $this->app->DB->SelectRow('SELECT s.id, s.artikel, '.$this->app->erp->FormatMenge("s.menge")." as menge, s.art, s.referenz, s.layer, s.place, s.wert, s.bauform, s.zachse, s.xpos, s.ypos FROM stueckliste s WHERE s.id = '$id' LIMIT 1");
|
$data = $this->app->DB->SelectRow("SELECT s.id, s.artikel, trim(s.menge)+0 as menge, s.art, s.referenz, s.layer, s.place, s.wert, s.bauform, s.zachse, s.xpos, s.ypos FROM stueckliste s WHERE s.id = '$id' LIMIT 1");
|
||||||
|
|
||||||
if($data){
|
if($data){
|
||||||
if($data['artikel'] == 0){
|
if($data['artikel'] == 0){
|
||||||
|
|||||||
@@ -122,7 +122,8 @@ class Artikelbaum
|
|||||||
|
|
||||||
public function ArtikelbaumList()
|
public function ArtikelbaumList()
|
||||||
{
|
{
|
||||||
$this->app->erp->MenuEintrag('index.php?module=artikelbaum&action=list','Übersicht');
|
$this->app->erp->MenuEintrag('index.php?module=artikelkategorien&action=list','Artikelkategorien');
|
||||||
|
$this->app->erp->MenuEintrag('index.php?module=artikelbaum&action=list','Artikelbaum');
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
$url = 'index.php?module=artikelbaum&action=baumajax&id='.$id;
|
$url = 'index.php?module=artikelbaum&action=baumajax&id='.$id;
|
||||||
$this->app->Tpl->Set('URL',$url);
|
$this->app->Tpl->Set('URL',$url);
|
||||||
|
|||||||
@@ -0,0 +1,249 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 OpenXE project
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Xentral\Components\Database\Exception\QueryFailureException;
|
||||||
|
|
||||||
|
class Artikelkategorien {
|
||||||
|
|
||||||
|
function __construct($app, $intern = false) {
|
||||||
|
$this->app = $app;
|
||||||
|
if ($intern)
|
||||||
|
return;
|
||||||
|
|
||||||
|
$this->app->ActionHandlerInit($this);
|
||||||
|
$this->app->ActionHandler("list", "artikelkategorien_list");
|
||||||
|
$this->app->ActionHandler("create", "artikelkategorien_edit"); // This automatically adds a "New" button
|
||||||
|
$this->app->ActionHandler("edit", "artikelkategorien_edit");
|
||||||
|
$this->app->ActionHandler("delete", "artikelkategorien_delete");
|
||||||
|
$this->app->DefaultActionHandler("list");
|
||||||
|
$this->app->ActionHandlerListen($app);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function Install() {
|
||||||
|
/* Fill out manually later */
|
||||||
|
}
|
||||||
|
|
||||||
|
static function TableSearch(&$app, $name, $erlaubtevars) {
|
||||||
|
switch ($name) {
|
||||||
|
case "artikelkategorien_list":
|
||||||
|
$allowed['artikelkategorien_list'] = array('list');
|
||||||
|
$heading = array('','','Bezeichnung', 'Projekt','Gelöscht', 'Menü');
|
||||||
|
$width = array('1%','1%','30%','10%','1%','1%'); // Fill out manually later
|
||||||
|
|
||||||
|
// columns that are aligned right (numbers etc)
|
||||||
|
// $alignright = array(4,5,6,7,8);
|
||||||
|
|
||||||
|
$findcols = array('a.id','a.id','a.bezeichnung', 'a.projekt');
|
||||||
|
$searchsql = array('a.bezeichnung');
|
||||||
|
|
||||||
|
$defaultorder = 1;
|
||||||
|
$defaultorderdesc = 0;
|
||||||
|
|
||||||
|
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
|
||||||
|
|
||||||
|
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=artikelkategorien&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=artikelkategorien&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
||||||
|
|
||||||
|
$sql = "SELECT SQL_CALC_FOUND_ROWS a.id, $dropnbox, a.bezeichnung, p.abkuerzung, a.geloescht, a.id FROM artikelkategorien a LEFT JOIN projekt p ON a.projekt = p.id";
|
||||||
|
|
||||||
|
$where = "1";
|
||||||
|
$count = "SELECT count(DISTINCT id) FROM artikelkategorien WHERE $where";
|
||||||
|
// $groupby = "";
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$erg = false;
|
||||||
|
|
||||||
|
foreach ($erlaubtevars as $k => $v) {
|
||||||
|
if (isset($$v)) {
|
||||||
|
$erg[$v] = $$v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $erg;
|
||||||
|
}
|
||||||
|
|
||||||
|
function artikelkategorien_list() {
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=artikelkategorien&action=list", "Übersicht");
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=artikelkategorien&action=create", "Neu anlegen");
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=artikelbaum&action=list", "Artikelbaum");
|
||||||
|
|
||||||
|
// $this->app->erp->MenuEintrag("index.php", "Zurück");
|
||||||
|
|
||||||
|
$this->app->YUI->TableSearch('TAB1', 'artikelkategorien_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||||
|
$this->app->Tpl->Parse('PAGE', "artikelkategorien_list.tpl");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function artikelkategorien_delete() {
|
||||||
|
$id = (int) $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
|
$this->app->DB->Delete("DELETE FROM `artikelkategorien` WHERE `id` = '{$id}'");
|
||||||
|
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gelöscht.</div>");
|
||||||
|
|
||||||
|
$this->artikelkategorien_list();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Edit artikelkategorien item
|
||||||
|
* If id is empty, create a new one
|
||||||
|
*/
|
||||||
|
|
||||||
|
function artikelkategorien_edit() {
|
||||||
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
|
// Check if other users are editing this id
|
||||||
|
if($this->app->erp->DisableModul('artikel',$id))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->app->Tpl->Set('ID', $id);
|
||||||
|
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=artikelkategorien&action=edit&id=$id", "Details");
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=artikelkategorien&action=list", "Zurück zur Übersicht");
|
||||||
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
$input = $this->GetInput();
|
||||||
|
$submit = $this->app->Secure->GetPOST('submit');
|
||||||
|
|
||||||
|
if (empty($id)) {
|
||||||
|
// New item
|
||||||
|
$id = 'NULL';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($submit != '')
|
||||||
|
{
|
||||||
|
|
||||||
|
// Write to database
|
||||||
|
|
||||||
|
// Add checks here
|
||||||
|
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
|
||||||
|
|
||||||
|
$columns = "id, ";
|
||||||
|
$values = "$id, ";
|
||||||
|
$update = "";
|
||||||
|
|
||||||
|
$fix = "";
|
||||||
|
|
||||||
|
foreach ($input as $key => $value) {
|
||||||
|
$columns = $columns.$fix.$key;
|
||||||
|
$values = $values.$fix."'".$value."'";
|
||||||
|
$update = $update.$fix.$key." = '$value'";
|
||||||
|
|
||||||
|
$fix = ", ";
|
||||||
|
}
|
||||||
|
|
||||||
|
// echo($columns."<br>");
|
||||||
|
// echo($values."<br>");
|
||||||
|
// echo($update."<br>");
|
||||||
|
|
||||||
|
$sql = "INSERT INTO artikelkategorien (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
|
||||||
|
|
||||||
|
// echo($sql);
|
||||||
|
|
||||||
|
$this->app->DB->Update($sql);
|
||||||
|
|
||||||
|
if ($id == 'NULL') {
|
||||||
|
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
|
||||||
|
header("Location: index.php?module=artikelkategorien&action=list&msg=$msg");
|
||||||
|
} else {
|
||||||
|
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich übernommen.</div>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Load values again from database
|
||||||
|
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
|
||||||
|
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS a.id, $dropnbox, a.bezeichnung, a.next_nummer, a.projekt, a.geloescht, a.externenummer, a.parent, a.steuer_erloese_inland_normal, a.steuer_aufwendung_inland_normal, a.steuer_erloese_inland_ermaessigt, a.steuer_aufwendung_inland_ermaessigt, a.steuer_erloese_inland_steuerfrei, a.steuer_aufwendung_inland_steuerfrei, a.steuer_erloese_inland_innergemeinschaftlich, a.steuer_aufwendung_inland_innergemeinschaftlich, a.steuer_erloese_inland_eunormal, a.steuer_erloese_inland_nichtsteuerbar, a.steuer_erloese_inland_euermaessigt, a.steuer_aufwendung_inland_nichtsteuerbar, a.steuer_aufwendung_inland_eunormal, a.steuer_aufwendung_inland_euermaessigt, a.steuer_erloese_inland_export, a.steuer_aufwendung_inland_import, a.steuertext_innergemeinschaftlich, a.steuertext_export, a.id FROM artikelkategorien a"." WHERE id=$id");
|
||||||
|
|
||||||
|
foreach ($result[0] as $key => $value) {
|
||||||
|
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add displayed items later
|
||||||
|
*
|
||||||
|
|
||||||
|
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
|
||||||
|
$this->app->Tpl->Add('EMAIL', $email);
|
||||||
|
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$result[0]['projekt'],false)); // Parameters: Target db?, value, from form?
|
||||||
|
$this->app->YUI->AutoComplete('projekt', 'projektname', 1);
|
||||||
|
|
||||||
|
// $this->SetInput($input);
|
||||||
|
$this->app->Tpl->Parse('PAGE', "artikelkategorien_edit.tpl");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all paramters from html form and save into $input
|
||||||
|
*/
|
||||||
|
public function GetInput(): array {
|
||||||
|
$input = array();
|
||||||
|
//$input['EMAIL'] = $this->app->Secure->GetPOST('email');
|
||||||
|
|
||||||
|
$input['bezeichnung'] = $this->app->Secure->GetPOST('bezeichnung');
|
||||||
|
$input['next_nummer'] = $this->app->Secure->GetPOST('next_nummer');
|
||||||
|
$input['projekt'] = $this->app->Secure->GetPOST('projekt');
|
||||||
|
$input['geloescht'] = $this->app->Secure->GetPOST('geloescht');
|
||||||
|
$input['externenummer'] = $this->app->Secure->GetPOST('externenummer');
|
||||||
|
$input['parent'] = $this->app->Secure->GetPOST('parent');
|
||||||
|
$input['steuer_erloese_inland_normal'] = $this->app->Secure->GetPOST('steuer_erloese_inland_normal');
|
||||||
|
$input['steuer_aufwendung_inland_normal'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_normal');
|
||||||
|
$input['steuer_erloese_inland_ermaessigt'] = $this->app->Secure->GetPOST('steuer_erloese_inland_ermaessigt');
|
||||||
|
$input['steuer_aufwendung_inland_ermaessigt'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_ermaessigt');
|
||||||
|
$input['steuer_erloese_inland_steuerfrei'] = $this->app->Secure->GetPOST('steuer_erloese_inland_steuerfrei');
|
||||||
|
$input['steuer_aufwendung_inland_steuerfrei'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_steuerfrei');
|
||||||
|
$input['steuer_erloese_inland_innergemeinschaftlich'] = $this->app->Secure->GetPOST('steuer_erloese_inland_innergemeinschaftlich');
|
||||||
|
$input['steuer_aufwendung_inland_innergemeinschaftlich'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_innergemeinschaftlich');
|
||||||
|
$input['steuer_erloese_inland_eunormal'] = $this->app->Secure->GetPOST('steuer_erloese_inland_eunormal');
|
||||||
|
$input['steuer_erloese_inland_nichtsteuerbar'] = $this->app->Secure->GetPOST('steuer_erloese_inland_nichtsteuerbar');
|
||||||
|
$input['steuer_erloese_inland_euermaessigt'] = $this->app->Secure->GetPOST('steuer_erloese_inland_euermaessigt');
|
||||||
|
$input['steuer_aufwendung_inland_nichtsteuerbar'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_nichtsteuerbar');
|
||||||
|
$input['steuer_aufwendung_inland_eunormal'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_eunormal');
|
||||||
|
$input['steuer_aufwendung_inland_euermaessigt'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_euermaessigt');
|
||||||
|
$input['steuer_erloese_inland_export'] = $this->app->Secure->GetPOST('steuer_erloese_inland_export');
|
||||||
|
$input['steuer_aufwendung_inland_import'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_import');
|
||||||
|
$input['steuertext_innergemeinschaftlich'] = $this->app->Secure->GetPOST('steuertext_innergemeinschaftlich');
|
||||||
|
$input['steuertext_export'] = $this->app->Secure->GetPOST('steuertext_export');
|
||||||
|
|
||||||
|
|
||||||
|
return $input;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set all fields in the page corresponding to $input
|
||||||
|
*/
|
||||||
|
function SetInput($input) {
|
||||||
|
// $this->app->Tpl->Set('EMAIL', $input['email']);
|
||||||
|
|
||||||
|
$this->app->Tpl->Set('BEZEICHNUNG', $input['bezeichnung']);
|
||||||
|
$this->app->Tpl->Set('NEXT_NUMMER', $input['next_nummer']);
|
||||||
|
$this->app->Tpl->Set('PROJEKT', $input['projekt']);
|
||||||
|
$this->app->Tpl->Set('GELOESCHT', $input['geloescht']);
|
||||||
|
$this->app->Tpl->Set('EXTERNENUMMER', $input['externenummer']);
|
||||||
|
$this->app->Tpl->Set('PARENT', $input['parent']);
|
||||||
|
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_NORMAL', $input['steuer_erloese_inland_normal']);
|
||||||
|
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_NORMAL', $input['steuer_aufwendung_inland_normal']);
|
||||||
|
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_ERMAESSIGT', $input['steuer_erloese_inland_ermaessigt']);
|
||||||
|
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_ERMAESSIGT', $input['steuer_aufwendung_inland_ermaessigt']);
|
||||||
|
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_STEUERFREI', $input['steuer_erloese_inland_steuerfrei']);
|
||||||
|
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_STEUERFREI', $input['steuer_aufwendung_inland_steuerfrei']);
|
||||||
|
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_INNERGEMEINSCHAFTLICH', $input['steuer_erloese_inland_innergemeinschaftlich']);
|
||||||
|
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_INNERGEMEINSCHAFTLICH', $input['steuer_aufwendung_inland_innergemeinschaftlich']);
|
||||||
|
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_EUNORMAL', $input['steuer_erloese_inland_eunormal']);
|
||||||
|
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_NICHTSTEUERBAR', $input['steuer_erloese_inland_nichtsteuerbar']);
|
||||||
|
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_EUERMAESSIGT', $input['steuer_erloese_inland_euermaessigt']);
|
||||||
|
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_NICHTSTEUERBAR', $input['steuer_aufwendung_inland_nichtsteuerbar']);
|
||||||
|
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_EUNORMAL', $input['steuer_aufwendung_inland_eunormal']);
|
||||||
|
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_EUERMAESSIGT', $input['steuer_aufwendung_inland_euermaessigt']);
|
||||||
|
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_EXPORT', $input['steuer_erloese_inland_export']);
|
||||||
|
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_IMPORT', $input['steuer_aufwendung_inland_import']);
|
||||||
|
$this->app->Tpl->Set('STEUERTEXT_INNERGEMEINSCHAFTLICH', $input['steuertext_innergemeinschaftlich']);
|
||||||
|
$this->app->Tpl->Set('STEUERTEXT_EXPORT', $input['steuertext_export']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+63
-4
@@ -848,7 +848,7 @@ class Auftrag extends GenAuftrag
|
|||||||
FROM auftrag auf
|
FROM auftrag auf
|
||||||
INNER JOIN auftrag_position ON auf.id = auftrag_position.auftrag
|
INNER JOIN auftrag_position ON auf.id = auftrag_position.auftrag
|
||||||
INNER JOIN artikel ON auftrag_position.artikel = artikel.id
|
INNER JOIN artikel ON auftrag_position.artikel = artikel.id
|
||||||
WHERE auf.status <> 'abgeschlossen' AND auf.belegnr <> ''
|
WHERE auf.status NOT IN ('abgeschlossen','storniert') AND auf.belegnr <> ''
|
||||||
ORDER BY urspruengliches_lieferdatum ASC, auf.belegnr ASC, auftrag_position.sort ASC
|
ORDER BY urspruengliches_lieferdatum ASC, auf.belegnr ASC, auftrag_position.sort ASC
|
||||||
) a";
|
) a";
|
||||||
|
|
||||||
@@ -3182,6 +3182,11 @@ class Auftrag extends GenAuftrag
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->app->Tpl->Add(
|
||||||
|
'ZAHLUNGEN',
|
||||||
|
$this->AuftragZahlung(true)
|
||||||
|
);
|
||||||
|
|
||||||
// schaue ob es eine GS zu diesem Auftrag gibt
|
// schaue ob es eine GS zu diesem Auftrag gibt
|
||||||
// schaue ob es eine GS zu diesem Auftrag gibt
|
// schaue ob es eine GS zu diesem Auftrag gibt
|
||||||
//$gutschriftid = $this->app->DB->Select("SELECT id FROM gutschrift WHERE rechnungid='$rechnungid' LIMIT 1");
|
//$gutschriftid = $this->app->DB->Select("SELECT id FROM gutschrift WHERE rechnungid='$rechnungid' LIMIT 1");
|
||||||
@@ -3409,7 +3414,47 @@ class Auftrag extends GenAuftrag
|
|||||||
<tr><td><b>Lieferadresse:</b><br><br>$lieferadresse</td></tr></table>";
|
<tr><td><b>Lieferadresse:</b><br><br>$lieferadresse</td></tr></table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Build the html output for minidetail containing the payments
|
||||||
|
* @param bool $return
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function AuftragZahlung($return=false)
|
||||||
|
{
|
||||||
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
|
$zahlungen = $this->app->erp->GetZahlungen($id,'auftrag',true);
|
||||||
|
if (!empty($zahlungen)) {
|
||||||
|
$et = new EasyTable($this->app);
|
||||||
|
|
||||||
|
$et->headings = array('Datum','Beleg','Betrag','Währung');
|
||||||
|
|
||||||
|
foreach ($zahlungen as $zahlung) {
|
||||||
|
$row = array(
|
||||||
|
$zahlung['datum'],
|
||||||
|
"<a href=\"index.php?module=".$zahlung['doc_typ']."&action=edit&id=".$zahlung['doc_id']."\">
|
||||||
|
".ucfirst($zahlung['doc_typ'])."
|
||||||
|
".$zahlung['doc_info']."
|
||||||
|
</a>",
|
||||||
|
$zahlung['betrag'],
|
||||||
|
$zahlung['waehrung']
|
||||||
|
);
|
||||||
|
$et->AddRow($row);
|
||||||
|
}
|
||||||
|
|
||||||
|
$salden = $this->app->erp->GetSaldenDokument($id,'auftrag',true);
|
||||||
|
foreach ($salden as $saldo) {
|
||||||
|
$row = array(
|
||||||
|
'',
|
||||||
|
'<b>Saldo</b>',
|
||||||
|
"<b>".$saldo['betrag']."</b>",
|
||||||
|
"<b>".$saldo['waehrung']."</b>"
|
||||||
|
);
|
||||||
|
$et->AddRow($row);
|
||||||
|
}
|
||||||
|
return($et->DisplayNew('return',""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function AuftragZahlungsmail()
|
function AuftragZahlungsmail()
|
||||||
{
|
{
|
||||||
@@ -5962,6 +6007,13 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for override in adresse
|
||||||
|
$sql = "SELECT rechnung_anzahlpapier, rechnung_anzahlpapier_abweichend FROM adresse WHERE id =".$adresse;
|
||||||
|
$rechnung_anzahlpapier = $this->app->DB->SelectArr($sql);
|
||||||
|
if ($rechnung_anzahlpapier[0]['rechnung_anzahlpapier_abweichend']) {
|
||||||
|
$autodruckrechnungstufe1menge = $rechnung_anzahlpapier[0]['rechnung_anzahlpapier'];
|
||||||
|
}
|
||||||
|
|
||||||
if($exportdruckrechnungstufe1)
|
if($exportdruckrechnungstufe1)
|
||||||
{
|
{
|
||||||
if(!empty($projektarr))
|
if(!empty($projektarr))
|
||||||
@@ -5975,9 +6027,6 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
$exportdruckrechnungstufe1 = $this->app->erp->Export($exportland);
|
$exportdruckrechnungstufe1 = $this->app->erp->Export($exportland);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(($autodruckrechnungstufe1=='1' || $exportdruckrechnungstufe1) && $rechnung > 0)
|
if(($autodruckrechnungstufe1=='1' || $exportdruckrechnungstufe1) && $rechnung > 0)
|
||||||
{
|
{
|
||||||
$this->app->DB->Update("UPDATE rechnung SET status='versendet', versendet='1',schreibschutz='1' WHERE id='$rechnung' LIMIT 1");
|
$this->app->DB->Update("UPDATE rechnung SET status='versendet', versendet='1',schreibschutz='1' WHERE id='$rechnung' LIMIT 1");
|
||||||
@@ -6666,6 +6715,13 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
|
|
||||||
public function AuftragList()
|
public function AuftragList()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// refresh all open items
|
||||||
|
$openids = $this->app->DB->SelectArr("SELECT id from auftrag WHERE status <> 'abgeschlossen'");
|
||||||
|
foreach ($openids as $openid) {
|
||||||
|
$this->app->erp->AuftragAutoversandBerechnen($openid['id']);
|
||||||
|
}
|
||||||
|
|
||||||
if($this->app->Secure->GetPOST('ausfuehren') && $this->app->erp->RechteVorhanden('auftrag', 'edit'))
|
if($this->app->Secure->GetPOST('ausfuehren') && $this->app->erp->RechteVorhanden('auftrag', 'edit'))
|
||||||
{
|
{
|
||||||
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
||||||
@@ -7261,6 +7317,9 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
$this->app->DB->Update($sql);
|
$this->app->DB->Update($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->app->erp->AuftragProtokoll($id,"Teilauftrag $belegnr_neu erstellt");
|
||||||
|
$this->app->erp->PDFArchivieren('auftrag', $id, true);
|
||||||
|
|
||||||
header('Location: index.php?module=auftrag&action=edit&id='.$id_neu);
|
header('Location: index.php?module=auftrag&action=edit&id='.$id_neu);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -776,6 +776,7 @@ class Bestellung extends GenBestellung
|
|||||||
$tmp3->DisplayNew('PDFARCHIV','Menü',"noAction");
|
$tmp3->DisplayNew('PDFARCHIV','Menü',"noAction");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
$wareneingangsbelege = $this->app->DB->SelectFirstCols("SELECT
|
$wareneingangsbelege = $this->app->DB->SelectFirstCols("SELECT
|
||||||
CONCAT('<a href=\"index.php?module=receiptdocument&action=edit&id=',r.id,'\" target=\"_blank\"',if(r.status='storniert',' title=\"Wareneingangsbeleg storniert\"><s>','>'),if(r.document_number='0' OR document_number='','ENTWURF',r.document_number),if(r.status='storniert','</s>',''),'</a> <a href=\"index.php?module=receiptdocument&action=pdf&id=',r.id,'\" target=\"_blank\"><img src=\"./themes/new/images/pdf.svg\" title=\"Wareneingangsbeleg PDF\" border=\"0\"></a>
|
CONCAT('<a href=\"index.php?module=receiptdocument&action=edit&id=',r.id,'\" target=\"_blank\"',if(r.status='storniert',' title=\"Wareneingangsbeleg storniert\"><s>','>'),if(r.document_number='0' OR document_number='','ENTWURF',r.document_number),if(r.status='storniert','</s>',''),'</a> <a href=\"index.php?module=receiptdocument&action=pdf&id=',r.id,'\" target=\"_blank\"><img src=\"./themes/new/images/pdf.svg\" title=\"Wareneingangsbeleg PDF\" border=\"0\"></a>
|
||||||
<a href=\"index.php?module=receiptdocument&action=edit&id=',r.id,'\" target=\"_blank\"><img src=\"./themes/new/images/edit.svg\" title=\"Wareneingangsbeleg bearbeiten\" border=\"0\"></a>') as wareneingangsbeleg
|
<a href=\"index.php?module=receiptdocument&action=edit&id=',r.id,'\" target=\"_blank\"><img src=\"./themes/new/images/edit.svg\" title=\"Wareneingangsbeleg bearbeiten\" border=\"0\"></a>') as wareneingangsbeleg
|
||||||
@@ -787,6 +788,30 @@ class Bestellung extends GenBestellung
|
|||||||
else{
|
else{
|
||||||
$this->app->Tpl->Set('WARENEINGANGSBELEG', '-');
|
$this->app->Tpl->Set('WARENEINGANGSBELEG', '-');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
$sql = "SELECT
|
||||||
|
CONCAT('<a href =\"index.php?module=wareneingang&action=distriinhalt&id=',pa.id,'\">',pa.id,'</a>') as wareneingang
|
||||||
|
FROM
|
||||||
|
paketannahme pa
|
||||||
|
INNER JOIN paketdistribution pd ON
|
||||||
|
pd.paketannahme = pa.id
|
||||||
|
INNER JOIN bestellung_position bp ON
|
||||||
|
pd.bestellung_position = bp.id
|
||||||
|
INNER JOIN bestellung b ON
|
||||||
|
b.id = bp.bestellung
|
||||||
|
WHERE
|
||||||
|
b.id = $id
|
||||||
|
GROUP BY
|
||||||
|
pa.id";
|
||||||
|
// echo($sql);
|
||||||
|
$wareneingangsbelege = $this->app->DB->SelectArr($sql);
|
||||||
|
if(!empty($wareneingangsbelege)){
|
||||||
|
$this->app->Tpl->Add('WARENEINGANGSBELEG', implode('<br />', array_column($wareneingangsbelege , 'wareneingang' )));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->app->Tpl->Set('WARENEINGANGSBELEG', '-');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->app->Tpl->Set('ID', $id);
|
$this->app->Tpl->Set('ID', $id);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Bearbeiter:</td>
|
<td>Bearbeiter:</td>
|
||||||
<td colspan="3"><input type="text" name="von" id="von" value="[SENDER]" style="width: 370px;"></td>
|
<td colspan="3"><input type="text" name="von" id="von" value="[BEARBEITER]" style="width: 370px;"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="100">{|Projekt|}:</td>
|
<td width="100">{|Projekt|}:</td>
|
||||||
|
|||||||
@@ -0,0 +1,455 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1"></a></li>
|
||||||
|
</ul>
|
||||||
|
<!-- Example for multiple tabs
|
||||||
|
<ul hidden">
|
||||||
|
<li><a href="#tabs-1">First Tab</a></li>
|
||||||
|
<li><a href="#tabs-2">Second Tab</a></li>
|
||||||
|
</ul>
|
||||||
|
-->
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Artikelkategorien|}</legend><i>Info like this.</i>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Bezeichnung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="bezeichnung" id="bezeichnung" value="[BEZEICHNUNG]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Next_nummer|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="next_nummer" id="next_nummer" value="[NEXT_NUMMER]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Projekt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Geloescht|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="geloescht" id="geloescht" value="[GELOESCHT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Externenummer|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="externenummer" id="externenummer" value="[EXTERNENUMMER]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Parent|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="parent" id="parent" value="[PARENT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_normal|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_normal" id="steuer_erloese_inland_normal" value="[STEUER_ERLOESE_INLAND_NORMAL]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_normal|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_normal" id="steuer_aufwendung_inland_normal" value="[STEUER_AUFWENDUNG_INLAND_NORMAL]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_ermaessigt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_ermaessigt" id="steuer_erloese_inland_ermaessigt" value="[STEUER_ERLOESE_INLAND_ERMAESSIGT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_ermaessigt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_ermaessigt" id="steuer_aufwendung_inland_ermaessigt" value="[STEUER_AUFWENDUNG_INLAND_ERMAESSIGT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_steuerfrei|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_steuerfrei" id="steuer_erloese_inland_steuerfrei" value="[STEUER_ERLOESE_INLAND_STEUERFREI]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_steuerfrei|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_steuerfrei" id="steuer_aufwendung_inland_steuerfrei" value="[STEUER_AUFWENDUNG_INLAND_STEUERFREI]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_innergemeinschaftlich|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_innergemeinschaftlich" id="steuer_erloese_inland_innergemeinschaftlich" value="[STEUER_ERLOESE_INLAND_INNERGEMEINSCHAFTLICH]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_innergemeinschaftlich|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_innergemeinschaftlich" id="steuer_aufwendung_inland_innergemeinschaftlich" value="[STEUER_AUFWENDUNG_INLAND_INNERGEMEINSCHAFTLICH]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_eunormal|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_eunormal" id="steuer_erloese_inland_eunormal" value="[STEUER_ERLOESE_INLAND_EUNORMAL]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_nichtsteuerbar|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_nichtsteuerbar" id="steuer_erloese_inland_nichtsteuerbar" value="[STEUER_ERLOESE_INLAND_NICHTSTEUERBAR]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_euermaessigt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_euermaessigt" id="steuer_erloese_inland_euermaessigt" value="[STEUER_ERLOESE_INLAND_EUERMAESSIGT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_nichtsteuerbar|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_nichtsteuerbar" id="steuer_aufwendung_inland_nichtsteuerbar" value="[STEUER_AUFWENDUNG_INLAND_NICHTSTEUERBAR]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_eunormal|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_eunormal" id="steuer_aufwendung_inland_eunormal" value="[STEUER_AUFWENDUNG_INLAND_EUNORMAL]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_euermaessigt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_euermaessigt" id="steuer_aufwendung_inland_euermaessigt" value="[STEUER_AUFWENDUNG_INLAND_EUERMAESSIGT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_export|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_export" id="steuer_erloese_inland_export" value="[STEUER_ERLOESE_INLAND_EXPORT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_import|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_import" id="steuer_aufwendung_inland_import" value="[STEUER_AUFWENDUNG_INLAND_IMPORT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuertext_innergemeinschaftlich|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuertext_innergemeinschaftlich" id="steuertext_innergemeinschaftlich" value="[STEUERTEXT_INNERGEMEINSCHAFTLICH]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuertext_export|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuertext_export" id="steuertext_export" value="[STEUERTEXT_EXPORT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Example for 2nd row
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Another legend|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Bezeichnung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="bezeichnung" id="bezeichnung" value="[BEZEICHNUNG]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Next_nummer|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="next_nummer" id="next_nummer" value="[NEXT_NUMMER]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Projekt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Geloescht|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="geloescht" id="geloescht" value="[GELOESCHT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Externenummer|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="externenummer" id="externenummer" value="[EXTERNENUMMER]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Parent|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="parent" id="parent" value="[PARENT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_normal|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_normal" id="steuer_erloese_inland_normal" value="[STEUER_ERLOESE_INLAND_NORMAL]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_normal|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_normal" id="steuer_aufwendung_inland_normal" value="[STEUER_AUFWENDUNG_INLAND_NORMAL]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_ermaessigt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_ermaessigt" id="steuer_erloese_inland_ermaessigt" value="[STEUER_ERLOESE_INLAND_ERMAESSIGT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_ermaessigt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_ermaessigt" id="steuer_aufwendung_inland_ermaessigt" value="[STEUER_AUFWENDUNG_INLAND_ERMAESSIGT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_steuerfrei|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_steuerfrei" id="steuer_erloese_inland_steuerfrei" value="[STEUER_ERLOESE_INLAND_STEUERFREI]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_steuerfrei|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_steuerfrei" id="steuer_aufwendung_inland_steuerfrei" value="[STEUER_AUFWENDUNG_INLAND_STEUERFREI]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_innergemeinschaftlich|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_innergemeinschaftlich" id="steuer_erloese_inland_innergemeinschaftlich" value="[STEUER_ERLOESE_INLAND_INNERGEMEINSCHAFTLICH]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_innergemeinschaftlich|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_innergemeinschaftlich" id="steuer_aufwendung_inland_innergemeinschaftlich" value="[STEUER_AUFWENDUNG_INLAND_INNERGEMEINSCHAFTLICH]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_eunormal|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_eunormal" id="steuer_erloese_inland_eunormal" value="[STEUER_ERLOESE_INLAND_EUNORMAL]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_nichtsteuerbar|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_nichtsteuerbar" id="steuer_erloese_inland_nichtsteuerbar" value="[STEUER_ERLOESE_INLAND_NICHTSTEUERBAR]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_euermaessigt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_euermaessigt" id="steuer_erloese_inland_euermaessigt" value="[STEUER_ERLOESE_INLAND_EUERMAESSIGT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_nichtsteuerbar|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_nichtsteuerbar" id="steuer_aufwendung_inland_nichtsteuerbar" value="[STEUER_AUFWENDUNG_INLAND_NICHTSTEUERBAR]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_eunormal|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_eunormal" id="steuer_aufwendung_inland_eunormal" value="[STEUER_AUFWENDUNG_INLAND_EUNORMAL]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_euermaessigt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_euermaessigt" id="steuer_aufwendung_inland_euermaessigt" value="[STEUER_AUFWENDUNG_INLAND_EUERMAESSIGT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_erloese_inland_export|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_erloese_inland_export" id="steuer_erloese_inland_export" value="[STEUER_ERLOESE_INLAND_EXPORT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuer_aufwendung_inland_import|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuer_aufwendung_inland_import" id="steuer_aufwendung_inland_import" value="[STEUER_AUFWENDUNG_INLAND_IMPORT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuertext_innergemeinschaftlich|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuertext_innergemeinschaftlich" id="steuertext_innergemeinschaftlich" value="[STEUERTEXT_INNERGEMEINSCHAFTLICH]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Steuertext_export|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="steuertext_export" id="steuertext_export" value="[STEUERTEXT_EXPORT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<!-- Example for 2nd tab
|
||||||
|
<div id="tabs-2">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|...|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
...
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
[TAB1]
|
||||||
|
[TAB1NEXT]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<div style="background-color:white">
|
<div style="background-color:white">
|
||||||
<h2 class="greyh2">{|Zahlungseingang|}</h2>
|
<h2 class="greyh2">{|Zahlungen|}</h2>
|
||||||
<div style="padding:10px">
|
<div style="padding:10px">
|
||||||
[ZAHLUNGEN]
|
[ZAHLUNGEN]
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<div id="tabs">
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">Allgemein</a></li>
|
||||||
|
</ul>
|
||||||
<div id="tabs-1">
|
<div id="tabs-1">
|
||||||
[MESSAGE]
|
[MESSAGE]
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
@@ -11,11 +14,11 @@
|
|||||||
<legend>{|Einstellungen|}</legend>
|
<legend>{|Einstellungen|}</legend>
|
||||||
|
|
||||||
<td>{|Absatz berücksichtigen (Monate)|}:</td>
|
<td>{|Absatz berücksichtigen (Monate)|}:</td>
|
||||||
<td><input type="number" min="0" name="monate_absatz" id="monate_absatz" value="[MONATE_ABSATZ]" size="20""></td>
|
<td><input type="number" min="0" name="monate_absatz" id="monate_absatz" value="[MONATE_ABSATZ]" size="20"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Vorausplanen (Monate)|}:</td>
|
<td>{|Vorausplanen (Monate)|}:</td>
|
||||||
<td><input type="number" min="0" name="monate_voraus" id="monate_voraus" value="[MONATE_VORAUS]" size="20""></td>
|
<td><input type="number" min="0" name="monate_voraus" id="monate_voraus" value="[MONATE_VORAUS]" size="20"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -68,13 +68,13 @@
|
|||||||
<td width="25%" style="position:relative"><a href="index.php?module=versandarten&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a></td>
|
<td width="25%" style="position:relative"><a href="index.php?module=versandarten&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a></td>
|
||||||
<td width="25%" style="position:relative"><a href="index.php?module=zahlungsweisen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a></td>
|
<td width="25%" style="position:relative"><a href="index.php?module=zahlungsweisen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a></td>
|
||||||
<td width="25%" style="position:relative"><a [LIEFERBEDINGUNGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a>[GREYLIEFERBEDINGUNGEN]</td>
|
<td width="25%" style="position:relative"><a [LIEFERBEDINGUNGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a>[GREYLIEFERBEDINGUNGEN]</td>
|
||||||
<td width="25%"></td>
|
<td width="25%" style="position:relative"><a href="index.php?module=mahnwesen&action=einstellungen"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_11.gif" border="0" width="30%"></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="center">
|
<tr align="center">
|
||||||
<td><a href="index.php?module=versandarten&action=list">{|Versandarten|}</a></td>
|
<td><a href="index.php?module=versandarten&action=list">{|Versandarten|}</a></td>
|
||||||
<td><a href="index.php?module=zahlungsweisen&action=list">{|Zahlungsweisen|}</a></td>
|
<td><a href="index.php?module=zahlungsweisen&action=list">{|Zahlungsweisen|}</a></td>
|
||||||
<td><a [LIEFERBEDINGUNGENLINK]>{|Lieferbedingungen|}</a></td>
|
<td><a [LIEFERBEDINGUNGENLINK]>{|Lieferbedingungen|}</a></td>
|
||||||
<td></td>
|
<td><a href="index.php?module=mahnwesen&action=einstellungen">{|Mahnwesen|}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -100,8 +100,8 @@
|
|||||||
<legend>{|Ticketsystem|}</legend>
|
<legend>{|Ticketsystem|}</legend>
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
<tr><td>{|ticket|}:</td><td><input type="text" name="ticket" value="[TICKET]" size="40"></td></tr>
|
<tr><td>{|ticket|}:</td><td><input type="text" name="ticket" value="[TICKET]" size="40"></td></tr>
|
||||||
<tr><td>{|ticketprojekt|}:</td><td><input type="text" name="ticketprojekt" value="[TICKETPROJEKT]" size="40"></td></tr>
|
<tr><td>{|ticketprojekt|}:</td><td><input type="text" id="ticketprojekt" name="ticketprojekt" value="[TICKETPROJEKT]" size="40"></td></tr>
|
||||||
<tr><td>{|ticketqueue|}:</td><td><input type="text" name="ticketqueue" value="[TICKETQUEUE]" size="40"></td></tr>
|
<tr><td>{|ticketqueue|}:</td><td><input type="text" id="ticketqueue" name="ticketqueue" value="[TICKETQUEUE]" size="40"></td></tr>
|
||||||
<tr><td>{|abdatum|}:</td><td><input type="text" name="abdatum" value="[ABDATUM]" size="40"></td></tr>
|
<tr><td>{|abdatum|}:</td><td><input type="text" name="abdatum" value="[ABDATUM]" size="40"></td></tr>
|
||||||
<tr><td>{|ticketloeschen|}:</td><td><input type="text" name="ticketloeschen" value="[TICKETLOESCHEN]" size="40"></td></tr>
|
<tr><td>{|ticketloeschen|}:</td><td><input type="text" name="ticketloeschen" value="[TICKETLOESCHEN]" size="40"></td></tr>
|
||||||
<tr><td>{|ticketabgeschlossen|}:</td><td><input type="text" name="ticketabgeschlossen" value="[TICKETABGESCHLOSSEN]" size="40"></td></tr>
|
<tr><td>{|ticketabgeschlossen|}:</td><td><input type="text" name="ticketabgeschlossen" value="[TICKETABGESCHLOSSEN]" size="40"></td></tr>
|
||||||
@@ -121,16 +121,16 @@
|
|||||||
<table width="100%" border="0" class="mkTableFormular">
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
<tr><td>{|autosresponder_blacklist|}:</td><td><input type="text" name="autosresponder_blacklist" value="[AUTOSRESPONDER_BLACKLIST]" size="40"></td></tr>
|
<tr><td>{|autosresponder_blacklist|}:</td><td><input type="text" name="autosresponder_blacklist" value="[AUTOSRESPONDER_BLACKLIST]" size="40"></td></tr>
|
||||||
<tr><td>{|eigenesignatur|}:</td><td><input type="text" name="eigenesignatur" value="[EIGENESIGNATUR]" size="40"></td></tr>
|
<tr><td>{|eigenesignatur|}:</td><td><input type="text" name="eigenesignatur" value="[EIGENESIGNATUR]" size="40"></td></tr>
|
||||||
<tr><td>{|signatur|}:</td><td><input type="text" name="signatur" value="[SIGNATUR]" size="40"></td></tr>
|
<tr><td>{|signatur|}:</td><td><textarea id="signatur" name="signatur" rows="6" style="width:100%;">[SIGNATUR]</textarea></td></tr>
|
||||||
<tr><td>{|adresse|}:</td><td><input type="text" name="adresse" value="[ADRESSE]" size="40"></td></tr>
|
<tr><td>{|adresse|}:</td><td><input type="text" id="adresse" name="adresse" value="[ADRESSE]" size="40"></td></tr>
|
||||||
<tr><td>{|firma|}:</td><td><input type="text" name="firma" value="[FIRMA]" size="40"></td></tr>
|
<tr><td>{|firma|}:</td><td><input type="text" name="firma" value="[FIRMA]" size="40"></td></tr>
|
||||||
<tr><td>{|geloescht|}:</td><td><input type="text" name="geloescht" value="[GELOESCHT]" size="40"></td></tr>
|
<tr><td>{|geloescht|}:</td><td><input type="text" name="geloescht" value="[GELOESCHT]" size="40"></td></tr>
|
||||||
<tr><td>{|mutex|}:</td><td><input type="text" name="mutex" value="[MUTEX]" size="40"></td></tr>
|
<tr><td>{|mutex|}:</td><td><input type="text" name="mutex" value="[MUTEX]" size="40"></td></tr>
|
||||||
<tr><td>{|autoresponder|}:</td><td><input type="text" name="autoresponder" value="[AUTORESPONDER]" size="40"></td></tr>
|
<tr><td>{|autoresponder|}:</td><td><input type="text" name="autoresponder" value="[AUTORESPONDER]" size="40"></td></tr>
|
||||||
<tr><td>{|geschaeftsbriefvorlage|}:</td><td><input type="text" name="geschaeftsbriefvorlage" value="[GESCHAEFTSBRIEFVORLAGE]" size="40"></td></tr>
|
<tr><td>{|geschaeftsbriefvorlage|}:</td><td><input type="text" name="geschaeftsbriefvorlage" value="[GESCHAEFTSBRIEFVORLAGE]" size="40"></td></tr>
|
||||||
<tr><td>{|autoresponderbetreff|}:</td><td><input type="text" name="autoresponderbetreff" value="[AUTORESPONDERBETREFF]" size="40"></td></tr>
|
<tr><td>{|autoresponderbetreff|}:</td><td><textarea id="autoresponderbetreff" name="autoresponderbetreff" rows="6" style="width:100%;">[AUTORESPONDERBETREFF]</textarea></td></tr>
|
||||||
<tr><td>{|autorespondertext|}:</td><td><input type="text" name="autorespondertext" value="[AUTORESPONDERTEXT]" size="40"></td></tr>
|
<tr><td>{|autorespondertext|}:</td><td><textarea id="autorespondertext" name="autorespondertext" rows="6" style="width:100%;">[AUTORESPONDERTEXT]</textarea></td></tr>
|
||||||
<tr><td>{|projekt|}:</td><td><input type="text" name="projekt" value="[PROJEKT]" size="40"></td></tr>
|
<tr><td>{|projekt|}:</td><td><input type="text" id="projekt" name="projekt" value="[PROJEKT]" size="40"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -39,6 +39,14 @@
|
|||||||
<td>Projekt:</td>
|
<td>Projekt:</td>
|
||||||
<td><input type="text" name="projekt" id="projekt" value="[PROJEKT]" /></td>
|
<td><input type="text" name="projekt" id="projekt" value="[PROJEKT]" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Differenzen (Kopf/Positionen) ignorieren:</td>
|
||||||
|
<td><input type="checkbox" name="diffignore" value="1" [DIFFIGNORE] /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Konto für Differenzen:</td>
|
||||||
|
<td><input type="text" name="sachkonto" id="sachkonto" value="[SACHKONTO]" /></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,204 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1"></a></li>
|
||||||
|
</ul>
|
||||||
|
<!-- Example for multiple tabs
|
||||||
|
<ul hidden">
|
||||||
|
<li><a href="#tabs-1">First Tab</a></li>
|
||||||
|
<li><a href="#tabs-2">Second Tab</a></li>
|
||||||
|
</ul>
|
||||||
|
-->
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Einzelbuchung bearbeiten.|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Von|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="index.php?module=[VON_TYP]&id=[VON_ID]&action=edit">[VON]</a>
|
||||||
|
<input hidden type="text" name="von_typ" id="von_typ" value="[VON_TYP]" size="20">
|
||||||
|
<input hidden type="text" name="von_id" id="von_id" value="[VON_ID]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Nach|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="index.php?module=[NACH_TYP]&id=[NACH_ID]&action=edit">[NACH]</a>
|
||||||
|
<input hidden type="text" name="nach_typ" id="nach_typ" value="[NACH_TYP]" size="20">
|
||||||
|
<input hidden type="text" name="nach_id" id="nach_id" value="[NACH_ID]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Betrag|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="numeric" name="betrag" id="betrag" value="[BETRAG]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Währung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select name="waehrung">[WAEHRUNG]</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Benutzer|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
[BENUTZER]
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Datum|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="datum" id="datum" value="[DATUM]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Internebemerkung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<textarea type="text" name="internebemerkung" id="internebemerkung" size="20">[INTERNEBEMERKUNG]</textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
[TAB1]
|
||||||
|
<!-- Example for 2nd row
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Another legend|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Von_typ|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="von_typ" id="von_typ" value="[VON_TYP]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Von_id|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="von_id" id="von_id" value="[VON_ID]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Nach_typ|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="nach_typ" id="nach_typ" value="[NACH_TYP]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Nach_id|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="nach_id" id="nach_id" value="[NACH_ID]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Betrag|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="betrag" id="betrag" value="[BETRAG]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Waehrung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="waehrung" id="waehrung" value="[WAEHRUNG]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Benutzer|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="benutzer" id="benutzer" value="[BENUTZER]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Zeit|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="zeit" id="zeit" value="[ZEIT]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Internebemerkung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="internebemerkung" id="internebemerkung" value="[INTERNEBEMERKUNG]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<!-- Example for 2nd tab
|
||||||
|
<div id="tabs-2">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|...|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
...
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
<form action="" method="post" id="buchungenform">
|
||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1"><!--[TABTEXT]--></a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<legend>{|Einzelsaldo zuordnen und auf mehrere Gegenbelege oder Sachkonto verbuchen.|}</legend>
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-6 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
"[DOC_ZUORDNUNG]"
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Saldo: <u>[DOC_SALDO]</u>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Multifilter für "Info" (Trennzeichen ',; ')
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<textarea type="text" name="multifilter" id="multifilter" style="width:100%;">[MULTIFILTER]</textarea>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="multifilter" class="ui-button-icon">{|Filtern|}</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
[TAB1]
|
||||||
|
<fieldset>
|
||||||
|
<table>
|
||||||
|
<legend>Stapelverarbeitung</legend>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" value="1" name="override" form="buchungenform" /> Mit Abweichung buchen </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" value="1" id="autoalle" /> alle markieren
|
||||||
|
<select id="sel_aktion" name="sel_aktion">
|
||||||
|
<option value="buchen">{|auf Ausgewählte buchen|}</option>
|
||||||
|
<option value="buchen_diff_sachkonto">{|auf Ausgewählte buchen, Gegenbeleg auf Sachkonto ausgleichen|}</option>
|
||||||
|
</select> Sachkonto:
|
||||||
|
<input type="text" id="sachkonto" name="sachkonto" value="">
|
||||||
|
<button name="submit" value="BUCHEN" class="ui-button-icon">{|BUCHEN|}</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input type="number" name="abschlag" id="abschlag" value=[ABSCHLAG] />% Abschlag auf Buchungsbetrag</td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="neuberechnen" class="ui-button-icon" style="width:100%;">
|
||||||
|
{|Buchungen neu berechnen|}
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$('#autoalle').on('change',function(){
|
||||||
|
var wert = $(this).prop('checked');
|
||||||
|
$('#fibu_buchungen_einzelzuordnen').find('input[type="checkbox"]').prop('checked',wert);
|
||||||
|
$('#fibu_buchungen_einzelzuordnen').find('input[type="checkbox"]').first().trigger('change');
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">Salden</a></li>
|
||||||
|
<li><a href="#tabs-2">Buchungen</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
<legend>Saldenübersicht. Salden müssen über Gegenbuchungen ausgeglichen werden.<br><br></legend>
|
||||||
|
<form action="" enctype="multipart/form-data" method="POST">
|
||||||
|
[MESSAGE]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-10 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
[TAB1]
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-2 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<legend>{|Aktionen|}</legend>
|
||||||
|
<td><button name="submit" value="neuberechnen" class="ui-button-icon" style="width:100%;">Buchungen neu berechnen</button></td></tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
[TAB1NEXT]
|
||||||
|
</div>
|
||||||
|
<div id="tabs-2">
|
||||||
|
<form action="#tabs-2" enctype="multipart/form-data" method="POST">
|
||||||
|
[MESSAGE]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-10 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Einzelbuchungen|}</legend>
|
||||||
|
[TAB2]
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-2 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<legend>{|Aktionen|}</legend>
|
||||||
|
<td><button name="submit" value="neuberechnen" class="ui-button-icon" style="width:100%;">Buchungen neu berechnen</button></td></tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
[TAB2NEXT]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1"><!--[TABTEXT]--></a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Einzelsalden zuordnen und auf Gegenbelege oder Sachkonto verbuchen.|}</legend>
|
||||||
|
<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="vorschlagfilter" class="switch">
|
||||||
|
<input type="checkbox" id="vorschlagfilter">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<label for="vorschlagfilter">{|Vorschläge|}</label>
|
||||||
|
</li>
|
||||||
|
<li class="filter-item">
|
||||||
|
<label for="checkedfilter" class="switch">
|
||||||
|
<input type="checkbox" id="checkedfilter">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<label for="checkedfilter">{|Betrag korrekt|}</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form action="" method="post" id="buchungenform">
|
||||||
|
[TAB1]
|
||||||
|
</form>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<table>
|
||||||
|
<legend>Stapelverarbeitung</legend>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" value="1" id="autoalle" /> alle markieren
|
||||||
|
<select form="buchungenform" id="sel_aktion" name="sel_aktion">
|
||||||
|
<option value="vorschlag">{|auf Vorschlag buchen|}</option>
|
||||||
|
<option value="vorschlag_diff_sachkonto">{|auf Vorschlag buchen, Gegenbeleg auf Sachkonto ausgleichen|}</option>
|
||||||
|
<option value="sachkonto">{|auf Sachkonto buchen|}</option>
|
||||||
|
</select> Sachkonto:
|
||||||
|
<input type="text" form="buchungenform" id="sachkonto" name="sachkonto" value="">
|
||||||
|
<button name="submit" form="buchungenform" value="BUCHEN" class="ui-button-icon">{|BUCHEN|}</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<form action="" method="post">
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="neuberechnen" class="ui-button-icon" style="width:100%;">
|
||||||
|
{|Buchungen neu berechnen|}
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</form>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$('#autoalle').on('change',function(){
|
||||||
|
var wert = $(this).prop('checked');
|
||||||
|
$('#fibu_buchungen_zuordnen').find('input[type="checkbox"]').prop('checked',wert);
|
||||||
|
$('#fibu_buchungen_zuordnen').find('input[type="checkbox"]').first().trigger('change');
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -1101,6 +1101,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-6 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Finanzbuchhaltung Einstellungen|}</legend>
|
||||||
|
<table width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="300">Buchungen erzeugen ab Datum:</td><td colspan="3"><input type="text" id= "fibu_buchungen_startdatum" name="fibu_buchungen_startdatum" size="10" value="[FIBU_BUCHUNGEN_STARTDATUM]"><i>Für die Nutzung mit dem Modul Buchhaltung-Buchungen (Zahlungseingang, Zahlungsstatus, Mahnwesen)</i></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="300">Konto für Rechnung-Skontobuchungen:</td><td colspan="3"><input type="text" id= "rechnung_skonto_kontorahmen" name="rechnung_skonto_kontorahmen" size="10" value="[RECHNUNG_SKONTO_KONTORAHMEN]"><i>Auf dieses Sachkonto werden Skontobuchungen mithilfe der Funktion "Zahlungsstatus berechnen" im Rechnungsmodul gebucht</i></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<fieldset><legend>Finanzbuchhaltung Export Kontenrahmen - Weitere Kostenarten</legend>
|
<fieldset><legend>Finanzbuchhaltung Export Kontenrahmen - Weitere Kostenarten</legend>
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" id="angeboteoffen"> Fehlende Artikel</td>
|
<td><input type="checkbox" id="angeboteoffen"> Fehlende Artikel</td>
|
||||||
<td><input type="checkbox" id="angeboteoffen"> Artikel im Zulauf</td>
|
<td><input type="checkbox" id="angeboteoffen"> Artikel im Zulauf</td>
|
||||||
<td><input type="checkbox" id="angeboteheute"> Gersperrte Artikel</td>
|
<td><input type="checkbox" id="angeboteheute"> Gesperrte Artikel</td>
|
||||||
<td>Artikelgruppen: <select><option>alle</option><option>Waren 700000</option></select></td>
|
<td>Artikelgruppen: <select><option>alle</option><option>Waren 700000</option></select></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
</center>
|
</center>
|
||||||
@@ -121,6 +121,7 @@
|
|||||||
<li>{|ZahlungDiff|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {GESAMT}, {REST}, {ANSCHREIBEN}, {INTERNET}</i></li>
|
<li>{|ZahlungDiff|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {GESAMT}, {REST}, {ANSCHREIBEN}, {INTERNET}</i></li>
|
||||||
<li>{|Stornierung|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {INTERNET}</i></li>
|
<li>{|Stornierung|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {INTERNET}</i></li>
|
||||||
<li>{|ZahlungMiss|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {GESAMT}, {REST}, {ANSCHREIBEN}, {INTERNET}</i></li>
|
<li>{|ZahlungMiss|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {GESAMT}, {REST}, {ANSCHREIBEN}, {INTERNET}</i></li>
|
||||||
|
<li>Mahnung <i>Variablen: {BELEGNR}, {DATUM}, {OFFEN}, {MAHNGEBUEHR}, {HEUTE}</i></li>
|
||||||
<li>{|Versand|} <i>{|Variablen|}: {VERSAND}, {VERSANDTYPE}, {VERSANDBEZEICHNUNG}, {TRACKINGNUMMER}, {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}, {LIEFERADRESSE}, {LIEFERADRESSELANG}</i></li>
|
<li>{|Versand|} <i>{|Variablen|}: {VERSAND}, {VERSANDTYPE}, {VERSANDBEZEICHNUNG}, {TRACKINGNUMMER}, {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}, {LIEFERADRESSE}, {LIEFERADRESSELANG}</i></li>
|
||||||
<li>{|VersandMailDokumente|} <i>{|Variablen|}: {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}</i></li>
|
<li>{|VersandMailDokumente|} <i>{|Variablen|}: {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}</i></li>
|
||||||
<li>{|Erweiterte Freigabe|} <i>{|Variablen|}: {REQUESTER}, {LINK}, {LINKFREIGABEUEBERSICHT}, {DOCTYPE}, {DOCTYPE_ID}</i></li>
|
<li>{|Erweiterte Freigabe|} <i>{|Variablen|}: {REQUESTER}, {LINK}, {LINKFREIGABEUEBERSICHT}, {DOCTYPE}, {DOCTYPE_ID}</i></li>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="background-color:white">
|
<div style="background-color:white">
|
||||||
<h2 class="greyh2">{|Zahlungseingang|}</h2>
|
<h2 class="greyh2">Buchungen</h2>
|
||||||
<div style="padding:10px">
|
<div style="padding:10px">
|
||||||
[ZAHLUNGEN]
|
[ZAHLUNGEN]
|
||||||
</div>
|
</div>
|
||||||
@@ -58,12 +58,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="background-color:white">
|
<div style="background-color:white">
|
||||||
<h2 class="greyh2">Deckungsbeitrag</h2>
|
|
||||||
<div style="padding:10px">
|
|
||||||
|
|
||||||
<div class="info">Dieses Modul ist erst ab Version Professional verfügbar</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -45,8 +45,8 @@
|
|||||||
<input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" /> {|alle markieren|}
|
<input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" /> {|alle markieren|}
|
||||||
<select id="sel_aktion" name="sel_aktion">
|
<select id="sel_aktion" name="sel_aktion">
|
||||||
<option value="">{|bitte wählen|} ...</option>
|
<option value="">{|bitte wählen|} ...</option>
|
||||||
<option value="erledigtam">{|als erledigt markieren|}</option>
|
[ALSBEZAHLTMARKIEREN]
|
||||||
<option value="offen">{|erledigt Markierung entfernen|}</option>
|
<option value="offen">{|als offen markieren|}</option>
|
||||||
<option value="mail">{|per Mail versenden|}</option>
|
<option value="mail">{|per Mail versenden|}</option>
|
||||||
<option value="versendet">{|als versendet markieren|}</option>
|
<option value="versendet">{|als versendet markieren|}</option>
|
||||||
<option value="pdf">{|Sammel-PDF|}</option>
|
<option value="pdf">{|Sammel-PDF|}</option>
|
||||||
|
|||||||
@@ -6,7 +6,9 @@
|
|||||||
<li><a href="#tabs-3">{|Zeiterfassung|}</a></li>
|
<li><a href="#tabs-3">{|Zeiterfassung|}</a></li>
|
||||||
<li><a href="#tabs-4">{|Wiedervorlagen|}</a></li>
|
<li><a href="#tabs-4">{|Wiedervorlagen|}</a></li>
|
||||||
<li><a href="#tabs-5">{|Notizen|}</a></li>
|
<li><a href="#tabs-5">{|Notizen|}</a></li>
|
||||||
<li><a href="#tabs-6">{|Kontorahmen|}</a></li>
|
<li><a href="#tabs-6">{|Kontenrahmen|}</a></li>
|
||||||
|
<li><a href="#tabs-7">{|Kontoauszug|}</a></li>
|
||||||
|
<li><a href="#tabs-8">{|Stückliste|}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id="tabs-1">
|
<div id="tabs-1">
|
||||||
@@ -508,7 +510,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-sm-1 col-sm-height">
|
<div class="col-xs-12 col-sm-1 col-sm-height">
|
||||||
<div class="inside inside-full-height">
|
<div class="inside inside-full-height">
|
||||||
<fieldset><legend>{|Kontorahmen|}</legend>
|
<fieldset><legend>{|Kontenrahmen|}</legend>
|
||||||
<table class="mkTable">
|
<table class="mkTable">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Variable</th>
|
<th>Variable</th>
|
||||||
@@ -551,4 +553,143 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="tabs-7">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-sm-1 col-sm-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset><legend>{|Kontoauszug|}</legend>
|
||||||
|
<table class="mkTable">
|
||||||
|
<tr>
|
||||||
|
<th>Variable</th>
|
||||||
|
<th>Beschreibung</th>
|
||||||
|
<th>Kommentar</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>konto</td>
|
||||||
|
<td>Konto-Kurzbezeichnung</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>buchung</td>
|
||||||
|
<td>Buchungsdatum</td>
|
||||||
|
<td>Im Format DD.MM.YYYY</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>betrag</td>
|
||||||
|
<td>Betrag</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>betrag2</td>
|
||||||
|
<td>Betrag (wenn z.B. Soll / Haben getrennt)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>waehrung</td>
|
||||||
|
<td>Währung</td>
|
||||||
|
<td>Muss in den Währungen vorhanden sein</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>buchungstext</td>
|
||||||
|
<td>Buchungstext</td>
|
||||||
|
<td>Wird für die Zuordnung verwendet</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>buchungstext2</td>
|
||||||
|
<td>Buchungstext</td>
|
||||||
|
<td>Wird für die Zuordnung verwendet</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>buchungstext3</td>
|
||||||
|
<td>Buchungstext</td>
|
||||||
|
<td>Wird für die Zuordnung verwendet</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>buchungstext4</td>
|
||||||
|
<td>Buchungstext</td>
|
||||||
|
<td>Wird für die Zuordnung verwendet</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="tabs-8">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 col-sm-1 col-sm-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset><legend>{|Stückliste|}</legend>
|
||||||
|
<table class="mkTable">
|
||||||
|
<tr>
|
||||||
|
<th>Variable</th>
|
||||||
|
<th>Beschreibung</th>
|
||||||
|
<th>Kommentar</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>stuecklistevonartikel</td>
|
||||||
|
<td>Hauptartikel (muss eine Stückliste sein)</td>
|
||||||
|
<td>Artikelnummer</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>artikel</td>
|
||||||
|
<td></td>
|
||||||
|
<td>Artikelnummer</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>menge</td>
|
||||||
|
<td>Zahl</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>referenz</td>
|
||||||
|
<td>Text</td>
|
||||||
|
<td>Für Bestückungen</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>place</td>
|
||||||
|
<td>Leer oder 'DNP' = Nicht platzieren</td>
|
||||||
|
<td>Für Bestückungen</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>layer</td>
|
||||||
|
<td>"top" oder "bottom"</td>
|
||||||
|
<td>Für Bestückungen</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>wert</td>
|
||||||
|
<td>Text</td>
|
||||||
|
<td>Für Bestückungen</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bauform</td>
|
||||||
|
<td>Text</td>
|
||||||
|
<td>Für Bestückungen</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>zachse</td>
|
||||||
|
<td>Zahl</td>
|
||||||
|
<td>Für Bestückungen</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>xpos</td>
|
||||||
|
<td>Zahl</td>
|
||||||
|
<td>Für Bestückungen</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ypos</td>
|
||||||
|
<td>Zahl</td>
|
||||||
|
<td>Für Bestückungen</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>art</td>
|
||||||
|
<td>Einkaufsteil "et",Informationsteil "it" oder Beistellung "bt"</td>
|
||||||
|
<td>Alternativposition?</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<!--<td width="25%"><a href="index.php?module=shopexport&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_20.gif" border="0" width="30%"></a></td>-->
|
<!--<td width="25%"><a href="index.php?module=shopexport&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_20.gif" border="0" width="30%"></a></td>-->
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="center">
|
<tr align="center">
|
||||||
<td><a href="index.php?module=importvorlage&action=list">{|Stammdaten|} <br>{|Import|}</a></td>
|
<td><a href="index.php?module=importvorlage&action=list">{|Daten|} <br>{|Import|}</a></td>
|
||||||
<td><a href="index.php?module=exportvorlage&action=list">{|Stammdaten|} <br>{|Export|}</a></td>
|
<td><a href="index.php?module=exportvorlage&action=list">{|Stammdaten|} <br>{|Export|}</a></td>
|
||||||
<!--<td><a href="index.php?module=adresse_import&action=list">{|Intranet|}</a></td>-->
|
<!--<td><a href="index.php?module=adresse_import&action=list">{|Intranet|}</a></td>-->
|
||||||
<td><a href="index.php?module=shopimport&action=list">{|Import|}<br>({|Online-Shop|})</a></td>
|
<td><a href="index.php?module=shopimport&action=list">{|Import|}<br>({|Online-Shop|})</a></td>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<tr><td colspan="99"> </td></tr>
|
<tr><td colspan="99"> </td></tr>
|
||||||
<tr align="center">
|
<tr align="center">
|
||||||
<td width="25%"><a href="index.php?module=exportbelegepositionen&action=export"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_1.gif" border="0" width="30%"></a></td>
|
<td width="25%"><a href="index.php?module=exportbelegepositionen&action=export"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_1.gif" border="0" width="30%"></a></td>
|
||||||
<td width="25%"><a href="index.php?module=exportbuchhaltung&action=export"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_1.gif" border="0" width="30%"></a></td>
|
<td width="25%"><a href="index.php?module=exportbuchhaltung&action=export"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_19.gif" border="0" width="30%"></a></td>
|
||||||
<td width="25%">[BELEGEIMPORTSTART]<a href="index.php?module=belegeimport&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_1.gif" border="0" width="30%"></a>[BELEGEIMPORTEND]</td>
|
<td width="25%">[BELEGEIMPORTSTART]<a href="index.php?module=belegeimport&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_1.gif" border="0" width="30%"></a>[BELEGEIMPORTEND]</td>
|
||||||
<!--<td width="25%"><a href="index.php?module=shopexport&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_20.gif" border="0" width="30%"></a></td>-->
|
<!--<td width="25%"><a href="index.php?module=shopexport&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_20.gif" border="0" width="30%"></a></td>-->
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
+280
-113
@@ -18,37 +18,66 @@
|
|||||||
<legend>{|Einstellungen|}</legend>
|
<legend>{|Einstellungen|}</legend>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Bezeichnung|}:</td>
|
<td width="150">
|
||||||
<td><input type="text" name="bezeichnung" id="bezeichnung" size="40" rule="notempty"
|
{|Kurzbezeichnung|}:
|
||||||
msg="Pflichfeld!" tabindex="2" value="[BEZEICHNUNG]"></td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="kurzbezeichnung" id="kurzbezeichnung" size="40" rule="notempty" msg="Pflichfeld!" tabindex="2" value="[KURZBEZEICHNUNG]" required><i>{|Muss eindeutig sein.|}</i>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Typ|}:</td>
|
<td width="150">
|
||||||
|
{|Bezeichnung|}:
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<input type="text" name="bezeichnung" id="bezeichnung" size="40" rule="notempty" msg="Pflichfeld!" tabindex="2" value="[BEZEICHNUNG]" required>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Typ|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<!--
|
||||||
<select name="type" id="type">
|
<select name="type" id="type">
|
||||||
[TYPE]
|
[TYPE]
|
||||||
</select>
|
</select>
|
||||||
|
-->
|
||||||
|
<input type="text" name="type" id="type" size="40" value="konto" required readonly>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Projekt|}:</td>
|
<td>
|
||||||
<td><input type="text" size="30" name="projekt" id="projekt" value="[PROJEKT]"></td>
|
{|Projekt|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" size="30" name="projekt" id="projekt" value="[PROJEKT]">
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Aktiv|}:</td>
|
<td>
|
||||||
<td><input type="checkbox" name="aktiv" id="aktiv" value="1"
|
{|Aktiv|}:
|
||||||
[AKTIV]><i>{|Aktiv. Nicht mehr verwendete Konten können deaktiviert werden.|}</i>
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="aktiv" id="aktiv" value="1"
|
||||||
|
[AKTIV]><i>{|Aktiv. Nicht mehr verwendete Konten können deaktiviert werden.|}</i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Keine E-Mail|}:</td>
|
<td>
|
||||||
<td><input type="checkbox" name="keineemail" id="keineemail" value="1"
|
{|Keine E-Mail|}:
|
||||||
[KEINEEMAIL]><i>{|Normalerweise wird beim Zahlungseingang eine Mail an den Kunden gesendet. Soll dies unterdrückt werden muss diese Option gesetzt werden.|}</i>
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="keineemail" id="keineemail" value="1"
|
||||||
|
[KEINEEMAIL]><i>{|Normalerweise wird beim Zahlungseingang eine Mail an den Kunden gesendet. Soll dies unterdrückt werden muss diese Option gesetzt werden.|}</i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Änderungen erlauben|}:</td>
|
<td>
|
||||||
<td><input type="checkbox" name="schreibbar" id="schreibbar" value="1"
|
{|Änderungen erlauben|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="schreibbar" id="schreibbar" value="1"
|
||||||
[SCHREIBBAR]><i> {|Es dürfen nachträglich Kontobuchungen verändert werden|}</i>
|
[SCHREIBBAR]><i> {|Es dürfen nachträglich Kontobuchungen verändert werden|}</i>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -66,38 +95,71 @@
|
|||||||
<legend>{|Bankverbindung (bei Typ Bank)|}</legend>
|
<legend>{|Bankverbindung (bei Typ Bank)|}</legend>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Inhaber|}:</td>
|
<td width="150">{|Inhaber|}:
|
||||||
<td><input type="text" name="inhaber" id="inhaber" size="40" value="[INHABER]"></td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<input type="text" name="inhaber" id="inhaber" size="40" value="[INHABER]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|BIC|}:</td>
|
|
||||||
<td><input type="text" name="swift" id="swift" size="40" value="[SWIFT]"></td>
|
|
||||||
<td>
|
<td>
|
||||||
|
{|BIC|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="swift" id="swift" size="40" value="[SWIFT]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|IBAN|}:</td>
|
|
||||||
<td><input type="text" name="iban" id="iban" size="40" value="[IBAN]"></td>
|
|
||||||
<td>
|
<td>
|
||||||
|
{|IBAN|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="iban" id="iban" size="40" value="[IBAN]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|BLZ|}:</td>
|
|
||||||
<td><input type="text" name="blz" id="blz" size="40" value="[BLZ]"></td>
|
|
||||||
<td>
|
<td>
|
||||||
|
{|BLZ|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="blz" id="blz" size="40" value="[BLZ]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Konto|}:</td>
|
|
||||||
<td><input type="text" name="konto" id="konto" size="40" value="[KONTO]"></td>
|
|
||||||
<td>
|
<td>
|
||||||
|
{|Konto|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="konto" id="konto" size="40" value="[KONTO]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Gläubiger ID|}:</td>
|
|
||||||
<td><input type="text" name="glaeubiger" id="glaeubiger" size="40" value="[GLAEUBIGER]"></td>
|
|
||||||
<td>
|
<td>
|
||||||
|
{|Gläubiger ID|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="glaeubiger" id="glaeubiger" size="40" value="[GLAEUBIGER]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Lastschrift|}:</td>
|
<td>
|
||||||
<td><input type="checkbox" name="lastschrift" id="lastschrift" value="1" [LASTSCHRIFT]></td>
|
{|Lastschrift|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="lastschrift" id="lastschrift" value="1" [LASTSCHRIFT]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -113,9 +175,13 @@
|
|||||||
<legend>{|DATEV|}</legend>
|
<legend>{|DATEV|}</legend>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Konto|}:</td>
|
<td width="150">{|Konto|}:
|
||||||
<td><input type="text" name="datevkonto" id="datevkonto" size="40" value="[DATEVKONTO]"></td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<input type="text" name="datevkonto" id="datevkonto" size="40" value="[DATEVKONTO]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -123,6 +189,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row-height">
|
<div class="row-height">
|
||||||
<div class="col-xs-12 col-md-12 col-md-height">
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
@@ -131,46 +198,68 @@
|
|||||||
<legend>{|CSV-Import|}</legend>
|
<legend>{|CSV-Import|}</legend>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Erste Datenzeile|}:</td>
|
<td width="150">{|Erste Datenzeile|}:
|
||||||
<td><input type="text" name="importerstezeilenummer" id="importerstezeilenummer" size="15"
|
</td>
|
||||||
value="[IMPORTERSTEZEILENUMMER]">
|
|
||||||
<i>{|Zeilennummer in der echte Daten stehen (Erste Zeile: 1)|}</i></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="150">{|Kodierung|}:</td>
|
|
||||||
<td><select name="codierung" id="codierung">[CODIERUNG]</select></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="150">{|Trennzeichen|}:</td>
|
|
||||||
<td><select name="importtrennzeichen" id="importtrennzeichen">[IMPORTTRENNZEICHEN]</select></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="150">{|Maskierung|}:</td>
|
|
||||||
<td>
|
<td>
|
||||||
|
<input type="text" name="importerstezeilenummer" id="importerstezeilenummer" size="15"
|
||||||
|
value="[IMPORTERSTEZEILENUMMER]">
|
||||||
|
<i>{|Zeilennummer in der echte Daten stehen (Erste Zeile: 1)|}</i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150">{|Kodierung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select name="codierung" id="codierung">[CODIERUNG]</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150">{|Trennzeichen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select name="importtrennzeichen" id="importtrennzeichen">[IMPORTTRENNZEICHEN]</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150">{|Maskierung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
<select name="importdatenmaskierung" id="importdatenmaskierung">
|
<select name="importdatenmaskierung" id="importdatenmaskierung">
|
||||||
[IMPORTDATENMASKIERUNG]
|
[IMPORTDATENMASKIERUNG]
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Nullbytes entfernen|}:</td>
|
<td width="150">{|Nullbytes entfernen|}:
|
||||||
<td><input type="checkbox" name="importnullbytes" id="importnullbytes" value="1" [IMPORTNULLBYTES]>
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="importnullbytes" id="importnullbytes" value="1" [IMPORTNULLBYTES]>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Letzte Zeilen ignorieren|}:</td>
|
<td width="150">{|Letzte Zeilen ignorieren|}:
|
||||||
<td><input type="text" size="15" name="importletztenzeilenignorieren"
|
</td>
|
||||||
id="importletztenzeilenignorieren" value="[IMPORTLETZTENZEILENIGNORIEREN]"></td>
|
<td>
|
||||||
|
<input type="text" size="15" name="importletztenzeilenignorieren"
|
||||||
|
id="importletztenzeilenignorieren" value="[IMPORTLETZTENZEILENIGNORIEREN]">
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br><br>
|
<br><br>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Spalte in CSV|}</td>
|
<td width="150">{|Spalte in CSV|}
|
||||||
<td>{|Spalten 1 bis n (Spaltennummer in CSV).|}</tr>
|
</td>
|
||||||
|
<td>
|
||||||
|
{|Spalten 1 bis n (Spaltennummer in CSV).|}</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Datum|}:</td>
|
<td width="150">{|Datum|}:
|
||||||
<td><input type="text" name="importfelddatum" id="importfelddatum" size="15"
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="importfelddatum" id="importfelddatum" size="15"
|
||||||
value="[IMPORTFELDDATUM]">
|
value="[IMPORTFELDDATUM]">
|
||||||
{|Eingabeformat|}: <input type="text" name="importfelddatumformat"
|
{|Eingabeformat|}: <input type="text" name="importfelddatumformat"
|
||||||
id="importfelddatumformat" size="20"
|
id="importfelddatumformat" size="20"
|
||||||
@@ -179,67 +268,103 @@
|
|||||||
id="importfelddatumformatausgabe" size="20"
|
id="importfelddatumformatausgabe" size="20"
|
||||||
value="[IMPORTFELDDATUMFORMATAUSGABE]">
|
value="[IMPORTFELDDATUMFORMATAUSGABE]">
|
||||||
<br><i>{|Bsp. 24.12.2016 in CSV entspricht Eingabeformat %1.%2.%3 und Ausgabeformat %3-%2-%1 (Ausgabe muss immer auf diese Format gebracht werden YYYY-MM-DD)|}</i>
|
<br><i>{|Bsp. 24.12.2016 in CSV entspricht Eingabeformat %1.%2.%3 und Ausgabeformat %3-%2-%1 (Ausgabe muss immer auf diese Format gebracht werden YYYY-MM-DD)|}</i>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Betrag|}:</td>
|
<td width="150">{|Betrag|}:
|
||||||
<td><input type="text" name="importfeldbetrag" id="importfeldbetrag" size="15"
|
</td>
|
||||||
value="[IMPORTFELDBETRAG]"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="150">{|Extra Haben u. Soll|}:</td>
|
|
||||||
<td><input type="checkbox" name="importextrahabensoll" id="importextrahabensoll" value="1" size="15"
|
|
||||||
[IMPORTEXTRAHABENSOLL] /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
<td>
|
||||||
|
<input type="text" name="importfeldbetrag" id="importfeldbetrag" size="15"
|
||||||
|
value="[IMPORTFELDBETRAG]">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150">{|Extra Haben u. Soll|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="importextrahabensoll" id="importextrahabensoll" value="1" size="15"
|
||||||
|
[IMPORTEXTRAHABENSOLL] />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Haben|}:</td>
|
<td width="150">{|Haben|}:
|
||||||
<td><input type="text" name="importfeldhaben" id="importfeldhaben" size="15"
|
</td>
|
||||||
value="[IMPORTFELDHABEN]"></td>
|
<td>
|
||||||
|
<input type="text" name="importfeldhaben" id="importfeldhaben" size="15"
|
||||||
|
value="[IMPORTFELDHABEN]">
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Soll|}:</td>
|
<td width="150">{|Soll|}:
|
||||||
<td><input type="text" name="importfeldsoll" id="importfeldsoll" size="15"
|
</td>
|
||||||
value="[IMPORTFELDSOLL]"></td>
|
<td>
|
||||||
|
<input type="text" name="importfeldsoll" id="importfeldsoll" size="15"
|
||||||
|
value="[IMPORTFELDSOLL]">
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Buchungstext|}:</td>
|
<td width="150">{|Buchungstext|}:
|
||||||
<td><input type="text" name="importfeldbuchungstext" id="importfeldbuchungstext" size="15"
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="importfeldbuchungstext" id="importfeldbuchungstext" size="15"
|
||||||
value="[IMPORTFELDBUCHUNGSTEXT]"> <i> {|Mit + mehre Spalten zusammenfügen (aus dem Inhalt wird eine Prüfsumme berechnet, daher so eindeutig wie möglich machen.)|}</i>
|
value="[IMPORTFELDBUCHUNGSTEXT]"> <i> {|Mit + mehre Spalten zusammenfügen (aus dem Inhalt wird eine Prüfsumme berechnet, daher so eindeutig wie möglich machen.)|}</i>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Währung|}:</td>
|
<td width="150">{|Währung|}:
|
||||||
<td><input type="text" name="importfeldwaehrung" id="importfeldwaehrung" size="15"
|
|
||||||
value="[IMPORTFELDWAEHRUNG]"> <i>{|Ziel: EUR, USD|}</i></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="150">{|Haben/Soll Kennung|}:</td>
|
|
||||||
<td><input type="text" name="importfeldhabensollkennung" id="importfeldhabensollkennung" size="15"
|
|
||||||
value="[IMPORTFELDHABENSOLLKENNUNG]"> <i>{|Extra Spalte in der steht was der Betrag ist.|}</i>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="150"></td>
|
|
||||||
<td>
|
<td>
|
||||||
|
<input type="text" name="importfeldwaehrung" id="importfeldwaehrung" size="15"
|
||||||
|
value="[IMPORTFELDWAEHRUNG]"> <i>{|Ziel: EUR, USD|}</i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150">{|Haben/Soll Kennung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="importfeldhabensollkennung" id="importfeldhabensollkennung" size="15"
|
||||||
|
value="[IMPORTFELDHABENSOLLKENNUNG]"> <i>{|Extra Spalte in der steht was der Betrag ist.|}</i>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="150">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Markierung Eingang|}:</td>
|
<td width="150">{|Markierung Eingang|}:
|
||||||
<td><input type="text" name="importfeldkennunghaben" id="importfeldkennunghaben" size="15"
|
</td>
|
||||||
value="[IMPORTFELDKENNUNGHABEN]"> <i>{|z.B. H oder +|}</i></td>
|
<td>
|
||||||
|
<input type="text" name="importfeldkennunghaben" id="importfeldkennunghaben" size="15"
|
||||||
|
value="[IMPORTFELDKENNUNGHABEN]"> <i>{|z.B. H oder +|}</i>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Markierung Ausgang|}: </td>
|
<td>
|
||||||
<td><input type="text" name="importfeldkennungsoll" id="importfeldkennungsoll" size="15"
|
{|Markierung Ausgang|}:
|
||||||
value="[IMPORTFELDKENNUNGSOLL]"> <i>{|z.B. S oder -|}</i></td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="importfeldkennungsoll" id="importfeldkennungsoll" size="15"
|
||||||
|
value="[IMPORTFELDKENNUNGSOLL]"> <i>{|z.B. S oder -|}</i>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -256,37 +381,56 @@
|
|||||||
<legend>{|Live-Import|}</legend>
|
<legend>{|Live-Import|}</legend>
|
||||||
<table id="liveimport-table">
|
<table id="liveimport-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Live-Import aktiv|}:</td>
|
<td>
|
||||||
<td><input type="checkbox" name="liveimport_online" id="liveimport_online" value="1"
|
{|Live-Import aktiv|}:
|
||||||
[LIVEIMPORT_ONLINE]></td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="liveimport_online" id="liveimport_online" value="1"
|
||||||
|
[LIVEIMPORT_ONLINE]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Zeitraum|}:</td>
|
|
||||||
<td>
|
<td>
|
||||||
|
{|Zeitraum|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
<select name="importperiode_in_hours" id="importperiode_in_hours">
|
<select name="importperiode_in_hours" id="importperiode_in_hours">
|
||||||
[IMPORTPERIODE_IN_HOURS]
|
[IMPORTPERIODE_IN_HOURS]
|
||||||
</select> {|Stunden|}
|
</select> {|Stunden|}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
{|zu Zeiten|}:
|
{|zu Zeiten|}:
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
[SCHEDULER]
|
[SCHEDULER]
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
[BEFORELIVEIMPORT]
|
[BEFORELIVEIMPORT]
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Zugangsdaten|}:</td>
|
<td width="150">{|Zugangsdaten|}:
|
||||||
<td><textarea rows="5" cols="100" name="liveimport" id="liveimport">[LIVEIMPORT]</textarea></td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<textarea rows="5" cols="100" name="liveimport" id="liveimport">[LIVEIMPORT]</textarea>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
[AFTERLIVEIMPORT]
|
[AFTERLIVEIMPORT]
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Passwort Tresor|}:</td>
|
<td>
|
||||||
<td><input type="button" value="{|Passwort setzen|}"
|
{|Passwort Tresor|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="button" value="{|Passwort setzen|}"
|
||||||
id="setpassword"/>
|
id="setpassword"/>
|
||||||
<i>{|Der Inhalt des Passwort-Tresors kann in der Datenstruktur der Zugangsdaten über die Variable {PASSWORT} genutzt werden.|}</i>
|
<i>{|Der Inhalt des Passwort-Tresors kann in der Datenstruktur der Zugangsdaten über die Variable {PASSWORT} genutzt werden.|}</i>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -316,13 +460,21 @@
|
|||||||
<legend>{|Prozessstarter|}</legend>
|
<legend>{|Prozessstarter|}</legend>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Zahlungseingänge automatisch abholen|}:</td>
|
<td>
|
||||||
<td><input type="checkbox" name="cronjobaktiv" id="cronjobaktiv" value="1" [CRONJOBAKTIV]></td>
|
{|Zahlungseingänge automatisch abholen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="cronjobaktiv" id="cronjobaktiv" value="1" [CRONJOBAKTIV]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{|Zahlungseingänge automatisch verbuchen|}:</td>
|
<td>
|
||||||
<td><input type="checkbox" name="cronjobverbuchen" id="cronjobverbuchen" value="1"
|
{|Zahlungseingänge automatisch verbuchen|}:
|
||||||
[CRONJOBVERBUCHEN]></td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="cronjobverbuchen" id="cronjobverbuchen" value="1"
|
||||||
|
[CRONJOBVERBUCHEN]>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -330,6 +482,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row-height">
|
<div class="row-height">
|
||||||
<div class="col-xs-12 col-md-12 col-md-height">
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
@@ -338,20 +491,32 @@
|
|||||||
<legend>{|Startwert für Konto|}</legend>
|
<legend>{|Startwert für Konto|}</legend>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Summieren|}:</td>
|
<td width="150">{|Summieren|}:
|
||||||
<td><input type="checkbox" name="saldo_summieren" id="saldo_summieren" value="1" [SALDO_SUMMIEREN]>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<input type="checkbox" name="saldo_summieren" id="saldo_summieren" value="1" [SALDO_SUMMIEREN]>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Datum Saldo|}:</td>
|
<td width="150">{|Datum Saldo|}:
|
||||||
<td><input type="text" name="saldo_datum" id="saldo_datum" size="40" value="[SALDO_DATUM]"></td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<input type="text" name="saldo_datum" id="saldo_datum" size="40" value="[SALDO_DATUM]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="150">{|Betrag Saldo|}:</td>
|
<td width="150">{|Betrag Saldo|}:
|
||||||
<td><input type="text" name="saldo_betrag" id="saldo_betrag" size="40" value="[SALDO_BETRAG]"></td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<input type="text" name="saldo_betrag" id="saldo_betrag" size="40" value="[SALDO_BETRAG]">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -359,8 +524,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="save" value="1" />
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
<input type="submit" value="{|Speichern|}" style="float:right"/>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<!-- tab view schließen -->
|
<!-- tab view schließen -->
|
||||||
@@ -372,8 +536,11 @@
|
|||||||
<input type="hidden" id="e_id" value="[ID]"/>
|
<input type="hidden" id="e_id" value="[ID]"/>
|
||||||
<table width="" cellspacing="0" cellpadding="0">
|
<table width="" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="110"><label for="e_passwort">{|Passwort|}:</label></td>
|
<td width="110"><label for="e_passwort">{|Passwort|}:</label>
|
||||||
<td><input type="password" id="e_passwort" name="e_passwort" size="40"/></td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="password" id="e_passwort" name="e_passwort" size="40"/>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,151 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1"></a></li>
|
||||||
|
</ul>
|
||||||
|
<!-- Example for multiple tabs
|
||||||
|
<ul hidden">
|
||||||
|
<li><a href="#tabs-1">First Tab</a></li>
|
||||||
|
<li><a href="#tabs-2">Second Tab</a></li>
|
||||||
|
</ul>
|
||||||
|
-->
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Kontoauszug Eintrag|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Konto|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="konto" id="konto" value="[KONTO]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Datum|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="buchung" id="buchung" value="[BUCHUNG]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Betrag|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="soll" id="soll" value="[SOLL]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Währung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="waehrung" id="waehrung" value="[WAEHRUNG]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Fertig|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="fertig" id="fertig" value="[FERTIG]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Datev_abgeschlossen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="datev_abgeschlossen" id="datev_abgeschlossen" value="[DATEV_ABGESCHLOSSEN]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Buchungstext|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<Textarea type="text" name="buchungstext" id="buchungstext" size="20" disabled>[BUCHUNGSTEXT]</textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Bearbeiter|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="bearbeiter" id="bearbeiter" value="[BEARBEITER]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Internebemerkung|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<textarea type="text" name="internebemerkung" id="internebemerkung" size="20">[INTERNEBEMERKUNG]</textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Importfehler|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="importfehler" id="importfehler" value="[IMPORTFEHLER]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Klaerfall|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="klaerfall" id="klaerfall" value="[KLAERFALL]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Klaergrund|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="klaergrund" id="klaergrund" value="[KLAERGRUND]" size="20" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<!-- Example for 2nd tab
|
||||||
|
<div id="tabs-2">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|...|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
...
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
<form action="#tabs-1" id="frmauto" name="frmauto" method="post">
|
||||||
|
[MESSAGE]
|
||||||
|
<legend>Kontoauszüge bitte über Importzentrale importieren.</legend>
|
||||||
|
[TAB1]
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
<form action="#tabs-1" id="frmauto" name="frmauto" method="post">
|
||||||
|
[MESSAGE]
|
||||||
|
<legend>[INFO]</legend>
|
||||||
|
<div class="filter-box filter-usersave">
|
||||||
|
<div class="filter-block filter-inline">
|
||||||
|
<div class="filter-title">{|Filter|}</div>
|
||||||
|
<ul class="filter-list">
|
||||||
|
[STATUSFILTER]
|
||||||
|
<li class="filter-item">
|
||||||
|
<label for="importfehler" class="switch">
|
||||||
|
<input type="checkbox" id="importfehler" />
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<label for="meinetickets">{|Inkl. Importfehler|}</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
[TAB1]
|
||||||
|
<fieldset>
|
||||||
|
<table>
|
||||||
|
<legend>Stapelverarbeitung</legend>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" value="1" id="autoalle" /> alle markieren </td>
|
||||||
|
<td><input type="submit" class="btnBlue" name="ausfuehren" value="{|Importfehler|}" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$('#autoalle').on('change',function(){
|
||||||
|
var wert = $(this).prop('checked');
|
||||||
|
$('#kontoauszuege_list').find('input[type="checkbox"]').prop('checked',wert);
|
||||||
|
$('#kontoauszuege_list').find('input[type="checkbox"]').first().trigger('change');
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1"></a></li>
|
||||||
|
</ul>
|
||||||
|
<!-- Example for multiple tabs
|
||||||
|
<ul hidden">
|
||||||
|
<li><a href="#tabs-1">First Tab</a></li>
|
||||||
|
<li><a href="#tabs-2">Second Tab</a></li>
|
||||||
|
</ul>
|
||||||
|
-->
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|<!--Legend for this form area goes here>-->Mahnwesen-Einstellungen|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Name|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="name" id="name" value="[NAME]" size="20"><i>Entspricht "Typ" in der Geschäftsbrief-Vorlage</i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Tage|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="number" name="tage" id="tage" value="[TAGE]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Gebuehr|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="number" step="0.01" name="gebuehr" id="gebuehr" value="[GEBUEHR]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|E-Mail senden|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="mail" id="mail" [MAIL] size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Mahnung ausdrucken|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="druck" id="druck" [DRUCK] size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Example for 2nd row
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Another legend|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Name|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="name" id="name" value="[NAME]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Tage|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="tage" id="tage" value="[TAGE]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Gebuehr|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="gebuehr" id="gebuehr" value="[GEBUEHR]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Versandmethode|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="versandmethode" id="versandmethode" value="[VERSANDMETHODE]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<!-- Example for 2nd tab
|
||||||
|
<div id="tabs-2">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|...|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
...
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
[TAB1]
|
||||||
|
[TAB1NEXT]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
<form method="post" action="#">
|
||||||
|
<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="zu_mahnen" class="switch">
|
||||||
|
<input type="checkbox" id="zu_mahnen">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<label for="zu_mahnen">{|Nur zu mahnende|}</label>
|
||||||
|
</li>
|
||||||
|
<li class="filter-item">
|
||||||
|
<label for="inkl_bezahlte" class="switch">
|
||||||
|
<input type="checkbox" id="inkl_bezahlte">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<label for="inkl_bezahlte">{|Inkl. bezahlte|}</label>
|
||||||
|
</li>
|
||||||
|
<li class="filter-item">
|
||||||
|
<label for="inkl_gesperrte" class="switch">
|
||||||
|
<input type="checkbox" id="inkl_gesperrte">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<label for="inkl_gesperrte">{|Inkl. gesperrte|}</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<input type="submit" class="btnBlue" name="mahnstufe_berechnen" value="{|Mahnstufe berechnen|}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<form method="post" action="#">
|
||||||
|
[MESSAGE]
|
||||||
|
[TAB1]
|
||||||
|
[TAB1NEXT]
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Stapelverarbeitung|}</legend>
|
||||||
|
<input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" /> {|alle markieren|}
|
||||||
|
<select id="sel_aktion" name="sel_aktion">
|
||||||
|
<option value="">{|bitte wählen|} ...</option>
|
||||||
|
[ALSBEZAHLTMARKIEREN]
|
||||||
|
<option value="offen">{|als offen markieren|}</option>
|
||||||
|
<option value="mahnung_reset">{|Mahnstatus zurücksetzen|}</option>
|
||||||
|
<option value="mahnen">{|Mahnung durchführen|}</option>
|
||||||
|
<!-- <option value="email">{|Mahnung durchführen (nur E-Mail)|}</option>
|
||||||
|
<option value="email">{|Mahnung durchführen (nur Drucken)|}</option> -->
|
||||||
|
</select> {|Drucker|}: <select name="seldrucker">[SELDRUCKER]</select> <input type="submit" class="btnBlue" name="ausfuehren" value="{|ausführen|}" />
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function alleauswaehlen()
|
||||||
|
{
|
||||||
|
var wert = $('#auswahlalle').prop('checked');
|
||||||
|
$('#mahnwesen_list').find(':checkbox').prop('checked',wert);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="background-color:white">
|
<div style="background-color:white">
|
||||||
<h2 class="greyh2">Zahlungseingang</h2>
|
<h2 class="greyh2">Buchungen</h2>
|
||||||
<div style="padding:10px">
|
<div style="padding:10px">
|
||||||
[ZAHLUNGEN]
|
[ZAHLUNGEN]
|
||||||
</div>
|
</div>
|
||||||
@@ -69,15 +69,12 @@
|
|||||||
[PDFARCHIV]
|
[PDFARCHIV]
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="background-color:white">
|
<!--
|
||||||
<h2 class="greyh2">Deckungsbeitrag</h2>
|
<div style="background-color:white">
|
||||||
<div style="padding:10px">
|
<h2 class="greyh2">Deckungsbeitrag</h2>
|
||||||
|
<div style="padding:10px">
|
||||||
|
<div class="info">Dieses Modul ist erst ab Version Professional verfügbar</div>
|
||||||
<div class="info">Dieses Modul ist erst ab Version Professional verfügbar</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
-->
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,13 @@
|
|||||||
<label for="rechnungenstorniert">{|Storniert|}</label>
|
<label for="rechnungenstorniert">{|Storniert|}</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<form method="post" action="#">
|
||||||
|
<input type="submit" class="btnBlue" name="zahlungsstatus_berechnen" value="{|Zahlungsstatus berechnen|}" />
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
[MESSAGE]
|
[MESSAGE]
|
||||||
<form method="post" action="#">
|
<form method="post" action="#">
|
||||||
[TAB1]
|
[TAB1]
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<input type="checkbox" id="report-list-filter-own">
|
<input type="checkbox" id="report-list-filter-own">
|
||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
<label for="report-list-filter-own">{|Nur eigene|}</label>
|
<label for="report-list-filter-own">{|Inkl. Vorlagen|}</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="filter-item">
|
<li class="filter-item">
|
||||||
<label for="report-list-filter-favorites" class="switch">
|
<label for="report-list-filter-favorites" class="switch">
|
||||||
|
|||||||
@@ -3,12 +3,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<div id="tabs">
|
<div id="tabs">
|
||||||
<ul>
|
|
||||||
<li><a href="#tabs-1">Übersicht</a></li>
|
|
||||||
<!--<li><a href="#tabs-2">neue Position anlegen</a></li>-->
|
|
||||||
<li><a href="#tabs-3">Stückliste importieren</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<!-- erstes tab -->
|
<!-- erstes tab -->
|
||||||
<div id="tabs-1">
|
<div id="tabs-1">
|
||||||
[MESSAGE]
|
[MESSAGE]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="#tabs-1">Übersicht</a></li>
|
<li><a href="#tabs-1">Übersicht</a></li>
|
||||||
<li><a href="#tabs-2">neue Position anlegen</a></li>
|
<li><a href="#tabs-2">neue Position anlegen</a></li>
|
||||||
<li><a href="#tabs-3">Stückliste importieren</a></li>
|
<!-- DEPRECATED moved to importvorlage <li><a href="#tabs-3">Stückliste importieren</a></li> -->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- erstes tab -->
|
<!-- erstes tab -->
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
<legend>{|Aktionen|}</legend>
|
<legend>{|Aktionen|}</legend>
|
||||||
<td><button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button></td></tr>
|
<td><button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button></td></tr>
|
||||||
<td><button name="submit" value="neue_email" class="ui-button-icon" style="width:100%;">Neue E-Mail</button></td></tr>
|
<td><button name="submit" value="neue_email" class="ui-button-icon" style="width:100%;">Neue E-Mail</button></td></tr>
|
||||||
|
<td><button name="submit" formaction="index.php?module=ticketregeln&action=create" value="regel" class="ui-button-icon" style="width:100%;">Ticketregel erstellen</button><input hidden type="text" name="ticketid" value="[ID]"></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,4 +62,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,18 +17,18 @@
|
|||||||
<div class="col-xs-12 col-md-12 col-md-height">
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
<div class="inside inside-full-height">
|
<div class="inside inside-full-height">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{|Ticketregeln|}</legend><i>Ticketregeln fü die Verarbeitung bei Ticketeingang. Platzhalter werden mit % angegeben.</i>
|
<legend>{|Ticketregeln|}</legend><i>Ticketregeln für die Verarbeitung bei Ticketeingang. Platzhalter werden mit % angegeben.</i>
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
<tr><td>{|E-Mail Empfänger|}:</td><td><input type="text" name="empfaenger_email" value="[EMPFAENGER_EMAIL]" size="40"></td></tr>
|
<tr><td>{|E-Mail Empfänger|}:</td><td><input type="text" name="empfaenger_email" value="[EMPFAENGER_EMAIL]" size="40"></td></tr>
|
||||||
<tr><td>{|E-Mail Verfasser|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
|
<tr><td>{|E-Mail Verfasser|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
|
||||||
<tr><td>{|Verfasser Name|}:</td><td><input type="text" name="name" value="[NAME]" size="40"></td></tr>
|
<tr><td>{|Verfasser Name|}:</td><td><input type="text" name="name" value="[NAME]" size="40"></td></tr>
|
||||||
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" value="[BETREFF]" size="40"></td></tr>
|
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" value="[BETREFF]" size="40"></td></tr>
|
||||||
<tr><td>{|Papierkorb|}:</td><td><input type="text" name="spam" value="[SPAM]" size="40"></td></tr>
|
<tr><td>{|Papierkorb|}:</td><td><input type="checkbox" name="spam" value="1" [SPAM] size="40"></td></tr>
|
||||||
<tr><td>{|Persönlich|}:</td><td><input type="text" name="persoenlich" value="[PERSOENLICH]" size="40"></td></tr>
|
<tr><td>{|Persönlich|}:</td><td><input type="checkbox" name="persoenlich" value="1" [PERSOENLICH] size="40"></td></tr>
|
||||||
<tr><td>{|Prio|}:</td><td><input type="text" name="prio" value="[PRIO]" size="40"></td></tr>
|
<tr><td>{|Prio|}:</td><td><input type="checkbox" name="prio" value="1" [PRIO] size="40"></td></tr>
|
||||||
<tr><td>{|DSGVO|}:</td><td><input type="text" name="dsgvo" value="[DSGVO]" size="40"></td></tr>
|
<tr><td>{|DSGVO|}:</td><td><input type="checkbox" name="dsgvo" value="1" [DSGVO] size="40"></td></tr>
|
||||||
<tr><td>{|Verantwortliche Warteschlange|}:</td><td><input type="text" name="warteschlange" id="warteschlange" value="[WARTESCHLANGE]" size="40"></td></tr>
|
<tr><td>{|Verantwortliche Warteschlange|}:</td><td><input type="text" name="warteschlange" id="warteschlange" value="[WARTESCHLANGE]" size="40"></td></tr>
|
||||||
<tr><td>{|Aktiv|}:</td><td><input type="text" name="aktiv" value="[AKTIV]" size="40"></td></tr>
|
<tr><td>{|Aktiv|}:</td><td><input type="checkbox" name="aktiv" value="1" [AKTIV] size="40"></td></tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -36,31 +36,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Example for 2nd row
|
|
||||||
<div class="row">
|
|
||||||
<div class="row-height">
|
|
||||||
<div class="col-xs-12 col-md-12 col-md-height">
|
|
||||||
<div class="inside inside-full-height">
|
|
||||||
<fieldset>
|
|
||||||
<legend>{|Another legend|}</legend>
|
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
|
||||||
<tr><td>{|Empfaenger_email|}:</td><td><input type="text" name="empfaenger_email" value="[EMPFAENGER_EMAIL]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Sender_email|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Name|}:</td><td><input type="text" name="name" value="[NAME]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" value="[BETREFF]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Spam|}:</td><td><input type="text" name="spam" value="[SPAM]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Persoenlich|}:</td><td><input type="text" name="persoenlich" value="[PERSOENLICH]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Prio|}:</td><td><input type="text" name="prio" value="[PRIO]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Dsgvo|}:</td><td><input type="text" name="dsgvo" value="[DSGVO]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Warteschlange|}:</td><td><input type="text" name="warteschlange" value="[WARTESCHLANGE]" size="40"></td></tr>
|
|
||||||
<tr><td>{|Aktiv|}:</td><td><input type="text" name="aktiv" value="[AKTIV]" size="40"></td></tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<div id="tabs-1">
|
<div id="tabs">
|
||||||
[MESSAGE]
|
<ul>
|
||||||
[TAB1]
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
[TAB1NEXT]
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
[TAB1]
|
||||||
|
[TAB1NEXT]
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,7 +97,11 @@
|
|||||||
<td>{|Sprache|}:</td>
|
<td>{|Sprache|}:</td>
|
||||||
<td><select name="sprachebevorzugen" id="sprachebevorzugen">[SPRACHEBEVORZUGEN]</select></td>
|
<td><select name="sprachebevorzugen" id="sprachebevorzugen">[SPRACHEBEVORZUGEN]</select></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>{|Sprache und Region|}:</td>
|
||||||
|
<td><input type="text" name="locale" id="locale" value="[LOCALE]" size="40" disabled="disabled"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>{|Eigene Kalenderfarbe|}:</td>
|
<td>{|Eigene Kalenderfarbe|}:</td>
|
||||||
<td><input type="text" name="defaultcolor" id="defaultcolor" value="[DEFAULTCOLOR]" size="80"></td>
|
<td><input type="text" name="defaultcolor" id="defaultcolor" value="[DEFAULTCOLOR]" size="80"></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|||||||
@@ -112,6 +112,10 @@ $width = array('10%'); // Fill out manually later
|
|||||||
// Write to database
|
// Write to database
|
||||||
|
|
||||||
// Add checks here
|
// Add checks here
|
||||||
|
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
|
||||||
|
$input['ticketprojekt'] = $this->app->erp->ReplaceProjekt(true,$input['ticketprojekt'],true); // Parameters: Target db?, value, from form?
|
||||||
|
$input['adresse'] = $this->app->erp->ReplaceAdresse(true,$input['adresse'],true); // Parameters: Target db?, value, from form?
|
||||||
|
$input['ticketqueue'] = explode(" ",$input['ticketqueue'])[0]; // Just the label
|
||||||
|
|
||||||
$columns = "id, ";
|
$columns = "id, ";
|
||||||
$values = "$id, ";
|
$values = "$id, ";
|
||||||
@@ -168,6 +172,17 @@ $width = array('10%'); // Fill out manually later
|
|||||||
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$this->app->YUI->CkEditor("signatur","internal", null, 'JQUERY');
|
||||||
|
$this->app->YUI->CkEditor("autoresponderbetreff","internal", null, 'JQUERY');
|
||||||
|
$this->app->YUI->CkEditor("autorespondertext","internal", null, 'JQUERY');
|
||||||
|
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$result[0]['projekt'],false)); // Parameters: Target db?, value, from form?
|
||||||
|
$this->app->Tpl->Set('TICKETPROJEKT',$this->app->erp->ReplaceProjekt(false,$result[0]['ticketprojekt'],false)); // Parameters: Target db?, value, from form?
|
||||||
|
$this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceAdresse(false,$result[0]['adresse'],false)); // Convert ID to form display
|
||||||
|
$this->app->YUI->AutoComplete("projekt","projektname",1);
|
||||||
|
$this->app->YUI->AutoComplete("ticketprojekt","projektname",1);
|
||||||
|
$this->app->YUI->AutoComplete("adresse","adresse");
|
||||||
|
$this->app->YUI->AutoComplete("ticketqueue","warteschlangename");
|
||||||
|
$this->app->YUI->AutoComplete("ticketprojekt","projektname",1);
|
||||||
$this->app->Tpl->Parse('PAGE', "emailbackup_edit.tpl");
|
$this->app->Tpl->Parse('PAGE', "emailbackup_edit.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,14 @@ class Exportbuchhaltung
|
|||||||
$rgchecked = $this->app->Secure->GetPOST("rechnung");
|
$rgchecked = $this->app->Secure->GetPOST("rechnung");
|
||||||
$gschecked = $this->app->Secure->GetPOST("gutschrift");
|
$gschecked = $this->app->Secure->GetPOST("gutschrift");
|
||||||
$vbchecked = $this->app->Secure->GetPOST("verbindlichkeit");
|
$vbchecked = $this->app->Secure->GetPOST("verbindlichkeit");
|
||||||
|
$diffignore = $this->app->Secure->GetPOST("diffignore");
|
||||||
|
$sachkonto = $this->app->Secure->GetPOST('sachkonto');
|
||||||
|
|
||||||
|
$account_id = null;
|
||||||
|
if (!empty($sachkonto)) {
|
||||||
|
$sachkonto_kennung = explode(' ',$sachkonto)[0];
|
||||||
|
$account_id = $this->app->DB->SelectArr("SELECT id from kontorahmen WHERE sachkonto = '".$sachkonto_kennung."'")[0]['id'];
|
||||||
|
}
|
||||||
|
|
||||||
$msg = "";
|
$msg = "";
|
||||||
|
|
||||||
@@ -151,7 +159,7 @@ class Exportbuchhaltung
|
|||||||
if ($dataok) {
|
if ($dataok) {
|
||||||
$filename = "EXTF_".date('Ymd') . "_Buchungsstapel_DATEV_export.csv";
|
$filename = "EXTF_".date('Ymd') . "_Buchungsstapel_DATEV_export.csv";
|
||||||
try {
|
try {
|
||||||
$csv = $this->DATEV_Buchuchungsstapel($rgchecked, $gschecked, $vbchecked, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename);
|
$csv = $this->DATEV_Buchuchungsstapel($rgchecked, $gschecked, $vbchecked, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename, $diffignore, $sachkonto_kennung);
|
||||||
header("Content-Disposition: attachment; filename=" . $filename);
|
header("Content-Disposition: attachment; filename=" . $filename);
|
||||||
header("Pragma: no-cache");
|
header("Pragma: no-cache");
|
||||||
header("Expires: 0");
|
header("Expires: 0");
|
||||||
@@ -183,25 +191,28 @@ class Exportbuchhaltung
|
|||||||
$this->app->YUI->AutoComplete("projekt", "projektname", 1);
|
$this->app->YUI->AutoComplete("projekt", "projektname", 1);
|
||||||
$this->app->YUI->DatePicker("von");
|
$this->app->YUI->DatePicker("von");
|
||||||
$this->app->YUI->DatePicker("bis");
|
$this->app->YUI->DatePicker("bis");
|
||||||
|
$this->app->YUI->AutoComplete('sachkonto', 'sachkonto');
|
||||||
|
|
||||||
$this->app->Tpl->SET('MESSAGE', $msg);
|
$this->app->Tpl->SET('MESSAGE', $msg);
|
||||||
|
|
||||||
$this->app->Tpl->SET('RGCHECKED',$rgchecked?'checked':'');
|
$this->app->Tpl->SET('RGCHECKED',$rgchecked?'checked':'');
|
||||||
$this->app->Tpl->SET('GSCHECKED',$gschecked?'checked':'');
|
$this->app->Tpl->SET('GSCHECKED',$gschecked?'checked':'');
|
||||||
$this->app->Tpl->SET('VBCHECKED',$vbchecked?'checked':'');
|
$this->app->Tpl->SET('VBCHECKED',$vbchecked?'checked':'');
|
||||||
|
$this->app->Tpl->SET('DIFFIGNORE',$diffignore?'checked':'');
|
||||||
|
|
||||||
$this->app->Tpl->SET('VON', $von_form);
|
$this->app->Tpl->SET('VON', $von_form);
|
||||||
$this->app->Tpl->SET('BIS', $bis_form);
|
$this->app->Tpl->SET('BIS', $bis_form);
|
||||||
$this->app->Tpl->SET('PROJEKT', $projektkuerzel);
|
$this->app->Tpl->SET('PROJEKT', $projektkuerzel);
|
||||||
|
$this->app->Tpl->SET('SACHKONTO', $sachkonto);
|
||||||
|
|
||||||
$this->app->Tpl->Parse('PAGE', "exportbuchhaltung_export.tpl");
|
$this->app->Tpl->Parse('PAGE', "exportbuchhaltung_export.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create DATEV Buchhungsstapel
|
* Create DATEV Buchhungsstapel
|
||||||
* @throws ConsistencyException with string (list of items) if consistency check fails
|
* @throws ConsistencyException with string (list of items) if consistency check fails and no sachkonto for differences is given
|
||||||
*/
|
*/
|
||||||
function DATEV_Buchuchungsstapel(bool $rechnung, bool $gutschrift, bool $verbindlichkeit, string $berater, string $mandant, datetime $wj_beginn, int $sachkontenlaenge, datetime $von, datetime $bis, int $projekt = 0, string $filename = 'EXTF_Buchungsstapel_DATEV_export.csv') : string {
|
function DATEV_Buchuchungsstapel(bool $rechnung, bool $gutschrift, bool $verbindlichkeit, string $berater, string $mandant, datetime $wj_beginn, int $sachkontenlaenge, datetime $von, datetime $bis, int $projekt = 0, string $filename = 'EXTF_Buchungsstapel_DATEV_export.csv', $diffignore = false, $sachkonto_differences) : string {
|
||||||
|
|
||||||
$datev_header_definition = array (
|
$datev_header_definition = array (
|
||||||
'1' => 'Kennzeichen',
|
'1' => 'Kennzeichen',
|
||||||
@@ -499,7 +510,8 @@ class Exportbuchhaltung
|
|||||||
b.".$typ['field_date']." as datum,
|
b.".$typ['field_date']." as datum,
|
||||||
p.id as pos_id,
|
p.id as pos_id,
|
||||||
".$typ['field_betrag_gesamt']." as betrag_gesamt,
|
".$typ['field_betrag_gesamt']." as betrag_gesamt,
|
||||||
".$typ['field_betrag']." as betrag,
|
b.waehrung,
|
||||||
|
ROUND(".$typ['field_betrag'].",2) as betrag,
|
||||||
".$typ['field_gegenkonto']." as gegenkonto,
|
".$typ['field_gegenkonto']." as gegenkonto,
|
||||||
p.waehrung as pos_waehrung
|
p.waehrung as pos_waehrung
|
||||||
FROM
|
FROM
|
||||||
@@ -513,33 +525,72 @@ class Exportbuchhaltung
|
|||||||
WHERE
|
WHERE
|
||||||
b.".$typ['field_date']." BETWEEN '".date_format($von,"Y-m-d")."' AND '".date_format($bis,"Y-m-d")."' AND (b.projekt=$projekt OR $projekt=0)".$typ['condition_where'];
|
b.".$typ['field_date']." BETWEEN '".date_format($von,"Y-m-d")."' AND '".date_format($bis,"Y-m-d")."' AND (b.projekt=$projekt OR $projekt=0)".$typ['condition_where'];
|
||||||
|
|
||||||
// Check consistency of positions
|
// Check consistency of positions
|
||||||
|
if (!$diffignore) {
|
||||||
$sql_check = "SELECT *
|
$sql_check = "SELECT *
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
belegnr,
|
|
||||||
betrag_gesamt,
|
|
||||||
ROUND(SUM(betrag),2) AS betrag_summe
|
|
||||||
FROM
|
FROM
|
||||||
(".$sql.") posten
|
(
|
||||||
GROUP BY
|
SELECT
|
||||||
belegnr
|
belegnr,
|
||||||
) summen
|
datum,
|
||||||
WHERE betrag_gesamt <> betrag_summe OR betrag_summe IS NULL";
|
betrag_gesamt,
|
||||||
|
ROUND(SUM(betrag),2) AS betrag_summe,
|
||||||
|
waehrung,
|
||||||
|
kundennummer,
|
||||||
|
ustid,
|
||||||
|
auftrag
|
||||||
|
FROM
|
||||||
|
(".$sql.") posten
|
||||||
|
GROUP BY
|
||||||
|
belegnr
|
||||||
|
) summen
|
||||||
|
WHERE betrag_gesamt <> betrag_summe OR betrag_summe IS NULL";
|
||||||
|
|
||||||
$result = $this->app->DB->SelectArr($sql_check);
|
$result = $this->app->DB->SelectArr($sql_check);
|
||||||
if (!empty($result)) {
|
if (!empty($result)) {
|
||||||
$e = new ConsistencyException(ucfirst($typ['typ']),$result);
|
|
||||||
throw $e;
|
if (!$sachkonto_differences) {
|
||||||
}
|
$e = new ConsistencyException(ucfirst($typ['typ']),$result);
|
||||||
|
throw $e;
|
||||||
|
} else {
|
||||||
|
// Create differences entries
|
||||||
|
foreach ($result as $row) {
|
||||||
|
|
||||||
|
$posid = $row['pos_id'];
|
||||||
|
$tmpsteuersatz = 0;
|
||||||
|
$tmpsteuertext = '';
|
||||||
|
$erloes = '';
|
||||||
|
$result = array();
|
||||||
|
$this->app->erp->GetSteuerPosition($typ['typ'], $posid, $tmpsteuersatz, $tmpsteuertext, $erloes);
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
|
||||||
|
$difference = $row['betrag_gesamt']-$row['betrag_summe'];
|
||||||
|
|
||||||
|
$data['Umsatz'] = number_format(abs($difference), 2, ',', ''); // obligatory
|
||||||
|
$data['EU-Steuersatz (Bestimmung)'] = 0;
|
||||||
|
$data['WKZ Umsatz'] = $row['waehrung'];
|
||||||
|
$data['Belegfeld 1'] = mb_strimwidth($row['belegnr'],0,12);
|
||||||
|
$data['Konto'] = $row['kundennummer'];
|
||||||
|
$data['Soll-/Haben-Kennzeichen'] = ($difference < 0)?'S':'H'; // obligatory
|
||||||
|
|
||||||
|
$data['Gegenkonto (ohne BU-Schlüssel)'] = $sachkonto_differences; // obligatory
|
||||||
|
|
||||||
|
$data['Belegdatum'] = date_format(date_create($row['datum']),"dm"); // obligatory
|
||||||
|
$data['Buchungstext'] = "Differenz";
|
||||||
|
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
|
||||||
|
$data['Auftragsnummer'] = $row['auftrag'];
|
||||||
|
$csv .= $this->create_line($datev_buchungsstapel_definition,$data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // diffignore
|
||||||
|
|
||||||
// Query position data
|
// Query position data
|
||||||
$arr = $this->app->DB->Query($sql);
|
$arr = $this->app->DB->Query($sql);
|
||||||
while ($row = $this->app->DB->Fetch_Assoc($arr)) {
|
while ($row = $this->app->DB->Fetch_Assoc($arr)) {
|
||||||
|
|
||||||
// print_r($row);
|
//print_r($row);
|
||||||
|
|
||||||
$posid = $row['pos_id'];
|
$posid = $row['pos_id'];
|
||||||
$tmpsteuersatz = 0;
|
$tmpsteuersatz = 0;
|
||||||
@@ -572,17 +623,10 @@ class Exportbuchhaltung
|
|||||||
$data['Belegdatum'] = date_format(date_create($row['datum']),"dm"); // obligatory
|
$data['Belegdatum'] = date_format(date_create($row['datum']),"dm"); // obligatory
|
||||||
$data['Buchungstext'] = mb_strimwidth($row['name'],0,60);
|
$data['Buchungstext'] = mb_strimwidth($row['name'],0,60);
|
||||||
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
|
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
|
||||||
$data['Auftragsnummer'] = $row['auftrag'];
|
|
||||||
|
|
||||||
$comma = "";
|
$data['Auftragsnummer'] = ($row['auftrag']!=0)?$row['auftrag']:'';
|
||||||
foreach ($datev_buchungsstapel_definition as $key => $value) {
|
|
||||||
if (!isset($data[$value])) {
|
$csv .= $this->create_line($datev_buchungsstapel_definition,$data);
|
||||||
$data[$value] = '';
|
|
||||||
}
|
|
||||||
$csv .= $comma.'"'.$data[$value].'"';
|
|
||||||
$comma = ";";
|
|
||||||
}
|
|
||||||
$csv .= "\r\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -591,6 +635,21 @@ class Exportbuchhaltung
|
|||||||
$csv = mb_convert_encoding($csv, "ISO-8859-1", "UTF-8");
|
$csv = mb_convert_encoding($csv, "ISO-8859-1", "UTF-8");
|
||||||
return($csv);
|
return($csv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function create_line($definition, $data) : string {
|
||||||
|
$csv = "";
|
||||||
|
$comma = "";
|
||||||
|
foreach ($definition as $key => $value) {
|
||||||
|
if (!isset($data[$value])) {
|
||||||
|
$data[$value] = '';
|
||||||
|
}
|
||||||
|
$csv .= $comma.'"'.$data[$value].'"';
|
||||||
|
$comma = ";";
|
||||||
|
}
|
||||||
|
$csv .= "\r\n";
|
||||||
|
return($csv);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1043,7 +1043,7 @@ class Firmendaten {
|
|||||||
'arbeitsnachweis_header','arbeitsnachweis_footer','provisionsgutschrift_header','provisionsgutschrift_footer','proformarechnung_header','proformarechnung_footer','eu_lieferung_vermerk','export_lieferung_vermerk'
|
'arbeitsnachweis_header','arbeitsnachweis_footer','provisionsgutschrift_header','provisionsgutschrift_footer','proformarechnung_header','proformarechnung_footer','eu_lieferung_vermerk','export_lieferung_vermerk'
|
||||||
,'wareneingang_kamera_waage','layout_iconbar','passwort','host','port','mailssl','signatur','email','absendername','bcc1','bcc2','bcc3'
|
,'wareneingang_kamera_waage','layout_iconbar','passwort','host','port','mailssl','signatur','email','absendername','bcc1','bcc2','bcc3'
|
||||||
,'firmenfarbe','name','strasse','plz','ort','steuernummer','projekt','steuer_positionen_export','tabsnavigationfarbe','tabsnavigationfarbeschrift'
|
,'firmenfarbe','name','strasse','plz','ort','steuernummer','projekt','steuer_positionen_export','tabsnavigationfarbe','tabsnavigationfarbeschrift'
|
||||||
,"buchhaltung_berater","buchhaltung_mandant","buchhaltung_wj_beginn","buchhaltung_sachkontenlaenge"
|
,"buchhaltung_berater","buchhaltung_mandant","buchhaltung_wj_beginn","buchhaltung_sachkontenlaenge", "fibu_buchungen_startdatum", "rechnung_skonto_kontorahmen"
|
||||||
);
|
);
|
||||||
|
|
||||||
if(isset($sql2a)){
|
if(isset($sql2a)){
|
||||||
@@ -1379,6 +1379,11 @@ class Firmendaten {
|
|||||||
}
|
}
|
||||||
$this->app->YUI->AutoComplete('steuersatz_normal','steuersatz',1);
|
$this->app->YUI->AutoComplete('steuersatz_normal','steuersatz',1);
|
||||||
$this->app->YUI->AutoComplete('steuersatz_ermaessigt','steuersatz',1);
|
$this->app->YUI->AutoComplete('steuersatz_ermaessigt','steuersatz',1);
|
||||||
|
|
||||||
|
$this->app->YUI->DatePicker('fibu_buchungen_startdatum');
|
||||||
|
|
||||||
|
$this->app->YUI->AutoComplete('rechnung_skonto_kontorahmen', 'sachkonto');
|
||||||
|
|
||||||
$this->app->Tpl->Parse('PAGE','firmendaten.tpl');
|
$this->app->Tpl->Parse('PAGE','firmendaten.tpl');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1842,6 +1847,12 @@ class Firmendaten {
|
|||||||
if(!empty($data[0]['taxfromdoctypesettings'])) {
|
if(!empty($data[0]['taxfromdoctypesettings'])) {
|
||||||
$this->app->Tpl->Set('OPTIONTAXFROMDOCTYPESETTINGS', ' selected="selected" ');
|
$this->app->Tpl->Set('OPTIONTAXFROMDOCTYPESETTINGS', ' selected="selected" ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fibu
|
||||||
|
$this->app->Tpl->Set('FIBU_BUCHUNGEN_STARTDATUM', $this->app->erp->ReplaceDatum(false,$data[0]['fibu_buchungen_startdatum'],false));
|
||||||
|
$this->app->Tpl->Set('RECHNUNG_SKONTO_KONTORAHMEN', $this->app->erp->ReplaceKontorahmen(false,$data[0]['rechnung_skonto_kontorahmen']));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2282,6 +2293,9 @@ class Firmendaten {
|
|||||||
$data['buchhaltung_wj_beginn'] = ($this->app->Secure->POST["buchhaltung_wj_beginn"]);
|
$data['buchhaltung_wj_beginn'] = ($this->app->Secure->POST["buchhaltung_wj_beginn"]);
|
||||||
$data['buchhaltung_sachkontenlaenge'] = ($this->app->Secure->POST["buchhaltung_sachkontenlaenge"]);
|
$data['buchhaltung_sachkontenlaenge'] = ($this->app->Secure->POST["buchhaltung_sachkontenlaenge"]);
|
||||||
|
|
||||||
|
$data['fibu_buchungen_startdatum'] = $this->app->erp->ReplaceDatum(true,$this->app->Secure->POST["fibu_buchungen_startdatum"],false);
|
||||||
|
$data['rechnung_skonto_kontorahmen'] = $this->app->erp->ReplaceKontorahmen(true,$this->app->Secure->POST["rechnung_skonto_kontorahmen"]);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+112
-109
@@ -620,6 +620,8 @@ class Gutschrift extends GenGutschrift
|
|||||||
$tmp3->DisplayNew('PDFARCHIV','Menü','noAction');
|
$tmp3->DisplayNew('PDFARCHIV','Menü','noAction');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->app->Tpl->Add('ZAHLUNGEN',$this->GutschriftZahlung(true));
|
||||||
|
|
||||||
if($parsetarget=='') {
|
if($parsetarget=='') {
|
||||||
$this->app->Tpl->Output('gutschrift_minidetail.tpl');
|
$this->app->Tpl->Output('gutschrift_minidetail.tpl');
|
||||||
$this->app->ExitXentral();
|
$this->app->ExitXentral();
|
||||||
@@ -648,6 +650,7 @@ class Gutschrift extends GenGutschrift
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Build the html output for minidetail containing the payments
|
||||||
* @param bool $return
|
* @param bool $return
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
@@ -656,101 +659,36 @@ class Gutschrift extends GenGutschrift
|
|||||||
{
|
{
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
$gutschriftArr = $this->app->DB->SelectArr(
|
$zahlungen = $this->app->erp->GetZahlungen($id,'gutschrift');
|
||||||
"SELECT DATE_FORMAT(datum,'%d.%m.%Y') as datum, belegnr, soll, waehrung, rechnungid
|
if (!empty($zahlungen)) {
|
||||||
FROM gutschrift WHERE id='$id' LIMIT 1"
|
$et = new EasyTable($this->app);
|
||||||
);
|
|
||||||
$waehrung = empty($gutschriftArr)?'EUR':$gutschriftArr[0]['waehrung'];
|
|
||||||
if(!$waehrung) {
|
|
||||||
$waehrung = 'EUR';
|
|
||||||
}
|
|
||||||
|
|
||||||
$rechnungid = empty($gutschriftArr)?0: $gutschriftArr[0]['rechnungid'];
|
$et->headings = array('Datum','Beleg','Betrag','Währung');
|
||||||
|
|
||||||
$auftragid = $rechnungid <= 0?0:$this->app->DB->Select(
|
foreach ($zahlungen as $zahlung) {
|
||||||
sprintf(
|
$row = array(
|
||||||
'SELECT `auftragid` FROM `rechnung` WHERE `id` = %d LIMIT 1',
|
$zahlung['datum'],
|
||||||
$rechnungid
|
"<a href=\"index.php?module=".$zahlung['doc_typ']."&action=edit&id=".$zahlung['doc_id']."\">
|
||||||
)
|
".ucfirst($zahlung['doc_typ'])."
|
||||||
);
|
".$zahlung['doc_info']."
|
||||||
$eingang ="<tr><td colspan=\"3\"><b>Zahlungen</b></td></tr>";
|
</a>",
|
||||||
|
$zahlung['betrag'],
|
||||||
|
$zahlung['waehrung']
|
||||||
|
);
|
||||||
|
$et->AddRow($row);
|
||||||
|
}
|
||||||
|
|
||||||
|
$salden = $this->app->erp->GetSaldenDokument($id,'gutschrift');
|
||||||
$eingang .="<tr><td class=auftrag_cell>".$gutschriftArr[0]['datum']
|
foreach ($salden as $saldo) {
|
||||||
."</td><td class=auftrag_cell>GS ".$gutschriftArr[0]['belegnr']
|
$row = array(
|
||||||
."</td><td class=auftrag_cell align=right>".$this->app->erp->EUR($gutschriftArr[0]['soll'])
|
'',
|
||||||
." $waehrung</td></tr>";
|
'<b>Saldo</b>',
|
||||||
|
"<b>".$saldo['betrag']."</b>",
|
||||||
$eingangArr = $this->app->DB->SelectArr(
|
"<b>".$saldo['waehrung']."</b>"
|
||||||
"SELECT ko.bezeichnung as konto, DATE_FORMAT(ke.datum,'%d.%m.%Y') as datum, k.id as kontoauszuege,
|
);
|
||||||
ke.betrag as betrag, k.id as zeile,k.waehrung
|
$et->AddRow($row);
|
||||||
FROM kontoauszuege_zahlungseingang ke
|
}
|
||||||
LEFT JOIN kontoauszuege k ON ke.kontoauszuege=k.id
|
return($et->DisplayNew('return',""));
|
||||||
LEFT JOIN konten ko ON k.konto=ko.id
|
|
||||||
WHERE (ke.objekt='gutschrift' AND ke.parameter='$id')
|
|
||||||
OR (ke.objekt='auftrag' AND ke.parameter='$auftragid' AND ke.parameter>0)
|
|
||||||
OR (ke.objekt='rechnung' AND ke.parameter='$rechnungid' AND ke.parameter>0)"
|
|
||||||
);
|
|
||||||
$ceingangArr = empty($eingangArr)?0:(!empty($eingangArr)?count($eingangArr):0);
|
|
||||||
|
|
||||||
for($i=0;$i<$ceingangArr;$i++) {
|
|
||||||
$waehrung = 'EUR';
|
|
||||||
if($eingangArr[$i]['waehrung']) {
|
|
||||||
$waehrung = $eingangArr[$i]['waehrung'];
|
|
||||||
}
|
|
||||||
$eingang .="<tr><td class=auftrag_cell>".$eingangArr[$i]['datum']
|
|
||||||
."</td><td class=auftrag_cell>".$eingangArr[$i]['konto']
|
|
||||||
." (<a href=\"index.php?module=zahlungseingang&action=editzeile&id="
|
|
||||||
.$eingangArr[$i]['zeile']."\">zur Buchung</a>)</td><td class=auftrag_cell align=right>"
|
|
||||||
.$this->app->erp->EUR($eingangArr[$i]['betrag'])
|
|
||||||
." $waehrung</td></tr>";
|
|
||||||
}
|
|
||||||
// gutschriften zu dieser rechnung anzeigen
|
|
||||||
/*
|
|
||||||
$gutschriften = $this->app->DB->SelectArr("SELECT belegnr, DATE_FORMAT(datum,'%d.%m.%Y') as datum,soll FROM gutschrift WHERE rechnungid='$id'");
|
|
||||||
|
|
||||||
for($i=0;$i<(!empty($gutschriften)?count($gutschriften):0);$i++)
|
|
||||||
$eingang .="<tr><td class=auftrag_cell>".$gutschriften[$i]['datum']."</td><td class=auftrag_cell>GS ".$gutschriften[$i]['belegnr']."</td><td class=auftrag_cell align=right>".$this->app->erp->EUR($gutschriften[$i]['soll'])." EUR</td></tr>";
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
$ausgang = '';
|
|
||||||
$ausgangArr = $this->app->DB->SelectArr(
|
|
||||||
"SELECT ko.bezeichnung as konto, DATE_FORMAT(ke.datum,'%d.%m.%Y') as datum, ke.betrag as betrag,
|
|
||||||
k.id as zeile,k.waehrung
|
|
||||||
FROM kontoauszuege_zahlungsausgang ke
|
|
||||||
LEFT JOIN kontoauszuege k ON ke.kontoauszuege=k.id
|
|
||||||
LEFT JOIN konten ko ON k.konto=ko.id
|
|
||||||
WHERE (ke.objekt='gutschrift' AND ke.parameter='$id')
|
|
||||||
OR (ke.objekt='rechnung' AND ke.parameter='$rechnungid' AND ke.parameter>0)
|
|
||||||
OR (ke.objekt='auftrag' AND ke.parameter='$auftragid' AND ke.parameter>0)"
|
|
||||||
);
|
|
||||||
$cAusgangArr = empty($ausgangArr)?0:(!empty($ausgangArr)?count($ausgangArr):0);
|
|
||||||
for($i=0;$i<$cAusgangArr;$i++) {
|
|
||||||
$waehrung = 'EUR';
|
|
||||||
if($ausgangArr[$i]['waehrung']) {
|
|
||||||
$waehrung = $ausgangArr[$i]['waehrung'];
|
|
||||||
}
|
|
||||||
$ausgang .="<tr><td class=auftrag_cell>".$ausgangArr[$i]['datum']."</td><td class=auftrag_cell>"
|
|
||||||
.$ausgangArr[$i]['konto']." (<a href=\"index.php?module=zahlungseingang&action=editzeile&id="
|
|
||||||
.$ausgangArr[$i]['zeile']."\">zur Buchung</a>)</td><td class=auftrag_cell align=right>"
|
|
||||||
.$this->app->erp->EUR($ausgangArr[$i]['betrag'])
|
|
||||||
." $waehrung</td></tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$saldo = $this->app->erp->EUR($this->app->erp->GutschriftSaldo($id));
|
|
||||||
|
|
||||||
if($saldo < 0) {
|
|
||||||
$saldo = "<b style=\"color:red\">$saldo</b>";
|
|
||||||
}
|
|
||||||
$waehrung = $this->app->DB->Select("SELECT waehrung FROM gutschrift WHERE id = '$id' LIMIT 1");
|
|
||||||
if(!$waehrung) {
|
|
||||||
$waehrung = 'EUR';
|
|
||||||
}
|
|
||||||
$ausgang .="<tr><td class=auftrag_cell></td><td class=auftrag_cell align=right>Saldo</td><td class=auftrag_cell align=right>$saldo $waehrung</td></tr>";
|
|
||||||
|
|
||||||
if($return) {
|
|
||||||
return "<table width=100% border=0 class=auftrag_cell cellpadding=0 cellspacing=0>".$eingang." ".$ausgang."</table>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -774,17 +712,32 @@ class Gutschrift extends GenGutschrift
|
|||||||
$showDefault = true;
|
$showDefault = true;
|
||||||
$this->app->Tpl->Set('TABTEXT','Freigabe');
|
$this->app->Tpl->Set('TABTEXT','Freigabe');
|
||||||
$this->app->erp->GutschriftNeuberechnen($id);
|
$this->app->erp->GutschriftNeuberechnen($id);
|
||||||
|
|
||||||
$this->app->erp->CheckVertrieb($id,'gutschrift');
|
$this->app->erp->CheckVertrieb($id,'gutschrift');
|
||||||
$this->app->erp->CheckBearbeiter($id,'gutschrift');
|
$this->app->erp->CheckBearbeiter($id,'gutschrift');
|
||||||
$doctype = 'gutschrift';
|
$doctype = 'gutschrift';
|
||||||
|
|
||||||
|
$sql = "SELECT belegnr, rechnungid FROM gutschrift WHERE id='$id' LIMIT 1";
|
||||||
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
|
$belegnr = $result[0]['belegnr'];
|
||||||
|
$rechnungid = $result[0]['rechnungid'];
|
||||||
|
$name = $this->app->DB->Select("SELECT a.name FROM gutschrift b LEFT JOIN adresse a ON a.id=b.adresse WHERE b.id='$id' LIMIT 1");
|
||||||
|
$summe = $this->app->DB->Select("SELECT soll FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
|
$waehrung = $this->app->DB->Select("SELECT waehrung FROM gutschrift_position WHERE gutschrift='$id' LIMIT 1");
|
||||||
|
|
||||||
if(empty($intern)){
|
if(empty($intern)){
|
||||||
$this->app->erp->RunHook('beleg_freigabe', 4, $doctype, $id, $allowedFrm, $showDefault);
|
$this->app->erp->RunHook('beleg_freigabe', 4, $doctype, $id, $allowedFrm, $showDefault);
|
||||||
}
|
}
|
||||||
if($allowedFrm && $freigabe==$id) {
|
if($allowedFrm && $freigabe==$id) {
|
||||||
$belegnr = $this->app->DB->Select("SELECT belegnr FROM gutschrift WHERE id='$id' LIMIT 1");
|
|
||||||
if($belegnr=='') {
|
if($belegnr=='') {
|
||||||
$this->app->erp->BelegFreigabe('gutschrift',$id);
|
$this->app->erp->BelegFreigabe('gutschrift',$id);
|
||||||
|
|
||||||
|
// Create fibu_buchung
|
||||||
|
$gegen_rechnung = $this->app->Secure->GetGET('gegen_rechnung');
|
||||||
|
if ($gegen_rechnung && $rechnungid > 0) {
|
||||||
|
$this->app->erp->fibu_buchungen_buchen('gutschrift', $id, 'rechnung', $rechnungid, -$summe, $waehrung, date("Y-m-d"), 'Verrechnung');
|
||||||
|
}
|
||||||
|
|
||||||
if($intern) {
|
if($intern) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -798,14 +751,16 @@ class Gutschrift extends GenGutschrift
|
|||||||
$this->app->Location->execute("index.php?module=gutschrift&action=edit&id=$id&msg=$msg");
|
$this->app->Location->execute("index.php?module=gutschrift&action=edit&id=$id&msg=$msg");
|
||||||
}
|
}
|
||||||
if($showDefault){
|
if($showDefault){
|
||||||
$name = $this->app->DB->Select("SELECT a.name FROM gutschrift b LEFT JOIN adresse a ON a.id=b.adresse WHERE b.id='$id' LIMIT 1");
|
if ($rechnungid > 0) {
|
||||||
$summe = $this->app->DB->Select("SELECT soll FROM gutschrift WHERE id='$id' LIMIT 1");
|
$input_html = "<input type=\"button\" value=\"Freigabe ohne Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id&gegen_rechnung=0'\">"
|
||||||
$waehrung = $this->app->DB->Select("SELECT waehrung FROM gutschrift_position
|
."<input type=\"button\" value=\"Freigabe gegen Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id&gegen_rechnung=1'\">";
|
||||||
WHERE gutschrift='$id' LIMIT 1");
|
} else {
|
||||||
|
$input_html = "<input type=\"button\" value=\"Freigabe Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id'\">";
|
||||||
|
}
|
||||||
$this->app->Tpl->Set('TAB1', "<div class=\"info\">Soll die Gutschrift an <b>$name</b> im Wert von <b>$summe $waehrung</b>
|
$this->app->Tpl->Set('TAB1', "<div class=\"info\">Soll die Gutschrift an <b>$name</b> im Wert von <b>$summe $waehrung</b>
|
||||||
jetzt freigegeben werden? <input type=\"button\" value=\"Freigabe\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id'\">
|
jetzt freigegeben werden? ".
|
||||||
</div>");
|
$input_html.
|
||||||
|
"</div>");
|
||||||
}
|
}
|
||||||
$this->GutschriftMenu();
|
$this->GutschriftMenu();
|
||||||
$this->app->Tpl->Parse('PAGE','tabview.tpl');
|
$this->app->Tpl->Parse('PAGE','tabview.tpl');
|
||||||
@@ -1176,7 +1131,6 @@ class Gutschrift extends GenGutschrift
|
|||||||
$this->app->erp->CheckBearbeiter($id,"gutschrift");
|
$this->app->erp->CheckBearbeiter($id,"gutschrift");
|
||||||
$this->app->erp->CheckBuchhaltung($id,"gutschrift");
|
$this->app->erp->CheckBuchhaltung($id,"gutschrift");
|
||||||
|
|
||||||
|
|
||||||
$this->app->erp->GutschriftNeuberechnen($id);
|
$this->app->erp->GutschriftNeuberechnen($id);
|
||||||
|
|
||||||
$this->app->erp->DisableVerband();
|
$this->app->erp->DisableVerband();
|
||||||
@@ -1185,14 +1139,11 @@ class Gutschrift extends GenGutschrift
|
|||||||
$this->app->Tpl->Set('ICONMENU',$this->GutschriftIconMenu($id));
|
$this->app->Tpl->Set('ICONMENU',$this->GutschriftIconMenu($id));
|
||||||
$this->app->Tpl->Set('ICONMENU2',$this->GutschriftIconMenu($id,2));
|
$this->app->Tpl->Set('ICONMENU2',$this->GutschriftIconMenu($id,2));
|
||||||
|
|
||||||
|
|
||||||
$belegnr = $this->app->DB->Select("SELECT belegnr FROM gutschrift WHERE id='$id' LIMIT 1");
|
$belegnr = $this->app->DB->Select("SELECT belegnr FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
$nummer = $this->app->DB->Select("SELECT belegnr FROM gutschrift WHERE id='$id' LIMIT 1");
|
$nummer = $this->app->DB->Select("SELECT belegnr FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
$kundennummer = $this->app->DB->Select("SELECT kundennummer FROM gutschrift WHERE id='$id' LIMIT 1");
|
$kundennummer = $this->app->DB->Select("SELECT kundennummer FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
$adresse = $this->app->DB->Select("SELECT adresse FROM gutschrift WHERE id='$id' LIMIT 1");
|
$adresse = $this->app->DB->Select("SELECT adresse FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$status= $this->app->DB->Select("SELECT status FROM gutschrift WHERE id='$id' LIMIT 1");
|
$status= $this->app->DB->Select("SELECT status FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
$schreibschutz= $this->app->DB->Select("SELECT schreibschutz FROM gutschrift WHERE id='$id' LIMIT 1");
|
$schreibschutz= $this->app->DB->Select("SELECT schreibschutz FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
if($status !== 'angelegt' && $status !== 'angelegta' && $status !== 'a')
|
if($status !== 'angelegt' && $status !== 'angelegta' && $status !== 'a')
|
||||||
@@ -1241,7 +1192,12 @@ class Gutschrift extends GenGutschrift
|
|||||||
if($zahlungsweise=="einzugsermaechtigung" || $zahlungsweise=="lastschrift") $this->app->Tpl->Set('EINZUGSERMAECHTIGUNG',"");
|
if($zahlungsweise=="einzugsermaechtigung" || $zahlungsweise=="lastschrift") $this->app->Tpl->Set('EINZUGSERMAECHTIGUNG',"");
|
||||||
if($zahlungsweise=="vorkasse" || $zahlungsweise=="kreditkarte" || $zahlungsweise=="paypal" || $zahlungsweise=="bar") $this->app->Tpl->Set('VORKASSE',"");
|
if($zahlungsweise=="vorkasse" || $zahlungsweise=="kreditkarte" || $zahlungsweise=="paypal" || $zahlungsweise=="bar") $this->app->Tpl->Set('VORKASSE',"");
|
||||||
|
|
||||||
|
$zahlungsinfo = $this->app->DB->SelectArr("SELECT zahlungsstatus, ".$this->app->erp->FormatMenge('soll*(-1)',2)." as betrag FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
|
$this->app->Tpl->Set('ZAHLUNGSSTATUS_DB',$zahlungsinfo[0]['zahlungsstatus']);
|
||||||
|
$this->app->Tpl->Set('SOLL',$zahlungsinfo[0]['betrag']);
|
||||||
|
|
||||||
|
$ist = $this->app->erp->EUR($this->app->erp->GetSaldoDokument($id,'gutschrift')['betrag']);
|
||||||
|
$this->app->Tpl->Set('ISTDB',$ist);
|
||||||
|
|
||||||
if($schreibschutz=="1" && $this->app->erp->RechteVorhanden("gutschrift","schreibschutz"))
|
if($schreibschutz=="1" && $this->app->erp->RechteVorhanden("gutschrift","schreibschutz"))
|
||||||
{
|
{
|
||||||
@@ -1249,11 +1205,24 @@ class Gutschrift extends GenGutschrift
|
|||||||
// $this->app->erp->CommonReadonly();
|
// $this->app->erp->CommonReadonly();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($schreibschutz=="1")
|
if($schreibschutz=="1") {
|
||||||
$this->app->erp->CommonReadonly();
|
$this->app->erp->CommonReadonly();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($schreibschutz=='1' && $this->app->erp->RechteVorhanden('gutschrift','edit'))
|
||||||
|
{
|
||||||
|
$this->app->erp->RemoveReadonly('zahlungsstatus');
|
||||||
|
|
||||||
|
if ($aktion = $this->app->Secure->GetPOST('speichern') == 'Speichern') {
|
||||||
|
$zahlungsstatus = $this->app->Secure->GetPOST('zahlungsstatus');
|
||||||
|
$this->app->DB->Update("UPDATE gutschrift SET zahlungsstatus='".$zahlungsstatus."' WHERE id='$id' LIMIT 1");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$rechnungid = $this->app->DB->Select("SELECT rechnungid FROM gutschrift WHERE id='$id' LIMIT 1");
|
$rechnungid = $this->app->DB->Select("SELECT rechnungid FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||||
$rechnungid = $this->app->DB->Select("SELECT id FROM rechnung WHERE id='$rechnungid' AND belegnr!='' LIMIT 1");
|
$rechnungid = $this->app->DB->Select("SELECT id FROM rechnung WHERE id='$rechnungid' AND belegnr!='' LIMIT 1");
|
||||||
|
|
||||||
$alle_gutschriften = $this->app->DB->SelectArr("SELECT id,belegnr FROM gutschrift WHERE rechnungid='$rechnungid' AND rechnungid>0");
|
$alle_gutschriften = $this->app->DB->SelectArr("SELECT id,belegnr FROM gutschrift WHERE rechnungid='$rechnungid' AND rechnungid>0");
|
||||||
|
|
||||||
if (!is_null($alle_gutschriften)) {
|
if (!is_null($alle_gutschriften)) {
|
||||||
@@ -1445,6 +1414,8 @@ class Gutschrift extends GenGutschrift
|
|||||||
{
|
{
|
||||||
$this->app->Tpl->Set('UEBERSCHRIFT', 'Gutschriften');
|
$this->app->Tpl->Set('UEBERSCHRIFT', 'Gutschriften');
|
||||||
|
|
||||||
|
$this->app->DB->Update("UPDATE gutschrift SET zahlungsstatus='offen' WHERE zahlungsstatus=''");
|
||||||
|
|
||||||
if($this->app->Secure->GetPOST('ausfuehren') && $this->app->erp->RechteVorhanden('gutschrift', 'edit')) {
|
if($this->app->Secure->GetPOST('ausfuehren') && $this->app->erp->RechteVorhanden('gutschrift', 'edit')) {
|
||||||
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
||||||
$aktion = $this->app->Secure->GetPOST('sel_aktion');
|
$aktion = $this->app->Secure->GetPOST('sel_aktion');
|
||||||
@@ -1463,7 +1434,13 @@ class Gutschrift extends GenGutschrift
|
|||||||
$ids = array_unique($ids);
|
$ids = array_unique($ids);
|
||||||
|
|
||||||
switch($aktion) {
|
switch($aktion) {
|
||||||
case 'erledigtam':
|
case 'bezahlt':
|
||||||
|
$this->app->DB->Update("UPDATE gutschrift SET zahlungsstatus='bezahlt' WHERE id IN (".implode(', ',$ids).')');
|
||||||
|
break;
|
||||||
|
case 'offen':
|
||||||
|
$this->app->DB->Update("UPDATE gutschrift SET zahlungsstatus='offen' WHERE id IN (".implode(', ',$ids).')');
|
||||||
|
break;
|
||||||
|
/* case 'erledigtam':
|
||||||
if(!empty($ids)){
|
if(!empty($ids)){
|
||||||
$this->app->DB->Update(
|
$this->app->DB->Update(
|
||||||
sprintf(
|
sprintf(
|
||||||
@@ -1488,7 +1465,7 @@ class Gutschrift extends GenGutschrift
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;*/
|
||||||
case 'mail':
|
case 'mail':
|
||||||
$returnOrders = empty($ids)?[]:$this->app->DB->SelectArr(
|
$returnOrders = empty($ids)?[]:$this->app->DB->SelectArr(
|
||||||
sprintf(
|
sprintf(
|
||||||
@@ -1682,6 +1659,28 @@ class Gutschrift extends GenGutschrift
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// refresh all open items
|
||||||
|
$openids = $this->app->DB->SelectArr("SELECT id, waehrung from gutschrift WHERE zahlungsstatus != 'bezahlt'");
|
||||||
|
|
||||||
|
foreach ($openids as $openid) {
|
||||||
|
$saldo = $this->app->erp->GetSaldoDokument($openid['id'],'gutschrift');
|
||||||
|
|
||||||
|
if (!empty($saldo)) {
|
||||||
|
if ($saldo['waehrung'] == $openid['waehrung']) {
|
||||||
|
$sql = "UPDATE
|
||||||
|
gutschrift
|
||||||
|
SET
|
||||||
|
ist = ".$saldo['betrag']."+soll,
|
||||||
|
zahlungsstatus = IF(".$saldo['betrag']." = 0,'bezahlt','offen')
|
||||||
|
WHERE id=".$openid['id'];
|
||||||
|
$this->app->DB->Update($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->app->DB->Update("UPDATE gutschrift SET ist = null WHERE id=".$openid['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$backurl = $this->app->Secure->GetGET('backurl');
|
$backurl = $this->app->Secure->GetGET('backurl');
|
||||||
$backurl = $this->app->erp->base64_url_decode($backurl);
|
$backurl = $this->app->erp->base64_url_decode($backurl);
|
||||||
|
|
||||||
@@ -1770,6 +1769,10 @@ class Gutschrift extends GenGutschrift
|
|||||||
$this->app->YUI->TableSearch('TAB1','gutschriften');
|
$this->app->YUI->TableSearch('TAB1','gutschriften');
|
||||||
$this->app->YUI->TableSearch('TAB3','gutschrifteninbearbeitung');
|
$this->app->YUI->TableSearch('TAB3','gutschrifteninbearbeitung');
|
||||||
|
|
||||||
|
if($this->app->erp->RechteVorhanden('rechnung', 'manuellbezahltmarkiert')){
|
||||||
|
$this->app->Tpl->Set('ALSBEZAHLTMARKIEREN', '<option value="bezahlt">{|als bezahlt markieren|}</option>');
|
||||||
|
}
|
||||||
|
|
||||||
$this->app->Tpl->Set(
|
$this->app->Tpl->Set(
|
||||||
'SELDRUCKER',
|
'SELDRUCKER',
|
||||||
$this->app->erp->GetSelectDrucker($this->app->User->GetParameter('rechnung_list_drucker'))
|
$this->app->erp->GetSelectDrucker($this->app->User->GetParameter('rechnung_list_drucker'))
|
||||||
|
|||||||
+178
-14
@@ -1030,7 +1030,7 @@ class Importvorlage extends GenImportvorlage {
|
|||||||
|
|
||||||
if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $stueckliste_csv)) {
|
if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $stueckliste_csv)) {
|
||||||
//$importfilename = $_FILES['userfile']['name'];
|
//$importfilename = $_FILES['userfile']['name'];
|
||||||
$msg = $this->app->erp->base64_url_encode("<div class=\"error\">Die Datei konnte nicht geöffnet werden. Eventuell ist die Datei zu groß oder die Schreibrechte stimmen nicht!</div> ");
|
$msg = $this->app->erp->base64_url_encode("<div class=\"error\">Die Datei '".$stueckliste_csv."' konnte nicht geöffnet werden. Eventuell ist die Datei zu groß oder die Schreibrechte stimmen nicht!</div> ");
|
||||||
$this->app->Location->execute("index.php?module=importvorlage&action=import&id=$id&msg=$msg");
|
$this->app->Location->execute("index.php?module=importvorlage&action=import&id=$id&msg=$msg");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1419,7 +1419,7 @@ class Importvorlage extends GenImportvorlage {
|
|||||||
$zeitstempel = time();
|
$zeitstempel = time();
|
||||||
|
|
||||||
$number_of_rows = empty($tmp['cmd'])?0:count($tmp['cmd']);
|
$number_of_rows = empty($tmp['cmd'])?0:count($tmp['cmd']);
|
||||||
$number_of_rows = $number_of_rows + 2;
|
// $number_of_rows = $number_of_rows + 2; // ?!?!
|
||||||
|
|
||||||
if($isCronjob) {
|
if($isCronjob) {
|
||||||
$this->app->DB->Update(
|
$this->app->DB->Update(
|
||||||
@@ -5079,6 +5079,145 @@ class Importvorlage extends GenImportvorlage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case 'kontoauszug':
|
||||||
|
|
||||||
|
$allowed_fields = array('konto','buchung','betrag','betrag2','waehrung','buchungstext','buchungstext2','buchungstext3','buchungstext4');
|
||||||
|
|
||||||
|
$error = false;
|
||||||
|
// Create a row dataset (without checked and cmd)
|
||||||
|
$update_sql = "";
|
||||||
|
$row = array();
|
||||||
|
$comma = "";
|
||||||
|
foreach ($tmp as $key => $value) {
|
||||||
|
if ($key != 'cmd' && $key != 'checked') {
|
||||||
|
if (in_array($key,$allowed_fields)) {
|
||||||
|
$row[$key] = $value[$i];
|
||||||
|
$comma = ", ";
|
||||||
|
} else {
|
||||||
|
$msg .= "Feld nicht korrekt: ".$key.".<br>";
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
// Collect texts
|
||||||
|
$buchungstext = "";
|
||||||
|
$comma = "";
|
||||||
|
foreach ($row as $key => $value) {
|
||||||
|
if (str_starts_with($key,'buchungstext')) {
|
||||||
|
if (!empty($value)) {
|
||||||
|
$buchungstext .= $comma.$value;
|
||||||
|
$comma = ", ";
|
||||||
|
}
|
||||||
|
unset($row[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$row['buchungstext'] = $buchungstext;
|
||||||
|
|
||||||
|
$row['soll'] = $row['betrag'];
|
||||||
|
unset($row['betrag']);
|
||||||
|
|
||||||
|
if (empty($row['soll'])) {
|
||||||
|
$row['soll'] = $row['betrag2'];
|
||||||
|
}
|
||||||
|
unset($row['betrag2']);
|
||||||
|
|
||||||
|
$row['soll'] = $this->app->erp->ReplaceBetrag(true,$row['soll']);
|
||||||
|
|
||||||
|
$row['buchung'] = $this->app->erp->ReplaceDatum(true,$row['buchung'],false);
|
||||||
|
|
||||||
|
// Calculate hash
|
||||||
|
$hash_fields = array('buchung','soll','waehrung','buchungstext');
|
||||||
|
$hash_text = "";
|
||||||
|
|
||||||
|
foreach($hash_fields as $hash_field) {
|
||||||
|
$hash_text .= $row[$hash_field];
|
||||||
|
}
|
||||||
|
$row['pruefsumme'] = md5($hash_text);
|
||||||
|
|
||||||
|
$sql = "SELECT id FROM konten WHERE kurzbezeichnung ='".$row['konto']."' LIMIT 1";
|
||||||
|
$kontoid = $this->app->DB->SelectArr($sql);
|
||||||
|
|
||||||
|
if (!empty($kontoid)) {
|
||||||
|
|
||||||
|
$row['konto'] = $kontoid[0]['id'];
|
||||||
|
$row['importdatum'] = date("Y-m-d H:i:s");
|
||||||
|
|
||||||
|
$sql = "SELECT pruefsumme FROM kontoauszuege WHERE pruefsumme='".$row['pruefsumme']."' AND konto ='".$row['konto']."' AND importfehler IS NULL";
|
||||||
|
$result = $this->app->DB->SelectArr($sql);
|
||||||
|
|
||||||
|
if (!empty($result)) {
|
||||||
|
$msg .= "Doppelter Eintrag (nicht importiert): ".$row['buchungstext']."<br>";
|
||||||
|
} else {
|
||||||
|
$sql = "INSERT INTO kontoauszuege (".
|
||||||
|
implode(", ",array_keys($row)).
|
||||||
|
") VALUES ('".
|
||||||
|
implode("', '",array_values($row)).
|
||||||
|
"')";
|
||||||
|
|
||||||
|
$result = $this->app->DB->Update($sql);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$msg .= "Konto nicht gefunden: ".$row['konto'].".<br>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'stueckliste':
|
||||||
|
|
||||||
|
$allowed_fields = array('stuecklistevonartikel','artikel','menge','art','referenz','layer','wert','bauform','xpos','ypos','zachse','place');
|
||||||
|
|
||||||
|
// Create a row dataset (without checked and cmd)
|
||||||
|
$row = array();
|
||||||
|
$error_text = "";
|
||||||
|
|
||||||
|
$error = $this->create_row_set($tmp, $i, $allowed_fields, $row, $error_text);
|
||||||
|
|
||||||
|
if ($error !== false) {
|
||||||
|
$sql = "SELECT id FROM artikel WHERE stueckliste = 1 AND nummer = '".$row['stuecklistevonartikel']."'";
|
||||||
|
$von_id = $this->app->DB->SelectArr($sql);
|
||||||
|
if (empty($von_id)) {
|
||||||
|
$msg .= "Fehlerhafter 'Stueckliste von'-Artikel \"".$row['stuecklistevonartikel']."\"<br>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$row['stuecklistevonartikel'] = $von_id[0]['id'];
|
||||||
|
|
||||||
|
$sql = "SELECT id FROM artikel WHERE nummer = '".$row['artikel']."'";
|
||||||
|
$artikel_id = $this->app->DB->SelectArr($sql);
|
||||||
|
if (empty($artikel_id)) {
|
||||||
|
$msg .= "Fehlerhafter Artikel \"".$row['artikel']."\"<br>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$row['artikel'] = $artikel_id[0]['id'];
|
||||||
|
|
||||||
|
if(empty($row['menge'])) {
|
||||||
|
$row['menge'] = 1;
|
||||||
|
}
|
||||||
|
if(empty($row['art'])) {
|
||||||
|
$row['art'] = 'et';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(empty($row['place']) || $row['place'] == 'DNP') {
|
||||||
|
$row['place'] = 'DNP';
|
||||||
|
} else {
|
||||||
|
$row['place'] = 'DP';
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "INSERT INTO stueckliste (".
|
||||||
|
implode(", ",array_keys($row)).
|
||||||
|
") VALUES ('".
|
||||||
|
implode("', '",array_values($row)).
|
||||||
|
"')";
|
||||||
|
|
||||||
|
$result = $this->app->DB->Update($sql);
|
||||||
|
|
||||||
|
} else if(!$first_checked) {
|
||||||
|
$first_checked = true;
|
||||||
|
$msg .= $error_text;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// HERE END OF PROCESSING THE ROWS switch($ziel);
|
// HERE END OF PROCESSING THE ROWS switch($ziel);
|
||||||
@@ -5107,19 +5246,21 @@ class Importvorlage extends GenImportvorlage {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} // Loop
|
||||||
|
if($return) {
|
||||||
|
if($returnids) {
|
||||||
|
return $ids;
|
||||||
|
}
|
||||||
|
return $number_of_rows;
|
||||||
}
|
}
|
||||||
if($return) {
|
|
||||||
if($returnids) {
|
if (empty($msg)) {
|
||||||
return $ids;
|
$msg=$this->app->erp->base64_url_encode("<div class=\"info\">Import durchgeführt.</div>");
|
||||||
}
|
$this->app->Location->execute("index.php?module=importvorlage&action=import&id=$id&msg=$msg");
|
||||||
return $number_of_rows;
|
} else {
|
||||||
}
|
$msg=$this->app->erp->base64_url_encode("<div class=\"error\">".$msg."</div>");
|
||||||
if($ziel==='zeiterfassung' || $ziel==='wiedervorlage' || $ziel==='notizen') {
|
$this->app->Location->execute("index.php?module=importvorlage&action=import&id=$id&msg=$msg");
|
||||||
$msg=$this->app->erp->base64_url_encode("<div class=\"info\">Import durchgeführt.</div>");
|
}
|
||||||
$this->app->Location->execute("index.php?module=importvorlage&action=import&id=$id&msg=$msg");
|
|
||||||
}
|
|
||||||
$msg=$this->app->erp->base64_url_encode("<div class=\"info\">Import durchgeführt.</div>");
|
|
||||||
$this->app->Location->execute("index.php?module=importvorlage&action=import&id=$id&msg=$msg");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6164,5 +6305,28 @@ class Importvorlage extends GenImportvorlage {
|
|||||||
|
|
||||||
return $normalizedDate;
|
return $normalizedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a cleaned row set
|
||||||
|
* Return true if ok, else see error_message
|
||||||
|
*/
|
||||||
|
private function create_row_set(array $tmp, $pos, array $allowed_fields, array &$result_row, string &$error_message) : bool {
|
||||||
|
$result_ok = true;
|
||||||
|
$result_row = array();
|
||||||
|
$error_message = "";
|
||||||
|
foreach ($tmp as $key => $value) {
|
||||||
|
if ($key != 'cmd' && $key != 'checked') {
|
||||||
|
if (in_array($key,$allowed_fields)) {
|
||||||
|
$result_row[$key] = $value[$pos];
|
||||||
|
} else {
|
||||||
|
$error_message .= "Feld nicht korrekt: ".$key.".<br>";
|
||||||
|
$result_ok = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return($result_ok);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1148,7 +1148,7 @@ class Kalender {
|
|||||||
|
|
||||||
// Force user if empty
|
// Force user if empty
|
||||||
if ($data[0]['adresseintern'] == 0) {
|
if ($data[0]['adresseintern'] == 0) {
|
||||||
$data[0]['adresseintern'] = $this->app->User->GetID();
|
$data[0]['adresseintern'] = $this->app->User->GetAdresse();
|
||||||
}
|
}
|
||||||
|
|
||||||
$data[0]['adresseintern'] = $this->app->DB->Select("SELECT CONCAT(a.id,' ',a.name) FROM adresse a WHERE a.id='" . $data[0]['adresseintern'] . "' AND a.geloescht=0 LIMIT 1");
|
$data[0]['adresseintern'] = $this->app->DB->Select("SELECT CONCAT(a.id,' ',a.name) FROM adresse a WHERE a.id='" . $data[0]['adresseintern'] . "' AND a.geloescht=0 LIMIT 1");
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user