mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
Merge branch 'master' into onlineshops
This commit is contained in:
commit
b8d412ba93
@ -75,7 +75,9 @@
|
||||
[MANUELLFREIGABEEINKAUF]
|
||||
[MANUELLFREIGABEBUCHHALTUNG]
|
||||
[ALSBEZAHLTMARKIEREN]
|
||||
<option value="drucken">{|drucken|}</option>
|
||||
</select>
|
||||
{|Drucker|}: <select name="seldrucker">[SELDRUCKER]</select>
|
||||
<button name="submit" value="ausfuehren" class="ui-button-icon">{|Ausführen|}</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@ -75,8 +75,10 @@
|
||||
[MANUELLFREIGABEEINKAUF]
|
||||
[MANUELLFREIGABEBUCHHALTUNG]
|
||||
[ALSBEZAHLTMARKIEREN]
|
||||
<option value="drucken">{|drucken|}</option>
|
||||
</select>
|
||||
<button name="submit" value="ausfuehren" class="ui-button-icon">{|Ausführen|}</button>
|
||||
{|Drucker|}: <select name="seldrucker">[SELDRUCKER]</select>
|
||||
<button name="submit" value="ausfuehren" class="ui-button-icon">{|Ausführen|}</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
[TAB1NEXT]
|
||||
|
@ -514,6 +514,31 @@ class lieferantengutschrift {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'drucken':
|
||||
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
||||
foreach ($selectedIds as $id) {
|
||||
$file_attachments = $this->app->erp->GetDateiSubjektObjekt('%','lieferantengutschrift',$id);
|
||||
if (!empty($file_attachments)) {
|
||||
foreach ($file_attachments as $file_attachment) {
|
||||
if ($this->app->erp->GetDateiEndung($file_attachment) == 'pdf') {
|
||||
$file_contents = $this->app->erp->GetDatei($file_attachment);
|
||||
$lieferantengutschrift = $this->app->DB->SelectRow("SELECT DATE_FORMAT(rechnungsdatum, '%Y%m%d') rechnungsdatum, belegnr FROM lieferantengutschrift WHERE id = ".$id." LIMIT 1");
|
||||
$file_name = $lieferantengutschrift['rechnungsdatum']."_LG".$lieferantengutschrift['belegnr'].".pdf";
|
||||
$file_path = rtrim($this->app->erp->GetTMP(),'/')."/".$file_name;
|
||||
$handle = fopen ($file_path, "wb");
|
||||
if ($handle)
|
||||
{
|
||||
fwrite($handle, $file_contents);
|
||||
fclose($handle);
|
||||
$this->app->printer->Drucken($drucker,$file_path);
|
||||
} else {
|
||||
$this->app->YUI->Message('error',"Drucken fehlgeschlagen!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -542,6 +567,8 @@ class lieferantengutschrift {
|
||||
$this->app->User->SetParameter('table_lieferantengutschrift_list_zahlbarbis', '');
|
||||
$this->app->User->SetParameter('table_lieferantengutschrift_list_skontobis', '');
|
||||
|
||||
$this->app->Tpl->Set('SELDRUCKER', $this->app->erp->GetSelectDrucker());
|
||||
|
||||
$this->app->Tpl->Parse('PAGE', "lieferantengutschrift_list.tpl");
|
||||
}
|
||||
|
||||
|
@ -502,6 +502,31 @@ class Verbindlichkeit {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'drucken':
|
||||
$drucker = $this->app->Secure->GetPOST('seldrucker');
|
||||
foreach ($selectedIds as $id) {
|
||||
$file_attachments = $this->app->erp->GetDateiSubjektObjekt('%','verbindlichkeit',$id);
|
||||
if (!empty($file_attachments)) {
|
||||
foreach ($file_attachments as $file_attachment) {
|
||||
if ($this->app->erp->GetDateiEndung($file_attachment) == 'pdf') {
|
||||
$file_contents = $this->app->erp->GetDatei($file_attachment);
|
||||
$verbindlichkeit = $this->app->DB->SelectRow("SELECT DATE_FORMAT(rechnungsdatum, '%Y%m%d') rechnungsdatum, belegnr FROM verbindlichkeit WHERE id = ".$id." LIMIT 1");
|
||||
$file_name = $verbindlichkeit['rechnungsdatum']."_VB".$verbindlichkeit['belegnr'].".pdf";
|
||||
$file_path = rtrim($this->app->erp->GetTMP(),'/')."/".$file_name;
|
||||
$handle = fopen ($file_path, "wb");
|
||||
if ($handle)
|
||||
{
|
||||
fwrite($handle, $file_contents);
|
||||
fclose($handle);
|
||||
$this->app->printer->Drucken($drucker,$file_path);
|
||||
} else {
|
||||
$this->app->YUI->Message('error',"Drucken fehlgeschlagen!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -530,6 +555,8 @@ class Verbindlichkeit {
|
||||
$this->app->User->SetParameter('table_verbindlichkeit_list_zahlbarbis', '');
|
||||
$this->app->User->SetParameter('table_verbindlichkeit_list_skontobis', '');
|
||||
|
||||
$this->app->Tpl->Set('SELDRUCKER', $this->app->erp->GetSelectDrucker());
|
||||
|
||||
$this->app->Tpl->Parse('PAGE', "verbindlichkeit_list.tpl");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user