versandpakete improvements

This commit is contained in:
OpenXE 2023-10-26 20:23:19 +02:00
parent eb00034a79
commit ecf986d33b
5 changed files with 35 additions and 18 deletions

View File

@ -3693,10 +3693,10 @@ class YUI {
}
function IconsSQL_lieferung() {
$lieferschein_kein = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagerstop.png\" title=\"Keine Artikel\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_kein = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagerstop.png\" title=\"Keine Artikel in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_ohne_pos = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/summe_go.png\" title=\"Lieferschein ohne Positionen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_voll = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo.png\" title=\"Artikel vollst&auml;ndig\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo_stop.png\" title=\"Artikel teilweise\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_voll = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo.png\" title=\"Artikel vollst&auml;ndig in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$lieferschein_teil = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/lagergo_stop.png\" title=\"Artikel teilweise in Versandpaketen\" border=\"0\" style=\"margin-right:1px\">";
$versendet = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrego.png\" title=\"Versendet\" border=\"0\" style=\"margin-right:1px\">";
$versendet_nicht = "<img src=\"./themes/{$this->app->Conf->WFconf['defaulttheme']}/images/liefersperrestop.png\" title=\"Nicht versendet\" border=\"0\" style=\"margin-right:1px\">";

View File

@ -1603,7 +1603,10 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
$subwhere = $this->AjaxFilterWhere($termorig,$felder);
$sql = "SELECT CONCAT(art.nummer,' ',art.name_de) as name FROM artikel art
INNER JOIN $doctype"."_position ap ON ap.artikel = art.id AND $doctype = '$doctypeid'
WHERE art.geloescht=0 AND ($artikel_freitext1_suche) AND art.geloescht=0 AND art.intern_gesperrt!=1 LIMIT 20";
WHERE
art.geloescht=0 AND ($artikel_freitext1_suche) AND art.geloescht=0 AND art.intern_gesperrt!=1 AND
(name_de LIKE '%$term%' OR art.nummer LIKE '%$term%')
LIMIT 20";
$arr = $this->app->DB->SelectArr($sql);
$carr = !empty($arr)?count($arr):0;
for($i = 0; $i < $carr; $i++) {

View File

@ -59,7 +59,7 @@
{|Gewicht Kg|}:
</td>
<td>
<input type="number" name="gewicht" id="gewicht" min="1" value="[GEWICHT]" size="40" [LIEFERSCHEIN_GEWICHT_DISABLED]>
<input type="number" name="" id="" value="[GEWICHT]" size="40" disabled>
</td>
</tr>
<tr>
@ -90,7 +90,7 @@
</tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]>
<td>
{|Lieferschein|}:
{|Artikel von Lieferschein hinzuf&uuml;gen|}:
</td>
<td>
<input form="add" type="text" name="lieferschein" id="lieferschein" value="[LIEFERSCHEIN]" autofocus size="40">
@ -107,7 +107,7 @@
<table width="100%" border="0" class="mkTableFormular">
<tr><td><button form="save" name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button></td></tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]><td><button form="add" name="submit" value="lieferschein_hinzufuegen" class="ui-button-icon" style="width:100%;">Artikel hinzuf&uuml;gen</button></td></tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]><td><button form="add" name="submit" value="lieferschein_komplett_hinzufuegen" class="ui-button-icon" style="width:100%;">Kompletten Lieferschein hinzuf&uuml;gen</button></td></tr>
<tr [LIEFERSCHEIN_ADD_POS_HIDDEN]><td><button form="add" name="submit" value="lieferschein_komplett_hinzufuegen" class="ui-button-icon" style="width:100%;">Alle Artikel hinzuf&uuml;gen</button></td></tr>
<tr [PAKETMARKE_ADD_HIDDEN]><td><button form="paketmarke" name="submit" value="paketmarke" class="ui-button-icon" style="width:100%;">Paketmarke drucken</button></td></tr>
<tr [ABSENDEN_HIDDEN]><td><button name="submit" value="absenden" class="ui-button-icon" style="width:100%;">Absenden</button></td></tr>
<tr [ABSCHLIESSEN_HIDDEN]><td><button name="submit" value="abschliessen" class="ui-button-icon" style="width:100%;">Abschlie&szlig;en</button></td></tr>

View File

@ -19,7 +19,7 @@
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<form action="index.php?module=versandpakete&action=stapelverarbeitung" id="frmauto" name="frmauto" method="post">
<form action="index.php?module=versandpakete&action=stapelverarbeitung&from=lieferung&id=[FROMID]" id="frmauto" name="frmauto" method="post">
[TAB1]
<fieldset>
<table>

View File

@ -71,6 +71,7 @@ class Versandpakete {
$lieferschein_filter = $app->User->GetParameter('versandpakete_lieferschein_filter');
if ($lieferschein_filter) {
$lieferschein_filter_where = "WHERE lieferschein = ".$lieferschein_filter;
$lieferung_link = "&lieferung=".$lieferschein_filter;
}
// break omitted intentionally
case "versandpakete_list":
@ -97,8 +98,7 @@ class Versandpakete {
$menu_link = array(
'<a href="index.php?module=versandpakete&action=edit&id=',
['sql' => 'id'],
'&lieferung=',
$lieferschein_filter,
$lieferung_link,
'">',
"<img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a>",
'</a>',
@ -177,7 +177,7 @@ class Versandpakete {
id,
".$dropnbox.",
id id2,
".$app->erp->FormatDateShort("datum").",
".$app->erp->FormatDateTimeShort("datum").",
name,
lieferscheine,
versandart,
@ -345,7 +345,7 @@ class Versandpakete {
".$app->erp->FormatMenge("lmenge").",
".$app->erp->FormatMenge("vmenge").",
".$app->YUI->IconsSQL_lieferung().",
CONCAT('<a href=\"index.php?module=versandpakete&action=lieferung&id=',id,'\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/forward.svg\" border=\"0\"></a>'),
if(vmenge=0,'',CONCAT('<a href=\"index.php?module=versandpakete&action=lieferung&id=',id,'\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/forward.svg\" title=\"Pakete anzeigen\" border=\"0\"></a>')),
id,
alle_abgeschlossen
FROM (
@ -477,7 +477,7 @@ class Versandpakete {
$lieferschein_id = $app->User->GetParameter('versandpakete_lieferschein');
$allowed['versandpakete_lieferschein_paket_list'] = array('list');
$heading = array('Pos', 'Artikel', 'Artikel-Nr.','Menge Lieferschein', 'Menge in Versandpaketen', 'Paket-Nr.');
$heading = array('Pos', 'Artikel', 'Artikel-Nr.','Menge Lieferschein', 'Menge in Versandpaketen', 'Paket-Nr.','');
$width = array('10%','10%','10%'); // Fill out manually later
// columns that are aligned right (numbers etc)
@ -567,19 +567,25 @@ class Versandpakete {
$selectedIds[] = $selectedId;
}
}
$status = $this->app->Secure->GetPOST('status');
$sql = "UPDATE versandpakete SET status = '".$status."'";
$sql .= " WHERE id IN (".implode(",",$selectedIds).")";
$this->app->DB->Update($sql);
}
$this->versandpakete_list();
$from = $this->app->Secure->GetGET('from');
if ($from == "lieferung") {
$this->versandpakete_lieferung();
}
else {
$this->versandpakete_list();
}
}
function versandpakete_lieferungen() {
$this->versandpakete_menu();
$this->app->YUI->TableSearch('TAB1', 'versandpakete_lieferscheine', "show", "", "", basename(__FILE__), __CLASS__);
$this->app->Tpl->SetText('KURZUEBERSCHRIFT2', 'Lieferungen');
$this->app->Tpl->Parse('PAGE', "versandpakete_lieferungen.tpl");
}
@ -587,6 +593,7 @@ class Versandpakete {
$lieferschein_filter = (int) $this->app->Secure->GetGET('id');
$this->versandpakete_menu();
$this->app->erp->MenuEintrag("index.php?module=versandpakete&action=add&lieferschein=".$lieferschein_filter, "Neu anlegen");
$this->app->erp->MenuEintrag("index.php?module=versandpakete&action=lieferung&id=".$lieferschein_filter, "Details");
$this->app->User->SetParameter('versandpakete_lieferschein_filter',$lieferschein_filter);
$this->versandpakete_status_select();
@ -616,6 +623,8 @@ class Versandpakete {
}
}
$this->app->Tpl->Set('FROMID', $lieferschein_filter);
$this->app->YUI->TableSearch('TAB1', 'lieferung_versandpakete_list', "show", "", "", basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE', "versandpakete_lieferung.tpl");
}
@ -652,7 +661,9 @@ class Versandpakete {
if ($lieferung) {
$this->app->erp->MenuEintrag("index.php?module=versandpakete&action=lieferung&id=".$lieferung, "Zur&uuml;ck");
}
$this->versandpakete_menu();
$this->app->erp->MenuEintrag("index.php?module=versandpakete&action=edit&id=".$id, "Details");
// Check if other users are editing this id
if($this->app->erp->DisableModul('versandpakete',$id))
@ -825,8 +836,10 @@ class Versandpakete {
}
function versandpakete_add() {
$this->versandpakete_menu();
$id = $this->app->Secure->GetGET('id');
$this->versandpakete_menu();
$this->app->erp->MenuEintrag("index.php?module=versandpakete&action=edit&id=".$id, "Details");
$this->app->Tpl->SetText('KURZUEBERSCHRIFT2', 'Artikel hinzuf&uuml;gen');
if (empty($id)) {
$lieferschein = $this->app->Secure->GetGET('lieferschein');
if (empty($lieferschein)) {
@ -838,6 +851,7 @@ class Versandpakete {
$sql = "INSERT INTO versandpakete (status, versender) VALUES ('neu','".$this->app->User->GetName()."')";
$this->app->DB->Insert($sql);
$id = $this->app->DB->GetInsertId();
$this->app->Tpl->addMessage('success', 'Versandpaket Paket Nr. '.$id.' wurde erstellt.', false, 'MESSAGE');
}
} else { // $id not empty
$lieferschein_input = $this->app->Secure->GetPOST('lieferschein');