mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-25 06:00:28 +01:00
Filter supported subscription cycle types to prevent errors
This commit is contained in:
parent
c834816e19
commit
05906533dd
@ -61,6 +61,7 @@ class SubscriptionModule implements SubscriptionModuleInterface
|
|||||||
WHERE aa.dokument = :doctype
|
WHERE aa.dokument = :doctype
|
||||||
AND greatest(aa.startdatum, aa.abgerechnetbis) <= :calcdate
|
AND greatest(aa.startdatum, aa.abgerechnetbis) <= :calcdate
|
||||||
AND (aa.enddatum = '0000-00-00' OR aa.abgerechnetbis < aa.enddatum)
|
AND (aa.enddatum = '0000-00-00' OR aa.abgerechnetbis < aa.enddatum)
|
||||||
|
AND aa.preisart IN ('monat', 'jahr', '30tage')
|
||||||
AND aa.adresse = :address";
|
AND aa.adresse = :address";
|
||||||
|
|
||||||
return $this->db->fetchAll($sql, [
|
return $this->db->fetchAll($sql, [
|
||||||
|
@ -70,7 +70,7 @@ class Rechnungslauf {
|
|||||||
$calcdate = new \DateTimeImmutable('today');
|
$calcdate = new \DateTimeImmutable('today');
|
||||||
$scalcdate = $calcdate->format('Y-m-d');
|
$scalcdate = $calcdate->format('Y-m-d');
|
||||||
$where = " aa.id > 0
|
$where = " aa.id > 0
|
||||||
AND aa.dokument = '$doctype'
|
AND aa.dokument = '$doctype' AND aa.preisart IN ('monat', 'jahr', '30tage')
|
||||||
AND greatest(aa.startdatum, aa.abgerechnetbis) < '$scalcdate'
|
AND greatest(aa.startdatum, aa.abgerechnetbis) < '$scalcdate'
|
||||||
AND (aa.enddatum = '0000-00-00' OR aa.abgerechnetbis < aa.enddatum)";
|
AND (aa.enddatum = '0000-00-00' OR aa.abgerechnetbis < aa.enddatum)";
|
||||||
|
|
||||||
@ -167,7 +167,8 @@ class Rechnungslauf {
|
|||||||
. "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/forward.svg\" border=\"0\"></a>"
|
. "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/forward.svg\" border=\"0\"></a>"
|
||||||
. " </td></tr></table>";
|
. " </td></tr></table>";
|
||||||
|
|
||||||
$where = " aa.id > 0 AND (aa.enddatum = '0000-00-00' OR aa.abgerechnetbis < aa.enddatum) ";
|
$where = " aa.id > 0 AND aa.preisart IN ('monat', 'jahr', '30tage')
|
||||||
|
AND (aa.enddatum = '0000-00-00' OR aa.abgerechnetbis < aa.enddatum) ";
|
||||||
|
|
||||||
$sql = "SELECT SQL_CALC_FOUND_ROWS aa.id, ad.name, ad.kundennummer,
|
$sql = "SELECT SQL_CALC_FOUND_ROWS aa.id, ad.name, ad.kundennummer,
|
||||||
aa.bezeichnung, a.nummer, DATE_FORMAT(aa.abgerechnetbis, '%d.%m.%Y'),
|
aa.bezeichnung, a.nummer, DATE_FORMAT(aa.abgerechnetbis, '%d.%m.%Y'),
|
||||||
|
Loading…
Reference in New Issue
Block a user