diff --git a/www/lib/dokumente/class.briefpapier.php b/www/lib/dokumente/class.briefpapier.php index 46d1811d..ee8c7e6b 100644 --- a/www/lib/dokumente/class.briefpapier.php +++ b/www/lib/dokumente/class.briefpapier.php @@ -307,6 +307,36 @@ class Briefpapier extends SuperFPDF { public function GetChargeMHDSNString($type,$doctype,$doctypeid,$posid, $returnSimpleString = false) { + + + switch ($type) { + case 'sn': + $sql = "SELECT + s.seriennummer + FROM + seriennummern s + INNER JOIN + seriennummern_lieferschein_position slp ON slp.seriennummer = s.id + WHERE + slp.lieferschein_position = $posid + "; + $values = $this->app->DB->SelectArr($sql); + return(implode(', ',array_column($values,'seriennummer'))); + break; + } + + if(!empty($values)){ + if($returnSimpleString) { + return implode(', ', $values); + } + return implode("\r\n",$values); + } + return ''; + + +// XENTRAL Legacy +/* + $lieferschein_posid = 0; $auftrag_position_id = 0; $lieferschein = 0; @@ -560,6 +590,7 @@ class Briefpapier extends SuperFPDF { return implode("\r\n",$tmp_string); } return ''; +*/ } function CheckPosition($value,$doctype,$doctypeid,$posid) @@ -3306,6 +3337,10 @@ class Briefpapier extends SuperFPDF { } } + // OpenXE Seriennummern + + + if(!empty($this->doctype) && !empty($this->id) && strpos($item['desc'], '{') !== false) { $item['desc'] = $this->app->erp->ParseUserVars($this->doctype, $this->id ,$item['desc']); }