Files
votianng/html/jobs/price_query.php
2026-03-29 10:34:57 +02:00

451 lines
20 KiB
PHP

<?php
/*=======================================================================
*
* price_query.php
*
* Autor: Carsten Annacker
*
=======================================================================*/
include_once("../include/auth.inc.php");
include_once("../include/caglobal.inc.php");
include_once("../include/global.inc.php");
include_once("../include/services_func.inc.php");
$hq_id = $HTTP_SESSION_VARS['hq_id'];
list ($zipcode1, $zipcode2, $zipcode3, $zipcode4, $zipcode5, $zipcode6, $vht_id, $markup, $job_hq_id) =
getHttpVars(array("zipcode1", "zipcode2", "zipcode3", "zipcode4", "zipcode5", "zipcode6", "vht_id", "jb_markup", "job_hq_id"));
//if ($zipcode1 == "" || $zipcode2 == "" || $vht_id == "") reportDie ("$PHP_SELF: Parameter fehlt!", false);
if ($job_hq_id != "")
$hq_id = $job_hq_id;
// Der Normalfall
$cs_invmode_default = -1;
// Besonderheit in Berlin: Zuerst Bereichs-Preise ermitteln ...
if ($hq_id == 3):
$cs_invmode_default = 2;
endif;
// Treibstoffzuschlag
$srvt_name = $db->getOne(
"SELECT mt_value FROM metatype WHERE mt_sort = '$vht_id' AND mt_type = 'vehicletype'");
$today = getdate();
$jb_ordertime = $today['year'] . "-" . $today['mon'] . "-" . $today['mday'] . " "
. $today['hours'] . ":" . $today['minutes'] . ":" . $today['seconds'];
$fuel_markup = str_replace(",", ".", $markup);
if ($fuel_markup == ""):
$fuel_markup = getFuelMarkup($srvt_name, 0, $hq_id, $jb_ordertime);
endif;
//echo "'$srvt_name, 0, $hq_id, $jb_ordertime'<b>";
//echo "'$fuel_markup'";
$grundpreis = 0;
list($tmpGrundpreis, $plzpreis1) = getPrice($zipcode1, $zipcode2, $cs_invmode_default, $fuel_markup);
if ($tmpGrundpreis > 0) $grundpreis = $tmpGrundpreis;
list($tmpGrundpreis, $plzpreis2) = getPrice($zipcode2, $zipcode3, $cs_invmode_default, $fuel_markup);
if ($tmpGrundpreis > 0) $grundpreis = $tmpGrundpreis;
list($tmpGrundpreis, $plzpreis3) = getPrice($zipcode3, $zipcode4, $cs_invmode_default, $fuel_markup);
if ($tmpGrundpreis > 0) $grundpreis = $tmpGrundpreis;
list($tmpGrundpreis, $plzpreis4) = getPrice($zipcode4, $zipcode5, $cs_invmode_default, $fuel_markup);
if ($tmpGrundpreis > 0) $grundpreis = $tmpGrundpreis;
list($tmpGrundpreis, $plzpreis5) = getPrice($zipcode5, $zipcode6, $cs_invmode_default, $fuel_markup);
if ($tmpGrundpreis > 0) $grundpreis = $tmpGrundpreis;
$fullprice = $grundpreis + $plzpreis1 + $plzpreis2 + $plzpreis3 + $plzpreis4 + $plzpreis5;
$valign = "center";
$area_names1 = "";
$area_names2 = "";
$area_names3 = "";
$area_names4 = "";
$area_names5 = "";
$area_price1 = "";
$area_price2 = "";
$area_price3 = "";
$area_price4 = "";
$area_price5 = "";
$area_fullprice = "";
// ... dann PLZ-Preise ermitteln!
if ($hq_id == 3):
$valign = "bottom";
$area_name1 = getAreaName($zipcode1);
$area_name2 = getAreaName($zipcode2);
$area_name3 = getAreaName($zipcode3);
$area_name4 = getAreaName($zipcode4);
$area_name5 = getAreaName($zipcode5);
$area_name6 = getAreaName($zipcode6);
$area_names1 = "<span style=\"color:red\">" . "VON&nbsp;$area_name1&nbsp;NACH&nbsp;$area_name2" . "</span>";
$area_names2 = "<span style=\"color:red\">" . "VON&nbsp;$area_name2&nbsp;NACH&nbsp;$area_name3" . "</span>";
$area_names3 = "<span style=\"color:red\">" . "VON&nbsp;$area_name3&nbsp;NACH&nbsp;$area_name4" . "</span>";
$area_names4 = "<span style=\"color:red\">" . "VON&nbsp;$area_name4&nbsp;NACH&nbsp;$area_name5" . "</span>";
$area_names5 = "<span style=\"color:red\">" . "VON&nbsp;$area_name5&nbsp;NACH&nbsp;$area_name6" . "</span>";
list($tmpGrundpreis, $area_price1) = getPrice($zipcode1, $zipcode2, 1, $fuel_markup);
list($tmpGrundpreis, $area_price2) = getPrice($zipcode2, $zipcode3, 1, $fuel_markup);
list($tmpGrundpreis, $area_price3) = getPrice($zipcode3, $zipcode4, 1, $fuel_markup);
list($tmpGrundpreis, $area_price4) = getPrice($zipcode4, $zipcode5, 1, $fuel_markup);
list($tmpGrundpreis, $area_price5) = getPrice($zipcode5, $zipcode6, 1, $fuel_markup);
$area_fullprice = $grundpreis + $area_price1 + $area_price2 + $area_price3 + $area_price4 + $area_price5;
endif;
$popupWinCode1 =str_replace("\"", "\\\"", str_replace("\n", "\\n",
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n" .
"<html lang=\"de\">\n" .
"<head>\n" .
"<title>votian: Eingabe der Abrechnungs-PLZ<\/title>\n" .
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../css/phoenix.css.php\">\n" .
"<script type=\"text/javascript\">\n" .
"<!" . "--\n" .
"\n" .
"var caller = "));
$popupWinCode2 =str_replace("\"", "\\\"", str_replace("\n", "\\n",
";\n" .
"\n" .
"function doFocus(){\n" .
"while (typeof(document.forms[0].tr_mediationarea_id) == 'undefined');\n" .
// " document.forms[1].saveButton.focus();\n" .
" document.forms[0].tr_mediationarea_id.focus();\n" .
"}\n" .
"\n" .
"function doSave(){\n" .
" switch (caller)\n" .
" {\n" .
" case 1:\n" .
" opener.document.forms[0].zipcode1.value = document.forms[0].tr_mediationarea_id.value;\n" .
" break;\n" .
" case 2:\n" .
" opener.document.forms[0].zipcode2.value = document.forms[0].tr_mediationarea_id.value;\n" .
" break;\n" .
" case 3:\n" .
" opener.document.forms[0].zipcode3.value = document.forms[0].tr_mediationarea_id.value;\n" .
" break;\n" .
" case 4:\n" .
" opener.document.forms[0].zipcode4.value = document.forms[0].tr_mediationarea_id.value;\n" .
" break;\n" .
" case 5:\n" .
" opener.document.forms[0].zipcode5.value = document.forms[0].tr_mediationarea_id.value;\n" .
" break;\n" .
" case 6:\n" .
" opener.document.forms[0].zipcode6.value = document.forms[0].tr_mediationarea_id.value;\n" .
" break;\n" .
" default:\n" .
" break;\n" .
" } \n" .
" opener.updatePrice(0);\n" .
" self.close();\n" .
"}\n" .
"\n" .
"//--" . ">\n" .
"<\/script>\n" .
"<\/head>\n" .
"<body onload=\"doFocus()\">\n" .
" <table border=0 align=center height=100% cellspacing=0 cellpadding=0 vspace=0 hspace=0>\n" .
" <tr>\n" .
" <td align=center valign=top>\n" .
"<form action=\"../jobs/price_query.php\" method=\"get\">\n" .
"<select name=\"tr_mediationarea_id\" class=\"input\">\n"));
$popupWinCode3 = str_replace("\"", "\\\"", str_replace("\n", "\\n",
"\n</select>\n" .
"</form>\n" .
"<form action=\"../jobs/price_query.php\" method=\"get\">\n" .
"<input type=\"button\" class=\"button_enabled\" name=\"cancelButton\" value=\"Abbrechen\" onClick=\"self.close()\" accesskey=\"a\">&nbsp;\n" .
"<input type=\"button\" class=\"button_enabled\" name=\"saveButton\" value=\"Übernehmen\" onClick=\"doSave()\" accesskey=\"s\">&nbsp;\n" .
"</form>\n" .
" <\/td>\n" .
" <\/tr>\n" .
" <\/table>\n" .
"<\/body>\n" .
"<\/html>\n"));
echo
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n" .
"<html lang=\"de\">\n" .
"<head>\n" .
"<title>votian: Preisanfrage</title>\n" .
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../css/phoenix.css.php\">\n" .
"<script src=\"job_options_$hq_id.js\" type=\"text/javascript\"></script>" .
"<script type=\"text/javascript\">\n" .
"<!" . "--\n" .
"var curZipcode = \"\";\n" .
"var popupWinCode1 = \"" . $popupWinCode1 . "\";\n" .
"var popupWinCode2 = \"" . $popupWinCode2 . "\";\n" .
"var popupWinCode3 = \"" . $popupWinCode3 . "\";\n" .
"var popupWinCode = \"\";\n" .
"\n" .
"function searchAddress() {\n" .
"\n" .
"/* switch (curZipcode)\n" .
" {\n" .
" case 1:\n" .
" f_zipcode = document.forms[0].zipcode1.value;\n" .
" break;\n" .
" case 2:\n" .
" f_zipcode = document.forms[0].zipcode2.value;\n" .
" break;\n" .
" case 3:\n" .
" f_zipcode = document.forms[0].zipcode3.value;\n" .
" break;\n" .
" case 4:\n" .
" f_zipcode = document.forms[0].zipcode4.value;\n" .
" break;\n" .
" case 5:\n" .
" f_zipcode = document.forms[0].zipcode5.value;\n" .
" break;\n" .
" case 6:\n" .
" f_zipcode = document.forms[0].zipcode6.value;\n" .
" break;\n" .
" default:\n" .
" f_zipcode = \"\";\n" .
" break;\n" .
" } */ \n" .
" if (curZipcode == \"\") curZipcode = 'price_query1';\n" .
" var widthPopupWin = 800;\n" .
" var heightPopupWin = 600;\n" .
" var leftPopupWin = (screen.width / 2) - (widthPopupWin / 2) - 12;\n" .
" var topPopupWin = (screen.height / 2) - (heightPopupWin / 2) - 50;\n" .
" var popupWin;\n" .
" popupWin = window.open(\"../admin/ad_list.php?f_act=search&f_zipcode=\" /* + f_zipcode */ + \"&tourno=\" + curZipcode, \"\",\"dependent=yes,width=\" + widthPopupWin + \",height=\" + heightPopupWin +\",left=\" + leftPopupWin + \",top=\" + topPopupWin + \",scrollbars=yes,resizable=yes,status=no\");\n" .
"}\n" .
"\n" .
"function doFocus(){\n" .
" document.forms[0].zipcode1.focus();\n" .
" if (document.forms[0].zipcode6.value == \"\")\n" .
" document.forms[0].zipcode6.focus();\n" .
" if (document.forms[0].zipcode5.value == \"\")\n" .
" document.forms[0].zipcode5.focus();\n" .
" if (document.forms[0].zipcode4.value == \"\")\n" .
" document.forms[0].zipcode4.focus();\n" .
" if (document.forms[0].zipcode3.value == \"\")\n" .
" document.forms[0].zipcode3.focus();\n" .
" if (document.forms[0].zipcode2.value == \"\")\n" .
" document.forms[0].zipcode2.focus();\n" .
" if (document.forms[0].zipcode1.value == \"\")\n" .
" document.forms[0].zipcode1.focus();\n" .
"}\n" .
"\n" .
"function doDelete(){\n" .
" self.location.href=\"../jobs/price_query.php?zipcode1=&zipcode2=&vht_id=" . getFieldValueFromId("headquarters", "hq_id", "$hq_id", "hq_vht_default") . "\";\n" .
"}\n" .
"\n" .
"function updatePrice(caller){\n" .
" var doIt = true;\n" .
"\n" .
" if (caller > 0 && caller < 7) {\n" .
" if (check_tr_mediationarea_id(caller))\n" .
" doIt = false; \n" .
" }\n" .
" if (document.forms[0].zipcode1.value != '' && document.forms[0].zipcode2.value != '' && doIt)\n" .
" self.location.href=\"../jobs/price_query.php?zipcode1=\" + document.forms[0].zipcode1.value + \"&zipcode2=\" + document.forms[0].zipcode2.value + \"&zipcode3=\" + document.forms[0].zipcode3.value + \"&zipcode4=\" + document.forms[0].zipcode4.value + \"&zipcode5=\" + document.forms[0].zipcode5.value + \"&zipcode6=\" + document.forms[0].zipcode6.value + \"&vht_id=\" + document.forms[0].vht_id.value + \"&jb_markup=\" + document.forms[0].markup.value;\n" .
"}\n" .
"function check_tr_mediationarea_id(caller)\n" .
"{\n" .
" var zipcode = \"\";\n" .
"\n" .
" switch (caller) {\n" .
" case 1:\n" .
" zipcode = document.forms[0].zipcode1.value;\n" .
" break;\n" .
" case 2:\n" .
" zipcode = document.forms[0].zipcode2.value;\n" .
" break;\n" .
" case 3:\n" .
" zipcode = document.forms[0].zipcode3.value;\n" .
" break;\n" .
" case 4:\n" .
" zipcode = document.forms[0].zipcode4.value;\n" .
" break;\n" .
" case 5:\n" .
" zipcode = document.forms[0].zipcode5.value;\n" .
" break;\n" .
" case 6:\n" .
" zipcode = document.forms[0].zipcode6.value;\n" .
" break;\n" .
" default:\n" .
" return;\n" .
" }\n" .
" for (i = 0; i < fz.length; i++)\n" .
" {\n" .
" if (fz[i][0] == zipcode)\n" .
" {\n" .
" mk_tr_mediationarea_id(caller, zipcode);\n" .
" return true;\n" .
" }\n" .
" }\n" .
" return false;\n" .
"}\n" .
"\n" .
"function mk_tr_mediationarea_id(caller, zipcode) {\n" .
" var widthPopupWin = 400;\n" .
" var heightPopupWin = 75;\n" .
" var leftPopupWin = (screen.width / 2) - (widthPopupWin / 2) - 12;\n" .
" var topPopupWin = (screen.height / 2) - (heightPopupWin / 2) - 50;\n" .
" var popupWin;\n" .
"\n" .
" var tr_mediationarea_id_options = \"\"; /* \"<option value=\"\"> </option>\n\"; */\n" .
" for (i = 0; i < fz.length; i++)\n" .
" {\n" .
" if (fz[i][0] == zipcode)\n" .
" {\n" .
" tr_mediationarea_id_options += \"<option \";\n" .
// " if (zipcode == fz[i][1])\n" .
// " tr_mediationarea_id_options += \"selected \";\n" .
" tr_mediationarea_id_options += \" value=\\\"\" + fz[i][1] + \"\\\">\" + fz[i][1] + \" (\" + fz[i][3] + \")</option>\\n\";\n" .
" }\n" .
" }\n" .
" popupWin=window.open(\"about:blank\", \"\",\n" .
" \"dependent=yes,width=\" + widthPopupWin + \",height=\" + heightPopupWin +\n" .
" \",left=\" + leftPopupWin + \",top=\" + topPopupWin);\n" .
" popupWin.document.open();\n" .
" popupWinCode = popupWinCode1 + caller + popupWinCode2 + tr_mediationarea_id_options + popupWinCode3;\n" .
" popupWin.document.writeln(popupWinCode);\n" .
" popupWin.document.close();\n" .
"};\n" .
"\n" .
"//--" . ">\n" .
"</script>\n" .
"</head>\n" .
"<body onload=\"doFocus()\">\n" .
" <table border=0 align=center width=90% cellspacing=0 cellpadding=0 vspace=0 hspace=0>\n" .
" <tr>\n" .
"<form>\n" .
" <td width=70% align=right valign=center>\n" .
" VON PLZ&nbsp;<input name=\"zipcode1\" type=\"text\" value=\"" . $zipcode1 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" onchange=\"updatePrice(1)\" onFocus=\"curZipcode='price_query1'\">\n" .
" NACH PLZ&nbsp;<input name=\"zipcode2\" type=\"text\" value=\"" . $zipcode2 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" onchange=\"updatePrice(2)\" onFocus=\"curZipcode='price_query2'\">\n" .
" <br>$area_names1<br></td><td width=30% align=right valign=$valign>\n" .
($hq_id == 3 ? formatPrice($area_price1) . "<br>" : "") .
"<span style=\"color:red\">" . formatPrice($plzpreis1) . "</span><br>" .
" </td></tr><tr><td align=right valign=center>\n" .
" VON PLZ&nbsp;<input name=\"zipcode2_disabled\" type=\"text\" value=\"" . $zipcode2 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" disabled>\n" .
" NACH PLZ&nbsp;<input name=\"zipcode3\" type=\"text\" value=\"" . $zipcode3 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" onchange=\"updatePrice(3)\" onFocus=\"curZipcode='price_query3'\">\n" .
" <br>$area_names2<br></td><td align=right valign=$valign>\n" .
($hq_id == 3 ? formatPrice($area_price2) . "<br>" : "") .
"<span style=\"color:red\">" . formatPrice($plzpreis2) . "</span><br>" .
" </td></tr><tr><td align=right valign=center>\n" .
" VON PLZ&nbsp;<input name=\"zipcode3_disabled\" type=\"text\" value=\"" . $zipcode3 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" disabled>\n" .
" NACH PLZ&nbsp;<input name=\"zipcode4\" type=\"text\" value=\"" . $zipcode4 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" onchange=\"updatePrice(4)\" onFocus=\"curZipcode='price_query4'\">\n" .
" <br>$area_names3<br></td><td align=right valign=$valign>\n" .
($hq_id == 3 ? formatPrice($area_price3) . "<br>" : "") .
"<span style=\"color:red\">" . formatPrice($plzpreis3) . "</span><br>" .
" </td></tr><tr><td align=right valign=center>\n" .
" VON PLZ&nbsp;<input name=\"zipcode4_disabled\" type=\"text\" value=\"" . $zipcode4 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" disabled>\n" .
" NACH PLZ&nbsp;<input name=\"zipcode5\" type=\"text\" value=\"" . $zipcode5 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" onchange=\"updatePrice(5)\" onFocus=\"curZipcode='price_query5'\">\n" .
" <br>$area_names4<br></td><td align=right valign=$valign>\n" .
($hq_id == 3 ? formatPrice($area_price4) . "<br>" : "") .
"<span style=\"color:red\">" . formatPrice($plzpreis4) . "</span><br>" .
" </td></tr><tr><td align=right valign=center>\n" .
" VON PLZ&nbsp;<input name=\"zipcode5_disabled\" type=\"text\" value=\"" . $zipcode5 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" disabled>\n" .
" NACH PLZ&nbsp;<input name=\"zipcode6\" type=\"text\" value=\"" . $zipcode6 . "\" size=\"5\" maxlength=\"5\" class=\"input\"\n" .
" onchange=\"updatePrice(6)\" onFocus=\"curZipcode='price_query6'\">\n" .
" <br>$area_names5<br></td><td align=right valign=$valign>\n" .
($hq_id == 3 ? formatPrice($area_price5) . "<br>" : "") .
"<span style=\"color:red\">" . formatPrice($plzpreis5) . "</span><br>" .
" </td></tr><tr><td align=right valign=center>\n" .
" MIT FAHRZEUG&nbsp;" .
" <select name=\"vht_id\" class=\"input\" onchange=\"updatePrice(7)\">\n" .
addOptionsFromTable("metatype", "mt_sort", "mt_value", "mt_sort", "mt_type = 'vehicletype' AND mt_sort > 0", $vht_id) .
" </select>\n" .
" <br><br></td><td align=right valign=$valign>\n" .
($hq_id == 3 ? formatPrice($grundpreis) . "<br>" : "") .
"<span style=\"color:red\">" . formatPrice($grundpreis) . "</span><br>" .
" </td></tr><tr><td align=right valign=center>\n" .
" Treibstoffzuschlag:&nbsp;" .
"<input name=\"markup\" type=\"text\" value=\"" . str_replace(".", ",", sprintf("%01.2f", $fuel_markup)) . "\" size=\"3\" maxlength=\"5\" class=\"input\"\n" .
" onchange=\"updatePrice(0)\">%\n" .
" <br><br></td><td align=right valign=$valign>\n" .
"<br>" .
" </td></tr><tr><td align=right valign=center>\n" .
"<b>Gesamtpreis: </b>" .
" <br>" .
($fuel_markup <> 0 ? "<i>(incl.&nbsp;" . str_replace(".", ",", sprintf("%01.2f", $fuel_markup)) . "&nbsp;%&nbsp;Treibstoffzuschlag)</i>" : "") .
"<br></td><td align=right valign=center>\n" .
($hq_id == 3 ? "<b>" . formatPrice($area_fullprice) . "</b><br>" : "") .
"<span style=\"color:red\"><b>" . formatPrice($fullprice) . "</b></span><br>" .
" </td></tr><tr><td colspan=2 align=center valign=top>\n" .
"<br>" .
"<input type=\"button\" class=\"button_enabled\" value=\"Schließen\" onClick=\"self.close()\" accesskey=\"s\">&nbsp;\n" .
"<input type=\"button\" class=\"button_enabled\" value=\"Rücksetzen\" onClick=\"doDelete()\" accesskey=\"r\">&nbsp;\n" .
"<input type=\"button\" class=\"button_enabled\" name=\"AdressButton\" value=\"Suche PLZ\" title=\"Suche PLZ\" onclick=\"searchAddress();\">" .
" </td>\n" .
" </tr>\n" .
" </table>\n" .
"</form>\n" .
"</body>\n" .
"</html>\n";
function getPrice($zipcode1, $zipcode2, $cs_invmode = -1, $fuel_markup)
{
global $db, $hq_id, $vht_id, $jb_ordertime;
if (strlen($zipcode1) == 5 && strlen($zipcode2) == 5 && is_numeric($zipcode1) && is_numeric($zipcode2)):
if ($cs_invmode > -1):
$cs_id = $cs_invmode * -1;
else:
$cs_id = 0;
endif;
// $cs_id decides about invmode
// if 0, then default invmode from hq_id is taken
// for Berlin, $cs_id directly takes invmode in negative form (in order to distinguish from ordinary cs_id, that always are postive)
// Grundpreis
// Servicetype-Name (Fahrrad etc.)
$srvt_name = $db->getOne(
"SELECT mt_value FROM metatype WHERE mt_sort = '$vht_id' AND mt_type = 'vehicletype'");
list ($grundpreis, $fd, $fpm, $customer_specific) =
saveServiceCosts("Grundpreis", $srvt_name, $hq_id, $cs_id, 0 /* $jb_id */, 0, $jb_ordertime, 0 /* count */, 1 /* $costsplit_count */, 1 /* $getPriceOnly */, false /* $jb_cash */, "0" /* $csc_id_payer */, 0 /* $jb_storno */, false /* zipcode1 */, false /* zipcode2 */, false, $fuel_markup, $fuel_markup, $vht_id);
//$fullPrice += $fp * ((100-$fd)/100);
//$discount_sign = ($fd > 0 || $customer_specific || $discount_sign == "*" ? "*" : "");
// PLZ-Preis
list ($plzpreis, $fd, $fpm, $customer_specific) =
saveServiceCosts($zipcode1, $zipcode2, $hq_id, $cs_id, 0 /* $jb_id */, 0, $jb_ordertime, 0 /* count */, 1 /* $costsplit_count */, 1 /* $getPriceOnly */, false /* $jb_cash */, "0" /* $csc_id_payer */, 0 /* $jb_storno */, false /* zipcode1 */, false /* zipcode2 */, true, $fuel_markup, $fuel_markup, $vht_id);
//$fullPrice += $fp * ((100-$fd)/100);
//$discount_sign = ($fd > 0 || $customer_specific || $discount_sign == "*" ? "*" : "");
else:
$zipcode1 = "";
$zipcode2 = "";
$grundpreis = 0;
$plzpreis = 0;
endif;
return array($grundpreis, $plzpreis);
}
function formatPrice($thePrice)
{
if (strlen($thePrice) > 0):
return str_replace(".", ",", sprintf("%01.2f", $thePrice)) . " EUR";
else:
return "";
endif;
}
?>