Skip to content
Permalink
Browse files

fixes for Partner By City report.

don't search without a parameter for the city, to avoid mysql error.
find by wildcards.
related to #391
  • Loading branch information...
tpokorra committed Sep 26, 2019
1 parent d56de6c commit 3664a12fdaf658769b6874b21652dbf9d7915518
@@ -35,7 +35,7 @@
AND ({param_today} <= pl.p_date_good_until_d OR pl.p_date_good_until_d IS NULL)
#endif
#if {param_city}
AND LOWER(loc.p_city_c) = LOWER({param_city})
AND LOWER(loc.p_city_c) LIKE LOWER({param_city})
#endif
#if {param_country}
AND {LISTCMP param_country loc.p_country_code_c}
@@ -309,7 +309,7 @@ public string InsertParameters(string searchOpen, string searchClose, string tem
!(parameter.Length > 2 && parameter.Substring(parameter.Length - 2) == "_i") &&
(newvalue.TypeVariant == eVariantTypes.eString))
{
strValue = Quotes + newvalue.ToString() + Quotes;
strValue = Quotes + newvalue.ToString().Replace('*', '%') + Quotes;
}
else if (
(newvalue.TypeVariant == eVariantTypes.eCurrency) ||
@@ -47,6 +47,11 @@ public class PartnerByCity
TParameterList parameterlist,
TDBTransaction ATransaction)
{
if (parameterlist.Get("param_city").ToString() == "")
{
throw new Exception("invalid parameters");
}

HTMLTemplateProcessor templateProcessor = new HTMLTemplateProcessor(AHTMLReportDefinition, parameterlist);

// get all the partners

0 comments on commit 3664a12

Please sign in to comment.
You can’t perform that action at this time.