summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Quotable_Mixin.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/FS/FS/Quotable_Mixin.pm b/FS/FS/Quotable_Mixin.pm
new file mode 100644
index 000000000..dfd3ddd83
--- /dev/null
+++ b/FS/FS/Quotable_Mixin.pm
@@ -0,0 +1,13 @@
+package FS::Quotable_Mixin;
+
+use strict;
+use FS::Record qw( qsearch ); #qsearchs );
+use FS::quotation;
+
+sub quotation {
+ my $self = shift;
+ my $pk = $self->primary_key;
+ qsearch('quotation', { $pk => $self->$pk() } );
+}
+
+1;