mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
Merge branch 'master' into ps
This commit is contained in:
commit
f8e8b30e78
@ -84,11 +84,9 @@ class PLACEHOLDER_MODULECLASSNAME {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function PLACEHOLDER_DELETE() {
|
public function PLACEHOLDER_DELETE() {
|
||||||
$id = (int) $this->app->Secure->GetGET('id');
|
$id = (int) $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
$this->app->DB->Delete("DELETE FROM `PLACEHOLDER_MODULENAME` WHERE `id` = '{$id}'");
|
$this->app->DB->Delete("DELETE FROM `PLACEHOLDER_MODULENAME` WHERE `id` = '{$id}'");
|
||||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"error\">Der Eintrag wurde gelöscht.</div>");
|
$this->app->Tpl->addMessage('error', 'Der Eintrag wurde gelöscht');
|
||||||
|
|
||||||
$this->PLACEHOLDER_LIST();
|
$this->PLACEHOLDER_LIST();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,6 +110,10 @@ class PLACEHOLDER_MODULECLASSNAME {
|
|||||||
$this->app->erp->MenuEintrag("index.php?module=PLACEHOLDER_MODULENAME&action=list", "Zurück zur Übersicht");
|
$this->app->erp->MenuEintrag("index.php?module=PLACEHOLDER_MODULENAME&action=list", "Zurück zur Übersicht");
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
$input = $this->GetInput();
|
$input = $this->GetInput();
|
||||||
|
|
||||||
|
// Convert here
|
||||||
|
// $input['prio'] = !empty($this->app->Secure->GetPOST('prio'))?"1":"0";
|
||||||
|
|
||||||
$submit = $this->app->Secure->GetPOST('submit');
|
$submit = $this->app->Secure->GetPOST('submit');
|
||||||
|
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
@ -156,23 +158,26 @@ class PLACEHOLDER_MODULECLASSNAME {
|
|||||||
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
|
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde erfolgreich angelegt.</div>");
|
||||||
header("Location: index.php?module=PLACEHOLDER_MODULENAME&action=list&msg=$msg");
|
header("Location: index.php?module=PLACEHOLDER_MODULENAME&action=list&msg=$msg");
|
||||||
} else {
|
} else {
|
||||||
$this->app->Tpl->Set('MESSAGE', "<div class=\"success\">Die Einstellungen wurden erfolgreich übernommen.</div>");
|
$this->app->Tpl->addMessage('success', 'Die Einstellungen wurden erfolgreich übernommen.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Load values again from database
|
// Load values again from database
|
||||||
$dropnbox = "PLACEHOLDER_DROPNBOX";
|
if ($id != 'NULL') {
|
||||||
$result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id");
|
|
||||||
|
|
||||||
foreach ($result[0] as $key => $value) {
|
$dropnbox = "PLACEHOLDER_DROPNBOX";
|
||||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
$result = $this->app->DB->SelectArr("PLACEHOLDER_SQL_LIST"." WHERE id=$id");
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($result)) {
|
foreach ($result[0] as $key => $value) {
|
||||||
$PLACEHOLDER_MODULENAME_from_db = $result[0];
|
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||||
} else {
|
}
|
||||||
return;
|
|
||||||
|
if (!empty($result)) {
|
||||||
|
$PLACEHOLDER_MODULENAME_from_db = $result[0];
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -184,6 +189,8 @@ class PLACEHOLDER_MODULECLASSNAME {
|
|||||||
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
||||||
|
|
||||||
$this->app->YUI->AutoComplete("artikel", "artikelnummer");
|
$this->app->YUI->AutoComplete("artikel", "artikelnummer");
|
||||||
|
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$PLACEHOLDER_MODULENAME_from_db['projekt'],false));
|
||||||
|
$this->app->Tpl->Set('PRIO', $PLACEHOLDER_MODULENAME_from_db['prio']==1?"checked":"");
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -3660,6 +3660,28 @@
|
|||||||
"Extra": "",
|
"Extra": "",
|
||||||
"Privileges": "select,insert,update,references",
|
"Privileges": "select,insert,update,references",
|
||||||
"Comment": ""
|
"Comment": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Field": "etikettautodruck",
|
||||||
|
"Type": "int(1)",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": "0",
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Field": "etikett",
|
||||||
|
"Type": "int(11)",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": "0",
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"keys": [
|
"keys": [
|
||||||
@ -112307,7 +112329,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Field": "preis",
|
"Field": "preis",
|
||||||
"Type": "decimal(14,5)",
|
"Type": "decimal(14,10)",
|
||||||
"Collation": null,
|
"Collation": null,
|
||||||
"Null": "NO",
|
"Null": "NO",
|
||||||
"Key": "",
|
"Key": "",
|
||||||
|
@ -4247,7 +4247,6 @@ title: 'Abschicken',
|
|||||||
|
|
||||||
$result = $this->app->DB->SelectArr("SELECT * FROM $type WHERE id='$id' LIMIT 1");
|
$result = $this->app->DB->SelectArr("SELECT * FROM $type WHERE id='$id' LIMIT 1");
|
||||||
$waehrung = $result[0]['waehrung'];
|
$waehrung = $result[0]['waehrung'];
|
||||||
|
|
||||||
$text = str_replace('{BELEGART}',ucfirst($type),$text);
|
$text = str_replace('{BELEGART}',ucfirst($type),$text);
|
||||||
|
|
||||||
$text = str_replace('{FIRMA}',$this->Firmendaten("name"),$text);
|
$text = str_replace('{FIRMA}',$this->Firmendaten("name"),$text);
|
||||||
@ -4302,20 +4301,24 @@ title: 'Abschicken',
|
|||||||
if($type!=='auftrag' && $type!=='bestellung' && $type!=='retoure')
|
if($type!=='auftrag' && $type!=='bestellung' && $type!=='retoure')
|
||||||
{
|
{
|
||||||
$auftragArr = $this->app->DB->SelectRow("SELECT a.*, DATE_FORMAT(datum,'%d.%m.%Y') as datum_de FROM auftrag AS a WHERE id='".$result[0]['auftragid']."' LIMIT 1");
|
$auftragArr = $this->app->DB->SelectRow("SELECT a.*, DATE_FORMAT(datum,'%d.%m.%Y') as datum_de FROM auftrag AS a WHERE id='".$result[0]['auftragid']."' LIMIT 1");
|
||||||
$result[0]['internet'] = $auftragArr['internet'];
|
|
||||||
$result[0]['abweichendelieferadresse']=$auftragArr['abweichendelieferadresse'];
|
if (!empty($auftragArr)) {
|
||||||
$result[0]['liefername']=$auftragArr['liefername'];
|
|
||||||
$result[0]['lieferabteilung']=$auftragArr['lieferabteilung'];
|
$result[0]['internet'] = $auftragArr['internet'];
|
||||||
$result[0]['lieferunterabteilung']=$auftragArr['lieferunterabteilung'];
|
$result[0]['abweichendelieferadresse']=$auftragArr['abweichendelieferadresse'];
|
||||||
$result[0]['lieferadresszusatz']=$auftragArr['lieferadresszusatz'];
|
$result[0]['liefername']=$auftragArr['liefername'];
|
||||||
$result[0]['liefertitel']=$auftragArr['liefertitel'];
|
$result[0]['lieferabteilung']=$auftragArr['lieferabteilung'];
|
||||||
$result[0]['lieferansprechpartner']=$auftragArr['lieferansprechpartner'];
|
$result[0]['lieferunterabteilung']=$auftragArr['lieferunterabteilung'];
|
||||||
$result[0]['lieferstrasse']=$auftragArr['lieferstrasse'];
|
$result[0]['lieferadresszusatz']=$auftragArr['lieferadresszusatz'];
|
||||||
$result[0]['lieferplz']=$auftragArr['lieferplz'];
|
$result[0]['liefertitel']=$auftragArr['liefertitel'];
|
||||||
$result[0]['lieferland']=$auftragArr['lieferland'];
|
$result[0]['lieferansprechpartner']=$auftragArr['lieferansprechpartner'];
|
||||||
$result[0]['lieferort'] = $auftragArr['lieferort'];
|
$result[0]['lieferstrasse']=$auftragArr['lieferstrasse'];
|
||||||
$result[0]['liefergln'] = $auftragArr['liefergln'];
|
$result[0]['lieferplz']=$auftragArr['lieferplz'];
|
||||||
$result[0]['lieferemail'] = $auftragArr['lieferemail'];
|
$result[0]['lieferland']=$auftragArr['lieferland'];
|
||||||
|
$result[0]['lieferort'] = $auftragArr['lieferort'];
|
||||||
|
$result[0]['liefergln'] = $auftragArr['liefergln'];
|
||||||
|
$result[0]['lieferemail'] = $auftragArr['lieferemail'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type=="angebot" || $type=="auftrag")
|
if($type=="angebot" || $type=="auftrag")
|
||||||
@ -4860,7 +4863,6 @@ title: 'Abschicken',
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($result[0]['abweichendelieferadresse']=="1")
|
if($result[0]['abweichendelieferadresse']=="1")
|
||||||
{
|
{
|
||||||
$liefertext ="";
|
$liefertext ="";
|
||||||
|
@ -18,7 +18,7 @@ abstract class Versanddienstleister
|
|||||||
protected int $projectId;
|
protected int $projectId;
|
||||||
protected ?int $labelPrinterId;
|
protected ?int $labelPrinterId;
|
||||||
protected ?int $documentPrinterId;
|
protected ?int $documentPrinterId;
|
||||||
protected bool $shippingMail;
|
protected int $shippingMail;
|
||||||
protected ?int $businessLetterTemplateId;
|
protected ?int $businessLetterTemplateId;
|
||||||
protected ?object $settings;
|
protected ?object $settings;
|
||||||
|
|
||||||
@ -453,6 +453,17 @@ abstract class Versanddienstleister
|
|||||||
$countries = Array();
|
$countries = Array();
|
||||||
$this->app->Tpl->addMessage('error', 'Länderliste ist leer. Siehe Einstellungen -> Länderliste.', false, 'PAGE');
|
$this->app->Tpl->addMessage('error', 'Länderliste ist leer. Siehe Einstellungen -> Länderliste.', false, 'PAGE');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch ($this->shippingMail) {
|
||||||
|
case -1:
|
||||||
|
$address['email'] = '';
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// User text template (not implemented)
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$json['form'] = $address;
|
$json['form'] = $address;
|
||||||
$json['countries'] = $countries;
|
$json['countries'] = $countries;
|
||||||
@ -469,6 +480,7 @@ abstract class Versanddienstleister
|
|||||||
$json['form']['services'] = [
|
$json['form']['services'] = [
|
||||||
Product::SERVICE_PREMIUM => false
|
Product::SERVICE_PREMIUM => false
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->app->Tpl->Set('JSON', json_encode($json));
|
$this->app->Tpl->Set('JSON', json_encode($json));
|
||||||
$this->app->Tpl->Set('CARRIERNAME', $this->GetName());
|
$this->app->Tpl->Set('CARRIERNAME', $this->GetName());
|
||||||
$this->app->Tpl->Parse($target, 'createshipment.tpl');
|
$this->app->Tpl->Parse($target, 'createshipment.tpl');
|
||||||
|
@ -187,6 +187,8 @@ class ObjGenAdresse
|
|||||||
private $freifeld9;
|
private $freifeld9;
|
||||||
private $freifeld10;
|
private $freifeld10;
|
||||||
private $rechnung_papier;
|
private $rechnung_papier;
|
||||||
|
private $etikettautodruck;
|
||||||
|
private $etikett;
|
||||||
private $angebot_cc;
|
private $angebot_cc;
|
||||||
private $auftrag_cc;
|
private $auftrag_cc;
|
||||||
private $rechnung_cc;
|
private $rechnung_cc;
|
||||||
@ -440,6 +442,8 @@ $result = $result[0];
|
|||||||
$this->freifeld9=$result['freifeld9'];
|
$this->freifeld9=$result['freifeld9'];
|
||||||
$this->freifeld10=$result['freifeld10'];
|
$this->freifeld10=$result['freifeld10'];
|
||||||
$this->rechnung_papier=$result['rechnung_papier'];
|
$this->rechnung_papier=$result['rechnung_papier'];
|
||||||
|
$this->etikettautodruck=$result['etikettautodruck'];
|
||||||
|
$this->etikett=$result['etikett'];
|
||||||
$this->angebot_cc=$result['angebot_cc'];
|
$this->angebot_cc=$result['angebot_cc'];
|
||||||
$this->auftrag_cc=$result['auftrag_cc'];
|
$this->auftrag_cc=$result['auftrag_cc'];
|
||||||
$this->rechnung_cc=$result['rechnung_cc'];
|
$this->rechnung_cc=$result['rechnung_cc'];
|
||||||
@ -693,6 +697,8 @@ $result = $result[0];
|
|||||||
`freifeld9`='{$this->freifeld9}',
|
`freifeld9`='{$this->freifeld9}',
|
||||||
`freifeld10`='{$this->freifeld10}',
|
`freifeld10`='{$this->freifeld10}',
|
||||||
`rechnung_papier`='{$this->rechnung_papier}',
|
`rechnung_papier`='{$this->rechnung_papier}',
|
||||||
|
`etikettautodruck`='{$this->etikettautodruck}',
|
||||||
|
`etikett`='{$this->etikett}',
|
||||||
`angebot_cc`='{$this->angebot_cc}',
|
`angebot_cc`='{$this->angebot_cc}',
|
||||||
`auftrag_cc`='{$this->auftrag_cc}',
|
`auftrag_cc`='{$this->auftrag_cc}',
|
||||||
`rechnung_cc`='{$this->rechnung_cc}',
|
`rechnung_cc`='{$this->rechnung_cc}',
|
||||||
@ -946,6 +952,8 @@ $result = $result[0];
|
|||||||
$this->freifeld9='';
|
$this->freifeld9='';
|
||||||
$this->freifeld10='';
|
$this->freifeld10='';
|
||||||
$this->rechnung_papier='';
|
$this->rechnung_papier='';
|
||||||
|
$this->etikettautodruck='';
|
||||||
|
$this->etikett='';
|
||||||
$this->angebot_cc='';
|
$this->angebot_cc='';
|
||||||
$this->auftrag_cc='';
|
$this->auftrag_cc='';
|
||||||
$this->rechnung_cc='';
|
$this->rechnung_cc='';
|
||||||
@ -1392,6 +1400,10 @@ $result = $result[0];
|
|||||||
public function GetFreifeld10() { return $this->freifeld10; }
|
public function GetFreifeld10() { return $this->freifeld10; }
|
||||||
public function SetRechnung_Papier($value) { $this->rechnung_papier=$value; }
|
public function SetRechnung_Papier($value) { $this->rechnung_papier=$value; }
|
||||||
public function GetRechnung_Papier() { return $this->rechnung_papier; }
|
public function GetRechnung_Papier() { return $this->rechnung_papier; }
|
||||||
|
public function SetEtikettautodruck($value) { $this->etikettautodruck=$value; }
|
||||||
|
public function GetEtikettautodruck() { return $this->etikettautodruck; }
|
||||||
|
public function SetEtikett($value) { $this->etikett=$value; }
|
||||||
|
public function GetEtikett() { return $this->etikett; }
|
||||||
public function SetAngebot_Cc($value) { $this->angebot_cc=$value; }
|
public function SetAngebot_Cc($value) { $this->angebot_cc=$value; }
|
||||||
public function GetAngebot_Cc() { return $this->angebot_cc; }
|
public function GetAngebot_Cc() { return $this->angebot_cc; }
|
||||||
public function SetAuftrag_Cc($value) { $this->auftrag_cc=$value; }
|
public function SetAuftrag_Cc($value) { $this->auftrag_cc=$value; }
|
||||||
|
@ -665,7 +665,7 @@ class Auftrag extends GenAuftrag
|
|||||||
$menu .= "</a>";
|
$menu .= "</a>";
|
||||||
|
|
||||||
$moreinfo = true; // Minidetail active
|
$moreinfo = true; // Minidetail active
|
||||||
$menucol = 11; // For minidetail
|
$menucol = 13; // For minidetail
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'auftraegeoffeneautowartend':
|
case 'auftraegeoffeneautowartend':
|
||||||
@ -5778,29 +5778,7 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
if($kommissionierverfahren==='lieferschein' && $lieferschein > 0)
|
if($kommissionierverfahren==='lieferschein' && $lieferschein > 0)
|
||||||
{
|
{
|
||||||
//FALL 1 Lieferschein mit Lagerplatz
|
//FALL 1 Lieferschein mit Lagerplatz
|
||||||
|
|
||||||
$sql = "SELECT id FROM kommissionierung k WHERE k.auftrag = '".$id."'";
|
|
||||||
$vorkommissionierung = $this->app->DB->Select($sql);
|
|
||||||
|
|
||||||
if(!$vorkommissionierung)
|
|
||||||
{
|
|
||||||
$kommissionierung = $this->app->erp->GetNextKommissionierung();
|
|
||||||
} else {
|
|
||||||
$kommissionierung = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($kommissionierung){
|
|
||||||
$this->app->DB->Update(
|
|
||||||
sprintf(
|
|
||||||
"UPDATE kommissionierung SET lieferschein = %d, auftrag = %d, adresse = %d WHERE id = %d LIMIT 1",
|
|
||||||
$lieferschein,
|
|
||||||
$id,
|
|
||||||
$adresse,
|
|
||||||
$kommissionierung
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$auslagernresult =
|
$auslagernresult =
|
||||||
$this->app->erp->LieferscheinAuslagern(
|
$this->app->erp->LieferscheinAuslagern(
|
||||||
$lieferschein,
|
$lieferschein,
|
||||||
@ -5811,40 +5789,33 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
false,
|
false,
|
||||||
$nurRestmenge
|
$nurRestmenge
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$sql = "SELECT id FROM kommissionierung k WHERE k.auftrag = '".$id."'";
|
||||||
|
$vorkommissionierung = $this->app->DB->Select($sql);
|
||||||
|
|
||||||
|
if (!$vorkommissionierung)
|
||||||
|
{
|
||||||
|
$kommissionierung = $this->app->erp->GetNextKommissionierung();
|
||||||
|
|
||||||
|
$druckercode = $this->app->erp->Projektdaten($projekt,'druckerlogistikstufe1');
|
||||||
|
$etikettendrucker = $this->app->erp->Projektdaten($projekt,'etiketten_drucker');
|
||||||
|
|
||||||
|
$sql = "SELECT etikett, etikettautodruck FROM adresse WHERE id =".$adresse;
|
||||||
|
$settings = $this->app->DB->SelectRow($sql);
|
||||||
|
|
||||||
if($kommissionierung){
|
$this->Kommissionieren(
|
||||||
$this->app->DB->Update(
|
kommissionierung : $kommissionierung,
|
||||||
sprintf(
|
auftrag: $id,
|
||||||
"UPDATE kommissionierung SET ausgelagert = 1 WHERE id = %d LIMIT 1",
|
lieferschein: $lieferschein,
|
||||||
$kommissionierung
|
ausgelagert: true,
|
||||||
)
|
lagerplatzliste: $auslagernresult,
|
||||||
);
|
mengedruck: $projektarr['autodruckkommissionierscheinstufe1']?$projektarr['autodruckkommissionierscheinstufe1menge']:0,
|
||||||
|
druckercode: $druckercode,
|
||||||
foreach ($auslagernresult['storageMovements'] as $storageMovement) {
|
mengeetiketten: $settings['etikettautodruck']?1:0,
|
||||||
$this->app->DB->Update(
|
etikett: $settings['etikettautodruck']?$settings['etikett']:0,
|
||||||
sprintf(
|
etikettendrucker: $etikettendrucker);
|
||||||
"INSERT INTO kommissionierung_position (kommissionierung, artikel, lager_platz, menge) VALUES (%d, %d, %d, %d)",
|
|
||||||
$kommissionierung,
|
|
||||||
$storageMovement['artikel'],
|
|
||||||
$storageMovement['lager_platz'],
|
|
||||||
$storageMovement['menge']
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Kommissionierschein drucken?
|
|
||||||
if ($projektarr['autodruckkommissionierscheinstufe1']) {
|
|
||||||
$Brief = new KommissionierungPDF($this->app, styleData: array('ohne_steuer' => true, 'artikeleinheit' => false, 'abstand_boxrechtsoben' => -70, 'abstand_artikeltabelleoben' => -70, 'abstand_betreffzeileoben' => -70, 'preise_ausblenden' => true));
|
|
||||||
$Brief->GetKommissionierung($kommissionierung);
|
|
||||||
$tmpfile = $Brief->displayTMP();
|
|
||||||
for($mengedruck=$projektarr['autodruckkommissionierscheinstufe1menge'];$mengedruck > 0;$mengedruck--) {
|
|
||||||
$druckercode = $this->app->erp->Projektdaten($projekt,'druckerlogistikstufe1');
|
|
||||||
$this->app->printer->Drucken($druckercode, $tmpfile);
|
|
||||||
}
|
|
||||||
unlink($tmpfile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prozesse ohne Versandzentrum
|
// Prozesse ohne Versandzentrum
|
||||||
$this->app->erp->BriefpapierHintergrundDisable($druckercode);
|
$this->app->erp->BriefpapierHintergrundDisable($druckercode);
|
||||||
|
|
||||||
@ -5975,9 +5946,9 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
|
|
||||||
// Check for override in adresse
|
// Check for override in adresse
|
||||||
$sql = "SELECT rechnung_anzahlpapier, rechnung_anzahlpapier_abweichend FROM adresse WHERE id =".$adresse;
|
$sql = "SELECT rechnung_anzahlpapier, rechnung_anzahlpapier_abweichend FROM adresse WHERE id =".$adresse;
|
||||||
$rechnung_anzahlpapier = $this->app->DB->SelectArr($sql);
|
$adresse_settings = $this->app->DB->SelectArr($sql);
|
||||||
if ($rechnung_anzahlpapier[0]['rechnung_anzahlpapier_abweichend']) {
|
if ($adresse_settings[0]['rechnung_anzahlpapier_abweichend']) {
|
||||||
$autodruckrechnungstufe1menge = $rechnung_anzahlpapier[0]['rechnung_anzahlpapier'];
|
$autodruckrechnungstufe1menge = $adresse_settings[0]['rechnung_anzahlpapier'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($exportdruckrechnungstufe1)
|
if($exportdruckrechnungstufe1)
|
||||||
@ -6542,6 +6513,9 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'vorkommissionieren_ohne_etiketten':
|
||||||
|
$vorkommissionieren_ohne_etiketten = true;
|
||||||
|
// break ommitted
|
||||||
case 'vorkommissionieren':
|
case 'vorkommissionieren':
|
||||||
|
|
||||||
if (!empty($auftraegemarkiert)) {
|
if (!empty($auftraegemarkiert)) {
|
||||||
@ -6577,9 +6551,6 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
|
|
||||||
$kid = $this->app->erp->GetNextKommissionierung();
|
$kid = $this->app->erp->GetNextKommissionierung();
|
||||||
|
|
||||||
$sql = "UPDATE kommissionierung SET auftrag = $v, adresse = (SELECT adresse FROM auftrag WHERE id = ".$v.") WHERE id = $kid";
|
|
||||||
$this->app->DB->Update($sql);
|
|
||||||
|
|
||||||
$auslagernresult =
|
$auslagernresult =
|
||||||
$this->app->erp->LieferscheinAuslagern(
|
$this->app->erp->LieferscheinAuslagern(
|
||||||
lieferschein: $v,
|
lieferschein: $v,
|
||||||
@ -6592,33 +6563,35 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
simulieren: true
|
simulieren: true
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($auslagernresult['storageMovements'] as $storageMovement) {
|
$projekt = $this->app->DB->Select("SELECT projekt FROM auftrag WHERE id='$v' LIMIT 1");
|
||||||
$this->app->DB->Update(
|
$druckercode = $this->app->erp->Projektdaten($projekt,'druckerlogistikstufe1');
|
||||||
sprintf(
|
|
||||||
"INSERT INTO kommissionierung_position (kommissionierung, artikel, lager_platz, menge) VALUES (%d, %d, %d, %d)",
|
|
||||||
$kid,
|
|
||||||
$storageMovement['artikel'],
|
|
||||||
$storageMovement['lager_platz'],
|
|
||||||
$storageMovement['menge']
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->app->erp->AuftragProtokoll($v,'Auftrag vorkommissioniert, Kommissionierung '.$kid);
|
$settings = $this->app->DB->SelectRow("
|
||||||
|
SELECT
|
||||||
|
projekt.autodruckkommissionierscheinstufe1,
|
||||||
|
projekt.autodruckkommissionierscheinstufe1menge,
|
||||||
|
adresse.etikett,
|
||||||
|
adresse.etikettautodruck,
|
||||||
|
projekt.id as projekt
|
||||||
|
FROM projekt
|
||||||
|
INNER JOIN auftrag ON projekt.id = auftrag.projekt
|
||||||
|
INNER JOIN adresse ON adresse.id = auftrag.adresse
|
||||||
|
WHERE auftrag.id = '".$v."'"
|
||||||
|
);
|
||||||
|
|
||||||
$projektarr = $this->app->DB->SelectRow("SELECT projekt.* FROM projekt INNER JOIN auftrag ON projekt.id = auftrag.projekt WHERE auftrag.id = '".$v."'");
|
$etikettendrucker = $this->app->erp->Projektdaten($settings['projekt'],'etiketten_drucker');
|
||||||
|
|
||||||
// Kommissionierschein drucken?
|
$this->Kommissionieren(
|
||||||
if ($projektarr['autodruckkommissionierscheinstufe1']) {
|
kommissionierung : $kid,
|
||||||
$Brief = new KommissionierungPDF($this->app, styleData: array('ohne_steuer' => true, 'artikeleinheit' => false, 'abstand_boxrechtsoben' => -70, 'abstand_artikeltabelleoben' => -70, 'abstand_betreffzeileoben' => -70, 'preise_ausblenden' => true));
|
auftrag: $v,
|
||||||
$Brief->GetKommissionierung($kid);
|
lieferschein: 0,
|
||||||
$tmpfile = $Brief->displayTMP();
|
ausgelagert: false,
|
||||||
for($mengedruck=$projektarr['autodruckkommissionierscheinstufe1menge'];$mengedruck > 0;$mengedruck--) {
|
lagerplatzliste: $auslagernresult,
|
||||||
$druckercode = $this->app->erp->Projektdaten($projektarr['id'],'druckerlogistikstufe1');
|
mengedruck: $settings['autodruckkommissionierscheinstufe1']?$settings['autodruckkommissionierscheinstufe1menge']:0,
|
||||||
$this->app->printer->Drucken($druckercode, $tmpfile);
|
druckercode: $druckercode,
|
||||||
}
|
mengeetiketten: $settings['etikettautodruck']?1:0,
|
||||||
unlink($tmpfile);
|
etikett: $vorkommissionieren_ohne_etiketten?0:($settings['etikettautodruck']?$settings['etikett']:0),
|
||||||
}
|
etikettendrucker: $etikettendrucker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -7345,5 +7318,66 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
$this->app->YUI->TableSearch('TAB1','offenepositionen',"show","","",basename(__FILE__), __CLASS__);
|
$this->app->YUI->TableSearch('TAB1','offenepositionen',"show","","",basename(__FILE__), __CLASS__);
|
||||||
$this->app->Tpl->Parse('PAGE',"tabview.tpl");
|
$this->app->Tpl->Parse('PAGE',"tabview.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Kommissionieren(int $kommissionierung, int $auftrag, int $lieferschein, bool $ausgelagert, array $lagerplatzliste, int $mengedruck, $druckercode, int $mengeetiketten, $etikett, $etikettendrucker) {
|
||||||
|
|
||||||
|
$sql = sprintf(
|
||||||
|
"UPDATE kommissionierung SET lieferschein = %d, auftrag = %d, adresse = IF (%d != 0,(SELECT adresse FROM lieferschein WHERE id = %d LIMIT 1),(SELECT adresse FROM auftrag WHERE id = %d LIMIT 1)), ausgelagert = %d WHERE id = %d LIMIT 1",
|
||||||
|
$lieferschein,
|
||||||
|
$auftrag,
|
||||||
|
$lieferschein,
|
||||||
|
$lieferschein,
|
||||||
|
$auftrag,
|
||||||
|
$adresse,
|
||||||
|
$kommissionierung,
|
||||||
|
$ausgelager
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->app->DB->Update(
|
||||||
|
$sql
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($lagerplatzliste['storageMovements'] as $storageMovement) {
|
||||||
|
$this->app->DB->Update(
|
||||||
|
sprintf(
|
||||||
|
"INSERT INTO kommissionierung_position (kommissionierung, artikel, lager_platz, menge) VALUES (%d, %d, %d, %d)",
|
||||||
|
$kommissionierung,
|
||||||
|
$storageMovement['artikel'],
|
||||||
|
$storageMovement['lager_platz'],
|
||||||
|
$storageMovement['menge']
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kommissionierschein
|
||||||
|
if ($mengedruck > 0) {
|
||||||
|
$this->app->erp->BriefpapierHintergrunddisable = true; // Disable background
|
||||||
|
$Brief = new KommissionierungPDF($this->app, styleData: array('ohne_steuer' => true, 'artikeleinheit' => false, 'abstand_boxrechtsoben' => -70, 'abstand_artikeltabelleoben' => -70, 'abstand_betreffzeileoben' => -70, 'preise_ausblenden' => true));
|
||||||
|
$Brief->GetKommissionierung($kommissionierung);
|
||||||
|
$tmpfile = $Brief->displayTMP();
|
||||||
|
for($drucklauf = 0; $drucklauf < $mengedruck;$drucklauf++) {
|
||||||
|
$spooler_id = $this->app->printer->Drucken($druckercode, $tmpfile);
|
||||||
|
}
|
||||||
|
unlink($tmpfile);
|
||||||
|
$this->app->erp->BriefpapierHintergrundDisable($druckercode); // Restore default background from printersettings
|
||||||
|
}
|
||||||
|
|
||||||
|
// Etiketten
|
||||||
|
if ($mengeetiketten > 0) {
|
||||||
|
foreach ($lagerplatzliste['storageMovements'] as $storageMovement) {
|
||||||
|
$this->app->erp->EtikettenDrucker(
|
||||||
|
kennung: $etikett,
|
||||||
|
anzahl: $mengeetiketten*$storageMovement['menge'],
|
||||||
|
tabelle: 'artikel',
|
||||||
|
id: $storageMovement['artikel'],
|
||||||
|
variables: null,
|
||||||
|
druckercode: $etikettendrucker
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//function EtikettenDrucker($kennung,$anzahl,$tabelle,$id,$variables="",$xml="",$druckercode="",$filenameprefix="",$xmlaspdf=false,$adresse=0,$verwendenals="")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,8 @@
|
|||||||
<option value="">{|bitte wählen|} ...</option>
|
<option value="">{|bitte wählen|} ...</option>
|
||||||
<option value="versandstarten">Auto-Versand</option>
|
<option value="versandstarten">Auto-Versand</option>
|
||||||
<option value="versandstartenmit">Auto-Versand (mit Kommissionierbez.)</option>
|
<option value="versandstartenmit">Auto-Versand (mit Kommissionierbez.)</option>
|
||||||
<option value="vorkommissionieren">Vorkommissionieren</option>
|
<option value="vorkommissionieren_ohne_etiketten">Vorkommissionieren (ohne Etiketten)</option>
|
||||||
|
<option value="vorkommissionieren">Vorkommissionieren (mit Etiketten)</option>
|
||||||
<option value="drucken">drucken</option>
|
<option value="drucken">drucken</option>
|
||||||
</select>
|
</select>
|
||||||
<span id="druckerauswahl" style="display: none;">{|Drucker|}: <select name="seldruckerversand" id="seldruckerversand">[SELDRUCKERVERSAND]</select></span><input type="submit" class="btnBlue" name="ausfuehren" value="{|ausführen|}" />
|
<span id="druckerauswahl" style="display: none;">{|Drucker|}: <select name="seldruckerversand" id="seldruckerversand">[SELDRUCKERVERSAND]</select></span><input type="submit" class="btnBlue" name="ausfuehren" value="{|ausführen|}" />
|
||||||
|
103
www/pages/content/lieferbedingungen_edit.tpl
Normal file
103
www/pages/content/lieferbedingungen_edit.tpl
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<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>-->lieferbedingungen|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Lieferbedingungen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="lieferbedingungen" id="lieferbedingungen" value="[LIEFERBEDINGUNGEN]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Kennzeichen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="kennzeichen" id="kennzeichen" value="[KENNZEICHEN]" 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>
|
||||||
|
{|Lieferbedingungen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="lieferbedingungen" id="lieferbedingungen" value="[LIEFERBEDINGUNGEN]" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Kennzeichen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="kennzeichen" id="kennzeichen" value="[KENNZEICHEN]" 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>
|
||||||
|
|
10
www/pages/content/lieferbedingungen_list.tpl
Normal file
10
www/pages/content/lieferbedingungen_list.tpl
Normal file
@ -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>
|
@ -32,7 +32,7 @@
|
|||||||
{|Preis|}:
|
{|Preis|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" name="preis" id="preis" step="0.00001" value="[PREIS]" size="20" [SAVEDISABLED]>
|
<input type="number" name="preis" id="preis" step="0.0000000001" value="[PREIS]" size="20" [SAVEDISABLED]>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -226,7 +226,7 @@ class Kommissionierung {
|
|||||||
|
|
||||||
public function kommissionierung_print() {
|
public function kommissionierung_print() {
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
$Brief = new KommissionierungPDF($this->app, styleData: array('ohne_steuer' => true, 'artikeleinheit' => false, 'abstand_boxrechtsoben' => -70, 'abstand_artikeltabelleoben' => -70, 'abstand_betreffzeileoben' => -70, 'preise_ausblenden' => true));
|
$Brief = new KommissionierungPDF($this->app, styleData: array('ohne_steuer' => true, 'artikeleinheit' => false, 'abstand_boxrechtsoben' => -70, 'abstand_artikeltabelleoben' => -70, 'abstand_betreffzeileoben' => -70, 'preise_ausblenden' => true, 'hintergrund' => 'none'));
|
||||||
$Brief->GetKommissionierung($id);
|
$Brief->GetKommissionierung($id);
|
||||||
$Brief->displayDocument(false);
|
$Brief->displayDocument(false);
|
||||||
exit();
|
exit();
|
||||||
|
213
www/pages/lieferbedingungen.php
Normal file
213
www/pages/lieferbedingungen.php
Normal file
@ -0,0 +1,213 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 OpenXE project
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Xentral\Components\Database\Exception\QueryFailureException;
|
||||||
|
|
||||||
|
class Lieferbedingungen {
|
||||||
|
|
||||||
|
function __construct($app, $intern = false) {
|
||||||
|
$this->app = $app;
|
||||||
|
if ($intern)
|
||||||
|
return;
|
||||||
|
|
||||||
|
$this->app->ActionHandlerInit($this);
|
||||||
|
$this->app->ActionHandler("list", "lieferbedingungen_list");
|
||||||
|
$this->app->ActionHandler("create", "lieferbedingungen_edit"); // This automatically adds a "New" button
|
||||||
|
$this->app->ActionHandler("edit", "lieferbedingungen_edit");
|
||||||
|
$this->app->ActionHandler("delete", "lieferbedingungen_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 "lieferbedingungen_list":
|
||||||
|
$allowed['lieferbedingungen_list'] = array('list');
|
||||||
|
$heading = array('','','Lieferbedingungen', 'Kennzeichen', '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('l.id','l.id','l.lieferbedingungen', 'l.kennzeichen');
|
||||||
|
$searchsql = array('l.lieferbedingungen', 'l.kennzeichen');
|
||||||
|
|
||||||
|
$defaultorder = 1;
|
||||||
|
$defaultorderdesc = 0;
|
||||||
|
$aligncenter = array();
|
||||||
|
$alignright = array();
|
||||||
|
$numbercols = array();
|
||||||
|
$sumcol = array();
|
||||||
|
|
||||||
|
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',l.id,'\" />') AS `auswahl`";
|
||||||
|
|
||||||
|
// $moreinfo = true; // Allow drop down details
|
||||||
|
// $moreinfoaction = "lieferschein"; // specify suffix for minidetail-URL to allow different minidetails
|
||||||
|
// $menucol = 11; // Set id col for moredata/menu
|
||||||
|
|
||||||
|
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=lieferbedingungen&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=lieferbedingungen&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 l.id, $dropnbox, l.lieferbedingungen, l.kennzeichen, l.id FROM lieferbedingungen l";
|
||||||
|
|
||||||
|
$where = "1";
|
||||||
|
$count = "SELECT count(DISTINCT id) FROM lieferbedingungen WHERE $where";
|
||||||
|
// $groupby = "";
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$erg = false;
|
||||||
|
|
||||||
|
foreach ($erlaubtevars as $k => $v) {
|
||||||
|
if (isset($$v)) {
|
||||||
|
$erg[$v] = $$v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $erg;
|
||||||
|
}
|
||||||
|
|
||||||
|
function lieferbedingungen_list() {
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=lieferbedingungen&action=list", "Übersicht");
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=lieferbedingungen&action=create", "Neu anlegen");
|
||||||
|
|
||||||
|
$this->app->erp->MenuEintrag("index.php", "Zurück");
|
||||||
|
|
||||||
|
$this->app->YUI->TableSearch('TAB1', 'lieferbedingungen_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||||
|
$this->app->Tpl->Parse('PAGE', "lieferbedingungen_list.tpl");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function lieferbedingungen_delete() {
|
||||||
|
$id = (int) $this->app->Secure->GetGET('id');
|
||||||
|
$this->app->DB->Delete("DELETE FROM `lieferbedingungen` WHERE `id` = '{$id}'");
|
||||||
|
$this->app->Tpl->addMessage('error', 'Der Eintrag wurde gelöscht');
|
||||||
|
$this->lieferbedingungen_list();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Edit lieferbedingungen item
|
||||||
|
* If id is empty, create a new one
|
||||||
|
*/
|
||||||
|
|
||||||
|
function lieferbedingungen_edit() {
|
||||||
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
|
/* // Check if other users are editing this id
|
||||||
|
if($this->app->erp->DisableModul('lieferbedingungen',$id))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
} */
|
||||||
|
|
||||||
|
$this->app->Tpl->Set('ID', $id);
|
||||||
|
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=lieferbedingungen&action=edit&id=$id", "Details");
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=lieferbedingungen&action=list", "Zurück zur Übersicht");
|
||||||
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
$input = $this->GetInput();
|
||||||
|
|
||||||
|
// Convert here
|
||||||
|
// $input['prio'] = !empty($this->app->Secure->GetPOST('prio'))?"1":"0";
|
||||||
|
|
||||||
|
$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 lieferbedingungen (".$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=lieferbedingungen&action=list&msg=$msg");
|
||||||
|
} else {
|
||||||
|
$this->app->Tpl->addMessage('success', 'Die Einstellungen wurden erfolgreich übernommen.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Load values again from database
|
||||||
|
if ($id != 'NULL') {
|
||||||
|
|
||||||
|
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',l.id,'\" />') AS `auswahl`";
|
||||||
|
$result = $this->app->DB->SelectArr("SELECT SQL_CALC_FOUND_ROWS l.id, $dropnbox, l.lieferbedingungen, l.kennzeichen, l.id FROM lieferbedingungen l"." WHERE id=$id");
|
||||||
|
|
||||||
|
foreach ($result[0] as $key => $value) {
|
||||||
|
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($result)) {
|
||||||
|
$lieferbedingungen_from_db = $result[0];
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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("artikel", "artikelnummer");
|
||||||
|
$this->app->Tpl->Set('PROJEKT',$this->app->erp->ReplaceProjekt(false,$lieferbedingungen_from_db['projekt'],false));
|
||||||
|
$this->app->Tpl->Set('PRIO', $lieferbedingungen_from_db['prio']==1?"checked":"");
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->app->Tpl->Parse('PAGE', "lieferbedingungen_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['lieferbedingungen'] = $this->app->Secure->GetPOST('lieferbedingungen');
|
||||||
|
$input['kennzeichen'] = $this->app->Secure->GetPOST('kennzeichen');
|
||||||
|
|
||||||
|
|
||||||
|
return $input;
|
||||||
|
}
|
||||||
|
}
|
@ -4739,7 +4739,7 @@ INNER JOIN shopexport s ON
|
|||||||
}
|
}
|
||||||
$this->arrayToXmlHelper($subNode, $value, $nameSpaces,$subNodeName);
|
$this->arrayToXmlHelper($subNode, $value, $nameSpaces,$subNodeName);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (gettype($value) == 'string') {
|
||||||
$subNode = $xmlObj->addChild((string)$subNodeName, htmlspecialchars($value, ENT_QUOTES), $nameSpace);
|
$subNode = $xmlObj->addChild((string)$subNodeName, htmlspecialchars($value, ENT_QUOTES), $nameSpace);
|
||||||
if(!empty($attributes)) {
|
if(!empty($attributes)) {
|
||||||
foreach($attributes as $attribute) {
|
foreach($attributes as $attribute) {
|
||||||
|
@ -1881,10 +1881,10 @@ class Shopimport
|
|||||||
{
|
{
|
||||||
if($warenkorb['email']!=='amazon_import_bounce@nfxmedia.de')
|
if($warenkorb['email']!=='amazon_import_bounce@nfxmedia.de')
|
||||||
{
|
{
|
||||||
$checkidemail = $this->app->DB->Select("SELECT kundennummer FROM adresse WHERE email='".$warenkorb['email']."' and email <> '' $adresseprojekt AND geloescht!=1 AND kundennummer <> '' LIMIT 1");
|
$checkidemail = $this->app->DB->Select("SELECT kundennummer FROM adresse WHERE email='".$this->app->DB->real_escape_string($warenkorb['email'])."' and email <> '' $adresseprojekt AND geloescht!=1 AND kundennummer <> '' LIMIT 1");
|
||||||
}
|
}
|
||||||
if((String)$checkidemail === ''){
|
if((String)$checkidemail === ''){
|
||||||
$checkidemail = $this->app->DB->Select("SELECT kundennummer FROM adresse WHERE name LIKE '" . $warenkorb['name'] . "' AND ort LIKE '" . $warenkorb['ort'] . "' AND geloescht!=1 $adresseprojekt AND kundennummer <> '' LIMIT 1");
|
$checkidemail = $this->app->DB->Select("SELECT kundennummer FROM adresse WHERE name LIKE '" . $this->app->DB->real_escape_string($warenkorb['name']) . "' AND ort LIKE '" . $this->app->DB->real_escape_string($warenkorb['ort']) . "' AND geloescht!=1 $adresseprojekt AND kundennummer <> '' LIMIT 1");
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$checkidemail = $this->app->DB->Select("SELECT kundennummer FROM adresse WHERE name='".$this->app->DB->real_escape_string($warenkorb['name'])."' AND strasse='".$this->app->DB->real_escape_string($warenkorb['strasse'])."' AND plz='".$this->app->DB->real_escape_string($warenkorb['plz'])."' AND ort='".$this->app->DB->real_escape_string($warenkorb['ort'])."' $adresseprojekt AND geloescht!=1 AND kundennummer <> '' LIMIT 1");
|
$checkidemail = $this->app->DB->Select("SELECT kundennummer FROM adresse WHERE name='".$this->app->DB->real_escape_string($warenkorb['name'])."' AND strasse='".$this->app->DB->real_escape_string($warenkorb['strasse'])."' AND plz='".$this->app->DB->real_escape_string($warenkorb['plz'])."' AND ort='".$this->app->DB->real_escape_string($warenkorb['ort'])."' $adresseprojekt AND geloescht!=1 AND kundennummer <> '' LIMIT 1");
|
||||||
|
@ -642,11 +642,13 @@ class Versandpakete {
|
|||||||
// Write to database
|
// Write to database
|
||||||
// Add checks here
|
// Add checks here
|
||||||
|
|
||||||
$sql = "SELECT status FROM versandpakete WHERE id = ".$id;
|
$sql = "SELECT * FROM versandpakete WHERE id = ".$id;
|
||||||
$input['status'] = $this->app->DB->SelectArr($sql)[0]['status']; // Status is not changeable
|
$paket_db = $this->app->DB->SelectRow($sql);
|
||||||
|
$input['status'] = $paket_db['status']; // Status is not changeable
|
||||||
if ($input['status'] != 'neu') {
|
if ($input['status'] != 'neu') {
|
||||||
$input = Array('bemerkung' => $input['bemerkung']);
|
$input = Array('bemerkung' => $input['bemerkung']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($paket_db['tracking'])) { // Tracking is not changeable
|
if (!empty($paket_db['tracking'])) { // Tracking is not changeable
|
||||||
unset($input['tracking']);
|
unset($input['tracking']);
|
||||||
unset($input['tracking_link']);
|
unset($input['tracking_link']);
|
||||||
|
@ -667,6 +667,13 @@ class WidgetGenadresse
|
|||||||
$field = new HTMLInput("kennung","text","","30","","","","","","","","0","","");
|
$field = new HTMLInput("kennung","text","","30","","","","","","","","0","","");
|
||||||
$this->form->NewField($field);
|
$this->form->NewField($field);
|
||||||
|
|
||||||
|
$field = new HTMLCheckbox("etikettautodruck","","","1","0","0");
|
||||||
|
$this->form->NewField($field);
|
||||||
|
|
||||||
|
$field = new HTMLInput("etikett","text","","30","","","","","","","","0","","");
|
||||||
|
$this->form->NewField($field);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -771,6 +771,27 @@ function abweichend(cmd) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Etiketten|}</legend>
|
||||||
|
<table width="100%" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td width="210">{|Autodruck|}:</td>
|
||||||
|
<td>[ETIKETTAUTODRUCK][MSGETIKETTAUTODRUCK] <i>Bei der Kommissionierung werden Etiketten gedruckt</i></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="210">{|Etikett|}:</td>
|
||||||
|
<td>[ETIKETT][MSGETIKETT]</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row-height">
|
<div class="row-height">
|
||||||
<div class="col-xs-12 col-md-6 col-md-height">
|
<div class="col-xs-12 col-md-6 col-md-height">
|
||||||
|
@ -438,6 +438,11 @@ class WidgetAdresse extends WidgetGenAdresse
|
|||||||
$this->app->Tpl->Set('NACHBUNDESSTAAT','-->');
|
$this->app->Tpl->Set('NACHBUNDESSTAAT','-->');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$etikettenart = $this->app->erp->GetEtiketten();
|
||||||
|
$field = new HTMLSelect("etikett",0);
|
||||||
|
$field->AddOptionsAsocSimpleArray($etikettenart);
|
||||||
|
$this->form->NewField($field);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ReplaceDecimal($db,$value,$fromform)
|
function ReplaceDecimal($db,$value,$fromform)
|
||||||
|
@ -152,7 +152,6 @@ class WidgetProjekt extends WidgetGenProjekt
|
|||||||
$field->AddOptionsAsocSimpleArray($drucker);
|
$field->AddOptionsAsocSimpleArray($drucker);
|
||||||
$this->form->NewField($field);
|
$this->form->NewField($field);
|
||||||
|
|
||||||
|
|
||||||
$drucker = $this->app->erp->GetDrucker();
|
$drucker = $this->app->erp->GetDrucker();
|
||||||
$field = new HTMLSelect("kasse_drucker",0);
|
$field = new HTMLSelect("kasse_drucker",0);
|
||||||
$field->AddOptionsAsocSimpleArray($drucker);
|
$field->AddOptionsAsocSimpleArray($drucker);
|
||||||
|
Loading…
Reference in New Issue
Block a user