[freeside-commits] branch FREESIDE_4_BRANCH updated. 9cc374c60cd0b4d04e18b7e5a395006dbe3fc7ed
Ivan
ivan at 420.am
Thu May 11 10:08:19 PDT 2017
The branch, FREESIDE_4_BRANCH has been updated
via 9cc374c60cd0b4d04e18b7e5a395006dbe3fc7ed (commit)
from b2e645b79aab7fca4ce4d2305ce4c95f093008d5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9cc374c60cd0b4d04e18b7e5a395006dbe3fc7ed
Author: Ivan Kohler <ivan at freeside.biz>
Date: Thu May 11 10:08:18 2017 -0700
add residential/commercial conditions, RT#75886
diff --git a/FS/FS/part_event/Condition/has_company.pm b/FS/FS/part_event/Condition/has_company.pm
new file mode 100644
index 0000000..6fdeb34
--- /dev/null
+++ b/FS/FS/part_event/Condition/has_company.pm
@@ -0,0 +1,16 @@
+package FS::part_event::Condition::has_company;
+use base qw( FS::part_event::Condition );
+
+use strict;
+
+sub description { 'Customer is commercial'; }
+
+sub condition {
+ my( $self, $object) = @_;
+
+ my $cust_main = $self->cust_main($object);
+
+ $cust_main->company =~ /\S/;
+}
+
+1;
diff --git a/FS/FS/part_event/Condition/hasnt_company.pm b/FS/FS/part_event/Condition/hasnt_company.pm
new file mode 100644
index 0000000..f9fbc03
--- /dev/null
+++ b/FS/FS/part_event/Condition/hasnt_company.pm
@@ -0,0 +1,17 @@
+package FS::part_event::Condition::hasnt_company;
+use base qw( FS::part_event::Condition );
+
+use strict;
+
+sub description { 'Customer is residential'; }
+
+sub condition {
+ my( $self, $object) = @_;
+
+ my $cust_main = $self->cust_main($object);
+
+ $cust_main->company !~ /\S/;
+
+}
+
+1;
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_event/Condition/has_company.pm | 16 ++++++++++++++++
FS/FS/part_event/Condition/hasnt_company.pm | 17 +++++++++++++++++
2 files changed, 33 insertions(+)
create mode 100644 FS/FS/part_event/Condition/has_company.pm
create mode 100644 FS/FS/part_event/Condition/hasnt_company.pm
More information about the freeside-commits
mailing list