mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 04:27:14 +01:00
wareneingang datum_abgeschlossen, bearbeiter_abgeschlossen, manuell mit menge
This commit is contained in:
parent
6a6aab4304
commit
3a023592e9
@ -64483,6 +64483,17 @@
|
|||||||
"Privileges": "select,insert,update,references",
|
"Privileges": "select,insert,update,references",
|
||||||
"Comment": ""
|
"Comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Field": "datum_abgeschlossen",
|
||||||
|
"Type": "datetime",
|
||||||
|
"Collation": null,
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": null,
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Field": "verpackungszustand",
|
"Field": "verpackungszustand",
|
||||||
"Type": "int(11)",
|
"Type": "int(11)",
|
||||||
@ -64538,6 +64549,17 @@
|
|||||||
"Privileges": "select,insert,update,references",
|
"Privileges": "select,insert,update,references",
|
||||||
"Comment": ""
|
"Comment": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Field": "bearbeiter_abgeschlossen",
|
||||||
|
"Type": "varchar(255)",
|
||||||
|
"Collation": "utf8mb3_general_ci",
|
||||||
|
"Null": "NO",
|
||||||
|
"Key": "",
|
||||||
|
"Default": null,
|
||||||
|
"Extra": "",
|
||||||
|
"Privileges": "select,insert,update,references",
|
||||||
|
"Comment": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Field": "projekt",
|
"Field": "projekt",
|
||||||
"Type": "int(11)",
|
"Type": "int(11)",
|
||||||
|
@ -6,12 +6,14 @@
|
|||||||
<table height="80" width="100%"><tr><td>
|
<table height="80" width="100%"><tr><td>
|
||||||
<fieldset class="usersave"><legend> Filter</legend>
|
<fieldset class="usersave"><legend> Filter</legend>
|
||||||
<center>
|
<center>
|
||||||
|
<form method="POST">
|
||||||
<table width="100%" cellspacing="5">
|
<table width="100%" cellspacing="5">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="33%"><input type="checkbox" id="eigene" title="nur Artikel vom Lieferant anzeigen"> <label for="eigene">{|Nur Artikel vom Lieferant anzeigen|}</label></td>
|
<td width="33%"><input type="checkbox" id="eigene" title="nur Artikel vom Lieferant anzeigen"> <label for="eigene">{|Nur Artikel vom Lieferant anzeigen|}</label></td>
|
||||||
<td width="33%">{|Scannen|}: <form method="POST"><input type="text" size="40" name="artikel" autofocus id="artikel" /></form></td>
|
<td width="33%">{|Scannen|}: <input type="text" size="40" name="artikel" autofocus id="artikel" /></td>
|
||||||
<td width="33%"></td>
|
<td width="33%">{|Menge|}: <input type="number" size="40" name="menge" id="menge" value="1"/></td>
|
||||||
</tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
</center>
|
</center>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
|
|
||||||
<table height="200" border="0" width="450">
|
<table height="200" border="0" width="450">
|
||||||
<tr valign="top"><td><b>Artikel:</b></td><td><u>[NAME]</u></td></tr>
|
<tr valign="top"><td><b>Artikel:</b></td><td><u>[NAME]</u></td></tr>
|
||||||
|
<tr valign="top"><td><b>Menge:</b></td><td>[MENGE]</td></tr>
|
||||||
<!--<tr valign="top"><td>Lieferant:</td><td>[LIEFERANT]</td></tr> -->
|
<!--<tr valign="top"><td>Lieferant:</td><td>[LIEFERANT]</td></tr> -->
|
||||||
<tr valign="top"><td><br></td><td align="center"></td></tr>
|
<tr valign="top"><td><br></td><td align="center"></td></tr>
|
||||||
<tr valign="top"><td><b>Bemerkung:</b></td><td><textarea cols="35" rows="2" name="bemerkung">[BEMERKUNG]</textarea>
|
<tr valign="top"><td><b>Bemerkung:</b></td><td><textarea cols="35" rows="2" name="bemerkung">[BEMERKUNG]</textarea>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr valign="top"><td><br></td><td align="center"></td></tr>
|
<tr valign="top"><td><br></td><td align="center"></td></tr>
|
||||||
<tr valign="top"><td nowrap><b>Anmerkung:</b></td><td>Artikel zu Mitarbeiter [MITARBEITER] bringen
|
|
||||||
[DISPLAY_WARENEINGANG_RMA_HOOK1]
|
[DISPLAY_WARENEINGANG_RMA_HOOK1]
|
||||||
<tr valign="top"><td><br></td><td align="center"><input type="submit" name="submit" value="Speichern" /> <input type="button" onclick="window.location.href='index.php?module=wareneingang&action=distriinhalt&id=[ID]'" value="Abbrechen" /></td></tr>
|
<tr valign="top"><td><br></td><td align="center"><input type="submit" name="submit" value="Speichern" /> <input type="button" onclick="window.location.href='index.php?module=wareneingang&action=distriinhalt&id=[ID]'" value="Abbrechen" /></td></tr>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{|[LEGENDE]|}</legend>
|
<legend>{|[LEGENDE]|}</legend>
|
||||||
<table>
|
<table>
|
||||||
|
<tr><td>{|Status|}:</td><td><input type=text size="40" value="[STATUS]" disabled></td></tr>
|
||||||
|
<tr [ABGESCHLOSSENHIDDEN]><td></td><td><i>Abgeschlossen am [DATUM_ABGESCHLOSSEN] durch [BEARBEITER_ABGESCHLOSSEN]</i></td></tr>
|
||||||
<tr><td>{|Lieferschein-Nr.|}:</td><td><input type=text size="40" name="lsnr" value=[LSNR]></td></tr>
|
<tr><td>{|Lieferschein-Nr.|}:</td><td><input type=text size="40" name="lsnr" value=[LSNR]></td></tr>
|
||||||
<tr><td>{|Rechnung-Nr.|}:</td><td><input type=text size="40" name="renr" value=[RENR]></td></tr>
|
<tr><td>{|Rechnung-Nr.|}:</td><td><input type=text size="40" name="renr" value=[RENR]></td></tr>
|
||||||
<tr><td>{|Bemerkung|}:</td><td><textarea rows="5" cols="40" name="bemerkung">[BEMERKUNG]</textarea></td></tr>
|
<tr><td>{|Bemerkung|}:</td><td><textarea rows="5" cols="40" name="bemerkung">[BEMERKUNG]</textarea></td></tr>
|
||||||
@ -64,7 +66,7 @@
|
|||||||
<button name="submit" class="ui-button-icon" style="width:100%;" value="buchen">{|Buchen|}</button>
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="buchen">{|Buchen|}</button>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
[ISLIEFERANTENDE]
|
[ISLIEFERANTENDE]
|
||||||
<tr><td>
|
<tr [ABSCHLIESSENHIDDEN]><td>
|
||||||
<button name="submit" class="ui-button-icon" style="width:100%;" value="abschliessen">{|Abschließen|}</button>
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="abschliessen">{|Abschließen|}</button>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -962,22 +962,40 @@ class Wareneingang {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$heading = array('Lieferant-Art.-Nr.', 'Art.-Nummer', 'Bestellung', 'Beschreibung', 'Menge', 'Bemerkung', '');
|
$heading = array('Lieferant-Art.-Nr.', 'Art.-Nummer', 'Bestellung', 'Beschreibung', 'Menge', 'Bemerkung','Bearbeiter', '');
|
||||||
$width = array('5%', '5%', '5%', '30%', '5%', '5%', '45%');
|
$width = array( '5%', '5%', '5%', '30%', '5%', '15%', '5%', '30%');
|
||||||
|
|
||||||
$findcols = array('p.nummer', 'p.bestellbezug', 'p.name', 'p.menge', 'p.bemerkung');
|
$findcols = array('p.nummer', 'p.bestellbezug', 'p.name', 'p.menge', 'p.bemerkung','p.bearbeiter');
|
||||||
$searchsql = array('p.nummer', 'p.name', 'p.bemerkung');
|
$searchsql = array('p.nummer', 'p.name', 'p.bemerkung');
|
||||||
|
|
||||||
$defaultorder = 1;
|
$defaultorder = 1;
|
||||||
$defaultorderdesc = 0;
|
$defaultorderdesc = 0;
|
||||||
|
|
||||||
$sql = "SELECT SQL_CALC_FOUND_ROWS p.nummer,p.lieferantnummer, p.nummer, p.bestellbezug, p.name, p.menge, p.bemerkung from
|
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||||
(SELECT bestellung.belegnr as bestellbezug, bestellung_position.bestellnummer as lieferantnummer ,artikel.nummer as nummer, artikel.name_de as name, " . $this->app->erp->FormatMenge("paketdistribution.menge") . " as menge, paketdistribution.bemerkung
|
p.nummer,
|
||||||
|
p.lieferantnummer,
|
||||||
|
p.nummer,
|
||||||
|
p.bestellbezug,
|
||||||
|
p.name,
|
||||||
|
p.menge,
|
||||||
|
p.bemerkung,
|
||||||
|
p.bearbeiter
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
bestellung.belegnr as bestellbezug,
|
||||||
|
bestellung_position.bestellnummer as lieferantnummer,
|
||||||
|
artikel.nummer as nummer,
|
||||||
|
artikel.name_de as name,
|
||||||
|
" . $this->app->erp->FormatMenge("paketdistribution.menge") . " as menge,
|
||||||
|
paketdistribution.bemerkung,
|
||||||
|
paketdistribution.bearbeiter
|
||||||
FROM paketdistribution
|
FROM paketdistribution
|
||||||
INNER JOIN artikel ON artikel.id = paketdistribution.artikel
|
INNER JOIN artikel ON artikel.id = paketdistribution.artikel
|
||||||
LEFT JOIN bestellung_position ON bestellung_position = bestellung_position.id
|
LEFT JOIN bestellung_position ON bestellung_position = bestellung_position.id
|
||||||
LEFT JOIN bestellung on bestellung_position.bestellung = bestellung.id
|
LEFT JOIN bestellung on bestellung_position.bestellung = bestellung.id
|
||||||
where paketannahme = $id AND vorlaeufig IS NULL) as p";
|
WHERE paketannahme = $id AND vorlaeufig IS NULL
|
||||||
|
) AS p";
|
||||||
|
|
||||||
$where = "";
|
$where = "";
|
||||||
$count = "SELECT count(DISTINCT id) FROM paketdistribution p WHERE paketannahme = $id AND vorlaeufig IS NULL";
|
$count = "SELECT count(DISTINCT id) FROM paketdistribution p WHERE paketannahme = $id AND vorlaeufig IS NULL";
|
||||||
@ -1184,7 +1202,7 @@ class Wareneingang {
|
|||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
$action = $this->app->Secure->GetGET('action');
|
$action = $this->app->Secure->GetGET('action');
|
||||||
$this->app->Tpl->Set('ID', $id);
|
$this->app->Tpl->Set('ID', $id);
|
||||||
$this->app->Tpl->Add('KURZUEBERSCHRIFT', ' Paketannahme');
|
$this->app->Tpl->Add('KURZUEBERSCHRIFT', ' Paketannahme / Leistungserfassung');
|
||||||
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=paketannahme', 'Neu');
|
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=paketannahme', 'Neu');
|
||||||
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=list', 'Übersicht');
|
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=list', 'Übersicht');
|
||||||
$this->app->erp->RunMenuHook('wareneingangpaket');
|
$this->app->erp->RunMenuHook('wareneingangpaket');
|
||||||
@ -1901,7 +1919,7 @@ class Wareneingang {
|
|||||||
break;
|
break;
|
||||||
case 'abschliessen':
|
case 'abschliessen':
|
||||||
// Save header and finish
|
// Save header and finish
|
||||||
$sql = "UPDATE paketannahme SET status='abgeschlossen' WHERE id='$id'";
|
$sql = "UPDATE paketannahme SET status='abgeschlossen', datum_abgeschlossen = NOW(), bearbeiter_abgeschlossen = '".$this->app->User->GetName()."' WHERE id='$id'";
|
||||||
$this->app->DB->Update($sql);
|
$this->app->DB->Update($sql);
|
||||||
|
|
||||||
$this->app->erp->RunHook('wareneinang_paketannahme_abschliessen', 1, $id);
|
$this->app->erp->RunHook('wareneinang_paketannahme_abschliessen', 1, $id);
|
||||||
@ -1974,7 +1992,8 @@ class Wareneingang {
|
|||||||
} */ // Submit
|
} */ // Submit
|
||||||
|
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'SELECT `adresse`,%s FROM `paketannahme` WHERE `id` = %d LIMIT 1',
|
'SELECT `adresse`,status,%s,bearbeiter_abgeschlossen,%s FROM `paketannahme` WHERE `id` = %d LIMIT 1',
|
||||||
|
$this->app->erp->FormatDate('datum_abgeschlossen', 'datum_abgeschlossen'),
|
||||||
$this->app->erp->FormatDate('datum', 'datum'),
|
$this->app->erp->FormatDate('datum', 'datum'),
|
||||||
$id
|
$id
|
||||||
);
|
);
|
||||||
@ -1982,7 +2001,10 @@ class Wareneingang {
|
|||||||
$paketannahme = $this->app->DB->SelectArr($sql)[0];
|
$paketannahme = $this->app->DB->SelectArr($sql)[0];
|
||||||
|
|
||||||
$adresse = $paketannahme['adresse'];
|
$adresse = $paketannahme['adresse'];
|
||||||
|
$status = $paketannahme['status'];
|
||||||
$datum = $paketannahme['datum'];
|
$datum = $paketannahme['datum'];
|
||||||
|
$datum_abgeschlossen = $paketannahme['datum_abgeschlossen'];
|
||||||
|
$bearbeiter_abgeschlossen = $paketannahme['bearbeiter_abgeschlossen'];
|
||||||
|
|
||||||
$addressRow = empty($adresse) ? null : $this->app->DB->SelectRow(
|
$addressRow = empty($adresse) ? null : $this->app->DB->SelectRow(
|
||||||
sprintf(
|
sprintf(
|
||||||
@ -2008,7 +2030,7 @@ class Wareneingang {
|
|||||||
//$this->app->Tpl->Set('TAB1START','<div id=\"tabs-1\">');
|
//$this->app->Tpl->Set('TAB1START','<div id=\"tabs-1\">');
|
||||||
//$this->app->Tpl->Set('TAB1ENDE','</div>');
|
//$this->app->Tpl->Set('TAB1ENDE','</div>');
|
||||||
|
|
||||||
$this->app->Tpl->Add('TAB1', "<h1>Offene Artikel aus Bestellungen bei $name:</h1>");
|
$this->app->Tpl->Add('TAB1', "<legend>Offene Artikel aus Bestellungen bei $name:</legend>");
|
||||||
$this->app->YUI->TableSearch('TAB1', 'wareneingang_lieferant', 'show', '', '', basename(__FILE__), __CLASS__);
|
$this->app->YUI->TableSearch('TAB1', 'wareneingang_lieferant', 'show', '', '', basename(__FILE__), __CLASS__);
|
||||||
} else {
|
} else {
|
||||||
$this->app->Tpl->Set('ISLIEFERANTSTART', '<!--');
|
$this->app->Tpl->Set('ISLIEFERANTSTART', '<!--');
|
||||||
@ -2036,7 +2058,7 @@ class Wareneingang {
|
|||||||
$this->app->Tpl->Set('LEGENDE', "Paket <b>Nr.$id</b> vom $datum erfassen für Adresse '" . $addressRow['name'] . "':");
|
$this->app->Tpl->Set('LEGENDE', "Paket <b>Nr.$id</b> vom $datum erfassen für Adresse '" . $addressRow['name'] . "':");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->app->Tpl->Add('TAB1_SECOND', "<h1>Paketinhalt (eingebucht):</h1>");
|
$this->app->Tpl->Add('TAB1_SECOND', "<legend>Paketinhalt / Leistungserfassung (eingebucht):</legend>");
|
||||||
$this->app->YUI->TableSearch('TAB1_SECOND', 'paketdistribution_list', "show", "", "", basename(__FILE__), __CLASS__);
|
$this->app->YUI->TableSearch('TAB1_SECOND', 'paketdistribution_list', "show", "", "", basename(__FILE__), __CLASS__);
|
||||||
|
|
||||||
$this->app->erp->RunHook('wareneingang_distriinhalt', 1, $id);
|
$this->app->erp->RunHook('wareneingang_distriinhalt', 1, $id);
|
||||||
@ -2062,6 +2084,15 @@ class Wareneingang {
|
|||||||
|
|
||||||
$this->app->YUI->AutoComplete('ziellager', 'lagerplatz');
|
$this->app->YUI->AutoComplete('ziellager', 'lagerplatz');
|
||||||
$this->app->Tpl->Set('MESSAGE1',$msg);
|
$this->app->Tpl->Set('MESSAGE1',$msg);
|
||||||
|
$this->app->Tpl->Set('STATUS',$status);
|
||||||
|
|
||||||
|
if ($status == 'abgeschlossen') {
|
||||||
|
$this->app->Tpl->Set('ABSCHLIESSENHIDDEN','hidden');
|
||||||
|
$this->app->Tpl->Set('DATUM_ABGESCHLOSSEN',$datum_abgeschlossen);
|
||||||
|
$this->app->Tpl->Set('BEARBEITER_ABGESCHLOSSEN',$bearbeiter_abgeschlossen);
|
||||||
|
} else {
|
||||||
|
$this->app->Tpl->Set('ABGESCHLOSSENHIDDEN','hidden');
|
||||||
|
}
|
||||||
|
|
||||||
$this->app->Tpl->Parse('PAGE', 'wareneingang_paketinhalt.tpl');
|
$this->app->Tpl->Parse('PAGE', 'wareneingang_paketinhalt.tpl');
|
||||||
|
|
||||||
@ -2118,10 +2149,16 @@ class Wareneingang {
|
|||||||
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=distriinhalt&id=' . $id, 'Zurück zur Übersicht');
|
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=distriinhalt&id=' . $id, 'Zurück zur Übersicht');
|
||||||
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=manuellerfassen&id=' . $id, 'Artikel');
|
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=manuellerfassen&id=' . $id, 'Artikel');
|
||||||
$artikel = $this->app->Secure->GetPOST('artikel');
|
$artikel = $this->app->Secure->GetPOST('artikel');
|
||||||
|
$menge = $this->app->Secure->GetPOST('menge');
|
||||||
|
if (empty($menge)) {
|
||||||
|
$menge = 1;
|
||||||
|
}
|
||||||
|
$artikel = reset(explode(' ',$artikel));
|
||||||
|
|
||||||
if ($artikel) {
|
if ($artikel) {
|
||||||
$artikelid = $this->app->DB->Select("SELECT a.id FROM artikel a LEFT JOIN projekt pr ON a.projekt = pr.id WHERE (a.nummer = '" . $artikel . "' OR a.herstellernummer = '" . $artikel . "' OR a.ean = '" . $artikel . "') AND a.geloescht = 0 " . $this->app->erp->ProjektRechte() . " LIMIT 1");
|
$artikelid = $this->app->DB->Select("SELECT a.id FROM artikel a LEFT JOIN projekt pr ON a.projekt = pr.id WHERE (a.nummer = '" . $artikel . "' OR a.herstellernummer = '" . $artikel . "' OR a.ean = '" . $artikel . "') AND a.geloescht = 0 " . $this->app->erp->ProjektRechte() . " LIMIT 1");
|
||||||
if ($artikelid) {
|
if ($artikelid) {
|
||||||
$this->app->Location->execute('index.php?module=wareneingang&action=distrietiketten&id=' . (int) $id . '&pos=' . $artikelid . '%&menge=1&cmd=manuell');
|
$this->app->Location->execute('index.php?module=wareneingang&action=distrietiketten&id=' . (int) $id . '&pos=' . $artikelid . '%&menge='.$menge.'&cmd=manuell');
|
||||||
}
|
}
|
||||||
$this->app->Tpl->Add('MESSAGE', '<div class="error">{|Der Artikel wurde nicht gefunden|}</div>');
|
$this->app->Tpl->Add('MESSAGE', '<div class="error">{|Der Artikel wurde nicht gefunden|}</div>');
|
||||||
}
|
}
|
||||||
@ -2134,6 +2171,8 @@ class Wareneingang {
|
|||||||
$this->app->YUI->TableSearch('TAB1', 'wareneingangartikelmanuellerfassen', 'show', '', '', basename(__FILE__), __CLASS__);
|
$this->app->YUI->TableSearch('TAB1', 'wareneingangartikelmanuellerfassen', 'show', '', '', basename(__FILE__), __CLASS__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->app->YUI->AutoComplete('artikel','artikelnummer');
|
||||||
|
|
||||||
//$this->WareneingangPaketMenu();
|
//$this->WareneingangPaketMenu();
|
||||||
$this->app->Tpl->Parse('PAGE', 'wareneingang_manuellerfassen.tpl');
|
$this->app->Tpl->Parse('PAGE', 'wareneingang_manuellerfassen.tpl');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user