Adds support for searching on 'date is NULL' in the ACQ unified search
interface. To use, chose the 'is' or 'is not' matcher and leave the
text input value empty.
Update the canned completed invoices search to filter on 'close_date IS
NOT NULL' instead of the now-removed 'complete' field.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
$op = ">=" if $gte;
$op = "<=" if $lte;
+ # avoid transforming a date if the match value is NULL.
+ return {'=' => undef} if $op eq '=' and not $value;
+
+{$op => {"transform" => "date", "value" => $value}};
}
var value;
if (typeof(this.widgets[id].declaredClass) != "undefined") {
if (this.widgets[id].declaredClass.match(/Date/)) {
- value =
- dojo.date.stamp.toISOString(this.widgets[id].value).
- split("T")[0];
+ if (this.widgets[id].value) {
+ value =
+ dojo.date.stamp.toISOString(
+ this.widgets[id].value).split("T")[0];
+ } else {
+ value = null;
+ }
} else {
value = this.widgets[id].attr("value");
if (this.widgets[id].declaredClass.match(/Check/))
"inv": {
"search_object": {
"acqinv": [
- {"complete": "f"},
+ {"close_date": null},
{"receiver": openils.User.user.ws_ou()}
]
},