mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
wareneingang add manuelle list, wareneingang filter abgeschlossene
This commit is contained in:
parent
f148fbdf08
commit
b9bec98855
@ -3,6 +3,19 @@
|
|||||||
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="tabs-1">
|
<div id="tabs-1">
|
||||||
|
<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="abgeschlossen" class="switch">
|
||||||
|
<input type="checkbox" id="abgeschlossen">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<label for="abgeschlossen">{|Inkl. abgeschlossene|}</label>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
[MESSAGE]
|
[MESSAGE]
|
||||||
[TAB1]
|
[TAB1]
|
||||||
[TAB1NEXT]
|
[TAB1NEXT]
|
||||||
|
@ -7,15 +7,11 @@
|
|||||||
<!-- ende gehort zu tabview -->
|
<!-- ende gehort zu tabview -->
|
||||||
<!-- erstes tab -->
|
<!-- erstes tab -->
|
||||||
<input type="hidden" id="paketannahme_id" value="[ID]" /> [BEFORETAB1]
|
<input type="hidden" id="paketannahme_id" value="[ID]" /> [BEFORETAB1]
|
||||||
<div id="tabs-1"> [TAB1START] [MESSAGE1] [MESSAGE]
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
|
<div id="tabs-1"> [TAB1START] [MESSAGE1] [MESSAGE]
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row-height">
|
<div class="row-height">
|
||||||
<div class="col-xs-12 col-md-10 col-md-height">
|
<div class="col-xs-12 col-md-5 col-md-height">
|
||||||
<div class="inside-white inside-full-height">
|
|
||||||
<div class="row">
|
|
||||||
<div class="row-height">
|
|
||||||
<div class="col-xs-12 col-md-2 col-md-height">
|
|
||||||
<div class="inside inside-full-height">
|
<div class="inside inside-full-height">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{|[LEGENDE]|}</legend>
|
<legend>{|[LEGENDE]|}</legend>
|
||||||
@ -46,7 +42,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-2 col-md-height">
|
<div class="col-xs-12 col-md-5 col-md-height">
|
||||||
<div class="inside inside-full-height">
|
<div class="inside inside-full-height">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<table>
|
<table>
|
||||||
@ -62,19 +58,6 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" [HINZUFUEGENHIDDEN]>
|
|
||||||
<div class="row-height">
|
|
||||||
<div class="col-xs-12 col-md-10 col-md-height">
|
|
||||||
<div class="inside-white inside-full-height">
|
|
||||||
[TAB1]
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-md-2 col-md-height">
|
<div class="col-xs-12 col-md-2 col-md-height">
|
||||||
<div class="inside inside-full-height">
|
<div class="inside inside-full-height">
|
||||||
<fieldset> [BUTTONS] [BEFOREFRM] [AFTERFRM] [DISTRIINHALTBUTTONS] [BEFOREFRM] [AFTERFRM]
|
<fieldset> [BUTTONS] [BEFOREFRM] [AFTERFRM] [DISTRIINHALTBUTTONS] [BEFOREFRM] [AFTERFRM]
|
||||||
@ -86,6 +69,25 @@
|
|||||||
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern">{|Speichern|}</button>
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern">{|Speichern|}</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" [HINZUFUEGENHIDDEN]>
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-10 col-md-height">
|
||||||
|
<div class="inside-white inside-full-height">
|
||||||
|
[TAB1]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-2 col-md-height">
|
||||||
|
<div class="inside inside-full-height">
|
||||||
|
<fieldset> [BUTTONS] [BEFOREFRM] [AFTERFRM] [DISTRIINHALTBUTTONS] [BEFOREFRM] [AFTERFRM]
|
||||||
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<legend>{|Aktionen|}</legend>
|
||||||
[ISLIEFERANTSTART]
|
[ISLIEFERANTSTART]
|
||||||
<tr [HINZUFUEGENHIDDEN]>
|
<tr [HINZUFUEGENHIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
@ -93,11 +95,27 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
[ISLIEFERANTENDE]
|
[ISLIEFERANTENDE]
|
||||||
|
[ISNOTLIEFERANTSTART]
|
||||||
|
<tr [HINZUFUEGENHIDDEN]>
|
||||||
|
<td>
|
||||||
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="manuell_hinzufuegen">{|Hinzufügen|}</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
[ISNOTLIEFERANTENDE]
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="row-height">
|
||||||
|
<div class="col-xs-12 col-md-10 col-md-height">
|
||||||
|
<div class="inside-white inside-full-height">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row-height">
|
<div class="row-height">
|
||||||
@ -110,13 +128,6 @@
|
|||||||
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
<legend>{|Aktionen|}</legend>
|
<legend>{|Aktionen|}</legend>
|
||||||
[BEFOREMANUELLERFASSEN]
|
|
||||||
<tr [HINZUFUEGENHIDDEN]>
|
|
||||||
<td>
|
|
||||||
<button name="submit" class="ui-button-icon" style="width:100%;" value="manuellerfassen">{|Artikel manuell buchen|}</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
[AFTERMANUELLERFASSEN]
|
|
||||||
<tr [BUCHENHIDDEN]>
|
<tr [BUCHENHIDDEN]>
|
||||||
<td>
|
<td>
|
||||||
<button name="submit" class="ui-button-icon" style="width:100%;" value="vorlaeufige_buchen">{|Buchen|}</button>
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="vorlaeufige_buchen">{|Buchen|}</button>
|
||||||
@ -143,7 +154,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form> [TAB1ENDE]
|
[TAB1ENDE]
|
||||||
</div> [AFTERTAB1] [BEFORETAB2]
|
</div> [AFTERTAB1] [BEFORETAB2]
|
||||||
<div id="tabs-2"> [TAB2START] [MESSAGE2]
|
<div id="tabs-2"> [TAB2START] [MESSAGE2]
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -156,25 +167,23 @@
|
|||||||
<div class="col-xs-12 col-md-2 col-md-height">
|
<div class="col-xs-12 col-md-2 col-md-height">
|
||||||
<div class="inside inside-full-height">
|
<div class="inside inside-full-height">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{|Aktionen|}</legend> [BUTTONS] </fieldset>
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="speichern" hidden="true"></button>
|
||||||
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
|
<legend>{|Aktionen|}</legend>
|
||||||
|
<tr [HINZUFUEGENHIDDEN]>
|
||||||
|
<td>
|
||||||
|
<button name="submit" class="ui-button-icon" style="width:100%;" value="manuell_hinzufuegen">{|Hinzufügen|}</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> [TAB2ENDE] </div> [AFTERTAB2] [BEFORETAB3]
|
</div> [TAB2ENDE]
|
||||||
<div id="tabs-3"> [TAB3START] [MESSAGE3]
|
</div> [AFTERTAB2]
|
||||||
<div class="row">
|
</form>
|
||||||
<div class="row-height">
|
</div>
|
||||||
<div class="col-xs-12 col-md-10 col-md-height">
|
|
||||||
<div class="inside-white inside-full-height"> [TAB3] </div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-md-2 col-md-height">
|
|
||||||
<div class="inside inside-full-height">
|
|
||||||
<fieldset>
|
|
||||||
<legend>{|Aktionen|}</legend> [BUTTONS] </fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> [TAB3ENDE] </div> [AFTERTAB3] </div>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#tabs").tabs("option", "active", [TABINDEX]);
|
$("#tabs").tabs("option", "active", [TABINDEX]);
|
||||||
|
@ -126,7 +126,6 @@ class Wareneingang {
|
|||||||
)
|
)
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
$input_for_menge = "CONCAT(
|
$input_for_menge = "CONCAT(
|
||||||
'<input type = \"number\" min=\"0\"',
|
'<input type = \"number\" min=\"0\"',
|
||||||
' value=\"',
|
' value=\"',
|
||||||
@ -166,7 +165,7 @@ class Wareneingang {
|
|||||||
IF(b.bestellungbestaetigtabnummer != '' AND b.bestellungbestaetigtabnummer IS NOT NULL, CONCAT('<br>AB Nummer Lieferant: ',b.bestellungbestaetigtabnummer), ''),
|
IF(b.bestellungbestaetigtabnummer != '' AND b.bestellungbestaetigtabnummer IS NOT NULL, CONCAT('<br>AB Nummer Lieferant: ',b.bestellungbestaetigtabnummer), ''),
|
||||||
IF(b.bestaetigteslieferdatum != '' AND b.bestaetigteslieferdatum IS NOT NULL AND b.bestaetigteslieferdatum != '0000-00-00', CONCAT('<br>Best. Lieferdatum: ',DATE_FORMAT(b.bestaetigteslieferdatum, '%d.%m.%Y')),'')
|
IF(b.bestaetigteslieferdatum != '' AND b.bestaetigteslieferdatum IS NOT NULL AND b.bestaetigteslieferdatum != '0000-00-00', CONCAT('<br>Best. Lieferdatum: ',DATE_FORMAT(b.bestaetigteslieferdatum, '%d.%m.%Y')),'')
|
||||||
)",
|
)",
|
||||||
"if(bp.lieferdatum,bp.lieferdatum,'sofort')", 'p.abkuerzung', 'bp.menge', 'bp.geliefert', $this->app->erp->FormatMenge("bp.menge - bp.geliefert"), 'bp.id');
|
"if(bp.lieferdatum,bp.lieferdatum,'sofort')", 'p.abkuerzung', 'bp.menge', 'bp.geliefert', $this->app->erp->FormatMenge("bp.menge - bp.geliefert"), 'bp.id','bp.id');
|
||||||
$searchsql = array('bp.bestellnummer', 'art.nummer', 'b.belegnr', "CONCAT(art.name_de,'<br>Bei Lieferant: ',bp.bezeichnunglieferant, '<i style=color:#999>',
|
$searchsql = array('bp.bestellnummer', 'art.nummer', 'b.belegnr', "CONCAT(art.name_de,'<br>Bei Lieferant: ',bp.bezeichnunglieferant, '<i style=color:#999>',
|
||||||
IF(b.internebemerkung != '' AND b.internebemerkung IS NOT NULL, CONCAT('<br>Interne Bemerkung: ',b.internebemerkung),''),
|
IF(b.internebemerkung != '' AND b.internebemerkung IS NOT NULL, CONCAT('<br>Interne Bemerkung: ',b.internebemerkung),''),
|
||||||
IF(b.internebezeichnung != '' AND b.internebezeichnung IS NOT NULL, CONCAT('<br>Interne Bezeichnung: ',b.internebezeichnung), ''),
|
IF(b.internebezeichnung != '' AND b.internebezeichnung IS NOT NULL, CONCAT('<br>Interne Bezeichnung: ',b.internebezeichnung), ''),
|
||||||
@ -257,6 +256,60 @@ class Wareneingang {
|
|||||||
$moreinfo = false;
|
$moreinfo = false;
|
||||||
$this->app->erp->RunHook('warneingang_tablesearch_wareneingang_lieferant', 4, $id, $sql, $where, $count);
|
$this->app->erp->RunHook('warneingang_tablesearch_wareneingang_lieferant', 4, $id, $sql, $where, $count);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'wareneingang_manuell':
|
||||||
|
$allowed['paketdistribution_list'] = array('list');
|
||||||
|
|
||||||
|
$heading = array('Art.-Nummer', 'Beschreibung', 'Menge', 'Bemerkung','');
|
||||||
|
$width = array( '5%', '30%', '5%', '15%', '1%');
|
||||||
|
|
||||||
|
$findcols = array('nummer','name_de','id','id');
|
||||||
|
$searchsql = array('');
|
||||||
|
|
||||||
|
$alignright = array('5');
|
||||||
|
$defaultorder = 1;
|
||||||
|
$defaultorderdesc = 0;
|
||||||
|
|
||||||
|
$auswahl = array (
|
||||||
|
'<input type=\"text\" name=\"manuell_artikel_ids[]\" value=\"',
|
||||||
|
['sql' => 'a.id'],
|
||||||
|
'" hidden/>',
|
||||||
|
['sql' => 'a.nummer']
|
||||||
|
);
|
||||||
|
|
||||||
|
$input_for_menge = array(
|
||||||
|
'<input type = \"number\" min=\"0\"',
|
||||||
|
' value=\"',
|
||||||
|
'\"',
|
||||||
|
' name=\"manuell_mengen[]\"',
|
||||||
|
' style=\"text-align:right; width:100%\">',
|
||||||
|
'</input>'
|
||||||
|
);
|
||||||
|
|
||||||
|
$input_for_bemerkung = array(
|
||||||
|
'<input type = \"text\"',
|
||||||
|
' name=\"manuell_bemerkungen[]\"',
|
||||||
|
' style=\"text-align:right; width:100%\">',
|
||||||
|
'</input>'
|
||||||
|
);
|
||||||
|
|
||||||
|
$sql = "
|
||||||
|
SELECT SQL_CALC_FOUND_ROWS
|
||||||
|
id,
|
||||||
|
".$this->app->erp->ConcatSQL($auswahl).",
|
||||||
|
name_de,
|
||||||
|
".$this->app->erp->ConcatSQL($input_for_menge).",
|
||||||
|
".$this->app->erp->ConcatSQL($input_for_bemerkung)."
|
||||||
|
''
|
||||||
|
FROM
|
||||||
|
artikel a
|
||||||
|
";
|
||||||
|
|
||||||
|
$where = "geloescht <> 1";
|
||||||
|
$count = "";
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case 'paketannahme_retoure':
|
case 'paketannahme_retoure':
|
||||||
$allowed['wareneingang'] = array('distriinhalt');
|
$allowed['wareneingang'] = array('distriinhalt');
|
||||||
$adresse = $this->app->DB->Select("SELECT adresse FROM paketannahme WHERE id='$id' LIMIT 1");
|
$adresse = $this->app->DB->Select("SELECT adresse FROM paketannahme WHERE id='$id' LIMIT 1");
|
||||||
@ -977,17 +1030,19 @@ class Wareneingang {
|
|||||||
$heading = array('Lieferant-Art.-Nr.', 'Art.-Nummer', 'Bestellung', 'Beschreibung', 'Menge', 'Bemerkung','Bearbeiter', '','','');
|
$heading = array('Lieferant-Art.-Nr.', 'Art.-Nummer', 'Bestellung', 'Beschreibung', 'Menge', 'Bemerkung','Bearbeiter', '','','');
|
||||||
$width = array( '5%', '5%', '5%', '30%', '5%', '15%', '5%', '1%','1%','1%');
|
$width = array( '5%', '5%', '5%', '30%', '5%', '15%', '5%', '1%','1%','1%');
|
||||||
|
|
||||||
$findcols = array('p.nummer', 'p.bestellbezug', 'p.name', 'p.menge', 'p.bemerkung','p.bearbeiter');
|
$findcols = array('p.lieferantnummer','p.nummer', 'p.bestellbezug', 'p.name', 'p.menge', 'p.bemerkung','p.bearbeiter','p.nummer','p.nummer','p.nummer');
|
||||||
$searchsql = array('p.nummer', 'p.name', 'p.bemerkung');
|
$searchsql = array('p.nummer', 'p.name', 'p.bemerkung');
|
||||||
|
|
||||||
$alignright = array('5');
|
$alignright = array('5');
|
||||||
$defaultorder = 1;
|
$defaultorder = 1;
|
||||||
$defaultorderdesc = 0;
|
$defaultorderdesc = 0;
|
||||||
|
|
||||||
$icon_nicht_eingelagert = "<img src=\"./themes/new/images/nicht_eingelagert.png\" title=\"nicht eingebucht\" style=\"margin-right:1px\" border=\"0\">";
|
$icon_nicht_eingelagert = "<img src=\"./themes/new/images/nicht_eingelagert.png\" title=\"Position ist nicht eingebucht\" style=\"margin-right:1px\" border=\"0\">";
|
||||||
$icon_eingelagert = "<img src=\"./themes/new/images/eingelagert.png\" title=\"eingebucht\" style=\"margin-right:1px\" border=\"0\">";
|
$icon_eingelagert = "<img src=\"./themes/new/images/eingelagert.png\" title=\"Position ist eingebucht\" style=\"margin-right:1px\" border=\"0\">";
|
||||||
$icon_kein_lagerplatz = "<img src=\"./themes/new/images/lagerplatzstop.png\" title=\"kein Standardlager angegeben\" style=\"margin-right:1px\" border=\"0\">";
|
$icon_kein_lagerplatz = "<img src=\"./themes/new/images/lagerplatzstop.png\" title=\"Der Artikel hat kein Standardlager\" style=\"margin-right:1px\" border=\"0\">";
|
||||||
$icon_lagerplatz = "<img src=\"./themes/new/images/lagerplatzgo.png\" title=\"Lager ok\" style=\"margin-right:1px\" border=\"0\">";
|
$icon_lagerplatz = "<img src=\"./themes/new/images/lagerplatzgo.png\" title=\"Standardlager ok\" style=\"margin-right:1px\" border=\"0\">";
|
||||||
|
$icon_lagerplatz_eingelagert = "<img src=\"./themes/new/images/lagerplatzgo.png\" title=\"Eingelagert\" style=\"margin-right:1px\" border=\"0\">";
|
||||||
|
$icon_kein_lagerartikel = "<img src=\"./themes/new/images/lagerplatz_grau.png\" title=\"Kein Lagerartikel\" style=\"margin-right:1px\" border=\"0\">";
|
||||||
|
|
||||||
$deletelink = array(
|
$deletelink = array(
|
||||||
"<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=wareneingang&action=deletepos&id=",
|
"<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=wareneingang&action=deletepos&id=",
|
||||||
@ -1024,13 +1079,22 @@ class Wareneingang {
|
|||||||
paketdistribution.vorlaeufig,
|
paketdistribution.vorlaeufig,
|
||||||
CONCAT(
|
CONCAT(
|
||||||
'$icon_nicht_eingelagert',
|
'$icon_nicht_eingelagert',
|
||||||
|
if (artikel.lagerartikel,
|
||||||
if (
|
if (
|
||||||
artikel.lager_platz = 0,
|
artikel.lager_platz = 0,
|
||||||
'$icon_kein_lagerplatz',
|
'$icon_kein_lagerplatz',
|
||||||
'$icon_lagerplatz'
|
'$icon_lagerplatz'
|
||||||
|
),
|
||||||
|
'$icon_kein_lagerartikel'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'$icon_eingelagert'
|
CONCAT(
|
||||||
|
'$icon_eingelagert',
|
||||||
|
if (artikel.lagerartikel,
|
||||||
|
'$icon_lagerplatz_eingelagert',
|
||||||
|
'$icon_kein_lagerartikel'
|
||||||
|
)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
'</td></tr></table>'
|
'</td></tr></table>'
|
||||||
)
|
)
|
||||||
@ -1115,9 +1179,38 @@ class Wareneingang {
|
|||||||
|
|
||||||
$where = "1";
|
$where = "1";
|
||||||
|
|
||||||
|
// Toggle filters
|
||||||
|
$this->app->Tpl->Add('JQUERYREADY', "$('#abgeschlossen').click( function() { fnFilterColumn1( 0 ); } );");
|
||||||
|
|
||||||
|
for ($r = 1;$r <= 1;$r++) {
|
||||||
|
$this->app->Tpl->Add('JAVASCRIPT', '
|
||||||
|
function fnFilterColumn' . $r . ' ( i )
|
||||||
|
{
|
||||||
|
if(oMoreData' . $r . $name . '==1)
|
||||||
|
oMoreData' . $r . $name . ' = 0;
|
||||||
|
else
|
||||||
|
oMoreData' . $r . $name . ' = 1;
|
||||||
|
|
||||||
|
$(\'#' . $name . '\').dataTable().fnFilter(
|
||||||
|
\'\',
|
||||||
|
i,
|
||||||
|
0,0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
');
|
||||||
|
}
|
||||||
|
|
||||||
|
$more_data1 = $this->app->Secure->GetGET("more_data1");
|
||||||
|
if ($more_data1 == 1) {
|
||||||
|
} else {
|
||||||
|
$where .= " AND paketannahme.status <> 'abgeschlossen'";
|
||||||
|
}
|
||||||
|
|
||||||
|
// END Toggle filters
|
||||||
|
|
||||||
$count = "SELECT count(paketannahme.id) FROM paketannahme
|
$count = "SELECT count(paketannahme.id) FROM paketannahme
|
||||||
INNER JOIN adresse
|
INNER JOIN adresse
|
||||||
ON paketannahme.adresse = adresse.id";
|
ON paketannahme.adresse = adresse.id WHERE ".$where;
|
||||||
$groupby = "GROUP BY paketannahme.id";
|
$groupby = "GROUP BY paketannahme.id";
|
||||||
|
|
||||||
$moreinfo = true; // Allow drop down details
|
$moreinfo = true; // Allow drop down details
|
||||||
@ -1969,15 +2062,62 @@ class Wareneingang {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'manuell_hinzufuegen':
|
||||||
|
|
||||||
|
$manuell_artikel_ids = $this->app->Secure->GetPOST('manuell_artikel_ids');
|
||||||
|
$manuell_mengen = $this->app->Secure->GetPOST('manuell_mengen');
|
||||||
|
$manuell_bemerkungen = $this->app->Secure->GetPOST('manuell_bemerkungen');
|
||||||
|
|
||||||
|
foreach ($manuell_artikel_ids as $key => $artikel) {
|
||||||
|
$menge = $manuell_mengen[$key];
|
||||||
|
$bemerkung = $manuell_bemerkungen[$key];
|
||||||
|
if ($menge <= 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "INSERT INTO paketdistribution(
|
||||||
|
id,
|
||||||
|
bearbeiter,
|
||||||
|
zeit,
|
||||||
|
paketannahme,
|
||||||
|
adresse,
|
||||||
|
artikel,
|
||||||
|
menge,
|
||||||
|
vpe,
|
||||||
|
etiketten,
|
||||||
|
bemerkung,
|
||||||
|
bestellung_position,
|
||||||
|
vorlaeufig
|
||||||
|
)
|
||||||
|
VALUES(
|
||||||
|
'',
|
||||||
|
'" . $this->app->User->GetName() . "',
|
||||||
|
NOW(),
|
||||||
|
'$id',
|
||||||
|
'',
|
||||||
|
'$artikel',
|
||||||
|
'$menge',
|
||||||
|
'1',
|
||||||
|
'',
|
||||||
|
'".$this->app->DB->real_escape_string($bemerkung)."',
|
||||||
|
'',
|
||||||
|
1
|
||||||
|
)";
|
||||||
|
$this->app->DB->Insert($sql);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'vorlaeufige_buchen':
|
case 'vorlaeufige_buchen':
|
||||||
$ziellager_from_form = $this->app->erp->ReplaceLagerPlatz(true,$this->app->Secure->GetPOST('ziellager'),true); // Parameters: Target db?, value, from form?
|
$ziellager_from_form = $this->app->erp->ReplaceLagerPlatz(true,$this->app->Secure->GetPOST('ziellager'),true); // Parameters: Target db?, value, from form?
|
||||||
$sql = "SELECT * FROM paketdistribution WHERE paketannahme = ".$id." AND vorlaeufig = 1";
|
$sql = "SELECT * FROM paketdistribution WHERE paketannahme = ".$id." AND vorlaeufig = 1";
|
||||||
$positionen = $this->app->DB->SelectArr($sql);
|
$positionen = $this->app->DB->SelectArr($sql);
|
||||||
foreach ($positionen as $position) {
|
foreach ($positionen as $position) {
|
||||||
$bemerkung = "";
|
$bemerkung = "";
|
||||||
|
$artikel = $position['artikel'];
|
||||||
$menge = $position['menge'];
|
$menge = $position['menge'];
|
||||||
$bestellposition = $position['bestellung_position'];
|
$bestellposition = $position['bestellung_position'];
|
||||||
if ($menge > 0) {
|
if ($menge > 0) {
|
||||||
|
|
||||||
|
if (!empty($bestellposition)) {
|
||||||
// Gather info bestellung
|
// Gather info bestellung
|
||||||
$bparr = $this->app->DB->SelectRow("
|
$bparr = $this->app->DB->SelectRow("
|
||||||
SELECT
|
SELECT
|
||||||
@ -1998,7 +2138,15 @@ class Wareneingang {
|
|||||||
$bestellung_belegnr = $bparr['belegnr'];
|
$bestellung_belegnr = $bparr['belegnr'];
|
||||||
$vpe = $bparr['vpe'];
|
$vpe = $bparr['vpe'];
|
||||||
$menge_bestellung = $bparr['menge'];
|
$menge_bestellung = $bparr['menge'];
|
||||||
if ($bparr['lagerartikel']) {
|
$lagerartikel = $bparr['lagerartikel'];
|
||||||
|
$info_bestellung = ", Bestellung $bestellung_belegnr";
|
||||||
|
} else {
|
||||||
|
$artikelarr = $this->app->DB->SelectRow("SELECT nummer, lagerartikel FROM artikel WHERE id =".$position['artikel']);
|
||||||
|
$lagerartikel = $artikelarr['lagerartikel'];
|
||||||
|
$artikel_nr = $artikelarr['nummer'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($lagerartikel) {
|
||||||
// Get Lager_platz
|
// Get Lager_platz
|
||||||
if (empty($ziellager_from_form)) {
|
if (empty($ziellager_from_form)) {
|
||||||
$lager = $this->app->DB->Select("SELECT lager_platz FROM artikel WHERE id='" . $artikel . "' LIMIT 1");
|
$lager = $this->app->DB->Select("SELECT lager_platz FROM artikel WHERE id='" . $artikel . "' LIMIT 1");
|
||||||
@ -2012,10 +2160,13 @@ class Wareneingang {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Put stock
|
// Put stock
|
||||||
$this->app->erp->LagerEinlagern($artikel, $menge, $lager, '', "Wareneingang Paket $id, Bestellung $bestellung_belegnr", '', $id);
|
$this->app->erp->LagerEinlagern($artikel, $menge, $lager, '', "Wareneingang Paket $id".$info_bestellung, '', $id);
|
||||||
$lagerplatz_name = $this->app->DB->Select("SELECT kurzbezeichnung FROM lager_platz WHERE lager_platz.id = $lager LIMIT 1");
|
$lagerplatz_name = $this->app->DB->Select("SELECT kurzbezeichnung FROM lager_platz WHERE lager_platz.id = $lager LIMIT 1");
|
||||||
$bemerkung = $lagerplatz_name;
|
$bemerkung = trim($position['bemerkung']." ".$lagerplatz_name);
|
||||||
|
} else {
|
||||||
|
$bemerkung = $position['bemerkung'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Increase bestellung_position geliefert_menge
|
// Increase bestellung_position geliefert_menge
|
||||||
$geliefert = $this->app->DB->Select("SELECT ifnull(geliefert,0) FROM bestellung_position WHERE id='$bestellposition' LIMIT 1");
|
$geliefert = $this->app->DB->Select("SELECT ifnull(geliefert,0) FROM bestellung_position WHERE id='$bestellposition' LIMIT 1");
|
||||||
$geliefert += $menge;
|
$geliefert += $menge;
|
||||||
@ -2167,12 +2318,17 @@ class Wareneingang {
|
|||||||
//$this->app->Tpl->Set('TAB1TEXT', 'Bestellungen');
|
//$this->app->Tpl->Set('TAB1TEXT', 'Bestellungen');
|
||||||
//$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->Set('ISNOTLIEFERANTSTART', '<!--');
|
||||||
|
$this->app->Tpl->Set('ISNOTLIEFERANTENDE', '-->');
|
||||||
|
$this->app->Tpl->Set('TAB1TEXT', 'Artikel aus Bestellungen');
|
||||||
|
$this->app->Tpl->Set('TAB2TEXT', 'Artikel manuell');
|
||||||
$this->app->Tpl->Add('TAB1', "<legend>Offene Artikel aus Bestellungen bei $name:</legend>");
|
$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__);
|
||||||
|
$this->app->YUI->TableSearch('TAB2', 'wareneingang_manuell', "show", "", "", basename(__FILE__), __CLASS__);
|
||||||
} else {
|
} else {
|
||||||
$this->app->Tpl->Set('ISLIEFERANTSTART', '<!--');
|
$this->app->Tpl->Set('ISLIEFERANTSTART', '<!--');
|
||||||
$this->app->Tpl->Set('ISLIEFERANTENDE', '-->');
|
$this->app->Tpl->Set('ISLIEFERANTENDE', '-->');
|
||||||
|
$this->app->YUI->TableSearch('TAB1', 'wareneingang_manuell', "show", "", "", basename(__FILE__), __CLASS__);
|
||||||
/* $this->app->Tpl->Set('TAB1START', '');
|
/* $this->app->Tpl->Set('TAB1START', '');
|
||||||
$this->app->Tpl->Set('TAB1ENDE', '');*/
|
$this->app->Tpl->Set('TAB1ENDE', '');*/
|
||||||
// $this->app->Tpl->Set('BEFORETAB1', '<!--');
|
// $this->app->Tpl->Set('BEFORETAB1', '<!--');
|
||||||
|
BIN
www/themes/new/images/lagerplatz_grau.png
Normal file
BIN
www/themes/new/images/lagerplatz_grau.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
Loading…
Reference in New Issue
Block a user