Permalink
Browse files

Merge pull request #134 from garyhgohoos/20104-3

Issue #20104:use cust_financecharge for exemptions
  • Loading branch information...
2 parents 1365d49 + 0fd110c commit bc027e60b41f76d59f05ad994b05cdb550c4c116 Greg Pazo committed Feb 28, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 dbscripts/metasql/assessFinanceCharges-detail.mql
@@ -33,6 +33,7 @@ FROM fincharg,
WHERE ((aropen_doctype='I')
AND (aropen_open)
AND (COALESCE(terms_fincharg, FALSE))
+ AND (COALESCE(cust_financecharge, TRUE))
<? if exists("cust_id") ?>
AND (aropen_cust_id=<? value("cust_id") ?>)
<? endif ?>
@@ -46,5 +47,5 @@ FROM fincharg,
AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)
<? endif ?>
)) AS data
-WHERE ((COALESCE(aropen_fincharg_date, aropen_duedate) + fincharg_graceperiod) < <? value("assessmentDate") ?>)
+WHERE ((COALESCE(aropen_fincharg_date, aropen_duedate) + COALESCE(cust_gracedays, fincharg_graceperiod)) < <? value("assessmentDate") ?>)
ORDER BY cust_number, aropen_docnumber;

0 comments on commit bc027e6

Please sign in to comment.