Author SHA1 Message Date
OpenXE-ERP 9ebd5d2b2b Update SERVER_INSTALL.md 2023-11-13 15:32:42 +01:00
OpenXE bf3dad7e83 auftrag deckungsbeitrag added umsatz, kosten 2023-11-13 10:21:45 +01:00
OpenXE b7f8c7b359 auftrag format deckungsbeitrag 2 decimals 2023-11-12 13:18:13 +01:00
OpenXE 54fe339c65 auftrag DB % 2 decimals 2023-11-12 12:11:19 +01:00
OpenXE 7d0a5a0eee Auftrag deckungsbeitrag added manual ek and status != abgeschlossen for calculate 2023-11-11 23:12:29 +01:00
OpenXE 7cfb87c2c5 Auftrag deckungsbeitrag implemented 2023-11-11 22:57:32 +01:00
OpenXE 2ae5e9f44a bugfix exportbuchhaltung steuer 2023-11-11 16:37:25 +01:00
OpenXE c106282b13 bugfix copy projekt 2023-11-07 09:57:59 +01:00
OpenXE e737d69a77 bugfix stringcleaner array vs. object 2023-11-07 09:44:44 +01:00
OpenXE 2f646a7715 versand added tracking for mail variables, minor bugfixes 2023-11-02 11:56:05 +01:00
OpenXE-ERP c67d91a7dd Merge pull request #106 from tsgoff/testmailutf8
test mail utf8_encode
2023-11-02 10:45:42 +01:00
OpenXE 3e69b8d7e0 lieferschein added direct link paketmarke without versandmodul 2023-11-02 09:43:43 +01:00
OpenXE 77092171c3 auftrag show paket and tracking in minidetail 2023-11-01 21:07:05 +01:00
OpenXE a03d28ac69 lieferschein added multi action to set versand_status 2023-11-01 17:34:32 +01:00
OpenXE f55f801cee versandart added button to create versandart without modul 2023-11-01 17:20:54 +01:00
OpenXE 1fe0aea620 versandarten removed check if module is empty 2023-11-01 16:59:48 +01:00
OpenXE e474014b8c versandpakete extended handling of lieferschein_ohne_pos, tracking is editable if no versandmodul 2023-11-01 15:42:21 +01:00
OpenXE 3e70af8466 versandpakete bugfix check completion 2023-11-01 11:48:55 +01:00
OpenXE 662410fdc8 versand process added versand_status to lieferschein and status processing 2023-10-27 15:31:58 +02:00
OpenXE 7dcaae7fbb Paketmarke changed texts 2023-10-26 20:56:18 +02:00
OpenXE 18397a03c8 Paketmarke added info text Gewicht 2023-10-26 20:51:47 +02:00
OpenXE 504f0beb54 Paketmarke added doctype to text 2023-10-26 20:46:07 +02:00
OpenXE ecf986d33b versandpakete improvements 2023-10-26 20:23:19 +02:00
OpenXE eb00034a79 versandpakete bugfix 2023-10-25 13:49:27 +02:00
OpenXE a5be2e984a versandpakete improvements, added lieferungen view 2023-10-25 13:26:52 +02:00
OpenXE fb32cda643 versand bugfix no countries defined 2023-10-22 18:41:08 +02:00
OpenXE ca73f3dda5 versandpakete improvements 2023-10-22 18:27:01 +02:00
OpenXE 4488cf8688 versand icons and findcols 2023-10-22 16:02:11 +02:00
OpenXE ec7dc7b8a6 versandpakete update versender on shipping 2023-10-20 15:52:55 +02:00
OpenXE 6e857e6567 delivery icons 2023-10-20 15:48:53 +02:00
OpenXE a35ab21f7c versandpakete improvements 2023-10-20 15:47:37 +02:00
tsgoff f794b4db74 test mail utf8_encode 2023-10-20 15:40:47 +02:00
OpenXE e899b1c389 versandpakete intermediate 2023-10-18 14:35:35 +02:00
OpenXE b171dd7760 restored function VersandartMindestgewicht($id=0) in erpapi 2023-10-16 21:28:43 +02:00
OpenXE 4f7eb4049b versandpakete initial 2023-10-16 21:22:21 +02:00
OpenXE b838b63258 removed deprecated paketmarke functions from erpapi 2023-10-10 18:17:42 +02:00
OpenXE 5e1359f770 Bugfix ticket_edit betreff width 2023-10-09 19:18:24 +02:00
OpenXE 1bb701322b Wareneingang tabindex mengen 2023-10-07 13:49:26 +02:00
OpenXE 1e55ca1b3d Wareneingang enter press triggers save 2023-10-07 13:36:46 +02:00
OpenXE b34ba86421 Wareineingang bugfix lagerartikel, added some info text 2023-10-06 12:11:17 +02:00
OpenXE b2bf2f14f2 Wareneingang added empty and fill from bestellung 2023-10-04 12:31:02 +02:00
OpenXE bdb05c747a Wareneingang bugfix abschliessen, removed edit from minidetail 2023-10-01 19:48:21 +02:00
OpenXE b613a99791 Wareneingang added link to artikel 2023-10-01 19:33:05 +02:00
OpenXE 1dba7e9d7e Wareneingang save preliminary 2023-10-01 19:19:09 +02:00
OpenXE 60e21956ad class YUI removed <br> from tablesearch 2023-10-01 19:18:28 +02:00
OpenXE 545a39bbdc Wareneingang changed to booking all at once -> TBD: save preliminary, fill, empty 2023-09-30 11:40:59 +02:00
OpenXE 5ed516f9da ticket system betreff strip tags 2023-09-21 08:30:05 +02:00
OpenXE 76c770aba3 Bugfix managementboard removed invalid reference RechnungslaufRechnungslauf 2023-09-11 20:42:14 +02:00
OpenXE c9aee26df7 removed .woff2 fonts 2023-08-31 10:31:54 +02:00
OpenXE 91c2dc88ba document send preselect default mail address from firmendaten 2023-08-15 12:37:16 +02:00
OpenXE be222cc581 bugfix wareneingang bemerkung 2023-08-14 20:57:21 +02:00
104 changed files with 5513 additions and 12173 deletions
+1 -4
View File
@@ -54,14 +54,11 @@ memory_limit = 256M
## Install additional zip
`sudo apt-get install zip`
## Install mysql client
`sudo apt-get install mysql-client`
## Install database server
`sudo apt-get install mariadb-server`
## Configure database server
`sudo mysql_secure_installation`
`sudo mariadb-secure-installation`
```
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
-151
View File
@@ -1,151 +0,0 @@
<?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);
}
}
@@ -1,73 +0,0 @@
<?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]);
}
}
@@ -1,30 +0,0 @@
<?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);
}
}
@@ -1,80 +0,0 @@
<?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;
}
@@ -1,38 +0,0 @@
<?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;
}
@@ -1,125 +0,0 @@
<?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];
}
}
@@ -1,53 +0,0 @@
<?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);
}
@@ -1,14 +0,0 @@
<?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
{
}
@@ -1,100 +0,0 @@
<?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);
}
}
@@ -1,14 +0,0 @@
<?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
{
}
@@ -1,14 +0,0 @@
<?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
{
}
-32
View File
@@ -1,32 +0,0 @@
<?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');
}
}
@@ -1,31 +0,0 @@
<?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;
}
}
@@ -1,41 +0,0 @@
<?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);
}
}
@@ -1,55 +0,0 @@
<?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;
}
}
@@ -1,63 +0,0 @@
<?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);
}
}
@@ -1,32 +0,0 @@
<?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);
}
}
-75
View File
@@ -1,75 +0,0 @@
<?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',
];
}
-32
View File
@@ -1,32 +0,0 @@
<?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',
];
}
-73
View File
@@ -1,73 +0,0 @@
<?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);
}
}
}
}
}
}
@@ -1,32 +0,0 @@
<?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;
}
}
@@ -1,41 +0,0 @@
<?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);
}
}
@@ -1,55 +0,0 @@
<?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;
}
}
@@ -1,63 +0,0 @@
<?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);
}
}
-51
View File
@@ -1,51 +0,0 @@
<?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',
];
}
-33
View File
@@ -1,33 +0,0 @@
<?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',
];
}
-244
View File
@@ -1,244 +0,0 @@
<?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;
}
}
@@ -1,62 +0,0 @@
<?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
-159
View File
@@ -1,159 +0,0 @@
<?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'],
];
+450 -448
View File
@@ -1,451 +1,453 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
class StringCleaner
{
private $elements;
private $htmlpuriferconfig;
private $htmlpurifer;
private $ruleregexps;
/** @var Application */
private $app;
/**
* StringCleaner constructor.
*
* @param null|Application $app
*/
public function __construct($app = null)
{
$this->app = $app;
if(class_exists('HTMLPurifier_Config')) {
$this->htmlpuriferconfig = HTMLPurifier_Config::createDefault();
$this->htmlpuriferconfig->set('Core.Encoding', 'UTF-8');
$this->htmlpuriferconfig->set('Attr.AllowedFrameTargets', ['_blank']); // Allow hyperlinks with target="_blank"
//$this->htmlpuriferconfig->set('HTML.AllowedElements', 'h1,h2,h3,h4,h5,h6,p,a,strong,em,ol,ul,li,img,param,div,br,form,label,fieldset,input,textarea,select,option');
$this->htmlpurifer = new HTMLPurifier($this->htmlpuriferconfig);
}
$this->elements = array('nohtml'=> array('ust_befreit','abweichendelieferadresse','bestellungsart','bearbeiter','datum','lieferdatum','name','anrede','partner','packstation_inhaber','packstation_station','packstation_ident','packstation_plz','packstation_ort','partnerid','kennen','ihrebestellnummer'
,'abteilung','unterabteilung','ansprechpartner','adresszusatz','strasse','land','bundesstaat','plz','ort','versandart','internet','transaktionsnummer','vertrieb','zahlungsweise'
,'lieferabteilung','lieferunterabteilung','lieferansprechpartner','lieferadresszusatz','lieferstrasse','lieferland','lieferbundesstaat','lieferplz','lieferort'
,'bank_inhaber','bank_institut','bank_blz','bank_konto'
,'email','telefon','telefax','ustid','partner','projekt','herstellernummer','ean','nummer','name_de','name_ean'),
'nojs' => array('anabregstext','anabregstext_en','uebersicht_de','uebersicht_en','kurztext_de','kurztext_en','internebemerkung','internebezeichnung','freitext'));
$this->rulechecks = array('digit'=>'/^[0-9]+$/'
,'alpha'=>'/^[a-zA-Z]+$/'
,'alphadigit'=>'/^[0-9a-zA-Z]+$/'
,'username'=>'/^[0-9a-zA-Z\.\-]+$/'
,'space'=>'/^[\x20]+$/'
,'module'=>'/^[0-9a-zA-Z\_]$/'
,'password'=>'/^[^\s\n]{1}[^\n]{5}.*$/'
,'email'=>'/^[^@\s\x00-\x20]+@[^@\s\x00-\x20\.]+\.[^@\s\x00-\x20\.]+[^@\s\x00-\x20]*$/'
);
$this->ruleregexps = array(
'digit'=>'/[^0-9]/'
,'username'=>'/[^0-9a-zA-Z\.\-]/'
,'alpha'=>'/[^a-zA-Z]/'
,'alphadigits'=>'/[^0-9a-zA-Z]/'
,'module'=>'/[^0-9a-zA-Z\_]/'
,'moduleminus'=>'/[^0-9a-zA-Z\_\-]/'
,'alphadigitsspecial'=>'/[^0-9a-zA-Z\_\.\(\)]/'
,'base64'=>'/[^0-9a-zA-Z\=\+\-\_\/]/'
);
}
function SyntaxByElement($key, $default = '')
{
foreach($this->elements as $type => $arr) {
if(in_array($key, $arr)) {
return $type;
}
}
return $default;
}
function CleanSQLReturn($value, $columnname, $default = '')
{
if($value == '' || is_numeric($value))
{
return $value;
}
if(in_array($columnname, array('nummer','name','kundennummer','bezeichnung','bezeichnunglieferant','lieferantennummer','mitarbeiternummer','name_de','name_en',
'kurzbezeichnung','abkuerzung',
'strasse','plz','ort','land','ansprechpartner','abteilung','unterabteilung',
'liefername','lieferstrasse','lieferplz','lieferort','lieferland','lieferansprechpartner','lieferabteilung','lieferunterabteilung'))){
return strip_tags($value);
}
if($default == 'xss_clean')
{
return $this->xss_clean($value, false);
}
if($this->htmlpurifer)
{
return $this->htmlpurifer->purify($value);
}
return $value;
}
function RuleCheck($string, $rule = null, &$found = false)
{
if(isset($this->rulechecks[$rule]))
{
$found = true;
return preg_match_all($this->rulechecks[$rule], $string, $dummy);
}
switch($rule)
{
case 'datum':
$found = true;
if(preg_match_all('/([0-9]+)\.([0-9]+)\.$/', $string, $matches))
{
$string = $matches[1][0].'.'.$matches[2][0].'.'.date('Y');
}
try {
if($x = new DateTime($string)) {
return $x->format('Y') > 0;
}
}
catch (Exception $e) {
return false;
}
return false;
break;
}
}
function CheckSQLHtml($sql)
{
$start = 0;
$len = strlen($sql);
$lvl = 0;
$col = 0;
$ret = array(0);
$instring = false;
for($i = $start; $i < $len; $i++)
{
$char = $sql[$i];
switch($char)
{
case "'":
if($instring)
{
if($sql[$i-1] != '\\')
{
$instring = false;
}
}else{
if($sql[$i-1] != '\\'){
$instring = true;
}
}
break;
case "(":
if($instring)
{
}else{
$lvl++;
}
break;
case ")":
if($instring)
{
}else{
$lvl--;
}
break;
case "<":
if($instring)
{
if(preg_match('/<[a-zA-Z]/',$char.$sql[$i+1]))
{
if($ret[$col] != 2)
{
$ret[$col] = 1;
}
}
}
break;
case ',':
if($instring)
{
}else{
if($lvl == 0)
{
$col++;
$ret[$col] = 0;
}
}
break;
case 'o':
case 'O':
if($instring)
{
if($i < $len -4)
{
if(strtolower(substr($sql, $i, 2)) == 'on')
{
if(preg_match('/^on[a-z]+(\s*)=/', substr($sql, $i)))
{
$ret[$col] = 2;
}
}
}
}
break;
case 'F':
case 'f':
if($instring)
{
}else{
if($lvl == 0)
{
if($i < $len - 4)
{
if(strtolower(substr($sql, $i, 4)) == 'from')
{
break 2;
}
}
}
}
break;
}
}
$where = strripos($sql, 'where');
$restsql = substr($sql, $i, $where - $i);
if(preg_match('/<[a-zA-Z]/', $restsql))
{
if(preg_match('/on[a-z]+(\s*)=/',$restsql))
{
if($ret)
{
foreach($ret as $k => $v)
{
$ret[$k] = 2;
}
}
}else{
if($ret)
{
foreach($ret as $k => $v)
{
if($v != 2)
{
$ret[$k] = 1;
}
}
}
}
}
return $ret;
}
public function CleanString($string, $rule = null, &$found = false)
{
if(is_null($rule))
{
$rule = 'nothml';
}
switch($rule)
{
case 'email':
if($this->RuleCheck($string, $rule))
{
return $string;
}
return '';
break;
case 'nohtml':
$found = true;
if($string == '' || is_numeric($string))
{
return $string;
}
if(strpos($string,'<') === false)
{
return $string;
}
return strip_tags($string);
break;
case 'datum':
$found = true;
$string_ = $string;
if(preg_match_all('/([0-9]+)\.([0-9]+)\.$/', $string, $matches))
{
$string_ = $matches[1][0].'.'.$matches[2][0].'.'.date('Y');
}
try
{
if($x = new DateTime($string_))
{
if($x->format('Y') <= 0)
{
return '';
}
return $string;
}
} catch (Exception $e) {
return '';
}
return '';
break;
case 'xss_clean':
$found = true;
if($string == '' || is_numeric($string))
{
return $string;
}
if(strpos($string,'<') === false){
return $string;
}
return $this->xss_clean($string, false);
break;
case 'nojs':
$found = true;
if($string == '' || is_numeric($string))return $string;
if(strpos($string,'<') === false)return $string;
if($this->htmlpurifer)
{
return $this->htmlpurifer->purify($string);
}
return $this->xss_clean($string);
break;
case 'id':
$found = true;
if((String)$string === '')
{
return $string;
}
return (int)$string;
break;
case 'doppelid':
$found = true;
if((String)$string === '')
{
return $string;
}
$stringa = explode('-', $string, 2);
if(count($stringa) == 1)return (int)$stringa[0];
return ($stringa[0]===''?'':(int)$stringa[0]).'-'.(int)$stringa[1];
break;
case 'module':
$found = true;
return preg_replace ($this->ruleregexps[$rule], '' , $string);
break;
default:
if(isset($this->ruleregexps[$rule]))
{
$found = true;
return preg_replace ($this->ruleregexps[$rule], '' , $string);
}
break;
}
return $string;
}
public function xss_clean($data, $usepurify = true)
{
if($usepurify && !empty($this->htmlpurifer))
{
return $this->htmlpurifer->purify($data);
}
// Fix &entity\n;
$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);
$data = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $data);
$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);
$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');
return $data;
// Remove any attribute starting with "on" or xmlns
$data = preg_replace('#(<[^>]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);
// Remove javascript: and vbscript: protocols
$data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data);
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data);
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data);
// Only works in IE: <span style="width: expression(alert('Ping!'));"></span>
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data);
// Remove namespaced elements (we do not need them)
$data = preg_replace('#</*\w+:\w[^>]*+>#i', '', $data);
do
{
// Remove really unwanted tags
$old_data = $data;
$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);
}
while ($old_data !== $data);
return $data;
}
function XMLArray_clean(&$xml, $lvl = 0)
{
if(is_string($xml))
{
}elseif(is_array($xml))
{
if(count($xml) > 0)
{
foreach($xml as $k => $v)
{
if(is_string($v))
{
$xml[$k] = $this->CleanString($v, $this->SyntaxByElement($k,'nojs'));
}
if($lvl < 10)
{
$this->XMLArray_clean($v, $lvl + 1);
}
}
}
}elseif(is_object($xml))
{
if(count($xml) > 0)
{
foreach($xml as $k => $v)
{
if(count($v) > 0)
{
if($lvl < 10)
{
$this->XMLArray_clean($v, $lvl + 1);
}
}elseif((String)$v != '')
{
if(isset($xml->$k))
{
//$xml->$k = $this->CleanString($v, $this->SyntaxByElement($k,'nojs'));
}
}
}
}
}
return $xml;
}
}
<?php
class StringCleaner
{
private $elements;
private $htmlpuriferconfig;
private $htmlpurifer;
private $ruleregexps;
/** @var Application */
private $app;
/**
* StringCleaner constructor.
*
* @param null|Application $app
*/
public function __construct($app = null)
{
$this->app = $app;
if(class_exists('HTMLPurifier_Config')) {
$this->htmlpuriferconfig = HTMLPurifier_Config::createDefault();
$this->htmlpuriferconfig->set('Core.Encoding', 'UTF-8');
$this->htmlpuriferconfig->set('Attr.AllowedFrameTargets', ['_blank']); // Allow hyperlinks with target="_blank"
//$this->htmlpuriferconfig->set('HTML.AllowedElements', 'h1,h2,h3,h4,h5,h6,p,a,strong,em,ol,ul,li,img,param,div,br,form,label,fieldset,input,textarea,select,option');
$this->htmlpurifer = new HTMLPurifier($this->htmlpuriferconfig);
}
$this->elements = array('nohtml'=> array('ust_befreit','abweichendelieferadresse','bestellungsart','bearbeiter','datum','lieferdatum','name','anrede','partner','packstation_inhaber','packstation_station','packstation_ident','packstation_plz','packstation_ort','partnerid','kennen','ihrebestellnummer'
,'abteilung','unterabteilung','ansprechpartner','adresszusatz','strasse','land','bundesstaat','plz','ort','versandart','internet','transaktionsnummer','vertrieb','zahlungsweise'
,'lieferabteilung','lieferunterabteilung','lieferansprechpartner','lieferadresszusatz','lieferstrasse','lieferland','lieferbundesstaat','lieferplz','lieferort'
,'bank_inhaber','bank_institut','bank_blz','bank_konto'
,'email','telefon','telefax','ustid','partner','projekt','herstellernummer','ean','nummer','name_de','name_ean'),
'nojs' => array('anabregstext','anabregstext_en','uebersicht_de','uebersicht_en','kurztext_de','kurztext_en','internebemerkung','internebezeichnung','freitext'));
$this->rulechecks = array('digit'=>'/^[0-9]+$/'
,'alpha'=>'/^[a-zA-Z]+$/'
,'alphadigit'=>'/^[0-9a-zA-Z]+$/'
,'username'=>'/^[0-9a-zA-Z\.\-]+$/'
,'space'=>'/^[\x20]+$/'
,'module'=>'/^[0-9a-zA-Z\_]$/'
,'password'=>'/^[^\s\n]{1}[^\n]{5}.*$/'
,'email'=>'/^[^@\s\x00-\x20]+@[^@\s\x00-\x20\.]+\.[^@\s\x00-\x20\.]+[^@\s\x00-\x20]*$/'
);
$this->ruleregexps = array(
'digit'=>'/[^0-9]/'
,'username'=>'/[^0-9a-zA-Z\.\-]/'
,'alpha'=>'/[^a-zA-Z]/'
,'alphadigits'=>'/[^0-9a-zA-Z]/'
,'module'=>'/[^0-9a-zA-Z\_]/'
,'moduleminus'=>'/[^0-9a-zA-Z\_\-]/'
,'alphadigitsspecial'=>'/[^0-9a-zA-Z\_\.\(\)]/'
,'base64'=>'/[^0-9a-zA-Z\=\+\-\_\/]/'
);
}
function SyntaxByElement($key, $default = '')
{
foreach($this->elements as $type => $arr) {
if(in_array($key, $arr)) {
return $type;
}
}
return $default;
}
function CleanSQLReturn($value, $columnname, $default = '')
{
if($value == '' || is_numeric($value))
{
return $value;
}
if(in_array($columnname, array('nummer','name','kundennummer','bezeichnung','bezeichnunglieferant','lieferantennummer','mitarbeiternummer','name_de','name_en',
'kurzbezeichnung','abkuerzung',
'strasse','plz','ort','land','ansprechpartner','abteilung','unterabteilung',
'liefername','lieferstrasse','lieferplz','lieferort','lieferland','lieferansprechpartner','lieferabteilung','lieferunterabteilung'))){
return strip_tags($value);
}
if($default == 'xss_clean')
{
return $this->xss_clean($value, false);
}
if($this->htmlpurifer)
{
return $this->htmlpurifer->purify($value);
}
return $value;
}
function RuleCheck($string, $rule = null, &$found = false)
{
if(isset($this->rulechecks[$rule]))
{
$found = true;
return preg_match_all($this->rulechecks[$rule], $string, $dummy);
}
switch($rule)
{
case 'datum':
$found = true;
if(preg_match_all('/([0-9]+)\.([0-9]+)\.$/', $string, $matches))
{
$string = $matches[1][0].'.'.$matches[2][0].'.'.date('Y');
}
try {
if($x = new DateTime($string)) {
return $x->format('Y') > 0;
}
}
catch (Exception $e) {
return false;
}
return false;
break;
}
}
function CheckSQLHtml($sql)
{
$start = 0;
$len = strlen($sql);
$lvl = 0;
$col = 0;
$ret = array(0);
$instring = false;
for($i = $start; $i < $len; $i++)
{
$char = $sql[$i];
switch($char)
{
case "'":
if($instring)
{
if($sql[$i-1] != '\\')
{
$instring = false;
}
}else{
if($sql[$i-1] != '\\'){
$instring = true;
}
}
break;
case "(":
if($instring)
{
}else{
$lvl++;
}
break;
case ")":
if($instring)
{
}else{
$lvl--;
}
break;
case "<":
if($instring)
{
if(preg_match('/<[a-zA-Z]/',$char.$sql[$i+1]))
{
if($ret[$col] != 2)
{
$ret[$col] = 1;
}
}
}
break;
case ',':
if($instring)
{
}else{
if($lvl == 0)
{
$col++;
$ret[$col] = 0;
}
}
break;
case 'o':
case 'O':
if($instring)
{
if($i < $len -4)
{
if(strtolower(substr($sql, $i, 2)) == 'on')
{
if(preg_match('/^on[a-z]+(\s*)=/', substr($sql, $i)))
{
$ret[$col] = 2;
}
}
}
}
break;
case 'F':
case 'f':
if($instring)
{
}else{
if($lvl == 0)
{
if($i < $len - 4)
{
if(strtolower(substr($sql, $i, 4)) == 'from')
{
break 2;
}
}
}
}
break;
}
}
$where = strripos($sql, 'where');
$restsql = substr($sql, $i, $where - $i);
if(preg_match('/<[a-zA-Z]/', $restsql))
{
if(preg_match('/on[a-z]+(\s*)=/',$restsql))
{
if($ret)
{
foreach($ret as $k => $v)
{
$ret[$k] = 2;
}
}
}else{
if($ret)
{
foreach($ret as $k => $v)
{
if($v != 2)
{
$ret[$k] = 1;
}
}
}
}
}
return $ret;
}
public function CleanString($string, $rule = null, &$found = false)
{
if(is_null($rule))
{
$rule = 'nothml';
}
switch($rule)
{
case 'email':
if($this->RuleCheck($string, $rule))
{
return $string;
}
return '';
break;
case 'nohtml':
$found = true;
if($string == '' || is_numeric($string))
{
return $string;
}
if(strpos($string,'<') === false)
{
return $string;
}
return strip_tags($string);
break;
case 'datum':
$found = true;
$string_ = $string;
if(preg_match_all('/([0-9]+)\.([0-9]+)\.$/', $string, $matches))
{
$string_ = $matches[1][0].'.'.$matches[2][0].'.'.date('Y');
}
try
{
if($x = new DateTime($string_))
{
if($x->format('Y') <= 0)
{
return '';
}
return $string;
}
} catch (Exception $e) {
return '';
}
return '';
break;
case 'xss_clean':
$found = true;
if($string == '' || is_numeric($string))
{
return $string;
}
if(strpos($string,'<') === false){
return $string;
}
return $this->xss_clean($string, false);
break;
case 'nojs':
$found = true;
if($string == '' || is_numeric($string))return $string;
if(strpos($string,'<') === false)return $string;
if($this->htmlpurifer)
{
return $this->htmlpurifer->purify($string);
}
return $this->xss_clean($string);
break;
case 'id':
$found = true;
if((String)$string === '')
{
return $string;
}
return (int)$string;
break;
case 'doppelid':
$found = true;
if((String)$string === '')
{
return $string;
}
$stringa = explode('-', $string, 2);
if(count($stringa) == 1)return (int)$stringa[0];
return ($stringa[0]===''?'':(int)$stringa[0]).'-'.(int)$stringa[1];
break;
case 'module':
$found = true;
return preg_replace ($this->ruleregexps[$rule], '' , $string);
break;
default:
if(isset($this->ruleregexps[$rule]))
{
$found = true;
return preg_replace ($this->ruleregexps[$rule], '' , $string);
}
break;
}
return $string;
}
public function xss_clean($data, $usepurify = true)
{
if($usepurify && !empty($this->htmlpurifer))
{
return $this->htmlpurifer->purify($data);
}
// Fix &entity\n;
$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);
$data = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $data);
$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);
$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');
return $data;
// Remove any attribute starting with "on" or xmlns
$data = preg_replace('#(<[^>]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);
// Remove javascript: and vbscript: protocols
$data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data);
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data);
$data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data);
// Only works in IE: <span style="width: expression(alert('Ping!'));"></span>
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data);
$data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data);
// Remove namespaced elements (we do not need them)
$data = preg_replace('#</*\w+:\w[^>]*+>#i', '', $data);
do
{
// Remove really unwanted tags
$old_data = $data;
$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);
}
while ($old_data !== $data);
return $data;
}
function XMLArray_clean(&$xml, $lvl = 0)
{
if(is_string($xml))
{
}elseif(is_array($xml))
{
if(count($xml) > 0)
{
foreach($xml as $k => $v)
{
if(is_string($v))
{
$xml[$k] = $this->CleanString($v, $this->SyntaxByElement($k,'nojs'));
}
if($lvl < 10)
{
$this->XMLArray_clean($v, $lvl + 1);
}
}
}
}elseif(is_object($xml))
{
$xml = (array) $xml;
if(count($xml) > 0)
{
foreach($xml as $k => $v)
{
$v = (array) $v;
if(count($v) > 0)
{
if($lvl < 10)
{
$this->XMLArray_clean($v, $lvl + 1);
}
}elseif((String)$v != '')
{
if(isset($xml->$k))
{
//$xml->$k = $this->CleanString($v, $this->SyntaxByElement($k,'nojs'));
}
}
}
}
}
return $xml;
}
}
+151 -18
View File
@@ -2578,11 +2578,19 @@ class YUI {
if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnung,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnung))
) $erweiterte_ansicht)
as Artikel,
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,";
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, ";
if ($this->app->erp->RechteVorhanden('auftrag','einkaufspreise')) {
$sql .= $this->FormatPreis('einkaufspreis')." as einkaufspreis,
CONCAT(".$this->app->erp->FormatPreis("ROUND(deckungsbeitrag*100,2)",2).",'%') AS DB,
";
}
$sql .= "b.id as id
FROM $table b
@@ -3614,6 +3622,121 @@ class YUI {
'</td></tr></table>')";
}
function IconsSQL_versandpaket() {
/*
status:
neu ->
Lagergo
lagergo_stop
lagerstop
Schein
summe_go
summe_stop
Auto
liefersperrego
liefersperrestop
marke
portogo
portostop
produktion_usn_gut
storno*/
$lieferschein_kein = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_stop.png\" title=\"Kein Lieferschein\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_ohne_pos = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_go.png\" title=\"Lieferschein ohne Positionen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_voll = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo.png\" title=\"Lieferschein vollst&auml;ndig\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo_teil.png\" title=\"Lieferschein teilweise\" border=\"0\" style=\"margin-right:1px\">";
$versendet = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrego.png\" title=\"Versendet\" border=\"0\" style=\"margin-right:1px\">";
$versendet_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrestop.png\" title=\"Nicht versendet\" border=\"0\" style=\"margin-right:1px\">";
$paketmarke = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/portogo.png\" style=\"margin-right:1px\" title=\"Paketmarke\" border=\"0\">";
$paketmarke_keine = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/portostop.png\" style=\"margin-right:1px\" title=\"Keine Paketmarke\" border=\"0\">";
$ausgeliefert = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery_ok.png\" style=\"margin-right:1px\" title=\"Ausgeliefert\" border=\"0\">";
$ausgeliefert_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery.png\" style=\"margin-right:1px\" title=\"Nicht ausgeliefert\" border=\"0\">";
$storno = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/storno.png\" style=\"margin-right:1px\" title=\"Storniert\" border=\"0\">";
for ($z = 0;$z < 4;$z++) {
$abgeschlossen .= $ausgeliefert;
$storniert .= $storno;
}
return "CONCAT('<table><tr><td nowrap>',
CASE
WHEN status = 'storniert' THEN '$storniert'
ELSE CONCAT(
CASE
WHEN lieferscheine <> '' AND vmenge = lmenge THEN '$lieferschein_voll'
WHEN lieferschein_ohne_pos <> '' AND vmenge IS NULL THEN '$lieferschein_ohne_pos'
WHEN lieferscheine <> '' THEN '$lieferschein_teil'
ELSE
'$lieferschein_kein'
END,
CASE
WHEN tracking <> '' THEN '$paketmarke'
ELSE
'$paketmarke_keine'
END,
CASE
WHEN status = 'versendet' THEN '$versendet'
WHEN status = 'abgeschlossen' THEN '$versendet'
ELSE
'$versendet_nicht'
END,
CASE
WHEN status = 'abgeschlossen' THEN '$ausgeliefert'
ELSE
'$ausgeliefert_nicht'
END
)
END,
'</td></tr></table>')";
}
function IconsSQL_lieferung() {
$lieferschein_kein = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagerstop.png\" title=\"Keine Artikel in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_ohne_pos = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_go.png\" title=\"Lieferschein ohne Positionen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_voll = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo.png\" title=\"Artikel vollst&auml;ndig in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo_stop.png\" title=\"Artikel teilweise in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$versendet = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrego.png\" title=\"Versendet\" border=\"0\" style=\"margin-right:1px\">";
$versendet_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrestop.png\" title=\"Nicht versendet\" border=\"0\" style=\"margin-right:1px\">";
$versendet_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperregostop.png\" title=\"Teilweise versendet\" border=\"0\" style=\"margin-right:1px\">";
$ausgeliefert = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery_ok.png\" style=\"margin-right:1px\" title=\"Ausgeliefert\" border=\"0\">";
$ausgeliefert_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery.png\" style=\"margin-right:1px\" title=\"Nicht ausgeliefert\" border=\"0\">";
$ausgeliefert_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/delivery_pending.png\" style=\"margin-right:1px\" title=\"Teilweise ausgeliefert\" border=\"0\">";
$storno = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/storno.png\" style=\"margin-right:1px\" title=\"Storniert\" border=\"0\">";
return "CONCAT(
'<table><tr><td nowrap>',
CASE
WHEN vmenge >= lmenge THEN '$lieferschein_voll'
WHEN vmenge < lmenge AND vmenge <> 0 THEN '$lieferschein_teil'
ELSE '$lieferschein_kein'
END,
CASE
WHEN alle_abgeschlossen THEN '$versendet'
WHEN alle_versendet THEN '$versendet'
WHEN eins_versendet THEN '$versendet_teil'
ELSE '$versendet_nicht'
END,
CASE
WHEN alle_abgeschlossen THEN '$ausgeliefert'
WHEN eins_abgeschlossen THEN '$ausgeliefert_teil'
ELSE '$ausgeliefert_nicht'
END,
'</td></tr></table>')";
}
function TablePositionSearch($parsetarget, $name, $callback = "show", $gener) {
$id = $this->app->Secure->GetGET("id");
@@ -5702,12 +5825,8 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
}
}
// Fester filter
$more_data6 = $this->app->Secure->GetGET("more_data6");
$more_data7 = $this->app->Secure->GetGET("more_data7");
$more_data8 = $this->app->Secure->GetGET("more_data8");
$more_data4 = $this->app->Secure->GetGET("more_data4");
/*
$versandjoin = "";
if(isset($parameter['offenversandzentrum']) && !empty($parameter['offenversandzentrum']))
{
@@ -5741,8 +5860,8 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
}
if($versandjoin)$sql .= $versandjoin;
*/
if($more_data4 || (isset($parameter['ohnerechnung']) && !empty($parameter['ohnerechnung']))) {
$paramsArray[] = " l.status !='storniert' ";
@@ -5817,6 +5936,21 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
if ($more_data3 == 1) $subwhere[] = " l.lieferantenretoure=1 ";
// ENDE EXTRA more
$more_data6 = $this->app->Secure->GetGET("more_data6");
$more_data7 = $this->app->Secure->GetGET("more_data7");
$more_data8 = $this->app->Secure->GetGET("more_data8");
if ($more_data6) {
$subwhere[] = "l.versand_status = 3";
}
if ($more_data7) {
$subwhere[] = "l.versand_status = 1";
}
if ($more_data8) {
$subwhere[] = "l.versand_status IN (2,3)";
}
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');
@@ -12108,9 +12242,6 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
</tr>
</tfoot>
</table></div>
<br>
<br>
<br>
');
if((empty($disableautosavefilter)) && $this->anzusersaves < 2) {
@@ -14595,7 +14726,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift" || $module == "proformarechnung") {
if ($schreibschutz != 1) {
$addrow = array('<form action="" method="post" id="myform">', '[ARTIKELSTART]<input type="text" size="30" name="artikel" id="artikel" onblur="window.setTimeout(\'selectafterblur()\',200);">[ARTIKELENDE]', '<input type="text" name="projekt" id="projekt" size="10" readonly onclick="checkhere()" >', '<input type="text" name="nummer" id="nummer" size="7">', '<input type="text" size="8" name="lieferdatum" id="lieferdatum">', '<input type="text" name="menge" id="menge" size="5" onblur="window.setTimeout(\'selectafterblurmenge()\',200); document.getElementById(\'preis\').style.background =\'none\';">', '<input type="text" name="preis" id="preis" size="10" onclick="checkhere();">', '<input type="text" name="waehrung" id="waehrung" size="10" onclick="checkhere();">' ,'<input type="text" name="rabatt" id="rabatt" size="7">');
$addrow = array('<form action="" method="post" id="myform">', '[ARTIKELSTART]<input type="text" size="30" name="artikel" id="artikel" onblur="window.setTimeout(\'selectafterblur()\',200);">[ARTIKELENDE]', '<input type="text" name="projekt" id="projekt" size="10" readonly onclick="checkhere()" >', '<input type="text" name="nummer" id="nummer" size="7">', '<input type="text" size="8" name="lieferdatum" id="lieferdatum">', '<input type="text" name="menge" id="menge" size="5" onblur="window.setTimeout(\'selectafterblurmenge()\',200); document.getElementById(\'preis\').style.background =\'none\';">', '<input type="text" name="preis" id="preis" size="10" onclick="checkhere();">', '<input type="text" name="waehrung" id="waehrung" size="10" onclick="checkhere();">' ,'<input type="text" name="rabatt" id="rabatt" size="7">','','');
$addrow[] = '<input type="submit" value="einf&uuml;gen" name="ajaxbuchen">
<script type="text/javascript">
document.onkeydown = function(evt) {
@@ -14758,9 +14889,11 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
}
$table->headings[6] = 'Preis';
$mengencol = 5;
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $table->headings[7] = 'W&auml;hrung';
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $table->headings[8] = 'Rabatt';
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") $rabattcol = 8;
if ($module == "angebot" || $module == "auftrag" || $module == "rechnung" || $module == "gutschrift") {
$table->headings[7] = 'W&auml;hrung';
$table->headings[8] = 'Rabatt';
$rabattcol = 8;
}
}
$__arr = array($summencol, $mengencol, $rabattcol, $ecol, $dcol,$zwischensumme);
$this->app->erp->RunHook('yui_sortlistadd_draw', 2,$table,$__arr);
@@ -42,7 +42,11 @@ class PLACEHOLDER_MODULECLASSNAME {
$defaultorder = 1;
$defaultorderdesc = 0;
$dropnbox = "PLACEHOLDER_DROPNBOX";
$dropnbox = "PLACEHOLDER_DROPNBOX";
// $moreinfo = true; // Allow drop down details
// $moreinfoaction = "lieferschein"; // specify suffix for minidetail-URL to allow different minidetails
// $menucol = 11; // Set id col for moredata/menu
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=PLACEHOLDER_MODULENAME&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a>&nbsp;<a href=\"#\" onclick=DeleteDialog(\"index.php?module=PLACEHOLDER_MODULENAME&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
@@ -118,6 +122,8 @@ class PLACEHOLDER_MODULECLASSNAME {
// Add checks here
// $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
$columns = "id, ";
$values = "$id, ";
$update = "";
@@ -166,6 +172,9 @@ class PLACEHOLDER_MODULECLASSNAME {
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
$this->app->Tpl->Add('EMAIL', $email);
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
$this->app->YUI->AutoComplete("artikel", "artikelnummer");
*/
// $this->SetInput($input);
@@ -183,14 +192,4 @@ class PLACEHOLDER_MODULECLASSNAME {
return $input;
}
/*
* Set all fields in the page corresponding to $input
*/
function SetInput($input) {
// $this->app->Tpl->Set('EMAIL', $input['email']);
PLACEHOLDER_SET_INPUT
}
}
}
+158
View File
@@ -57169,6 +57169,17 @@
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "versand_status",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
}
],
"keys": [
@@ -64785,6 +64796,17 @@
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "vorlaeufig",
"Type": "int(1)",
"Collation": null,
"Null": "YES",
"Key": "",
"Default": "",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
}
],
"keys": [
@@ -112651,6 +112673,76 @@
}
]
},
{
"name": "versandpaket_lieferschein_position",
"collation": "utf8mb3_general_ci",
"type": "BASE TABLE",
"columns": [
{
"Field": "id",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "PRI",
"Default": null,
"Extra": "auto_increment",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "versandpaket",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "lieferschein_position",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "menge",
"Type": "decimal(14,4)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
}
],
"keys": [
{
"Key_name": "PRIMARY",
"Index_type": "BTREE",
"columns": [
"id"
],
"Non_unique": ""
},
{
"Key_name": "versandpaket_lieferschein_position",
"Index_type": "BTREE",
"columns": [
"versandpaket",
"lieferschein_position"
],
"Non_unique": "UNIQUE"
}
]
},
{
"name": "versandarten",
"collation": "utf8mb3_general_ci",
@@ -112838,6 +112930,17 @@
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "datum",
"Type": "datetime",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "current_timestamp()",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "versand",
"Type": "int(11)",
@@ -112860,6 +112963,28 @@
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "versandart",
"Type": "varchar(64)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": "",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "lieferschein_ohne_pos",
"Type": "int(11)",
"Collation": null,
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "tracking",
"Type": "varchar(255)",
@@ -112871,6 +112996,17 @@
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "tracking_link",
"Type": "text",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": "",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "versender",
"Type": "varchar(255)",
@@ -112903,6 +113039,28 @@
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "status",
"Type": "varchar(64)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "usereditid",
"Type": "int(11)",
"Collation": null,
"Null": "YES",
"Key": "MUL",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
}
],
"keys": [
+41 -1476
View File
File diff suppressed because it is too large Load Diff
+66 -20
View File
@@ -75,7 +75,8 @@ abstract class Versanddienstleister
$ret['lieferscheinId'] = $lieferscheinId;
$addressfields = ['name', 'adresszusatz', 'abteilung', 'ansprechpartner', 'unterabteilung', 'ort', 'plz',
'strasse', 'land'];
'strasse', 'land'];
$ret['original'] = array_filter($docArr, fn($key) => in_array($key, $addressfields), ARRAY_FILTER_USE_KEY);
$ret['name'] = empty(trim($docArr['ansprechpartner'])) ? trim($docArr['name']) : trim($docArr['ansprechpartner']);
@@ -127,7 +128,7 @@ abstract class Versanddienstleister
if (!empty($docArr['ihrebestellnummer'])) {
$orderNumberParts[] = $docArr['ihrebestellnummer'];
}
$orderNumberParts[] = $docArr['belegnr'];
$orderNumberParts[] = ucfirst($sid)." ".$docArr['belegnr'];
$ret['order_number'] = implode(' / ', $orderNumberParts);
}
@@ -369,7 +370,7 @@ abstract class Versanddienstleister
return true;
}
public function Paketmarke(string $target, string $docType, int $docId): void
public function Paketmarke(string $target, string $docType, int $docId, $versandpaket = null): void
{
$address = $this->GetAdressdaten($docId, $docType);
if (isset($_SERVER['CONTENT_TYPE']) && ($_SERVER['CONTENT_TYPE'] === 'application/json')) {
@@ -378,25 +379,65 @@ abstract class Versanddienstleister
if ($json->submit == 'print') {
$result = $this->CreateShipment($json, $address);
if ($result->Success) {
$sql = "INSERT INTO versand
(adresse, lieferschein, versandunternehmen, gewicht, tracking, tracking_link, anzahlpakete)
VALUES
({$address['addressId']}, {$address['lieferscheinId']}, '$this->type',
'$json->weight', '$result->TrackingNumber', '$result->TrackingUrl', 1)";
$this->app->DB->Insert($sql);
if (empty($versandpaket)) {
$sql = "INSERT INTO versandpakete
(
lieferschein_ohne_pos,
gewicht,
tracking,
tracking_link,
status,
versandart,
versender
)
VALUES
(
{$address['lieferscheinId']},
'$json->weight',
'$result->TrackingNumber',
'$result->TrackingUrl',
'neu',
'$this->type',
'".$this->app->User->GetName()."'
)";
$this->app->DB->Insert($sql);
$versandpaket = $this->app->DB->GetInsertID();
}
else {
$sql = "UPDATE versandpakete SET
gewicht = '".$json->weight."',
tracking = '".$result->TrackingNumber."',
tracking_link = '".$result->TrackingUrl."'
WHERE id = '".$versandpaket."'
";
$this->app->DB->Update($sql);
}
$filename = $this->app->erp->GetTMP() . join('_', [$this->type, 'Label', $result->TrackingNumber]) . '.pdf';
file_put_contents($filename, $result->Label);
$this->app->printer->Drucken($this->labelPrinterId, $filename);
$filename = join('_', [$this->type, 'Label', $result->TrackingNumber]) . '.pdf';
$filefullpath = $this->app->erp->GetTMP() . $filename;
file_put_contents($filefullpath, $result->Label);
$this->app->erp->CreateDateiWithStichwort(
$filename,
'Paketmarke '.$this->type.' '.$result->TrackingNumber,
'Paketmarke Versandpaket Nr. '.$versandpaket,
'',
$filefullpath,
$this->app->User->GetName(),
'paketmarke',
'versandpaket',
$versandpaket
);
if (isset($result->ExportDocuments)) {
$filename = $this->app->erp->GetTMP() . join('_', [$this->type, 'ExportDoc', $result->TrackingNumber]) . '.pdf';
file_put_contents($filename, $result->ExportDocuments);
$this->app->printer->Drucken($this->documentPrinterId, $filename);
}
$ret['messages'][] = ['class' => 'info', 'text' => "Paketmarke wurde erfolgreich erstellt: $result->TrackingNumber"];
$this->app->printer->Drucken($this->labelPrinterId, $filefullpath);
if (isset($result->ExportDocuments)) {
$filefullpath = $this->app->erp->GetTMP() . join('_', [$this->type, 'ExportDoc', $result->TrackingNumber]) . '.pdf';
file_put_contents($filefullpath, $result->ExportDocuments);
$this->app->printer->Drucken($this->documentPrinterId, $filefullpath);
}
$ret['messages'][] = ['class' => 'info', 'text' => "Paketmarke wurde erfolgreich erstellt: $result->TrackingNumber"];
} else {
$ret['messages'] = array_map(fn(string $item) => ['class' => 'error', 'text' => $item], array_unique($result->Errors));
$ret['messages'] = array_map(fn(string $item) => ['class' => 'error', 'text' => $item], array_unique($result->Errors));
}
}
header('Content-Type: application/json');
@@ -410,7 +451,12 @@ abstract class Versanddienstleister
$address['product'] = $products[0]->Id ?? '';
$countries = $this->app->DB->SelectArr("SELECT iso, bezeichnung_de name, eu FROM laender ORDER BY bezeichnung_de");
$countries = array_combine(array_column($countries, 'iso'), $countries);
if(!empty($countries)) {
$countries = array_combine(array_column($countries, 'iso'), $countries);
} else {
$countries = Array();
$this->app->Tpl->addMessage('error', 'L&auml;nderliste ist leer. Siehe Einstellungen -> L&auml;nderliste.', false, 'PAGE');
}
$json['form'] = $address;
$json['countries'] = $countries;
@@ -137,7 +137,7 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
<h2>{|Paket|}</h2>
<table>
<tr>
<td>{|Gewicht (in kg)|}:</td>
<td>{|Gewicht (in kg)</b>|}:</td>
<td><input type="text" v-model.number="form.weight"></td>
</tr>
<tr>
@@ -157,7 +157,7 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
<td>
<select v-model="form.product" required>
<option v-for="prod in products" :value="prod.Id" v-if="productAvailable(prod)">{{prod.Name}}</option>
</select>
</select><i>F&uuml;r Produktwahl Gewicht eingeben!</i>
</td>
</tr>
<tr v-if="serviceAvailable('premium')">
@@ -168,11 +168,11 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
</div>
<div class="clearfix"></div>
<div class="col-md-12">
<h2>{|Bestellung|}</h2>
<h2>{|Sonstiges|}</h2>
<table>
<tbody>
<tr>
<td>{|Bestellnummer|}:</td>
<td>{|Referenzen|}:</td>
<td><input type="text" size="36" v-model="form.order_number"></td>
</tr>
<tr>
@@ -300,4 +300,4 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
}
}
})
</script>
</script>
+10 -4
View File
@@ -1597,11 +1597,17 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
if($artikel_freitext1_suche)
{
$felder[] = 'art.freifeld1';
} else {
$artikel_freitext1_suche = 'true';
}
$subwhere = $this->AjaxFilterWhere($termorig,$felder);
$arr = $this->app->DB->SelectArr("SELECT CONCAT(art.nummer,' ',art.name_de) as name FROM artikel art
$subwhere = $this->AjaxFilterWhere($termorig,$felder);
$sql = "SELECT CONCAT(art.nummer,' ',art.name_de) as name FROM artikel art
INNER JOIN $doctype"."_position ap ON ap.artikel = art.id AND $doctype = '$doctypeid'
WHERE art.geloescht=0 AND ($artikel_freitext1_suche) AND art.geloescht=0 AND art.intern_gesperrt!=1 LIMIT 20");
WHERE
art.geloescht=0 AND ($artikel_freitext1_suche) AND art.geloescht=0 AND art.intern_gesperrt!=1 AND
(name_de LIKE '%$term%' OR art.nummer LIKE '%$term%')
LIMIT 20";
$arr = $this->app->DB->SelectArr($sql);
$carr = !empty($arr)?count($arr):0;
for($i = 0; $i < $carr; $i++) {
$newarr[] = $arr[$i]['name'];
@@ -2479,7 +2485,7 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
$adresse = $this->app->DB->Select("SELECT id FROM adresse WHERE kundennummer = '".$kunde[0]."' AND kundennummer <> '' LIMIT 1");
}
$beleg = str_replace('kunden','',$filtername);
$arr = $this->app->DB->SelectArr("SELECT CONCAT(id,' ',if(belegnr <> '',belegnr,'ENTWURF'),' ',kundennummer,' ',name) as name FROM $beleg WHERE (belegnr LIKE '%$term%' OR name LIKE '%$term%' OR kundennummer LIKE '$%term%') AND (status = 'angelegt' OR status = 'freigegeben')
$arr = $this->app->DB->SelectArr("SELECT CONCAT(belegnr,' ',kundennummer,' ',name) as name FROM $beleg WHERE (belegnr <> '') AND (belegnr LIKE '%$term%' OR name LIKE '%$term%' OR kundennummer LIKE '$%term%') AND (status IN ('angelegt','freigegeben','versendet'))
".($adresse?" AND adresse = '$adresse' ":'')." ".$this->app->erp->ProjektRechte('projekt')."
ORDER by belegnr LIMIT 20");
$carr = !empty($arr)?count($arr):0;
+93 -7
View File
@@ -1990,8 +1990,52 @@ class Auftrag extends GenAuftrag
$gebuchtezeit = str_replace(".", ",", round($gebuchtezeit,2));
}
$summebrutto = $this->app->DB->Select("SELECT gesamtsumme FROM auftrag WHERE id='$id' LIMIT 1");
$this->app->Tpl->Set('DECKUNGSBEITRAG',0);
$this->app->Tpl->Set('DBPROZENT',0);
// Deckungsbeitrag
if (!$this->app->erp->RechteVorhanden('auftrag','einkaufspreise')) {
$this->app->Tpl->Set('DBHIDDEN','hidden');
} else {
$sql = "
SELECT
umsatz_netto_gesamt,
artikel,
menge,
einkaufspreis
FROM
`auftrag_position`
WHERE
`auftrag` = ".$id."
";
$positionen = $this->app->DB->SelectArr($sql);
$umsatz_gesamt = 0;
$kosten_gesamt = 0;
$db_gesamt = 0;
foreach ($positionen as $position) {
if (empty($position['einkaufspreis'])) {
$position['einkaufspreis'] = $this->app->erp->GetEinkaufspreis($position['artikel'],$position['menge']);
}
$kosten = ($position['einkaufspreis']*$position['menge']);
$db_gesamt += $position['umsatz_netto_gesamt']-$kosten;
$kosten_gesamt += $kosten;
$umsatz_gesamt += $position['umsatz_netto_gesamt'];
}
$this->app->Tpl->Set('NETTOGESAMT',$this->app->erp->number_format_variable($umsatz_gesamt,2));
$this->app->Tpl->Set('KOSTEN',$this->app->erp->number_format_variable($kosten_gesamt,2));
$this->app->Tpl->Set('DECKUNGSBEITRAG',$this->app->erp->number_format_variable($db_gesamt,2));
$this->app->Tpl->Set( 'DBPROZENT',
$umsatz_gesamt==0?
"-":
$this->app->erp->number_format_variable(
round(
$db_gesamt/$umsatz_gesamt*100,2
)
)."%"
);
}
$this->app->Tpl->Set('GEBUCHTEZEIT',0);
if($auftragArr[0]['ust_befreit']==0){
@@ -2270,7 +2314,7 @@ class Auftrag extends GenAuftrag
}
$this->app->Tpl->Set('PREISANFRAGE', implode('<br />', $priceRequestsHtml));
}
/*
$tmpVersand = !$hasDeliveryNotes?[]: $this->app->DB->SelectFirstCols(
"SELECT if(v.versendet_am!='0000-00-00',
CONCAT(DATE_FORMAT( v.versendet_am,'%d.%m.%Y'),' ',v.versandunternehmen),
@@ -2353,6 +2397,39 @@ class Auftrag extends GenAuftrag
else {
$this->app->Tpl->Set('TRACKING',$tmpVersand);
}
*/
$sql = "SELECT SQL_CALC_FOUND_ROWS
v.id,
v.tracking as tracking,
v.tracking_link
FROM
versandpakete v
LEFT JOIN
versandpaket_lieferschein_position vlp ON v.id = vlp.versandpaket
LEFT JOIN
lieferschein_position lp ON lp.id = vlp.lieferschein_position
LEFT JOIN
lieferschein l ON lp.lieferschein = l.id
LEFT JOIN
lieferschein lop ON lop.id = v.lieferschein_ohne_pos
WHERE
l.auftragid = ".$id." OR lop.auftragid = ".$id."
GROUP BY
v.id
";
$tracking = $this->app->DB->SelectArr($sql);
$tracking_list = array();
foreach ($tracking as $single_tracking) {
$tracking_list[] = '<a href="index.php?module=versandpakete&action=edit&id='.$single_tracking['id'].'">Paket Nr.'.$single_tracking['id'].'</a>'.
' ('.'<a href="'.$single_tracking['tracking_link'].'">'.$single_tracking['tracking'].'</a>'.')';
}
$this->app->Tpl->Set('TRACKING',implode('<br>',$tracking_list));
$icons = $this->app->YUI->IconsSQL();
@@ -4916,6 +4993,10 @@ class Auftrag extends GenAuftrag
$this->app->erp->AdresseAlsLieferadresseButton($adresse);
}
if ($schreibschutz != 1 AND $status != 'abgeschlossen') {
$this->app->erp->BerechneDeckungsbeitrag($id,'auftrag');
}
if($nummer!='') {
$this->app->Tpl->Set('NUMMER',$nummer);
if($this->app->erp->RechteVorhanden('adresse','edit')){
@@ -5694,8 +5775,13 @@ Die Gesamtsumme stimmt nicht mehr mit urspr&uuml;nglich festgelegten Betrag '.
}
$this->app->DB->Update("UPDATE lieferschein SET
belegnr='$ls_belegnr', status='freigegeben', versand='".$this->app->User->GetDescription()."'
WHERE id='$lieferschein' LIMIT 1");
belegnr='$ls_belegnr',
status='freigegeben',
versand='".$this->app->User->GetDescription()."',
versand_status = 1
WHERE id='$lieferschein' LIMIT 1");
// Versand_status: 1 = process in versandpakete, 2 = finished, 3 = finished manually
$this->app->erp->LieferscheinProtokoll($lieferschein, 'Lieferschein freigegeben');
@@ -6342,7 +6428,7 @@ Die Gesamtsumme stimmt nicht mehr mit urspr&uuml;nglich festgelegten Betrag '.
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=list','&Uuml;bersicht');
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=create','Neuen Auftrag anlegen');
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=offene','Offene Positionen');
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=versandzentrum','Versandzentrum');
$this->app->erp->MenuEintrag('index.php?module=auftrag&action=versandzentrum','Versand&uuml;bergabe');
if(strlen($backurl)>5){
$this->app->erp->MenuEintrag("$backurl", 'Zur&uuml;ck zur &Uuml;bersicht');
@@ -6387,7 +6473,7 @@ Die Gesamtsumme stimmt nicht mehr mit urspr&uuml;nglich festgelegten Betrag '.
$this->AuftraguebersichtMenu();
$targetMessage = 'AUTOVERSANDBERECHNEN';
$this->app->Tpl->Add('MESSAGE','<div class="info">Auftr&auml;ge an Versand übergeben mit automatischem Druck und Mailversand.</div>');
$this->app->Tpl->Add('MESSAGE','<div class="info">Auftr&auml;ge an Versand übergeben mit automatischem Druck und Mailversand. <a class="button" href="index.php?module=versandpakete&action=lieferungen">Zum Versand</a></div>');
$autoshipmentEnabled = true;
$this->app->erp->RunHook('OrderAutoShipment', 2, $targetMessage, $autoshipmentEnabled);
+25 -38
View File
@@ -37,7 +37,7 @@
<tr><td class="auftraginfo_cell">{|Bestellung|}:</td><td class="auftraginfo_cell" >[BESTELLUNG]</td><td class="auftraginfo_cell">{|Eigene Umsatzsteuer ID|}:</td><td class="auftraginfo_cell">[DELIVERYTHRESHOLDVATID]</td></tr>
<tr><td class="auftraginfo_cell">{|Retoure|}:</td><td class="auftraginfo_cell" >[RETOURE]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
<tr><td class="auftraginfo_cell">{|Preisanfrage|}:</td><td class="auftraginfo_cell" >[PREISANFRAGE]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
<tr><td class="auftraginfo_cell">{|Tracking|}:</td><td class="auftraginfo_cell" >[TRACKING]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
<tr><td class="auftraginfo_cell">{|Pakete|}:</td><td class="auftraginfo_cell" >[TRACKING]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
</table>
<table width="100%">
@@ -48,19 +48,14 @@
<td style="" width="50%">[VERSANDTEXT]</td>
[RMAENDIF]
</tr>
</table>
<div style="background-color:white">
<div style="padding:10px">
[RECHNUNGLIEFERADRESSE]
</div>
</div>
</div>
<div style="float:left; width:50%">
<div style="overflow:auto;max-height:550px;">
<div style="background-color:white;">
<h2 class="greyh2">Artikel</h2>
@@ -69,63 +64,55 @@
<i style="color:#999">* Die linke Zahl zeigt die für den Kunden reservierten Einheiten und die rechte Zahl die global reservierte Anzahl.</i>
</div>
</div>
[MINIDETAILNACHARTIKEL]
<!--
<div style="background-color:white;">
<h2 class="greyh2">Lieferkette</h2>
<div style="padding:10px">
<table class="mkTable">
<tr><th>Art</th><th>Beleg</th><th>Datum</th><th>Lieferant</th><th>Status</th></tr>
<tr><td>Bestellung</td><td>ENTWURF</td><td></td><td>In-Circuit<br>200 x 777777 SMT USBprog 1)</td><td>-</td></tr>
<tr><td>Anlieferung</td><td>200000</td><td></td><td>In-Circuit<br>200 x 777777 ATMEGA32</td><td>offen</td></tr>
<tr><td>Bestellung</td><td>100023</td><td></td><td>Instanet<br>200 x USBprog 5.0 Spezial Elektor<br>200 x 777777 Flashen + Montieren</td><td>offen</td></tr>
<tr><td>Anlieferung</td><td>200002</td><td></td><td>Instanet<br>200 x 777777 SMT USBprog 1)<br>200 x 122222 Gehäuse</td><td>offen</td></tr>
</table>
<div style="background-color:white" [DBHIDDEN]>
<h2 class="greyh2">{|Deckungsbeitrag (netto)|}</h2>
<table width="100%">
<tbody>
<tr>
<td>Umsatz EUR</td>
<td>Kosten EUR</td>
<td>Deckungsbeitrag EUR</td>
<td>DB %</td>
</tr>
<tr>
<td class="greybox" width="25%">[NETTOGESAMT]</td>
<td class="greybox" width="25%">[KOSTEN]</td>
<td class="greybox" width="25%">[DECKUNGSBEITRAG]</td>
<td class="greybox" width="25%">[DBPROZENT]</td>
</tr>
</tbody>
</table>
</div>
</div>
-->
<div style="background-color:white">
<h2 class="greyh2">{|Zahlungen|}</h2>
<div style="padding:10px">
[ZAHLUNGEN]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">{|Protokoll|}</h2>
<div style="padding:10px;">
[PROTOKOLL]
</div>
</div>
[VORPRODUKTIONPROTOKOLL]
[PRODUKTIONPROTOKOLL]
[NACHPRODUKTIONPROTOKOLL]
<!--
<div style="background-color:white">
<h2 class="greyh2">{|RMA Prozess|}</h2>
<div style="padding:10px">
[RMA]
</div>
<h2 class="greyh2">{|RMA Prozess|}</h2>
<div style="padding:10px">
[RMA]
</div>
</div>
-->
<div style="background-color:white">
<h2 class="greyh2">{|PDF-Archiv|}</h2>
<div style="padding:10px;overflow:auto;">
[PDFARCHIV]
</div>
</div>
<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>
[INTERNEBEMERKUNGEDIT]
</div>
</div>
@@ -122,7 +122,7 @@
<li>{|Stornierung|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {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}, {TRACKINGLINK}, {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}, {LIEFERADRESSE}, {LIEFERADRESSELANG}</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>{|Selbstabholer|}</li>
@@ -22,7 +22,7 @@
<tr><td class="auftraginfo_cell">Projekt:</td><td class="auftraginfo_cell">[PROJEKT]</td><td class="auftraginfo_cell">Angebotssumme:</td><td class="auftraginfo_cell">[GESAMTSUMME]</td></tr>
<tr><td class="auftraginfo_cell">Auftrag:</td><td class="auftraginfo_cell">[AUFTRAG]</td><td class="auftraginfo_cell">Versteuerung:</td><td class="auftraginfo_cell">[STEUER]</td></tr>
<tr><td class="auftraginfo_cell">Rechnung:</td><td class="auftraginfo_cell">[RECHNUNG]</td><td class="auftraginfo_cell">Gewicht (netto):</td><td class="auftraginfo_cell">[GEWICHT]</td></tr>
<tr><td class="auftraginfo_cell">Tracking:</td><td class="auftraginfo_cell">[TRACKING]</td><td class="auftraginfo_cell">Versandart:</td><td class="auftraginfo_cell">[VERSANDART]</td></tr>
<tr><td class="auftraginfo_cell">Pakete:</td><td class="auftraginfo_cell">[TRACKING]</td><td class="auftraginfo_cell">Versandart:</td><td class="auftraginfo_cell">[VERSANDART]</td></tr>
<tr><td class="auftraginfo_cell">Retoure:</td><td class="auftraginfo_cell">[RETOURE]</td><td class="auftraginfo_cell"></td><td class="auftraginfo_cell"></td></tr>
</table>
+1 -27
View File
@@ -17,33 +17,6 @@
<li class="filter-item"><input type="checkbox" id="anlieferanten"><label for="anlieferanten">{|an Lieferanten|}</label></li>
</ul>
</div>
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter Versandzentrum|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="abgeschlossenlogistik" class="switch">
<input type="checkbox" id="abgeschlossenlogistik">
<span class="slider round"></span>
</label>
<label for="abgeschlossenlogistik">{|abgeschlossen &uuml;ber Logistik|}</label>
</li>
<li class="filter-item">
<label for="nochinlogistik" class="switch">
<input type="checkbox" id="nochinlogistik">
<span class="slider round"></span>
</label>
<label for="nochinlogistik">{|noch in Logistik|}</label>
</li>
<li class="filter-item">
<label for="manuellabgeschlossen" class="switch">
<input type="checkbox" id="manuellabgeschlossen">
<span class="slider round"></span>
</label>
<label for="manuellabgeschlossen">{|manuell abgeschlossen|}</label>
</li>
</ul>
</div>
</div>
[MESSAGE]
@@ -56,6 +29,7 @@
<option value="offen">{|als offen markieren|}</option>
<option value="versendet">{|als versendet markieren|}</option>
<option value="storniert">{|als storniert markieren|}</option>
<option value="versanduebergabe">{|in Versand geben|}</option>
<option value="pdf">{|Sammel-PDF|}</option>
<option value="drucken">{|drucken|}</option>
</select>&nbsp;{|Drucker|}: <select name="seldrucker">[SELDRUCKER]</select>&nbsp;<input type="submit" class="btnBlue" name="ausfuehren" value="{|ausf&uuml;hren|}" />
+1 -1
View File
@@ -19,7 +19,7 @@
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|[STATUSICON]<b>Ticket <font color="blue">#[SCHLUESSEL]</font></b>|}</legend>
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" id="betreff" value="[BETREFF]" size="20"></td></tr>
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" id="betreff" value="[BETREFF]" style="width: 100%;"></td></tr>
<tr><td>{|Von|}:</td><td>[KUNDE]&nbsp;[MAILADRESSE]</td></tr>
<tr><td>{|Projekt|}:</td><td><input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20"></td></tr>
<tr><td>{|Adresse|}:</td><td><input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20"><a href="index.php?module=adresse&action=edit&id=[ADRESSE_ID]"><img src="./themes/new/images/forward.svg" border="0" style="top:6px; position:relative"></a></td></tr>
+4 -1
View File
@@ -23,6 +23,9 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
[MODULEINSTALLIERT]
</fieldset>
[TAB1NEXT]
<form id="neu" action="index.php?module=versandarten&action=neusonstige" method="post">
<button name="submit" value="neusonstige" class="ui-button-icon">Versandart ohne Modul anlegen</button>
</form>
</div>
<!-- tab view schließen -->
@@ -35,4 +38,4 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
:pages="pages"
:allowClose="allowClose"
:pagination="pagination">
</click-by-click-assistant>
</click-by-click-assistant>
+80
View File
@@ -0,0 +1,80 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"></a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
<form action="index.php?module=versandpakete&action=add&id=[ID]&lieferschein=[LIEFERSCHEIN_ID]" method="post">
[FORMHANDLEREVENT]
<div class="row">
<div class="row-height">
<div class="col-xs-14 col-md-10 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Hinzuf&uuml;gen von Artikeln aus <a href="index.php?module=lieferschein&action=edit&id=[LIEFERSCHEIN_ID]"><b>Lieferschein [LIEFERSCHEIN]</b></a> zu Versandpaket <b>Nr. [ID]</b>|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Artikel|}:
</td>
<td>
<input type="text" name="artikel" id="artikel" value="" size="40" autofocus>
</td>
</tr>
<tr>
<td>
{|Menge|}:
</td>
<td>
<input type="number" name="menge" id="menge" value="" min="1" size="40">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Aktionen|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td><button name="submit" value="hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzuf&uuml;gen</button></td></tr>
<tr><td><button name="submit" value="lieferschein_komplett_hinzufuegen" class="ui-button-icon" style="width:100%;">Alle hinzuf&uuml;gen</button></td></tr>
<tr><td><button form="back" name="submit" value="fertig" class="ui-button-icon" style="width:100%;">Fertig</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">
<fieldset>
<legend>{|Lieferscheininhalt|}</legend>
[LIEFERSCHEININHALT]
</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">
<fieldset>
<legend>{|Paketinhalt|}</legend>
[PAKETINHALT]
</fieldset>
</div>
</div>
</div>
</div>
<input type="text" name="lieferschein" id="lieferschein" value="[LIEFERSCHEIN]" size="40" hidden>
</form>
<form action="index.php?module=versandpakete&action=edit&id=[VERSANDPAKET_ID]" id="back" method="post">
</form>
</div>
</div>
+147
View File
@@ -0,0 +1,147 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"></a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
[FORMHANDLEREVENT]
<form id="save" action="" method="post">
<div class="row">
<div class="row-height">
<div class="col-xs-14 col-md-6 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>
{|<b>Versandpaket Nr. [ID]</b> vom [DATUM]<span [NO_ADDRESS_HIDDEN]> f&uuml;r Adresse '[ADRESSE]'|}</span>
</legend>
[ICONS]
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Status|}:
</td>
<td>
<input type="text" name="" id="" value="[STATUS]" size="40" disabled>
</td>
</tr>
<tr>
<td>
{|Versender|}:
</td>
<td>
<input type="text" name="" id="" value="[VERSENDER]" size="40" disabled>
</td>
</tr>
<tr>
<td>
{|Versandart|}:
</td>
<td>
<input type="text" name="" id="" value="[VERSANDART]" size="40" disabled>
</td>
</tr>
<tr>
<td>
{|Tracking|}:
</td>
<td>
<input type="text" name="tracking" id="tracking" value="[TRACKING]" size="40" [TRACKING_DISABLED]>
<a href="[PAKETMARKE_LINK]" [PAKETMARKE_HIDDEN]>
<img src="themes/new/images/portogo.png" border="0" title="Zur Paketmarke" style="top:6px; position:relative">
</a>
<a href="[TRACKING_LINK]" [TRACKING_LINK_HIDDEN]>
<img src="themes/new/images/forward.svg" border="0" title="Zum Tracking" style="top:6px; position:relative">
</a>
</td>
</tr>
<tr [TRACKING_LINK_EDIT_HIDDEN]>
<td>
{|Tracking link|}:
</td>
<td>
<input type="text" name="tracking_link" id="tracking_link" value="[TRACKING_LINK]" size="40" [TRACKING_DISABLED]>
</td>
</tr>
<tr>
<td>
{|Gewicht Kg|}:
</td>
<td>
<input type="number" name="" id="" value="[GEWICHT]" size="40" disabled>
</td>
</tr>
<tr>
<td>
{|Bemerkung|}:
</td>
<td>
<textarea name="bemerkung" id="bemerkung" rows="3" style="width:100%;">[BEMERKUNG]</textarea>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-6 col-md-height">
<div class="inside inside-full-height">
<fieldset >
<legend>{|Lieferschein|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr [LIEFERSCHEIN_OHNE_POS_HIDDEN]>
<td>
{|Zugeordnet|}:
</td>
<td>
<input form="add" type="text" name="" id="" value="[LIEFERSCHEIN_OHNE_POS]" size="40" disabled>
<a href="index.php?module=lieferschein&action=edit&id=[LIEFERSCHEIN_OHNE_POS_ID]"><img src="themes/new/images/forward.svg" title="Zum Lieferschein" border="0" style="top:6px; position:relative"></a>
</td>
</tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]>
<td>
{|Lieferschein für Artikel hinzuf&uuml;gen|}:
</td>
<td>
<input form="add" type="text" name="lieferschein" id="lieferschein" value="[LIEFERSCHEIN]" autofocus size="40">
</td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Aktionen|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td><button form="save" name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button></td></tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]><td><button form="add" name="submit" value="lieferschein_hinzufuegen" class="ui-button-icon" style="width:100%;">Artikel hinzuf&uuml;gen</button></td></tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]><td><button form="add" name="submit" value="lieferschein_komplett_hinzufuegen" class="ui-button-icon" style="width:100%;">Alle Artikel hinzuf&uuml;gen</button></td></tr>
<tr [PAKETMARKE_ADD_HIDDEN]><td><button form="paketmarke" name="submit" value="paketmarke" class="ui-button-icon" style="width:100%;">Paketmarke drucken</button></td></tr>
<tr [ABSENDEN_HIDDEN]><td><button name="submit" value="absenden" class="ui-button-icon" style="width:100%;">Absenden</button></td></tr>
<tr [ABSCHLIESSEN_HIDDEN]><td><button name="submit" value="abschliessen" class="ui-button-icon" style="width:100%;">Abschlie&szlig;en</button></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<form id="add" action="index.php?module=versandpakete&action=add&id=[ID]" method="post">
</form>
<form id="paketmarke" action="index.php?module=versandpakete&action=paketmarke&id=[ID]" method="post">
</form>
<div class="row" [LIEFERSCHEIN_POS_HIDDEN]>
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Paketinhalt|}</legend>
[PAKETINHALT]
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,50 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
<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>{|<b>Lieferung zu <font color="blue"><a href="index.php?module=lieferschein&action=edit&id=[BELEGID]">Lieferschein [BELEGNR]</a></font></b>|}</legend>
</fieldset>
</div>
</div>
</div>
</div>
[MESSAGE]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<form action="index.php?module=versandpakete&action=stapelverarbeitung&from=lieferung&id=[FROMID]" id="frmauto" name="frmauto" method="post">
[TAB1]
<fieldset>
<table>
<legend>Stapelverarbeitung</legend>
<tr>
<tr><td>{|Status|}:</td><td><select name="status">[STATUS_OPTIONS]</select></td></tr>
<td><input type="checkbox" value="1" id="autoalle" />&nbsp;alle markieren&nbsp;</td><td><input type="submit" class="btnBlue" name="status_setzen" value="{|Status setzen|}" /></td>
</tr>
</table>
</fieldset>
</form>
</div>
</div>
</div>
</div>
[TAB1NEXT]
</div>
</div>
<script>
$('#autoalle').on('change',function(){
var wert = $(this).prop('checked');
$('#versandpakete_list').find('input[type="checkbox"]').prop('checked',wert);
$('#versandpakete_list').find('input[type="checkbox"]').first().trigger('change');
});
</script>
@@ -0,0 +1,32 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
<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="unterwegs" class="switch">
<input type="checkbox" id="unterwegs">
<span class="slider round"></span>
</label>
<label for="unterwegs">{|Unterwegs|}</label>
</li>
<li class="filter-item">
<label for="geschlossene" class="switch">
<input type="checkbox" id="geschlossene">
<span class="slider round"></span>
</label>
<label for="geschlossene">{|Zzgl. abgeschlossen|}</label>
</li>
</ul>
</div>
</div>
[TAB1]
[TAB1NEXT]
</div>
</div>
+53
View File
@@ -0,0 +1,53 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
<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="geschlossene" class="switch">
<input type="checkbox" id="geschlossene">
<span class="slider round"></span>
</label>
<label for="geschlossene">{|Zzgl. abgeschlossen|}</label>
</li>
<li class="filter-item">
<label for="stornierte" class="switch">
<input type="checkbox" id="stornierte">
<span class="slider round"></span>
</label>
<label for="stornierte">{|Zzgl. Papierkorb|}</label>
</li>
</ul>
</div>
</div>
<form action="index.php?module=versandpakete&action=stapelverarbeitung" id="frmauto" name="frmauto" method="post">
[TAB1]
<fieldset>
<table>
<legend>Stapelverarbeitung</legend>
<tr>
<tr><td>{|Status|}:</td><td><select name="status">[STATUS_OPTIONS]</select></td></tr>
<td><input type="checkbox" value="1" id="autoalle" />&nbsp;alle markieren&nbsp;</td><td><input type="submit" class="btnBlue" name="status_setzen" value="{|Status setzen|}" /></td>
</tr>
</table>
</fieldset>
</form>
[TAB1NEXT]
</div>
</div>
<script>
$('#autoalle').on('change',function(){
var wert = $(this).prop('checked');
$('#versandpakete_list').find('input[type="checkbox"]').prop('checked',wert);
$('#versandpakete_list').find('input[type="checkbox"]').first().trigger('change');
});
</script>
@@ -1,7 +1,11 @@
<!--
<table id="table[MD5]">
<tr><td>{|Lieferschein|}:</td><td><input type="checkbox" onchange="lsclick[MD5]();" id="beiback_lieferschein[MD5]" disabled value="1" [BEIPACK_LIEFERSCHEIN] /></td><td><span id="lsnr[MD5]">[LSNR]</span></td><td><input type="button" value="{|Belege &auml;ndern|}" style="cursor:hand;" onclick="editclick[MD5]();" /></td></tr>
<tr><td>{|Lieferschein|}:</td><td><input type="checkbox" onchange="lsclick[MD5]();" id="beiback_lieferschein[MD5]" disabled value="1" [BEIPACK_LIEFERSCHEIN] /></td><td><span id="lsnr[MD5]">[LSNR]</span></td>
<td><input type="button" value="{|Belege &auml;ndern|}" style="cursor:hand;" onclick="editclick[MD5]();" /></td>
</tr>
<tr><td>{|Rechnung|}:</td><td><input type="checkbox" onchange="reclick[MD5]();" id="beiback_rechnung[MD5]" disabled value="1" [BEIPACK_RECHNUNG] /></td><td><span id="renr[MD5]">[RENR]</span></td><td></td></tr>
</table>
-->
<table width="100%">
<tr><td width="100%">[ARTIKEL]</td></tr>
@@ -110,4 +114,4 @@ $(document).ready(function() {
});
});
</script>
</script>
@@ -12,10 +12,10 @@
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<div class="filter-box filter-usersave">
<div class="filter-block filter-inline">
<div class="filter-block filter-inline">
<fieldset>
<legend>{|Neuen Wareneingang erzeugen|}</legend>
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
+39 -16
View File
@@ -11,9 +11,7 @@
<input type="hidden" id="paketannahme_id" value="[ID]" />
[BEFORETAB1]
<div id="tabs-1">
[TAB1START]
[MESSAGE1]
<form action="" method="post">
<div class="row">
@@ -26,25 +24,50 @@
<tr><td>{|Lieferschein-Nr.|}:</td><td><input type=text size="40" name="lsnr" value=[LSNR]></td></tr>
<tr><td>{|Rechnung-Nr.|}:</td><td><input type=text size="40" name="renr" value=[RENR]></td></tr>
<tr><td>{|Bemerkung|}:</td><td><textarea rows="5" cols="40" name="bemerkung">[BEMERKUNG]</textarea></td></tr>
<tr><td><input type="submit" name="speichern" class="btnGreenNew" value="Speichern"></td>
[ISLIEFERANTSTART]
<tr><td>{|Ziellager|}:</td><td><input type=text size="40" name="ziellager" id="ziellager" value=[LAGER]><br><i>Wenn nicht angegeben, wird das Standardlager des Artikels bebucht.</i></td></tr>
[ISLIEFERANTENDE]
</table>
</fieldset>
</div>
</div>
<div class="col-xs-12 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Aktionen|}</legend>
[BUTTONS]
[BEFOREFRM]
[AFTERFRM]
[DISTRIINHALTBUTTONS]
<input type="submit" name="abschliessen" id="btnabschliessen" class="btnGreenNew" value="Paketinhalt ist erfasst">
[BEFOREMANUELLERFASSEN]
<input type="submit" name="manuellerfassen" class="btnBlueNew" value="Artikel manuell erfassen">
[AFTERMANUELLERFASSEN]
[BEFOREFRM]
[AFTERFRM]
<fieldset>
[BUTTONS]
[BEFOREFRM]
[AFTERFRM]
[DISTRIINHALTBUTTONS]
[BEFOREFRM]
[AFTERFRM]
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
[BEFOREMANUELLERFASSEN]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="manuellerfassen">{|Artikel manuell erfassen|}</button>
</td></tr>
[AFTERMANUELLERFASSEN]
[ISLIEFERANTSTART]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="fuellen">{|Aus Bestellungen f&uuml;llen|}</button>
</td></tr>
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="leeren">{|Leeren|}</button>
</td></tr>
[ISLIEFERANTENDE]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern">{|Speichern|}</button>
</td></tr>
[ISLIEFERANTSTART]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="buchen">{|Buchen|}</button>
</td></tr>
[ISLIEFERANTENDE]
<tr><td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="abschliessen">{|Abschlie&szlig;en|}</button>
</td></tr>
</table>
</fieldset>
</div>
</div>
@@ -54,7 +77,7 @@
<div class="row-height">
<div class="col-xs-12 col-md-10 col-md-height">
<div class="inside-white inside-full-height">
[TAB1]
[TAB1]
</div>
</div>
</div>
+1 -5
View File
@@ -97,11 +97,7 @@
<td>{|Sprache|}:</td>
<td><select name="sprachebevorzugen" id="sprachebevorzugen">[SPRACHEBEVORZUGEN]</select></td>
</tr>
<tr>
<td>{|Sprache und Region|}:</td>
<td><input type="text" name="locale" id="locale" value="[LOCALE]" size="40" disabled="disabled"></td>
</tr>
<tr>
<tr>
<td>{|Eigene Kalenderfarbe|}:</td>
<td><input type="text" name="defaultcolor" id="defaultcolor" value="[DEFAULTCOLOR]" size="80"></td>
<td></td>
+1 -1
View File
@@ -300,7 +300,7 @@ $width = array('10%'); // Fill out manually later
$result[0]['email'],
$result[0]['angezeigtername'],
'OpenXE ERP: Testmail',
'Dies ist eine Testmail für Account "'.$result[0]['email'].'".',
utf8_encode('Dies ist eine Testmail für Account "'.$result[0]['email'].'".'),
'',0,false,'','',
true
)
+1 -1
View File
@@ -609,7 +609,7 @@ class Exportbuchhaltung
$data['Soll-/Haben-Kennzeichen'] = $typ['kennzeichen_negativ']; // obligatory
}
$data['EU-Steuersatz (Bestimmung)'] = number_format($$tmpsteuersatz, 2, ',', '');
$data['EU-Steuersatz (Bestimmung)'] = number_format($tmpsteuersatz, 2, ',', '');
$data['WKZ Umsatz'] = $row['pos_waehrung'];
$data['Belegfeld 1'] = mb_strimwidth($row['belegnr'],0,12);
$data['Konto'] = $row['kundennummer']; // obligatory
+40 -1
View File
@@ -468,7 +468,8 @@ class Lieferschein extends GenLieferschein
AND v.aktiv = 1 AND v.ausprojekt = 0 AND v.modul != ''
ORDER BY v.projekt DESC LIMIT 1");
if (empty($result['modul']) || empty($result['id'])) {
$this->app->Tpl->addMessage('error', 'Bitte zuerst eine gültige Versandart auswählen', false, 'PAGE');
// $this->app->Tpl->addMessage('error', 'Bitte zuerst eine gültige Versandart auswählen', false, 'PAGE');
$this->app->Location->execute("index.php?module=versandpakete&action=add&lieferschein=".$id);
return;
}
$versandmodul = $this->app->erp->LoadVersandModul($result['modul'], $result['id']);
@@ -960,6 +961,7 @@ class Lieferschein extends GenLieferschein
$this->app->Tpl->Set('VERSANDART',$auftragArr[0]['versandart']);
/*
$tracking = $this->app->DB->SelectArr("SELECT
if(v.tracking_link IS NOT NULL AND v.tracking_link != '', CONCAT(UPPER(versandunternehmen), ':<a href=\"', v.tracking_link, '\">', v.tracking, '</a>'),
if(versandunternehmen = 'dhlexpress' AND l.land = 'DE' AND v.tracking != '', CONCAT(UPPER(versandunternehmen), ':<a href=\"https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?piececode=', v.tracking, '\" target=\"_blank\">', v.tracking, '</a>'),
@@ -1018,7 +1020,32 @@ class Lieferschein extends GenLieferschein
if (!is_null($tmp)) {
$this->app->Tpl->Set('TRACKING',implode(', ',$tmp));
}
*/
$sql = "SELECT SQL_CALC_FOUND_ROWS
v.id,
v.tracking as tracking,
v.tracking_link
FROM
versandpakete v
LEFT JOIN
versandpaket_lieferschein_position vlp ON v.id = vlp.versandpaket
LEFT JOIN
lieferschein_position lp ON lp.id = vlp.lieferschein_position
LEFT JOIN
lieferschein l ON lp.lieferschein = l.id
WHERE l.id = ".$id." OR v.lieferschein_ohne_pos = ".$id."
GROUP BY
v.id
";
$tracking = $this->app->DB->SelectArr($sql);
$tracking_list = array();
foreach ($tracking as $single_tracking) {
$tracking_list[] = '<a href="index.php?module=versandpakete&action=edit&id='.$single_tracking['id'].'">Paket Nr.'.$single_tracking['id'].'</a>'.
' ('.'<a href="'.$single_tracking['tracking_link'].'">'.$single_tracking['tracking'].'</a>'.')';
}
$this->app->Tpl->Set('TRACKING',implode('<br>',$tracking_list));
$returnOrders = (array)$this->app->DB->SelectArr(
sprintf(
@@ -2259,6 +2286,18 @@ class Lieferschein extends GenLieferschein
}
}
break;
case 'versanduebergabe':
if(!empty($selectedIds)) {
$this->app->DB->Update(
sprintf(
"UPDATE `lieferschein`
SET `versand_status` = 1
WHERE `id` IN (%s) AND `versand_status` = 0",
implode(',' , $selectedIds)
)
);
}
break;
}
}
}
+2 -1
View File
@@ -401,7 +401,8 @@ class Managementboard
/** @var Rechnungslauf $obj */
$obj = $this->app->erp->LoadModul('rechnungslauf');
if($obj){
$w[24] = $obj->RechnungslaufRechnungslauf(true);
// $w[24] = $obj->RechnungslaufRechnungslauf(true); // This does not exist, presumably old xentral function
$w[24] = 0;
}
else {
$w[24] = 0;
-56
View File
@@ -1,56 +0,0 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
class Paketmarke {
/** @var Application $app */
var $app;
/**
* Paketmarke constructor.
*
* @param Application $app
* @param bool $intern
*/
public function __construct($app, $intern = false) {
//parent::GenPaketmarke($app);
$this->app=$app;
if($intern) {
return;
}
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("create","PaketmarkeCreatePopup");
$this->app->ActionHandler("tracking","PaketmarkeTracking");
$this->app->ActionHandlerListen($app);
}
function PaketmarkeTracking()
{
$this->app->erp->Headlines('Paketmarken Drucker');
$this->app->Tpl->Set('PAGE',"Tracking-Nummer: <input type=\"text\" id=\"tracking\"><script type=\"text/javascript\">document.getElementById(\"tracking\").focus(); </script>");
//$this->app->BuildNavigation=false;
}
function PaketmarkeCreatePopup()
{
$this->app->erp->Headlines('Paketmarken Drucker');
$this->app->erp->PaketmarkeDHLEmbedded('PAGE','lieferschein');
}
}
+3 -1
View File
@@ -2727,6 +2727,8 @@ class Projekt extends GenProjekt {
if($oldProjectId > 0){
$this->createAdditionalInputForCopyProjects($oldProjectId,$check);
$msg = $this->app->erp->base64_url_encode("<div class=\"info\">Das Projekt wurde erfolgreich kopiert.</div>");
$this->app->Location->execute("index.php?module=projekt&action=uebersicht&id=$check&msg=$msg");
return;
}
$msg = $this->app->erp->base64_url_encode("<div class=\"info\">Das Projekt wurde erfolgreich angelegt.</div>");
@@ -2848,7 +2850,7 @@ class Projekt extends GenProjekt {
* @param int $copyProjectId
* @return bool
*/
public function createAdditionalInputForCopyProjects(int $oldProjectId, int $copyProjectId): bool
public function createAdditionalInputForCopyProjects(int $oldProjectId, int $copyProjectId)
{
$hasAdditionalInput = false;
$this->app->Tpl->Set('TOID',$copyProjectId);
+7 -3
View File
@@ -68,7 +68,7 @@ class Ticket {
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`,
CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',t.id,'\" />') AS `auswahl`";
$priobetreff = "if(t.prio!=1,t.betreff,CONCAT('<b><font color=red>',t.betreff,'</font></b>'))";
$priobetreff = "if(t.prio!=1,REGEXP_REPLACE(t.betreff, '<[^>]*>+', ''),CONCAT('<b><font color=red>',REGEXP_REPLACE(t.betreff, '<[^>]*>+', ''),'</font></b>'))"; //+ #20230916 XSS
$anzahlnachrichten = "(SELECT COUNT(n.id) FROM ticket_nachricht n WHERE n.ticket = t.schluessel)";
@@ -310,6 +310,8 @@ class Ticket {
// Add Messages now
foreach ($messages as $message) {
$message['betreff'] = strip_tags($message['betreff']); //+ #20230916 XSS
// Clear this first
$this->app->Tpl->Set('NACHRICHT_ANHANG',"");
@@ -622,6 +624,8 @@ class Ticket {
$ticket_from_db = $this->app->DB->SelectArr($sql)[0];
$ticket_from_db['betreff'] = htmlentities(strip_tags($ticket_from_db['betreff'])); //+ #20230916 XSS
foreach ($ticket_from_db as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
@@ -733,10 +737,10 @@ class Ticket {
if (!empty($recv_messages)) {
if (!str_starts_with(strtoupper($recv_messages[0]['betreff']),"RE:")) {
$betreff = "RE: ".$recv_messages[0]['betreff'];
$betreff = "RE: ".strip_tags($recv_messages[0]['betreff']); //+ #20230916 XSS
}
else {
$betreff = $recv_messages[0]['betreff'];
$betreff = strip_tags($recv_messages[0]['betreff']); //+ #20230916 XSS
}
$sql = "SELECT GROUP_CONCAT(DISTINCT `value` ORDER BY `value` SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = ".$recv_messages[0]['id']." AND `value` <> '".$senderAddress."' AND type='to'";
+11 -3
View File
@@ -56,6 +56,7 @@ class Versandarten {
// ab hier alle Action Handler definieren die das Modul hat
$this->app->ActionHandler("create", "VersandartenCreate");
$this->app->ActionHandler("neusonstige", "VersandartenNeuSonstige");
$this->app->ActionHandler("edit", "VersandartenEdit");
$this->app->ActionHandler("list", "VersandartenList");
$this->app->ActionHandler("delete", "VersandartenDelete");
@@ -153,6 +154,13 @@ class Versandarten {
return $erg;
}
public function VersandartenNeuSonstige() {
$sql = "INSERT INTO versandarten (aktiv) VALUES (1)";
$this->app->DB->Insert($sql);
$id = $this->app->DB->GetInsertID();
$this->app->Location->execute('index.php?module=versandarten&action=edit&id='.$id);
}
/** @noinspection PhpUnused */
public function VersandartenEdit(): void
{
@@ -169,8 +177,8 @@ class Versandarten {
if($submit != '') { // handle form submit
$form = $this->GetInput();
$obj = $this->loadModule($form['modul'], $id);
if ($obj === null)
$error[] = sprintf('Versandart "%s" existiert nicht.', $form['selmodul']);
/* if ($obj === null)
$error[] = sprintf('Versandart "%s" existiert nicht.', $form['selmodul']); */
if(trim($form['bezeichnung']) == '')
$error[] = 'Bitte eine Bezeichnung angeben!';
@@ -834,4 +842,4 @@ class Versandarten {
return $result;
}
}
}
File diff suppressed because it is too large Load Diff
+2387 -2358
View File
File diff suppressed because it is too large Load Diff
-7
View File
@@ -1711,13 +1711,6 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
$this->app->Tpl->Set('STARTSEITE', $settings['startseite']);
$this->app->Tpl->Set('DEFAULTCOLOR', $settings['defaultcolor']);
$this->app->Tpl->Set('SPRACHEBEVORZUGEN', $this->languageSelectOptions($settings['sprachebevorzugen']));
/** @var \Xentral\Components\I18n\Localization $localization */
if($localization=$this->app->Container->get('Localization')) {
$this->app->Tpl->Set('LOCALE', $localization->getLocale());
} else {
$this->app->Tpl->Set('LOCALE', 'Fehler!');
}
if($settings['chat_popup']){
$this->app->Tpl->Set('CHAT_POPUP', ' checked="checked" ');
-34
View File
@@ -1,37 +1,3 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../themes/new/fonts/Inter-Regular.woff2?v=3.13') format("woff2"),
url('../themes/new/fonts/Inter-Regular.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('../themes/new/fonts/Inter-Italic.woff2?v=3.13') format("woff2"),
url('../themes/new/fonts/Inter-Italic.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('../themes/new/fonts/Inter-Bold.woff2?v=3.13') format("woff2"),
url('../themes/new/fonts/Inter-Bold.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('../themes/new/fonts/Inter-BoldItalic.woff2?v=3.13') format("woff2"),
url('../themes/new/fonts/Inter-BoldItalic.woff?v=3.13') format("woff");
}
body {
font-size: 16px;
font-family: 'Inter', Arial, Helvetica, sans-serif;
+2 -1
View File
@@ -64,5 +64,6 @@
--error: #F05A5C;
--error-color: #fff;
--important: #68D4D0;
--success: #92EFB4;
/* --success: #92EFB4;*/
--success: #2DCA73;
}
-35
View File
@@ -1,38 +1,3 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../themes/new/fonts/Inter-Regular.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Regular.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('../themes/new/fonts/Inter-Italic.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Italic.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('../fonts/Inter-Bold.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Bold.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('../fonts/Inter-BoldItalic.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-BoldItalic.woff?v=3.13') format("woff");
}
html {
box-sizing: border-box;
}
-36
View File
@@ -1,39 +1,3 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../fonts/Inter-Regular.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Regular.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('../fonts/Inter-Italic.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Italic.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('../fonts/Inter-Bold.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Bold.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('../themes/new/fonts/Inter-BoldItalic.woff2?v=3.13') format("woff2"),
url('../themes/new/fonts/Inter-BoldItalic.woff?v=3.13') format("woff");
}
html {
box-sizing: border-box;
}
+10 -72
View File
@@ -1,71 +1,3 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../fonts/Inter-Regular.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Regular.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url('../fonts/Inter-Italic.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Italic.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("../fonts/Inter-Medium.woff2?v=3.13") format("woff2"),
url("../fonts/Inter-Medium.woff?v=3.13") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url("../fonts/Inter-MediumItalic.woff2?v=3.13") format("woff2"),
url("../fonts/Inter-MediumItalic.woff?v=3.13") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("../fonts/Inter-SemiBold.woff2?v=3.13") format("woff2"),
url("../fonts/Inter-SemiBold.woff?v=3.13") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url("../fonts/Inter-SemiBoldItalic.woff2?v=3.13") format("woff2"),
url("../fonts/Inter-SemiBoldItalic.woff?v=3.13") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('../fonts/Inter-Bold.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-Bold.woff?v=3.13') format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url('../fonts/Inter-BoldItalic.woff2?v=3.13') format("woff2"),
url('../fonts/Inter-BoldItalic.woff?v=3.13') format("woff");
}
body {
font-size: 12px;
font-family: 'Inter', Arial, Helvetica, sans-serif;
@@ -3029,7 +2961,6 @@ div.error > input[type=submit] {
}
.info,
.success,
.error2 {
background-color: var(--info);
color: var(--info-color);
@@ -3044,6 +2975,14 @@ div.error > input[type=submit] {
background-size: 30px 30px;
}
.success {
background-color: var(--success);
color: var(--info-color);
background-image: url('../images/info.png');
background-size: 30px 30px;
}
.pull-right {
float: right !important;
}
@@ -3108,7 +3047,7 @@ div.error > input[type=submit] {
#header div.headererror > input {
padding: 5px;
margin: 3px;
background-color: var(--info);
background-color: var(--success);
color: var(--info-color);
}
@@ -3724,9 +3663,8 @@ a.ui-tabs-anchor:hover {
.greybox {
background-color: lightgrey;
color: white;
padding: 10px;
font-size: 1.8em;
font-size: 1.2em;
text-align: right;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,6 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.06267 11.2331H4.76674C4.5067 11.2331 4.2959 11.4439 4.2959 11.7039V14.529C4.2959 14.7891 4.5067 14.9999 4.76674 14.9999H7.59182C7.85186 14.9999 8.06267 14.7891 8.06267 14.529V11.2331Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3584 11.2331H8.0625V14.529C8.0625 14.7891 8.27331 14.9999 8.53335 14.9999H11.3584C11.6185 14.9999 11.8293 14.7891 11.8293 14.529V11.7039C11.8293 11.4439 11.6185 11.2331 11.3584 11.2331Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.47512 7.46631H6.65005C6.39 7.46631 6.1792 7.67711 6.1792 7.93716V11.2331H9.94597V7.93716C9.94597 7.67711 9.73517 7.46631 9.47512 7.46631Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15.1254 15V5.2064C15.1255 4.85853 14.9339 4.53892 14.6269 4.37519L8.50592 1.11066C8.22908 0.963114 7.89694 0.963114 7.6201 1.11066L1.4991 4.37519C1.19193 4.53876 1 4.85839 1 5.2064V15" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

+309 -305
View File
@@ -1,308 +1,312 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
class WidgetGenauftrag_position
{
private $app; //application object
public $form; //store form object
protected $parsetarget; //target for content
public function __construct($app,$parsetarget)
{
$this->app = $app;
$this->parsetarget = $parsetarget;
$this->Form();
}
public function auftrag_positionDelete()
{
$this->form->Execute("auftrag_position","delete");
$this->auftrag_positionList();
}
function Edit()
{
$this->form->Edit();
}
function Copy()
{
$this->form->Copy();
}
public function Create()
{
$this->form->Create();
}
public function Search()
{
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
}
public function Summary()
{
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
}
function Form()
{
$this->form = $this->app->FormHandler->CreateNew("auftrag_position");
$this->form->UseTable("auftrag_position");
$this->form->UseTemplate("auftrag_position.tpl",$this->parsetarget);
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLTextarea("beschreibung",8,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("menge","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE");
$field = new HTMLInput("preis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("formelmenge",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLTextarea("formelpreis",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ohnepreis","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ausblenden_im_pdf","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("waehrung","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0");
$field->AddOption('Standard','');
$field->AddOption('Erm&auml;&szlig;igt','ermaessigt');
$field->AddOption('Befreit','befreit');
$this->form->NewField($field);
$field = new HTMLCheckbox("anderersteuersatz","","","","0","0");
$this->form->NewField($field);
$field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("steuertext",3,50,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("grundrabatt","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt1","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt2","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt3","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt4","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt5","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("rabatt","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("einheit","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vpe","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("lieferdatumkw","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelnummerkunde","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("zolltarifnummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("herkunftsland","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("punkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bonuspunkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("mlmdirektpraemie","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("erloese","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("erloesefestschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLTextarea("bemerkung",3,40,"","","","","0");
$this->form->NewField($field);
}
}
?>
<?php
class WidgetGenauftrag_position
{
private $app; //application object
public $form; //store form object
protected $parsetarget; //target for content
public function __construct($app,$parsetarget)
{
$this->app = $app;
$this->parsetarget = $parsetarget;
$this->Form();
}
public function auftrag_positionDelete()
{
$this->form->Execute("auftrag_position","delete");
$this->auftrag_positionList();
}
function Edit()
{
$this->form->Edit();
}
function Copy()
{
$this->form->Copy();
}
public function Create()
{
$this->form->Create();
}
public function Search()
{
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
}
public function Summary()
{
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
}
function Form()
{
$this->form = $this->app->FormHandler->CreateNew("auftrag_position");
$this->form->UseTable("auftrag_position");
$this->form->UseTemplate("auftrag_position.tpl",$this->parsetarget);
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLTextarea("beschreibung",8,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("menge","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE");
$field = new HTMLInput("preis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("formelmenge",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLTextarea("formelpreis",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ohnepreis","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ausblenden_im_pdf","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("waehrung","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0");
$field->AddOption('Standard','');
$field->AddOption('Erm&auml;&szlig;igt','ermaessigt');
$field->AddOption('Befreit','befreit');
$this->form->NewField($field);
$field = new HTMLCheckbox("anderersteuersatz","","","","0","0");
$this->form->NewField($field);
$field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("steuertext",3,50,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("grundrabatt","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt1","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt2","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt3","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt4","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt5","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("rabatt","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("einheit","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vpe","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("lieferdatumkw","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelnummerkunde","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("zolltarifnummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("herkunftsland","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("punkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bonuspunkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("mlmdirektpraemie","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("erloese","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("erloesefestschreiben","","","1","0","0");
$this->form->NewField($field);
if ($this->app->erp->RechteVorhanden('auftrag','einkaufspreise')) {
$field = new HTMLInput("einkaufspreis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
}
$field = new HTMLTextarea("bemerkung",3,40,"","","","","0");
$this->form->NewField($field);
}
}
?>

Some files were not shown because too many files have changed in this diff Show More