mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-26 06:30:29 +01:00
seriennummern rework checks
This commit is contained in:
parent
7776973a08
commit
046bfee9f9
@ -2821,20 +2821,36 @@ public function NavigationHooks(&$menu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function SeriennummernCheckWarnung(int $artikel_id) {
|
function SeriennummernCheckBenachrichtigung(int $artikel_id) {
|
||||||
$obj = $this->LoadModul('seriennummern');
|
$obj = $this->LoadModul('seriennummern');
|
||||||
$obj->seriennummern_check_and_message_stock_added($artikel_id);
|
return($obj->seriennummern_check_and_notification_stock_added($artikel_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
function SeriennummernCheckLieferscheinWarnung(int $lieferschein_id, bool $notification) {
|
function SeriennummernCheckLieferscheinBenachrichtigung(int $lieferschein_id) {
|
||||||
$obj = $this->LoadModul('seriennummern');
|
$obj = $this->LoadModul('seriennummern');
|
||||||
return($obj->seriennummern_check_and_message_delivery_note($lieferschein_id, $notification));
|
return($obj->seriennummern_check_and_notification_delivery_note($lieferschein_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function SeriennummernCheckLieferscheinWarnung(int $lieferschein_id) {
|
||||||
|
$obj = $this->LoadModul('seriennummern');
|
||||||
|
return($obj->seriennummern_check_and_message_delivery_notes($lieferschein_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
function SeriennummernCheckLieferschein($lieferschein_id = null, $ignore_date = false, $only_missing = true, $group_lieferschein = false) {
|
function SeriennummernCheckLieferschein($lieferschein_id = null, $ignore_date = false, $only_missing = true, $group_lieferschein = false) {
|
||||||
$obj = $this->LoadModul('seriennummern');
|
$obj = $this->LoadModul('seriennummern');
|
||||||
return ($obj->seriennummern_check_delivery_notes($lieferschein_id, $ignore_date, $only_missing, $group_lieferschein));
|
return ($obj->seriennummern_check_delivery_notes($lieferschein_id, $ignore_date, $only_missing, $group_lieferschein));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function SeriennummernCheckWareneingangWarnung(int $wareneingang_id) {
|
||||||
|
$obj = $this->LoadModul('seriennummern');
|
||||||
|
return($obj->seriennummern_check_and_message_incoming_goods($wareneingang_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function SeriennummernCheckWareneingang($wareneingang_id = null, $ignore_date = false, $only_missing = true, $group_wareneingang = false) {
|
||||||
|
$obj = $this->LoadModul('seriennummern');
|
||||||
|
return ($obj->seriennummern_check_incoming_goods($wareneingang_id, $ignore_date, $only_missing, $group_wareneingang));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// @refactor in Lager Modul
|
// @refactor in Lager Modul
|
||||||
function ArtikelAnzahlLagerPlatzMitSperre($artikel,$lager_platz)
|
function ArtikelAnzahlLagerPlatzMitSperre($artikel,$lager_platz)
|
||||||
@ -20479,7 +20495,7 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
|
|
||||||
$this->RunHook('LagerEinlagern_after',7, $artikel, $menge, $regal, $projekt, $grund, $doctype,$doctypeid);
|
$this->RunHook('LagerEinlagern_after',7, $artikel, $menge, $regal, $projekt, $grund, $doctype,$doctypeid);
|
||||||
|
|
||||||
$this->SeriennummernCheckWarnung($artikel);
|
$this->SeriennummernCheckBenachrichtigung($artikel);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CreateLagerPlatzInhaltVPE($artikel, $menge, $gewicht, $laenge, $breite, $hoehe, $menge2 = 0, $gewicht2 = 0, $laenge2 = 0, $breite2 = 0, $hoehe2 = 0)
|
function CreateLagerPlatzInhaltVPE($artikel, $menge, $gewicht, $laenge, $breite, $hoehe, $menge2 = 0, $gewicht2 = 0, $laenge2 = 0, $breite2 = 0, $hoehe2 = 0)
|
||||||
|
@ -5794,6 +5794,8 @@ Die Gesamtsumme stimmt nicht mehr mit ursprünglich festgelegten Betrag '.
|
|||||||
$nurRestmenge
|
$nurRestmenge
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->app->erp->SeriennummernCheckLieferscheinBenachrichtigung($lieferschein);
|
||||||
|
|
||||||
$sql = "SELECT id FROM kommissionierung k WHERE k.auftrag = '".$id."'";
|
$sql = "SELECT id FROM kommissionierung k WHERE k.auftrag = '".$id."'";
|
||||||
$vorkommissionierung = $this->app->DB->Select($sql);
|
$vorkommissionierung = $this->app->DB->Select($sql);
|
||||||
|
|
||||||
|
@ -1869,7 +1869,7 @@ class Lieferschein extends GenLieferschein
|
|||||||
|
|
||||||
$seriennummern_aktiv = !empty($seriennummern);
|
$seriennummern_aktiv = !empty($seriennummern);
|
||||||
|
|
||||||
$seriennummern_check_result = $this->app->erp->SeriennummernCheckLieferscheinWarnung($id, false);
|
$seriennummern_check_result = $this->app->erp->SeriennummernCheckLieferscheinWarnung($id);
|
||||||
|
|
||||||
$seriennummern_ok = empty($seriennummern_check_result);
|
$seriennummern_ok = empty($seriennummern_check_result);
|
||||||
|
|
||||||
|
@ -554,77 +554,7 @@ class Seriennummern {
|
|||||||
$this->app->erp->MenuEintrag("index.php?module=seriennummern&action=wareneingaenge_list", "Wareneingänge");
|
$this->app->erp->MenuEintrag("index.php?module=seriennummern&action=wareneingaenge_list", "Wareneingänge");
|
||||||
// $this->app->erp->MenuEintrag("index.php", "Zurück");
|
// $this->app->erp->MenuEintrag("index.php", "Zurück");
|
||||||
}
|
}
|
||||||
|
|
||||||
function seriennummern_check_and_message($artikel_id) {
|
|
||||||
$check_seriennummern = $this->seriennummern_check_serials($artikel_id);
|
|
||||||
|
|
||||||
if (!empty($check_seriennummern)) {
|
|
||||||
$artikel_minus_id_links = array();
|
|
||||||
$artikel_plus_id_links = array();
|
|
||||||
foreach ($check_seriennummern as $artikel_id) {
|
|
||||||
if ($artikel_id['menge_nummern'] < $artikel_id['menge_auf_lager']) {
|
|
||||||
$artikel_minus_id_links[] = '<a href="index.php?module=seriennummern&action=enter&artikel='.$artikel_id['id'].'">'.$artikel_id['nummer'].'</a>';
|
|
||||||
}
|
|
||||||
else if ($artikel_id['menge_nummern'] > $artikel_id['menge_auf_lager']) {
|
|
||||||
$artikel_plus_id_links[] = '<a href="index.php?module=seriennummern&action=nummern_list&artikel='.$artikel_id['id'].'">'.$artikel_id['nummer'].'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($artikel_minus_id_links)) {
|
|
||||||
$this->app->YUI->Message('warning','Seriennummern fehlen für Artikel: '.implode(', ',$artikel_minus_id_links));
|
|
||||||
}
|
|
||||||
if (!empty($artikel_plus_id_links)) {
|
|
||||||
$this->app->YUI->Message('warning','Seriennummern Überschuss für Artikel: '.implode(', ',$artikel_plus_id_links));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function seriennummern_delivery_note_check_and_message($lieferschein_id) {
|
|
||||||
|
|
||||||
$check_incoming_goods = $this->seriennummern_check_delivery_notes($lieferschein_id, group_lieferschein: true);
|
|
||||||
if (!empty($check_delivery_notes)) {
|
|
||||||
$lieferschein_minus_links = array();
|
|
||||||
$lieferschein_plus_links = array();
|
|
||||||
foreach ($check_delivery_notes as $check_delivery_note) {
|
|
||||||
if ($check_delivery_note['anzahl_nummern'] < $check_delivery_note['menge_lieferschein']) {
|
|
||||||
$lieferschein_minus_links[] = '<a href="index.php?module=seriennummern&action=enter&lieferschein='.$check_delivery_note['lieferschein'].'">'.$check_delivery_note['belegnr'].'</a>';
|
|
||||||
}
|
|
||||||
else if ($check_delivery_note['anzahl_nummern'] > $check_delivery_note['menge']) {
|
|
||||||
$lieferschein_plus_links[] = '<a href="index.php?module=seriennummern&action=nummern_list&lieferschein='.$check_delivery_note['lieferschein'].'">'.$check_delivery_note['belegnr'].'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($lieferschein_minus_links)) {
|
|
||||||
$this->app->YUI->Message('warning','Seriennummern fehlen für Lieferschein: '.implode(', ',$lieferschein_minus_links));
|
|
||||||
}
|
|
||||||
if (!empty($lieferschein_plus_links)) {
|
|
||||||
$this->app->YUI->Message('warning','Seriennummern Überschuss für Lieferschein: '.implode(', ',$lieferschein_plus_links));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function seriennummern_check_incoming_goods_and_message($wareneingang_id) {
|
|
||||||
|
|
||||||
$check_incoming_goods = $this->seriennummern_check_incoming_goods($wareneingang_id, group_wareneingang: true);
|
|
||||||
|
|
||||||
if (!empty($check_incoming_goods)) {
|
|
||||||
$wareneingang_minus_links = array();
|
|
||||||
$wareneingang_plus_links = array();
|
|
||||||
foreach ($check_incoming_goods as $check_delivery_note) {
|
|
||||||
if ($check_delivery_note['anzahl_nummern'] < $check_delivery_note['menge_wareneingang']) {
|
|
||||||
$wareneingang_minus_links[] = '<a href="index.php?module=seriennummern&action=enter&wareneingang='.$check_delivery_note['wareneingang'].'">'.$check_delivery_note['belegnr'].'</a>';
|
|
||||||
}
|
|
||||||
else if ($check_delivery_note['anzahl_nummern'] > $check_delivery_note['menge']) {
|
|
||||||
$wareneingang_plus_links[] = '<a href="index.php?module=seriennummern&action=nummern_list&wareneingang='.$check_delivery_note['wareneingang'].'">'.$check_delivery_note['belegnr'].'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($wareneingang_minus_links)) {
|
|
||||||
$this->app->YUI->Message('warning','Seriennummern fehlen für Wareneingang: '.implode(', ',$wareneingang_minus_links));
|
|
||||||
}
|
|
||||||
if (!empty($wareneingang_plus_links)) {
|
|
||||||
$this->app->YUI->Message('warning','Seriennummern Überschuss für Wareneingang: '.implode(', ',$wareneingang_plus_links));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function seriennummern_nummern_list() {
|
function seriennummern_nummern_list() {
|
||||||
|
|
||||||
$this->seriennummern_menu();
|
$this->seriennummern_menu();
|
||||||
@ -675,8 +605,8 @@ class Seriennummern {
|
|||||||
|
|
||||||
function seriennummern_menu_checks() {
|
function seriennummern_menu_checks() {
|
||||||
$this->seriennummern_check_and_message(null);
|
$this->seriennummern_check_and_message(null);
|
||||||
$this->seriennummern_delivery_note_check_and_message(null);
|
$this->seriennummern_check_and_message_delivery_notes(null);
|
||||||
$this->seriennummern_check_incoming_goods_and_message(null);
|
$this->seriennummern_check_and_message_incoming_goods(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
function seriennummern_artikel_list() {
|
function seriennummern_artikel_list() {
|
||||||
@ -1044,6 +974,9 @@ class Seriennummern {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------
|
||||||
|
CHECKS
|
||||||
|
-------------------------------------------- */
|
||||||
/*
|
/*
|
||||||
* Check if all serial numbers are given
|
* Check if all serial numbers are given
|
||||||
* Return array of article ids
|
* Return array of article ids
|
||||||
@ -1095,7 +1028,7 @@ class Seriennummern {
|
|||||||
* Check if all incoming goods notes have serials
|
* Check if all incoming goods notes have serials
|
||||||
* Return array of incoming goods note positions and head information
|
* Return array of incoming goods note positions and head information
|
||||||
*/
|
*/
|
||||||
public function seriennummern_check_incoming_goods($wareneingang_id = null, $ignore_date = false, $only_missing = true, $group_wareneingang = false) : array {
|
public function seriennummern_check_incoming_goods($wareneingang_id = null, $only_missing = true, $group_wareneingang = false) : array {
|
||||||
|
|
||||||
if ($group_wareneingang) {
|
if ($group_wareneingang) {
|
||||||
$sql_we = "''";
|
$sql_we = "''";
|
||||||
@ -1132,16 +1065,7 @@ class Seriennummern {
|
|||||||
) spd ON spd.paketdistribution = pd.id
|
) spd ON spd.paketdistribution = pd.id
|
||||||
WHERE
|
WHERE
|
||||||
(a.seriennummern <> 'keine')
|
(a.seriennummern <> 'keine')
|
||||||
AND (
|
AND pa.status <> 'abgeschlossen'
|
||||||
pa.datum >=(
|
|
||||||
SELECT
|
|
||||||
COALESCE(DATE(MIN(datum)),CURRENT_DATE())
|
|
||||||
FROM
|
|
||||||
seriennummern
|
|
||||||
WHERE
|
|
||||||
artikel = a.id
|
|
||||||
) OR ('".$ignore_date."' <> '')
|
|
||||||
)
|
|
||||||
AND (pa.id = '".$wareneingang_id."' OR '".$wareneingang_id."' = '')
|
AND (pa.id = '".$wareneingang_id."' OR '".$wareneingang_id."' = '')
|
||||||
GROUP BY
|
GROUP BY
|
||||||
pa.id
|
pa.id
|
||||||
@ -1222,6 +1146,9 @@ class Seriennummern {
|
|||||||
return(empty($result)?array():$result);
|
return(empty($result)?array():$result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------
|
||||||
|
NOTIFICATIONS
|
||||||
|
-------------------------------------------- */
|
||||||
protected function seriennummern_create_notification_artikel($artikel_id, $action, $title = 'Seriennummern', $message = 'Meldung', $button = 'Ok')
|
protected function seriennummern_create_notification_artikel($artikel_id, $action, $title = 'Seriennummern', $message = 'Meldung', $button = 'Ok')
|
||||||
{
|
{
|
||||||
// Notification erstellen
|
// Notification erstellen
|
||||||
@ -1265,32 +1192,131 @@ class Seriennummern {
|
|||||||
$notification = $this->app->Container->get('NotificationService');
|
$notification = $this->app->Container->get('NotificationService');
|
||||||
$notification->createFromData($this->app->User->GetID(), $notification_message);
|
$notification->createFromData($this->app->User->GetID(), $notification_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------
|
||||||
|
CHECKS AND NOTIFICATIONS
|
||||||
|
-------------------------------------------- */
|
||||||
/*
|
/*
|
||||||
* Check if new numbers need to be entered, if yes, create notification
|
* Check if new numbers need to be entered, if yes, create notification
|
||||||
*/
|
*/
|
||||||
public function seriennummern_check_and_message_stock_added(int $artikel_id) {
|
public function seriennummern_check_and_notification_stock_added(int $artikel_id) {
|
||||||
$check_seriennummern = $this->seriennummern_check_serials($artikel_id);
|
$check_seriennummern = $this->seriennummern_check_serials($artikel_id);
|
||||||
if ($check_seriennummern[0]['menge_nummern'] < $check_seriennummern[0]['menge_auf_lager']) {
|
if ($check_seriennummern[0]['menge_nummern'] < $check_seriennummern[0]['menge_auf_lager']) {
|
||||||
$this->seriennummern_create_notification_artikel($artikel_id, 'enter', 'Seriennummern','Bitte Seriennummern für Einlagerung erfassen','Zur Eingabe');
|
$this->seriennummern_create_notification_artikel($artikel_id, 'enter', 'Seriennummern','Bitte Seriennummern für Einlagerung erfassen','Zur Eingabe');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if numbers need to be entered after stock removal, if yes, create notification or message
|
* Check if numbers need to be entered after stock removal, if yes, create notification or message
|
||||||
*/
|
*/
|
||||||
public function seriennummern_check_and_message_delivery_note(int $lieferschein_id, bool $notification) {
|
public function seriennummern_check_and_notification_delivery_note(int $lieferschein_id) {
|
||||||
$check_delivery_notes = $this->seriennummern_check_delivery_notes($lieferschein_id);
|
$check_delivery_notes = $this->seriennummern_check_delivery_notes($lieferschein_id);
|
||||||
if (!empty($check_delivery_notes)) {
|
if (!empty($check_delivery_notes)) {
|
||||||
if ($notificiation) {
|
$this->seriennummern_create_notification_lieferschein($lieferschein_id, 'enter', 'Seriennummern','Bitte Seriennummern für Lieferschein erfassen','Zur Eingabe');
|
||||||
$this->seriennummern_create_notification_lieferschein($lieferschein_id, 'enter', 'Seriennummern','Bitte Seriennummern für Lieferschein erfassen','Zur Eingabe');
|
|
||||||
} else {
|
|
||||||
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Seriennummern unvollständig!<input type=\"button\" value=\"Jetzt erfassen\" onclick=\"window.location.href='index.php?module=seriennummern&action=enter&from=lieferschein&lieferschein=$lieferschein_id'\"></div>");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return($check_delivery_notes);
|
return($check_delivery_notes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------
|
||||||
|
CHECKS AND MESSAGES MODULE HEADER
|
||||||
|
-------------------------------------------- */
|
||||||
|
function seriennummern_check_and_message($artikel_id) {
|
||||||
|
$check_seriennummern = $this->seriennummern_check_serials($artikel_id);
|
||||||
|
|
||||||
|
if (!empty($check_seriennummern)) {
|
||||||
|
$artikel_minus_id_links = array();
|
||||||
|
$artikel_plus_id_links = array();
|
||||||
|
foreach ($check_seriennummern as $artikel_id) {
|
||||||
|
if ($artikel_id['menge_nummern'] < $artikel_id['menge_auf_lager']) {
|
||||||
|
$artikel_minus_id_links[] = '<a href="index.php?module=seriennummern&action=enter&artikel='.$artikel_id['id'].'">'.$artikel_id['nummer'].'</a>';
|
||||||
|
}
|
||||||
|
else if ($artikel_id['menge_nummern'] > $artikel_id['menge_auf_lager']) {
|
||||||
|
$artikel_plus_id_links[] = '<a href="index.php?module=seriennummern&action=nummern_list&artikel='.$artikel_id['id'].'">'.$artikel_id['nummer'].'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($artikel_minus_id_links)) {
|
||||||
|
$this->app->YUI->Message('warning','Seriennummern fehlen für Artikel: '.implode(', ',$artikel_minus_id_links));
|
||||||
|
}
|
||||||
|
if (!empty($artikel_plus_id_links)) {
|
||||||
|
$this->app->YUI->Message('warning','Seriennummern Überschuss für Artikel: '.implode(', ',$artikel_plus_id_links));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function seriennummern_check_and_message_incoming_goods($wareneingang_id) {
|
||||||
|
|
||||||
|
$check_incoming_goods = $this->seriennummern_check_incoming_goods($wareneingang_id, group_wareneingang: true);
|
||||||
|
|
||||||
|
if (!empty($check_incoming_goods)) {
|
||||||
|
if (empty($wareneingang_id)) {
|
||||||
|
$wareneingang_minus_links = array();
|
||||||
|
$wareneingang_plus_links = array();
|
||||||
|
foreach ($check_incoming_goods as $check_delivery_note) {
|
||||||
|
if ($check_delivery_note['anzahl_nummern'] < $check_delivery_note['menge_wareneingang']) {
|
||||||
|
$wareneingang_minus_links[] = '<a href="index.php?module=seriennummern&action=enter&wareneingang='.$check_delivery_note['wareneingang'].'">'.$check_delivery_note['belegnr'].'</a>';
|
||||||
|
}
|
||||||
|
else if ($check_delivery_note['anzahl_nummern'] > $check_delivery_note['menge']) {
|
||||||
|
$wareneingang_plus_links[] = '<a href="index.php?module=seriennummern&action=nummern_list&wareneingang='.$check_delivery_note['wareneingang'].'">'.$check_delivery_note['belegnr'].'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($wareneingang_minus_links)) {
|
||||||
|
$this->app->YUI->Message('warning','Seriennummern fehlen für Wareneingang: '.implode(', ',$wareneingang_minus_links));
|
||||||
|
}
|
||||||
|
if (!empty($wareneingang_plus_links)) {
|
||||||
|
$this->app->YUI->Message('warning','Seriennummern Überschuss für Wareneingang: '.implode(', ',$wareneingang_plus_links));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Seriennummern unvollständig!<input type=\"button\" value=\"Jetzt erfassen\" onclick=\"window.location.href='index.php?module=seriennummern&action=enter&from=wareneingang&wareneingang=$wareneingang_id'\"></div>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return($check_incoming_goods);
|
||||||
|
}
|
||||||
|
|
||||||
|
function seriennummern_check_and_message_delivery_notes($lieferschein_id) {
|
||||||
|
$check_delivery_notes = $this->seriennummern_check_delivery_notes($lieferschein_id, group_lieferschein: true);
|
||||||
|
if (!empty($check_delivery_notes)) {
|
||||||
|
if (empty($lieferschein_id)) {
|
||||||
|
$lieferschein_minus_links = array();
|
||||||
|
$lieferschein_plus_links = array();
|
||||||
|
foreach ($check_delivery_notes as $check_delivery_note) {
|
||||||
|
if ($check_delivery_note['anzahl_nummern'] < $check_delivery_note['menge_lieferschein']) {
|
||||||
|
$lieferschein_minus_links[] = '<a href="index.php?module=seriennummern&action=enter&lieferschein='.$check_delivery_note['lieferschein'].'">'.$check_delivery_note['belegnr'].'</a>';
|
||||||
|
}
|
||||||
|
else if ($check_delivery_note['anzahl_nummern'] > $check_delivery_note['menge']) {
|
||||||
|
$lieferschein_plus_links[] = '<a href="index.php?module=seriennummern&action=nummern_list&lieferschein='.$check_delivery_note['lieferschein'].'">'.$check_delivery_note['belegnr'].'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($lieferschein_minus_links)) {
|
||||||
|
$this->app->YUI->Message('warning','Seriennummern fehlen für Lieferschein: '.implode(', ',$lieferschein_minus_links));
|
||||||
|
}
|
||||||
|
if (!empty($lieferschein_plus_links)) {
|
||||||
|
$this->app->YUI->Message('warning','Seriennummern Überschuss für Lieferschein: '.implode(', ',$lieferschein_plus_links));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$this->app->Tpl->Add('MESSAGE',"<div class=\"warning\">Seriennummern unvollständig!<input type=\"button\" value=\"Jetzt erfassen\" onclick=\"window.location.href='index.php?module=seriennummern&action=enter&from=lieferschein&lieferschein=$lieferschein_id'\"></div>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return($check_delivery_notes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
MINIDETAILS
|
||||||
|
*/
|
||||||
|
public function seriennummern_minidetail($parsetarget='',$menu=true) {
|
||||||
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
|
if($parsetarget=='')
|
||||||
|
{
|
||||||
|
$tmp = new EasyTable($this->app);
|
||||||
|
$tmp->Query("SELECT l.belegnr AS Lieferschein, ".$this->app->erp->FormatDate('l.datum')." AS Datum, a.name AS Adresse FROM lieferschein l INNER JOIN adresse a ON a.id = l.adresse INNER JOIN lieferschein_position lp ON l.id = lp.lieferschein INNER JOIN seriennummern_lieferschein_position slp ON slp.lieferschein_position = lp.id WHERE slp.seriennummer ='$id' ",0,"");
|
||||||
|
$tmp->DisplayNew('TAB1',"Adresse","noAction");
|
||||||
|
|
||||||
|
$this->app->Tpl->Output('emptytab.tpl');
|
||||||
|
$this->app->ExitXentral();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function seriennummern_lieferscheinpos_minidetail($parsetarget='',$menu=true) {
|
public function seriennummern_lieferscheinpos_minidetail($parsetarget='',$menu=true) {
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
@ -1304,18 +1330,6 @@ class Seriennummern {
|
|||||||
$this->app->ExitXentral();
|
$this->app->ExitXentral();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function seriennummern_minidetail($parsetarget='',$menu=true) {
|
|
||||||
$id = $this->app->Secure->GetGET('id');
|
|
||||||
|
|
||||||
if($parsetarget=='')
|
|
||||||
{
|
|
||||||
$tmp = new EasyTable($this->app);
|
|
||||||
$tmp->Query("SELECT l.belegnr AS Lieferschein, ".$this->app->erp->FormatDate('l.datum')." AS Datum, a.name AS Adresse FROM lieferschein l INNER JOIN adresse a ON a.id = l.adresse INNER JOIN lieferschein_position lp ON l.id = lp.lieferschein INNER JOIN seriennummern_lieferschein_position slp ON slp.lieferschein_position = lp.id WHERE slp.seriennummer ='$id' ",0,"");
|
|
||||||
$tmp->DisplayNew('TAB1',"Adresse","noAction");
|
|
||||||
|
|
||||||
$this->app->Tpl->Output('emptytab.tpl');
|
|
||||||
$this->app->ExitXentral();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -814,6 +814,7 @@ class Versandpakete {
|
|||||||
$this->app->erp->MenuEintrag("index.php?module=versandpakete&action=edit&id=".$id, "Details");
|
$this->app->erp->MenuEintrag("index.php?module=versandpakete&action=edit&id=".$id, "Details");
|
||||||
$this->app->Tpl->SetText('KURZUEBERSCHRIFT2', 'Artikel hinzufügen');
|
$this->app->Tpl->SetText('KURZUEBERSCHRIFT2', 'Artikel hinzufügen');
|
||||||
if (empty($id)) {
|
if (empty($id)) {
|
||||||
|
|
||||||
$lieferschein = $this->app->Secure->GetGET('lieferschein');
|
$lieferschein = $this->app->Secure->GetGET('lieferschein');
|
||||||
if (empty($lieferschein)) {
|
if (empty($lieferschein)) {
|
||||||
$msg = $this->app->erp->base64_url_encode("<div class=\"error\">Kein Lieferschein angegeben.</div>");
|
$msg = $this->app->erp->base64_url_encode("<div class=\"error\">Kein Lieferschein angegeben.</div>");
|
||||||
@ -874,8 +875,12 @@ class Versandpakete {
|
|||||||
}
|
}
|
||||||
$lieferschein_belegnr = $this->app->erp->ReplaceLieferschein(false, $lieferschein, false); // Parameters: Target db?, value, from form?
|
$lieferschein_belegnr = $this->app->erp->ReplaceLieferschein(false, $lieferschein, false); // Parameters: Target db?, value, from form?
|
||||||
$input['lieferschein'] = $lieferschein;
|
$input['lieferschein'] = $lieferschein;
|
||||||
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->app->erp->SeriennummernCheckLieferscheinWarnung(lieferschein_id: $lieferschein);
|
||||||
|
|
||||||
// Check if other users are editing this id
|
// Check if other users are editing this id
|
||||||
if($this->app->erp->DisableModul('versandpakete',$id))
|
if($this->app->erp->DisableModul('versandpakete',$id))
|
||||||
|
@ -2014,14 +2014,29 @@ class Wareneingang {
|
|||||||
|
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=distriinhalt&id='.$id, 'Details');
|
$this->app->erp->MenuEintrag('index.php?module=wareneingang&action=distriinhalt&id='.$id, 'Details');
|
||||||
|
|
||||||
|
|
||||||
$this->app->Tpl->Add('KURZUEBERSCHRIFT', ' Paketannahme / Leistungserfassung');
|
$this->app->Tpl->Add('KURZUEBERSCHRIFT', ' Paketannahme / Leistungserfassung');
|
||||||
$cmd = $this->app->Secure->GetGET('cmd');
|
$cmd = $this->app->Secure->GetGET('cmd');
|
||||||
$lsnr = $this->app->Secure->GetPOST('lsnr');
|
$lsnr = $this->app->Secure->GetPOST('lsnr');
|
||||||
$renr = $this->app->Secure->GetPOST('renr');
|
$renr = $this->app->Secure->GetPOST('renr');
|
||||||
$bemerkung = $this->app->Secure->GetPOST('bemerkung');
|
$bemerkung = $this->app->Secure->GetPOST('bemerkung');
|
||||||
|
|
||||||
$bemerkung = str_replace(array('\r\n', '\r', '\n'), "\n", $bemerkung);
|
$bemerkung = str_replace(array('\r\n', '\r', '\n'), "\n", $bemerkung);
|
||||||
|
|
||||||
|
$seriennummern = $this->app->erp->SeriennummernCheckWareneingang(
|
||||||
|
wareneingang_id: $id,
|
||||||
|
ignore_date: true,
|
||||||
|
only_missing: false,
|
||||||
|
group_wareneingang: true);
|
||||||
|
|
||||||
|
$seriennummern_aktiv = !empty($seriennummern);
|
||||||
|
|
||||||
|
if ($seriennummern_aktiv) {
|
||||||
|
$this->app->erp->MenuEintrag('index.php?module=seriennummern&action=enter&wareneingang='.$id, 'Seriennummern');
|
||||||
|
$seriennummern_check_result = $this->app->erp->SeriennummernCheckWareneingangWarnung($id, false);
|
||||||
|
$seriennummern_ok = empty($seriennummern_check_result);
|
||||||
|
}
|
||||||
|
|
||||||
$this->app->User->SetParameter('table_wareneingang_lieferant_ausfuellen', '');
|
$this->app->User->SetParameter('table_wareneingang_lieferant_ausfuellen', '');
|
||||||
|
|
||||||
// Load from DB
|
// Load from DB
|
||||||
@ -2633,6 +2648,11 @@ class Wareneingang {
|
|||||||
$this->app->YUI->Message('info','Wareneingang noch nicht abgeschlossen');
|
$this->app->YUI->Message('info','Wareneingang noch nicht abgeschlossen');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($seriennummern_aktiv && !$seriennummern_ok) {
|
||||||
|
$this->app->Tpl->Set('ABSCHLIESSENHIDDEN','hidden');
|
||||||
|
}
|
||||||
|
|
||||||
$this->app->Tpl->Parse('PAGE', 'wareneingang_paketinhalt.tpl');
|
$this->app->Tpl->Parse('PAGE', 'wareneingang_paketinhalt.tpl');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user