mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17: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` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`seriennummer` varchar(255) NOT NULL,
|
||||
`adresse` int(11) NOT NULL,
|
||||
`artikel` int(11) 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,
|
||||
`logdatei` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
|
@ -365,9 +365,13 @@ class TemplateParser {
|
||||
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){
|
||||
|
@ -91423,12 +91423,12 @@
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "adresse",
|
||||
"Type": "int(11)",
|
||||
"Field": "datum",
|
||||
"Type": "datetime",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": null,
|
||||
"Default": "current_timestamp()",
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"Comment": ""
|
||||
@ -91456,34 +91456,12 @@
|
||||
"Comment": ""
|
||||
},
|
||||
{
|
||||
"Field": "lieferung",
|
||||
"Type": "date",
|
||||
"Field": "eingelagert",
|
||||
"Type": "int(1)",
|
||||
"Collation": null,
|
||||
"Null": "NO",
|
||||
"Key": "",
|
||||
"Default": null,
|
||||
"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,
|
||||
"Default": 0,
|
||||
"Extra": "",
|
||||
"Privileges": "select,insert,update,references",
|
||||
"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",
|
||||
"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->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
|
||||
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->SeriennummernCheckLieferscheinWarnung($lieferschein, true);
|
||||
$this->LieferscheinProtokoll($lieferschein,"Lieferschein ausgelagert");
|
||||
}
|
||||
}
|
||||
|
@ -307,6 +307,36 @@ class Briefpapier extends SuperFPDF {
|
||||
|
||||
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;
|
||||
$auftrag_position_id = 0;
|
||||
$lieferschein = 0;
|
||||
@ -560,6 +590,7 @@ class Briefpapier extends SuperFPDF {
|
||||
return implode("\r\n",$tmp_string);
|
||||
}
|
||||
return '';
|
||||
*/
|
||||
}
|
||||
|
||||
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) {
|
||||
$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;
|
||||
case "seriennummerverfuegbar":
|
||||
$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;
|
||||
for($i = 0; $i < $carr; $i++) {
|
||||
$newarr[] = $arr[$i]['seriennummer'];
|
||||
|
@ -17,22 +17,47 @@
|
||||
<div class="col-xs-14 col-md-6 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<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">
|
||||
<tr>
|
||||
<tr [ARTIKEL_HIDDEN]>
|
||||
<td>
|
||||
{|Lagermenge|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" value="[ANZLAGER]" size="40" disabled>
|
||||
<input type="text" value="[ANZLAGER]" size="40" disabled />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr [ARTIKEL_HIDDEN]>
|
||||
<td>
|
||||
{|Seriennummern verfügbar|}:
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -40,99 +65,83 @@
|
||||
{|Seriennummern fehlen|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" value="[ANZFEHLT]" size="40" disabled>
|
||||
<input type="text" value="[ANZFEHLT]" size="40" disabled />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr [ARTIKEL_HIDDEN] [EINGABE_HIDDEN]>
|
||||
<td>
|
||||
{|Seriennummer scannen|}:
|
||||
</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>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-14 col-md-6 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<tr [LIEFERSCHEIN_HIDDEN] [EINGABE_HIDDEN]>
|
||||
<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>
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<tr>
|
||||
<td>
|
||||
</fieldset>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr [EINGABE_HIDDEN]>
|
||||
<td [ARTIKEL_HIDDEN]>
|
||||
{|Letzte Seriennummer|}:
|
||||
</td>
|
||||
<td [LIEFERSCHEIN_HIDDEN]>
|
||||
{|Nächste Seriennummer|}:
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr [EINGABE_HIDDEN]>
|
||||
<td>
|
||||
{|Präfix|}:
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr [EINGABE_HIDDEN]>
|
||||
<td>
|
||||
{|Start|}:
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr [EINGABE_HIDDEN]>
|
||||
<td>
|
||||
{|Postfix|}:
|
||||
</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr [EINGABE_HIDDEN]>
|
||||
<td>
|
||||
{|Anzahl|}:
|
||||
</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>
|
||||
</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>
|
||||
<tr [EINGABE_HIDDEN]>
|
||||
<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>
|
||||
<legend>{|Liste der gewählten Seriennummern|}</legend>
|
||||
</fieldset>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr [EINGABE_HIDDEN]>
|
||||
<td>
|
||||
{|Seriennummern|}:
|
||||
</td>
|
||||
@ -142,17 +151,37 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<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">
|
||||
<table width="100%" border="0" class="mkTableFormular" [EINGABE_HIDDEN]>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
|
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>
|
||||
<td>
|
||||
{|Seriennummern verfügbar|}:
|
||||
{|Seriennummern eingelagert|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" value="[ANZVORHANDEN]" size="40" disabled>
|
||||
@ -68,7 +68,17 @@
|
||||
</span>
|
||||
</label>
|
||||
<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>
|
||||
</li>
|
||||
<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");
|
||||
$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>";
|
||||
}
|
||||
|
||||
$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>";
|
||||
}
|
||||
|
||||
$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_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'");
|
||||
$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'");
|
||||
@ -695,8 +697,9 @@ class Lieferschein extends GenLieferschein
|
||||
}
|
||||
|
||||
$optionumlagern = "<option value=\"umlagern\">Lieferschein umlagern</option>";
|
||||
$abschicken = "<option value=\"abschicken\">Lieferschein abschicken</option>";
|
||||
|
||||
if (empty($seriennummern_check_result)) {
|
||||
$abschicken = "<option value=\"abschicken\">Lieferschein abschicken</option>";
|
||||
if($status!="angelegt" && $lieferantenretoure!="1")
|
||||
{
|
||||
$alsrechnung = "<option value=\"rechnung\">als Rechnung weiterführen</option>";
|
||||
@ -706,7 +709,7 @@ class Lieferschein extends GenLieferschein
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($this->app->erp->RechteVorhanden('belegeimport', 'belegcsvexport'))
|
||||
{
|
||||
@ -829,7 +832,6 @@ class Lieferschein extends GenLieferschein
|
||||
$lieferantenretoureinfo = $auftragArr[0]['lieferantenretoureinfo'];
|
||||
}
|
||||
|
||||
|
||||
$this->app->Tpl->Set('LIEFERANTENRETOUREINFO',$lieferantenretoureinfo);
|
||||
|
||||
if($lieferantenretoure!='1') {
|
||||
@ -849,7 +851,6 @@ class Lieferschein extends GenLieferschein
|
||||
$this->app->Tpl->Set('ZAHLWEISE',$auftragArr[0]['zahlungsweise']);
|
||||
$this->app->Tpl->Set('STATUS',$auftragArr[0]['status']);
|
||||
|
||||
|
||||
if($auftragArr[0]['auftragid'] > 0){
|
||||
$orderRow = $this->app->DB->SelectRow(
|
||||
"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','-');
|
||||
}
|
||||
|
||||
|
||||
if($auftragArr[0]['auftragid'] > 0){
|
||||
$rechnung = $this->app->DB->SelectArr(
|
||||
($auftragArr[0]['auftragid']?
|
||||
@ -915,9 +915,7 @@ class Lieferschein extends GenLieferschein
|
||||
INNER JOIN lieferschein_position lp ON lp.id = s.lieferschein_position_id
|
||||
WHERE lp.lieferschein='$id'
|
||||
");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$crechnung = !empty($rechnung)?count($rechnung):0;
|
||||
@ -939,14 +937,13 @@ class Lieferschein extends GenLieferschein
|
||||
else
|
||||
$this->app->Tpl->Set('STEUER',"Export");
|
||||
|
||||
|
||||
if($menu)
|
||||
{
|
||||
$menu = $this->LieferscheinIconMenu($id);
|
||||
$this->app->Tpl->Set('MENU',$menu);
|
||||
}
|
||||
// ARTIKEL
|
||||
|
||||
// ARTIKEL
|
||||
$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");
|
||||
@ -1313,8 +1310,6 @@ class Lieferschein extends GenLieferschein
|
||||
$this->app->erp->DokumentAbschicken();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function LieferscheinDelete($id = null)
|
||||
{
|
||||
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");
|
||||
|
||||
@ -1727,24 +1722,26 @@ class Lieferschein extends GenLieferschein
|
||||
// $this->app->Tpl->Set(KURZUEBERSCHRIFT,"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->Tpl->Add(TABS,"<li><a href=\"index.php?module=lieferschein&action=positionen&id=$id\">Positionen</a></li>");
|
||||
|
||||
// status bestell
|
||||
$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")
|
||||
{
|
||||
$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->RunMenuHook('lieferschein');
|
||||
@ -1863,15 +1860,25 @@ class Lieferschein extends GenLieferschein
|
||||
if($this->app->erp->InnendienstAendern("lieferschein",$id,$cmd,$sid))
|
||||
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))
|
||||
{
|
||||
//$this->app->erp->MenuEintrag("index.php?module=auftrag&action=list","Zurück zur Übersicht");
|
||||
$this->LieferscheinMenu();
|
||||
$this->LieferscheinMenu(seriennummern_zeigen: !empty($seriennummern), paketmarke_zeigen: false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->app->YUI->AARLGPositionen();
|
||||
|
||||
$this->app->erp->CheckVertrieb($id,"lieferschein");
|
||||
@ -1948,20 +1955,19 @@ class Lieferschein extends GenLieferschein
|
||||
$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);
|
||||
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.
|
||||
<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"))
|
||||
$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>");
|
||||
} 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>");
|
||||
}
|
||||
}
|
||||
|
||||
if($schreibschutz!="1")// && $this->app->erp->RechteVorhanden("lieferschein","schreibschutz"))
|
||||
if($schreibschutz!="1")
|
||||
{
|
||||
$this->app->erp->AnsprechpartnerButton($adresse);
|
||||
$this->app->erp->LieferadresseButton($adresse);
|
||||
@ -1970,11 +1976,8 @@ class Lieferschein extends GenLieferschein
|
||||
$this->app->erp->LieferscheinNeuberechnen($id);
|
||||
}
|
||||
|
||||
|
||||
//$this->LieferscheinMiniDetail(MINIDETAIL,false);
|
||||
$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!="")
|
||||
{
|
||||
@ -1988,7 +1991,6 @@ class Lieferschein extends GenLieferschein
|
||||
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->erp->CommonReadonly();
|
||||
}
|
||||
if($schreibschutz=="1")
|
||||
$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">
|
||||
');
|
||||
|
||||
|
||||
$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">
|
||||
');
|
||||
}
|
||||
|
||||
|
||||
// immer wenn sich der lieferant genändert hat standartwerte setzen
|
||||
if($this->app->Secure->GetPOST("adresse")!="")
|
||||
{
|
||||
@ -2043,10 +2043,8 @@ class Lieferschein extends GenLieferschein
|
||||
header("Location: index.php?module=lieferschein&action=edit&id=$id");
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// easy table mit arbeitspaketen YUI als template
|
||||
$table = new EasyTable($this->app);
|
||||
$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");
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function LieferscheinList()
|
||||
{
|
||||
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