mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-12 06:41:14 +01:00
Remove old unused code from erpapi
This commit is contained in:
parent
1ab2bea2f1
commit
bca6aa04ef
@ -15888,127 +15888,6 @@ function Gegenkonto($ust_befreit,$ustid='', $doctype = '', $doctypeId = 0)
|
||||
$this->app->Tpl->Parse('PAGE','emptytab.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function GetTrackingRawLink($id)
|
||||
{
|
||||
return $this->GetTrackinglink($id, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param bool $returnRaw
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function GetTrackinglink($id, $returnRaw = false)
|
||||
{
|
||||
if($id > 0)
|
||||
{
|
||||
$versandarr = $this->app->DB->SelectRow("SELECT * FROM versand WHERE id='$id' LIMIT 1");
|
||||
}
|
||||
if(empty($versandarr))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
$adresse = $versandarr['adresse'];
|
||||
$lieferscheinid = $versandarr['lieferschein'];
|
||||
if($lieferscheinid > 0){
|
||||
$lieferscheinarr = $this->app->DB->SelectRow("SELECT auftragid,projekt FROM lieferschein WHERE id='$lieferscheinid' LIMIT 1");
|
||||
}
|
||||
if(!empty($lieferscheinarr))
|
||||
{
|
||||
$auftrag = $lieferscheinarr['auftragid'];
|
||||
$projekt = $lieferscheinarr['projekt'];
|
||||
}else{
|
||||
$auftrag = 0;
|
||||
$projekt = 0;
|
||||
}
|
||||
$auftragarr = $this->app->DB->SelectRow("SELECT belegnr,internet,ihrebestellnummer,DATE_FORMAT(datum,'%d.%m.%Y') as datum_de FROM auftrag WHERE id='$auftrag' LIMIT 1");
|
||||
if(!empty($auftragarr)){
|
||||
$auftragbelegnr = $auftragarr['belegnr'];
|
||||
$auftraginternet = $auftragarr['internet'];
|
||||
$ihrebestellnummer = $auftragarr['ihrebestellnummer'];
|
||||
$auftragdatum = $auftragarr['datum_de'];
|
||||
}else{
|
||||
$auftragbelegnr = '';
|
||||
$auftraginternet = '';
|
||||
$ihrebestellnummer = '';
|
||||
$auftragdatum = '';
|
||||
}
|
||||
|
||||
$tracking = $versandarr['tracking'];
|
||||
$versandunternehmen = $versandarr['versandunternehmen'];
|
||||
|
||||
// FIX fuer selbstabholer Mail
|
||||
$versandart = $versandarr['versandart'];
|
||||
if($versandart=='selbstabholer') {
|
||||
$versandunternehmen='selbstabholer';
|
||||
}
|
||||
|
||||
if($versandunternehmen=='dhl' || $versandunternehmen=="dhlpremium" || $versandunternehmen=="intraship"){
|
||||
$versandmodul = false;
|
||||
}
|
||||
|
||||
$typ = $versandunternehmen;
|
||||
if($typ === ''){
|
||||
$typ = $versandart;
|
||||
}
|
||||
//$versandartenmodul = $this->app->DB->SelectArr("SELECT id, modul FROM versanddienstleister WHERE aktiv = 1 AND modul = '".$this->app->DB->real_escape_string($typ)."' AND (projekt = 0 OR projekt = '$projekt') ORDER BY projekt DESC LIMIT 1");
|
||||
$versandartenmodul = $this->app->DB->SelectArr("SELECT * FROM versandarten WHERE aktiv = 1 AND ausprojekt = 0 AND modul != '' AND type = '".$this->app->DB->real_escape_string($typ)."' AND modul != '' AND (projekt = 0 OR projekt = '$projekt') ORDER BY projekt DESC LIMIT 1");
|
||||
$standard = true;
|
||||
if($versandartenmodul && @is_file(dirname(__FILE__).'/versandarten/'.$versandartenmodul[0]['modul'].'.php'))
|
||||
{
|
||||
$obj = $this->LoadVersandModul($versandartenmodul[0]['modul'], $versandartenmodul[0]['id']);
|
||||
if(!empty($obj) && method_exists($obj, 'Trackinglink'))
|
||||
{
|
||||
if($obj->Trackinglink($tracking, $notsend, $link, $rawlink))
|
||||
{
|
||||
if($returnRaw) {
|
||||
return $rawlink;
|
||||
}
|
||||
return $link;
|
||||
}
|
||||
}
|
||||
}elseif($versandartenmodul2 = $this->app->DB->SelectArr("SELECT * FROM versandarten WHERE aktiv = 1 AND ausprojekt = 0 AND type = '".$this->app->DB->real_escape_string($typ)."' AND (projekt = 0 OR projekt = '$projekt') ORDER BY projekt DESC LIMIT 1"))
|
||||
{
|
||||
$obj = $this->LoadVersandModul($versandartenmodul2[0]['modul'], $versandartenmodul2[0]['id']);
|
||||
if(!empty($obj) && method_exists($obj, 'Trackinglink'))
|
||||
{
|
||||
if($obj->Trackinglink($tracking, $notsend, $link, $rawlink))
|
||||
{
|
||||
if($returnRaw) {
|
||||
return $rawlink;
|
||||
}
|
||||
return $link;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$versandmodul && $standard)
|
||||
{
|
||||
if($versandunternehmen=="dhl" || $versandunternehmen=="dhlpremium" || $versandunternehmen=="intraship")
|
||||
{
|
||||
return 'http://nolp.dhl.de/nextt-online-public/set_identcodes.do?lang=de&idc='.$tracking;
|
||||
}
|
||||
else if ($versandunternehmen=="logoix")
|
||||
{
|
||||
return 'http://www.logoix.com/cgi-bin/tnt.pl?q='.$tracking;
|
||||
}
|
||||
else if ($versandunternehmen=="dpd")
|
||||
{
|
||||
return 'https://tracking.dpd.de/parcelstatus/?locale=de_DE&query='.$tracking;
|
||||
}
|
||||
else if ($versandunternehmen=="gls")
|
||||
{
|
||||
return 'https://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/DE03/DE/5004.htm?txtRefNo='.$tracking;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user