mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
versand added tracking for mail variables, minor bugfixes
This commit is contained in:
parent
c67d91a7dd
commit
2f646a7715
@ -3666,7 +3666,7 @@ class YUI {
|
||||
ELSE CONCAT(
|
||||
CASE
|
||||
WHEN lieferscheine <> '' AND vmenge = lmenge THEN '$lieferschein_voll'
|
||||
WHEN lieferscheine <> '' AND vmenge IS NULL THEN '$lieferschein_ohne_pos'
|
||||
WHEN lieferschein_ohne_pos <> '' AND vmenge IS NULL THEN '$lieferschein_ohne_pos'
|
||||
WHEN lieferscheine <> '' THEN '$lieferschein_teil'
|
||||
ELSE
|
||||
'$lieferschein_kein'
|
||||
|
@ -4779,11 +4779,36 @@ title: 'Abschicken',
|
||||
$clieferscheine = !empty($lieferscheine)?count($lieferscheine):0;
|
||||
for($li=0;$li<$clieferscheine;$li++)
|
||||
{
|
||||
$tracking = $this->app->DB->SelectArr("SELECT tracking FROM versand WHERE lieferschein='".$lieferscheine[$li]['id']."' AND lieferschein > 0 AND tracking!=''");
|
||||
/* $tracking = $this->app->DB->SelectArr("SELECT tracking FROM versand WHERE lieferschein='".$lieferscheine[$li]['id']."' AND lieferschein > 0 AND tracking!=''");
|
||||
$ctracking = !empty($tracking)?count($tracking):0;
|
||||
for($i=0;$i<$ctracking;$i++) {
|
||||
$tmptracking[] = $tracking[$i]['tracking'];
|
||||
}
|
||||
*/
|
||||
|
||||
$sql = "SELECT SQL_CALC_FOUND_ROWS
|
||||
v.id,
|
||||
v.tracking as tracking,
|
||||
v.tracking_link
|
||||
FROM
|
||||
versandpakete v
|
||||
LEFT JOIN
|
||||
versandpaket_lieferschein_position vlp ON v.id = vlp.versandpaket
|
||||
LEFT JOIN
|
||||
lieferschein_position lp ON lp.id = vlp.lieferschein_position
|
||||
LEFT JOIN
|
||||
lieferschein l ON lp.lieferschein = l.id
|
||||
WHERE l.id = ".$lieferscheine[$li]['id']." OR v.lieferschein_ohne_pos = ".$lieferscheine[$li]['id']."
|
||||
GROUP BY
|
||||
v.id
|
||||
";
|
||||
$tracking = $this->app->DB->SelectArr($sql);
|
||||
$tracking_list = array();
|
||||
foreach ($tracking as $single_tracking) {
|
||||
$tmptracking[] = $single_tracking['tracking'];
|
||||
$tracking_list[] = '<a href="'.$single_tracking['tracking_link'].'">'.$single_tracking['tracking'].'</a>';
|
||||
}
|
||||
|
||||
/*
|
||||
$nve = $this->app->DB->SelectArr("SELECT nve FROM spedition_packstuecke WHERE lieferschein='".$lieferscheine[$li]['id']."' AND nve!='' AND status!='storniert'");
|
||||
$cnve = !empty($nve)?count($nve):0;
|
||||
@ -4791,7 +4816,11 @@ title: 'Abschicken',
|
||||
$tmpnve[] = $nve[$i]['nve'];
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
$text = str_replace('{TRACKINGNUMMER}',!empty($tmptracking)?implode(", ",$tmptracking):'',$text);
|
||||
$text = str_replace('{TRACKINGLINK}',!empty($tracking_list)?implode(", ",$tracking_list):'',$text);
|
||||
$text = str_replace('{NVE}',!empty($tmpnve)?implode(", ",$tmpnve):'',$text);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
||||
<li>{|Stornierung|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {INTERNET}</i></li>
|
||||
<li>{|ZahlungMiss|} <i>{|Variablen|}: {AUFTRAG}, {DATUM}, {GESAMT}, {REST}, {ANSCHREIBEN}, {INTERNET}</i></li>
|
||||
<li>Mahnung <i>Variablen: {BELEGNR}, {DATUM}, {OFFEN}, {MAHNGEBUEHR}, {HEUTE}</i></li>
|
||||
<li>{|Versand|} <i>{|Variablen|}: {VERSAND}, {VERSANDTYPE}, {VERSANDBEZEICHNUNG}, {TRACKINGNUMMER}, {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}, {LIEFERADRESSE}, {LIEFERADRESSELANG}</i></li>
|
||||
<li>{|Versand|} <i>{|Variablen|}: {VERSAND}, {VERSANDTYPE}, {VERSANDBEZEICHNUNG}, {TRACKINGNUMMER}, {TRACKINGLINK}, {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}, {LIEFERADRESSE}, {LIEFERADRESSELANG}</i></li>
|
||||
<li>{|VersandMailDokumente|} <i>{|Variablen|}: {NAME}, {ANSCHREIBEN}, {BELEGNR}, {IHREBESTELLNUMMER}, {INTERNET}, {AUFTRAGDATUM}</i></li>
|
||||
<li>{|Erweiterte Freigabe|} <i>{|Variablen|}: {REQUESTER}, {LINK}, {LINKFREIGABEUEBERSICHT}, {DOCTYPE}, {DOCTYPE_ID}</i></li>
|
||||
<li>{|Selbstabholer|}</li>
|
||||
|
@ -54,6 +54,14 @@
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr [TRACKING_LINK_EDIT_HIDDEN]>
|
||||
<td>
|
||||
{|Tracking link|}:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="tracking_link" id="tracking_link" value="[TRACKING_LINK]" size="40" [TRACKING_DISABLED]>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{|Gewicht Kg|}:
|
||||
|
@ -8,7 +8,7 @@
|
||||
<div class="col-xs-12 col-md-12 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|<b>Lieferung <font color="blue">[BELEGNR]</font></b>|}</legend>
|
||||
<legend>{|<b>Lieferung zu <font color="blue"><a href="index.php?module=lieferschein&action=edit&id=[BELEGID]">Lieferschein [BELEGNR]</a></font></b>|}</legend>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -559,6 +559,7 @@ class Versandpakete {
|
||||
|
||||
if (!empty($info)) {
|
||||
$this->app->Tpl->Set('BELEGNR', $info[0]['belegnr']);
|
||||
$this->app->Tpl->Set('BELEGID', $lieferschein_filter);
|
||||
$this->app->Tpl->SetText('KURZUEBERSCHRIFT2', $info[0]['name']." Lieferung ".$info[0]['belegnr']);
|
||||
|
||||
$complete = $this->versandpakete_check_completion($lieferschein_filter, null);
|
||||
@ -633,10 +634,8 @@ class Versandpakete {
|
||||
}
|
||||
|
||||
// Check versandart
|
||||
if (empty($input['versandart'])) {
|
||||
$sql = "UPDATE versandpakete SET versandart = (SELECT versandart FROM (".self::SQL_VERSANDPAKETE_LIEFERSCHEIN.") v INNER JOIN lieferschein l ON v.lieferschein = l.id WHERE versandpaket = ".$id." LIMIT 1)";
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
$sql = "UPDATE versandpakete SET versandart = (SELECT versandart FROM (".self::SQL_VERSANDPAKETE_LIEFERSCHEIN.") v INNER JOIN lieferschein l ON v.lieferschein = l.id WHERE v.versandpaket = ".$id." LIMIT 1) WHERE id = ".$id;
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
switch ($submit) {
|
||||
case 'speichern':
|
||||
@ -734,6 +733,8 @@ class Versandpakete {
|
||||
$this->app->Tpl->Set('LIEFERSCHEIN_ADD_POS_HIDDEN', 'hidden');
|
||||
$this->app->Tpl->Set('LIEFERSCHEIN_GEWICHT_DISABLED', 'disabled');
|
||||
$this->app->Tpl->Set('PAKETMARKE_ADD_HIDDEN', 'hidden');
|
||||
$this->app->Tpl->Set('TRACKING_DISABLED', 'disabled');
|
||||
$this->app->Tpl->Set('TRACKING_LINK_EDIT_HIDDEN', 'hidden');
|
||||
}
|
||||
if ($result[0]['status'] != 'versendet') {
|
||||
$this->app->Tpl->Set('ABSCHLIESSEN_HIDDEN', 'hidden');
|
||||
@ -754,6 +755,7 @@ class Versandpakete {
|
||||
$this->app->Tpl->Set('PAKETMARKE_ADD_HIDDEN', 'hidden');
|
||||
} else {
|
||||
$this->app->Tpl->Set('TRACKING_DISABLED', 'disabled');
|
||||
$this->app->Tpl->Set('TRACKING_LINK_EDIT_HIDDEN', 'hidden');
|
||||
}
|
||||
|
||||
$file_attachments = $this->app->erp->GetDateiSubjektObjekt('paketmarke','versandpaket',$id);
|
||||
@ -786,6 +788,7 @@ class Versandpakete {
|
||||
GROUP BY v.id
|
||||
) temp
|
||||
";
|
||||
|
||||
$icons = $this->app->DB->SelectArr($sql);
|
||||
$this->app->Tpl->Set('ICONS', $icons[0]['icons']);
|
||||
|
||||
@ -1185,6 +1188,7 @@ class Versandpakete {
|
||||
$input['gewicht'] = $this->app->Secure->GetPOST('gewicht');
|
||||
$input['bemerkung'] = $this->app->Secure->GetPOST('bemerkung');
|
||||
$input['tracking'] = $this->app->Secure->GetPOST('tracking');
|
||||
$input['tracking_link'] = $this->app->Secure->GetPOST('tracking_link');
|
||||
return $input;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user