mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-12 06:41:14 +01:00
verbindlichkeit added findcols and filters
This commit is contained in:
parent
0806785d91
commit
c424d79fd6
@ -21,7 +21,7 @@
|
|||||||
[STATUSICONS]
|
[STATUSICONS]
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset style="float: right;">
|
<fieldset style="float: right;">
|
||||||
<button [AKTION_SPEICHERN_DISABLED] name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button>
|
<button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<table width="100%" border="0" class="mkTableFormular">
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
<legend>{|Aktionen|}</legend>
|
<legend>{|Aktionen|}</legend>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button [AKTION_SPEICHERN_DISABLED] name="submit" value="positionen_hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzufügen</button></td>
|
<td><button [SAVEDISABLED] name="submit" value="positionen_hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzufügen</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@ -59,13 +59,13 @@
|
|||||||
<td>Sachkonto: <input type="text" id="positionen_sachkonto" name="positionen_sachkonto" value=""></td>
|
<td>Sachkonto: <input type="text" id="positionen_sachkonto" name="positionen_sachkonto" value=""></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button name="submit" value="positionen_sachkonto_speichern" class="ui-button-icon" style="width:100%;">Anpassen</button></td>
|
<td><button [SAVEDISABLED] name="submit" value="positionen_sachkonto_speichern" class="ui-button-icon" style="width:100%;">Anpassen</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Steuersatz: <input type="text" id="positionen_steuersatz" name="positionen_steuersatz" value=""></td>
|
<td>Steuersatz: <input type="text" id="positionen_steuersatz" name="positionen_steuersatz" value=""></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button name="submit" value="positionen_steuersatz_speichern" class="ui-button-icon" style="width:100%;">Anpassen</button></td>
|
<td><button [SAVEDISABLED] name="submit" value="positionen_steuersatz_speichern" class="ui-button-icon" style="width:100%;">Anpassen</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
@ -194,7 +194,7 @@ class Verbindlichkeit {
|
|||||||
$heading = array('Paket-Nr.','Paket-Pos.', 'Bestellung', 'Lieferschein', 'Rechnung', 'Artikel-Nr.','Artikel','Menge','Menge offen','Eingabe','Preis','');
|
$heading = array('Paket-Nr.','Paket-Pos.', 'Bestellung', 'Lieferschein', 'Rechnung', 'Artikel-Nr.','Artikel','Menge','Menge offen','Eingabe','Preis','');
|
||||||
$width = array( '1%', '1%', '5%', '5%', '5%', '5%', '20%', '2%', '1%', '1%', '1%', '1%');
|
$width = array( '1%', '1%', '5%', '5%', '5%', '5%', '20%', '2%', '1%', '1%', '1%', '1%');
|
||||||
|
|
||||||
$findcols = array('id','belegnr');
|
$findcols = array('pa','auswahl','belegnr','lsnr','renr','artikelnummer','name_de','menge','offen_menge','offen_menge','preis','pa');
|
||||||
$searchsql = array('p.nummer', 'p.name', 'p.bemerkung');
|
$searchsql = array('p.nummer', 'p.name', 'p.bemerkung');
|
||||||
|
|
||||||
$alignright = array(8,9,11);
|
$alignright = array(8,9,11);
|
||||||
@ -288,13 +288,13 @@ class Verbindlichkeit {
|
|||||||
$sql = "
|
$sql = "
|
||||||
SELECT SQL_CALC_FOUND_ROWS * FROM (
|
SELECT SQL_CALC_FOUND_ROWS * FROM (
|
||||||
SELECT
|
SELECT
|
||||||
pa.id pa,
|
pa.id pa_id,
|
||||||
".$this->app->erp->ConcatSQL($paketlink).",
|
".$this->app->erp->ConcatSQL($paketlink)." pa,
|
||||||
".$this->app->erp->ConcatSQL($auswahl)." AS auswahl,
|
".$this->app->erp->ConcatSQL($auswahl)." AS auswahl,
|
||||||
if(b.belegnr LIKE '%".$bestellnummer."%',CONCAT('<b>',b.belegnr,'</b>'),b.belegnr) AS belegnr,
|
if(b.belegnr LIKE '%".$bestellnummer."%',CONCAT('<b>',b.belegnr,'</b>'),b.belegnr) AS belegnr,
|
||||||
pa.lsnr,
|
pa.lsnr,
|
||||||
if(pa.renr LIKE '%".$rechnung."%',CONCAT('<b>',pa.renr,'</b>'),pa.renr) AS renr,
|
if(pa.renr LIKE '%".$rechnung."%',CONCAT('<b>',pa.renr,'</b>'),pa.renr) AS renr,
|
||||||
".$this->app->erp->ConcatSQL($artikellink).",
|
".$this->app->erp->ConcatSQL($artikellink)." AS artikelnummer,
|
||||||
art.name_de,
|
art.name_de,
|
||||||
pd.menge,
|
pd.menge,
|
||||||
IF(
|
IF(
|
||||||
@ -303,7 +303,7 @@ class Verbindlichkeit {
|
|||||||
0
|
0
|
||||||
) offen_menge,
|
) offen_menge,
|
||||||
".$this->app->erp->ConcatSQL($werte).",
|
".$this->app->erp->ConcatSQL($werte).",
|
||||||
".$this->app->erp->ConcatSQL($preise)."
|
".$this->app->erp->ConcatSQL($preise)." AS preis
|
||||||
FROM
|
FROM
|
||||||
paketannahme pa
|
paketannahme pa
|
||||||
INNER JOIN paketdistribution pd ON
|
INNER JOIN paketdistribution pd ON
|
||||||
@ -340,13 +340,13 @@ class Verbindlichkeit {
|
|||||||
$allowed['verbindlichkeit_positionen'] = array('list');
|
$allowed['verbindlichkeit_positionen'] = array('list');
|
||||||
|
|
||||||
$id = $app->Secure->GetGET('id');
|
$id = $app->Secure->GetGET('id');
|
||||||
$freigabe = $app->DB->Select("SELECT freigabe FROM verbindlichkeit WHERE id = ".$id);
|
$freigabe = $app->DB->Select("SELECT freigabe FROM verbindlichkeit WHERE id = '".$id."'");
|
||||||
|
|
||||||
// $heading = array('Paket-Nr.','Paket-Pos.', 'Bestellung', 'Artikel-Nr.','Artikel','Menge','Preis','Steuersatz','Sachkonto','Menü','');
|
// $heading = array('Paket-Nr.','Paket-Pos.', 'Bestellung', 'Artikel-Nr.','Artikel','Menge','Preis','Steuersatz','Sachkonto','Menü','');
|
||||||
$heading = array('', 'Paket-Nr.','Paket-Pos.', 'Bestellung', 'Artikel-Nr.','Artikel','Menge','Preis','Steuersatz abw.','Sachkonto abw.');
|
$heading = array('', 'Paket-Nr.','Paket-Pos.', 'Bestellung', 'Artikel-Nr.','Artikel','Menge','Preis','Steuersatz abw.','Sachkonto abw.');
|
||||||
$width = array( '1%','1%', '1%' , '2%', '2%', '16%', '1%', '1%', '1%', '3%', '1%', '1%');
|
$width = array( '1%','1%', '1%' , '2%', '2%', '16%', '1%', '1%', '1%', '3%', '1%', '1%');
|
||||||
|
|
||||||
$findcols = array('id','id');
|
$findcols = array('vp.id','pd.paketannahme','pd.id','b.belegnr','art.nummer','art.name_de','vp.menge','vp.preis','vp.steuersatz',"CONCAT(skv.sachkonto,' ',skv.beschriftung)",'vp.id','1');
|
||||||
$searchsql = array('p.nummer', 'p.name', 'p.bemerkung');
|
$searchsql = array('p.nummer', 'p.name', 'p.bemerkung');
|
||||||
|
|
||||||
$alignright = array(6,7,8,9);
|
$alignright = array(6,7,8,9);
|
||||||
@ -369,11 +369,19 @@ class Verbindlichkeit {
|
|||||||
|
|
||||||
$box = "CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',vp.id,'\" />') AS `auswahl`";
|
$box = "CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',vp.id,'\" />') AS `auswahl`";
|
||||||
|
|
||||||
|
$paketlink = array (
|
||||||
|
'<a href="index.php?module=wareneingang&action=distriinhalt&id=',
|
||||||
|
['sql' => 'pd.paketannahme'],
|
||||||
|
'">',
|
||||||
|
['sql' => 'pd.paketannahme'],
|
||||||
|
'</a>'
|
||||||
|
);
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT SQL_CALC_FOUND_ROWS
|
SELECT SQL_CALC_FOUND_ROWS
|
||||||
vp.id,
|
vp.id,
|
||||||
$box,
|
$box,
|
||||||
pd.paketannahme,
|
".$this->app->erp->ConcatSQL($paketlink)." pa,
|
||||||
pd.id paket_position,
|
pd.id paket_position,
|
||||||
b.belegnr,
|
b.belegnr,
|
||||||
art.nummer,
|
art.nummer,
|
||||||
@ -800,6 +808,11 @@ class Verbindlichkeit {
|
|||||||
$this->app->Tpl->Set('POSITIONENMESSAGE', '<div class="success">Positionen vollständig</div>');
|
$this->app->Tpl->Set('POSITIONENMESSAGE', '<div class="success">Positionen vollständig</div>');
|
||||||
} else {
|
} else {
|
||||||
$this->app->Tpl->Set('POSITIONENMESSAGE', '<div class="warning">Positionen nicht vollständig. Bruttobetrag '.$verbindlichkeit_from_db['betrag'].', Summe Positionen (brutto) '.round($betrag_brutto,2).', Summe Positionen (netto) '.round($betrag_netto,2).'</div>');
|
$this->app->Tpl->Set('POSITIONENMESSAGE', '<div class="warning">Positionen nicht vollständig. Bruttobetrag '.$verbindlichkeit_from_db['betrag'].', Summe Positionen (brutto) '.round($betrag_brutto,2).', Summe Positionen (netto) '.round($betrag_netto,2).'</div>');
|
||||||
|
|
||||||
|
if ($verbindlichkeit_from_db['freigabe']) {
|
||||||
|
$this->app->DB->Update("UPDATE verbindlichkeit SET freigabe = 0 WHERE id = ".$id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->app->Tpl->Set('BETRAGDISABLED', 'disabled');
|
$this->app->Tpl->Set('BETRAGDISABLED', 'disabled');
|
||||||
@ -834,10 +847,16 @@ class Verbindlichkeit {
|
|||||||
$this->app->Tpl->Set('POSITIONHINZUFUEGENHIDDEN','hidden');
|
$this->app->Tpl->Set('POSITIONHINZUFUEGENHIDDEN','hidden');
|
||||||
} else {
|
} else {
|
||||||
$this->app->Tpl->Set('RUECKSETZENEINKAUFHIDDEN','hidden');
|
$this->app->Tpl->Set('RUECKSETZENEINKAUFHIDDEN','hidden');
|
||||||
|
$this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($positionen)) {
|
||||||
|
$this->app->Tpl->Set('FREIGABEEINKAUFHIDDEN','hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($verbindlichkeit_from_db['rechnungsfreigabe']) {
|
if ($verbindlichkeit_from_db['rechnungsfreigabe']) {
|
||||||
$this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden');
|
$this->app->Tpl->Set('FREIGABEBUCHHALTUNGHIDDEN','hidden');
|
||||||
|
$this->app->Tpl->Set('RUECKSETZENEINKAUFHIDDEN','hidden');
|
||||||
} else {
|
} else {
|
||||||
$this->app->Tpl->Set('RUECKSETZENBUCHHALTUNGHIDDEN','hidden');
|
$this->app->Tpl->Set('RUECKSETZENBUCHHALTUNGHIDDEN','hidden');
|
||||||
}
|
}
|
||||||
@ -1037,7 +1056,7 @@ class Verbindlichkeit {
|
|||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
$gotoedit = true;
|
$gotoedit = true;
|
||||||
}
|
}
|
||||||
$sql = "UPDATE verbindlichkeit SET rechnungsfreigabe = 1 WHERE id=".$id;
|
$sql = "UPDATE verbindlichkeit SET rechnungsfreigabe = 1 WHERE freigabe = 1 AND id=".$id;
|
||||||
$this->app->DB->Update($sql);
|
$this->app->DB->Update($sql);
|
||||||
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben (Buchhaltung)");
|
$this->app->erp->BelegProtokoll("verbindlichkeit",$id,"Verbindlichkeit freigegeben (Buchhaltung)");
|
||||||
if ($gotoedit) {
|
if ($gotoedit) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user