mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 04:27:14 +01:00
Compare commits
12 Commits
2ebf0a91c6
...
a3285d6c61
Author | SHA1 | Date | |
---|---|---|---|
|
a3285d6c61 | ||
|
42f5d3cc01 | ||
|
5daa541f4f | ||
|
5f590c586c | ||
|
934bd151ea | ||
|
8f3d2a6ade | ||
|
ca6249584f | ||
|
c486b241bd | ||
|
a907a9fa3f | ||
|
00d10dd7cc | ||
|
39c78c52c1 | ||
|
ad37693818 |
@ -12945,12 +12945,8 @@ DROP TABLE IF EXISTS `seriennummern`;
|
|||||||
CREATE TABLE `seriennummern` (
|
CREATE TABLE `seriennummern` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`seriennummer` varchar(255) NOT NULL,
|
`seriennummer` varchar(255) NOT NULL,
|
||||||
`adresse` int(11) NOT NULL,
|
|
||||||
`artikel` int(11) NOT NULL,
|
`artikel` int(11) NOT NULL,
|
||||||
`beschreibung` varchar(255) NOT NULL,
|
`beschreibung` varchar(255) NOT NULL,
|
||||||
`lieferung` date NOT NULL,
|
|
||||||
`lieferschein` int(11) NOT NULL,
|
|
||||||
`lieferscheinpos` int(11) NOT NULL,
|
|
||||||
`bearbeiter` varchar(255) NOT NULL,
|
`bearbeiter` varchar(255) NOT NULL,
|
||||||
`logdatei` datetime NOT NULL,
|
`logdatei` datetime NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
|
@ -365,9 +365,13 @@ class TemplateParser {
|
|||||||
echo '<br><br>';
|
echo '<br><br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function SetText($_var, $_value)
|
function SetText($_var, $_value, $html = false)
|
||||||
{
|
{
|
||||||
$this->VARARRAY[$_var]= $this->htmlspecialchars($_value);
|
if(!$html)
|
||||||
|
{
|
||||||
|
$_value = $this->htmlspecialchars($_value);
|
||||||
|
}
|
||||||
|
$this->VARARRAY[$_var]= $_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddText($_var,$_value, $variable = false){
|
function AddText($_var,$_value, $variable = false){
|
||||||
|
@ -91423,12 +91423,12 @@
|
|||||||
"Comment": ""
|
"Comment": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Field": "adresse",
|
"Field": "datum",
|
||||||
"Type": "int(11)",
|
"Type": "datetime",
|
||||||
"Collation": null,
|
"Collation": null,
|
||||||
"Null": "NO",
|
"Null": "NO",
|
||||||
"Key": "",
|
"Key": "",
|
||||||
"Default": null,
|
"Default": "current_timestamp()",
|
||||||
"Extra": "",
|
"Extra": "",
|
||||||
"Privileges": "select,insert,update,references",
|
"Privileges": "select,insert,update,references",
|
||||||
"Comment": ""
|
"Comment": ""
|
||||||
@ -91456,34 +91456,12 @@
|
|||||||
"Comment": ""
|
"Comment": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Field": "lieferung",
|
"Field": "eingelagert",
|
||||||
"Type": "date",
|
"Type": "int(1)",
|
||||||
"Collation": null,
|
"Collation": null,
|
||||||
"Null": "NO",
|
"Null": "NO",
|
||||||
"Key": "",
|
"Key": "",
|
||||||
"Default": null,
|
"Default": 0,
|
||||||
"Extra": "",
|
|
||||||
"Privileges": "select,insert,update,references",
|
|
||||||
"Comment": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Field": "lieferschein",
|
|
||||||
"Type": "int(11)",
|
|
||||||
"Collation": null,
|
|
||||||
"Null": "NO",
|
|
||||||
"Key": "",
|
|
||||||
"Default": null,
|
|
||||||
"Extra": "",
|
|
||||||
"Privileges": "select,insert,update,references",
|
|
||||||
"Comment": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Field": "lieferscheinpos",
|
|
||||||
"Type": "int(11)",
|
|
||||||
"Collation": null,
|
|
||||||
"Null": "NO",
|
|
||||||
"Key": "",
|
|
||||||
"Default": null,
|
|
||||||
"Extra": "",
|
"Extra": "",
|
||||||
"Privileges": "select,insert,update,references",
|
"Privileges": "select,insert,update,references",
|
||||||
"Comment": ""
|
"Comment": ""
|
||||||
@ -91531,6 +91509,106 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "seriennummern_lieferschein_position",
|
||||||
|
"collation": "utf8mb3_general_ci",
|
||||||
|
"type": "BASE TABLE",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"Field": "id",
|
||||||
|
"Type": "int(11)",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "PRI",
|
||||||
|
"Default": null,
|
||||||
|
"Extra": "auto_increment",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Field": "seriennummer",
|
||||||
|
"Type": "int(11)",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": null,
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Field": "lieferschein_position",
|
||||||
|
"Type": "int(11)",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": null,
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"keys": [
|
||||||
|
{
|
||||||
|
"Key_name": "PRIMARY",
|
||||||
|
"Index_type": "BTREE",
|
||||||
|
"columns": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"Non_unique": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "seriennummern_paketdistribution",
|
||||||
|
"collation": "utf8mb3_general_ci",
|
||||||
|
"type": "BASE TABLE",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"Field": "id",
|
||||||
|
"Type": "int(11)",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "PRI",
|
||||||
|
"Default": null,
|
||||||
|
"Extra": "auto_increment",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Field": "seriennummer",
|
||||||
|
"Type": "int(11)",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": null,
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Field": "paketdistribution",
|
||||||
|
"Type": "int(11)",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": null,
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"keys": [
|
||||||
|
{
|
||||||
|
"Key_name": "PRIMARY",
|
||||||
|
"Index_type": "BTREE",
|
||||||
|
"columns": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"Non_unique": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "seriennummern_log",
|
"name": "seriennummern_log",
|
||||||
"collation": "utf8mb3_general_ci",
|
"collation": "utf8mb3_general_ci",
|
||||||
|
@ -2821,11 +2821,21 @@ public function NavigationHooks(&$menu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function SeriennummernCheckWarnung($artikel_id) {
|
function SeriennummernCheckWarnung(int $artikel_id) {
|
||||||
$obj = $this->LoadModul('seriennummern');
|
$obj = $this->LoadModul('seriennummern');
|
||||||
$obj->seriennummern_check_and_message_stock_added($artikel_id);
|
$obj->seriennummern_check_and_message_stock_added($artikel_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function SeriennummernCheckLieferscheinWarnung(int $lieferschein_id, bool $notification) {
|
||||||
|
$obj = $this->LoadModul('seriennummern');
|
||||||
|
return($obj->seriennummern_check_and_message_delivery_note($lieferschein_id, $notification));
|
||||||
|
}
|
||||||
|
|
||||||
|
function SeriennummernCheckLieferschein($lieferschein_id = null, $ignore_date = false, $only_missing = true, $group_lieferschein = false) {
|
||||||
|
$obj = $this->LoadModul('seriennummern');
|
||||||
|
return ($obj->seriennummern_check_delivery_notes($lieferschein_id, $ignore_date, $only_missing, $group_lieferschein));
|
||||||
|
}
|
||||||
|
|
||||||
// @refactor in Lager Modul
|
// @refactor in Lager Modul
|
||||||
function ArtikelAnzahlLagerPlatzMitSperre($artikel,$lager_platz)
|
function ArtikelAnzahlLagerPlatzMitSperre($artikel,$lager_platz)
|
||||||
{
|
{
|
||||||
@ -3552,6 +3562,7 @@ function LieferscheinEinlagern($id,$grund="Lieferschein Einlagern", $lpiids = nu
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->RunHook('erpapi_lieferschein_auslagern', 1, $lieferschein);
|
$this->RunHook('erpapi_lieferschein_auslagern', 1, $lieferschein);
|
||||||
|
$this->SeriennummernCheckLieferscheinWarnung($lieferschein, true);
|
||||||
$this->LieferscheinProtokoll($lieferschein,"Lieferschein ausgelagert");
|
$this->LieferscheinProtokoll($lieferschein,"Lieferschein ausgelagert");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -307,6 +307,36 @@ class Briefpapier extends SuperFPDF {
|
|||||||
|
|
||||||
public function GetChargeMHDSNString($type,$doctype,$doctypeid,$posid, $returnSimpleString = false)
|
public function GetChargeMHDSNString($type,$doctype,$doctypeid,$posid, $returnSimpleString = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
switch ($type) {
|
||||||
|
case 'sn':
|
||||||
|
$sql = "SELECT
|
||||||
|
s.seriennummer
|
||||||
|
FROM
|
||||||
|
seriennummern s
|
||||||
|
INNER JOIN
|
||||||
|
seriennummern_lieferschein_position slp ON slp.seriennummer = s.id
|
||||||
|
WHERE
|
||||||
|
slp.lieferschein_position = $posid
|
||||||
|
";
|
||||||
|
$values = (array) $this->app->DB->SelectArr($sql);
|
||||||
|
return(implode(', ',array_column($values,'seriennummer')));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($values)){
|
||||||
|
if($returnSimpleString) {
|
||||||
|
return implode(', ', $values);
|
||||||
|
}
|
||||||
|
return implode("\r\n",$values);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
|
||||||
|
|
||||||
|
// XENTRAL Legacy
|
||||||
|
/*
|
||||||
|
|
||||||
$lieferschein_posid = 0;
|
$lieferschein_posid = 0;
|
||||||
$auftrag_position_id = 0;
|
$auftrag_position_id = 0;
|
||||||
$lieferschein = 0;
|
$lieferschein = 0;
|
||||||
@ -560,6 +590,7 @@ class Briefpapier extends SuperFPDF {
|
|||||||
return implode("\r\n",$tmp_string);
|
return implode("\r\n",$tmp_string);
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
function CheckPosition($value,$doctype,$doctypeid,$posid)
|
function CheckPosition($value,$doctype,$doctypeid,$posid)
|
||||||
@ -3306,6 +3337,10 @@ class Briefpapier extends SuperFPDF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenXE Seriennummern
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!empty($this->doctype) && !empty($this->id) && strpos($item['desc'], '{') !== false) {
|
if(!empty($this->doctype) && !empty($this->id) && strpos($item['desc'], '{') !== false) {
|
||||||
$item['desc'] = $this->app->erp->ParseUserVars($this->doctype, $this->id ,$item['desc']);
|
$item['desc'] = $this->app->erp->ParseUserVars($this->doctype, $this->id ,$item['desc']);
|
||||||
}
|
}
|
||||||
|
@ -2610,7 +2610,29 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
|
|||||||
break;
|
break;
|
||||||
case "seriennummerverfuegbar":
|
case "seriennummerverfuegbar":
|
||||||
$artikel = (int)$this->app->Secure->GetGET('artikel');
|
$artikel = (int)$this->app->Secure->GetGET('artikel');
|
||||||
$arr = $this->app->DB->SelectArr("SELECT seriennummer FROM seriennummern WHERE lieferschein = 0 AND seriennummer LIKE '%$term%' AND artikel = '$artikel' LIMIT 20");
|
$lieferschein = (int)$this->app->Secure->GetGET('lieferschein');
|
||||||
|
|
||||||
|
$sql = "
|
||||||
|
SELECT DISTINCT
|
||||||
|
s.seriennummer
|
||||||
|
FROM
|
||||||
|
seriennummern s
|
||||||
|
INNER JOIN
|
||||||
|
lieferschein_position lp ON lp.artikel = s.artikel
|
||||||
|
LEFT JOIN
|
||||||
|
seriennummern_lieferschein_position slp ON slp.seriennummer = s.id
|
||||||
|
WHERE
|
||||||
|
s.eingelagert = 1
|
||||||
|
AND slp.id IS NULL
|
||||||
|
AND s.seriennummer LIKE '%$term%'
|
||||||
|
AND (s.artikel = '$artikel' OR '$artikel' = '0')
|
||||||
|
LIMIT 20
|
||||||
|
";
|
||||||
|
|
||||||
|
//echo($sql);
|
||||||
|
|
||||||
|
$arr = $this->app->DB->SelectArr($sql);
|
||||||
|
|
||||||
$carr = !empty($arr)?count($arr):0;
|
$carr = !empty($arr)?count($arr):0;
|
||||||
for($i = 0; $i < $carr; $i++) {
|
for($i = 0; $i < $carr; $i++) {
|
||||||
$newarr[] = $arr[$i]['seriennummer'];
|
$newarr[] = $arr[$i]['seriennummer'];
|
||||||
|
@ -13,26 +13,51 @@
|
|||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
[FORMHANDLEREVENT]
|
[FORMHANDLEREVENT]
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row-height">
|
<div class="row-height">
|
||||||
<div class="col-xs-14 col-md-6 col-md-height">
|
<div class="col-xs-14 col-md-6 col-md-height">
|
||||||
<div class="inside inside-full-height">
|
<div class="inside inside-full-height">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{|Seriennummern erfassen Artikel [ARTIKELNUMMER] [ARTIKEL]|}</legend>
|
<legend [LIEFERSCHEIN_HIDDEN]>{|Lieferscheinpositionen|}</legend>
|
||||||
|
<legend [ARTIKEL_HIDDEN]>{|Seriennummern|}</legend>
|
||||||
|
[POSITIONEN]
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-14 col-md-6 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Seriennummern erfassen [LEGEND]|}</legend>
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
<tr>
|
<tr [ARTIKEL_HIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
{|Lagermenge|}:
|
{|Lagermenge|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" value="[ANZLAGER]" size="40" disabled>
|
<input type="text" value="[ANZLAGER]" size="40" disabled />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr [ARTIKEL_HIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
{|Seriennummern verfügbar|}:
|
{|Seriennummern verfügbar|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" value="[ANZVORHANDEN]" size="40" disabled>
|
<input type="text" value="[ANZVORHANDEN]" size="40" disabled />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr [LIEFERSCHEIN_HIDDEN]>
|
||||||
|
<td>
|
||||||
|
{|Menge auf Lieferschein|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" value="[ANZLIEFERSCHEIN]" size="40" disabled />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr [LIEFERSCHEIN_HIDDEN]>
|
||||||
|
<td>
|
||||||
|
{|Seriennummern zugeordnet|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" value="[ANZVORHANDEN]" size="40" disabled />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -40,99 +65,83 @@
|
|||||||
{|Seriennummern fehlen|}:
|
{|Seriennummern fehlen|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" value="[ANZFEHLT]" size="40" disabled>
|
<input type="text" value="[ANZFEHLT]" size="40" disabled />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr [ARTIKEL_HIDDEN] [EINGABE_HIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
{|Seriennummer scannen|}:
|
{|Seriennummer scannen|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="eingabeneu" id="eingabeneu" value="[EINGABENEU]" size="40" autofocus>
|
<input type="text" name="eingabescan" id="eingabescan" value="[EINGABESCAN]" size="40" autofocus />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
<tr [LIEFERSCHEIN_HIDDEN] [EINGABE_HIDDEN]>
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-14 col-md-6 col-md-height">
|
|
||||||
<div class="inside inside-full-height">
|
|
||||||
<fieldset>
|
|
||||||
<legend>{|Seriennummernassistent|}</legend>
|
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
|
||||||
<tr>
|
|
||||||
<td>
|
<td>
|
||||||
|
{|Seriennummer wählen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="eingabe" id="eingabe" value="[EINGABE]" size="40" autofocus/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr [EINGABE_HIDDEN]>
|
||||||
|
<td>
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Seriennummernassistent|}</legend>
|
||||||
|
</fieldset>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<tr [EINGABE_HIDDEN]>
|
||||||
|
<td [ARTIKEL_HIDDEN]>
|
||||||
{|Letzte Seriennummer|}:
|
{|Letzte Seriennummer|}:
|
||||||
</td>
|
</td>
|
||||||
|
<td [LIEFERSCHEIN_HIDDEN]>
|
||||||
|
{|Nächste Seriennummer|}:
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="muster" id="muster" value="[LETZTE]" size="40" disabled>
|
<input type="text" name="muster" id="muster" value="[LETZTE]" size="40" disabled />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr [EINGABE_HIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
{|Präfix|}:
|
{|Präfix|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="praefix" id="praefix" value="[PRAEFIX]" size="40">
|
<input type="text" name="praefix" id="praefix" value="[PRAEFIX]" size="40" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr [EINGABE_HIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
{|Start|}:
|
{|Start|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" name="start" id="start" value="[START]" size="40">
|
<input type="number" name="start" id="start" value="[START]" size="40" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr [EINGABE_HIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
{|Postfix|}:
|
{|Postfix|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="postfix" id="postfix" value="[POSTFIX]" size="40">
|
<input type="text" name="postfix" id="postfix" value="[POSTFIX]" size="40" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr [EINGABE_HIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
{|Anzahl|}:
|
{|Anzahl|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" name="anzahl" id="anzahl" value="[ANZAHL]" size="40">
|
<input type="number" name="anzahl" id="anzahl" value="[ANZAHL]" size="40" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
<tr [EINGABE_HIDDEN]>
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-14 col-md-2 col-md-height">
|
|
||||||
<div class="inside inside-full-height">
|
|
||||||
<fieldset>
|
|
||||||
<legend>{|<!--Legend for this form area goes here>-->Aktionen|}</legend>
|
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
|
||||||
<tr>
|
|
||||||
<td>
|
<td>
|
||||||
<button name="submit" value="hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzufügen</button>
|
<fieldset>
|
||||||
</td>
|
<legend>{|Liste der gewählten Seriennummern|}</legend>
|
||||||
|
</fieldset>
|
||||||
|
</tr>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr [EINGABE_HIDDEN]>
|
||||||
<td>
|
|
||||||
<button name="submit" value="assistent" class="ui-button-icon" style="width:100%;">Assistent ausführen</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="row-height">
|
|
||||||
<div class="col-xs-14 col-md-12 col-md-height">
|
|
||||||
<div class="inside inside-full-height">
|
|
||||||
<fieldset>
|
|
||||||
<legend>{|Gewählte Seriennummern|}</legend>
|
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
|
||||||
<tr>
|
|
||||||
<td>
|
<td>
|
||||||
{|Seriennummern|}:
|
{|Seriennummern|}:
|
||||||
</td>
|
</td>
|
||||||
@ -142,24 +151,44 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
<fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-14 col-md-2 col-md-height">
|
<div class="col-xs-14 col-md-2 col-md-height">
|
||||||
<div class="inside inside-full-height">
|
<div class="inside inside-full-height">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{|<!--Legend for this form area goes here>-->Aktionen|}</legend>
|
<legend>{|<!--Legend for this form area goes here>-->Aktionen|}</legend>
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
<table width="100%" border="0" class="mkTableFormular" [EINGABE_HIDDEN]>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button>
|
<button name="submit" value="hinzufuegen" class="ui-button-icon" style="width:100%;">Zur Liste hinzufügen</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="assistent" class="ui-button-icon" style="width:100%;">Assistent ausführen</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr [ARTIKEL_HIDDEN]>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="allowold" id="allowold" value="1" [PRIO] size="20">{|Ausgelieferte erlauben|}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr [ARTIKEL_HIDDEN]>
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="einlagern" class="ui-button-icon" style="width:100%;">Speichern</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr [LIEFERSCHEIN_HIDDEN]>
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="lieferscheinzuordnen" class="ui-button-icon" style="width:100%;">Speichern</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
33
www/pages/content/seriennummern_lieferscheine_list.tpl
Normal file
33
www/pages/content/seriennummern_lieferscheine_list.tpl
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
|
[MESSAGE]
|
||||||
|
<form action="" method="post">
|
||||||
|
[FORMHANDLEREVENT]
|
||||||
|
<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="altelieferscheine" class="switch">
|
||||||
|
<input type="checkbox" id="altelieferscheine" />
|
||||||
|
<span class="slider round">
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label for="altelieferscheine">
|
||||||
|
{|Zzgl. alte Lieferscheine|}
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="row" [ARTIKEL_HIDDEN]>
|
||||||
|
[TAB1]
|
||||||
|
[TAB1NEXT]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -22,7 +22,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{|Seriennummern verfügbar|}:
|
{|Seriennummern eingelagert|}:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" value="[ANZVORHANDEN]" size="40" disabled>
|
<input type="text" value="[ANZVORHANDEN]" size="40" disabled>
|
||||||
@ -68,7 +68,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<label for="verfuegbar">
|
<label for="verfuegbar">
|
||||||
{|Nur verfügbare|}
|
{|Nur eingelagerte|}
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li class="filter-item">
|
||||||
|
<label for="ausgelagert" class="switch">
|
||||||
|
<input type="checkbox" id="ausgelagert" />
|
||||||
|
<span class="slider round">
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<label for="ausgelagert">
|
||||||
|
{|Nur ausgelagerte|}
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="filter-item">
|
<li class="filter-item">
|
||||||
|
167
www/pages/content/seriennummern_select.tpl
Normal file
167
www/pages/content/seriennummern_select.tpl
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
<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-14 col-md-6 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Seriennummern wählen Artikel [ARTIKELNUMMER] [ARTIKEL]|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Lagermenge|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" value="[ANZLAGER]" size="40" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Seriennummern verfügbar|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" value="[ANZVORHANDEN]" size="40" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Seriennummern fehlen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" value="[ANZFEHLT]" size="40" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Seriennummer scannen|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="eingabeneu" id="eingabeneu" value="[EINGABENEU]" size="40" autofocus>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-14 col-md-6 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Seriennummernassistent|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Letzte Seriennummer|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="muster" id="muster" value="[LETZTE]" size="40" disabled>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Präfix|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="praefix" id="praefix" value="[PRAEFIX]" size="40">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Start|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="number" name="start" id="start" value="[START]" size="40">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Postfix|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="postfix" id="postfix" value="[POSTFIX]" size="40">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Anzahl|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="number" name="anzahl" id="anzahl" value="[ANZAHL]" size="40">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-14 col-md-2 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|<!--Legend for this form area goes here>-->Aktionen|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzufügen</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="assistent" class="ui-button-icon" style="width:100%;">Assistent ausführen</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-14 col-md-12 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|Gewählte Seriennummern|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{|Seriennummern|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<textarea name="seriennummern" id="seriennummern" rows="20" style="width:100%;">[SERIENNUMMERN]</textarea>
|
||||||
|
<i>Liste der Seriennummern, 1 pro Zeile</i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-14 col-md-2 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset>
|
||||||
|
<legend>{|<!--Legend for this form area goes here>-->Aktionen|}</legend>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -645,12 +645,15 @@ class Lieferschein extends GenLieferschein
|
|||||||
$adresse = $this->app->DB->Select("SELECT adresse FROM lieferschein WHERE id='$id' LIMIT 1");
|
$adresse = $this->app->DB->Select("SELECT adresse FROM lieferschein WHERE id='$id' LIMIT 1");
|
||||||
$lieferantenretoure = $this->app->DB->Select("SELECT lieferantenretoure FROM lieferschein WHERE id='$id' LIMIT 1");
|
$lieferantenretoure = $this->app->DB->Select("SELECT lieferantenretoure FROM lieferschein WHERE id='$id' LIMIT 1");
|
||||||
|
|
||||||
if($adresse > 0 && ($status=="angelegt" || $status==""))
|
if($adresse > 0 && ($status=="angelegt" || $status=="")) {
|
||||||
$freigabe = "<option value=\"freigabe\">Lieferschein freigeben</option>";
|
$freigabe = "<option value=\"freigabe\">Lieferschein freigeben</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$seriennummern_check_result = $this->app->erp->SeriennummernCheckLieferschein(lieferschein_id: $id, ignore_date: true, only_missing: true, group_lieferschein: true);
|
||||||
|
|
||||||
if(($status=="versendet" || $status=="freigegeben") && $lieferantenretoure=="1")
|
if(($status=="versendet" || $status=="freigegeben") && $lieferantenretoure=="1" && empty($seriennummern_check_result)) {
|
||||||
$abschliessen = "<option value=\"abschliessen\">Lieferschein abschliessen</option>";
|
$abschliessen = "<option value=\"abschliessen\">Lieferschein abschliessen</option>";
|
||||||
|
}
|
||||||
|
|
||||||
$checkifrgexists = $this->app->DB->Select("SELECT id FROM rechnung WHERE lieferschein='$id' LIMIT 1");
|
$checkifrgexists = $this->app->DB->Select("SELECT id FROM rechnung WHERE lieferschein='$id' LIMIT 1");
|
||||||
|
|
||||||
@ -669,7 +672,6 @@ class Lieferschein extends GenLieferschein
|
|||||||
$this->app->erp->RunHook('Lieferschein_Aktion_option',3, $id, $status, $hookoption);
|
$this->app->erp->RunHook('Lieferschein_Aktion_option',3, $id, $status, $hookoption);
|
||||||
$this->app->erp->RunHook('Lieferschein_Aktion_case',3, $id, $status, $hookcase);
|
$this->app->erp->RunHook('Lieferschein_Aktion_case',3, $id, $status, $hookcase);
|
||||||
|
|
||||||
|
|
||||||
$bestellmengelagerartikel = $this->app->DB->Select("SELECT sum(lp.menge) as bestellmenge from lieferschein_position lp INNER JOIN artikel a on a.id=lp.artikel where a.lagerartikel=1 AND lp.lieferschein = '$id'");
|
$bestellmengelagerartikel = $this->app->DB->Select("SELECT sum(lp.menge) as bestellmenge from lieferschein_position lp INNER JOIN artikel a on a.id=lp.artikel where a.lagerartikel=1 AND lp.lieferschein = '$id'");
|
||||||
$liefermengelagerartikel = $this->app->DB->Select("SELECT sum(lp.geliefert) as liefermenge from lieferschein_position lp INNER JOIN artikel a on a.id=lp.artikel where a.lagerartikel=1 AND lp.lieferschein = '$id'");
|
$liefermengelagerartikel = $this->app->DB->Select("SELECT sum(lp.geliefert) as liefermenge from lieferschein_position lp INNER JOIN artikel a on a.id=lp.artikel where a.lagerartikel=1 AND lp.lieferschein = '$id'");
|
||||||
$liefermengelagerartikel2 = $this->app->DB->Select("SELECT sum(olp.menge) as liefermenge from lieferschein_position lp INNER JOIN objekt_lager_platz olp ON olp.objekt='lieferschein' AND olp.parameter=lp.id INNER JOIN artikel a on a.id=lp.artikel where a.lagerartikel=1 AND lp.lieferschein = '$id'");
|
$liefermengelagerartikel2 = $this->app->DB->Select("SELECT sum(olp.menge) as liefermenge from lieferschein_position lp INNER JOIN objekt_lager_platz olp ON olp.objekt='lieferschein' AND olp.parameter=lp.id INNER JOIN artikel a on a.id=lp.artikel where a.lagerartikel=1 AND lp.lieferschein = '$id'");
|
||||||
@ -695,19 +697,20 @@ class Lieferschein extends GenLieferschein
|
|||||||
}
|
}
|
||||||
|
|
||||||
$optionumlagern = "<option value=\"umlagern\">Lieferschein umlagern</option>";
|
$optionumlagern = "<option value=\"umlagern\">Lieferschein umlagern</option>";
|
||||||
$abschicken = "<option value=\"abschicken\">Lieferschein abschicken</option>";
|
|
||||||
|
|
||||||
if($status!="angelegt" && $lieferantenretoure!="1")
|
if (empty($seriennummern_check_result)) {
|
||||||
{
|
$abschicken = "<option value=\"abschicken\">Lieferschein abschicken</option>";
|
||||||
$alsrechnung = "<option value=\"rechnung\">als Rechnung weiterführen</option>";
|
if($status!="angelegt" && $lieferantenretoure!="1")
|
||||||
if($this->app->erp->RechteVorhanden('lieferschein', 'proformarechnung') && $this->app->erp->ModulVorhanden('proformarechnung'))
|
{
|
||||||
{
|
$alsrechnung = "<option value=\"rechnung\">als Rechnung weiterführen</option>";
|
||||||
$alsrechnung .= "<option value=\"proformarechnung\">als Proformarechnung weiterführen</option>";
|
if($this->app->erp->RechteVorhanden('lieferschein', 'proformarechnung') && $this->app->erp->ModulVorhanden('proformarechnung'))
|
||||||
}
|
{
|
||||||
|
$alsrechnung .= "<option value=\"proformarechnung\">als Proformarechnung weiterführen</option>";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($this->app->erp->RechteVorhanden('belegeimport', 'belegcsvexport'))
|
if($this->app->erp->RechteVorhanden('belegeimport', 'belegcsvexport'))
|
||||||
{
|
{
|
||||||
$casebelegeimport = "case 'belegeimport': window.location.href='index.php?module=belegeimport&action=belegcsvexport&cmd=lieferschein&id=%value%'; break;";
|
$casebelegeimport = "case 'belegeimport': window.location.href='index.php?module=belegeimport&action=belegcsvexport&cmd=lieferschein&id=%value%'; break;";
|
||||||
@ -829,7 +832,6 @@ class Lieferschein extends GenLieferschein
|
|||||||
$lieferantenretoureinfo = $auftragArr[0]['lieferantenretoureinfo'];
|
$lieferantenretoureinfo = $auftragArr[0]['lieferantenretoureinfo'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->app->Tpl->Set('LIEFERANTENRETOUREINFO',$lieferantenretoureinfo);
|
$this->app->Tpl->Set('LIEFERANTENRETOUREINFO',$lieferantenretoureinfo);
|
||||||
|
|
||||||
if($lieferantenretoure!='1') {
|
if($lieferantenretoure!='1') {
|
||||||
@ -849,7 +851,6 @@ class Lieferschein extends GenLieferschein
|
|||||||
$this->app->Tpl->Set('ZAHLWEISE',$auftragArr[0]['zahlungsweise']);
|
$this->app->Tpl->Set('ZAHLWEISE',$auftragArr[0]['zahlungsweise']);
|
||||||
$this->app->Tpl->Set('STATUS',$auftragArr[0]['status']);
|
$this->app->Tpl->Set('STATUS',$auftragArr[0]['status']);
|
||||||
|
|
||||||
|
|
||||||
if($auftragArr[0]['auftragid'] > 0){
|
if($auftragArr[0]['auftragid'] > 0){
|
||||||
$orderRow = $this->app->DB->SelectRow(
|
$orderRow = $this->app->DB->SelectRow(
|
||||||
"SELECT belegnr, projekt FROM auftrag WHERE id='".$auftragArr[0]['auftragid']."' LIMIT 1"
|
"SELECT belegnr, projekt FROM auftrag WHERE id='".$auftragArr[0]['auftragid']."' LIMIT 1"
|
||||||
@ -875,7 +876,6 @@ class Lieferschein extends GenLieferschein
|
|||||||
$this->app->Tpl->Set('AUFTRAG','-');
|
$this->app->Tpl->Set('AUFTRAG','-');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($auftragArr[0]['auftragid'] > 0){
|
if($auftragArr[0]['auftragid'] > 0){
|
||||||
$rechnung = $this->app->DB->SelectArr(
|
$rechnung = $this->app->DB->SelectArr(
|
||||||
($auftragArr[0]['auftragid']?
|
($auftragArr[0]['auftragid']?
|
||||||
@ -915,9 +915,7 @@ class Lieferschein extends GenLieferschein
|
|||||||
INNER JOIN lieferschein_position lp ON lp.id = s.lieferschein_position_id
|
INNER JOIN lieferschein_position lp ON lp.id = s.lieferschein_position_id
|
||||||
WHERE lp.lieferschein='$id'
|
WHERE lp.lieferschein='$id'
|
||||||
");
|
");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$crechnung = !empty($rechnung)?count($rechnung):0;
|
$crechnung = !empty($rechnung)?count($rechnung):0;
|
||||||
@ -939,14 +937,13 @@ class Lieferschein extends GenLieferschein
|
|||||||
else
|
else
|
||||||
$this->app->Tpl->Set('STEUER',"Export");
|
$this->app->Tpl->Set('STEUER',"Export");
|
||||||
|
|
||||||
|
|
||||||
if($menu)
|
if($menu)
|
||||||
{
|
{
|
||||||
$menu = $this->LieferscheinIconMenu($id);
|
$menu = $this->LieferscheinIconMenu($id);
|
||||||
$this->app->Tpl->Set('MENU',$menu);
|
$this->app->Tpl->Set('MENU',$menu);
|
||||||
}
|
}
|
||||||
// ARTIKEL
|
|
||||||
|
|
||||||
|
// ARTIKEL
|
||||||
$lieferscheinarr = $this->app->DB->SelectRow("SELECT * FROM lieferschein WHERE id='$id' LIMIT 1");
|
$lieferscheinarr = $this->app->DB->SelectRow("SELECT * FROM lieferschein WHERE id='$id' LIMIT 1");
|
||||||
|
|
||||||
$status = $lieferscheinarr['status'];//$this->app->DB->Select("SELECT status FROM lieferschein WHERE id='$id' LIMIT 1");
|
$status = $lieferscheinarr['status'];//$this->app->DB->Select("SELECT status FROM lieferschein WHERE id='$id' LIMIT 1");
|
||||||
@ -1313,8 +1310,6 @@ class Lieferschein extends GenLieferschein
|
|||||||
$this->app->erp->DokumentAbschicken();
|
$this->app->erp->DokumentAbschicken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function LieferscheinDelete($id = null)
|
function LieferscheinDelete($id = null)
|
||||||
{
|
{
|
||||||
if(is_null($id))
|
if(is_null($id))
|
||||||
@ -1716,7 +1711,7 @@ class Lieferschein extends GenLieferschein
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function LieferscheinMenu()
|
function LieferscheinMenu($seriennummern_zeigen = false, $paketmarke_zeigen = false)
|
||||||
{
|
{
|
||||||
$id = $this->app->Secure->GetGET("id");
|
$id = $this->app->Secure->GetGET("id");
|
||||||
|
|
||||||
@ -1727,24 +1722,26 @@ class Lieferschein extends GenLieferschein
|
|||||||
// $this->app->Tpl->Set(KURZUEBERSCHRIFT,"Lieferschein $belegnr");
|
// $this->app->Tpl->Set(KURZUEBERSCHRIFT,"Lieferschein $belegnr");
|
||||||
$this->app->Tpl->Set('KURZUEBERSCHRIFT2',"$name Lieferschein $belegnr");
|
$this->app->Tpl->Set('KURZUEBERSCHRIFT2',"$name Lieferschein $belegnr");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $this->app->erp->MenuEintrag("index.php?module=lieferschein&action=edit&id=$id","Lieferscheindaten");
|
// $this->app->erp->MenuEintrag("index.php?module=lieferschein&action=edit&id=$id","Lieferscheindaten");
|
||||||
//$this->app->Tpl->Add(TABS,"<li><a href=\"index.php?module=lieferschein&action=positionen&id=$id\">Positionen</a></li>");
|
//$this->app->Tpl->Add(TABS,"<li><a href=\"index.php?module=lieferschein&action=positionen&id=$id\">Positionen</a></li>");
|
||||||
|
|
||||||
// status bestell
|
// status bestell
|
||||||
$status = $this->app->DB->Select("SELECT status FROM lieferschein WHERE id='$id' LIMIT 1");
|
$status = $this->app->DB->Select("SELECT status FROM lieferschein WHERE id='$id' LIMIT 1");
|
||||||
|
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=lieferschein&action=edit&id=$id","Details");
|
||||||
|
|
||||||
if ($status=="angelegt")
|
if ($status=="angelegt")
|
||||||
{
|
{
|
||||||
$this->app->erp->MenuEintrag("index.php?module=lieferschein&action=freigabe&id=$id","Freigabe");
|
$this->app->erp->MenuEintrag("index.php?module=lieferschein&action=freigabe&id=$id","Freigabe");
|
||||||
|
} else {
|
||||||
|
if ($seriennummern_zeigen) {
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=seriennummern&action=enter&lieferschein=".$id."&from=lieferschein", "Seriennummern");
|
||||||
|
}
|
||||||
|
if ($paketmarke_zeigen) {
|
||||||
|
$this->app->erp->MenuEintrag("index.php?module=lieferschein&action=paketmarke&id=$id","Paketmarke");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->app->erp->MenuEintrag("index.php?module=lieferschein&action=edit&id=$id","Details");
|
|
||||||
$this->app->erp->MenuEintrag("index.php?module=lieferschein&action=paketmarke&id=$id","Paketmarke");
|
|
||||||
// $this->app->erp->MenuEintrag("index.php?module=lieferschein&action=abschicken&id=$id","Abschicken / Protokoll");
|
|
||||||
// $this->app->erp->MenuEintrag("index.php?module=lieferschein&action=protokoll&id=$id","Protokoll");
|
|
||||||
$this->app->erp->MenuEintrag("index.php?module=lieferschein&action=list","Zurück zur Übersicht");
|
$this->app->erp->MenuEintrag("index.php?module=lieferschein&action=list","Zurück zur Übersicht");
|
||||||
|
|
||||||
$this->app->erp->RunMenuHook('lieferschein');
|
$this->app->erp->RunMenuHook('lieferschein');
|
||||||
@ -1863,15 +1860,25 @@ class Lieferschein extends GenLieferschein
|
|||||||
if($this->app->erp->InnendienstAendern("lieferschein",$id,$cmd,$sid))
|
if($this->app->erp->InnendienstAendern("lieferschein",$id,$cmd,$sid))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
$seriennummern = $this->app->erp->SeriennummernCheckLieferschein(
|
||||||
|
lieferschein_id: $id,
|
||||||
|
ignore_date: true,
|
||||||
|
only_missing: false,
|
||||||
|
group_lieferschein: true);
|
||||||
|
|
||||||
|
$seriennummern_aktiv = !empty($seriennummern);
|
||||||
|
|
||||||
|
$seriennummern_check_result = $this->app->erp->SeriennummernCheckLieferscheinWarnung($id, false);
|
||||||
|
|
||||||
|
$seriennummern_ok = empty($seriennummern_check_result);
|
||||||
|
|
||||||
if($this->app->erp->DisableModul("lieferschein",$id))
|
if($this->app->erp->DisableModul("lieferschein",$id))
|
||||||
{
|
{
|
||||||
//$this->app->erp->MenuEintrag("index.php?module=auftrag&action=list","Zurück zur Übersicht");
|
$this->LieferscheinMenu(seriennummern_zeigen: !empty($seriennummern), paketmarke_zeigen: false);
|
||||||
$this->LieferscheinMenu();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->app->YUI->AARLGPositionen();
|
$this->app->YUI->AARLGPositionen();
|
||||||
|
|
||||||
$this->app->erp->CheckVertrieb($id,"lieferschein");
|
$this->app->erp->CheckVertrieb($id,"lieferschein");
|
||||||
@ -1948,20 +1955,19 @@ class Lieferschein extends GenLieferschein
|
|||||||
$this->app->erp->PDFArchivieren('lieferschein', $id, true);
|
$this->app->erp->PDFArchivieren('lieferschein', $id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($status != "angelegt" && $status != "angelegta" && $status != "a")
|
if($status != "angelegt" && $status != "angelegta" && $status != "a" && $seriennummern_ok)
|
||||||
{
|
{
|
||||||
$Brief = new Briefpapier($this->app);
|
$Brief = new Briefpapier($this->app);
|
||||||
if($Brief->zuArchivieren($id, "lieferschein"))
|
if ($Brief->zuArchivieren($id, "lieferschein"))
|
||||||
{
|
{
|
||||||
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Der Lieferschein ist noch nicht archiviert! Bitte versenden oder manuell archivieren.
|
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Der Lieferschein ist noch nicht archiviert! Bitte versenden oder manuell archivieren.<input type=\"button\" onclick=\"if(!confirm('Soll das Dokument archiviert werden?')) return false;else window.location.href='index.php?module=lieferschein&action=archivierepdf&id=$id';\" value=\"Manuell archivieren\" /> <input type=\"button\" value=\"Dokument versenden\" onclick=\"DokumentAbschicken('lieferschein',$id)\"></div>");
|
||||||
<input type=\"button\" onclick=\"if(!confirm('Soll das Dokument archiviert werden?')) return false;else window.location.href='index.php?module=lieferschein&action=archivierepdf&id=$id';\" value=\"Manuell archivieren\" /> <input type=\"button\" value=\"Dokument versenden\" onclick=\"DokumentAbschicken('lieferschein',$id)\"></div>");
|
} elseif(!$this->app->DB->Select("SELECT versendet FROM lieferschein WHERE id = '$id' LIMIT 1"))
|
||||||
}elseif(!$this->app->DB->Select("SELECT versendet FROM lieferschein WHERE id = '$id' LIMIT 1"))
|
|
||||||
{
|
{
|
||||||
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Der Lieferschein wurde noch nicht versendet! <input type=\"button\" value=\"Dokument versenden\" onclick=\"DokumentAbschicken('lieferschein',$id)\"></div>");
|
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Der Lieferschein wurde noch nicht versendet! <input type=\"button\" value=\"Dokument versenden\" onclick=\"DokumentAbschicken('lieferschein',$id)\"></div>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($schreibschutz!="1")// && $this->app->erp->RechteVorhanden("lieferschein","schreibschutz"))
|
if($schreibschutz!="1")
|
||||||
{
|
{
|
||||||
$this->app->erp->AnsprechpartnerButton($adresse);
|
$this->app->erp->AnsprechpartnerButton($adresse);
|
||||||
$this->app->erp->LieferadresseButton($adresse);
|
$this->app->erp->LieferadresseButton($adresse);
|
||||||
@ -1970,11 +1976,8 @@ class Lieferschein extends GenLieferschein
|
|||||||
$this->app->erp->LieferscheinNeuberechnen($id);
|
$this->app->erp->LieferscheinNeuberechnen($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//$this->LieferscheinMiniDetail(MINIDETAIL,false);
|
|
||||||
$this->app->Tpl->Set('ICONMENU',$this->LieferscheinIconMenu($id));
|
$this->app->Tpl->Set('ICONMENU',$this->LieferscheinIconMenu($id));
|
||||||
$this->app->Tpl->Set('ICONMENU2',$this->LieferscheinIconMenu($id,2));
|
//$this->app->Tpl->Set('ICONMENU2',$this->LieferscheinIconMenu($id,2));
|
||||||
|
|
||||||
|
|
||||||
if($nummer!="")
|
if($nummer!="")
|
||||||
{
|
{
|
||||||
@ -1988,7 +1991,6 @@ class Lieferschein extends GenLieferschein
|
|||||||
if($schreibschutz=="1" && $this->app->erp->RechteVorhanden("lieferschein","schreibschutz"))
|
if($schreibschutz=="1" && $this->app->erp->RechteVorhanden("lieferschein","schreibschutz"))
|
||||||
{
|
{
|
||||||
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Dieser Lieferschein ist schreibgeschützt und darf daher nicht mehr bearbeitet werden! <input type=\"button\" value=\"Schreibschutz entfernen\" onclick=\"if(!confirm('Soll der Schreibschutz für diesen Lieferschein wirklich entfernt werden?')) return false;else window.location.href='index.php?module=lieferschein&action=schreibschutz&id=$id';\"></div>");
|
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Dieser Lieferschein ist schreibgeschützt und darf daher nicht mehr bearbeitet werden! <input type=\"button\" value=\"Schreibschutz entfernen\" onclick=\"if(!confirm('Soll der Schreibschutz für diesen Lieferschein wirklich entfernt werden?')) return false;else window.location.href='index.php?module=lieferschein&action=schreibschutz&id=$id';\"></div>");
|
||||||
// $this->app->erp->CommonReadonly();
|
|
||||||
}
|
}
|
||||||
if($schreibschutz=="1")
|
if($schreibschutz=="1")
|
||||||
$this->app->erp->CommonReadonly();
|
$this->app->erp->CommonReadonly();
|
||||||
@ -2002,13 +2004,11 @@ class Lieferschein extends GenLieferschein
|
|||||||
<input type="button" value="übernehmen" onclick="if(!confirm(\'Soll der neue Kunde wirklich übernommen werden? Es werden alle Felder überladen.\')) return false;else document.getElementById(\'uebernehmen\').value=1; document.getElementById(\'eprooform\').submit();"/><input type="hidden" id="uebernehmen" name="uebernehmen" value="0">
|
<input type="button" value="übernehmen" onclick="if(!confirm(\'Soll der neue Kunde wirklich übernommen werden? Es werden alle Felder überladen.\')) return false;else document.getElementById(\'uebernehmen\').value=1; document.getElementById(\'eprooform\').submit();"/><input type="hidden" id="uebernehmen" name="uebernehmen" value="0">
|
||||||
');
|
');
|
||||||
|
|
||||||
|
|
||||||
$this->app->Tpl->Set('BUTTON_UEBERNEHMEN2', '
|
$this->app->Tpl->Set('BUTTON_UEBERNEHMEN2', '
|
||||||
<input type="button" value="übernehmen" onclick="if(!confirm(\'Soll der neue Lieferant wirklich übernommen werden? Es werden alle Felder überladen.\')) return false;else document.getElementById(\'uebernehmen2\').value=1; document.getElementById(\'eprooform\').submit();"/><input type="hidden" id="uebernehmen2" name="uebernehmen2" value="0">
|
<input type="button" value="übernehmen" onclick="if(!confirm(\'Soll der neue Lieferant wirklich übernommen werden? Es werden alle Felder überladen.\')) return false;else document.getElementById(\'uebernehmen2\').value=1; document.getElementById(\'eprooform\').submit();"/><input type="hidden" id="uebernehmen2" name="uebernehmen2" value="0">
|
||||||
');
|
');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// immer wenn sich der lieferant genändert hat standartwerte setzen
|
// immer wenn sich der lieferant genändert hat standartwerte setzen
|
||||||
if($this->app->Secure->GetPOST("adresse")!="")
|
if($this->app->Secure->GetPOST("adresse")!="")
|
||||||
{
|
{
|
||||||
@ -2043,10 +2043,8 @@ class Lieferschein extends GenLieferschein
|
|||||||
header("Location: index.php?module=lieferschein&action=edit&id=$id");
|
header("Location: index.php?module=lieferschein&action=edit&id=$id");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// easy table mit arbeitspaketen YUI als template
|
// easy table mit arbeitspaketen YUI als template
|
||||||
$table = new EasyTable($this->app);
|
$table = new EasyTable($this->app);
|
||||||
$table->Query("SELECT nummer as Nummer, bezeichnung, menge,vpe as VPE
|
$table->Query("SELECT nummer as Nummer, bezeichnung, menge,vpe as VPE
|
||||||
@ -2076,7 +2074,8 @@ class Lieferschein extends GenLieferschein
|
|||||||
header("Location: index.php?module=lieferschein&action=positionen&id=$id");
|
header("Location: index.php?module=lieferschein&action=positionen&id=$id");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$this->LieferscheinMenu();
|
|
||||||
|
$this->LieferscheinMenu(seriennummern_zeigen: $seriennummern_aktiv, paketmarke_zeigen: $seriennummern_ok);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2220,8 +2219,6 @@ class Lieferschein extends GenLieferschein
|
|||||||
$this->app->YUI->DateiUpload('PAGE',"Lieferschein",$id);
|
$this->app->YUI->DateiUpload('PAGE',"Lieferschein",$id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function LieferscheinList()
|
function LieferscheinList()
|
||||||
{
|
{
|
||||||
if($this->app->Secure->GetPOST('ausfuehren') && $this->app->erp->RechteVorhanden('lieferschein', 'edit'))
|
if($this->app->Secure->GetPOST('ausfuehren') && $this->app->erp->RechteVorhanden('lieferschein', 'edit'))
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user