From 6d34c5060a4e5e9338ebc0d04459861a5c45e812 Mon Sep 17 00:00:00 2001 From: Irina Todeva Date: Wed, 30 Sep 2015 14:35:07 -0600 Subject: Changes to add classified reasons for invoice void - Added reasonnum and a corresponding foreign key in cust_bill_void and cust_bill_pkg_void tables (Schema.pm) - Used the FS::reason_Mixin::reason as the override of the cust_bill_void->reason to handle legacy and classified reasons - Changes in voided_invoice.html template to handle classified reasons for void invoices --- FS/FS/cust_bill_void.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'FS/FS/cust_bill_void.pm') diff --git a/FS/FS/cust_bill_void.pm b/FS/FS/cust_bill_void.pm index f3dba90..04c69d4 100644 --- a/FS/FS/cust_bill_void.pm +++ b/FS/FS/cust_bill_void.pm @@ -1,5 +1,6 @@ package FS::cust_bill_void; -use base qw( FS::Template_Mixin FS::cust_main_Mixin FS::otaker_Mixin FS::Record ); +use base qw( FS::Template_Mixin FS::cust_main_Mixin FS::otaker_Mixin + FS::reason_Mixin FS::Record ); use strict; use FS::Record qw( qsearch qsearchs dbh fields ); @@ -82,9 +83,13 @@ promised_date void_date -=item reason +=item reason + +freeform string (deprecated) + +=item reasonnum -reason +reason for voiding the payment (see L) =item void_usernum @@ -216,6 +221,7 @@ sub check { || $self->ut_numbern('void_date') || $self->ut_textn('reason') || $self->ut_numbern('void_usernum') + || $self->ut_foreign_keyn('reasonnum', 'reason', 'reasonnum') ; return $error if $error; @@ -259,6 +265,10 @@ sub void_access_user { =item cust_bill_pkg +=item reason + +Returns the text of the associated void reason (see L) for this. + =cut sub cust_bill_pkg { #actually cust_bill_pkg_void objects -- cgit v1.1