47 Commits
Author SHA1 Message Date
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
OpenXE a9f3292f8f Bugfix thousand separator and rounding in stueckliste 2023-08-10 21:38:09 +02:00
OpenXE-ERP ac723e9fda Merge pull request #92 from RETROTEC-AG/pr/Positions-Menge_wird_immer_auf_1_aufgerundet
positions menge wird immer auf 1 aufgerundet bzw gerundet
2023-08-10 10:31:33 +02:00
OpenXE 5408f197fd improved date format conversion with exception on ticket import with wrongly specified date 2023-08-07 14:57:45 +02:00
OpenXE c0a9156f0e Bugfix MysqlCopyRow NULL values are converted to empty string 2023-08-07 13:12:57 +02:00
Roland Rusch fd0a5a5d4c #8 Positions-Menge wird immer auf 1 aufgerundet 2023-08-04 15:16:05 +02:00
Roland Rusch 1daf876976 #8 Positions-Menge wird immer auf 1 aufgerundet 2023-08-04 15:16:05 +02:00
Roland Rusch 7a29151bdd #8 Positions-Menge wird immer auf 1 aufgerundet 2023-08-04 14:08:31 +02:00
OpenXE 623b041a5f bugfix mustal use correct syntax for BTREE and HASH key types 2023-08-03 14:43:52 +02:00
OpenXE 6242024451 Bugfix ticket system filter for spam 2023-08-03 12:01:23 +02:00
OpenXE 0262c31e93 Added ticketregel from ticket button 2023-08-02 14:25:38 +02:00
OpenXE-ERP 5557c54fd6 Merge pull request #89 from exciler/prestashop-improve-import
Prestashop improve import
2023-07-27 10:56:14 +02:00
Andreas Palm 7df897d9d7 Prestashop: import meta infos 2023-07-26 18:47:44 +02:00
Andreas Palm 1a94af6b0b Prestashop: import support combinations 2023-07-26 15:26:01 +02:00
Andreas Palm fa4125d63b Prestashop: strip html tags from short description 2023-07-26 12:38:41 +02:00
OpenXE ac0048c788 removed duplicate column in db_schema 2023-07-25 12:00:00 +02:00
OpenXE-ERP f430b7f5ac Merge pull request #83 from RETROTEC-AG/pr/#9_.htaccess-verbietet-den-Download-der-woff,-woff2-und-js.map-files
.htaccess verbietet den Download der woff, woff2 und js.map files
2023-07-25 11:54:26 +02:00
OpenXE-ERP 83e739d378 Merge pull request #87 from rrusch/missing_$_in_adresse.php
Add missing $
2023-07-25 11:50:42 +02:00
Roland Rusch a32c201a91 Add missing $ 2023-07-25 11:29:26 +02:00
Andreas Palm cb2b75a3ca Prestashop: Improve article import 2023-07-25 00:05:17 +02:00
OpenXE 1f27f9a5f5 bugfixes shopimporter_shopify 2023-07-22 13:14:43 +02:00
Roland Rusch 81e2cdb222 #9 .htaccess verbietet den Download der woff, woff2 und js.map files 2023-07-19 21:25:31 +02:00
Roland Rusch 5b49171a74 Update .htaccess 2023-07-19 20:51:31 +02:00
OpenXE-ERP 869c888947 Merge pull request #86 from RETROTEC-AG/pr/#7_Shopify-interface-does-not-work
shopify interface does not work
2023-07-19 18:13:17 +02:00
OpenXE-ERP 322ca715eb Merge pull request #85 from RETROTEC-AG/feature/#12_Logfile-addLogFile-does-not-escape-the-given-parameters
Logfile::addLogFile() does not escape the given parameters
2023-07-19 18:11:20 +02:00
Roland Rusch ab4e9f001e #7 Shopify interface does not work 2023-07-19 17:54:59 +02:00
Roland Rusch 51b70aed0d #7 Shopify interface does not work 2023-07-19 17:54:59 +02:00
Roland Rusch 08579804a8 #7 Shopify interface does not work 2023-07-19 17:54:58 +02:00
Roland Rusch 64241842f6 #7 Shopify interface does not work 2023-07-19 17:54:58 +02:00
OpenXE-ERP f5c61ca6eb Merge pull request #81 from RETROTEC-AG/feature/#1_OpenXE-does-not-run-on-Windows
Error Service "SystemConfigModule" was not found when run on windows
2023-07-19 16:47:24 +02:00
OpenXE-ERP aa32bd1276 Merge pull request #84 from RETROTEC-AG/pr/#5_Syntax-error-in-SQL-when-creating-new-address
Syntax error in SQL when creating new address
2023-07-19 16:43:29 +02:00
Roland Rusch e6960f0030 #12 Logfile::addLogFile() does not escape the given parameters 2023-07-19 15:31:09 +02:00
Roland Rusch b02da95c2f #12 Logfile::addLogFile() does not escape the given parameters 2023-07-19 15:18:04 +02:00
Roland Rusch 9994f8c18d #12 Logfile::addLogFile() does not escape the given parameters 2023-07-19 15:14:18 +02:00
Roland Rusch ce5f359a75 #5 Syntax error in SQL when creating new address 2023-07-19 14:58:28 +02:00
Roland Rusch 57e398e7d4 #9 .htaccess verbietet den Download der woff, woff2 und js.map files 2023-07-19 14:43:46 +02:00
Roland Rusch ca5e5c52a1 #1 OpenXE does not run on Windows 2023-07-14 08:53:01 +02:00
Roland Rusch 6f5272717f #1 OpenXE does not run on Windows 2023-07-13 20:24:16 +02:00
55 changed files with 2684 additions and 2721 deletions
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace Xentral\Components\MailClient\Data;
use DateTime;
use DateTimeImmutable;
use DateTimeInterface;
use JsonSerializable;
use Throwable;
@@ -307,11 +308,13 @@ final class MailMessageData implements MailMessageInterface, JsonSerializable
if ($date === null) {
return null;
}
$dateTime = date_create($date->getValue());
/* $dateTime = date_create($date->getValue());
if ($dateTime === false) {
throw new InvalidArgumentException('Invalid date: '.$date->getValue());
return null;
}
}*/
$dateTime = new DateTimeImmutable($date->getValue());
return $dateTime;
}
@@ -35,7 +35,7 @@ final class Psr4ClassNameResolver
{
// Normalize inputs
$prefix = trim($prefix, '\\') . '\\';
$baseDir = rtrim($baseDir, '/') . '/';
$baseDir = rtrim($baseDir, '/\\') . DIRECTORY_SEPARATOR;
$this->prefixes[$prefix] = $baseDir;
}
@@ -408,9 +408,6 @@ class TicketImportHelper
$this->logger->error('Failed to insert ticket message into db', ['exception' => $e]);
}
$this->applyTicketRules($messageId);
return($result);
}
@@ -440,7 +437,7 @@ class TicketImportHelper
foreach ($ruleArray as $rule) {
$this->logger->debug('ticket rule applies',['rule_id' => $rule['id']]);
$this->logger->debug('ticket rule applies',['rule_id' => $rule['id'],'rule' => print_r($rule,true)]);
/*
$update = $this->db->update();
@@ -461,12 +458,16 @@ class TicketImportHelper
$this->db->perform($sql, ['ticket_id' => $ticketId]);
*/
if ($rule['is_spam'] === 1) {
$sql = "UPDATE `ticket_nachricht` SET `status` = \'spam\' WHERE `id` = '".$ticketMessageId."'";
$this->db->Update($sql);
if ($rule['is_spam'] == 1) {
$status = 'spam';
} else {
$status = 'neu';
}
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."', `warteschlange` = '".$rule['queue_id']."' WHERE `id` = '".$ticketId."'";
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."', `warteschlange` = '".$rule['queue_id']."', `status` = '".$status."' WHERE `id` = '".$ticketId."'";
$this->logger->debug('ticket rule sql',['sql' => $sql]);
$this->db->Update($sql);
}
}
@@ -699,6 +700,12 @@ class TicketImportHelper
$from
);
// Only for new tickets: apply filter rules
if (!$ticketexists) {
$this->applyTicketRules($ticketnachricht);
}
if ($ticketnachricht > 0 && $emailbackup_mails_id > 0) {
$this->db->Update(
"UPDATE `emailbackup_mails`
+2 -2
View File
@@ -30,10 +30,10 @@ $factoryServiceMap = @include $serviceCacheFile;
if (!is_file($serviceCacheFile)) {
// Installer ausführen wenn ServiceMap nicht vorhanden ist
// Installer ausführen, wenn ServiceMap nicht vorhanden ist
$resolver = new Psr4ClassNameResolver();
$resolver->addNamespace('Xentral\\', __DIR__);
$resolver->excludeFile(__DIR__ . '/bootstrap.php');
$resolver->excludeFile(__DIR__ . DIRECTORY_SEPARATOR . 'bootstrap.php');
$generator = new ClassMapGenerator($resolver, __DIR__);
$installer = new Installer($generator, $resolver);
+1 -1
View File
@@ -1252,7 +1252,7 @@ Options -Indexes
# Deny access to all *.php
Order deny,allow
Allow from all
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map)$">
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map|js.map)$">
Order Allow,Deny
Allow from all
</FilesMatch>
+18 -1
View File
@@ -1424,7 +1424,7 @@ class DB{
if(empty($TableName) || empty($IDFieldName) || empty($IDToDuplicate)) {
return null;
}
/*
$sql = "SELECT * FROM $TableName WHERE $IDFieldName = $IDToDuplicate";
$result = @mysqli_query($this->connection,$sql);
if(empty($result)) {
@@ -1442,6 +1442,23 @@ class DB{
}
$sql .= $RowKeys[$i] . " = '" . $this->real_escape_string($RowValues[$i]) . "'";
}
@mysqli_query($this->connection,$sql);
*/
$sql = "INSERT INTO ".$TableName." SELECT ";
$fields = $this->GetColAssocArray($TableName);
$comma = "";
foreach ($fields as $field => $value) {
if ($field != $IDFieldName) {
$sql .= $comma."`".$field."`";
} else {
$sql .= "NULL";
}
$comma = ", ";
}
$sql .= " FROM ".$TableName." WHERE id = ".$IDToDuplicate;
@mysqli_query($this->connection,$sql);
$id = $this->GetInsertID();
+7 -10
View File
@@ -1542,7 +1542,7 @@ class YUI {
if(!empty($positionsIds)) {
$positions = $this->app->DB->SelectArr(
sprintf(
"SELECT b.id, %s AS `preis`, round(b.menge) as menge
"SELECT b.id, %s AS `preis`, trim(b.menge)+0 as menge
FROM `%s` AS `b`
%s
WHERE b.`%s` = %d AND b.id IN (%s)",
@@ -2581,7 +2581,7 @@ class YUI {
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, round(b.menge) as menge, ".$this->FormatPreis($preiscell)." as preis,b.waehrung, ".$this->FormatPreis('b.rabatt')." as rabatt, ";
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis($preiscell)." as preis,b.waehrung, ".$this->FormatPreis('b.rabatt')." as rabatt, ";
$sql .= "b.id as id
@@ -2601,7 +2601,7 @@ class YUI {
as Artikel,
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, round(b.menge) as menge, if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert, b.id as id
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert, b.id as id
FROM $table b
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
WHERE b.$module='$id'";
@@ -2656,7 +2656,7 @@ class YUI {
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum,
round(b.menge) as menge,
trim(b.menge)+0 as menge,
if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert,
if(b.menge_eingang, ".$this->app->erp->FormatMenge('b.menge_eingang')." ,'-') as `Eingang`,
if(b.menge_gutschrift, ".$this->app->erp->FormatMenge('b.menge_gutschrift')." ,'-') as `Menge Gutschrift`,
@@ -2678,7 +2678,7 @@ class YUI {
as Artikel,
p.abkuerzung as projekt, b.nummer as nummer, round(b.menge) as menge,
p.abkuerzung as projekt, b.nummer as nummer, trim(b.menge)+0 as menge,
".$this->FormatPreis(' b.preis')." as preis,
b.id as id
@@ -2695,7 +2695,7 @@ class YUI {
as Artikel,
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(b.lieferdatum,'%d.%m.%Y') as lieferdatum, round(b.menge) as menge,
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(b.lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge,
b.id as id
FROM $table b
@@ -2717,7 +2717,7 @@ class YUI {
if(CHAR_LENGTH(b.bezeichnunglieferant)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnunglieferant,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnunglieferant,' *')),
if(CHAR_LENGTH(b.bezeichnunglieferant)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnunglieferant,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnunglieferant)))
as Artikel,
p.abkuerzung as projekt, a.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, round(b.menge) as menge, ".$this->FormatPreis(' b.preis')." as preis, b.waehrung, b.id as id
p.abkuerzung as projekt, a.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis(' b.preis')." as preis, b.waehrung, b.id as id
FROM $table b
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
WHERE b.$module='$id'";
@@ -12108,9 +12108,6 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
</tr>
</tfoot>
</table></div>
<br>
<br>
<br>
');
if((empty($disableautosavefilter)) && $this->anzusersaves < 2) {
+22
View File
@@ -64785,6 +64785,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": [
@@ -99553,6 +99564,17 @@
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "getestet",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "bearbeiter",
"Type": "varchar(32)",
+3
View File
@@ -365,6 +365,9 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
foreach ($compare_differences as $compare_difference) {
$comma = "";
foreach ($compare_difference as $key => $value) {
if (is_array($value)) {
$value = implode(',',$value);
}
echo_out($comma."$key => [$value]");
$comma = ", ";
}
+21 -15
View File
@@ -67,6 +67,7 @@ $mustal_replacers = [
['on update current_timestamp','on update current_timestamp()']
];
// Load all db_def from a DB connection into a db_def array
function mustal_load_tables_from_db(string $host, string $schema, string $user, string $passwd, array $replacers) : array {
@@ -358,8 +359,6 @@ function mustal_compare_table_array(array $nominal, string $nominal_name, array
$compare_difference['table'] = $database_table['name'];
$compare_difference['key'] = $sql_index['Key_name'];
$compare_difference['property'] = $key;
/* $compare_difference[$nominal_name] = implode(',',$value);
$compare_difference[$actual_name] = implode(',',$found_sql_index[$key]);*/
$compare_difference[$nominal_name] = $value;
$compare_difference[$actual_name] = $found_sql_index[$key];
$compare_differences[] = $compare_difference;
@@ -585,14 +584,7 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
if ($key['Key_name'] == 'PRIMARY') {
$keystring = "PRIMARY KEY ";
} else {
// if(array_key_exists('Index_type', $key)) {
// $index_type = $key['Index_type'];
// } else {
$index_type = "";
// }
$keystring = $index_type." ".$key['Non_unique']." KEY `".$key['Key_name']."` ";
$keystring = mustal_key_type(" ".$key['Non_unique']." KEY `".$key['Key_name']."` ",$key['Index_type']);
}
$sql .= $comma.$keystring."(`".implode("`,`",$key['columns'])."`) ";
}
@@ -675,10 +667,7 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
if ($key_key !== false) {
$key = $table['keys'][$key_key];
$sql = "ALTER TABLE `$table_name` ADD ".$key['Non_unique']." KEY `".$key_name."` ";
$sql .= "(`".implode("`,`",$key['columns'])."`)";
$sql .= ";";
$sql = "ALTER TABLE `$table_name` ADD ".mustal_key_type(" ".$key['Non_unique']." KEY `".$key['Key_name']."` "."(`".implode("`,`",$key['columns'])."`)",$key['Index_type']).";";
$upgrade_sql[] = $sql;
}
else {
@@ -706,7 +695,7 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
$sql = "ALTER TABLE `$table_name` DROP KEY `".$key_name."`;";
$upgrade_sql[] = $sql;
$sql = "ALTER TABLE `$table_name` ADD ".$key['Non_unique']." KEY `".$key_name."` ";
$sql = "ALTER TABLE `$table_name` ADD ".mustal_key_type(" ".$key['Non_unique']." KEY `".$key['Key_name']."` ",$key['Index_type']);
$sql .= "(`".implode("`,`",$key['columns'])."`)";
$sql .= ";";
$upgrade_sql[] = $sql;
@@ -781,3 +770,20 @@ function mustal_is_string_type(string $type) {
return(false);
}
// create correct index type syntax
function mustal_key_type(string $key_definition_string, string $key_type) {
// Key types with using syntax
$mustal_key_types_using_mapping = [
'BTREE',
'HASH'
];
if (in_array($key_type,$mustal_key_types_using_mapping)) {
return ($key_definition_string." USING ".$key_type);
} else {
return ($key_type." ".$key_definition_string);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ Options -Indexes
# Deny access to all *.php
Order deny,allow
Allow from all
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map)$">
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map|js.map)$">
Order Allow,Deny
Allow from all
</FilesMatch>
+1 -1
View File
@@ -26040,7 +26040,7 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
$this->app->Tpl->Set('DRUCKER', $this->GetSelectDrucker($selected));
}
$this->app->Tpl->Set('FAX',$this->GetSelectFax());
$this->app->Tpl->Set('EMAILEMPFAENGER',$this->GetSelectEmail());
$this->app->Tpl->Set('EMAILEMPFAENGER',$this->GetSelectEmail($this->Firmendaten("email")));
$projektabkuerzung = $this->app->DB->Select("SELECT abkuerzung FROM projekt WHERE id='$projekt'");
$this->app->Tpl->Set('PROJEKT',$projektabkuerzung);
//$this->app->Tpl->Set(PROJEKT,$this->GetProjektSelect($projekt));
+12 -3
View File
@@ -559,7 +559,7 @@ class Remote
$steuersatz_normal = 19;
}
$crossellingInstalled = $this->app->erp->ModulVorhanden('crossselling');
foreach($reta as $k => $ret)
foreach($reta as $k => $ret)
{
if(isset($ret['stueckliste'])){
$stuecklistenmechanik = $ret['stueckliste'];
@@ -631,8 +631,17 @@ class Remote
}
$arr['projekt'] = $shopexportArr['projekt'];
$arr['name_de'] = $ret['name'];
$arr['uebersicht_de'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:'';
$arr['kurztext_de'] = isset($ret['kurztext_de'])?$ret['kurztext_de']:'';
$arr['uebersicht_de'] = $ret['uebersicht_de'] ?? '';
$arr['kurztext_de'] = $ret['kurztext_de'] ?? '';
$arr['name_en'] = $ret['name_en'];
$arr['uebersicht_en'] = $ret['uebersicht_en'] ?? '';
$arr['kurztext_en'] = $ret['kurztext_en'] ?? '';
$arr['metakeywords_de'] = $ret['metakeywords_de'] ?? '';
$arr['metakeywords_en'] = $ret['metakeywords_en'] ?? '';
$arr['metatitle_de'] = $ret['metatitle_de'] ?? '';
$arr['metatitle_en'] = $ret['metatitle_en'] ?? '';
$arr['metadescription_de'] = $ret['metadescription_de'] ?? '';
$arr['metadescription_en'] = $ret['metadescription_en'] ?? '';
//$arr['anabregs_text'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:'';
if(isset($ret['ean']) && $ret['ean'] != '')
{
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -2054,7 +2054,7 @@ $table_kontakte = '';
$ckontakte = !empty($kontakte)?count($kontakte):0;
for($i=0;$i<$ckontakte;$i++)
{
$tabindex = $tabindex+i;
$tabindex = $tabindex+$i;
$table_kontakte .= "<tr><td>".$kontakte[$i]['bezeichnung'].":&nbsp;
</td><td><input type=text name=\"adresse_kontakte[".$kontakte[$i]['id']."]\" value=\"".$kontakte[$i]['kontakt']."\" size=\"30\" tabindex=\"$tabindex\">&nbsp;<a href=\"#\" onclick=\"if(!confirm('".$kontakte[$i]['bezeichnung']." wirklich entfernen?')) return false; else window.location.href='index.php?module=adresse&action=delkontakt&id=".$id."&lid=".$kontakte[$i]['id']."';\">x</a></td></tr>";
}
+5 -5
View File
@@ -932,14 +932,14 @@ class Artikel extends GenArtikel {
$alignright = array(3,5,6);
// SQL statement
$sql = "SELECT SQL_CALC_FOUND_ROWS
$sql = "SELECT SQL_CALC_FOUND_ROWS
s.id,
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.name_de,'</a>&nbsp;',
IF(s.art='it','<br><i style=color:#999>- Informationsteil/Dienstleistung</i>',''),IF(s.art='bt','<br><i style=color:#999>- Beistellung</i>',''), COALESCE((SELECT GROUP_CONCAT('<br><i style=color:#999>- ', art.nummer, ' ', art.name_de, ' (', alt.reason, ')', '</i>' SEPARATOR '') FROM parts_list_alternative AS alt INNER JOIN artikel AS art ON art.id = alt.alternative_article_id WHERE alt.parts_list_id = s.id), '')) as artikel,
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.nummer,'</a>') as nummer,
CONCAT('<a href=\"index.php?module=artikel&action=edit&id=',a.id,'\" target=\"_blank\">',a.nummer,'</a>') as nummer,
s.referenz,
".$this->app->erp->FormatMenge('s.menge').' as menge, a.einheit,
'.$this->app->erp->FormatMenge('ifnull(lag.menge,0)').' as lager,
trim(s.menge)+0 as menge, a.einheit,
".$this->app->erp->FormatMenge('ifnull(lag.menge,0)').' as lager,
CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0
THEN (SELECT '.$this->app->erp->FormatMenge('SUM(lr.menge)')." FROM lager_reserviert lr WHERE lr.artikel=a.id)
ELSE 0
@@ -6321,7 +6321,7 @@ class Artikel extends GenArtikel {
$id = (int)$this->app->Secure->GetPOST('id');
$data = $this->app->DB->SelectRow('SELECT s.id, s.artikel, '.$this->app->erp->FormatMenge("s.menge")." as menge, s.art, s.referenz, s.layer, s.place, s.wert, s.bauform, s.zachse, s.xpos, s.ypos FROM stueckliste s WHERE s.id = '$id' LIMIT 1");
$data = $this->app->DB->SelectRow("SELECT s.id, s.artikel, trim(s.menge)+0 as menge, s.art, s.referenz, s.layer, s.place, s.wert, s.bauform, s.zachse, s.xpos, s.ypos FROM stueckliste s WHERE s.id = '$id' LIMIT 1");
if($data){
if($data['artikel'] == 0){
+2 -2
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]" size="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>
@@ -49,6 +49,7 @@
<legend>{|Aktionen|}</legend>
<td><button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button></td></tr>
<td><button name="submit" value="neue_email" class="ui-button-icon" style="width:100%;">Neue E-Mail</button></td></tr>
<td><button name="submit" formaction="index.php?module=ticketregeln&action=create" value="regel" class="ui-button-icon" style="width:100%;">Ticketregel erstellen</button><input hidden type="text" name="ticketid" value="[ID]"></td></tr>
</table>
</fieldset>
</div>
@@ -61,4 +62,3 @@
</div>
</div>
+7 -32
View File
@@ -17,50 +17,25 @@
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Ticketregeln|}</legend><i>Ticketregeln f&uuml; die Verarbeitung bei Ticketeingang. Platzhalter werden mit % angegeben.</i>
<legend>{|Ticketregeln|}</legend><i>Ticketregeln f&uuml;r die Verarbeitung bei Ticketeingang. Platzhalter werden mit % angegeben.</i>
<table width="100%" border="0" class="mkTableFormular">
<tr><td>{|E-Mail Empf&auml;nger|}:</td><td><input type="text" name="empfaenger_email" value="[EMPFAENGER_EMAIL]" size="40"></td></tr>
<tr><td>{|E-Mail Verfasser|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
<tr><td>{|Verfasser Name|}:</td><td><input type="text" name="name" value="[NAME]" size="40"></td></tr>
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" value="[BETREFF]" size="40"></td></tr>
<tr><td>{|Papierkorb|}:</td><td><input type="text" name="spam" value="[SPAM]" size="40"></td></tr>
<tr><td>{|Pers&ouml;nlich|}:</td><td><input type="text" name="persoenlich" value="[PERSOENLICH]" size="40"></td></tr>
<tr><td>{|Prio|}:</td><td><input type="text" name="prio" value="[PRIO]" size="40"></td></tr>
<tr><td>{|DSGVO|}:</td><td><input type="text" name="dsgvo" value="[DSGVO]" size="40"></td></tr>
<tr><td>{|Papierkorb|}:</td><td><input type="checkbox" name="spam" value="1" [SPAM] size="40"></td></tr>
<tr><td>{|Pers&ouml;nlich|}:</td><td><input type="checkbox" name="persoenlich" value="1" [PERSOENLICH] size="40"></td></tr>
<tr><td>{|Prio|}:</td><td><input type="checkbox" name="prio" value="1" [PRIO] size="40"></td></tr>
<tr><td>{|DSGVO|}:</td><td><input type="checkbox" name="dsgvo" value="1" [DSGVO] size="40"></td></tr>
<tr><td>{|Verantwortliche Warteschlange|}:</td><td><input type="text" name="warteschlange" id="warteschlange" value="[WARTESCHLANGE]" size="40"></td></tr>
<tr><td>{|Aktiv|}:</td><td><input type="text" name="aktiv" value="[AKTIV]" size="40"></td></tr>
<tr><td>{|Aktiv|}:</td><td><input type="checkbox" name="aktiv" value="1" [AKTIV] size="40"></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<!-- Example for 2nd row
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Another legend|}</legend>
<table width="100%" border="0" class="mkTableFormular">
<tr><td>{|Empfaenger_email|}:</td><td><input type="text" name="empfaenger_email" value="[EMPFAENGER_EMAIL]" size="40"></td></tr>
<tr><td>{|Sender_email|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
<tr><td>{|Name|}:</td><td><input type="text" name="name" value="[NAME]" size="40"></td></tr>
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" value="[BETREFF]" size="40"></td></tr>
<tr><td>{|Spam|}:</td><td><input type="text" name="spam" value="[SPAM]" size="40"></td></tr>
<tr><td>{|Persoenlich|}:</td><td><input type="text" name="persoenlich" value="[PERSOENLICH]" size="40"></td></tr>
<tr><td>{|Prio|}:</td><td><input type="text" name="prio" value="[PRIO]" size="40"></td></tr>
<tr><td>{|Dsgvo|}:</td><td><input type="text" name="dsgvo" value="[DSGVO]" size="40"></td></tr>
<tr><td>{|Warteschlange|}:</td><td><input type="text" name="warteschlange" value="[WARTESCHLANGE]" size="40"></td></tr>
<tr><td>{|Aktiv|}:</td><td><input type="text" name="aktiv" value="[AKTIV]" size="40"></td></tr>
</table>
</fieldset>
</div>
</div>
</div>
</div> -->
</div>
<input type="submit" name="submit" value="Speichern" style="float:right"/>
</form>
</div>
@@ -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>
+40 -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,51 @@
<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]></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]
<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 +78,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>
+10 -6
View File
@@ -1,4 +1,4 @@
<?php
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
@@ -10,8 +10,8 @@
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
*/
?>
<?php
class Logfile {
/** @var Application $app */
@@ -253,9 +253,13 @@ class Logfile {
}
}
}
if(is_array($meldung)) {
$meldung = $this->app->DB->real_escape_string(print_r($meldung, true));
}
$module = $this->app->DB->real_escape_string(is_scalar($module) ? strval($module) : print_r($module, true));
$action = $this->app->DB->real_escape_string(is_scalar($action) ? strval($action) : print_r($action, true));
$meldung = $this->app->DB->real_escape_string(is_scalar($meldung) ? strval($meldung) : print_r($meldung, true));
$dump = $this->app->DB->real_escape_string(is_scalar($dump) ? strval($dump) : print_r($dump, true));
$functionname = $this->app->DB->real_escape_string(is_scalar($functionname) ? strval($functionname) : print_r($functionname, true));
$this->app->DB->Insert(
sprintf(
"INSERT INTO logfile (module,action,meldung,dump,datum,bearbeiter,funktionsname)
+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;
+1 -1
View File
@@ -610,7 +610,7 @@ class Shopexport
'SELECT `id`
FROM `shopexport`
WHERE `aktiv` = 1 AND `autosendarticle` = 1 AND `artikelexport` = 1
AND (`autosendarticle_last` IS NULL OR DATE_ADD(`autosendarticle_last` INTERVAL %d MINUTE) <= NOW())',
AND (`autosendarticle_last` IS NULL OR DATE_ADD(`autosendarticle_last`, INTERVAL %d MINUTE) <= NOW())',
$minutes
)
);
+42 -12
View File
@@ -333,34 +333,64 @@ class Shopimporter_Presta extends ShopimporterBase
if (empty($nummer))
return;
$searchresult = $this->prestaRequest('GET', 'products?filter[reference]='.$nummer);
if (empty($searchresult)) {
$productsresult = $this->prestaRequest('GET', 'products?filter[reference]='.$nummer);
$combinationsresult = $this->prestaRequest('GET', 'combinations?filter[reference]='.$nummer);
$numberOfCombinations = count($combinationsresult->combinations->combination);
$numberOfProducts = count($productsresult->products->product);
$numberOfResults = $numberOfProducts + $numberOfCombinations;
if ($numberOfResults > 1) {
$this->Log('Got multiple results from Shop', $this->data);
return;
}
elseif ($numberOfResults < 1) {
$this->Log('No product found in Shop', $this->data);
return;
}
if (count($searchresult->products->product) > 1) {
$this->Log('Got multiple results from Shop', $this->data);
}
$productid = $searchresult->products->product->attributes()->id;
$product = $this->prestaRequest('GET', "products/$productid");
$isCombination = $numberOfCombinations > 0;
if ($isCombination) {
$combinationId = intval($combinationsresult->combinations->combination->attributes()->id);
$combination = $this->prestaRequest('GET', "combinations/$combinationId");
$productId = intval($combination->combination->id_product);
} else {
$productId = intval($productsresult->products->product->attributes()->id);
}
$product = $this->prestaRequest('GET', "products/$productId");
$res = [];
$res['nummer'] = strval($product->product->reference);
$res['artikelnummerausshop'] = strval($product->product->reference);
if ($isCombination) {
$res['nummer'] = strval($combination->combination->reference);
$res['artikelnummerausshop'] = strval($combination->combination->reference);
$res['ean'] = strval($combination->combination->ean13);
$res['preis_netto'] = floatval($product->product->price) + floatval($combination->combination->price);
} else {
$res['nummer'] = strval($product->product->reference);
$res['artikelnummerausshop'] = strval($product->product->reference);
$res['ean'] = strval($product->product->ean13);
$res['preis_netto'] = floatval($product->product->price);
}
$names = $this->toMultilangArray($product->product->name->language);
$descriptions = $this->toMultilangArray($product->product->description->language);
$shortdescriptions = $this->toMultilangArray($product->product->description_short->language);
$metadescriptions = $this->toMultilangArray($product->product->meta_description->language);
$metakeywords = $this->toMultilangArray($product->product->meta_keywords->language);
$metatitles = $this->toMultilangArray($product->product->meta_title->language);
$res['name'] = $names['de'];
$res['name_en'] = $names['en'];
$res['uebersicht_de'] = $descriptions['de'];
$res['uebersicht_en'] = $descriptions['en'];
$res['preis_netto'] = strval($product->product->price);
$res['kurztext_de'] = strip_tags($shortdescriptions['de']);
$res['kurztext_en'] = strip_tags($shortdescriptions['en']);
$res['hersteller'] = strval($product->product->manufacturer_name);
$res['ean'] = strval($product->product->ean13);
$res['metakeywords_de'] = $metakeywords['de'];
$res['metakeywords_en'] = $metakeywords['en'];
$res['metatitle_de'] = $metatitles['de'];
$res['metatitle_en'] = $metatitles['en'];
$res['metadescription_de'] = $metadescriptions['de'];
$res['metadescription_en'] = $metadescriptions['en'];
$images = [];
foreach ($product->product->associations->images->image as $img) {
$endpoint = "images/products/$productid/$img->id";
$endpoint = "images/products/$productId/$img->id";
$imgdata = $this->prestaRequest('GET', $endpoint, '', true);
$images[] = [
'content' => base64_encode($imgdata),
+18 -14
View File
@@ -1,4 +1,4 @@
<?php
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
@@ -10,8 +10,8 @@
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
*/
?>
<?php
use Xentral\Components\Http\JsonResponse;
@@ -230,10 +230,14 @@ class Shopimporter_Shopify extends ShopimporterBase
if(isset($this->app->User) && $this->app->User && method_exists($this->app->User, 'GetName')){
$this->bearbeiter = $this->app->DB->real_escape_string($this->app->User->GetName());
}
$einstellungen = $this->app->DB->Select("SELECT einstellungen_json FROM shopexport WHERE id = '$shopid' LIMIT 1");
if($einstellungen){
if(!empty($einstellungen)){
$einstellungen = json_decode($einstellungen,true);
} else {
return;
}
$this->ShopifyURL=trim($einstellungen['felder']['ShopifyURL']);
if(stripos($this->ShopifyURL,'http') === false){
$this->ShopifyURL = 'https://'.$this->ShopifyURL;
@@ -396,7 +400,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call("products/".$result['data']['product']['id']."/metafields.json", 'POST', array('metafield' => [
'key' => 'sync_status',
'value' => 1,
'value_type' => 'integer',
'type' => 'number_integer',
'namespace' => 'xentral',
]));
if($result['data']['product']['id'] == $nummer) {
@@ -429,7 +433,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call("variants/".$resultv['variant']['id']."/metafields.json", 'POST', array('metafield' => [
'key' => 'sync_status',
'value' => 1,
'value_type' => 'integer',
'type' => 'number_integer',
'namespace' => 'xentral',
]));
$data['nummer'] = $resultv['data']['variant']['sku'];
@@ -690,7 +694,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$inventoryitemid = $resultv['data']['variant']['inventory_item_id'];
$resulti = $this->adapter->call("inventory_levels.json?inventory_item_ids=$inventoryitemid&location_ids=$locationid");
$vorhanden = $resulti['data']['inventory_levels'][0]['available'];
$adjust = $lageranzahl - $vorhanden;
$adjust = floatval($lageranzahl) - floatval($vorhanden);
if($adjust != 0){
$data = array("location_id" => $locationid,
"inventory_item_id"=> $inventoryitemid,
@@ -1015,12 +1019,12 @@ class Shopimporter_Shopify extends ShopimporterBase
$dataproduct['product']['variants'][0]['metafields'] = array(array(
"key" => "harmonized_system_code",
"value"=> $zolltarifnummer,
"value_type"=> "string",
"type"=> "text",
"namespace"=> "global"),
[
'key' => 'sync_status',
'value' => 1,
'value_type' => 'integer',
'type' => 'number_integer',
'namespace' => 'xentral',
]);
if($pseudopreis != ''){
@@ -1185,12 +1189,12 @@ class Shopimporter_Shopify extends ShopimporterBase
$veigenschaften[] = array(
"key" => "harmonized_system_code",
"value"=> $value['zolltarifnummer'],
"value_type"=> "string",
"type"=> "text",
"namespace"=> "global");
$veigenschaften[] = [
'key' => 'sync_status',
'value' => 1,
'value_type' => 'integer',
'type' => 'number_integer',
'namespace' => 'xentral',
];
@@ -3334,7 +3338,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [
'key' => 'sync_status',
'value' => 1,
'value_type' => 'integer',
'type' => 'number_integer',
'namespace' => 'xentral',
]));
return 'ok';
@@ -3367,7 +3371,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [
'key' => 'sync_status',
'value' => 3,
'value_type' => 'integer',
'type' => 'number_integer',
'namespace' => 'xentral',
]));
}
@@ -3420,7 +3424,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [
'key' => 'sync_status',
'value' => 2,
'value_type' => 'integer',
'type' => 'number_integer',
'namespace' => 'xentral',
]));
}else{
+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'";
+97 -43
View File
@@ -98,67 +98,121 @@ class Ticketregeln {
if (empty($id)) {
// New item
$id = 'NULL';
// Check for ticketid
$ticketid = $this->app->Secure->GetPOST('ticketid');
if (!empty($ticketid)) {
$sql = "
SELECT
n.id,
n.betreff,
n.bearbeiter,
n.verfasser,
n.mail,
t.quelle,
t.warteschlange,
".$this->app->erp->FormatDateTimeShort('n.zeit','zeit').",
".$this->app->erp->FormatDateTimeShort('n.zeitausgang','zeitausgang').",
n.versendet,
n.text,
n.textausgang,
n.verfasser_replyto,
n.mail_replyto,
n.mail_cc,
(SELECT GROUP_CONCAT(value SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = n.id AND th.type = 'cc') as mail_cc_recipients,
(SELECT GROUP_CONCAT(value SEPARATOR ', ') FROM ticket_header th WHERE th.ticket_nachricht = n.id AND th.type = 'to') as mail_recipients
FROM ticket_nachricht n INNER JOIN ticket t ON t.schluessel = n.ticket
WHERE t.id = ".$ticketid." ORDER BY n.zeit DESC LIMIT 1";
$last_message = $this->app->DB->SelectArr($sql)[0];
$input['empfaenger_email'] = $last_message['mail_recipients'];
$input['sender_email'] = $last_message['mail'];
$input['name'] = $last_message['verfasser'];
$input['betreff'] = $last_message['betreff'];
$input['warteschlange'] = $last_message['warteschlange'];
$from_ticket = true;
$result = array(
'empfaenger_email' => $last_message['mail_recipients'],
'sender_email' => $last_message['mail'],
'name' => $last_message['verfasser'],
'betreff' => $last_message['betreff'],
'warteschlange' => $last_message['warteschlange'],
'aktiv' => 1
);
}
}
if ($submit != '')
{
if (!$from_ticket) {
// Write to database
// Add checks here
$input['warteschlange'] = explode(" ",$input['warteschlange'])[0]; // Just the label
if ($submit != '')
{
$columns = "id, ";
$values = "$id, ";
$update = "";
$fix = "";
// Write to database
// Add checks here
$input['warteschlange'] = explode(" ",$input['warteschlange'])[0]; // Just the label
foreach ($input as $key => $value) {
$columns = $columns.$fix.$key;
$values = $values.$fix."'".$value."'";
$update = $update.$fix.$key." = '$value'";
$columns = "id, ";
$values = "$id, ";
$update = "";
$fix = "";
$fix = ", ";
foreach ($input as $key => $value) {
$columns = $columns.$fix.$key;
$values = $values.$fix."'".$value."'";
$update = $update.$fix.$key." = '$value'";
$fix = ", ";
}
// echo($columns."<br>");
// echo($values."<br>");
// echo($update."<br>");
$sql = "INSERT INTO ticket_regeln (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
// echo($sql);
$this->app->DB->Update($sql);
if ($id == 'NULL') {
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
header("Location: index.php?module=ticketregeln&action=list&msg=$msg");
// $this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
// $id = $this->app->DB->GetInsertID();
} else {
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich &uuml;bernommen.</div>");
}
}
// echo($columns."<br>");
// echo($values."<br>");
// echo($update."<br>");
// Load values again from database
$result = $this->app->DB->SelectArr("SELECT t.id, t.empfaenger_email, t.sender_email, t.name, t.betreff, t.spam, t.persoenlich, t.prio, t.dsgvo, CONCAT(w.label,' ',w.warteschlange) as warteschlange, t.aktiv, t.id FROM ticket_regeln t LEFT JOIN warteschlangen w on t.warteschlange = w.label WHERE t.id=$id")[0];
}
$sql = "INSERT INTO ticket_regeln (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
// echo($sql);
$this->app->DB->Update($sql);
if ($id == 'NULL') {
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
header("Location: index.php?module=ticketregeln&action=list&msg=$msg");
} else {
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich &uuml;bernommen.</div>");
}
}
// Load values again from database
$result = $this->app->DB->SelectArr("SELECT t.id, t.empfaenger_email, t.sender_email, t.name, t.betreff, t.spam, t.persoenlich, t.prio, t.dsgvo, t.warteschlange, t.aktiv, t.id FROM ticket_regeln t"." WHERE id=$id");
foreach ($result[0] as $key => $value) {
foreach ($result as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
/*
* Add displayed items later
*
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
$this->app->Tpl->Add('EMAIL', $email);
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
*/
$this->app->YUI->AutoComplete("warteschlange","warteschlangename");
$this->app->Tpl->Set('PRIO', $result['prio']==1?"checked":"");
$this->app->Tpl->Set('SPAM', $result['spam']==1?"checked":"");
$this->app->Tpl->Set('PERSOENLICH', $result['persoenlich']==1?"checked":"");
$this->app->Tpl->Set('DSGVO', $result['dsgvo']==1?"checked":"");
$this->app->Tpl->Set('AKTIV', $result['aktiv']==1?"checked":"");
$this->app->YUI->AutoComplete("warteschlange","warteschlangename");
// $this->SetInput($input);
$this->app->Tpl->Parse('PAGE', "ticketregeln_edit.tpl");
+2329 -2357
View File
File diff suppressed because it is too large Load Diff
-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;
-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;
}
-68
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;
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.
+6 -6
View File
@@ -195,7 +195,7 @@ background-color:red;
/*
function fillArtikel(id,menge)
{
if(menge < 1)
if(menge <= 0)
menge=1;
strSource = "./index.php";
strData = "module=artikel&action=ajaxwerte&id="+id+"&smodule=[MODULE]&sid=[KID]&menge="+menge;
@@ -209,7 +209,7 @@ function fillArtikel(id,menge)
function fillArtikel(id,menge)
{
if(menge < 1)
if(menge <= 0)
menge=1;
var tmp = id.split(' ');
@@ -250,7 +250,7 @@ function fillArtikel(id,menge)
function fillArtikelBestellung(id,menge)
{
if(menge < 1)
if(menge <= 0)
menge=1;
var vpe = 1;
@@ -297,7 +297,7 @@ function fillArtikelBestellung(id,menge)
function fillArtikelProduktion(id,menge)
{
if(menge < 1)
if(menge <= 0)
menge=1;
var tmp = id.split(' ');
@@ -325,7 +325,7 @@ function fillArtikelLieferschein(id,menge)
id = tmp[0];
//wenn ab Menge dabei steht
if(menge < 1)
if(menge <= 0)
menge=1;
strSource = "./index.php";
@@ -343,7 +343,7 @@ function fillArtikelLieferschein(id,menge)
function fillArtikelInventur(id,menge)
{
if(menge < 1)
if(menge <= 0)
menge=1;
var tmp = id.split(' ');