Compare commits
121
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdb05c747a | ||
|
|
b613a99791 | ||
|
|
1dba7e9d7e | ||
|
|
60e21956ad | ||
|
|
545a39bbdc | ||
|
|
5ed516f9da | ||
|
|
76c770aba3 | ||
|
|
c9aee26df7 | ||
|
|
91c2dc88ba | ||
|
|
be222cc581 | ||
|
|
a9f3292f8f | ||
|
|
ac723e9fda | ||
|
|
5408f197fd | ||
|
|
c0a9156f0e | ||
|
|
fd0a5a5d4c | ||
|
|
1daf876976 | ||
|
|
7a29151bdd | ||
|
|
623b041a5f | ||
|
|
6242024451 | ||
|
|
0262c31e93 | ||
|
|
5557c54fd6 | ||
|
|
7df897d9d7 | ||
|
|
1a94af6b0b | ||
|
|
fa4125d63b | ||
|
|
ac0048c788 | ||
|
|
f430b7f5ac | ||
|
|
83e739d378 | ||
|
|
a32c201a91 | ||
|
|
cb2b75a3ca | ||
|
|
1f27f9a5f5 | ||
|
|
81e2cdb222 | ||
|
|
5b49171a74 | ||
|
|
869c888947 | ||
|
|
322ca715eb | ||
|
|
ab4e9f001e | ||
|
|
51b70aed0d | ||
|
|
08579804a8 | ||
|
|
64241842f6 | ||
|
|
f5c61ca6eb | ||
|
|
aa32bd1276 | ||
|
|
e6960f0030 | ||
|
|
b02da95c2f | ||
|
|
9994f8c18d | ||
|
|
ce5f359a75 | ||
|
|
57e398e7d4 | ||
|
|
ca5e5c52a1 | ||
|
|
6f5272717f | ||
|
|
2eabd85b91 | ||
|
|
1be7ba66ee | ||
|
|
56e743334a | ||
|
|
e125a29fa9 | ||
|
|
63a99b1a6e | ||
|
|
1ea3d3a175 | ||
|
|
fcb9b0aeb7 | ||
|
|
53bb9fcdf9 | ||
|
|
2b2f84a020 | ||
|
|
f3587501f2 | ||
|
|
4b40c27c84 | ||
|
|
265d815534 | ||
|
|
7c17b2aed9 | ||
|
|
174909c178 | ||
|
|
b8cfa9efbb | ||
|
|
5da0490260 | ||
|
|
9fbd0eb85a | ||
|
|
1c1c7034f1 | ||
|
|
2c7f113d6b | ||
|
|
1f6caa8632 | ||
|
|
73725a31bb | ||
|
|
06686a6020 | ||
|
|
1e04647dae | ||
|
|
62cca6fe3c | ||
|
|
bf10c0d807 | ||
|
|
d9ff872a98 | ||
|
|
05699986eb | ||
|
|
dcedcec0f2 | ||
|
|
6fc74f1bf3 | ||
|
|
33b5c1e171 | ||
|
|
3f7cf88d99 | ||
|
|
1ebaa24473 | ||
|
|
5ca3a7297b | ||
|
|
88e1e2ebc2 | ||
|
|
5a4c73d9b8 | ||
|
|
d294daa08b | ||
|
|
75bd00770c | ||
|
|
674c7b9958 | ||
|
|
60611a2d03 | ||
|
|
2e70e1f2dc | ||
|
|
7548c601f5 | ||
|
|
ac8407faed | ||
|
|
14e727500e | ||
|
|
011f2915c1 | ||
|
|
38cf7c3bc2 | ||
|
|
209364f8c3 | ||
|
|
fea7a173dc | ||
|
|
33d2ca9497 | ||
|
|
9002a66085 | ||
|
|
c8426bcbc0 | ||
|
|
25cf7de75b | ||
|
|
2d938e96a0 | ||
|
|
4ffeafa5ac | ||
|
|
2533e4ca4f | ||
|
|
a144e2183b | ||
|
|
30ce445ac1 | ||
|
|
51d7ad7f17 | ||
|
|
f6d71cbbc8 | ||
|
|
1bf58aa8ba | ||
|
|
63dbedc1a8 | ||
|
|
cd3c0f2113 | ||
|
|
b497d65d81 | ||
|
|
87a884bd8a | ||
|
|
3efbcb82d9 | ||
|
|
f0f468c94e | ||
|
|
b82d17d6f4 | ||
|
|
9db337ce95 | ||
|
|
62f6df1aeb | ||
|
|
828c1b1a75 | ||
|
|
7de88ca3b5 | ||
|
|
5794301826 | ||
|
|
1a28b5d75b | ||
|
|
df292c9c02 | ||
|
|
c1d42f6ceb |
@@ -128,7 +128,7 @@ final class ImapMailClient implements MailClientInterface
|
||||
$message = $this->imap->getMessage($msgNumber);
|
||||
} catch (Exception $e) {
|
||||
throw new MessageNotFoundException(
|
||||
sprintf('Message number %s not found.', $msgNumber)
|
||||
sprintf("Message number %s could not be fetched.\n\r%s", $msgNumber,print_r($e,true))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Xentral\Components\MailClient\Data;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -492,6 +492,8 @@ final class ReportService
|
||||
$testResult['messagetype'] = 'error';
|
||||
$testResult['message'] = sprintf("QUERY FAILED:\n%s", $e->getMessage());
|
||||
|
||||
$testResult['message'] .= "\n\r".$compiled;
|
||||
|
||||
return $testResult;
|
||||
}
|
||||
|
||||
@@ -500,6 +502,9 @@ final class ReportService
|
||||
if(count($rows) < 101){
|
||||
$message = sprintf('Query successful: %s datasets found', count($rows));
|
||||
}
|
||||
|
||||
$message .= "\n\r".print_r($rows[0],true);
|
||||
|
||||
$testResult = [
|
||||
'messagetype' => 'success',
|
||||
'message' => $message,
|
||||
|
||||
@@ -335,7 +335,7 @@ class TicketImportHelper
|
||||
$queue_id = $this->mailAccount->getTicketQueueId();
|
||||
|
||||
if (!empty($queue_id)) {
|
||||
$queue_label = $this->db->Select("SELECT label FROM warteschlangen WHERE id = ".$queue_id." LIMIT 1");
|
||||
$queue_label = $this->db->Select("SELECT label FROM warteschlangen WHERE label = '".$queue_id."' LIMIT 1");
|
||||
}
|
||||
|
||||
$insertTicket = "INSERT INTO `ticket` (
|
||||
@@ -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`
|
||||
@@ -843,8 +850,8 @@ class TicketImportHelper
|
||||
$this->mailAccount->isAutoresponseEnabled()
|
||||
&& $this->mailAccount->getAutoresponseText() !== ''
|
||||
&& (
|
||||
$this->erpApi->AutoresponderBlacklist($from) !== 1
|
||||
|| $this->mailAccount->isAutoresponseLimitEnabled() === false
|
||||
// $this->erpApi->AutoresponderBlacklist($from) !== 1 ||
|
||||
$this->mailAccount->isAutoresponseLimitEnabled() === false
|
||||
)
|
||||
) {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -125,9 +125,9 @@ $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1");
|
||||
);
|
||||
try {
|
||||
if($anzargs > 2){
|
||||
$message .= $app->erp->LagerSync($articleId, true, $shopByIds);
|
||||
$message .= $app->erp->LagerSync($articleId, false, $shopByIds); // 2nd parameter is print_echo -> prints via echo to logfile (big print_r)
|
||||
}else{
|
||||
$message .= $app->erp->LagerSync($articleId, true);
|
||||
$message .= $app->erp->LagerSync($articleId, false);
|
||||
}
|
||||
}
|
||||
catch (Exception $exception) {
|
||||
|
||||
@@ -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)$">
|
||||
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map|js.map)$">
|
||||
Order Allow,Deny
|
||||
Allow from all
|
||||
</FilesMatch>
|
||||
@@ -1271,6 +1271,10 @@ Allow from all
|
||||
Order Allow,Deny
|
||||
Allow from all
|
||||
</Files>
|
||||
<Files robots.txt>
|
||||
Order Allow,Deny
|
||||
Allow from all
|
||||
</Files>
|
||||
# end
|
||||
');
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
+81
-83
@@ -1259,7 +1259,7 @@ class YUI {
|
||||
}elseif($check[0]['sort'] < $check2[0]['pos'])
|
||||
{
|
||||
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
||||
if(count($kinderartikel)){
|
||||
if((empty($kinderartikel)?0:count($kinderartikel))){
|
||||
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
||||
$zuverschiebendezwischenpositionen = $this->app->DB->SelectArr("SELECT ID,pos FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos <='$maxsortkind' AND pos >= '".$check[0]['sort']."'");
|
||||
$zwipos = "(".implode(",", $zuverschiebendezwischenpositionen).")";
|
||||
@@ -1273,13 +1273,13 @@ class YUI {
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = ".$check2[0]['pos']." WHERE $module = '$id' AND id = '".$check[0]['id']."'");
|
||||
if(!empty($kinderartikel)){
|
||||
$elternsort = $check[0]['sort'];
|
||||
$ckinderartikel = count($kinderartikel);
|
||||
$ckinderartikel = (empty($kinderartikel)?0:count($kinderartikel));
|
||||
for ($i=0; $i < $ckinderartikel; $i++) {
|
||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = pos - 1 WHERE doctype = '".$module."' AND doctypeid = '$id' AND pos < '".($check2[0]['pos'])."' AND pos >= '".$check[0]['sort']."'");
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort - 1 WHERE $module = '$id' AND sort > '$elternsort' AND sort <= '".$check2[0]['pos']."'");
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".($check2[0]['pos']-$i)."' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
||||
}
|
||||
if(count($zuverschiebendezwischenpositionen)){
|
||||
if((empty($zuverschiebendezwischenpositionen)?0:count($zuverschiebendezwischenpositionen))){
|
||||
$positionsanzahl = $this->app->DB->Select("SELECT sort-".$check[0]['sort']." FROM auftrag_position WHERE id = '".$check[0]['id']."'");
|
||||
foreach ($zuverschiebendezwischenpositionen as $zkey => $zvalue) {
|
||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = ".$zvalue['pos']." + $positionsanzahl WHERE id = '".$zvalue['ID']."'");
|
||||
@@ -1293,7 +1293,7 @@ class YUI {
|
||||
{
|
||||
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
||||
$zuverschiebendezwischenpositionen= array(0);
|
||||
if(count($kinderartikel)){
|
||||
if((empty($kinderartikel)?0:count($kinderartikel))){
|
||||
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
||||
$zuverschiebendezwischenpositionentmp = $this->app->DB->SelectArr("SELECT ID FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos <='$maxsortkind' AND pos >= '".$check[0]['sort']."'");
|
||||
$zuverschiebendezwischenpositionen = array(0);
|
||||
@@ -1319,7 +1319,7 @@ class YUI {
|
||||
if(!empty($kinderartikel)){
|
||||
$elternsort = $check2[0]['pos']+1;
|
||||
$zielpos = $elternsort+1;
|
||||
$ckinderartikel = count($kinderartikel);
|
||||
$ckinderartikel = (empty($kinderartikel)?0:count($kinderartikel));
|
||||
for ($i=0; $i < $ckinderartikel; $i++) {
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort + 1 WHERE $module = '$id' AND sort < '".$kinderartikel[$i]['sort']."' AND sort > '".($elternsort+$i)."'");
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".($zielpos+$i)."' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
||||
@@ -1355,12 +1355,12 @@ class YUI {
|
||||
if($check[0]['sort'] < $check2[0]['sort'])
|
||||
{
|
||||
$maxsort = $check[0]['sort'];
|
||||
$zuverschiebendezwischenpositionen = '';
|
||||
$zuverschiebendezwischenpositionen = array(0);
|
||||
$kinderartikel = $this->app->DB->SelectArr("SELECT id,sort FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."' ORDER BY sort ASC");
|
||||
if(count($kinderartikel)){
|
||||
if((empty($kinderartikel)?0:count($kinderartikel))){
|
||||
$maxsortkind = $this->app->DB->Select("SELECT max(sort) FROM ".$module."_position WHERE explodiert_parent ='".$check[0]['id']."'");
|
||||
$zuverschiebendezwischenpositionentmp = $this->app->DB->SelectArr("SELECT ID FROM beleg_zwischenpositionen WHERE doctype='$module' AND doctypeid='$id' AND pos >='$maxsort' AND pos <= '$maxsortkind'");
|
||||
$zuverschiebendezwischenpositionen = array();
|
||||
$zuverschiebendezwischenpositionen = array(0);
|
||||
if(is_array($zuverschiebendezwischenpositionentmp)){
|
||||
foreach ($zuverschiebendezwischenpositionentmp as $key => $value) {
|
||||
$zuverschiebendezwischenpositionen[] = $value['ID'];
|
||||
@@ -1376,10 +1376,10 @@ class YUI {
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '".$check2[0]['sort']."' WHERE $module = '$id' AND id = '".$check[0]['id']."' LIMIT 1");
|
||||
|
||||
if(!empty($kinderartikel)){
|
||||
$differenzwert = $check2[0]['sort'] - $check[0]['sort']-count($kinderartikel);
|
||||
$differenzwert = $check2[0]['sort'] - $check[0]['sort']-(empty($kinderartikel)?0:count($kinderartikel));
|
||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos=pos+$differenzwert WHERE id IN $zwipos");
|
||||
$elternsort = $check2[0]['sort'];
|
||||
$ckinderartikel = count($kinderartikel);
|
||||
$ckinderartikel = (empty($kinderartikel)?0:count($kinderartikel));
|
||||
for ($i=0; $i < $ckinderartikel; $i++) {
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort - 1 WHERE $module = '$id' AND sort > '".$kinderartikel[$i]['sort']."' AND sort < '$elternsort'");
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = '$elternsort' WHERE $module = '$id' AND id = '".$kinderartikel[$i]['id']."' LIMIT 1");
|
||||
@@ -1412,7 +1412,7 @@ class YUI {
|
||||
$differenzwert = $check[0]['sort'] - ($check2[0]['sort'] + 1);
|
||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos=pos-$differenzwert WHERE id IN $zwipos");
|
||||
$elternsort = $check2[0]['sort']+1;
|
||||
$ckinderartikel = count($kinderartikel);
|
||||
$ckinderartikel = (empty($kinderartikel)?0:count($kinderartikel));
|
||||
for ($i=0; $i < $ckinderartikel; $i++) {
|
||||
$this->app->DB->Update("UPDATE beleg_zwischenpositionen SET pos = pos + 1 WHERE doctype = '".$module."' AND doctypeid = '$id' AND pos >= '".$check2[0]['sort']."' AND pos <= '$maxsortkind' AND NOT id IN $zwipos");
|
||||
$this->app->DB->Update("UPDATE ".$module."_position SET sort = sort + 1 WHERE $module = '$id' AND sort < '".$maxsortkind."' AND sort > '$elternsort'");
|
||||
@@ -1454,7 +1454,9 @@ class YUI {
|
||||
$intern = false;
|
||||
$cmd = $this->app->Secure->GetGET('cmd');
|
||||
}
|
||||
|
||||
|
||||
$priceCol = 'b.preis';
|
||||
|
||||
if($cmd === 'getpreise') {
|
||||
$ret = null;
|
||||
//$scol = $this->app->Secure->GetPOST('scol');
|
||||
@@ -1472,7 +1474,6 @@ class YUI {
|
||||
$projekt = $moduleArr['projekt'];//$this->app->DB->Select("SELECT projekt FROM $module WHERE id = '$id' LIMIT 1");
|
||||
$adresse = $moduleArr['adresse'];//$this->app->DB->Select("SELECT adresse FROM $module WHERE id = '$id' LIMIT 1");
|
||||
$funktion = ucfirst($module).'MitUmsatzeuer';
|
||||
$priceCol = 'b.preis';
|
||||
$join = '';
|
||||
$anrede = 'firma';
|
||||
if(!$this->app->erp->AnzeigeBelegNettoAdresse($anrede, $module, $projekt, $adresse, $id)
|
||||
@@ -1507,7 +1508,7 @@ class YUI {
|
||||
$positionsIds = [];
|
||||
foreach($prices as $priceInForm) {
|
||||
$priceSplit = explode(':', $priceInForm);
|
||||
if(count($priceSplit) == 2) {
|
||||
if((empty($priceSplit)?0:count($priceSplit)) == 2) {
|
||||
$elementId = $priceSplit[0];
|
||||
$price = trim($priceSplit[1]);
|
||||
$idSplit = explode('split', $elementId);
|
||||
@@ -1519,7 +1520,7 @@ class YUI {
|
||||
}
|
||||
foreach($quantities as $quantityInForm) {
|
||||
$quantitySplittet = explode(':', $quantityInForm);
|
||||
if(count($quantitySplittet) == 2) {
|
||||
if((empty($quantitySplittet)?0:count($quantitySplittet)) == 2) {
|
||||
$elementId = $quantitySplittet[0];
|
||||
$quantity = $this->app->erp->ReplaceMenge(1, trim($quantitySplittet[1]), 1);
|
||||
if(!is_numeric($quantity)) {
|
||||
@@ -1541,7 +1542,7 @@ class YUI {
|
||||
if(!empty($positionsIds)) {
|
||||
$positions = $this->app->DB->SelectArr(
|
||||
sprintf(
|
||||
"SELECT b.id, %s AS `preis`, b.menge
|
||||
"SELECT b.id, %s AS `preis`, trim(b.menge)+0 as menge
|
||||
FROM `%s` AS `b`
|
||||
%s
|
||||
WHERE b.`%s` = %d AND b.id IN (%s)",
|
||||
@@ -1560,8 +1561,8 @@ class YUI {
|
||||
) {
|
||||
$price = rtrim(number_format($position['preis'], 8, ',', '.'), '0');
|
||||
$priceSplit = explode(',', $price);
|
||||
if(strlen($priceSplit[count($priceSplit)-1]) < 2) {
|
||||
$price .= str_repeat('0',2-strlen($priceSplit[count($priceSplit)-1]));
|
||||
if(strlen($priceSplit[(empty($priceSplit)?0:count($priceSplit))-1]) < 2) {
|
||||
$price .= str_repeat('0',2-strlen($priceSplit[(empty($priceSplit)?0:count($priceSplit))-1]));
|
||||
}
|
||||
$ret[] = ['elid' => $arr[$positionId]['price_id'], 'value' => $price];
|
||||
}
|
||||
@@ -2251,7 +2252,7 @@ class YUI {
|
||||
$allestaffelpreise = array();
|
||||
$allestaffelpreise = $this->app->DB->SelectArr("SELECT * FROM verkaufspreise WHERE artikel='$artikel_id' AND geloescht = 0 AND (gueltig_bis >= '".date("Y-m-d")."' OR gueltig_bis = '0000-00-00') AND (gueltig_ab <= '".date("Y-m-d")."' OR gueltig_ab = '0000-00-00') AND (adresse='0' OR adresse='$adresse') AND (gruppe='0') AND inbelegausblenden=0");
|
||||
$anzeigepreise = array();
|
||||
for ($i=0; $i < count($allestaffelpreise); $i++) {
|
||||
for ($i=0; $i < (empty($allestaffelpreise)?0:count($allestaffelpreise)); $i++) {
|
||||
if(!isset($anzeigepreise[$allestaffelpreise[$i]['ab_menge']])){
|
||||
$anzeigepreise[$allestaffelpreise[$i]['ab_menge']] = $allestaffelpreise[$i];
|
||||
}else{
|
||||
@@ -2260,7 +2261,7 @@ class YUI {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count($anzeigepreise)>1){
|
||||
if((empty($anzeigepreise)?0:count($anzeigepreise))>1){
|
||||
ksort($anzeigepreise);
|
||||
$staffelpreistext = '';
|
||||
$belegsprache = $this->app->DB->Select("SELECT sprache FROM $module WHERE id='$id' LIMIT 1");
|
||||
@@ -2580,7 +2581,7 @@ class YUI {
|
||||
|
||||
|
||||
|
||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, ".$this->app->erp->FormatMenge('b.menge')." as menge, ".$this->FormatPreis($preiscell)." as preis,b.waehrung, ".$this->FormatPreis('b.rabatt')." as rabatt, ";
|
||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis($preiscell)." as preis,b.waehrung, ".$this->FormatPreis('b.rabatt')." as rabatt, ";
|
||||
|
||||
|
||||
$sql .= "b.id as id
|
||||
@@ -2600,7 +2601,7 @@ class YUI {
|
||||
as Artikel,
|
||||
|
||||
|
||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, ".$this->app->erp->FormatMenge('b.menge')." as menge, if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert, b.id as id
|
||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert, b.id as id
|
||||
FROM $table b
|
||||
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
|
||||
WHERE b.$module='$id'";
|
||||
@@ -2655,7 +2656,7 @@ class YUI {
|
||||
|
||||
|
||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum,
|
||||
".$this->app->erp->FormatMenge('b.menge')." as menge,
|
||||
trim(b.menge)+0 as menge,
|
||||
if(b.geliefert, ".$this->app->erp->FormatMenge('b.geliefert')." ,'-') as geliefert,
|
||||
if(b.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`,
|
||||
@@ -2677,7 +2678,7 @@ class YUI {
|
||||
as Artikel,
|
||||
|
||||
|
||||
p.abkuerzung as projekt, b.nummer as nummer, ".$this->app->erp->FormatMenge('b.menge')." as menge,
|
||||
p.abkuerzung as projekt, b.nummer as nummer, trim(b.menge)+0 as menge,
|
||||
".$this->FormatPreis(' b.preis')." as preis,
|
||||
|
||||
b.id as id
|
||||
@@ -2694,7 +2695,7 @@ class YUI {
|
||||
as Artikel,
|
||||
|
||||
|
||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(b.lieferdatum,'%d.%m.%Y') as lieferdatum, ".$this->app->erp->FormatMenge('b.menge')." as menge,
|
||||
p.abkuerzung as projekt, b.nummer as nummer, DATE_FORMAT(b.lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge,
|
||||
|
||||
b.id as id
|
||||
FROM $table b
|
||||
@@ -2716,7 +2717,7 @@ class YUI {
|
||||
if(CHAR_LENGTH(b.bezeichnunglieferant)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnunglieferant,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnunglieferant,' *')),
|
||||
if(CHAR_LENGTH(b.bezeichnunglieferant)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(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,".$this->app->erp->FormatMenge('b.menge')." as menge, ".$this->FormatPreis(' b.preis')." as preis, b.waehrung, b.id as id
|
||||
p.abkuerzung as projekt, a.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis(' b.preis')." as preis, b.waehrung, b.id as id
|
||||
FROM $table b
|
||||
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
|
||||
WHERE b.$module='$id'";
|
||||
@@ -3419,7 +3420,7 @@ class YUI {
|
||||
$check = $this->app->DB->Select("SELECT id FROM `auftragsampel_auftrageinstellungen` LIMIT 1");
|
||||
$deaktivertok = false;
|
||||
if(!$this->app->DB->error())$deaktivertok = true;
|
||||
$anzahl3 = count($auftragsampel);
|
||||
$anzahl3 = (empty($auftragsampel)?0:count($auftragsampel));
|
||||
$anzahl += $anzahl3;
|
||||
$ifextra2a[] = " a.status = 'abgeschlossen' ";
|
||||
foreach($auftragsampel as $k => $ampel)
|
||||
@@ -3440,7 +3441,7 @@ class YUI {
|
||||
if($deaktivertok) $_extra2e = "),'<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/abgeschlossen.png\" title=\"Auftragsampel deaktivert\" border=\"0\" style=\"margin-right:1px\">'
|
||||
|
||||
)";
|
||||
if($deaktivertok) $_extra2e = "),'".str_repeat($_extra2icon,count($auftragsampel))."')";
|
||||
if($deaktivertok) $_extra2e = "),'".str_repeat($_extra2icon,(empty($auftragsampel)?0:count($auftragsampel)))."')";
|
||||
$extra3 .= ",'".$abgeschlossen."'";
|
||||
$ifextra2a[] = "
|
||||
substring(ifnull(aac.status,'".str_repeat('0', $anzahl3)."'),$k2,1) = '1' ";
|
||||
@@ -3452,7 +3453,7 @@ class YUI {
|
||||
$check = $this->app->DB->Select("SELECT id FROM `auftragsampel_auftrageinstellungen` LIMIT 1");
|
||||
$deaktivertok = false;
|
||||
if(!$this->app->DB->error())$deaktivertok = true;
|
||||
$anzahl3 = count($auftragsampel);
|
||||
$anzahl3 = (empty($auftragsampel)?0:count($auftragsampel));
|
||||
$anzahl += $anzahl3;
|
||||
$ifextra2a[] = " a.status = 'abgeschlossen' ";
|
||||
foreach($auftragsampel as $ampel)
|
||||
@@ -3462,7 +3463,7 @@ class YUI {
|
||||
if($deaktivertok) $_extra2a = ",if(isnull((SELECT aae.id FROM auftragsampel_auftrageinstellungen aae WHERE aae.auftrag = a.id AND aae.deaktiviert = 1 LIMIT 1)),concat(''";
|
||||
$extra2 .= "IF(isnull( (SELECT aampa.id FROM auftragsampel_auftrag aampa WHERE aampa.auftrag = a.id AND aampa.auftragsampel = '".$ampel['id']."' AND aampa.erledigt = 1) ), "."'<img src=\"./pages/icons/".str_replace('_go_','_stop_',$ampel['icon'])."\" title=\"".$ampel['beschriftung']."\" border=\"0\" style=\"margin-right:1px\">'".","."'<img src=\"./pages/icons/".$ampel['icon']."\" title=\"".$ampel['beschriftung']."\" border=\"0\" style=\"margin-right:1px\">'". ") ";
|
||||
if($deaktivertok) $_extra2e = "),'<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/abgeschlossen.png\" title=\"Auftragsampel deaktivert\" border=\"0\" style=\"margin-right:1px\">')";
|
||||
if($deaktivertok) $_extra2e = "),'".str_repeat($_extra2icon,count($auftragsampel))."')";
|
||||
if($deaktivertok) $_extra2e = "),'".str_repeat($_extra2icon,(empty($auftragsampel)?0:count($auftragsampel)))."')";
|
||||
$extra3 .= ",'".$abgeschlossen."'";
|
||||
$ifextra2a[] = "
|
||||
not isnull( (SELECT aampa.id FROM auftragsampel_auftrag aampa WHERE aampa.auftrag = a.id AND aampa.auftragsampel = '".$ampel['id']."' AND aampa.erledigt = 1) ) ";
|
||||
@@ -3747,7 +3748,7 @@ class YUI {
|
||||
$module = $this->app->Secure->GetGET("module");
|
||||
$this->app->Tpl->Add('JAVASCRIPT', 'function ' . $name . 'fnFormatDetails ( nTr ) {
|
||||
//var aData = oTable' . $name . '.fnGetData( nTr );
|
||||
var str = aData[' . (isset($menucol)?$menucol:count($heading)-1) . '];
|
||||
var str = aData[' . (isset($menucol)?$menucol:(empty($heading)?0:count($heading))-1) . '];
|
||||
|
||||
var match = str.match(/[1-9]{1}[0-9]*/);
|
||||
|
||||
@@ -3770,14 +3771,14 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
||||
}
|
||||
');
|
||||
}
|
||||
$colspan = count($heading);
|
||||
$colspan = (empty($heading)?0:count($heading));
|
||||
|
||||
//<tr><th colspan="' . $colspan . '"><br></th></tr>
|
||||
$this->app->Tpl->Add($parsetarget, '
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="' . $name . '">
|
||||
<thead>
|
||||
<tr>');
|
||||
for ($i = 0;$i < count($heading);$i++) {
|
||||
for ($i = 0;$i < (empty($heading)?0:count($heading));$i++) {
|
||||
$this->app->Tpl->Add($parsetarget, '<th width="' . $width[$i] . '">' . $heading[$i] . '</th>');
|
||||
}
|
||||
$this->app->Tpl->Add($parsetarget, '</tr>
|
||||
@@ -3791,7 +3792,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
||||
<tfoot>
|
||||
<tr>
|
||||
');
|
||||
for ($i = 0;$i < count($heading);$i++) {
|
||||
for ($i = 0;$i < (empty($heading)?0:count($heading));$i++) {
|
||||
$this->app->Tpl->Add($parsetarget, '<th>' . $heading[$i] . '</th>');
|
||||
}
|
||||
$this->app->Tpl->Add($parsetarget, '
|
||||
@@ -5816,7 +5817,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
||||
if ($more_data3 == 1) $subwhere[] = " l.lieferantenretoure=1 ";
|
||||
|
||||
// ENDE EXTRA more
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
$where = " l.id!='' AND l.status!='angelegt' $tmp " . $this->app->erp->ProjektRechte('p.id', true, 'l.vertriebid');
|
||||
|
||||
/* STAMMDATEN */
|
||||
@@ -6184,7 +6185,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
||||
|
||||
$tmp = '';
|
||||
if (!is_null($subwhere)) {
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
}
|
||||
|
||||
$where = " r.status!='angelegt' AND r.id!='' ".$tmp ." ". $this->app->erp->ProjektRechte('p.id', true, 'r.vertriebid');
|
||||
@@ -6575,7 +6576,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
||||
r.zahlungsweise as zahlungsweise,
|
||||
FORMAT(r.soll,2{$extended_mysql55} ) as soll,
|
||||
ifnull(r.waehrung,'EUR'),
|
||||
if(r.soll-r.ist=0 AND r.ist > 0 AND r.zahlungsstatus!='bezahlt','teilbezahlt',r.zahlungsstatus) as zahlung,
|
||||
r.zahlungsstatus as zahlung,
|
||||
if(r.soll-r.ist!=0 AND r.ist > 0,FORMAT(r.ist-r.soll,2{$extended_mysql55}),FORMAT((r.soll-r.ist)*-1,2{$extended_mysql55})) as fehlt,
|
||||
if(r.status = 'storniert' AND r.teilstorno = 1,'TEILSTORNO',UPPER(r.status)) as status,
|
||||
".(!empty($zusatzcols)?implode(', ',$zusatzcols).',':'')."
|
||||
@@ -6611,7 +6612,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
||||
if ($more_data4 == 1) {
|
||||
$subwhere[] = " r.status='storniert' ";
|
||||
}
|
||||
$csubwhere = !empty($subwhere)?count($subwhere):0;
|
||||
$csubwhere = !empty($subwhere)?(empty($subwhere)?0:count($subwhere)):0;
|
||||
for ($j = 0;$j < $csubwhere;$j++) {
|
||||
$tmp.= " AND " . $subwhere[$j];
|
||||
}
|
||||
@@ -6880,7 +6881,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
||||
if ($more_data1 == 1) $subwhere[] = " a.lagerartikel='1' ";
|
||||
|
||||
$tmp = '';
|
||||
$csubwhere = !empty($subwhere)?count($subwhere):0;
|
||||
$csubwhere = !empty($subwhere)?(empty($subwhere)?0:count($subwhere)):0;
|
||||
for ($j = 0;$j < $csubwhere;$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
|
||||
if($liefertermine)
|
||||
@@ -7062,7 +7063,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
||||
$more_data7 = $this->app->Secure->GetGET("more_data7");
|
||||
|
||||
// SQL statement
|
||||
$sql = "SELECT
|
||||
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||
b.id,'<img src=./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/details_open.png class=details>' AS `open`,
|
||||
CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',b.id,'\" />') AS `auswahl`,
|
||||
IF(b.status='storniert',CONCAT(b.belegnr),b.belegnr) AS `belegnr`,
|
||||
@@ -7217,7 +7218,7 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
|
||||
}
|
||||
|
||||
if (!is_null($subwhere)) {
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
}
|
||||
|
||||
// START EXTRA more
|
||||
@@ -7672,7 +7673,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
if($fteilprojektfilter) {
|
||||
$subwhere[] = " a.teilprojekt = '$fteilprojektfilter' ";
|
||||
}
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
|
||||
$where = " a.projekt='" . $id."'".$tmp;
|
||||
$count = "SELECT COUNT(a.id) FROM aufgabe a WHERE $where ";
|
||||
@@ -7760,7 +7761,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
}
|
||||
|
||||
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
$where = " (z.adresse_abrechnung='" . $id . "' OR p.kunde='$id') $tmp";
|
||||
|
||||
$count = "SELECT COUNT(z.id) FROM zeiterfassung z LEFT JOIN adresse a ON a.id=z.adresse LEFT JOIN projekt p ON p.id=z.projekt WHERE $where";
|
||||
@@ -7851,7 +7852,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
}else{
|
||||
$subwhere[] = " z.abgerechnet <> 1 ";
|
||||
}
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
$where = " z.projekt ='" . $id . "' $tmp";
|
||||
$count = "SELECT COUNT(z.id) FROM zeiterfassung z LEFT JOIN arbeitspaket arb ON z.arbeitspaket = arb.id WHERE $where";
|
||||
|
||||
@@ -7991,7 +7992,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
|
||||
|
||||
$tmp = '';
|
||||
$csubwhere = !empty($subwhere)?count($subwhere):0;
|
||||
$csubwhere = !empty($subwhere)?(empty($subwhere)?0:count($subwhere)):0;
|
||||
for ($j = 0;$j < $csubwhere;$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
$where = " a.id!='' AND a.status!='angelegt' $tmp " . $this->app->erp->ProjektRechte();
|
||||
|
||||
@@ -8351,7 +8352,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
|
||||
// $more_data2 = $this->app->Secure->GetGET("more_data2"); if($more_data2==1) $subwhere[] = " a.datum=CURDATE() AND a.status='freigegeben'";
|
||||
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
$id = $this->app->Secure->GetGET("id");
|
||||
$where = " ap.aufgabe IS NOT NULL $tmp AND ap.projekt='$id' GROUP by Datum,ap.id ";
|
||||
|
||||
@@ -8414,7 +8415,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
$more_data1 = $this->app->Secure->GetGET("more_data1");
|
||||
|
||||
if ($more_data1 == 1) $subwhere[] = " OR ( ap.abgenommen='1') ";
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " " . $subwhere[$j];
|
||||
|
||||
// if($tmp!="")$tmp .= " AND e.geloescht='1' ";
|
||||
|
||||
@@ -8633,7 +8634,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
|
||||
if (!is_null($subwhere))
|
||||
{
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
}
|
||||
|
||||
if ($more_data1 == 1)
|
||||
@@ -8699,7 +8700,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
if ($more_data1 == 1) $subwhere[] = " AND ap.status='abgerechnet' ";
|
||||
else $subwhere[] = " AND ap.status!='abgerechnet' ";
|
||||
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " " . $subwhere[$j];
|
||||
|
||||
|
||||
// Fester filter
|
||||
@@ -8792,7 +8793,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
if ($more_data1 == 1) $subwhere[] = " z.abrechnen='1' AND z.abgerechnet!='1' ";
|
||||
|
||||
// $more_data2 = $this->app->Secure->GetGET("more_data2"); if($more_data2==1) $subwhere[] = " a.datum=CURDATE() AND a.status='freigegeben'";
|
||||
for ($j = 0;$j < count($subwhere);$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
for ($j = 0;$j < (empty($subwhere)?0:count($subwhere));$j++) $tmp.= " AND " . $subwhere[$j];
|
||||
$where = " z.id!='' AND z.adresse='" . $id . "' $tmp";
|
||||
$count = "SELECT COUNT(z.id) FROM zeiterfassung z WHERE z.adresse='" . $id . "'";
|
||||
$moreinfo = true;
|
||||
@@ -9477,7 +9478,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
if(bearbeiter!="",bearbeiter,a2.name) as bearbeiter,
|
||||
CONCAT(UCASE(LEFT(d.typ, 1)), SUBSTRING(d.typ, 2)) as art,
|
||||
CONCAT(IF(d.sent = 1, "JA", "NEIN"),"<a data-type=dokumente data-id=", d.id, "></a>") as gesendet,
|
||||
"" as pdf,
|
||||
concat("<a href=\"index.php?module=dateien&action=send&id=",(SELECT datei FROM datei_stichwoerter WHERE subjekt="anhang" AND objekt="dokument" AND parameter = d.id LIMIT 1),"\"><img src=./themes/' . $this->app->Conf->WFconf['defaulttheme'] . '/images/pdf.svg></a>") as pdf,
|
||||
concat("1","-",d.id) as did,d.content as suchtext,d.internebezeichnung
|
||||
FROM
|
||||
dokumente d
|
||||
@@ -9821,7 +9822,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
*/
|
||||
$this->app->User->SetParameter('stammdatenbereinigen_list_param', implode(';',$paramsGroupBy));
|
||||
|
||||
if(count($groupABy)>0)
|
||||
if((empty($groupABy)?0:count($groupABy))>0)
|
||||
{
|
||||
$groupby = '
|
||||
GROUP BY ' . implode(',', $groupABy) . '
|
||||
@@ -10844,7 +10845,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
}
|
||||
if(isset($alignright))
|
||||
{
|
||||
for ($aligni = 0;$aligni < count($alignright);$aligni++) {
|
||||
for ($aligni = 0;$aligni < (empty($alignright)?0:count($alignright));$aligni++) {
|
||||
$this->app->Tpl->Add('YUICSS', '
|
||||
#' . $name . ' > tbody > tr > td:nth-child(' . $alignright[$aligni] . ') {
|
||||
text-align: right;
|
||||
@@ -10854,7 +10855,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
}
|
||||
if(isset($aligncenter))
|
||||
{
|
||||
for ($aligni = 0;$aligni < count($aligncenter);$aligni++) {
|
||||
for ($aligni = 0;$aligni < (empty($aligncenter)?0:count($aligncenter));$aligni++) {
|
||||
$this->app->Tpl->Add('YUICSS', '
|
||||
#' . $name . ' > tbody > tr > td:nth-child(' . $aligncenter[$aligni] . ') {
|
||||
text-align: center;
|
||||
@@ -10864,7 +10865,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
}
|
||||
if(isset($hide320))
|
||||
{
|
||||
for ($h = 0;$h < count($hide320);$h++) {
|
||||
for ($h = 0;$h < (empty($hide320)?0:count($hide320));$h++) {
|
||||
$this->app->Tpl->Add('YUICSS', '
|
||||
@media screen and (max-width: 320px){
|
||||
#' . $name . ' > thead > tr > th:nth-child(' . $hide320[$h] . ') {
|
||||
@@ -10883,7 +10884,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
|
||||
if(isset($nowrap) && is_array($nowrap))
|
||||
{
|
||||
for ($h = 0;$h < count($nowrap);$h++) {
|
||||
for ($h = 0;$h < (empty($nowrap)?0:count($nowrap));$h++) {
|
||||
$this->app->Tpl->Add('YUICSS', '
|
||||
@media screen and (max-width: 767px){
|
||||
#' . $name . ' > tbody > tr > td:nth-child(' . $hide767[$h] . '){
|
||||
@@ -10897,7 +10898,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
|
||||
if(isset($hide767))
|
||||
{
|
||||
for ($h = 0;$h < count($hide767);$h++) {
|
||||
for ($h = 0;$h < (empty($hide767)?0:count($hide767));$h++) {
|
||||
$this->app->Tpl->Add('YUICSS', '
|
||||
@media screen and (max-width: 767px){
|
||||
#' . $name . ' > thead > tr > th:nth-child(' . $hide767[$h] . ') {
|
||||
@@ -10916,7 +10917,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
}
|
||||
if(isset($hide480))
|
||||
{
|
||||
for ($h = 0;$h < count($hide480);$h++) {
|
||||
for ($h = 0;$h < (empty($hide480)?0:count($hide480));$h++) {
|
||||
$this->app->Tpl->Add('YUICSS', '
|
||||
@media screen and (max-width: 479px){
|
||||
#' . $name . ' > thead > tr > th:nth-child(' . $hide480[$h] . ') {
|
||||
@@ -10961,7 +10962,7 @@ a.land as land, p.abkuerzung as projekt, a.zahlungsweise as zahlungsweise,
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($hidecolumns) && $hidecolumns && is_array($hidecolumns) && count($hidecolumns) > 2)
|
||||
if(isset($hidecolumns) && $hidecolumns && is_array($hidecolumns) && (empty($hidecolumns)?0:count($hidecolumns)) > 2)
|
||||
{
|
||||
$hidecolumnsitem = $hidecolumns[0];
|
||||
if(!is_array($hidecolumns[2]))$hidecolumns[2][0] = $hidecolumns[2];
|
||||
@@ -11328,7 +11329,7 @@ $directlink=0;
|
||||
if( (($this->app->erp->RechteVorhanden($_module,"edit") && $_action=="list") ||
|
||||
(!empty($forcerowclick))) && !empty($rowclick))
|
||||
{
|
||||
if($menucol > 0 || count($heading) > 0) {
|
||||
if($menucol > 0 || (empty($heading)?0:count($heading)) > 0) {
|
||||
if(!empty($doppelteids)){
|
||||
$doppelteids = '\-[1-9]{1}[0-9]*';
|
||||
}else{
|
||||
@@ -11338,11 +11339,11 @@ if( (($this->app->erp->RechteVorhanden($_module,"edit") && $_action=="list") ||
|
||||
{
|
||||
$tmpmenucol=$menucol;
|
||||
} else {
|
||||
$tmpmenucol=!empty($heading)?count($heading)-1:0;
|
||||
$tmpmenucol=!empty($heading)?(empty($heading)?0:count($heading))-1:0;
|
||||
}
|
||||
|
||||
|
||||
if(!empty($menucol) && $menucol > 0 || count($heading) > 0) {
|
||||
if(!empty($menucol) && $menucol > 0 || (empty($heading)?0:count($heading)) > 0) {
|
||||
if(isset($doppelteids)&& $doppelteids){
|
||||
$doppelteids = '\-[1-9]{1}[0-9]*';
|
||||
}
|
||||
@@ -11353,7 +11354,7 @@ if(!empty($menucol) && $menucol > 0 || count($heading) > 0) {
|
||||
{
|
||||
$tmpmenucol=$menucol;
|
||||
} else {
|
||||
$tmpmenucol=count($heading)-1;
|
||||
$tmpmenucol=(empty($heading)?0:count($heading))-1;
|
||||
}
|
||||
|
||||
if(empty($rowclickaction) || $rowclickaction=="")
|
||||
@@ -11411,7 +11412,7 @@ if((isset($extra_anzahl_datensaetze) && (int)$extra_anzahl_datensaetze > 0) || (
|
||||
{
|
||||
if(!empty($aLengthMenuArr))
|
||||
{
|
||||
if($aLengthMenuArr[count($aLengthMenuArr)-1] < $maxrows)
|
||||
if($aLengthMenuArr[(empty($aLengthMenuArr)?0:count($aLengthMenuArr))-1] < $maxrows)
|
||||
{
|
||||
$aLengthMenuArr[] = (int)$maxrows;
|
||||
break;
|
||||
@@ -12050,7 +12051,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
||||
}
|
||||
');
|
||||
}
|
||||
$colspan = !empty($heading)?count($heading):1;
|
||||
$colspan = !empty($heading)?(empty($heading)?0:count($heading)):1;
|
||||
//<tr><th colspan="' . $colspan . '"><br></th></tr>
|
||||
$this->app->Tpl->Add($parsetarget, '
|
||||
<div class="table-responsive">
|
||||
@@ -12058,7 +12059,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
||||
<thead>
|
||||
<tr>');
|
||||
if(!empty($heading)){
|
||||
$cHeading = count($heading);
|
||||
$cHeading = (empty($heading)?0:count($heading));
|
||||
for ($i = 0; $i < $cHeading; $i++) {
|
||||
$this->app->Tpl->Add(
|
||||
$parsetarget,
|
||||
@@ -12072,7 +12073,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
||||
if(empty($columnfilter) && !(isset($columnfilter) && $columnfilter === false)) {
|
||||
$this->app->Tpl->Add($parsetarget, '</tr><tr>');
|
||||
if(!empty($heading)){
|
||||
$cHeading = count($heading);
|
||||
$cHeading = (empty($heading)?0:count($heading));
|
||||
for ($i = 0; $i < $cHeading; $i++) {
|
||||
$this->app->Tpl->Add(
|
||||
$parsetarget,
|
||||
@@ -12095,7 +12096,7 @@ url:strUrl, success:function(html){strReturn = html;}, async:false
|
||||
<tr>
|
||||
');
|
||||
if(!empty($heading)){
|
||||
$cheader = count($heading);
|
||||
$cheader = (empty($heading)?0:count($heading));
|
||||
for ($i = 0; $i < $cheader; $i++) {
|
||||
$this->app->Tpl->Add(
|
||||
$parsetarget,
|
||||
@@ -12107,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) {
|
||||
@@ -13837,7 +13835,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
function ChartDB($sql, $parsetarget, $width, $height, $limitmin = 0, $limitmax = 100, $gridy = 5) {
|
||||
|
||||
$result = $this->app->DB->SelectArr($sql);
|
||||
for ($i = 0;$i < count($result);$i++) {
|
||||
for ($i = 0;$i < (empty($result)?0:count($result));$i++) {
|
||||
$lables[] = $result[$i]['legende'];
|
||||
$values[] = $result[$i]['wert'];
|
||||
}
|
||||
@@ -13850,7 +13848,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
function Chart($parsetarget, $labels, $width = 400, $height = 200, $limitmin = 0, $limitmax = 100, $gridy = 5) {
|
||||
$werte = '';
|
||||
$values = $labels;
|
||||
for ($i = 0;$i < count($values) - 1;$i++) {
|
||||
for ($i = 0;$i < (empty($values)?0:count($values)) - 1;$i++) {
|
||||
$werte = $werte . "'" . $values[$i] . "',";
|
||||
}
|
||||
$werte = $werte . "'" . $values[$i + 1] . "'";
|
||||
@@ -13859,7 +13857,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
$this->app->Tpl->Set('CHART_HEIGHT', $height);
|
||||
$this->app->Tpl->Set('LIMITMIN', $limitmin);
|
||||
$this->app->Tpl->Set('LIMITMAX', $limitmax);
|
||||
$this->app->Tpl->Set('GRIDX', count($values));
|
||||
$this->app->Tpl->Set('GRIDX', (empty($values)?0:count($values)));
|
||||
$this->app->Tpl->Set('GRIDY', $gridy);
|
||||
$this->app->Tpl->Parse($parsetarget, "chart.tpl");
|
||||
}
|
||||
@@ -13888,7 +13886,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
|
||||
function ChartAdd($color, $values) {
|
||||
$werte = '';
|
||||
for ($i = 0;$i < count($values) - 1;$i++) {
|
||||
for ($i = 0;$i < (empty($values)?0:count($values)) - 1;$i++) {
|
||||
$werte = $werte . $values[$i] . ",";
|
||||
}
|
||||
$werte = $werte . $values[$i + 1];
|
||||
@@ -13953,7 +13951,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
LEFT JOIN datei_version v ON v.datei=v2.datei AND v.version = v2.version WHERE $where ORDER BY s.sort DESC LIMIT 2 ";
|
||||
$query = $this->app->DB->SelectArr($sql);
|
||||
$status = 0;
|
||||
if($query && count($query) == 2)
|
||||
if($query && (empty($query)?0:count($query)) == 2)
|
||||
{
|
||||
$status = 1;
|
||||
$this->app->DB->Update("UPDATE datei_stichwoerter SET sort = '".$query[1]['sort']."' WHERE id = '".$query[0]['id']."' LIMIT 1");
|
||||
@@ -13986,7 +13984,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
LEFT JOIN datei_version v ON v.datei=v2.datei AND v.version = v2.version WHERE $where ORDER BY s.sort LIMIT 2 ";
|
||||
$query = $this->app->DB->SelectArr($sql);
|
||||
$status = 0;
|
||||
if($query && count($query) == 2)
|
||||
if($query && (empty($query)?0:count($query)) == 2)
|
||||
{
|
||||
$status = 1;
|
||||
$this->app->DB->Update("UPDATE datei_stichwoerter SET sort = '".$query[1]['sort']."' WHERE id = '".$query[0]['id']."' LIMIT 1");
|
||||
@@ -14097,7 +14095,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
}
|
||||
if(!$found)unset($auswahl[$k]);
|
||||
}
|
||||
if(!$auswahl || count($auswahl) == 0)
|
||||
if(!$auswahl || (empty($auswahl)?0:count($auswahl)) == 0)
|
||||
{
|
||||
echo 'Keine PDF-Dateien ausgewählt!';
|
||||
exit;
|
||||
@@ -14168,7 +14166,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
}
|
||||
if(!$found)unset($auswahl[$k]);
|
||||
}
|
||||
if(!$auswahl || count($auswahl) == 0)
|
||||
if(!$auswahl || (empty($auswahl)?0:count($auswahl)) == 0)
|
||||
{
|
||||
echo 'Keine Dateien ausgewählt!';
|
||||
exit;
|
||||
@@ -14289,7 +14287,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
|
||||
/*
|
||||
$tmp = $this->app->DB->SelectArr("SELECT * FROM datei_stichwortvorlagen WHERE modul='' ORDER by beschriftung");
|
||||
for($i=0;$i<count($tmp);$i++)
|
||||
for($i=0;$i<(empty($tmp)?0:count($tmp));$i++)
|
||||
$this->app->Tpl->Add('EXTRASTICHWOERTER','<option value="'.$tmp[$i]['beschriftung'].'">'.$tmp[$i]['beschriftung'].'</option>');
|
||||
*/
|
||||
$maxsize = 0;
|
||||
@@ -15102,7 +15100,7 @@ source: "index.php?module=ajax&action=filter&filtername=' . $filter . $extendurl
|
||||
$summenarray[] = '<input type="hidden" id="mcol" value="'.$mengencol.'" /><input type="hidden" id="rcol" value="'.$rabattcol.'" /><input type="hidden" id="scol" value="'.$summencol.'" /><span id="zwischensumme">'.number_format($zwischensumme,4,'.','').'</span>';
|
||||
if($module != 'verbindlichkeit')$summenarray[] = '';
|
||||
$summenarray[] = '';
|
||||
$summenarray[count($summenarray)-1] .= $js;
|
||||
$summenarray[(empty($summenarray)?0:count($summenarray))-1] .= $js;
|
||||
if($mengencol && $summencol && $module!='produktion')$table->AddRow($summenarray);
|
||||
|
||||
//$this->app->YUI->AutoComplete(ARTIKELAUTO,"artikel",array('name_de','warengruppe'),"nummer");
|
||||
@@ -15624,11 +15622,11 @@ function IframeDialog($width, $height, $src = "") {
|
||||
}
|
||||
|
||||
</script>
|
||||
<div id=\"preistabellediv\" style=\"display:none;\"><div id=\"preiserror\">".(count($waehrungen) > 1?"":"Bitte legen Sie erst Währungen an!")."</div>
|
||||
<div id=\"preistabellediv\" style=\"display:none;\"><div id=\"preiserror\">".((empty($waehrungen)?0:count($waehrungen)) > 1?"":"Bitte legen Sie erst Währungen an!")."</div>
|
||||
|
||||
";
|
||||
$i = -1;
|
||||
if(count($waehrungen) > 1)
|
||||
if((empty($waehrungen)?0:count($waehrungen)) > 1)
|
||||
{
|
||||
$htmltabelle .= "<table><tr><th>Währung</th><th>Kurs</th><th>umgerechnter Preis</th><th>Aktion</th></tr>";
|
||||
foreach($waehrungen as $waehrung => $kurs)
|
||||
|
||||
+4623
-4246
File diff suppressed because it is too large
Load Diff
@@ -365,6 +365,9 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
|
||||
foreach ($compare_differences as $compare_difference) {
|
||||
$comma = "";
|
||||
foreach ($compare_difference as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
$value = implode(',',$value);
|
||||
}
|
||||
echo_out($comma."$key => [$value]");
|
||||
$comma = ", ";
|
||||
}
|
||||
|
||||
+21
-15
@@ -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
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$version="OSS";
|
||||
$version_revision="D.1.8.1";
|
||||
$version_revision="1.10";
|
||||
$githash = file_get_contents("../githash.txt");
|
||||
if (!empty($githash)) {
|
||||
$version_revision .= " (".substr($githash,0,8).")";
|
||||
|
||||
+5
-1
@@ -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)$">
|
||||
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map|js.map)$">
|
||||
Order Allow,Deny
|
||||
Allow from all
|
||||
</FilesMatch>
|
||||
@@ -23,4 +23,8 @@ Allow from all
|
||||
Order Allow,Deny
|
||||
Allow from all
|
||||
</Files>
|
||||
<Files robots.txt>
|
||||
Order Allow,Deny
|
||||
Allow from all
|
||||
</Files>
|
||||
# end
|
||||
|
||||
+5
-2
@@ -440,12 +440,15 @@ class erpooSystem extends Application
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Creates user specific items
|
||||
|
||||
$offene_tickets = $this->erp->AnzahlOffeneTickets(false);
|
||||
$offene_tickets_user = $this->erp->AnzahlOffeneTickets(true);
|
||||
|
||||
$possibleUserItems = [
|
||||
'Tickets' => [
|
||||
'link' => 'index.php?module=ticket&action=list',
|
||||
'counter' => $this->erp->AnzahlOffeneTickets()
|
||||
'counter' => ($offene_tickets+$offene_tickets_user > 0)?$offene_tickets_user."/".$offene_tickets:""
|
||||
],
|
||||
'Aufgaben' => [
|
||||
'link' => 'index.php?module=aufgaben&action=list',
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* Fix scrolling to middle of page bug
|
||||
*/
|
||||
|
||||
$(() => {
|
||||
window.scrollTo(0, 0);
|
||||
})
|
||||
+126
-201
@@ -2696,7 +2696,14 @@ public function NavigationHooks(&$menu)
|
||||
|
||||
public function AnzahlOffeneTickets($eigene=true)
|
||||
{
|
||||
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND ((t.warteschlange = '') OR (t.warteschlange IN (SELECT w.label FROM warteschlangen w WHERE w.adresse = '".$this->app->User->GetAdresse()."')))";
|
||||
|
||||
if ($eigene) {
|
||||
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND (t.warteschlange IN (SELECT w.label FROM warteschlangen w WHERE w.adresse = '".$this->app->User->GetAdresse()."'))";
|
||||
} else
|
||||
{
|
||||
$sql = "SELECT COUNT(t.id) FROM ticket t WHERE t.status = 'neu' AND (t.warteschlange = '')";
|
||||
}
|
||||
|
||||
return (int)$this->app->DB->Select($sql);
|
||||
}
|
||||
|
||||
@@ -5419,6 +5426,18 @@ title: 'Abschicken',
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Replace {VARS} with texts given in array
|
||||
* Input array(key => value)
|
||||
*/
|
||||
function ParseVars(array $mapping, $text) {
|
||||
foreach ($mapping as $key => $value) {
|
||||
$text = str_replace('{'.strtoupper($key).'}',$value,$text);
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
// @refactor Document Komponente
|
||||
function CheckBearbeiter($id,$module)
|
||||
{
|
||||
@@ -12683,9 +12702,8 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
|
||||
//$this->app->DB->Update("UPDATE auftrag_position ap, artikel a SET ap.preis='0' WHERE ap.auftrag='$auftrag' AND a.id=ap.artikel AND a.porto='1'");
|
||||
}
|
||||
|
||||
|
||||
//Vorkasse Check
|
||||
//ist genug geld da? zusammenzaehlen der kontoauszuege_zahlungseingang
|
||||
// Vorkasse Check
|
||||
$auftrag_ist_vorkasse = false;
|
||||
$summe_eingang = 0;
|
||||
$auftrag_gesamtsumme = 0;
|
||||
$zahlungsweise = '';
|
||||
@@ -12694,43 +12712,36 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
|
||||
$auftrag_gesamtsumme = $auftragarr['gesamtsumme'];// $this->app->DB->Select("SELECT gesamtsumme FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
||||
$zahlungsweise = $auftragarr['zahlungsweise'];// $this->app->DB->Select("SELECT zahlungsweise FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
||||
$vorabbezahltmarkieren = $auftragarr['vorabbezahltmarkieren'];// $this->app->DB->Select("SELECT vorabbezahltmarkieren FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
||||
$waehrung = $auftragarr['waehrung'];
|
||||
}
|
||||
//TODO zahlungsweisemodul
|
||||
$zahlungsweise = strtolower($zahlungsweise);
|
||||
|
||||
/*
|
||||
// Check behaviour
|
||||
$zahlungsweisenmodule = $this->app->DB->SelectArr("SELECT id, modul, verhalten FROM zahlungsweisen WHERE type = '".$this->app->DB->real_escape_string($zahlungsweise)."' AND (projekt = '$projekt' OR projekt = 0) ORDER BY projekt = '$projekt' DESC LIMIT 1");
|
||||
if (!empty($zahlungsweisenmodule)) {
|
||||
if ($zahlungsweisenmodule[0]['verhalten'] == 'vorkasse') {
|
||||
$auftrag_ist_vorkasse = true;
|
||||
}
|
||||
} else if ($zahlungsweise == 'vorkasse') {
|
||||
$auftrag_ist_vorkasse = true;
|
||||
}
|
||||
|
||||
OLD CODE REPLACED BY FUNCTION IN auftrag.php / fibu_buchungen
|
||||
// Check fibu_buchungen saldo
|
||||
$saldo = $this->app->erp->GetSaldoDokument($auftrag,'auftrag');
|
||||
if (!empty($saldo)) {
|
||||
if ($saldo['waehrung'] == $waehrung && $saldo['betrag'] >= $auftrag_gesamtsumme) {
|
||||
$saldo_ok = true;
|
||||
}
|
||||
}
|
||||
|
||||
if($zahlungsweisenmodule = $this->app->DB->SelectArr("SELECT id, modul, verhalten FROM zahlungsweisen WHERE type = '".$this->app->DB->real_escape_string($zahlungsweise)."' AND
|
||||
(projekt = '$projekt' OR projekt = 0) ORDER BY projekt = '$projekt' DESC LIMIT 1
|
||||
"))
|
||||
{
|
||||
if( ( $zahlungsweisenmodule[0]['verhalten'] == 'vorkasse' && (($summe_eingang + $toleranz>=$auftrag_gesamtsumme) || $vorabbezahltmarkieren)) || ($zahlungsweisenmodule[0]['verhalten'] == 'lastschrift') || ($zahlungsweisenmodule[0]['verhalten'] == '') || ($zahlungsweisenmodule[0]['verhalten'] == 'rechnung') )
|
||||
{
|
||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='1' WHERE id='$auftrag' LIMIT 1");
|
||||
}elseif($summe_eingang > 0)
|
||||
{
|
||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='2' WHERE id='$auftrag' LIMIT 1");
|
||||
}else{
|
||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='0' WHERE id='$auftrag' LIMIT 1");
|
||||
// Decide condition
|
||||
if ($auftrag_ist_vorkasse && !$saldo_ok && !$vorabbezahltmarkieren) {
|
||||
$vorkasse_ok = '0';
|
||||
} else {
|
||||
$vorkasse_ok = '1';
|
||||
}
|
||||
}else{
|
||||
if($summe_eingang+$toleranz>=$auftrag_gesamtsumme || ($zahlungsweise=="rechnung" || $zahlungsweise=="amazon" || $zahlungsweise=="amazon_bestellung" || $zahlungsweise=="secupay"
|
||||
|| $zahlungsweise=="nachnahme" || $zahlungsweise=="einzugsermaechtigung" || $zahlungsweise=="lastschrift" || $zahlungsweise=="bar") || $auftrag_gesamtsumme==0 || $vorabbezahltmarkieren=="1")
|
||||
{
|
||||
//TODO ok bei amazon und amazon_bestellung nur wenn transaktionsnummer vorhanden?
|
||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='1' WHERE id='$auftrag' LIMIT 1");
|
||||
}
|
||||
else if ($summe_eingang > 0) {
|
||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='2' WHERE id='$auftrag' LIMIT 1");
|
||||
}
|
||||
else {
|
||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='0' WHERE id='$auftrag' LIMIT 1");
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok='$vorkasse_ok' WHERE id='$auftrag'");
|
||||
|
||||
//nachnahme gebuehr check!!!!
|
||||
//$nachnahme = $this->app->DB->Select("SELECT id FROM auftrag_position WHERE auftrag='$auftrag' AND nummer='200001' LIMIT 1");
|
||||
@@ -13781,6 +13792,19 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
|
||||
}
|
||||
}
|
||||
|
||||
function ReplaceKontorahmen($db,$value,$fromform = null) {
|
||||
$value = $this->app->DB->real_escape_string($value);
|
||||
|
||||
if ($db) {
|
||||
$sachkonto = explode(' ',$value)[0];
|
||||
$kontoid = $this->app->DB->Select("SELECT id FROM kontorahmen WHERE sachkonto = '$sachkonto' LIMIT 1");
|
||||
return($kontoid);
|
||||
} else {
|
||||
$sachkonto = $this->app->DB->Select("SELECT CONCAT(sachkonto,' ',beschriftung) FROM kontorahmen WHERE id = '$value' LIMIT 1");
|
||||
return($sachkonto);
|
||||
}
|
||||
}
|
||||
|
||||
// @refactor FormHelper Komponente
|
||||
function ReplaceLieferant($db,$value,$fromform)
|
||||
{
|
||||
@@ -14536,156 +14560,6 @@ function get_emails ($str)
|
||||
else return false;
|
||||
}
|
||||
|
||||
|
||||
// @refactor Mahnwesen Modul
|
||||
function MahnwesenBody($id,$als,$_datum=null,$sprache='')
|
||||
{
|
||||
if($id > 0)
|
||||
{
|
||||
$rechnungarr = $this->app->DB->SelectRow("SELECT r.*,DATE_FORMAT(datum,'%d.%m.%Y') as datum_de,DATE_FORMAT(mahnwesen_datum,'%d.%m.%Y') as mahnwesen_datum_de,r.mahnwesen_datum
|
||||
FROM rechnung AS r WHERE r.id=$id LIMIT 1");
|
||||
}
|
||||
if(empty($rechnungarr))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$adresse = $rechnungarr['adresse'];
|
||||
if($sprache==''){
|
||||
$sprache = $rechnungarr['sprache'];
|
||||
}
|
||||
if($sprache==''){
|
||||
$sprache = $this->app->DB->Select("SELECT sprache FROM adresse WHERE id='$adresse' LIMIT 1");
|
||||
}
|
||||
// OfferNo, customerId, OfferDate
|
||||
|
||||
$kundennummer = $rechnungarr['kundennummer'];
|
||||
$projekt = $rechnungarr['projekt'];
|
||||
$auftrag= $rechnungarr['auftrag'];
|
||||
$buchhaltung= $rechnungarr['buchhaltung'];
|
||||
$lieferschein = $rechnungarr['lieferschein'];
|
||||
$lieferscheinid = $lieferschein;
|
||||
if($lieferscheinid){
|
||||
$lieferschein = $this->app->DB->Select("SELECT belegnr FROM lieferschein WHERE id='$lieferschein' LIMIT 1");
|
||||
}else{
|
||||
$lieferschein = '';
|
||||
}
|
||||
$bestellbestaetigung = $rechnungarr['kundennummer'];
|
||||
$datum = $rechnungarr['datum_de'];
|
||||
$datum_sql = $rechnungarr['datum'];
|
||||
$belegnr = $rechnungarr['belegnr'];
|
||||
$doppel = $rechnungarr['doppel'];
|
||||
$freitext = $rechnungarr['freitext'];
|
||||
$ustid = $rechnungarr['ustid'];
|
||||
$soll = $rechnungarr['soll'];
|
||||
$ist = $rechnungarr['ist'];
|
||||
$land = $rechnungarr['land'];
|
||||
$mahnwesen_datum = $rechnungarr['mahnwesen_datum'];
|
||||
$mahnwesen_datum_deutsch = $rechnungarr['mahnwesen_datum_de'];
|
||||
$zahlungsweise = $rechnungarr['zahlungsweise'];
|
||||
$zahlungsstatus = $rechnungarr['zahlungsstatus'];
|
||||
$zahlungszieltage = $rechnungarr['zahlungszieltage'];
|
||||
$zahlungszieltageskonto = $rechnungarr['zahlungszieltageskonto'];
|
||||
$zahlungszielskonto = $rechnungarr['zahlungszielskonto'];
|
||||
$waehrung = $rechnungarr['waehrung'];
|
||||
|
||||
$zahlungdatum = $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD(datum, INTERVAL $zahlungszieltage DAY),'%d.%m.%Y') FROM rechnung WHERE id='$id' LIMIT 1");
|
||||
|
||||
if($_datum!=null)
|
||||
{
|
||||
$mahnwesen_datum = $this->app->String->Convert($_datum,'%1.%2.%3','%3-%2-%1');
|
||||
$mahnwesen_datum_deutsch = $_datum;
|
||||
}
|
||||
|
||||
$zahlungsweise = strtolower($zahlungsweise);
|
||||
|
||||
if($als=='zahlungserinnerung')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenZahlungserinnerung",$sprache,$projekt,"rechnung",$id);
|
||||
$tage = $this->GetKonfiguration('mahnwesen_m1_tage');
|
||||
}
|
||||
else if($als=='mahnung1')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung1",$sprache,$projekt,"rechnung",$id);
|
||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m1_gebuehr');
|
||||
$tage = $this->GetKonfiguration('mahnwesen_m2_tage');
|
||||
}
|
||||
else if($als=='mahnung2')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung2",$sprache,$projekt,"rechnung",$id);
|
||||
$tage = $this->GetKonfiguration('mahnwesen_m3_tage');
|
||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m2_gebuehr');
|
||||
}
|
||||
else if($als=='mahnung3')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung3",$sprache,$projekt,"rechnung",$id);
|
||||
$tage = $this->GetKonfiguration('mahnwesen_ik_tage');
|
||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m3_gebuehr');
|
||||
}
|
||||
else if($als=='inkasso')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenInkasso",$sprache,$projekt,"rechnung",$id);
|
||||
//$tage = $this->GetKonfiguration("mahnwesen_ik_tage");
|
||||
$tage = 3; //eigentlich vorbei
|
||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_ik_gebuehr');
|
||||
}
|
||||
else
|
||||
{
|
||||
$body = $this->app->erp->Beschriftung("dokument_anschreiben");
|
||||
}
|
||||
|
||||
if($tage <=0) $tage = 0;
|
||||
|
||||
$datummahnung= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$mahnwesen_datum', INTERVAL $tage DAY),'%d.%m.%Y')");
|
||||
$datumrechnungzahlungsziel= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$datum_sql', INTERVAL $zahlungszieltage DAY),'%d.%m.%Y')");
|
||||
|
||||
$tage_ze = $zahlungszieltage + $this->GetKonfiguration('mahnwesen_m1_tage');
|
||||
$datumzahlungserinnerung= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$datum_sql', INTERVAL $tage_ze DAY),'%d.%m.%Y')");
|
||||
|
||||
// checkstamp $this->CheckStamp("jhdskKUHsiusakiakuhsd"); // errechnet aus laufzeit und kundenid // wenn es nicht drinnen ist darf es nicht gehen
|
||||
|
||||
if($mahngebuehr=='' || !is_numeric($mahngebuehr))
|
||||
$mahngebuehr = 0;
|
||||
|
||||
//$offen= '11,23';
|
||||
$body = str_replace('{RECHNUNG}',$belegnr,$body);
|
||||
$body = str_replace('{BELEGNR}',$belegnr,$body);
|
||||
$body = str_replace('{DATUMRECHNUNG}',$datum,$body);
|
||||
$body = str_replace('{TAGE}',$tage,$body);
|
||||
$body = str_replace('{OFFEN}',$this->formatMoney($soll - $ist,$waehrung),$body);
|
||||
$body = str_replace('{SOLL}',$this->formatMoney($soll,$waehrung),$body);
|
||||
$body = str_replace('{SUMME}',$this->formatMoney($soll - $ist + $mahngebuehr,$waehrung),$body);
|
||||
$body = str_replace('{IST}',$this->formatMoney($ist,$waehrung),$body);
|
||||
$body = str_replace('{DATUM}',$datummahnung,$body);
|
||||
$body = str_replace('{MAHNGEBUEHR}',$this->formatMoney($mahngebuehr,$waehrung),$body);
|
||||
$body = str_replace('{OFFENMITMAHNGEBUEHR}',$this->formatMoney($mahngebuehr + $soll - $ist,$waehrung),$body);
|
||||
$body = str_replace('{MAHNDATUM}',$mahnwesen_datum_deutsch,$body);
|
||||
|
||||
|
||||
// Im Protokoll suchen Datum von Zahlungserinnerung, Mahnung 1, Mahnung 2, Mahnung 3
|
||||
|
||||
$mahnung1 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$id'
|
||||
AND grund LIKE 'Mahnung1 versendet%' ORDER by Zeit DESC LIMIT 1");
|
||||
|
||||
$mahnung2 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$id'
|
||||
AND grund LIKE 'Mahnung2 versendet%' ORDER by Zeit DESC LIMIT 1");
|
||||
|
||||
$mahnung3 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$id'
|
||||
AND grund LIKE 'Mahnung3 versendet%' ORDER by Zeit DESC LIMIT 1");
|
||||
|
||||
$body = str_replace('{DATUMMAHNUNG1}',$mahnung1,$body);
|
||||
$body = str_replace('{DATUMMAHNUNG2}',$mahnung2,$body);
|
||||
$body = str_replace('{DATUMMAHNUNG3}',$mahnung3,$body);
|
||||
|
||||
$body = str_replace('{DATUMZAHLUNGSERINNERUNGFAELLIG}',$datumzahlungserinnerung,$body);
|
||||
$body = str_replace('{DATUMZAHLUNGSERINNERUNG}',$datumzahlungserinnerung,$body);
|
||||
$body = str_replace('{DATUMRECHNUNGZAHLUNGSZIEL}',$datumrechnungzahlungsziel,$body);
|
||||
|
||||
$body = $this->ParseUserVars('rechnung',$id,$body);
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
/**@deprecated */
|
||||
function AufragZuDTA($auftrag,$rechnung="1")
|
||||
{
|
||||
@@ -18109,7 +17983,8 @@ function Gegenkonto($ust_befreit,$ustid='', $doctype = '', $doctypeId = 0)
|
||||
created = NOW(),
|
||||
uhrzeit = "' . $data['uhrzeit'] . '",
|
||||
projekt = "' . $data['projekt'] . '",
|
||||
bearbeiter = "' . $data['bearbeiter'] . '"
|
||||
bearbeiter = "' . $data['bearbeiter'] . '",
|
||||
sent = "' . $data['sent'] . '"
|
||||
');
|
||||
|
||||
return $this->app->DB->GetInsertID();
|
||||
@@ -22733,24 +22608,19 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
||||
WHERE `artikel` = {$lagerartikel[$ij]['id']} AND `shop` = {$shop}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->LogFile('*** UPDATE '.$lagerartikel[$ij]['nummer'].' '.$lagerartikel[$ij]['name_de'].' Shop: '.$shop.' Lagernd: '.$verkaufbare_menge.' Korrektur: '.round((float) ($verkaufbare_menge_korrektur - $verkaufbare_menge),7).' Pseudolager: '.round((float) $pseudolager,8));
|
||||
|
||||
$cacheQuantity = (int) $verkaufbare_menge_korrektur + (int) $pseudolager;
|
||||
$this->app->DB->Update(
|
||||
"UPDATE `artikel` SET `cache_lagerplatzinhaltmenge` = '{$cacheQuantity}'
|
||||
WHERE `id`= '{$lagerartikel[$ij]['id']}' LIMIT 1"
|
||||
);
|
||||
}
|
||||
|
||||
$extnummer = null;
|
||||
$anzges = 0;
|
||||
$anzfehler = 0;
|
||||
|
||||
$result = null; // 1 on success
|
||||
|
||||
if(!empty($extnummer) && is_array($extnummer)) {
|
||||
foreach($extnummer as $nummer) {
|
||||
$anzges++;
|
||||
try {
|
||||
$this->app->remote->RemoteSendArticleList($shop, array($lagerartikel[$ij]['id']), array($nummer['nummer']), true);
|
||||
$result = $this->app->remote->RemoteSendArticleList($shop, array($lagerartikel[$ij]['id']), array($nummer['nummer']), true);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$this->app->erp->LogFile($this->app->DB->real_escape_string('Lagersync Fehler '.$shop.' '.$nummer['nummer'].' '.$e->getMessage()));
|
||||
@@ -22761,7 +22631,7 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
||||
else{
|
||||
$anzges++;
|
||||
try {
|
||||
$this->app->remote->RemoteSendArticleList($shop,array($lagerartikel[$ij]['id']),!empty($extnummer)? array($extnummer):'',true);
|
||||
$result = $this->app->remote->RemoteSendArticleList($shop,array($lagerartikel[$ij]['id']),!empty($extnummer)? array($extnummer):'',true);
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$this->app->erp->LogFile($this->app->DB->real_escape_string('Lagersync Fehler '.$shop.' '.(!empty($extnummer)? array($extnummer):$lagerartikel[$ij]['nummer']).' '.$e->getMessage()));
|
||||
@@ -22773,6 +22643,19 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
||||
if($print_echo) {
|
||||
echo '*** UPDATE ' . $lagerartikel[$ij]['nummer'] . ' ' . $lagerartikel[$ij]['name_de'] . ' Lagernd: ' . ($verkaufbare_menge) . ' Korrekturwert: ' . round($verkaufbare_menge_korrektur - $verkaufbare_menge, 7) . "\r\n";
|
||||
}
|
||||
|
||||
|
||||
$this->LogFile('*** UPDATE '.$lagerartikel[$ij]['nummer'].' '.$lagerartikel[$ij]['name_de'].' Shop: '.$shop.' Lagernd: '.$verkaufbare_menge.' Korrektur: '.round((float) ($verkaufbare_menge_korrektur - $verkaufbare_menge),7).' Pseudolager: '.round((float) $pseudolager,8).' Result: '.gettype($result).' '.$result);
|
||||
|
||||
if ($result == 1) {
|
||||
$cacheQuantity = (int) $verkaufbare_menge_korrektur + (int) $pseudolager;
|
||||
$this->app->DB->Update(
|
||||
"UPDATE `artikel` SET `cache_lagerplatzinhaltmenge` = '{$cacheQuantity}'
|
||||
WHERE `id`= '{$lagerartikel[$ij]['id']}' LIMIT 1"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$this->app->DB->Update(
|
||||
@@ -26157,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));
|
||||
@@ -26574,6 +26457,9 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
||||
$to_name = $this->app->DB->Select("SELECT name FROM adresse WHERE id='$adresse' AND geloescht=0 LIMIT 1");
|
||||
}
|
||||
}
|
||||
|
||||
$to_name = str_replace(",","",$to_name); // , is not allowed in names, because mailsend will interpret it as a list
|
||||
|
||||
// wenn emailadresse from email from user name von benutzer sonst firmenname
|
||||
if($drucker==$this->app->User->GetEmail())
|
||||
$from_name = $this->app->User->GetName();
|
||||
@@ -27150,7 +27036,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
||||
$to_name_csv .= $item;
|
||||
}
|
||||
} else if (!empty($to_name)) {
|
||||
foreach (explode(',',str_replace(" ","",$to_name)) as $item) {
|
||||
foreach (explode(',',$to_name) as $item) {
|
||||
$to_name_array[] = $item;
|
||||
$to_name_csv .= $item;
|
||||
}
|
||||
@@ -36023,7 +35909,7 @@ function Firmendaten($field,$projekt="")
|
||||
* Auftrag: gesamtsumme, rechnung: soll, gutschrift: soll verbindlichkeit: betrag
|
||||
* returns array(betrag, waehrung) or empty array if multiple
|
||||
*/
|
||||
public function GetSaldoDokument(int $id, string $type) : array {
|
||||
public function GetSaldoDokument(int $id, string $type, string $buchungsart = '', string $datum_bis = '') : array {
|
||||
|
||||
$sql = "
|
||||
SELECT
|
||||
@@ -36032,10 +35918,15 @@ function Firmendaten($field,$projekt="")
|
||||
FROM
|
||||
fibu_buchungen_alle
|
||||
WHERE
|
||||
typ = '".$type."' AND id = ".$id."
|
||||
typ = '".$type."'
|
||||
AND
|
||||
id = ".$id."
|
||||
AND
|
||||
(buchungsart = '".$buchungsart."' OR '".$buchungsart."' = '')
|
||||
AND
|
||||
(datum <= '".$datum_bis."' OR '".$datum_bis."' = '')
|
||||
GROUP BY
|
||||
waehrung";
|
||||
|
||||
$result = $this->app->DB->SelectArr($sql);
|
||||
|
||||
if (!empty($result)) {
|
||||
@@ -36046,6 +35937,40 @@ function Firmendaten($field,$projekt="")
|
||||
return(array());
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a fibu buchung
|
||||
* using module fibu_buchungen
|
||||
*/
|
||||
public function fibu_buchungen_buchen(string $von_typ, int $von_id, string $nach_typ, int $nach_id, $betrag, string $waehrung, $datum, string $internebemerkung) {
|
||||
$fibu_buchungen = $this->app->loadModule('fibu_buchungen', false);
|
||||
if($fibu_buchungen !== null && method_exists($fibu_buchungen, 'fibu_buchungen_buchen')) {
|
||||
return $fibu_buchungen->fibu_buchungen_buchen($von_typ, $von_id, $nach_typ, $nach_id, $betrag, $waehrung, $datum, $internebemerkung);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Refresh fibu buchung_alle tables
|
||||
* using module fibu_buchungen
|
||||
*/
|
||||
public function fibu_rebuild_tables() {
|
||||
$fibu_buchungen = $this->app->loadModule('fibu_buchungen', false);
|
||||
if($fibu_buchungen !== null && method_exists($fibu_buchungen, 'fibu_buchungen_buchen')) {
|
||||
return $fibu_buchungen->fibu_rebuild_tables();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Recalculate payment status and skonto
|
||||
* using module rechnung
|
||||
*/
|
||||
public function rechnung_zahlstatus_berechnen() {
|
||||
$rechnung = $this->app->loadModule('rechnung', false);
|
||||
if($rechnung !== null && method_exists($rechnung, 'rechnung_zahlstatus_berechnen')) {
|
||||
return $rechnung->rechnung_zahlstatus_berechnen();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function ANABREGSNeuberechnen($id,$art,$force=false)
|
||||
{
|
||||
if($id <= 0 || empty($art))
|
||||
|
||||
@@ -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'] != '')
|
||||
{
|
||||
|
||||
@@ -4008,7 +4008,7 @@ class Briefpapier extends SuperFPDF {
|
||||
}
|
||||
|
||||
$beschriftung_zeile = ucfirst($zwischenpositionen[$i]['postype']);
|
||||
|
||||
|
||||
if($data['name']=="")
|
||||
$html = ($fett?"<b>":"").$beschriftung_zeile.($fett?"</b>":"");
|
||||
else
|
||||
@@ -4029,8 +4029,12 @@ class Briefpapier extends SuperFPDF {
|
||||
$abstand_links = $posWidth +$itemNoWidth;
|
||||
}
|
||||
|
||||
$this->SetX($x+$abstand_links);
|
||||
$this->Cell_typed($descWidth,4,$this->WriteHTML($html));
|
||||
$this->SetX($x+$abstand_links);
|
||||
|
||||
$text = $this->WriteHTML($html);
|
||||
$text = empty($text)?"":$text;
|
||||
|
||||
$this->Cell_typed($descWidth,4,);
|
||||
$this->SetX($x+$abstand_links+$descWidth);
|
||||
//$this->SetX($x);
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@ class RechnungPDF extends BriefpapierCustom {
|
||||
parent::__construct($this->app,$projekt,$styleData);
|
||||
}
|
||||
|
||||
public function GetRechnung($id,$als="",$doppeltmp=0, $_datum = null)
|
||||
public function GetRechnung($id, $titel_abw="",$doppeltmp=0, $_datum = null, $text_abw = '')
|
||||
{
|
||||
$this->parameter = $als;
|
||||
|
||||
if($this->app->erp->Firmendaten("steuerspalteausblenden")=="1")
|
||||
{
|
||||
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
|
||||
@@ -124,10 +124,10 @@ class RechnungPDF extends BriefpapierCustom {
|
||||
|
||||
$lieferschein = $this->app->DB->Select("SELECT belegnr FROM lieferschein WHERE id='$lieferscheinid' LIMIT 1");
|
||||
|
||||
if(empty($als) || $als === 'doppel') {
|
||||
/* if(empty($als) || $als === 'doppel') {
|
||||
$rechnungsnummeranzeigen = false;
|
||||
}
|
||||
elseif(!empty($belegnr)){
|
||||
else*/if(!empty($belegnr)){
|
||||
$rechnungsnummeranzeigen = true;
|
||||
}
|
||||
$projektabkuerzung = $this->app->DB->Select(sprintf('SELECT abkuerzung FROM projekt WHERE id = %d', $projekt));
|
||||
@@ -172,7 +172,7 @@ class RechnungPDF extends BriefpapierCustom {
|
||||
$zahlungsweisetext = $this->app->erp->Zahlungsweisetext("rechnung",$id);
|
||||
|
||||
|
||||
if($doppel==1) $als = "doppel";
|
||||
// if($doppel==1) $als = "doppel";
|
||||
|
||||
if($belegnr=="" || $belegnr=="0") $belegnr = "- ".$this->app->erp->Beschriftung("dokument_entwurf");
|
||||
else {
|
||||
@@ -181,7 +181,7 @@ class RechnungPDF extends BriefpapierCustom {
|
||||
}
|
||||
|
||||
$posanzeigen = true;
|
||||
if($als=="zahlungserinnerung")
|
||||
/* if($als=="zahlungserinnerung")
|
||||
{
|
||||
$this->doctypeOrig=$this->app->erp->Beschriftung("dokument_zahlungserinnerung")." ".(is_null($_datum)?$mahnwesen_datum:$_datum);
|
||||
if($this->app->erp->GetKonfiguration("mahnwesen_ze_pos") === '0')$posanzeigen = false;
|
||||
@@ -207,14 +207,12 @@ class RechnungPDF extends BriefpapierCustom {
|
||||
if($this->app->erp->GetKonfiguration("mahnwesen_inkasso_pos") === '0')$posanzeigen = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
{*/
|
||||
if($rechnungersatz)
|
||||
$this->doctypeOrig=($this->app->erp->Beschriftung("bezeichnungrechnungersatz")?$this->app->erp->Beschriftung("bezeichnungrechnungersatz"):$this->app->erp->Beschriftung("dokument_rechnung"))." $belegnr";
|
||||
else
|
||||
$this->doctypeOrig=$this->app->erp->Beschriftung("dokument_rechnung")." $belegnr";
|
||||
}
|
||||
|
||||
|
||||
// }
|
||||
|
||||
$this->zusatzfooter = " (RE$belegnr)";
|
||||
|
||||
@@ -407,12 +405,12 @@ class RechnungPDF extends BriefpapierCustom {
|
||||
|
||||
|
||||
|
||||
if($als!="" && $als!="doppel")
|
||||
/* if($als!="" && $als!="doppel")
|
||||
{
|
||||
$body = $this->app->erp->MahnwesenBody($id,$als,$_datum);
|
||||
$footer =$this->app->erp->ParseUserVars("rechnung",$id, $this->app->erp->Beschriftung("rechnung_footer"));
|
||||
}
|
||||
else {
|
||||
else {*/
|
||||
$body = $this->app->erp->Beschriftung("rechnung_header");
|
||||
if($bodyzusatz!="") $body=$body."\r\n".$bodyzusatz;
|
||||
$body = $this->app->erp->ParseUserVars("rechnung",$id,$body);
|
||||
@@ -442,6 +440,14 @@ class RechnungPDF extends BriefpapierCustom {
|
||||
$footer = $versandinfo."$freitext"."\r\n".$this->app->erp->ParseUserVars("rechnung",$id,$this->app->erp->Beschriftung("rechnung_footer").
|
||||
"\r\n$steuer\r\n$zahlungsweisetext").$systemfreitext;
|
||||
}
|
||||
// }
|
||||
|
||||
if ($titel_abw != '') {
|
||||
$this->doctypeOrig = $titel_abw;
|
||||
}
|
||||
|
||||
if ($text_abw != '') {
|
||||
$body = $text_abw;
|
||||
}
|
||||
|
||||
$this->setTextDetails(array(
|
||||
@@ -686,10 +692,10 @@ class RechnungPDF extends BriefpapierCustom {
|
||||
$tmp_name = str_replace(' ','',trim($this->recipient['enterprise']));
|
||||
$tmp_name = str_replace('.','',$tmp_name);
|
||||
|
||||
if($als=="" || $als=="doppel")
|
||||
$this->filename = $datum2."_RE".$belegnr.".pdf";
|
||||
if($titel_abw != "")
|
||||
$this->filename = $datum2."_RE".$belegnr."_INFO.pdf";
|
||||
else
|
||||
$this->filename = $datum2."_MA".$belegnr.".pdf";
|
||||
$this->filename = $datum2."_RE".$belegnr.".pdf";
|
||||
|
||||
$this->setBarcode($belegnr);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2054,7 +2054,7 @@ $table_kontakte = '';
|
||||
$ckontakte = !empty($kontakte)?count($kontakte):0;
|
||||
for($i=0;$i<$ckontakte;$i++)
|
||||
{
|
||||
$tabindex = $tabindex+i;
|
||||
$tabindex = $tabindex+$i;
|
||||
$table_kontakte .= "<tr><td>".$kontakte[$i]['bezeichnung'].":
|
||||
</td><td><input type=text name=\"adresse_kontakte[".$kontakte[$i]['id']."]\" value=\"".$kontakte[$i]['kontakt']."\" size=\"30\" tabindex=\"$tabindex\"> <a href=\"#\" onclick=\"if(!confirm('".$kontakte[$i]['bezeichnung']." wirklich entfernen?')) return false; else window.location.href='index.php?module=adresse&action=delkontakt&id=".$id."&lid=".$kontakte[$i]['id']."';\">x</a></td></tr>";
|
||||
}
|
||||
@@ -6417,7 +6417,7 @@ function AdresseVerein()
|
||||
if(bearbeiter!="",bearbeiter,a2.name) as bearbeiter,
|
||||
CONCAT(UCASE(LEFT(d.typ, 1)), SUBSTRING(d.typ, 2)) as art,
|
||||
CONCAT(IF(d.sent = 1, "JA", "NEIN"),"<a data-type=dokumente data-id=", d.id, "></a>") as gesendet,
|
||||
"" as pdf,
|
||||
concat("<a href=\"index.php?module=dateien&action=send&id=",(SELECT datei FROM datei_stichwoerter WHERE subjekt="anhang" AND objekt="dokument" AND parameter = d.id LIMIT 1),"\"><img src=./themes/' . $this->app->Conf->WFconf['defaulttheme'] . '/images/pdf.svg></a>") as pdf,
|
||||
concat("1","-",d.id) as did,
|
||||
d.content as suchtext,
|
||||
d.internebezeichnung
|
||||
|
||||
+21
-22
@@ -907,14 +907,14 @@ class Artikel extends GenArtikel {
|
||||
$defaultorder = 7;
|
||||
|
||||
// headings
|
||||
$heading = array('Artikel', 'Nummer','Menge', 'Einheit', 'Lager', 'Reserviert', 'Menü');
|
||||
$width = array('50%', '10%', '5%', '5%','5%', '5%', '9%');
|
||||
$findcols = array('a.name_de', 'a.nummer', 's.menge','a.einheit',
|
||||
$heading = array('Artikel', 'Nummer','Referenz','Menge', 'Einheit', 'Lager', 'Reserviert', 'Menü');
|
||||
$width = array('50%', '10%', '5%', '5%', '5%','5%', '5%', '9%');
|
||||
$findcols = array('a.name_de', 'a.nummer','s.referenz', 's.menge','a.einheit',
|
||||
'lag.menge', 'CASE WHEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id) > 0
|
||||
THEN (SELECT SUM(lr.menge) FROM lager_reserviert lr WHERE lr.artikel=a.id)
|
||||
ELSE 0
|
||||
END','id');
|
||||
$searchsql = array('a.name_de', 'a.nummer','a.einheit', 's.menge','s.art',"CONCAT(IF(s.art='' OR s.art='et','Einkaufsteil',''),IF(s.art='it','Informationsteil/Dienstleistung',''),IF(s.art='bt','Beistellung',''))");
|
||||
$searchsql = array('a.name_de', 'a.nummer','s.referenz','a.einheit', 's.menge','s.art',"CONCAT(IF(s.art='' OR s.art='et','Einkaufsteil',''),IF(s.art='it','Informationsteil/Dienstleistung',''),IF(s.art='bt','Beistellung',''))");
|
||||
|
||||
$menu = "<table cellpadding=0 cellspacing=0>";
|
||||
$menu .= "<tr>";
|
||||
@@ -932,20 +932,19 @@ class Artikel extends GenArtikel {
|
||||
|
||||
$alignright = array(3,5,6);
|
||||
// SQL statement
|
||||
$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> ',
|
||||
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,
|
||||
".$this->app->erp->FormatMenge('s.menge').' 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
|
||||
END as reserviert,
|
||||
|
||||
s.id as menu
|
||||
$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> ',
|
||||
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,
|
||||
s.referenz,
|
||||
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
|
||||
END as reserviert,
|
||||
s.id as menu
|
||||
FROM stueckliste s
|
||||
INNER JOIN artikel a ON s.artikel=a.id
|
||||
LEFT JOIN (SELECT sum(lpi.menge) as menge ,lpi.artikel
|
||||
@@ -6090,7 +6089,7 @@ class Artikel extends GenArtikel {
|
||||
|
||||
$stueck = $this->app->erp->ArtikelAnzahlLagerStueckliste($id);
|
||||
|
||||
$this->ArtikelStuecklisteImport('TAB3');
|
||||
// $this->ArtikelStuecklisteImport('TAB3');
|
||||
$url = 'index.php?module=artikel&action=stueckliste&cmd=getbaum&id='.$id;
|
||||
$this->app->Tpl->Set('URL',$url);
|
||||
$this->app->Tpl->Add('TAB1',"<center>");
|
||||
@@ -6255,8 +6254,8 @@ class Artikel extends GenArtikel {
|
||||
{
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
if($id > 0){
|
||||
$result = $this->app->DB->SelectArr("SELECT a.nummer, a.name_de, a.hersteller,a.herstellernummer, REPLACE(TRIM(s.menge)+0,'.',',') as menge, s.referenz, s.place, s.layer, s.wert, s.bauform, s.zachse,s.xpos, s.ypos, s.art FROM stueckliste s
|
||||
LEFT JOIN artikel a ON a.id=s.artikel WHERE s.stuecklistevonartikel='$id'");
|
||||
$sql = "SELECT avon.nummer as stuecklistevon, a.nummer, a.name_de, a.hersteller,a.herstellernummer, REPLACE(TRIM(s.menge)+0,'.',',') as menge, s.referenz, s.place, s.layer, s.wert, s.bauform, s.zachse,s.xpos, s.ypos, s.art FROM stueckliste s LEFT JOIN artikel a ON a.id=s.artikel LEFT JOIN artikel avon ON avon.id=s.stuecklistevonartikel WHERE s.stuecklistevonartikel='$id'";
|
||||
$result = $this->app->DB->SelectArr($sql);
|
||||
}
|
||||
header('Content-type: text/csv');
|
||||
header('Content-Disposition: attachment; filename=file.csv');
|
||||
@@ -6322,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){
|
||||
|
||||
+13
-12
@@ -1,15 +1,15 @@
|
||||
<?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
|
||||
@@ -122,7 +122,8 @@ class Artikelbaum
|
||||
|
||||
public function ArtikelbaumList()
|
||||
{
|
||||
$this->app->erp->MenuEintrag('index.php?module=artikelbaum&action=list','Übersicht');
|
||||
$this->app->erp->MenuEintrag('index.php?module=artikelkategorien&action=list','Artikelkategorien');
|
||||
$this->app->erp->MenuEintrag('index.php?module=artikelbaum&action=list','Artikelbaum');
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$url = 'index.php?module=artikelbaum&action=baumajax&id='.$id;
|
||||
$this->app->Tpl->Set('URL',$url);
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 OpenXE project
|
||||
*/
|
||||
|
||||
use Xentral\Components\Database\Exception\QueryFailureException;
|
||||
|
||||
class Artikelkategorien {
|
||||
|
||||
function __construct($app, $intern = false) {
|
||||
$this->app = $app;
|
||||
if ($intern)
|
||||
return;
|
||||
|
||||
$this->app->ActionHandlerInit($this);
|
||||
$this->app->ActionHandler("list", "artikelkategorien_list");
|
||||
$this->app->ActionHandler("create", "artikelkategorien_edit"); // This automatically adds a "New" button
|
||||
$this->app->ActionHandler("edit", "artikelkategorien_edit");
|
||||
$this->app->ActionHandler("delete", "artikelkategorien_delete");
|
||||
$this->app->DefaultActionHandler("list");
|
||||
$this->app->ActionHandlerListen($app);
|
||||
}
|
||||
|
||||
public function Install() {
|
||||
/* Fill out manually later */
|
||||
}
|
||||
|
||||
static function TableSearch(&$app, $name, $erlaubtevars) {
|
||||
switch ($name) {
|
||||
case "artikelkategorien_list":
|
||||
$allowed['artikelkategorien_list'] = array('list');
|
||||
$heading = array('','','Bezeichnung', 'Projekt','Gelöscht', 'Menü');
|
||||
$width = array('1%','1%','30%','10%','1%','1%'); // Fill out manually later
|
||||
|
||||
// columns that are aligned right (numbers etc)
|
||||
// $alignright = array(4,5,6,7,8);
|
||||
|
||||
$findcols = array('a.id','a.id','a.bezeichnung', 'a.projekt');
|
||||
$searchsql = array('a.bezeichnung');
|
||||
|
||||
$defaultorder = 1;
|
||||
$defaultorderdesc = 0;
|
||||
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
|
||||
|
||||
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=artikelkategorien&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=artikelkategorien&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
||||
|
||||
$sql = "SELECT SQL_CALC_FOUND_ROWS a.id, $dropnbox, a.bezeichnung, p.abkuerzung, a.geloescht, a.id FROM artikelkategorien a LEFT JOIN projekt p ON a.projekt = p.id";
|
||||
|
||||
$where = "1";
|
||||
$count = "SELECT count(DISTINCT id) FROM artikelkategorien WHERE $where";
|
||||
// $groupby = "";
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$erg = false;
|
||||
|
||||
foreach ($erlaubtevars as $k => $v) {
|
||||
if (isset($$v)) {
|
||||
$erg[$v] = $$v;
|
||||
}
|
||||
}
|
||||
return $erg;
|
||||
}
|
||||
|
||||
function artikelkategorien_list() {
|
||||
$this->app->erp->MenuEintrag("index.php?module=artikelkategorien&action=list", "Übersicht");
|
||||
$this->app->erp->MenuEintrag("index.php?module=artikelkategorien&action=create", "Neu anlegen");
|
||||
$this->app->erp->MenuEintrag("index.php?module=artikelbaum&action=list", "Artikelbaum");
|
||||
|
||||
// $this->app->erp->MenuEintrag("index.php", "Zurück");
|
||||
|
||||
$this->app->YUI->TableSearch('TAB1', 'artikelkategorien_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||
$this->app->Tpl->Parse('PAGE', "artikelkategorien_list.tpl");
|
||||
}
|
||||
|
||||
public function artikelkategorien_delete() {
|
||||
$id = (int) $this->app->Secure->GetGET('id');
|
||||
|
||||
$this->app->DB->Delete("DELETE FROM `artikelkategorien` WHERE `id` = '{$id}'");
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gelöscht.</div>");
|
||||
|
||||
$this->artikelkategorien_list();
|
||||
}
|
||||
|
||||
/*
|
||||
* Edit artikelkategorien item
|
||||
* If id is empty, create a new one
|
||||
*/
|
||||
|
||||
function artikelkategorien_edit() {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
|
||||
// Check if other users are editing this id
|
||||
if($this->app->erp->DisableModul('artikel',$id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->app->Tpl->Set('ID', $id);
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=artikelkategorien&action=edit&id=$id", "Details");
|
||||
$this->app->erp->MenuEintrag("index.php?module=artikelkategorien&action=list", "Zurück zur Übersicht");
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$input = $this->GetInput();
|
||||
$submit = $this->app->Secure->GetPOST('submit');
|
||||
|
||||
if (empty($id)) {
|
||||
// New item
|
||||
$id = 'NULL';
|
||||
}
|
||||
|
||||
if ($submit != '')
|
||||
{
|
||||
|
||||
// Write to database
|
||||
|
||||
// Add checks here
|
||||
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
|
||||
|
||||
$columns = "id, ";
|
||||
$values = "$id, ";
|
||||
$update = "";
|
||||
|
||||
$fix = "";
|
||||
|
||||
foreach ($input as $key => $value) {
|
||||
$columns = $columns.$fix.$key;
|
||||
$values = $values.$fix."'".$value."'";
|
||||
$update = $update.$fix.$key." = '$value'";
|
||||
|
||||
$fix = ", ";
|
||||
}
|
||||
|
||||
// echo($columns."<br>");
|
||||
// echo($values."<br>");
|
||||
// echo($update."<br>");
|
||||
|
||||
$sql = "INSERT INTO artikelkategorien (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
|
||||
|
||||
// echo($sql);
|
||||
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
if ($id == 'NULL') {
|
||||
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
|
||||
header("Location: index.php?module=artikelkategorien&action=list&msg=$msg");
|
||||
} else {
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich übernommen.</div>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Load values again from database
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
|
||||
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS a.id, $dropnbox, a.bezeichnung, a.next_nummer, a.projekt, a.geloescht, a.externenummer, a.parent, a.steuer_erloese_inland_normal, a.steuer_aufwendung_inland_normal, a.steuer_erloese_inland_ermaessigt, a.steuer_aufwendung_inland_ermaessigt, a.steuer_erloese_inland_steuerfrei, a.steuer_aufwendung_inland_steuerfrei, a.steuer_erloese_inland_innergemeinschaftlich, a.steuer_aufwendung_inland_innergemeinschaftlich, a.steuer_erloese_inland_eunormal, a.steuer_erloese_inland_nichtsteuerbar, a.steuer_erloese_inland_euermaessigt, a.steuer_aufwendung_inland_nichtsteuerbar, a.steuer_aufwendung_inland_eunormal, a.steuer_aufwendung_inland_euermaessigt, a.steuer_erloese_inland_export, a.steuer_aufwendung_inland_import, a.steuertext_innergemeinschaftlich, a.steuertext_export, a.id FROM artikelkategorien a"." WHERE id=$id");
|
||||
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add displayed items later
|
||||
*
|
||||
|
||||
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
|
||||
$this->app->Tpl->Add('EMAIL', $email);
|
||||
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
||||
*/
|
||||
|
||||
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$result[0]['projekt'],false)); // Parameters: Target db?, value, from form?
|
||||
$this->app->YUI->AutoComplete('projekt', 'projektname', 1);
|
||||
|
||||
// $this->SetInput($input);
|
||||
$this->app->Tpl->Parse('PAGE', "artikelkategorien_edit.tpl");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all paramters from html form and save into $input
|
||||
*/
|
||||
public function GetInput(): array {
|
||||
$input = array();
|
||||
//$input['EMAIL'] = $this->app->Secure->GetPOST('email');
|
||||
|
||||
$input['bezeichnung'] = $this->app->Secure->GetPOST('bezeichnung');
|
||||
$input['next_nummer'] = $this->app->Secure->GetPOST('next_nummer');
|
||||
$input['projekt'] = $this->app->Secure->GetPOST('projekt');
|
||||
$input['geloescht'] = $this->app->Secure->GetPOST('geloescht');
|
||||
$input['externenummer'] = $this->app->Secure->GetPOST('externenummer');
|
||||
$input['parent'] = $this->app->Secure->GetPOST('parent');
|
||||
$input['steuer_erloese_inland_normal'] = $this->app->Secure->GetPOST('steuer_erloese_inland_normal');
|
||||
$input['steuer_aufwendung_inland_normal'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_normal');
|
||||
$input['steuer_erloese_inland_ermaessigt'] = $this->app->Secure->GetPOST('steuer_erloese_inland_ermaessigt');
|
||||
$input['steuer_aufwendung_inland_ermaessigt'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_ermaessigt');
|
||||
$input['steuer_erloese_inland_steuerfrei'] = $this->app->Secure->GetPOST('steuer_erloese_inland_steuerfrei');
|
||||
$input['steuer_aufwendung_inland_steuerfrei'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_steuerfrei');
|
||||
$input['steuer_erloese_inland_innergemeinschaftlich'] = $this->app->Secure->GetPOST('steuer_erloese_inland_innergemeinschaftlich');
|
||||
$input['steuer_aufwendung_inland_innergemeinschaftlich'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_innergemeinschaftlich');
|
||||
$input['steuer_erloese_inland_eunormal'] = $this->app->Secure->GetPOST('steuer_erloese_inland_eunormal');
|
||||
$input['steuer_erloese_inland_nichtsteuerbar'] = $this->app->Secure->GetPOST('steuer_erloese_inland_nichtsteuerbar');
|
||||
$input['steuer_erloese_inland_euermaessigt'] = $this->app->Secure->GetPOST('steuer_erloese_inland_euermaessigt');
|
||||
$input['steuer_aufwendung_inland_nichtsteuerbar'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_nichtsteuerbar');
|
||||
$input['steuer_aufwendung_inland_eunormal'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_eunormal');
|
||||
$input['steuer_aufwendung_inland_euermaessigt'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_euermaessigt');
|
||||
$input['steuer_erloese_inland_export'] = $this->app->Secure->GetPOST('steuer_erloese_inland_export');
|
||||
$input['steuer_aufwendung_inland_import'] = $this->app->Secure->GetPOST('steuer_aufwendung_inland_import');
|
||||
$input['steuertext_innergemeinschaftlich'] = $this->app->Secure->GetPOST('steuertext_innergemeinschaftlich');
|
||||
$input['steuertext_export'] = $this->app->Secure->GetPOST('steuertext_export');
|
||||
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set all fields in the page corresponding to $input
|
||||
*/
|
||||
function SetInput($input) {
|
||||
// $this->app->Tpl->Set('EMAIL', $input['email']);
|
||||
|
||||
$this->app->Tpl->Set('BEZEICHNUNG', $input['bezeichnung']);
|
||||
$this->app->Tpl->Set('NEXT_NUMMER', $input['next_nummer']);
|
||||
$this->app->Tpl->Set('PROJEKT', $input['projekt']);
|
||||
$this->app->Tpl->Set('GELOESCHT', $input['geloescht']);
|
||||
$this->app->Tpl->Set('EXTERNENUMMER', $input['externenummer']);
|
||||
$this->app->Tpl->Set('PARENT', $input['parent']);
|
||||
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_NORMAL', $input['steuer_erloese_inland_normal']);
|
||||
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_NORMAL', $input['steuer_aufwendung_inland_normal']);
|
||||
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_ERMAESSIGT', $input['steuer_erloese_inland_ermaessigt']);
|
||||
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_ERMAESSIGT', $input['steuer_aufwendung_inland_ermaessigt']);
|
||||
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_STEUERFREI', $input['steuer_erloese_inland_steuerfrei']);
|
||||
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_STEUERFREI', $input['steuer_aufwendung_inland_steuerfrei']);
|
||||
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_INNERGEMEINSCHAFTLICH', $input['steuer_erloese_inland_innergemeinschaftlich']);
|
||||
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_INNERGEMEINSCHAFTLICH', $input['steuer_aufwendung_inland_innergemeinschaftlich']);
|
||||
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_EUNORMAL', $input['steuer_erloese_inland_eunormal']);
|
||||
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_NICHTSTEUERBAR', $input['steuer_erloese_inland_nichtsteuerbar']);
|
||||
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_EUERMAESSIGT', $input['steuer_erloese_inland_euermaessigt']);
|
||||
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_NICHTSTEUERBAR', $input['steuer_aufwendung_inland_nichtsteuerbar']);
|
||||
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_EUNORMAL', $input['steuer_aufwendung_inland_eunormal']);
|
||||
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_EUERMAESSIGT', $input['steuer_aufwendung_inland_euermaessigt']);
|
||||
$this->app->Tpl->Set('STEUER_ERLOESE_INLAND_EXPORT', $input['steuer_erloese_inland_export']);
|
||||
$this->app->Tpl->Set('STEUER_AUFWENDUNG_INLAND_IMPORT', $input['steuer_aufwendung_inland_import']);
|
||||
$this->app->Tpl->Set('STEUERTEXT_INNERGEMEINSCHAFTLICH', $input['steuertext_innergemeinschaftlich']);
|
||||
$this->app->Tpl->Set('STEUERTEXT_EXPORT', $input['steuertext_export']);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+12
-21
@@ -6007,6 +6007,13 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
||||
}
|
||||
}
|
||||
|
||||
// Check for override in adresse
|
||||
$sql = "SELECT rechnung_anzahlpapier, rechnung_anzahlpapier_abweichend FROM adresse WHERE id =".$adresse;
|
||||
$rechnung_anzahlpapier = $this->app->DB->SelectArr($sql);
|
||||
if ($rechnung_anzahlpapier[0]['rechnung_anzahlpapier_abweichend']) {
|
||||
$autodruckrechnungstufe1menge = $rechnung_anzahlpapier[0]['rechnung_anzahlpapier'];
|
||||
}
|
||||
|
||||
if($exportdruckrechnungstufe1)
|
||||
{
|
||||
if(!empty($projektarr))
|
||||
@@ -6020,9 +6027,6 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
||||
$exportdruckrechnungstufe1 = $this->app->erp->Export($exportland);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(($autodruckrechnungstufe1=='1' || $exportdruckrechnungstufe1) && $rechnung > 0)
|
||||
{
|
||||
$this->app->DB->Update("UPDATE rechnung SET status='versendet', versendet='1',schreibschutz='1' WHERE id='$rechnung' LIMIT 1");
|
||||
@@ -6713,27 +6717,11 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
||||
{
|
||||
|
||||
// refresh all open items
|
||||
$openids = $this->app->DB->SelectArr("SELECT id, gesamtsumme, waehrung from auftrag WHERE status <> 'abgeschlossen'");
|
||||
|
||||
$openids = $this->app->DB->SelectArr("SELECT id from auftrag WHERE status <> 'abgeschlossen'");
|
||||
foreach ($openids as $openid) {
|
||||
$saldo = $this->app->erp->GetSaldoDokument($openid['id'],'auftrag');
|
||||
if (!empty($saldo)) {
|
||||
if ($saldo['waehrung'] == $openid['waehrung'] && $saldo['betrag'] >= $openid['gesamtsumme']) {
|
||||
$sql = "UPDATE
|
||||
auftrag
|
||||
SET
|
||||
vorkasse_ok = 1
|
||||
WHERE id=".$openid['id'];
|
||||
$this->app->DB->Update($sql);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->app->DB->Update("UPDATE auftrag SET vorkasse_ok = 0 WHERE id=".$openid['id']);
|
||||
}
|
||||
$this->app->erp->AuftragAutoversandBerechnen($openid['id']);
|
||||
}
|
||||
|
||||
|
||||
if($this->app->Secure->GetPOST('ausfuehren') && $this->app->erp->RechteVorhanden('auftrag', 'edit'))
|
||||
{
|
||||
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
||||
@@ -7329,6 +7317,9 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
|
||||
$this->app->erp->AuftragProtokoll($id,"Teilauftrag $belegnr_neu erstellt");
|
||||
$this->app->erp->PDFArchivieren('auftrag', $id, true);
|
||||
|
||||
header('Location: index.php?module=auftrag&action=edit&id='.$id_neu);
|
||||
|
||||
}
|
||||
|
||||
@@ -775,7 +775,8 @@ class Bestellung extends GenBestellung
|
||||
|
||||
$tmp3->DisplayNew('PDFARCHIV','Menü',"noAction");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
$wareneingangsbelege = $this->app->DB->SelectFirstCols("SELECT
|
||||
CONCAT('<a href=\"index.php?module=receiptdocument&action=edit&id=',r.id,'\" target=\"_blank\"',if(r.status='storniert',' title=\"Wareneingangsbeleg storniert\"><s>','>'),if(r.document_number='0' OR document_number='','ENTWURF',r.document_number),if(r.status='storniert','</s>',''),'</a> <a href=\"index.php?module=receiptdocument&action=pdf&id=',r.id,'\" target=\"_blank\"><img src=\"./themes/new/images/pdf.svg\" title=\"Wareneingangsbeleg PDF\" border=\"0\"></a>
|
||||
<a href=\"index.php?module=receiptdocument&action=edit&id=',r.id,'\" target=\"_blank\"><img src=\"./themes/new/images/edit.svg\" title=\"Wareneingangsbeleg bearbeiten\" border=\"0\"></a>') as wareneingangsbeleg
|
||||
@@ -787,6 +788,30 @@ class Bestellung extends GenBestellung
|
||||
else{
|
||||
$this->app->Tpl->Set('WARENEINGANGSBELEG', '-');
|
||||
}
|
||||
*/
|
||||
|
||||
$sql = "SELECT
|
||||
CONCAT('<a href =\"index.php?module=wareneingang&action=distriinhalt&id=',pa.id,'\">',pa.id,'</a>') as wareneingang
|
||||
FROM
|
||||
paketannahme pa
|
||||
INNER JOIN paketdistribution pd ON
|
||||
pd.paketannahme = pa.id
|
||||
INNER JOIN bestellung_position bp ON
|
||||
pd.bestellung_position = bp.id
|
||||
INNER JOIN bestellung b ON
|
||||
b.id = bp.bestellung
|
||||
WHERE
|
||||
b.id = $id
|
||||
GROUP BY
|
||||
pa.id";
|
||||
// echo($sql);
|
||||
$wareneingangsbelege = $this->app->DB->SelectArr($sql);
|
||||
if(!empty($wareneingangsbelege)){
|
||||
$this->app->Tpl->Add('WARENEINGANGSBELEG', implode('<br />', array_column($wareneingangsbelege , 'wareneingang' )));
|
||||
}
|
||||
else{
|
||||
$this->app->Tpl->Set('WARENEINGANGSBELEG', '-');
|
||||
}
|
||||
|
||||
|
||||
$this->app->Tpl->Set('ID', $id);
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bearbeiter:</td>
|
||||
<td colspan="3"><input type="text" name="von" id="von" value="[SENDER]" style="width: 370px;"></td>
|
||||
<td colspan="3"><input type="text" name="von" id="von" value="[BEARBEITER]" style="width: 370px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100">{|Projekt|}:</td>
|
||||
|
||||
@@ -0,0 +1,455 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1"></a></li>
|
||||
</ul>
|
||||
<!-- Example for multiple tabs
|
||||
<ul hidden">
|
||||
<li><a href="#tabs-1">First Tab</a></li>
|
||||
<li><a href="#tabs-2">Second Tab</a></li>
|
||||
</ul>
|
||||
-->
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
<form action="" method="post">
|
||||
[FORMHANDLEREVENT]
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|Artikelkategorien|}</legend><i>Info like this.</i>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
{|Bezeichnung|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="bezeichnung" id="bezeichnung" value="[BEZEICHNUNG]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Next_nummer|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="next_nummer" id="next_nummer" value="[NEXT_NUMMER]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Projekt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Geloescht|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="geloescht" id="geloescht" value="[GELOESCHT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Externenummer|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="externenummer" id="externenummer" value="[EXTERNENUMMER]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Parent|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="parent" id="parent" value="[PARENT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_normal|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_normal" id="steuer_erloese_inland_normal" value="[STEUER_ERLOESE_INLAND_NORMAL]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_normal|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_normal" id="steuer_aufwendung_inland_normal" value="[STEUER_AUFWENDUNG_INLAND_NORMAL]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_ermaessigt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_ermaessigt" id="steuer_erloese_inland_ermaessigt" value="[STEUER_ERLOESE_INLAND_ERMAESSIGT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_ermaessigt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_ermaessigt" id="steuer_aufwendung_inland_ermaessigt" value="[STEUER_AUFWENDUNG_INLAND_ERMAESSIGT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_steuerfrei|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_steuerfrei" id="steuer_erloese_inland_steuerfrei" value="[STEUER_ERLOESE_INLAND_STEUERFREI]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_steuerfrei|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_steuerfrei" id="steuer_aufwendung_inland_steuerfrei" value="[STEUER_AUFWENDUNG_INLAND_STEUERFREI]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_innergemeinschaftlich|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_innergemeinschaftlich" id="steuer_erloese_inland_innergemeinschaftlich" value="[STEUER_ERLOESE_INLAND_INNERGEMEINSCHAFTLICH]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_innergemeinschaftlich|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_innergemeinschaftlich" id="steuer_aufwendung_inland_innergemeinschaftlich" value="[STEUER_AUFWENDUNG_INLAND_INNERGEMEINSCHAFTLICH]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_eunormal|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_eunormal" id="steuer_erloese_inland_eunormal" value="[STEUER_ERLOESE_INLAND_EUNORMAL]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_nichtsteuerbar|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_nichtsteuerbar" id="steuer_erloese_inland_nichtsteuerbar" value="[STEUER_ERLOESE_INLAND_NICHTSTEUERBAR]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_euermaessigt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_euermaessigt" id="steuer_erloese_inland_euermaessigt" value="[STEUER_ERLOESE_INLAND_EUERMAESSIGT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_nichtsteuerbar|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_nichtsteuerbar" id="steuer_aufwendung_inland_nichtsteuerbar" value="[STEUER_AUFWENDUNG_INLAND_NICHTSTEUERBAR]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_eunormal|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_eunormal" id="steuer_aufwendung_inland_eunormal" value="[STEUER_AUFWENDUNG_INLAND_EUNORMAL]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_euermaessigt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_euermaessigt" id="steuer_aufwendung_inland_euermaessigt" value="[STEUER_AUFWENDUNG_INLAND_EUERMAESSIGT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_export|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_export" id="steuer_erloese_inland_export" value="[STEUER_ERLOESE_INLAND_EXPORT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_import|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_import" id="steuer_aufwendung_inland_import" value="[STEUER_AUFWENDUNG_INLAND_IMPORT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuertext_innergemeinschaftlich|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuertext_innergemeinschaftlich" id="steuertext_innergemeinschaftlich" value="[STEUERTEXT_INNERGEMEINSCHAFTLICH]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuertext_export|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuertext_export" id="steuertext_export" value="[STEUERTEXT_EXPORT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Example for 2nd row
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|Another legend|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
{|Bezeichnung|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="bezeichnung" id="bezeichnung" value="[BEZEICHNUNG]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Next_nummer|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="next_nummer" id="next_nummer" value="[NEXT_NUMMER]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Projekt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Geloescht|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="geloescht" id="geloescht" value="[GELOESCHT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Externenummer|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="externenummer" id="externenummer" value="[EXTERNENUMMER]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Parent|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="parent" id="parent" value="[PARENT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_normal|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_normal" id="steuer_erloese_inland_normal" value="[STEUER_ERLOESE_INLAND_NORMAL]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_normal|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_normal" id="steuer_aufwendung_inland_normal" value="[STEUER_AUFWENDUNG_INLAND_NORMAL]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_ermaessigt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_ermaessigt" id="steuer_erloese_inland_ermaessigt" value="[STEUER_ERLOESE_INLAND_ERMAESSIGT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_ermaessigt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_ermaessigt" id="steuer_aufwendung_inland_ermaessigt" value="[STEUER_AUFWENDUNG_INLAND_ERMAESSIGT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_steuerfrei|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_steuerfrei" id="steuer_erloese_inland_steuerfrei" value="[STEUER_ERLOESE_INLAND_STEUERFREI]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_steuerfrei|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_steuerfrei" id="steuer_aufwendung_inland_steuerfrei" value="[STEUER_AUFWENDUNG_INLAND_STEUERFREI]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_innergemeinschaftlich|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_innergemeinschaftlich" id="steuer_erloese_inland_innergemeinschaftlich" value="[STEUER_ERLOESE_INLAND_INNERGEMEINSCHAFTLICH]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_innergemeinschaftlich|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_innergemeinschaftlich" id="steuer_aufwendung_inland_innergemeinschaftlich" value="[STEUER_AUFWENDUNG_INLAND_INNERGEMEINSCHAFTLICH]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_eunormal|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_eunormal" id="steuer_erloese_inland_eunormal" value="[STEUER_ERLOESE_INLAND_EUNORMAL]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_nichtsteuerbar|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_nichtsteuerbar" id="steuer_erloese_inland_nichtsteuerbar" value="[STEUER_ERLOESE_INLAND_NICHTSTEUERBAR]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_euermaessigt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_euermaessigt" id="steuer_erloese_inland_euermaessigt" value="[STEUER_ERLOESE_INLAND_EUERMAESSIGT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_nichtsteuerbar|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_nichtsteuerbar" id="steuer_aufwendung_inland_nichtsteuerbar" value="[STEUER_AUFWENDUNG_INLAND_NICHTSTEUERBAR]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_eunormal|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_eunormal" id="steuer_aufwendung_inland_eunormal" value="[STEUER_AUFWENDUNG_INLAND_EUNORMAL]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_euermaessigt|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_euermaessigt" id="steuer_aufwendung_inland_euermaessigt" value="[STEUER_AUFWENDUNG_INLAND_EUERMAESSIGT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_erloese_inland_export|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_erloese_inland_export" id="steuer_erloese_inland_export" value="[STEUER_ERLOESE_INLAND_EXPORT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuer_aufwendung_inland_import|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuer_aufwendung_inland_import" id="steuer_aufwendung_inland_import" value="[STEUER_AUFWENDUNG_INLAND_IMPORT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuertext_innergemeinschaftlich|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuertext_innergemeinschaftlich" id="steuertext_innergemeinschaftlich" value="[STEUERTEXT_INNERGEMEINSCHAFTLICH]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Steuertext_export|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="steuertext_export" id="steuertext_export" value="[STEUERTEXT_EXPORT]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||
</form>
|
||||
</div>
|
||||
<!-- Example for 2nd tab
|
||||
<div id="tabs-2">
|
||||
[MESSAGE]
|
||||
<form action="" method="post">
|
||||
[FORMHANDLEREVENT]
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|...|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
...
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
[TAB1]
|
||||
[TAB1NEXT]
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,4 +1,7 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">Allgemein</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
<form action="" method="post">
|
||||
@@ -11,11 +14,11 @@
|
||||
<legend>{|Einstellungen|}</legend>
|
||||
|
||||
<td>{|Absatz berücksichtigen (Monate)|}:</td>
|
||||
<td><input type="number" min="0" name="monate_absatz" id="monate_absatz" value="[MONATE_ABSATZ]" size="20""></td>
|
||||
<td><input type="number" min="0" name="monate_absatz" id="monate_absatz" value="[MONATE_ABSATZ]" size="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{|Vorausplanen (Monate)|}:</td>
|
||||
<td><input type="number" min="0" name="monate_voraus" id="monate_voraus" value="[MONATE_VORAUS]" size="20""></td>
|
||||
<td><input type="number" min="0" name="monate_voraus" id="monate_voraus" value="[MONATE_VORAUS]" size="20"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -68,13 +68,13 @@
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=versandarten&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=zahlungsweisen&action=list"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a></td>
|
||||
<td width="25%" style="position:relative"><a [LIEFERBEDINGUNGENLINK]><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_16.gif" border="0" width="30%"></a>[GREYLIEFERBEDINGUNGEN]</td>
|
||||
<td width="25%"></td>
|
||||
<td width="25%" style="position:relative"><a href="index.php?module=mahnwesen&action=einstellungen"><img src="./themes/[THEME]/images/einstellungen/Icons_dunkel_11.gif" border="0" width="30%"></a></td>
|
||||
</tr>
|
||||
<tr align="center">
|
||||
<td><a href="index.php?module=versandarten&action=list">{|Versandarten|}</a></td>
|
||||
<td><a href="index.php?module=zahlungsweisen&action=list">{|Zahlungsweisen|}</a></td>
|
||||
<td><a [LIEFERBEDINGUNGENLINK]>{|Lieferbedingungen|}</a></td>
|
||||
<td></td>
|
||||
<td><a href="index.php?module=mahnwesen&action=einstellungen">{|Mahnwesen|}</a></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
@@ -100,8 +100,8 @@
|
||||
<legend>{|Ticketsystem|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr><td>{|ticket|}:</td><td><input type="text" name="ticket" value="[TICKET]" size="40"></td></tr>
|
||||
<tr><td>{|ticketprojekt|}:</td><td><input type="text" name="ticketprojekt" value="[TICKETPROJEKT]" size="40"></td></tr>
|
||||
<tr><td>{|ticketqueue|}:</td><td><input type="text" name="ticketqueue" value="[TICKETQUEUE]" size="40"></td></tr>
|
||||
<tr><td>{|ticketprojekt|}:</td><td><input type="text" id="ticketprojekt" name="ticketprojekt" value="[TICKETPROJEKT]" size="40"></td></tr>
|
||||
<tr><td>{|ticketqueue|}:</td><td><input type="text" id="ticketqueue" name="ticketqueue" value="[TICKETQUEUE]" size="40"></td></tr>
|
||||
<tr><td>{|abdatum|}:</td><td><input type="text" name="abdatum" value="[ABDATUM]" size="40"></td></tr>
|
||||
<tr><td>{|ticketloeschen|}:</td><td><input type="text" name="ticketloeschen" value="[TICKETLOESCHEN]" size="40"></td></tr>
|
||||
<tr><td>{|ticketabgeschlossen|}:</td><td><input type="text" name="ticketabgeschlossen" value="[TICKETABGESCHLOSSEN]" size="40"></td></tr>
|
||||
@@ -121,16 +121,16 @@
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr><td>{|autosresponder_blacklist|}:</td><td><input type="text" name="autosresponder_blacklist" value="[AUTOSRESPONDER_BLACKLIST]" size="40"></td></tr>
|
||||
<tr><td>{|eigenesignatur|}:</td><td><input type="text" name="eigenesignatur" value="[EIGENESIGNATUR]" size="40"></td></tr>
|
||||
<tr><td>{|signatur|}:</td><td><input type="text" name="signatur" value="[SIGNATUR]" size="40"></td></tr>
|
||||
<tr><td>{|adresse|}:</td><td><input type="text" name="adresse" value="[ADRESSE]" size="40"></td></tr>
|
||||
<tr><td>{|signatur|}:</td><td><textarea id="signatur" name="signatur" rows="6" style="width:100%;">[SIGNATUR]</textarea></td></tr>
|
||||
<tr><td>{|adresse|}:</td><td><input type="text" id="adresse" name="adresse" value="[ADRESSE]" size="40"></td></tr>
|
||||
<tr><td>{|firma|}:</td><td><input type="text" name="firma" value="[FIRMA]" size="40"></td></tr>
|
||||
<tr><td>{|geloescht|}:</td><td><input type="text" name="geloescht" value="[GELOESCHT]" size="40"></td></tr>
|
||||
<tr><td>{|mutex|}:</td><td><input type="text" name="mutex" value="[MUTEX]" size="40"></td></tr>
|
||||
<tr><td>{|autoresponder|}:</td><td><input type="text" name="autoresponder" value="[AUTORESPONDER]" size="40"></td></tr>
|
||||
<tr><td>{|geschaeftsbriefvorlage|}:</td><td><input type="text" name="geschaeftsbriefvorlage" value="[GESCHAEFTSBRIEFVORLAGE]" size="40"></td></tr>
|
||||
<tr><td>{|autoresponderbetreff|}:</td><td><input type="text" name="autoresponderbetreff" value="[AUTORESPONDERBETREFF]" size="40"></td></tr>
|
||||
<tr><td>{|autorespondertext|}:</td><td><input type="text" name="autorespondertext" value="[AUTORESPONDERTEXT]" size="40"></td></tr>
|
||||
<tr><td>{|projekt|}:</td><td><input type="text" name="projekt" value="[PROJEKT]" size="40"></td></tr>
|
||||
<tr><td>{|autoresponderbetreff|}:</td><td><textarea id="autoresponderbetreff" name="autoresponderbetreff" rows="6" style="width:100%;">[AUTORESPONDERBETREFF]</textarea></td></tr>
|
||||
<tr><td>{|autorespondertext|}:</td><td><textarea id="autorespondertext" name="autorespondertext" rows="6" style="width:100%;">[AUTORESPONDERTEXT]</textarea></td></tr>
|
||||
<tr><td>{|projekt|}:</td><td><input type="text" id="projekt" name="projekt" value="[PROJEKT]" size="40"></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -39,6 +39,14 @@
|
||||
<td>Projekt:</td>
|
||||
<td><input type="text" name="projekt" id="projekt" value="[PROJEKT]" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Differenzen (Kopf/Positionen) ignorieren:</td>
|
||||
<td><input type="checkbox" name="diffignore" value="1" [DIFFIGNORE] /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Konto für Differenzen:</td>
|
||||
<td><input type="text" name="sachkonto" id="sachkonto" value="[SACHKONTO]" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -1109,7 +1109,10 @@
|
||||
<legend>{|Finanzbuchhaltung Einstellungen|}</legend>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="300">Buchungen erzeugen ab Datum:</td><td colspan="3"><input type="text" id= "fibu_buchungen_startdatum" name="fibu_buchungen_startdatum" size="10" value="[FIBU_BUCHUNGEN_STARTDATUM]"></td>
|
||||
<td width="300">Buchungen erzeugen ab Datum:</td><td colspan="3"><input type="text" id= "fibu_buchungen_startdatum" name="fibu_buchungen_startdatum" size="10" value="[FIBU_BUCHUNGEN_STARTDATUM]"><i>Für die Nutzung mit dem Modul Buchhaltung-Buchungen (Zahlungseingang, Zahlungsstatus, Mahnwesen)</i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="300">Konto für Rechnung-Skontobuchungen:</td><td colspan="3"><input type="text" id= "rechnung_skonto_kontorahmen" name="rechnung_skonto_kontorahmen" size="10" value="[RECHNUNG_SKONTO_KONTORAHMEN]"><i>Auf dieses Sachkonto werden Skontobuchungen mithilfe der Funktion "Zahlungsstatus berechnen" im Rechnungsmodul gebucht</i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<tr>
|
||||
<td><input type="checkbox" id="angeboteoffen"> Fehlende Artikel</td>
|
||||
<td><input type="checkbox" id="angeboteoffen"> Artikel im Zulauf</td>
|
||||
<td><input type="checkbox" id="angeboteheute"> Gersperrte Artikel</td>
|
||||
<td><input type="checkbox" id="angeboteheute"> Gesperrte Artikel</td>
|
||||
<td>Artikelgruppen: <select><option>alle</option><option>Waren 700000</option></select></td>
|
||||
</tr></table>
|
||||
</center>
|
||||
@@ -121,6 +121,7 @@
|
||||
<li>{|ZahlungDiff|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {GESAMT}, {REST}, {ANSCHREIBEN}, {INTERNET}</i></li>
|
||||
<li>{|Stornierung|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {INTERNET}</i></li>
|
||||
<li>{|ZahlungMiss|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {GESAMT}, {REST}, {ANSCHREIBEN}, {INTERNET}</i></li>
|
||||
<li>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>{|VersandMailDokumente|} <i>{|Variablen|}: {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}</i></li>
|
||||
<li>{|Erweiterte Freigabe|} <i>{|Variablen|}: {REQUESTER}, {LINK}, {LINKFREIGABEUEBERSICHT}, {DOCTYPE}, {DOCTYPE_ID}</i></li>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<li><a href="#tabs-5">{|Notizen|}</a></li>
|
||||
<li><a href="#tabs-6">{|Kontenrahmen|}</a></li>
|
||||
<li><a href="#tabs-7">{|Kontoauszug|}</a></li>
|
||||
<li><a href="#tabs-8">{|Stückliste|}</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="tabs-1">
|
||||
@@ -612,6 +613,83 @@
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tabs-8">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-1 col-sm-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset><legend>{|Stückliste|}</legend>
|
||||
<table class="mkTable">
|
||||
<tr>
|
||||
<th>Variable</th>
|
||||
<th>Beschreibung</th>
|
||||
<th>Kommentar</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>stuecklistevonartikel</td>
|
||||
<td>Hauptartikel (muss eine Stückliste sein)</td>
|
||||
<td>Artikelnummer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>artikel</td>
|
||||
<td></td>
|
||||
<td>Artikelnummer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>menge</td>
|
||||
<td>Zahl</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>referenz</td>
|
||||
<td>Text</td>
|
||||
<td>Für Bestückungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>place</td>
|
||||
<td>Leer oder 'DNP' = Nicht platzieren</td>
|
||||
<td>Für Bestückungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>layer</td>
|
||||
<td>"top" oder "bottom"</td>
|
||||
<td>Für Bestückungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>wert</td>
|
||||
<td>Text</td>
|
||||
<td>Für Bestückungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bauform</td>
|
||||
<td>Text</td>
|
||||
<td>Für Bestückungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zachse</td>
|
||||
<td>Zahl</td>
|
||||
<td>Für Bestückungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>xpos</td>
|
||||
<td>Zahl</td>
|
||||
<td>Für Bestückungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ypos</td>
|
||||
<td>Zahl</td>
|
||||
<td>Für Bestückungen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>art</td>
|
||||
<td>Einkaufsteil "et",Informationsteil "it" oder Beistellung "bt"</td>
|
||||
<td>Alternativposition?</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div id="tabs-1">
|
||||
<form action="#tabs-1" id="frmauto" name="frmauto" method="post">
|
||||
[MESSAGE]
|
||||
<legend>Salden müssen über Gegenbuchungen ausgeglichen werden.</legend>
|
||||
<legend>Kontoauszüge bitte über Importzentrale importieren.</legend>
|
||||
[TAB1]
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1"></a></li>
|
||||
</ul>
|
||||
<!-- Example for multiple tabs
|
||||
<ul hidden">
|
||||
<li><a href="#tabs-1">First Tab</a></li>
|
||||
<li><a href="#tabs-2">Second Tab</a></li>
|
||||
</ul>
|
||||
-->
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
<form action="" method="post">
|
||||
[FORMHANDLEREVENT]
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|<!--Legend for this form area goes here>-->Mahnwesen-Einstellungen|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
{|Name|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="name" id="name" value="[NAME]" size="20"><i>Entspricht "Typ" in der Geschäftsbrief-Vorlage</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Tage|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" name="tage" id="tage" value="[TAGE]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Gebuehr|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" step="0.01" name="gebuehr" id="gebuehr" value="[GEBUEHR]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|E-Mail senden|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="mail" id="mail" [MAIL] size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Mahnung ausdrucken|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="druck" id="druck" [DRUCK] size="20">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Example for 2nd row
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|Another legend|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
{|Name|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="name" id="name" value="[NAME]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Tage|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="tage" id="tage" value="[TAGE]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Gebuehr|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="gebuehr" id="gebuehr" value="[GEBUEHR]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Versandmethode|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="versandmethode" id="versandmethode" value="[VERSANDMETHODE]" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||
</form>
|
||||
</div>
|
||||
<!-- Example for 2nd tab
|
||||
<div id="tabs-2">
|
||||
[MESSAGE]
|
||||
<form action="" method="post">
|
||||
[FORMHANDLEREVENT]
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|...|}</legend>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
...
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" name="submit" value="Speichern" style="float:right"/>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
[TAB1]
|
||||
[TAB1NEXT]
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,64 @@
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
<form method="post" action="#">
|
||||
<div class="filter-box filter-usersave">
|
||||
<div class="filter-block filter-inline">
|
||||
<div class="filter-title">{|Filter|}</div>
|
||||
<ul class="filter-list">
|
||||
<li class="filter-item">
|
||||
<label for="zu_mahnen" class="switch">
|
||||
<input type="checkbox" id="zu_mahnen">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="zu_mahnen">{|Nur zu mahnende|}</label>
|
||||
</li>
|
||||
<li class="filter-item">
|
||||
<label for="inkl_bezahlte" class="switch">
|
||||
<input type="checkbox" id="inkl_bezahlte">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="inkl_bezahlte">{|Inkl. bezahlte|}</label>
|
||||
</li>
|
||||
<li class="filter-item">
|
||||
<label for="inkl_gesperrte" class="switch">
|
||||
<input type="checkbox" id="inkl_gesperrte">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="inkl_gesperrte">{|Inkl. gesperrte|}</label>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="submit" class="btnBlue" name="mahnstufe_berechnen" value="{|Mahnstufe berechnen|}" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form method="post" action="#">
|
||||
[MESSAGE]
|
||||
[TAB1]
|
||||
[TAB1NEXT]
|
||||
<fieldset>
|
||||
<legend>{|Stapelverarbeitung|}</legend>
|
||||
<input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" /> {|alle markieren|}
|
||||
<select id="sel_aktion" name="sel_aktion">
|
||||
<option value="">{|bitte wählen|} ...</option>
|
||||
[ALSBEZAHLTMARKIEREN]
|
||||
<option value="offen">{|als offen markieren|}</option>
|
||||
<option value="mahnung_reset">{|Mahnstatus zurücksetzen|}</option>
|
||||
<option value="mahnen">{|Mahnung durchführen|}</option>
|
||||
<!-- <option value="email">{|Mahnung durchführen (nur E-Mail)|}</option>
|
||||
<option value="email">{|Mahnung durchführen (nur Drucken)|}</option> -->
|
||||
</select> {|Drucker|}: <select name="seldrucker">[SELDRUCKER]</select> <input type="submit" class="btnBlue" name="ausfuehren" value="{|ausführen|}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function alleauswaehlen()
|
||||
{
|
||||
var wert = $('#auswahlalle').prop('checked');
|
||||
$('#mahnwesen_list').find(':checkbox').prop('checked',wert);
|
||||
}
|
||||
</script>
|
||||
@@ -39,9 +39,13 @@
|
||||
<label for="rechnungenstorniert">{|Storniert|}</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<form method="post" action="#">
|
||||
<input type="submit" class="btnBlue" name="zahlungsstatus_berechnen" value="{|Zahlungsstatus berechnen|}" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
[MESSAGE]
|
||||
<form method="post" action="#">
|
||||
[TAB1]
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<input type="checkbox" id="report-list-filter-own">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<label for="report-list-filter-own">{|Nur eigene|}</label>
|
||||
<label for="report-list-filter-own">{|Inkl. Vorlagen|}</label>
|
||||
</li>
|
||||
<li class="filter-item">
|
||||
<label for="report-list-filter-favorites" class="switch">
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
|
||||
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">Übersicht</a></li>
|
||||
<!--<li><a href="#tabs-2">neue Position anlegen</a></li>-->
|
||||
<li><a href="#tabs-3">Stückliste importieren</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- erstes tab -->
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<ul>
|
||||
<li><a href="#tabs-1">Übersicht</a></li>
|
||||
<li><a href="#tabs-2">neue Position anlegen</a></li>
|
||||
<li><a href="#tabs-3">Stückliste importieren</a></li>
|
||||
<!-- DEPRECATED moved to importvorlage <li><a href="#tabs-3">Stückliste importieren</a></li> -->
|
||||
</ul>
|
||||
|
||||
<!-- erstes tab -->
|
||||
@@ -26,4 +26,4 @@
|
||||
|
||||
<!-- tab view schließen -->
|
||||
</div>
|
||||
<!-- ende tab view schließen -->
|
||||
<!-- ende tab view schließen -->
|
||||
|
||||
@@ -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] [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>
|
||||
|
||||
|
||||
|
||||
@@ -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ü die Verarbeitung bei Ticketeingang. Platzhalter werden mit % angegeben.</i>
|
||||
<legend>{|Ticketregeln|}</legend><i>Ticketregeln für die Verarbeitung bei Ticketeingang. Platzhalter werden mit % angegeben.</i>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr><td>{|E-Mail Empfänger|}:</td><td><input type="text" name="empfaenger_email" value="[EMPFAENGER_EMAIL]" size="40"></td></tr>
|
||||
<tr><td>{|E-Mail Verfasser|}:</td><td><input type="text" name="sender_email" value="[SENDER_EMAIL]" size="40"></td></tr>
|
||||
<tr><td>{|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ö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ö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,5 +1,10 @@
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
[TAB1]
|
||||
[TAB1NEXT]
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
[MESSAGE]
|
||||
[TAB1]
|
||||
[TAB1NEXT]
|
||||
</div>
|
||||
</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 ä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 ä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>
|
||||
|
||||
@@ -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ü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ß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>
|
||||
|
||||
@@ -112,6 +112,10 @@ $width = array('10%'); // Fill out manually later
|
||||
// Write to database
|
||||
|
||||
// Add checks here
|
||||
$input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
|
||||
$input['ticketprojekt'] = $this->app->erp->ReplaceProjekt(true,$input['ticketprojekt'],true); // Parameters: Target db?, value, from form?
|
||||
$input['adresse'] = $this->app->erp->ReplaceAdresse(true,$input['adresse'],true); // Parameters: Target db?, value, from form?
|
||||
$input['ticketqueue'] = explode(" ",$input['ticketqueue'])[0]; // Just the label
|
||||
|
||||
$columns = "id, ";
|
||||
$values = "$id, ";
|
||||
@@ -168,6 +172,17 @@ $width = array('10%'); // Fill out manually later
|
||||
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
||||
*/
|
||||
|
||||
$this->app->YUI->CkEditor("signatur","internal", null, 'JQUERY');
|
||||
$this->app->YUI->CkEditor("autoresponderbetreff","internal", null, 'JQUERY');
|
||||
$this->app->YUI->CkEditor("autorespondertext","internal", null, 'JQUERY');
|
||||
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$result[0]['projekt'],false)); // Parameters: Target db?, value, from form?
|
||||
$this->app->Tpl->Set('TICKETPROJEKT',$this->app->erp->ReplaceProjekt(false,$result[0]['ticketprojekt'],false)); // Parameters: Target db?, value, from form?
|
||||
$this->app->Tpl->Set('ADRESSE', $this->app->erp->ReplaceAdresse(false,$result[0]['adresse'],false)); // Convert ID to form display
|
||||
$this->app->YUI->AutoComplete("projekt","projektname",1);
|
||||
$this->app->YUI->AutoComplete("ticketprojekt","projektname",1);
|
||||
$this->app->YUI->AutoComplete("adresse","adresse");
|
||||
$this->app->YUI->AutoComplete("ticketqueue","warteschlangename");
|
||||
$this->app->YUI->AutoComplete("ticketprojekt","projektname",1);
|
||||
$this->app->Tpl->Parse('PAGE', "emailbackup_edit.tpl");
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,14 @@ class Exportbuchhaltung
|
||||
$rgchecked = $this->app->Secure->GetPOST("rechnung");
|
||||
$gschecked = $this->app->Secure->GetPOST("gutschrift");
|
||||
$vbchecked = $this->app->Secure->GetPOST("verbindlichkeit");
|
||||
$diffignore = $this->app->Secure->GetPOST("diffignore");
|
||||
$sachkonto = $this->app->Secure->GetPOST('sachkonto');
|
||||
|
||||
$account_id = null;
|
||||
if (!empty($sachkonto)) {
|
||||
$sachkonto_kennung = explode(' ',$sachkonto)[0];
|
||||
$account_id = $this->app->DB->SelectArr("SELECT id from kontorahmen WHERE sachkonto = '".$sachkonto_kennung."'")[0]['id'];
|
||||
}
|
||||
|
||||
$msg = "";
|
||||
|
||||
@@ -151,7 +159,7 @@ class Exportbuchhaltung
|
||||
if ($dataok) {
|
||||
$filename = "EXTF_".date('Ymd') . "_Buchungsstapel_DATEV_export.csv";
|
||||
try {
|
||||
$csv = $this->DATEV_Buchuchungsstapel($rgchecked, $gschecked, $vbchecked, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename);
|
||||
$csv = $this->DATEV_Buchuchungsstapel($rgchecked, $gschecked, $vbchecked, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename, $diffignore, $sachkonto_kennung);
|
||||
header("Content-Disposition: attachment; filename=" . $filename);
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
@@ -183,25 +191,28 @@ class Exportbuchhaltung
|
||||
$this->app->YUI->AutoComplete("projekt", "projektname", 1);
|
||||
$this->app->YUI->DatePicker("von");
|
||||
$this->app->YUI->DatePicker("bis");
|
||||
$this->app->YUI->AutoComplete('sachkonto', 'sachkonto');
|
||||
|
||||
$this->app->Tpl->SET('MESSAGE', $msg);
|
||||
|
||||
$this->app->Tpl->SET('RGCHECKED',$rgchecked?'checked':'');
|
||||
$this->app->Tpl->SET('GSCHECKED',$gschecked?'checked':'');
|
||||
$this->app->Tpl->SET('VBCHECKED',$vbchecked?'checked':'');
|
||||
$this->app->Tpl->SET('DIFFIGNORE',$diffignore?'checked':'');
|
||||
|
||||
$this->app->Tpl->SET('VON', $von_form);
|
||||
$this->app->Tpl->SET('BIS', $bis_form);
|
||||
$this->app->Tpl->SET('PROJEKT', $projektkuerzel);
|
||||
$this->app->Tpl->SET('PROJEKT', $projektkuerzel);
|
||||
$this->app->Tpl->SET('SACHKONTO', $sachkonto);
|
||||
|
||||
$this->app->Tpl->Parse('PAGE', "exportbuchhaltung_export.tpl");
|
||||
}
|
||||
|
||||
/*
|
||||
* Create DATEV Buchhungsstapel
|
||||
* @throws ConsistencyException with string (list of items) if consistency check fails
|
||||
* @throws ConsistencyException with string (list of items) if consistency check fails and no sachkonto for differences is given
|
||||
*/
|
||||
function DATEV_Buchuchungsstapel(bool $rechnung, bool $gutschrift, bool $verbindlichkeit, string $berater, string $mandant, datetime $wj_beginn, int $sachkontenlaenge, datetime $von, datetime $bis, int $projekt = 0, string $filename = 'EXTF_Buchungsstapel_DATEV_export.csv') : string {
|
||||
function DATEV_Buchuchungsstapel(bool $rechnung, bool $gutschrift, bool $verbindlichkeit, string $berater, string $mandant, datetime $wj_beginn, int $sachkontenlaenge, datetime $von, datetime $bis, int $projekt = 0, string $filename = 'EXTF_Buchungsstapel_DATEV_export.csv', $diffignore = false, $sachkonto_differences) : string {
|
||||
|
||||
$datev_header_definition = array (
|
||||
'1' => 'Kennzeichen',
|
||||
@@ -499,7 +510,8 @@ class Exportbuchhaltung
|
||||
b.".$typ['field_date']." as datum,
|
||||
p.id as pos_id,
|
||||
".$typ['field_betrag_gesamt']." as betrag_gesamt,
|
||||
".$typ['field_betrag']." as betrag,
|
||||
b.waehrung,
|
||||
ROUND(".$typ['field_betrag'].",2) as betrag,
|
||||
".$typ['field_gegenkonto']." as gegenkonto,
|
||||
p.waehrung as pos_waehrung
|
||||
FROM
|
||||
@@ -513,33 +525,72 @@ class Exportbuchhaltung
|
||||
WHERE
|
||||
b.".$typ['field_date']." BETWEEN '".date_format($von,"Y-m-d")."' AND '".date_format($bis,"Y-m-d")."' AND (b.projekt=$projekt OR $projekt=0)".$typ['condition_where'];
|
||||
|
||||
// Check consistency of positions
|
||||
|
||||
$sql_check = "SELECT *
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
belegnr,
|
||||
betrag_gesamt,
|
||||
ROUND(SUM(betrag),2) AS betrag_summe
|
||||
// Check consistency of positions
|
||||
if (!$diffignore) {
|
||||
$sql_check = "SELECT *
|
||||
FROM
|
||||
(".$sql.") posten
|
||||
GROUP BY
|
||||
belegnr
|
||||
) summen
|
||||
WHERE betrag_gesamt <> betrag_summe OR betrag_summe IS NULL";
|
||||
|
||||
$result = $this->app->DB->SelectArr($sql_check);
|
||||
if (!empty($result)) {
|
||||
$e = new ConsistencyException(ucfirst($typ['typ']),$result);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
(
|
||||
SELECT
|
||||
belegnr,
|
||||
datum,
|
||||
betrag_gesamt,
|
||||
ROUND(SUM(betrag),2) AS betrag_summe,
|
||||
waehrung,
|
||||
kundennummer,
|
||||
ustid,
|
||||
auftrag
|
||||
FROM
|
||||
(".$sql.") posten
|
||||
GROUP BY
|
||||
belegnr
|
||||
) summen
|
||||
WHERE betrag_gesamt <> betrag_summe OR betrag_summe IS NULL";
|
||||
|
||||
$result = $this->app->DB->SelectArr($sql_check);
|
||||
if (!empty($result)) {
|
||||
|
||||
if (!$sachkonto_differences) {
|
||||
$e = new ConsistencyException(ucfirst($typ['typ']),$result);
|
||||
throw $e;
|
||||
} else {
|
||||
// Create differences entries
|
||||
foreach ($result as $row) {
|
||||
|
||||
$posid = $row['pos_id'];
|
||||
$tmpsteuersatz = 0;
|
||||
$tmpsteuertext = '';
|
||||
$erloes = '';
|
||||
$result = array();
|
||||
$this->app->erp->GetSteuerPosition($typ['typ'], $posid, $tmpsteuersatz, $tmpsteuertext, $erloes);
|
||||
|
||||
$data = array();
|
||||
|
||||
$difference = $row['betrag_gesamt']-$row['betrag_summe'];
|
||||
|
||||
$data['Umsatz'] = number_format(abs($difference), 2, ',', ''); // obligatory
|
||||
$data['EU-Steuersatz (Bestimmung)'] = 0;
|
||||
$data['WKZ Umsatz'] = $row['waehrung'];
|
||||
$data['Belegfeld 1'] = mb_strimwidth($row['belegnr'],0,12);
|
||||
$data['Konto'] = $row['kundennummer'];
|
||||
$data['Soll-/Haben-Kennzeichen'] = ($difference < 0)?'S':'H'; // obligatory
|
||||
|
||||
$data['Gegenkonto (ohne BU-Schlüssel)'] = $sachkonto_differences; // obligatory
|
||||
|
||||
$data['Belegdatum'] = date_format(date_create($row['datum']),"dm"); // obligatory
|
||||
$data['Buchungstext'] = "Differenz";
|
||||
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
|
||||
$data['Auftragsnummer'] = $row['auftrag'];
|
||||
$csv .= $this->create_line($datev_buchungsstapel_definition,$data);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // diffignore
|
||||
|
||||
// Query position data
|
||||
$arr = $this->app->DB->Query($sql);
|
||||
while ($row = $this->app->DB->Fetch_Assoc($arr)) {
|
||||
|
||||
// print_r($row);
|
||||
//print_r($row);
|
||||
|
||||
$posid = $row['pos_id'];
|
||||
$tmpsteuersatz = 0;
|
||||
@@ -572,17 +623,10 @@ class Exportbuchhaltung
|
||||
$data['Belegdatum'] = date_format(date_create($row['datum']),"dm"); // obligatory
|
||||
$data['Buchungstext'] = mb_strimwidth($row['name'],0,60);
|
||||
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
|
||||
$data['Auftragsnummer'] = $row['auftrag'];
|
||||
|
||||
$comma = "";
|
||||
foreach ($datev_buchungsstapel_definition as $key => $value) {
|
||||
if (!isset($data[$value])) {
|
||||
$data[$value] = '';
|
||||
}
|
||||
$csv .= $comma.'"'.$data[$value].'"';
|
||||
$comma = ";";
|
||||
}
|
||||
$csv .= "\r\n";
|
||||
|
||||
$data['Auftragsnummer'] = ($row['auftrag']!=0)?$row['auftrag']:'';
|
||||
|
||||
$csv .= $this->create_line($datev_buchungsstapel_definition,$data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -590,7 +634,22 @@ class Exportbuchhaltung
|
||||
|
||||
$csv = mb_convert_encoding($csv, "ISO-8859-1", "UTF-8");
|
||||
return($csv);
|
||||
}
|
||||
}
|
||||
|
||||
function create_line($definition, $data) : string {
|
||||
$csv = "";
|
||||
$comma = "";
|
||||
foreach ($definition as $key => $value) {
|
||||
if (!isset($data[$value])) {
|
||||
$data[$value] = '';
|
||||
}
|
||||
$csv .= $comma.'"'.$data[$value].'"';
|
||||
$comma = ";";
|
||||
}
|
||||
$csv .= "\r\n";
|
||||
return($csv);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -557,10 +557,16 @@ class Fibu_buchungen {
|
||||
$this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=list", "Übersicht");
|
||||
// $this->app->erp->MenuEintrag("index.php?module=fibu_buchungen&action=create", "Neu anlegen");
|
||||
|
||||
$startdatum = $this->app->erp->Firmendaten('fibu_buchungen_startdatum');
|
||||
|
||||
if (empty($startdatum)) {
|
||||
$msg .= '<div class="error">Startdatum <a href="index.php?module=firmendaten&action=edit#tabs-8">("Buchungen erzeugen ab Datum")</a> in den Firmendaten nicht gesetzt.</div>';
|
||||
}
|
||||
|
||||
$submit = $this->app->Secure->GetPOST('submit');
|
||||
if ($submit == 'neuberechnen') {
|
||||
$this->fibu_rebuild_tables();
|
||||
$msg = "<div class=\"info\">Buchungen wurden neu berechnet.</div>";
|
||||
$msg .= "<div class=\"info\">Buchungen wurden neu berechnet.</div>";
|
||||
}
|
||||
|
||||
// For transfer to tablesearch
|
||||
@@ -970,7 +976,9 @@ class Fibu_buchungen {
|
||||
}
|
||||
}
|
||||
$override = $this->app->Secure->GetPOST('override');
|
||||
$diff = $gesamtnum-$von_saldonum;
|
||||
$diff = round($gesamtnum-$von_saldonum,2);
|
||||
$gesamtnum = round($von_saldonum,2);
|
||||
$von_saldonum = round($von_saldonum,2);
|
||||
|
||||
if (
|
||||
($von_saldonum < 0 && ($gesamtnum < $von_saldonum)) ||
|
||||
|
||||
@@ -1043,7 +1043,7 @@ class Firmendaten {
|
||||
'arbeitsnachweis_header','arbeitsnachweis_footer','provisionsgutschrift_header','provisionsgutschrift_footer','proformarechnung_header','proformarechnung_footer','eu_lieferung_vermerk','export_lieferung_vermerk'
|
||||
,'wareneingang_kamera_waage','layout_iconbar','passwort','host','port','mailssl','signatur','email','absendername','bcc1','bcc2','bcc3'
|
||||
,'firmenfarbe','name','strasse','plz','ort','steuernummer','projekt','steuer_positionen_export','tabsnavigationfarbe','tabsnavigationfarbeschrift'
|
||||
,"buchhaltung_berater","buchhaltung_mandant","buchhaltung_wj_beginn","buchhaltung_sachkontenlaenge", "fibu_buchungen_startdatum"
|
||||
,"buchhaltung_berater","buchhaltung_mandant","buchhaltung_wj_beginn","buchhaltung_sachkontenlaenge", "fibu_buchungen_startdatum", "rechnung_skonto_kontorahmen"
|
||||
);
|
||||
|
||||
if(isset($sql2a)){
|
||||
@@ -1380,9 +1380,10 @@ class Firmendaten {
|
||||
$this->app->YUI->AutoComplete('steuersatz_normal','steuersatz',1);
|
||||
$this->app->YUI->AutoComplete('steuersatz_ermaessigt','steuersatz',1);
|
||||
|
||||
|
||||
$this->app->YUI->DatePicker('fibu_buchungen_startdatum');
|
||||
|
||||
$this->app->YUI->AutoComplete('rechnung_skonto_kontorahmen', 'sachkonto');
|
||||
|
||||
$this->app->Tpl->Parse('PAGE','firmendaten.tpl');
|
||||
}
|
||||
|
||||
@@ -1849,6 +1850,7 @@ class Firmendaten {
|
||||
|
||||
// Fibu
|
||||
$this->app->Tpl->Set('FIBU_BUCHUNGEN_STARTDATUM', $this->app->erp->ReplaceDatum(false,$data[0]['fibu_buchungen_startdatum'],false));
|
||||
$this->app->Tpl->Set('RECHNUNG_SKONTO_KONTORAHMEN', $this->app->erp->ReplaceKontorahmen(false,$data[0]['rechnung_skonto_kontorahmen']));
|
||||
|
||||
|
||||
}
|
||||
@@ -2292,7 +2294,8 @@ class Firmendaten {
|
||||
$data['buchhaltung_sachkontenlaenge'] = ($this->app->Secure->POST["buchhaltung_sachkontenlaenge"]);
|
||||
|
||||
$data['fibu_buchungen_startdatum'] = $this->app->erp->ReplaceDatum(true,$this->app->Secure->POST["fibu_buchungen_startdatum"],false);
|
||||
|
||||
$data['rechnung_skonto_kontorahmen'] = $this->app->erp->ReplaceKontorahmen(true,$this->app->Secure->POST["rechnung_skonto_kontorahmen"]);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
+28
-11
@@ -712,17 +712,32 @@ class Gutschrift extends GenGutschrift
|
||||
$showDefault = true;
|
||||
$this->app->Tpl->Set('TABTEXT','Freigabe');
|
||||
$this->app->erp->GutschriftNeuberechnen($id);
|
||||
|
||||
$this->app->erp->CheckVertrieb($id,'gutschrift');
|
||||
$this->app->erp->CheckBearbeiter($id,'gutschrift');
|
||||
$doctype = 'gutschrift';
|
||||
|
||||
$sql = "SELECT belegnr, rechnungid FROM gutschrift WHERE id='$id' LIMIT 1";
|
||||
$result = $this->app->DB->SelectArr($sql);
|
||||
$belegnr = $result[0]['belegnr'];
|
||||
$rechnungid = $result[0]['rechnungid'];
|
||||
$name = $this->app->DB->Select("SELECT a.name FROM gutschrift b LEFT JOIN adresse a ON a.id=b.adresse WHERE b.id='$id' LIMIT 1");
|
||||
$summe = $this->app->DB->Select("SELECT soll FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||
$waehrung = $this->app->DB->Select("SELECT waehrung FROM gutschrift_position WHERE gutschrift='$id' LIMIT 1");
|
||||
|
||||
if(empty($intern)){
|
||||
$this->app->erp->RunHook('beleg_freigabe', 4, $doctype, $id, $allowedFrm, $showDefault);
|
||||
}
|
||||
if($allowedFrm && $freigabe==$id) {
|
||||
$belegnr = $this->app->DB->Select("SELECT belegnr FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||
if($allowedFrm && $freigabe==$id) {
|
||||
|
||||
if($belegnr=='') {
|
||||
$this->app->erp->BelegFreigabe('gutschrift',$id);
|
||||
|
||||
// Create fibu_buchung
|
||||
$gegen_rechnung = $this->app->Secure->GetGET('gegen_rechnung');
|
||||
if ($gegen_rechnung && $rechnungid > 0) {
|
||||
$this->app->erp->fibu_buchungen_buchen('gutschrift', $id, 'rechnung', $rechnungid, -$summe, $waehrung, date("Y-m-d"), 'Verrechnung');
|
||||
}
|
||||
|
||||
if($intern) {
|
||||
return 1;
|
||||
}
|
||||
@@ -735,15 +750,17 @@ class Gutschrift extends GenGutschrift
|
||||
$msg = $this->app->erp->base64_url_encode("<div class=\"error\">Die Gutschrift war bereits freigegeben!</div>");
|
||||
$this->app->Location->execute("index.php?module=gutschrift&action=edit&id=$id&msg=$msg");
|
||||
}
|
||||
if($showDefault){
|
||||
$name = $this->app->DB->Select("SELECT a.name FROM gutschrift b LEFT JOIN adresse a ON a.id=b.adresse WHERE b.id='$id' LIMIT 1");
|
||||
$summe = $this->app->DB->Select("SELECT soll FROM gutschrift WHERE id='$id' LIMIT 1");
|
||||
$waehrung = $this->app->DB->Select("SELECT waehrung FROM gutschrift_position
|
||||
WHERE gutschrift='$id' LIMIT 1");
|
||||
|
||||
if($showDefault){
|
||||
if ($rechnungid > 0) {
|
||||
$input_html = "<input type=\"button\" value=\"Freigabe ohne Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id&gegen_rechnung=0'\">"
|
||||
."<input type=\"button\" value=\"Freigabe gegen Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id&gegen_rechnung=1'\">";
|
||||
} else {
|
||||
$input_html = "<input type=\"button\" value=\"Freigabe Rechnung\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id'\">";
|
||||
}
|
||||
$this->app->Tpl->Set('TAB1', "<div class=\"info\">Soll die Gutschrift an <b>$name</b> im Wert von <b>$summe $waehrung</b>
|
||||
jetzt freigegeben werden? <input type=\"button\" value=\"Freigabe\" onclick=\"window.location.href='index.php?module=gutschrift&action=freigabe&id=$id&freigabe=$id'\">
|
||||
</div>");
|
||||
jetzt freigegeben werden? ".
|
||||
$input_html.
|
||||
"</div>");
|
||||
}
|
||||
$this->GutschriftMenu();
|
||||
$this->app->Tpl->Parse('PAGE','tabview.tpl');
|
||||
|
||||
@@ -5084,7 +5084,6 @@ class Importvorlage extends GenImportvorlage {
|
||||
$allowed_fields = array('konto','buchung','betrag','betrag2','waehrung','buchungstext','buchungstext2','buchungstext3','buchungstext4');
|
||||
|
||||
$error = false;
|
||||
|
||||
// Create a row dataset (without checked and cmd)
|
||||
$update_sql = "";
|
||||
$row = array();
|
||||
@@ -5165,6 +5164,60 @@ class Importvorlage extends GenImportvorlage {
|
||||
}
|
||||
|
||||
break;
|
||||
case 'stueckliste':
|
||||
|
||||
$allowed_fields = array('stuecklistevonartikel','artikel','menge','art','referenz','layer','wert','bauform','xpos','ypos','zachse','place');
|
||||
|
||||
// Create a row dataset (without checked and cmd)
|
||||
$row = array();
|
||||
$error_text = "";
|
||||
|
||||
$error = $this->create_row_set($tmp, $i, $allowed_fields, $row, $error_text);
|
||||
|
||||
if ($error !== false) {
|
||||
$sql = "SELECT id FROM artikel WHERE stueckliste = 1 AND nummer = '".$row['stuecklistevonartikel']."'";
|
||||
$von_id = $this->app->DB->SelectArr($sql);
|
||||
if (empty($von_id)) {
|
||||
$msg .= "Fehlerhafter 'Stueckliste von'-Artikel \"".$row['stuecklistevonartikel']."\"<br>";
|
||||
break;
|
||||
}
|
||||
$row['stuecklistevonartikel'] = $von_id[0]['id'];
|
||||
|
||||
$sql = "SELECT id FROM artikel WHERE nummer = '".$row['artikel']."'";
|
||||
$artikel_id = $this->app->DB->SelectArr($sql);
|
||||
if (empty($artikel_id)) {
|
||||
$msg .= "Fehlerhafter Artikel \"".$row['artikel']."\"<br>";
|
||||
break;
|
||||
}
|
||||
$row['artikel'] = $artikel_id[0]['id'];
|
||||
|
||||
if(empty($row['menge'])) {
|
||||
$row['menge'] = 1;
|
||||
}
|
||||
if(empty($row['art'])) {
|
||||
$row['art'] = 'et';
|
||||
}
|
||||
|
||||
if(empty($row['place']) || $row['place'] == 'DNP') {
|
||||
$row['place'] = 'DNP';
|
||||
} else {
|
||||
$row['place'] = 'DP';
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO stueckliste (".
|
||||
implode(", ",array_keys($row)).
|
||||
") VALUES ('".
|
||||
implode("', '",array_values($row)).
|
||||
"')";
|
||||
|
||||
$result = $this->app->DB->Update($sql);
|
||||
|
||||
} else if(!$first_checked) {
|
||||
$first_checked = true;
|
||||
$msg .= $error_text;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// HERE END OF PROCESSING THE ROWS switch($ziel);
|
||||
@@ -6252,5 +6305,28 @@ class Importvorlage extends GenImportvorlage {
|
||||
|
||||
return $normalizedDate;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a cleaned row set
|
||||
* Return true if ok, else see error_message
|
||||
*/
|
||||
private function create_row_set(array $tmp, $pos, array $allowed_fields, array &$result_row, string &$error_message) : bool {
|
||||
$result_ok = true;
|
||||
$result_row = array();
|
||||
$error_message = "";
|
||||
foreach ($tmp as $key => $value) {
|
||||
if ($key != 'cmd' && $key != 'checked') {
|
||||
if (in_array($key,$allowed_fields)) {
|
||||
$result_row[$key] = $value[$pos];
|
||||
} else {
|
||||
$error_message .= "Feld nicht korrekt: ".$key.".<br>";
|
||||
$result_ok = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return($result_ok);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1148,7 +1148,7 @@ class Kalender {
|
||||
|
||||
// Force user if empty
|
||||
if ($data[0]['adresseintern'] == 0) {
|
||||
$data[0]['adresseintern'] = $this->app->User->GetID();
|
||||
$data[0]['adresseintern'] = $this->app->User->GetAdresse();
|
||||
}
|
||||
|
||||
$data[0]['adresseintern'] = $this->app->DB->Select("SELECT CONCAT(a.id,' ',a.name) FROM adresse a WHERE a.id='" . $data[0]['adresseintern'] . "' AND a.geloescht=0 LIMIT 1");
|
||||
|
||||
@@ -16,7 +16,7 @@ class Kontoauszuege {
|
||||
$this->app->ActionHandlerInit($this);
|
||||
$this->app->ActionHandler("list", "kontoauszuege_konto_list");
|
||||
$this->app->ActionHandler("listentries", "kontoauszuege_list");
|
||||
$this->app->ActionHandler("create", "kontoauszuege_edit"); // This automatically adds a "New" button
|
||||
// $this->app->ActionHandler("create", "kontoauszuege_edit"); // This automatically adds a "New" button
|
||||
$this->app->ActionHandler("edit", "kontoauszuege_edit");
|
||||
$this->app->ActionHandler("delete", "kontoauszuege_delete");
|
||||
$this->app->DefaultActionHandler("list");
|
||||
@@ -255,7 +255,7 @@ class Kontoauszuege {
|
||||
function kontoauszuege_konto_list() {
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=list", "Übersicht");
|
||||
$this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=create", "Neu anlegen");
|
||||
// $this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=create", "Neu anlegen");
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php", "Zurück");
|
||||
|
||||
@@ -313,7 +313,7 @@ class Kontoauszuege {
|
||||
}
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=list", "Übersicht");
|
||||
$this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=create", "Neu anlegen");
|
||||
// $this->app->erp->MenuEintrag("index.php?module=kontoauszuege&action=create", "Neu anlegen");
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php", "Zurück");
|
||||
|
||||
@@ -367,10 +367,10 @@ class Kontoauszuege {
|
||||
$input = $this->GetInput();
|
||||
$submit = $this->app->Secure->GetPOST('submit');
|
||||
|
||||
if (empty($id)) {
|
||||
/* if (empty($id)) {
|
||||
// New item
|
||||
$id = 'NULL';
|
||||
}
|
||||
} */
|
||||
|
||||
if ($submit != '')
|
||||
{
|
||||
|
||||
+3
-4
@@ -647,6 +647,7 @@ class Lager extends GenLager {
|
||||
$heading[] = 'Reserviert <sup>*</sup>';
|
||||
$heading[] = 'Menü';
|
||||
|
||||
$width[] = '10%';
|
||||
$width[] = '10%';
|
||||
$width[] = '10%';
|
||||
$width[] = '1%';
|
||||
@@ -667,7 +668,6 @@ class Lager extends GenLager {
|
||||
$sql .= "lp.kurzbezeichnung,p.abkuerzung,
|
||||
|
||||
".$app->erp->FormatMenge("ifnull(lpi.menge,0)")." as fmenge ,
|
||||
".$app->erp->FormatMenge("IFNULL(mengemhd, ifnull(mengecharge,0))")." as fmengecharge ,
|
||||
".$app->erp->FormatMenge("IFNULL(lpi2.gmenge,0) - IFNULL(r.reserviert,0)")." as verkaufbare,
|
||||
".$app->erp->FormatMenge("IFNULL(r.reserviert,0)")." as reserviert,
|
||||
a.id ";
|
||||
@@ -705,7 +705,6 @@ class Lager extends GenLager {
|
||||
}else{
|
||||
$sql .= "lp.kurzbezeichnung,p.abkuerzung,
|
||||
".$app->erp->FormatMenge("ifnull(lpi.menge,0)")." as fmenge ,
|
||||
'' as mengecharge,
|
||||
".$app->erp->FormatMenge("IFNULL(lpi2.gmenge,0) - IFNULL(r.reserviert,0)")." as verkaufbare, ".$app->erp->FormatMenge("IFNULL(r.reserviert,0)")." as reserviert, a.id ";
|
||||
|
||||
$sql .= "
|
||||
@@ -725,7 +724,7 @@ class Lager extends GenLager {
|
||||
if($more_data1) {
|
||||
$sql = "SELECT SQL_CALC_FOUND_ROWS a.id, a.nummer,a.name_de,";
|
||||
|
||||
$sql .= "'-',p.abkuerzung,'0' as menge,'0' as mengecharge, '0' as verkaufbare, ".$app->erp->FormatMenge("IFNULL(r.reserviert,0)")." as reserviert, a.id
|
||||
$sql .= "'-',p.abkuerzung,'0' as menge, '0' as verkaufbare, ".$app->erp->FormatMenge("IFNULL(r.reserviert,0)")." as reserviert, a.id
|
||||
FROM artikel AS `a`
|
||||
LEFT JOIN (SELECT lpi.artikel, lp.kurzbezeichnung FROM `lager_platz_inhalt` AS `lpi` LEFT JOIN `lager_platz` AS `lp` ON lp.id=lpi.lager_platz GROUP BY lpi.artikel) AS `lp` ON lp.artikel=a.id
|
||||
LEFT JOIN (SELECT lr.artikel, SUM(lr.menge) AS `reserviert` FROM `lager_reserviert` AS `lr` GROUP BY lr.artikel) r ON r.artikel=a.id
|
||||
@@ -2555,7 +2554,7 @@ class Lager extends GenLager {
|
||||
|
||||
$name_de = $this->app->DB->Select("SELECT name_de FROM artikel WHERE nummer='{$nummer}' AND geloescht!=1 AND lagerartikel=1 LIMIT 1");
|
||||
$einheit = $this->app->DB->Select("SELECT einheit FROM artikel WHERE nummer='{$nummer}' AND geloescht!=1 AND lagerartikel=1 LIMIT 1");
|
||||
$seriennummer = $this->app->DB->Select("SELECT seriennummer FROM artikel WHERE nummer='{$nummer}' AND geloescht!=1 AND lagerartikel=1 LIMIT 1");
|
||||
$seriennummer = $this->app->DB->Select("SELECT seriennummern FROM artikel WHERE nummer='{$nummer}' AND geloescht!=1 AND lagerartikel=1 LIMIT 1");
|
||||
if($seriennummer === 'keine') {
|
||||
$seriennummer = '';
|
||||
}
|
||||
|
||||
+10
-6
@@ -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)
|
||||
|
||||
@@ -0,0 +1,721 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 OpenXE project
|
||||
*/
|
||||
|
||||
use Xentral\Components\Database\Exception\QueryFailureException;
|
||||
|
||||
class Mahnwesen {
|
||||
|
||||
function __construct($app, $intern = false) {
|
||||
$this->app = $app;
|
||||
if ($intern)
|
||||
return;
|
||||
|
||||
$this->app->ActionHandlerInit($this);
|
||||
$this->app->ActionHandler("list", "mahnwesen_list");
|
||||
$this->app->ActionHandler("create", "mahnwesen_edit"); // This automatically adds a "New" button
|
||||
$this->app->ActionHandler("edit", "mahnwesen_edit");
|
||||
$this->app->ActionHandler("einstellungen", "mahnwesen_einstellungen");
|
||||
$this->app->ActionHandler("delete", "mahnwesen_delete");
|
||||
$this->app->DefaultActionHandler("list");
|
||||
$this->app->ActionHandlerListen($app);
|
||||
}
|
||||
|
||||
public function Install() {
|
||||
/* Fill out manually later */
|
||||
}
|
||||
|
||||
public function TableSearch($app, $name, $erlaubtevars) {
|
||||
switch ($name) {
|
||||
case "mahnwesen_list":
|
||||
|
||||
$extended_mysql55 = ",'de_DE'";
|
||||
|
||||
$allowed['mahnwesen_list'] = array('list');
|
||||
$heading = array('', '', 'Rechnung', 'Vom', 'Kd-Nr.', 'Kunde', 'Land', 'Projekt', 'Zahlung', 'Betrag (brutto)', 'Währung', 'Zahlstatus', 'Differenz', 'Status','Fällig am','Tage','Mahnstufe','Brief','E-Mail','Gemahnt','Mahn-Datum','Sperre','Interne Bemerkung','Menü');
|
||||
$width = array('1%','1%','01%', '01%', '01%', '05%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '01%', '20%', '1%'); // Fill out manually later
|
||||
|
||||
// columns that are aligned right (numbers etc)
|
||||
// $alignright = array(4,5,6,7,8);
|
||||
|
||||
$faellig_datum = "DATE_ADD(r.datum, INTERVAL r.zahlungszieltage DAY)";
|
||||
$faellig_tage = "DATEDIFF(CURRENT_DATE,DATE_ADD(r.datum, INTERVAL r.zahlungszieltage DAY))";
|
||||
$mahn_druck = "if(m.druck,'Ja','')";
|
||||
$mahn_mail = "if(m.mail,'Ja','')";
|
||||
$mahn_versendet = "if(r.versendet_mahnwesen,'Ja','')";
|
||||
|
||||
$findcols = array('r.id','r.id','r.belegnr', 'r.datum', 'r.kundennummer','r.name', 'r.land','p.abkuerzung','r.zahlungsweise','r.soll','r.waehrung','r.zahlungsstatus','r.soll','r.status',$faellig_datum,$faellig_tage,'m.name',$mahn_druck,$mahn_mail,$mahn_versendet,'mahnwesen_datum');
|
||||
$searchsql = array('r.belegnr', 'r.name', $faellig_datum, 'r.kundennummer');
|
||||
|
||||
$defaultorder = 1;
|
||||
$defaultorderdesc = 0;
|
||||
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',r.id,'\" />') AS `auswahl`";
|
||||
|
||||
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=rechnung&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
||||
|
||||
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||
r.id,
|
||||
$dropnbox,
|
||||
r.belegnr,
|
||||
".$app->erp->FormatDateShort('r.datum')." as vom,
|
||||
if(r.kundennummer <> '',r.kundennummer,adr.kundennummer),
|
||||
CONCAT(" . $app->erp->MarkerUseredit("r.name", "r.useredittimestamp") . ", if(r.internebezeichnung!='',CONCAT('<br><i style=color:#999>',r.internebezeichnung,'</i>'),'')) as kunde,
|
||||
r.land as land,
|
||||
p.abkuerzung as projekt,
|
||||
r.zahlungsweise as zahlungsweise,
|
||||
FORMAT(r.soll,2{$extended_mysql55} ) as soll,
|
||||
ifnull(r.waehrung,'EUR'),
|
||||
r.zahlungsstatus as zahlung,
|
||||
if(r.soll-r.ist!=0 AND r.ist > 0,FORMAT(r.ist-r.soll,2{$extended_mysql55}),FORMAT((r.soll-r.ist)*-1,2{$extended_mysql55})) as fehlt,
|
||||
if(r.status = 'storniert' AND r.teilstorno = 1,'TEILSTORNO',UPPER(r.status)) as status,
|
||||
".$app->erp->FormatDateShort($faellig_datum)." as faellig_datum,
|
||||
if(".$faellig_tage.">0,".$faellig_tage.",'') as faellig_tage,
|
||||
m.name,
|
||||
".$mahn_druck.",
|
||||
".$mahn_mail.",
|
||||
".$mahn_versendet.",
|
||||
if(mahnwesen_datum <> '0000-00-00',".$app->erp->FormatDateShort('mahnwesen_datum').",''),
|
||||
if(r.mahnwesen_gesperrt,'Ja',''),
|
||||
REPLACE(r.mahnwesen_internebemerkung,'\r\n','<br> '),
|
||||
r.id
|
||||
FROM rechnung r LEFT JOIN projekt p ON p.id=r.projekt LEFT JOIN adresse adr ON r.adresse=adr.id LEFT JOIN auftrag au ON au.id = r.auftragid LEFT JOIN mahnwesen m ON r.mahnwesen = m.id";
|
||||
|
||||
$where = " r.belegnr <> ''";
|
||||
|
||||
// Toggle filters
|
||||
$this->app->Tpl->Add('JQUERYREADY', "$('#zu_mahnen').click( function() { fnFilterColumn1( 0 ); } );");
|
||||
$this->app->Tpl->Add('JQUERYREADY', "$('#inkl_bezahlte').click( function() { fnFilterColumn2( 0 ); } );");
|
||||
$this->app->Tpl->Add('JQUERYREADY', "$('#inkl_gesperrte').click( function() { fnFilterColumn3( 0 ); } );");
|
||||
for ($r = 1;$r <= 3;$r++) {
|
||||
$this->app->Tpl->Add('JAVASCRIPT', '
|
||||
function fnFilterColumn' . $r . ' ( i )
|
||||
{
|
||||
if(oMoreData' . $r . $name . '==1)
|
||||
oMoreData' . $r . $name . ' = 0;
|
||||
else
|
||||
oMoreData' . $r . $name . ' = 1;
|
||||
|
||||
$(\'#' . $name . '\').dataTable().fnFilter(
|
||||
\'\',
|
||||
i,
|
||||
0,0
|
||||
);
|
||||
}
|
||||
');
|
||||
}
|
||||
|
||||
$more_data1 = $app->Secure->GetGET("more_data1");
|
||||
if ($more_data1 == 1) {
|
||||
$where .= " AND NOT r.versendet_mahnwesen AND r.mahnwesen <> ''";
|
||||
} else {
|
||||
}
|
||||
$more_data2 = $app->Secure->GetGET("more_data2");
|
||||
if ($more_data2 == 1) {
|
||||
} else {
|
||||
$where .= " AND r.zahlungsstatus <> 'bezahlt' ";
|
||||
}
|
||||
|
||||
$more_data3 = $app->Secure->GetGET("more_data3");
|
||||
if ($more_data3 == 1) {
|
||||
}
|
||||
else {
|
||||
$where .= " AND NOT r.mahnwesen_gesperrt ";
|
||||
}
|
||||
// END Toggle filters
|
||||
|
||||
|
||||
$count = "SELECT count(DISTINCT id) FROM rechnung r WHERE $where";
|
||||
// $groupby = "";
|
||||
|
||||
break;
|
||||
case "mahnwesen_einstellungen":
|
||||
$allowed['mahnwesen_list'] = array('list');
|
||||
$heading = array('', 'Tage', 'Name', 'Gebuehr', 'E-Mail', 'Druck', 'Menü');
|
||||
$width = array('1%','1%','10%'); // Fill out manually later
|
||||
|
||||
// columns that are aligned right (numbers etc)
|
||||
// $alignright = array(4,5,6,7,8);
|
||||
|
||||
$findcols = array('m.id', 'm.tage','m.name', 'm.gebuehr', 'm.mail','m.druck');
|
||||
$searchsql = array('m.name','m.tage', 'm.gebuehr', 'm.versandmethode');
|
||||
|
||||
$defaultorder = 1;
|
||||
$defaultorderdesc = 1;
|
||||
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`";
|
||||
|
||||
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=mahnwesen&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=mahnwesen&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
||||
|
||||
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||
m.id,
|
||||
$dropnbox,
|
||||
m.tage,
|
||||
m.name,
|
||||
".$this->app->erp->FormatMenge('m.gebuehr',2).",
|
||||
if(m.mail,'Ja',''),
|
||||
if(m.druck,'Ja',''),
|
||||
m.id FROM mahnwesen m";
|
||||
|
||||
$where = "1";
|
||||
$count = "SELECT count(DISTINCT id) FROM mahnwesen WHERE $where";
|
||||
// $groupby = "";
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$erg = false;
|
||||
|
||||
foreach ($erlaubtevars as $k => $v) {
|
||||
if (isset($$v)) {
|
||||
$erg[$v] = $$v;
|
||||
}
|
||||
}
|
||||
return $erg;
|
||||
}
|
||||
|
||||
function mahnwesen_list() {
|
||||
$this->app->erp->MenuEintrag("index.php?module=mahnwesen&action=list", "Übersicht");
|
||||
// $this->app->erp->MenuEintrag("index.php?module=mahnwesen&action=create", "Neu anlegen");
|
||||
// $this->app->erp->MenuEintrag("index.php?module=mahnwesen&action=einstellungen", "Einstellungen");
|
||||
|
||||
if($this->app->Secure->GetPOST('mahnstufe_berechnen') && $this->app->erp->RechteVorhanden('rechnung', 'edit')) {
|
||||
$this->app->erp->rechnung_zahlstatus_berechnen();
|
||||
|
||||
$sql = "
|
||||
SELECT
|
||||
r.id, r.mahnwesen, rid_mid.mahnwesen_neu
|
||||
FROM
|
||||
rechnung r
|
||||
INNER JOIN
|
||||
(
|
||||
SELECT
|
||||
id_tage.id,
|
||||
m.id AS mahnwesen_neu
|
||||
FROM
|
||||
mahnwesen m
|
||||
INNER JOIN(
|
||||
SELECT
|
||||
id,
|
||||
MAX(tage) AS tage
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
r.id,
|
||||
m.tage
|
||||
FROM
|
||||
rechnung r
|
||||
INNER JOIN mahnwesen m ON
|
||||
DATEDIFF(
|
||||
CURRENT_DATE,
|
||||
DATE_ADD(
|
||||
r.datum,
|
||||
INTERVAL r.zahlungszieltage DAY
|
||||
)
|
||||
) > m.tage
|
||||
WHERE
|
||||
r.zahlungsstatus = 'offen'
|
||||
ORDER BY
|
||||
`r`.`id` ASC
|
||||
) temp
|
||||
GROUP BY
|
||||
id
|
||||
) id_tage
|
||||
ON
|
||||
m.tage = id_tage.tage
|
||||
) rid_mid
|
||||
ON r.id = rid_mid.id
|
||||
";
|
||||
$offene_rechnungen = $this->app->DB->SelectArr($sql);
|
||||
|
||||
foreach ($offene_rechnungen as $offene_rechnung) {
|
||||
if ($offene_rechnung['mahnwesen'] != $offene_rechnung['mahnwesen_neu']) {
|
||||
$sql = "UPDATE rechnung set mahnwesen = ".$offene_rechnung['mahnwesen_neu'].", versendet_mahnwesen = 0 WHERE id = ".$offene_rechnung['id'];
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($this->app->Secure->GetPOST('sel_aktion') && $this->app->erp->RechteVorhanden('rechnung', 'edit'))
|
||||
{
|
||||
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
||||
$aktion = $this->app->Secure->GetPOST('sel_aktion');
|
||||
$auswahl = $this->app->Secure->GetPOST('auswahl');
|
||||
if($drucker > 0) {
|
||||
$this->app->erp->BriefpapierHintergrundDisable($drucker);
|
||||
}
|
||||
if(is_array($auswahl)) {
|
||||
foreach($auswahl as $auswahlKey => $auswahlValue) {
|
||||
if((int)$auswahlValue > 0) {
|
||||
$auswahl[$auswahlKey] = (int)$auswahlValue;
|
||||
}
|
||||
else {
|
||||
unset($auswahl[$auswahlKey]);
|
||||
}
|
||||
}
|
||||
switch($aktion)
|
||||
{
|
||||
case 'bezahlt':
|
||||
$this->app->DB->Update("UPDATE rechnung SET zahlungsstatus='bezahlt', bezahlt_am = now(), mahnwesenfestsetzen='1',mahnwesen_internebemerkung=CONCAT(mahnwesen_internebemerkung,'\r\n','Manuell als bezahlt markiert am ".date('d.m.Y')."') WHERE id IN (".implode(', ',$auswahl).')');
|
||||
break;
|
||||
case 'offen':
|
||||
$this->app->DB->Update("UPDATE rechnung SET zahlungsstatus='offen',bezahlt_am = NULL, mahnwesen_internebemerkung=CONCAT(mahnwesen_internebemerkung,'\r\n','Manuell als bezahlt entfernt am ".date('d.m.Y')."') WHERE id IN (".implode(', ',$auswahl).')');
|
||||
break;
|
||||
case 'mahnung_reset':
|
||||
$sql = "UPDATE rechnung SET mahnwesen='', versendet_mahnwesen ='', mahnwesen_datum = '0000-00-00' WHERE id IN (".implode(', ',$auswahl).')';
|
||||
$this->app->DB->Update($sql);
|
||||
break;
|
||||
case 'mahnen':
|
||||
|
||||
$mails = 0;
|
||||
$drucke = 0;
|
||||
foreach ($auswahl as $rechnung_id) {
|
||||
$mahnung = $this->MahnwesenMessage($rechnung_id);
|
||||
|
||||
// Check first
|
||||
if (empty($mahnung)) {
|
||||
continue;
|
||||
}
|
||||
if ($mahnung['mail'] && empty($mahnung['rechnung']['email'])) {
|
||||
$msg .= "<div class=\"error\">Keine E-Mail-Adresse hinterlegt bei Rechnung ".$mahnung['rechnung']['belegnr'].".</div>";
|
||||
continue;
|
||||
}
|
||||
if ($mahnung['druck']) {
|
||||
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
||||
if($drucker > 0) {
|
||||
$this->app->erp->BriefpapierHintergrundDisable($drucker);
|
||||
} else {
|
||||
$msg .= "<div class=\"error\">Kein Drucker gewählt.</div>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Create PDF
|
||||
if(class_exists('RechnungPDFCustom')) {
|
||||
$Brief = new RechnungPDFCustom($this->app,$projekt);
|
||||
}
|
||||
else {
|
||||
$Brief = new RechnungPDF($this->app,$projekt);
|
||||
}
|
||||
$Brief->GetRechnung($rechnung_id,$mahnung['betreff'],0,null,$mahnung['body']);
|
||||
$tmpfile = $Brief->displayTMP();
|
||||
|
||||
$fileid = $this->app->erp->CreateDatei($Brief->filename,$mahnung['betreff'],"","",$tmpfile,$this->app->User->GetName());
|
||||
|
||||
if ($mahnung['druck']) {
|
||||
$this->app->printer->Drucken($drucker,$tmpfile);
|
||||
$this->MahnungCRM('brief',$mahnung['rechnung'], $mahnung['betreff'], $mahnung['body'],$fileid,$Brief->filename);
|
||||
$this->app->erp->RechnungProtokoll($rechnung_id,'Mahnung gedruckt');
|
||||
$drucke++;
|
||||
}
|
||||
|
||||
if ($mahnung['mail']) {
|
||||
$senderName = $this->app->User->GetName()." (".$this->app->erp->GetFirmaAbsender().")";
|
||||
$senderAddress = $this->app->erp->GetFirmaMail();
|
||||
// function MailSend($from,$from_name,$to,$to_name,$betreff,$text,$files="",$projekt="",$signature=true,$cc="",$bcc="", $system = false)
|
||||
$result = $this->app->erp->MailSend(
|
||||
$senderAddress,
|
||||
$senderName,
|
||||
$mahnung['rechnung']['email'],
|
||||
$mahnung['rechnung']['email'],
|
||||
htmlentities($mahnung['betreff']),
|
||||
htmlentities($mahnung['body']),
|
||||
[$tmpfile],
|
||||
$mahnung['rechnung']['projekt'],
|
||||
true,
|
||||
$cc,
|
||||
'',
|
||||
true
|
||||
);
|
||||
|
||||
if ($result = 0) {
|
||||
$msg .= "<div class=\"error\">Fehler beim E-Mail-Versand bei Rechnung ".$mahnung['rechnung']['belegnr'].".</div>";
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->MahnungCRM('email',$mahnung['rechnung'], $mahnung['betreff'], $mahnung['body'],$fileid,$Brief->filename);
|
||||
$this->app->erp->RechnungProtokoll($rechnung_id,'Mahnung versendet');
|
||||
$mails++;
|
||||
}
|
||||
|
||||
unlink($tmpfile);
|
||||
|
||||
$sql = "UPDATE rechnung set mahnwesen_datum = CURRENT_DATE, versendet_mahnwesen = 1 WHERE id IN (".implode(', ',$auswahl).')';
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
}
|
||||
$msg .= "<div class=\"success\">$mails E-Mails versendet, $drucke Dokumente gedruckt.</div>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
} // ende ausfuehren
|
||||
|
||||
if (!empty($msg)) {
|
||||
$this->app->Tpl->Set('MESSAGE', $msg);
|
||||
}
|
||||
|
||||
if($this->app->erp->RechteVorhanden('rechnung', 'manuellbezahltmarkiert')){
|
||||
$this->app->Tpl->Set('ALSBEZAHLTMARKIEREN', '<option value="bezahlt">{|als bezahlt markieren|}</option>');
|
||||
}
|
||||
|
||||
$this->app->Tpl->Set('SELDRUCKER', $this->app->erp->GetSelectDrucker($this->app->User->GetParameter('rechnung_list_drucker')));
|
||||
|
||||
$this->app->YUI->TableSearch('TAB1', 'mahnwesen_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||
$this->app->Tpl->Parse('PAGE', "mahnwesen_list.tpl");
|
||||
}
|
||||
|
||||
function mahnwesen_einstellungen() {
|
||||
$this->app->erp->MenuEintrag("index.php?module=mahnwesen&action=einstellungen", "Übersicht");
|
||||
$this->app->erp->MenuEintrag("index.php?module=mahnwesen&action=create", "Neu anlegen");
|
||||
$this->app->erp->MenuEintrag("index.php?module=einstellungen&action=list", "Zurück");
|
||||
$this->app->erp->Headlines('Mahnwesen Einstellungen');
|
||||
|
||||
$this->app->YUI->TableSearch('TAB1', 'mahnwesen_einstellungen', "show", "", "", basename(__FILE__), __CLASS__);
|
||||
$this->app->Tpl->Parse('PAGE', "mahnwesen_einstellungen.tpl");
|
||||
}
|
||||
|
||||
public function mahnwesen_delete() {
|
||||
$id = (int) $this->app->Secure->GetGET('id');
|
||||
|
||||
$this->app->DB->Delete("DELETE FROM `mahnwesen` WHERE `id` = '{$id}'");
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gelöscht.</div>");
|
||||
|
||||
$this->mahnwesen_einstellungen();
|
||||
}
|
||||
|
||||
/*
|
||||
* Edit mahnwesen item
|
||||
* If id is empty, create a new one
|
||||
*/
|
||||
|
||||
function mahnwesen_edit() {
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
|
||||
// Check if other users are editing this id
|
||||
if($this->app->erp->DisableModul('artikel',$id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->app->Tpl->Set('ID', $id);
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=mahnwesen&action=edit&id=$id", "Details");
|
||||
$this->app->erp->MenuEintrag("index.php?module=mahnwesen&action=einstellungen", "Zurück zur Übersicht");
|
||||
$id = $this->app->Secure->GetGET('id');
|
||||
$input = $this->GetInput();
|
||||
$submit = $this->app->Secure->GetPOST('submit');
|
||||
|
||||
if (empty($id)) {
|
||||
// New item
|
||||
$id = 'NULL';
|
||||
}
|
||||
|
||||
if ($submit != '')
|
||||
{
|
||||
|
||||
// Write to database
|
||||
|
||||
// Add checks here
|
||||
|
||||
$columns = "id, ";
|
||||
$values = "$id, ";
|
||||
$update = "";
|
||||
|
||||
$fix = "";
|
||||
|
||||
foreach ($input as $key => $value) {
|
||||
$columns = $columns.$fix.$key;
|
||||
$values = $values.$fix."'".$value."'";
|
||||
$update = $update.$fix.$key." = '$value'";
|
||||
|
||||
$fix = ", ";
|
||||
}
|
||||
|
||||
|
||||
// echo($columns."<br>");
|
||||
// echo($values."<br>");
|
||||
// echo($update."<br>");
|
||||
|
||||
$sql = "INSERT INTO mahnwesen (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
|
||||
|
||||
$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=mahnwesen&action=einstellungen&msg=$msg");
|
||||
} else {
|
||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich übernommen.</div>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Load values again from database
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',m.id,'\" />') AS `auswahl`";
|
||||
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS m.id, $dropnbox, m.name, m.tage, m.gebuehr, m.mail, m.druck, m.id FROM mahnwesen m"." WHERE id=$id");
|
||||
|
||||
foreach ($result[0] as $key => $value) {
|
||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add displayed items later
|
||||
*
|
||||
|
||||
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
|
||||
$this->app->Tpl->Add('EMAIL', $email);
|
||||
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
||||
*/
|
||||
|
||||
$this->app->Tpl->Set('MAIL', $result[0]['mail']?'checked':'');
|
||||
$this->app->Tpl->Set('DRUCK', $result[0]['druck']?'checked':'');
|
||||
|
||||
$this->app->Tpl->Parse('PAGE', "mahnwesen_edit.tpl");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all paramters from html form and save into $input
|
||||
*/
|
||||
public function GetInput(): array {
|
||||
$input = array();
|
||||
$input['name'] = $this->app->Secure->GetPOST('name');
|
||||
$input['tage'] = $this->app->Secure->GetPOST('tage');
|
||||
$input['gebuehr'] = $this->app->Secure->GetPOST('gebuehr');
|
||||
$input['mail'] = $this->app->Secure->GetPOST('mail')?'1':'0';
|
||||
$input['druck'] = $this->app->Secure->GetPOST('druck')?'1':'0';
|
||||
return $input;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set all fields in the page corresponding to $input
|
||||
*/
|
||||
function SetInput($input) {
|
||||
$this->app->Tpl->Set('NAME', $input['name']);
|
||||
$this->app->Tpl->Set('TAGE', $input['tage']);
|
||||
$this->app->Tpl->Set('GEBUEHR', $input['gebuehr']);
|
||||
$this->app->Tpl->Set('MAIL', $input['mail']);
|
||||
$this->app->Tpl->Set('DRUCK', $input['druck']);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Constuct the Mahnwesen message according to GeschäftsbriefVorlage
|
||||
* Returns Array (string betreff, string body, boolean mail, boolean druck, array rechnung)
|
||||
*/
|
||||
function MahnwesenMessage($rechnung_id) {
|
||||
|
||||
$sql = "SELECT
|
||||
r.*,
|
||||
".$this->app->erp->FormatDate('datum')." datum,
|
||||
".$this->app->erp->FormatDate('CURRENT_DATE')." heute,
|
||||
m.name as mahn_name,
|
||||
m.tage as mahn_tage,
|
||||
m.gebuehr as mahn_gebuehr,
|
||||
m.mail as mahn_mail,
|
||||
m.druck as mahn_druck
|
||||
FROM
|
||||
rechnung r
|
||||
INNER JOIN
|
||||
mahnwesen m
|
||||
ON
|
||||
r.mahnwesen = m.id WHERE r.id = ".$rechnung_id." LIMIT 1";
|
||||
$rechnungarr = $this->app->DB->SelectArr($sql)[0];
|
||||
|
||||
if (empty($rechnungarr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$adresse = $rechnungarr['adresse'];
|
||||
if($sprache==''){
|
||||
$sprache = $rechnungarr['sprache'];
|
||||
}
|
||||
if($sprache==''){
|
||||
$sprache = $this->app->DB->Select("SELECT sprache FROM adresse WHERE id='$adresse' LIMIT 1");
|
||||
}
|
||||
|
||||
$kundennummer = $rechnungarr['kundennummer'];
|
||||
$projekt = $rechnungarr['projekt'];
|
||||
$auftrag= $rechnungarr['auftrag'];
|
||||
$buchhaltung= $rechnungarr['buchhaltung'];
|
||||
$lieferschein = $rechnungarr['lieferschein'];
|
||||
$lieferscheinid = $lieferschein;
|
||||
if($lieferscheinid){
|
||||
$lieferschein = $this->app->DB->Select("SELECT belegnr FROM lieferschein WHERE id='$lieferschein' LIMIT 1");
|
||||
}else{
|
||||
$lieferschein = '';
|
||||
}
|
||||
$bestellbestaetigung = $rechnungarr['kundennummer'];
|
||||
$datum = $rechnungarr['datum_de'];
|
||||
$datum_sql = $rechnungarr['datum'];
|
||||
$belegnr = $rechnungarr['belegnr'];
|
||||
$doppel = $rechnungarr['doppel'];
|
||||
$freitext = $rechnungarr['freitext'];
|
||||
$ustid = $rechnungarr['ustid'];
|
||||
$soll = $rechnungarr['soll'];
|
||||
$ist = $rechnungarr['ist'];
|
||||
$land = $rechnungarr['land'];
|
||||
$mahnwesen_datum = $rechnungarr['mahnwesen_datum'];
|
||||
$mahnwesen_datum_deutsch = $rechnungarr['mahnwesen_datum_de'];
|
||||
$zahlungsweise = $rechnungarr['zahlungsweise'];
|
||||
$zahlungsstatus = $rechnungarr['zahlungsstatus'];
|
||||
$zahlungszieltage = $rechnungarr['zahlungszieltage'];
|
||||
$zahlungszieltageskonto = $rechnungarr['zahlungszieltageskonto'];
|
||||
$zahlungszielskonto = $rechnungarr['zahlungszielskonto'];
|
||||
$waehrung = $rechnungarr['waehrung'];
|
||||
|
||||
$zahlungdatum = $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD(datum, INTERVAL $zahlungszieltage DAY),'%d.%m.%Y') FROM rechnung WHERE id='$rechnung_id' LIMIT 1");
|
||||
|
||||
if($_datum!=null)
|
||||
{
|
||||
$mahnwesen_datum = $this->app->String->Convert($_datum,'%1.%2.%3','%3-%2-%1');
|
||||
$mahnwesen_datum_deutsch = $_datum;
|
||||
}
|
||||
|
||||
$zahlungsweise = strtolower($zahlungsweise);
|
||||
/*
|
||||
if($als=='zahlungserinnerung')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenZahlungserinnerung",$sprache,$projekt,"rechnung",$rechnung_id);
|
||||
$tage = $this->GetKonfiguration('mahnwesen_m1_tage');
|
||||
}
|
||||
else if($als=='mahnung1')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung1",$sprache,$projekt,"rechnung",$rechnung_id);
|
||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m1_gebuehr');
|
||||
$tage = $this->GetKonfiguration('mahnwesen_m2_tage');
|
||||
}
|
||||
else if($als=='mahnung2')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung2",$sprache,$projekt,"rechnung",$rechnung_id);
|
||||
$tage = $this->GetKonfiguration('mahnwesen_m3_tage');
|
||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m2_gebuehr');
|
||||
}
|
||||
else if($als=='mahnung3')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenMahnung3",$sprache,$projekt,"rechnung",$rechnung_id);
|
||||
$tage = $this->GetKonfiguration('mahnwesen_ik_tage');
|
||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_m3_gebuehr');
|
||||
}
|
||||
else if($als=='inkasso')
|
||||
{
|
||||
$body = $this->GetGeschaeftsBriefText("MahnwesenInkasso",$sprache,$projekt,"rechnung",$rechnung_id);
|
||||
//$tage = $this->GetKonfiguration("mahnwesen_ik_tage");
|
||||
$tage = 3; //eigentlich vorbei
|
||||
$mahngebuehr = $this->GetKonfiguration('mahnwesen_ik_gebuehr');
|
||||
}
|
||||
else
|
||||
{
|
||||
$body = $this->app->erp->Beschriftung("dokument_anschreiben");
|
||||
} */
|
||||
|
||||
$betreff = $this->app->erp->GetGeschaeftsBriefBetreff($rechnungarr['mahn_name'],$sprache,$projekt,"rechnung",$rechnung_id);
|
||||
$body = $this->app->erp->GetGeschaeftsBriefText($rechnungarr['mahn_name'],$sprache,$projekt,"rechnung",$rechnung_id);
|
||||
|
||||
if (empty($betreff) || empty($body)) {
|
||||
throw new QueryFailureException("Geschaeftsbrief-Vorlage nicht gefunden: ''".$rechnungarr['mahn_name']."'");
|
||||
}
|
||||
|
||||
$offen = $this->app->erp->GetSaldoDokument($rechnung_id, 'rechnung');
|
||||
|
||||
if($tage <=0) $tage = 0;
|
||||
|
||||
/* $datummahnung= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$mahnwesen_datum', INTERVAL $tage DAY),'%d.%m.%Y')");
|
||||
$datumrechnungzahlungsziel= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$datum_sql', INTERVAL $zahlungszieltage DAY),'%d.%m.%Y')");
|
||||
|
||||
$tage_ze = $zahlungszieltage + $this->GetKonfiguration('mahnwesen_m1_tage');
|
||||
$datumzahlungserinnerung= $this->app->DB->Select("SELECT DATE_FORMAT(DATE_ADD('$datum_sql', INTERVAL $tage_ze DAY),'%d.%m.%Y')");*/
|
||||
|
||||
// checkstamp $this->CheckStamp("jhdskKUHsiusakiakuhsd"); // errechnet aus laufzeit und kundenid // wenn es nicht drinnen ist darf es nicht gehen
|
||||
/*
|
||||
if($mahngebuehr=='' || !is_numeric($mahngebuehr))
|
||||
$mahngebuehr = 0;
|
||||
|
||||
//$offen= '11,23';
|
||||
$body = str_replace('{RECHNUNG}',$belegnr,$body);
|
||||
$body = str_replace('{BELEGNR}',$belegnr,$body);
|
||||
$body = str_replace('{DATUMRECHNUNG}',$datum,$body);
|
||||
$body = str_replace('{TAGE}',$tage,$body);
|
||||
$body = str_replace('{OFFEN}',$this->app->erp->formatMoney(-$offen['betrag'],$offen['waehrung']),$body);
|
||||
$body = str_replace('{SOLL}',$this->app->erp->formatMoney($soll,$waehrung),$body);
|
||||
$body = str_replace('{SUMME}',$this->app->erp->formatMoney($soll - $ist + $mahngebuehr,$waehrung),$body);
|
||||
$body = str_replace('{IST}',$this->app->erp->formatMoney($ist,$waehrung),$body);
|
||||
$body = str_replace('{DATUM}',$datummahnung,$body);
|
||||
$body = str_replace('{MAHNGEBUEHR}',$this->app->erp->formatMoney($mahngebuehr,$waehrung),$body);
|
||||
$body = str_replace('{OFFENMITMAHNGEBUEHR}',$this->app->erp->formatMoney($mahngebuehr + $soll - $ist,$waehrung),$body);
|
||||
$body = str_replace('{MAHNDATUM}',$mahnwesen_datum_deutsch,$body);
|
||||
|
||||
|
||||
// Im Protokoll suchen Datum von Zahlungserinnerung, Mahnung 1, Mahnung 2, Mahnung 3
|
||||
|
||||
$mahnung1 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$rechnung_id'
|
||||
AND grund LIKE 'Mahnung1 versendet%' ORDER by Zeit DESC LIMIT 1");
|
||||
|
||||
$mahnung2 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$rechnung_id'
|
||||
AND grund LIKE 'Mahnung2 versendet%' ORDER by Zeit DESC LIMIT 1");
|
||||
|
||||
$mahnung3 = $this->app->DB->Select("SELECT DATE_FORMAT(zeit,'%d.%m.%Y') FROM rechnung_protokoll WHERE rechnung='$rechnung_id'
|
||||
AND grund LIKE 'Mahnung3 versendet%' ORDER by Zeit DESC LIMIT 1");
|
||||
|
||||
$body = str_replace('{DATUMMAHNUNG1}',$mahnung1,$body);
|
||||
$body = str_replace('{DATUMMAHNUNG2}',$mahnung2,$body);
|
||||
$body = str_replace('{DATUMMAHNUNG3}',$mahnung3,$body);
|
||||
|
||||
$body = str_replace('{DATUMZAHLUNGSERINNERUNGFAELLIG}',$datumzahlungserinnerung,$body);
|
||||
$body = str_replace('{DATUMZAHLUNGSERINNERUNG}',$datumzahlungserinnerung,$body);
|
||||
$body = str_replace('{DATUMRECHNUNGZAHLUNGSZIEL}',$datumrechnungzahlungsziel,$body);*/
|
||||
|
||||
$mapping = [
|
||||
'rechnung' => $belegnr,
|
||||
'belegnr' => $belegnr,
|
||||
'datum' => $datum_sql,
|
||||
'offen' => $this->app->erp->EUR(-$offen['betrag'])." ".$offen['waehrung'],
|
||||
'mahngebuehr' => $this->app->erp->EUR($rechnungarr['mahn_gebuehr']),
|
||||
'heute' => $rechnungarr['heute']
|
||||
];
|
||||
|
||||
$betreff = $this->app->erp->ParseVars($mapping,$betreff);
|
||||
$body = $this->app->erp->ParseVars($mapping,$body);
|
||||
$body = $this->app->erp->ParseUserVars('rechnung',$rechnung_id,$body);
|
||||
|
||||
return(array(
|
||||
'betreff' => $betreff,
|
||||
'body' => $body,
|
||||
'mail' => $rechnungarr['mahn_mail'] != 0,
|
||||
'druck' => $rechnungarr['mahn_druck'] != 0,
|
||||
'adresse' => $rechnungarr['adresse'],
|
||||
'empfaenger' => $rechnungarr['email'],
|
||||
'projekt' => $rechnungarr['projekt'],
|
||||
'rechnung' => $rechnungarr
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Create CRM entry for mahnung
|
||||
* typ = brief, email
|
||||
*/
|
||||
function MahnungCRM(string $typ, array $rechnung, $betreff, $text, $fileid, $filename) {
|
||||
|
||||
$data = array();
|
||||
$data['typ'] = $typ;
|
||||
$data['projekt'] = $rechnung['projekt'];
|
||||
$data['datum'] = date('Y-m-d');
|
||||
$data['uhrzeit'] = date('Y-m-d H:i:s');
|
||||
$data['user'] = $rechnung['adresse'];
|
||||
$data['an'] = $rechnung['name'];
|
||||
$data['adresse'] = $rechnung['strasse'];
|
||||
$data['plz'] = $rechnung['plz'];
|
||||
$data['ort'] = $rechnung['ort'];
|
||||
$data['betreff'] = $betreff;
|
||||
$data['content'] = $text;
|
||||
$data['email_an'] = $rechnung['email'];
|
||||
$data['sent'] = 1;
|
||||
|
||||
$crm_id = $this->app->erp->DokumentCreate($data,$this->app->User->GetAdresse());
|
||||
$this->app->erp->AddDateiStichwort($fileid,'anhang','dokument',$crm_id);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
+17
-14
@@ -49,11 +49,16 @@ class Produktion {
|
||||
|
||||
$width = array('1%','1%','10%'); // Fill out manually later
|
||||
|
||||
// $findcols = array('p.datum', 'p.art', 'p.projekt', 'p.belegnr', 'p.internet', 'p.bearbeiter', 'p.angebot', 'p.freitext', 'p.internebemerkung', 'p.status', 'p.adresse', 'p.name', 'p.abteilung', 'p.unterabteilung', 'p.strasse', 'p.adresszusatz', 'p.ansprechpartner', 'p.plz', 'p.ort', 'p.land', 'p.ustid', 'p.ust_befreit', 'p.ust_inner', 'p.email', 'p.telefon', 'p.telefax', 'p.betreff', 'p.kundennummer', 'p.versandart', 'p.vertrieb', 'p.zahlungsweise', 'p.zahlungszieltage', 'p.zahlungszieltageskonto', 'p.zahlungszielskonto', 'p.bank_inhaber', 'p.bank_institut', 'p.bank_blz', 'p.bank_konto', 'p.kreditkarte_typ', 'p.kreditkarte_inhaber', 'p.kreditkarte_nummer', 'p.kreditkarte_pruefnummer', 'p.kreditkarte_monat', 'p.kreditkarte_jahr', 'p.firma', 'p.versendet', 'p.versendet_am', 'p.versendet_per', 'p.versendet_durch', 'p.autoversand', 'p.keinporto', 'p.keinestornomail', 'p.abweichendelieferadresse', 'p.liefername', 'p.lieferabteilung', 'p.lieferunterabteilung', 'p.lieferland', 'p.lieferstrasse', 'p.lieferort', 'p.lieferplz', 'p.lieferadresszusatz', 'p.lieferansprechpartner', 'p.packstation_inhaber', 'p.packstation_station', 'p.packstation_ident', 'p.packstation_plz', 'p.packstation_ort', 'p.autofreigabe', 'p.freigabe', 'p.nachbesserung', 'p.gesamtsumme', 'p.inbearbeitung', 'p.abgeschlossen', 'p.nachlieferung', 'p.lager_ok', 'p.porto_ok', 'p.ust_ok', 'p.check_ok', 'p.vorkasse_ok', 'p.nachnahme_ok', 'p.reserviert_ok', 'p.bestellt_ok', 'p.zeit_ok', 'p.versand_ok', 'p.partnerid', 'p.folgebestaetigung', 'p.zahlungsmail', 'p.stornogrund', 'p.stornosonstiges', 'p.stornorueckzahlung', 'p.stornobetrag', 'p.stornobankinhaber', 'p.stornobankkonto', 'p.stornobankblz', 'p.stornobankbank', 'p.stornogutschrift', 'p.stornogutschriftbeleg', 'p.stornowareerhalten', 'p.stornomanuellebearbeitung', 'p.stornokommentar', 'p.stornobezahlt', 'p.stornobezahltam', 'p.stornobezahltvon', 'p.stornoabgeschlossen', 'p.stornorueckzahlungper', 'p.stornowareerhaltenretour', 'p.partnerausgezahlt', 'p.partnerausgezahltam', 'p.kennen', 'p.logdatei', 'p.bezeichnung', 'p.datumproduktion', 'p.anschreiben', 'p.usereditid', 'p.useredittimestamp', 'p.steuersatz_normal', 'p.steuersatz_zwischen', 'p.steuersatz_ermaessigt', 'p.steuersatz_starkermaessigt', 'p.steuersatz_dienstleistung', 'p.waehrung', 'p.schreibschutz', 'p.pdfarchiviert', 'p.pdfarchiviertversion', 'p.typ', 'p.reservierart', 'p.auslagerart', 'p.projektfiliale', 'p.datumauslieferung', 'p.datumbereitstellung', 'p.unterlistenexplodieren', 'p.charge', 'p.arbeitsschrittetextanzeigen', 'p.einlagern_ok', 'p.auslagern_ok', 'p.mhd', 'p.auftragmengenanpassen', 'p.internebezeichnung', 'p.mengeoriginal', 'p.teilproduktionvon', 'p.teilproduktionnummer', 'p.parent', 'p.parentnummer', 'p.bearbeiterid', 'p.mengeausschuss', 'p.mengeerfolgreich', 'p.abschlussbemerkung', 'p.auftragid', 'p.funktionstest', 'p.seriennummer_erstellen', 'p.unterseriennummern_erfassen', 'p.datumproduktionende', 'p.standardlager');
|
||||
$findcols = array('p.id','p.id','p.belegnr','p.kundennummer','p.name','p.datum','a.name_de','soll','ist', 'zeit_geplant','zeit_geplant', 'projekt','p.status','icons','id');
|
||||
$bezeichnung = "CONCAT (
|
||||
IFNULL((SELECT CONCAT(a.name_de,' (',a.nummer,')','<br>') FROM artikel a INNER JOIN produktion_position pp ON pp.artikel = a.id WHERE pp.stuecklistestufe = 1 AND pp.produktion = p.id LIMIT 1),''),
|
||||
CONCAT('<i>',internebezeichnung,'</i>')
|
||||
)";
|
||||
|
||||
$adresse = "(SELECT name FROM adresse WHERE kundennummer = p.kundennummer AND p.kundennummer != 0 LIMIT 1)";
|
||||
|
||||
$findcols = array('p.id','p.id','p.belegnr','p.kundennummer',$adresse,'p.datum',$bezeichnung,'soll','ist', 'zeit_geplant','zeit_geplant', 'projekt','p.status','icons','id');
|
||||
|
||||
// $searchsql = array('p.datum', 'p.art', 'p.projekt', 'p.belegnr', 'p.internet', 'p.bearbeiter', 'p.angebot', 'p.freitext', 'p.internebemerkung', 'p.status', 'p.adresse', 'p.name', 'p.abteilung', 'p.unterabteilung', 'p.strasse', 'p.adresszusatz', 'p.ansprechpartner', 'p.plz', 'p.ort', 'p.land', 'p.ustid', 'p.ust_befreit', 'p.ust_inner', 'p.email', 'p.telefon', 'p.telefax', 'p.betreff', 'p.kundennummer', 'p.versandart', 'p.vertrieb', 'p.zahlungsweise', 'p.zahlungszieltage', 'p.zahlungszieltageskonto', 'p.zahlungszielskonto', 'p.bank_inhaber', 'p.bank_institut', 'p.bank_blz', 'p.bank_konto', 'p.kreditkarte_typ', 'p.kreditkarte_inhaber', 'p.kreditkarte_nummer', 'p.kreditkarte_pruefnummer', 'p.kreditkarte_monat', 'p.kreditkarte_jahr', 'p.firma', 'p.versendet', 'p.versendet_am', 'p.versendet_per', 'p.versendet_durch', 'p.autoversand', 'p.keinporto', 'p.keinestornomail', 'p.abweichendelieferadresse', 'p.liefername', 'p.lieferabteilung', 'p.lieferunterabteilung', 'p.lieferland', 'p.lieferstrasse', 'p.lieferort', 'p.lieferplz', 'p.lieferadresszusatz', 'p.lieferansprechpartner', 'p.packstation_inhaber', 'p.packstation_station', 'p.packstation_ident', 'p.packstation_plz', 'p.packstation_ort', 'p.autofreigabe', 'p.freigabe', 'p.nachbesserung', 'p.gesamtsumme', 'p.inbearbeitung', 'p.abgeschlossen', 'p.nachlieferung', 'p.lager_ok', 'p.porto_ok', 'p.ust_ok', 'p.check_ok', 'p.vorkasse_ok', 'p.nachnahme_ok', 'p.reserviert_ok', 'p.bestellt_ok', 'p.zeit_ok', 'p.versand_ok', 'p.partnerid', 'p.folgebestaetigung', 'p.zahlungsmail', 'p.stornogrund', 'p.stornosonstiges', 'p.stornorueckzahlung', 'p.stornobetrag', 'p.stornobankinhaber', 'p.stornobankkonto', 'p.stornobankblz', 'p.stornobankbank', 'p.stornogutschrift', 'p.stornogutschriftbeleg', 'p.stornowareerhalten', 'p.stornomanuellebearbeitung', 'p.stornokommentar', 'p.stornobezahlt', 'p.stornobezahltam', 'p.stornobezahltvon', 'p.stornoabgeschlossen', 'p.stornorueckzahlungper', 'p.stornowareerhaltenretour', 'p.partnerausgezahlt', 'p.partnerausgezahltam', 'p.kennen', 'p.logdatei', 'p.bezeichnung', 'p.datumproduktion', 'p.anschreiben', 'p.usereditid', 'p.useredittimestamp', 'p.steuersatz_normal', 'p.steuersatz_zwischen', 'p.steuersatz_ermaessigt', 'p.steuersatz_starkermaessigt', 'p.steuersatz_dienstleistung', 'p.waehrung', 'p.schreibschutz', 'p.pdfarchiviert', 'p.pdfarchiviertversion', 'p.typ', 'p.reservierart', 'p.auslagerart', 'p.projektfiliale', 'p.datumauslieferung', 'p.datumbereitstellung', 'p.unterlistenexplodieren', 'p.charge', 'p.arbeitsschrittetextanzeigen', 'p.einlagern_ok', 'p.auslagern_ok', 'p.mhd', 'p.auftragmengenanpassen', 'p.internebezeichnung', 'p.mengeoriginal', 'p.teilproduktionvon', 'p.teilproduktionnummer', 'p.parent', 'p.parentnummer', 'p.bearbeiterid', 'p.mengeausschuss', 'p.mengeerfolgreich', 'p.abschlussbemerkung', 'p.auftragid', 'p.funktionstest', 'p.seriennummer_erstellen', 'p.unterseriennummern_erfassen', 'p.datumproduktionende', 'p.standardlager');
|
||||
$searchsql = array('p.datum', 'p.art', 'p.projekt', 'p.belegnr', 'p.internet', 'p.bearbeiter', 'p.angebot', 'p.freitext', 'p.internebemerkung', 'p.status', 'p.adresse', 'p.name', 'p.abteilung', 'p.unterabteilung', 'p.strasse', 'p.adresszusatz', 'p.ansprechpartner', 'p.plz', 'p.ort', 'p.land', 'p.ustid', 'p.ust_befreit', 'p.ust_inner', 'p.email', 'p.telefon', 'p.telefax', 'p.betreff', 'p.kundennummer', 'p.versandart', 'p.vertrieb', 'p.zahlungsweise', 'p.zahlungszieltage', 'p.zahlungszieltageskonto', 'p.zahlungszielskonto', 'p.bank_inhaber', 'p.bank_institut', 'p.bank_blz', 'p.bank_konto', 'p.kreditkarte_typ', 'p.kreditkarte_inhaber', 'p.kreditkarte_nummer', 'p.kreditkarte_pruefnummer', 'p.kreditkarte_monat', 'p.kreditkarte_jahr', 'p.firma', 'p.versendet', 'p.versendet_am', 'p.versendet_per', 'p.versendet_durch', 'p.autoversand', 'p.keinporto', 'p.keinestornomail', 'p.abweichendelieferadresse', 'p.liefername', 'p.lieferabteilung', 'p.lieferunterabteilung', 'p.lieferland', 'p.lieferstrasse', 'p.lieferort', 'p.lieferplz', 'p.lieferadresszusatz', 'p.lieferansprechpartner', 'p.packstation_inhaber', 'p.packstation_station', 'p.packstation_ident', 'p.packstation_plz', 'p.packstation_ort', 'p.autofreigabe', 'p.freigabe', 'p.nachbesserung', 'p.gesamtsumme', 'p.inbearbeitung', 'p.abgeschlossen', 'p.nachlieferung', 'p.lager_ok', 'p.porto_ok', 'p.ust_ok', 'p.check_ok', 'p.vorkasse_ok', 'p.nachnahme_ok', 'p.reserviert_ok', 'p.bestellt_ok', 'p.zeit_ok', 'p.versand_ok', 'p.partnerid', 'p.folgebestaetigung', 'p.zahlungsmail', 'p.stornogrund', 'p.stornosonstiges', 'p.stornorueckzahlung', 'p.stornobetrag', 'p.stornobankinhaber', 'p.stornobankkonto', 'p.stornobankblz', 'p.stornobankbank', 'p.stornogutschrift', 'p.stornogutschriftbeleg', 'p.stornowareerhalten', 'p.stornomanuellebearbeitung', 'p.stornokommentar', 'p.stornobezahlt', 'p.stornobezahltam', 'p.stornobezahltvon', 'p.stornoabgeschlossen', 'p.stornorueckzahlungper', 'p.stornowareerhaltenretour', 'p.partnerausgezahlt', 'p.partnerausgezahltam', 'p.kennen', 'p.logdatei', 'p.bezeichnung', 'p.datumproduktion', 'p.anschreiben', 'p.usereditid', 'p.useredittimestamp', 'p.steuersatz_normal', 'p.steuersatz_zwischen', 'p.steuersatz_ermaessigt', 'p.steuersatz_starkermaessigt', 'p.steuersatz_dienstleistung', 'p.waehrung', 'p.schreibschutz', 'p.pdfarchiviert', 'p.pdfarchiviertversion', 'p.typ', 'p.reservierart', 'p.auslagerart', 'p.projektfiliale', 'p.datumauslieferung', 'p.datumbereitstellung', 'p.unterlistenexplodieren', 'p.charge', 'p.arbeitsschrittetextanzeigen', 'p.einlagern_ok', 'p.auslagern_ok', 'p.mhd', 'p.auftragmengenanpassen', 'p.internebezeichnung', 'p.mengeoriginal', 'p.teilproduktionvon', 'p.teilproduktionnummer', 'p.parent', 'p.parentnummer', 'p.bearbeiterid', 'p.mengeausschuss', 'p.mengeerfolgreich', 'p.abschlussbemerkung', 'p.auftragid', 'p.funktionstest', 'p.seriennummer_erstellen', 'p.unterseriennummern_erfassen', 'p.datumproduktionende', 'p.standardlager');
|
||||
$searchsql = array('p.belegnr','p.kundennummer','p.name',$bezeichnung);
|
||||
|
||||
$defaultorder = 1;
|
||||
$defaultorderdesc = 0;
|
||||
@@ -73,13 +78,10 @@ class Produktion {
|
||||
$dropnbox,
|
||||
p.belegnr,
|
||||
p.kundennummer,
|
||||
(SELECT name FROM adresse WHERE kundennummer = p.kundennummer AND p.kundennummer != 0 LIMIT 1) as name,
|
||||
".$adresse." as name,
|
||||
DATE_FORMAT(datum,'%d.%m.%Y') as datum,
|
||||
|
||||
CONCAT (
|
||||
IFNULL((SELECT CONCAT(a.name_de,' (',a.nummer,')','<br>') FROM artikel a INNER JOIN produktion_position pp ON pp.artikel = a.id WHERE pp.stuecklistestufe = 1 AND pp.produktion = p.id LIMIT 1),''),
|
||||
CONCAT('<i>',internebezeichnung,'</i>')
|
||||
) as bezeichnung,
|
||||
".$bezeichnung." as bezeichnung,
|
||||
|
||||
FORMAT((SELECT SUM(menge) FROM produktion_position pp WHERE pp.produktion = p.id AND pp.stuecklistestufe = 1),0,'de_DE') as soll,
|
||||
FORMAT(p.mengeerfolgreich,0,'de_DE') as ist,
|
||||
@@ -298,7 +300,7 @@ class Produktion {
|
||||
) as lager,
|
||||
FORMAT ((SELECT SUM(menge) FROM lager_reserviert r WHERE r.lager_platz = $standardlager AND r.artikel = p.artikel AND r.objekt = 'produktion' AND r.parameter = $id),0,'de_DE') as reserviert,
|
||||
FORMAT(SUM(p.menge),0,'de_DE') as menge,
|
||||
FORMAT(p.geliefert_menge,0,'de_DE') as geliefert_menge,
|
||||
FORMAT(SUM(p.geliefert_menge),0,'de_DE') as geliefert_menge,
|
||||
p.id
|
||||
FROM produktion_position p";
|
||||
|
||||
@@ -584,8 +586,8 @@ class Produktion {
|
||||
$sql = "UPDATE produktion SET status = 'gestartet' WHERE id=$id";
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
$sql = "SELECT pp.id, pp.artikel, pp.menge, pp.geliefert_menge, pp.stuecklistestufe, a.lagerartikel FROM produktion_position pp INNER JOIN artikel a ON a.id = pp.artikel WHERE pp.produktion=$id";
|
||||
$material = $this->app->DB->SelectArr($sql);
|
||||
$sql = "SELECT pp.id, pp.artikel, pp.menge, pp.geliefert_menge, pp.stuecklistestufe, a.lagerartikel FROM produktion_position pp INNER JOIN artikel a ON a.id = pp.artikel WHERE pp.produktion=$id";
|
||||
$material = $this->app->DB->SelectArr($sql);
|
||||
|
||||
foreach ($material as $material_position) {
|
||||
|
||||
@@ -605,9 +607,10 @@ class Produktion {
|
||||
}
|
||||
|
||||
// Update position
|
||||
$sql = "UPDATE produktion_position SET geliefert_menge = geliefert_menge + $menge_artikel_auslagern WHERE id = ".$material_position['id'];
|
||||
$sql = "UPDATE produktion_position SET geliefert_menge = geliefert_menge + $menge_artikel_auslagern WHERE id = ".$material_position['id'];
|
||||
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
break;
|
||||
|
||||
+82
-37
@@ -236,13 +236,6 @@ class Rechnung extends GenRechnung
|
||||
$this->app->Location->execute("index.php?module=rechnung&action=edit&id=$id&msg=$msg");
|
||||
}
|
||||
|
||||
function RechnungMahnwesen()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function RechnungLastschriftWdh()
|
||||
{
|
||||
|
||||
@@ -642,7 +635,7 @@ class Rechnung extends GenRechnung
|
||||
$this->app->Tpl->Set('PROJEKT', $projekt);
|
||||
}
|
||||
|
||||
$this->app->Tpl->Set('ZAHLWEISE',$auftragArr[0]['zahlungsweise']);
|
||||
$this->app->Tpl->Set('ZAHLWEISE',ucfirst($auftragArr[0]['zahlungsweise']));
|
||||
$this->app->Tpl->Set('STATUS',($auftragArr[0]['status'] === 'storniert' && $auftragArr[0]['teilstorno'] == 1?'teilstorniert':$auftragArr[0]['status']));
|
||||
$this->app->Tpl->Set('IHREBESTELLNUMMER',$auftragArr[0]['ihrebestellnummer']);
|
||||
|
||||
@@ -651,7 +644,10 @@ class Rechnung extends GenRechnung
|
||||
if($auftragArr[0]['mahnwesen']=='') {
|
||||
$auftragArr[0]['mahnwesen']='-';
|
||||
}
|
||||
$this->app->Tpl->Set('MAHNWESEN',$auftragArr[0]['mahnwesen']);
|
||||
|
||||
$mahnwesen_name = $this->app->DB->SelectArr("SELECT name FROM mahnwesen WHERE id='".$auftragArr[0]['mahnwesen']."' LIMIT 1")[0]['name'];
|
||||
$this->app->Tpl->Set('MAHNWESEN',$mahnwesen_name);
|
||||
|
||||
if($auftragArr[0]['mahnwesen_datum']=='0000-00-00') {
|
||||
$auftragArr[0]['mahnwesen_datum']='-';
|
||||
}
|
||||
@@ -896,7 +892,7 @@ class Rechnung extends GenRechnung
|
||||
$tmp->Query("SELECT zeit,bearbeiter,grund FROM rechnung_protokoll WHERE rechnung='$id' ORDER by zeit DESC",0,"");
|
||||
$tmp->DisplayNew('PROTOKOLL',"Protokoll","noAction");
|
||||
|
||||
|
||||
/*
|
||||
$query = $this->app->DB->SelectArr("SELECT zeit,bearbeiter,grund FROM rechnung_protokoll WHERE rechnung='$id' ORDER by zeit");
|
||||
if($query)
|
||||
{
|
||||
@@ -912,12 +908,12 @@ class Rechnung extends GenRechnung
|
||||
{
|
||||
|
||||
$tmp2 = new EasyTable($this->app);
|
||||
$tmp2->Query("SELECT concat('<a href=\"index.php?module=mahnwesen&action=mahnpdf&id=',rechnung,'&datum=',DATE_FORMAT(zeit,'%d.%m.%Y'),'&mahnwesen=',LOWER(LEFT(grund,LOCATE(' ',grund))),'\"><img src=\"themes/{$this->app->Conf->WFconf[defaulttheme]}/images/pdf.svg\" border=\"0\"></a>') as PDF, Date(zeit) as Datum, bearbeiter,grund FROM rechnung_protokoll WHERE rechnung='$id' AND zeit >= '".$zeit."' ORDER by zeit DESC");
|
||||
$tmp2->Query("SELECT concat('<a href=\"index.php?module=mahnwesen&action=mahnpdf&id=',rechnung,'&datum=',DATE_FORMAT(zeit,'%d.%m.%Y'),'&mahnwesen=',LOWER(LEFT(grund,LOCATE(' ',grund))),'\"><img src=\"themes/{$this->app->Conf->WFconf['defaulttheme']}/images/pdf.svg\" border=\"0\"></a>') as PDF, Date(zeit) as Datum, bearbeiter,grund FROM rechnung_protokoll WHERE rechnung='$id' AND zeit >= '".$zeit."' ORDER by zeit DESC");
|
||||
$tmp2->DisplayNew('MAHNPROTOKOLL',"Protokoll","noAction");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
if(class_exists('RechnungPDFCustom'))
|
||||
{
|
||||
@@ -1823,7 +1819,7 @@ class Rechnung extends GenRechnung
|
||||
|
||||
if($bezahlt_am=='--')$bezahlt_am='0000-00-00';
|
||||
$alte_mahnstufe = $this->app->DB->Select("SELECT mahnwesen FROM rechnung WHERE id='$id' LIMIT 1");
|
||||
if($alte_mahnstufe!=$mahnwesen) $versendet=0; else $versendet=1;
|
||||
if($alte_mahnstufe!=$mahnwesen) $versendet=0;
|
||||
|
||||
/* if($mahnwesenfestsetzen=='1')
|
||||
{*/
|
||||
@@ -1947,7 +1943,7 @@ class Rechnung extends GenRechnung
|
||||
' überein <input type="submit" name="resetextsoll" value="Festgeschriebene Summe zurücksetzen" /></div></form>'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
parent::RechnungEdit();
|
||||
if($id > 0 && $this->app->DB->Select(
|
||||
sprintf(
|
||||
@@ -2243,29 +2239,11 @@ class Rechnung extends GenRechnung
|
||||
break;
|
||||
}
|
||||
}
|
||||
} // ende ausfuehren
|
||||
|
||||
if($this->app->Secure->GetPOST('zahlungsstatus_berechnen') && $this->app->erp->RechteVorhanden('rechnung', 'edit')) {
|
||||
$this->rechnung_zahlstatus_berechnen();
|
||||
}
|
||||
|
||||
// refresh all open items
|
||||
$openids = $this->app->DB->SelectArr("SELECT id, waehrung from rechnung WHERE zahlungsstatus = 'offen'");
|
||||
|
||||
foreach ($openids as $openid) {
|
||||
$saldo = $this->app->erp->GetSaldoDokument($openid['id'],'rechnung');
|
||||
|
||||
if (!empty($saldo)) {
|
||||
if ($saldo['waehrung'] == $openid['waehrung']) {
|
||||
$sql = "UPDATE
|
||||
rechnung
|
||||
SET
|
||||
ist = ".$saldo['betrag']."+soll,
|
||||
zahlungsstatus = IF(".$saldo['betrag']." = 0,'bezahlt','offen')
|
||||
WHERE id=".$openid['id'];
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->app->DB->Update("UPDATE rechnung SET ist = null WHERE id=".$openid['id']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->Tpl->Set('UEBERSCHRIFT','Rechnungen');
|
||||
|
||||
@@ -2274,7 +2252,6 @@ class Rechnung extends GenRechnung
|
||||
|
||||
$this->app->erp->MenuEintrag('index.php?module=rechnung&action=list','Übersicht');
|
||||
$this->app->erp->MenuEintrag('index.php?module=rechnung&action=create','Neue Rechnung anlegen');
|
||||
|
||||
if(strlen($backurl)>5){
|
||||
$this->app->erp->MenuEintrag("$backurl", 'Zurück');
|
||||
}
|
||||
@@ -2765,4 +2742,72 @@ class Rechnung extends GenRechnung
|
||||
return($et->DisplayNew('return',""));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Recalculate the payments status with skonto
|
||||
*/
|
||||
|
||||
function rechnung_zahlstatus_berechnen() {
|
||||
// START RECALCULATE
|
||||
$this->app->erp->fibu_rebuild_tables();
|
||||
$offene_rechnungen = $this->app->DB->SelectArr(" SELECT
|
||||
id,
|
||||
soll,
|
||||
waehrung,
|
||||
datum,
|
||||
zahlungszieltage,
|
||||
DATE_ADD(datum, INTERVAL zahlungszieltage DAY) as zieldatum,
|
||||
CURRENT_DATE > DATE_ADD(datum, INTERVAL zahlungszieltage DAY) as faellig,
|
||||
zahlungszielskonto,
|
||||
TRUNCATE(soll*(1-(zahlungszielskonto/100)),2) as skontosoll,
|
||||
zahlungszieltageskonto,
|
||||
DATE_ADD(datum, INTERVAL zahlungszieltageskonto DAY) as zieldatumskonto
|
||||
FROM
|
||||
rechnung
|
||||
WHERE
|
||||
belegnr <> '' AND zahlungsstatus = 'offen'
|
||||
");
|
||||
|
||||
foreach ($offene_rechnungen as $offene_rechnung) {
|
||||
$saldo = $this->app->erp->GetSaldoDokument($offene_rechnung['id'],'rechnung');
|
||||
if (!empty($saldo)) {
|
||||
if ($saldo['waehrung'] == $offene_rechnung['waehrung']) {
|
||||
$offene_rechnung['ist'] = $offene_rechnung['soll']+$saldo['betrag'];
|
||||
// Check for skonto
|
||||
$skontorelevante_zahlungen = $this->app->erp->GetSaldoDokument($offene_rechnung['id'],'rechnung','zubuchung',$offene_rechnung['zieldatumskonto'])['betrag'];
|
||||
$zielkonforme_zahlungen = $this->app->erp->GetSaldoDokument($offene_rechnung['id'],'rechnung','zubuchung',$offene_rechnung['zieldatum'])['betrag'];
|
||||
// Check overall value
|
||||
if ($saldo['betrag'] == 0) {
|
||||
// ok -> will be marked as paid
|
||||
} else if ($skontorelevante_zahlungen >= $offene_rechnung['skontosoll']) {
|
||||
// Skonto ok -> book difference
|
||||
$sachkonto = $this->app->erp->Firmendaten('rechnung_skonto_kontorahmen');
|
||||
if (!empty($sachkonto)) {
|
||||
$this->app->erp->fibu_buchungen_buchen('rechnung',$offene_rechnung['id'],'kontorahmen',$sachkonto,-$saldo['betrag'],$offene_rechnung['waehrung'],date('Y-m-d'),'');
|
||||
$offene_rechnung['ist'] = $offene_rechnung['soll'];
|
||||
} else {
|
||||
}
|
||||
} else if ($offene_rechnung['faellig']) {
|
||||
// Overdue
|
||||
} else {
|
||||
// Not due
|
||||
}
|
||||
// Update rechnung
|
||||
$sql = "UPDATE
|
||||
rechnung
|
||||
SET
|
||||
ist = ".$saldo['betrag']."+soll,
|
||||
zahlungsstatus = IF(".$saldo['betrag']." = 0,'bezahlt','offen')
|
||||
WHERE id=".$offene_rechnung['id'];
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->app->DB->Update("UPDATE rechnung SET ist = null WHERE id=".$offene_rechnung['id']);
|
||||
}
|
||||
}
|
||||
$this->app->erp->fibu_rebuild_tables();
|
||||
// END RECALCULATE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3187
-3187
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
)
|
||||
);
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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{
|
||||
|
||||
+1009
-1006
File diff suppressed because it is too large
Load Diff
+35
-5
@@ -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,9 +310,15 @@ 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',"");
|
||||
|
||||
if (empty($message['betreff'])) {
|
||||
$message['betreff'] = "...";
|
||||
}
|
||||
|
||||
// Xentral 20 compatibility
|
||||
if ($message['textausgang'] != '') {
|
||||
// Sent message
|
||||
@@ -341,7 +347,7 @@ class Ticket {
|
||||
}
|
||||
$this->app->Tpl->Set("NACHRICHT_BETREFF",htmlentities($message['betreff']." (Entwurf)"));
|
||||
} else {
|
||||
$this->app->Tpl->Set("NACHRICHT_BETREFF",'<a href="index.php?module=ticket&action=text&mid='.$message['id'].'" target="_blank">'.htmlentities($message['betreff']).'</a>');
|
||||
$this->app->Tpl->Set("NACHRICHT_BETREFF",'<a href="index.php?module=ticket&action=text&mid='.$message['id'].'&insecure=1" target="_blank">'.htmlentities($message['betreff']).'</a>');
|
||||
}
|
||||
$this->app->Tpl->Set("NACHRICHT_SENDER",htmlentities($message['verfasser']." <".$message['mail_replyto'].">"));
|
||||
$this->app->Tpl->Set("NACHRICHT_RECIPIENTS",htmlentities($message['mail']));
|
||||
@@ -407,6 +413,12 @@ class Ticket {
|
||||
}
|
||||
|
||||
if ($insecure) {
|
||||
// Adjust cid images
|
||||
$attachments = $this->app->erp->GetDateiSubjektObjekt('Anhang','Ticket',$mid);
|
||||
foreach($attachments as $attachment) {
|
||||
$filename = $this->app->erp->GetDateiName($attachment);
|
||||
$messages[0]['text'] = str_replace($filename,'index.php?module=dateien&action=send&id='.$attachment,$messages[0]['text']);
|
||||
}
|
||||
$this->app->Tpl->Set("TEXT",$messages[0]['text']);
|
||||
} else {
|
||||
|
||||
@@ -480,6 +492,22 @@ class Ticket {
|
||||
$input['warteschlange'] = explode(" ",$input['warteschlange'])[0]; // Just the label
|
||||
$input['zeit'] = date('Y-m-d H:i:s', time());
|
||||
|
||||
$tags = explode(',',$input['tags']);
|
||||
// Replace multiple '!' and '?'
|
||||
foreach ($tags as &$tag) {
|
||||
$pos = strpos($tag, '?');
|
||||
if ($pos !== false) {
|
||||
$tag = substr($tag,0,$pos+1) . str_replace('?','',substr($tag,$pos+1));
|
||||
}
|
||||
$tag = preg_replace("/([?!])\\1+/", "$1", $tag);
|
||||
}
|
||||
$input['tags'] = implode(',',$tags);
|
||||
|
||||
$input['tags'] = str_replace(' ?','?',$input['tags']);
|
||||
$input['tags'] = str_replace(' !','!',$input['tags']);
|
||||
$input['tags'] = str_replace('?!','?',$input['tags']);
|
||||
$input['tags'] = str_replace('!?','?',$input['tags']);
|
||||
|
||||
$columns = "id, ";
|
||||
$values = "$id, ";
|
||||
$update = "";
|
||||
@@ -596,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);
|
||||
}
|
||||
@@ -707,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'";
|
||||
@@ -805,7 +835,7 @@ class Ticket {
|
||||
// Attachments
|
||||
$files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],"");
|
||||
|
||||
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,63})(?:\.[a-z]{2})?/i';
|
||||
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,63})(?:\.[a-z]{2,63})?/i';
|
||||
|
||||
preg_match_all($pattern, $drafted_messages[0]['mail'], $matches);
|
||||
$to = $matches[0];
|
||||
|
||||
+97
-43
@@ -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 ü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 ü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");
|
||||
|
||||
+2333
-2330
File diff suppressed because it is too large
Load Diff
+6
-15
@@ -2241,7 +2241,7 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
|
||||
$this->app->Tpl->Add('TAB1',"Sie benutzen die kommerzielle Version von Xentral. Alle Rechte vorbehalten. Beachten Sie die Nutzungsbedinungen.<br><br>© Copyright by Xentral ERP Software GmbH Augsburg");
|
||||
}
|
||||
else {
|
||||
$this->app->Tpl->Add('TAB1','OpenXE is free open source software under AGPL-3.0 license, based on <a href="https://xentral.com" target="_blank">Xentral®</a> by Xentral ERP Software GmbH.<br><br><div class="info"><img src="themes/new/images/Xentral_ERP_Logo-200.png"><br>Das Logo und der Link zur Homepage <a href="https://xentral.biz" target=\_blank\>https://xentral.biz</a> dürfen nicht entfernt werden.</div><br>© Copyright by OpenXE project & Xentral ERP Software GmbH Augsburg');
|
||||
$this->app->Tpl->Add('TAB1','OpenXE is free open source software under AGPL/EGPL license, based on <a href="https://xentral.com" target="_blank">Xentral®</a> by Xentral ERP Software GmbH.<br><br><div class="info"><img src="themes/new/images/Xentral_ERP_Logo-200.png"><br>Das Logo und der Link zur Homepage <a href="https://xentral.biz" target=\_blank\>https://xentral.biz</a> dürfen nicht entfernt werden.</div><br>© Copyright by OpenXE project & Xentral ERP Software GmbH Augsburg');
|
||||
}
|
||||
|
||||
if($this->app->erp->isIoncube() && method_exists($this->app->erp, 'IoncubeProperty'))
|
||||
@@ -3034,18 +3034,12 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
|
||||
}
|
||||
}
|
||||
*/
|
||||
$subHeadline = 'Es kann nun losgehen.';
|
||||
if($isAdminAdmin && !empty(erpAPI::Ioncube_Property('isdevelopmentversion'))) {
|
||||
$subHeadline = 'Es handelt sich hier um eine Development-Version.
|
||||
Diese ist nicht für den produktiven Einsatz gedacht.';
|
||||
}
|
||||
|
||||
/** @var SystemTemplates $systemTemplates */
|
||||
$showExampleImport = !empty(erpAPI::Ioncube_Property('testlizenz'))
|
||||
&& !empty(erpAPI::Ioncube_Property('iscloud'))
|
||||
&& $this->app->erp->RechteVorhanden('systemtemplate', 'list')
|
||||
&& ($systemTemplates = $this->app->loadModule('systemtemplates')) !== null
|
||||
&& $systemTemplates->canInstallExampleData(false);
|
||||
if($isAdminAdmin) {
|
||||
$subHeadline = 'Bitte nach der Installation das <a href="index.php?module=upgrade" target="_blank">Datenbank-Upgrade</a> durchführen.';
|
||||
} else {
|
||||
$subHeadline = 'Es kann nun losgehen.';
|
||||
}
|
||||
|
||||
$lastPage = [
|
||||
'type' => 'defaultPage',
|
||||
@@ -3062,9 +3056,6 @@ $this->app->Tpl->Add('TODOFORUSER',"<tr><td width=\"90%\">".$tmp[$i]['aufgabe'].
|
||||
if($showExampleImport) {
|
||||
$lastPage['subHeadline'] .= '<br /><a href="index.php?module=systemtemplates&action=list">Beispieldaten einspielen</a>';
|
||||
}
|
||||
if($isAdminAdmin && $this->app->erp->ModulVorhanden('learningdashboard')){
|
||||
$lastPage['ctaButtons']['link'] = 'index.php?module=learningdashboard&action=list';
|
||||
}
|
||||
|
||||
$pages[] = $lastPage;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
+3
-1
@@ -82,6 +82,8 @@
|
||||
<br><br>
|
||||
<center>
|
||||
<a href=\"$weburllink\">Anmelden mit Benutzer: <i>admin</i> und Passwort: <i>admin</i></a>
|
||||
<br><br>
|
||||
Bitte nach der Installation das <a href=\"".$weburllink."index.php?module=upgrade\" target=\"_blank\">Datenbank-Upgrade</a> durchführen.</a>
|
||||
</center>
|
||||
");
|
||||
}else{
|
||||
@@ -371,7 +373,7 @@
|
||||
<div class=\"footer\"><p>Nutzen Sie unseren <a href=\"https://shop.xentral.biz/sonstige/1-jahr-zugang-updateserver-open-source-version.html?c=164?c=164\" target=\"_blank\">Update-Server</a> um auch mit der Open-Source Version mit Updates versorgt zu sein.</p></div>
|
||||
--!>
|
||||
<div class=\"footer\"><p>
|
||||
OpenXE is free open source software under AGPL-3.0 license, based on <a href=\"https://xentral.com\" target=\"_blank\">Xentral®</a> by Xentral ERP Software GmbH.</p></div>
|
||||
OpenXE is free open source software under AGPL/EGPL license, based on <a href=\"https://xentral.com\" target=\"_blank\">Xentral®</a> by Xentral ERP Software GmbH.</p></div>
|
||||
</div></body></html>";
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user