From b96629eb08231f78f334f78c0bd6c277c60844fa Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 8 Sep 2008 02:47:22 +0000 Subject: [PATCH] add package invoice details & comments, RT#3810 --- FS/FS.pm | 2 + FS/FS/AccessRight.pm | 2 + FS/FS/Schema.pm | 16 ++- FS/FS/cust_main.pm | 171 ++++++++++++++------------- FS/FS/cust_pkg.pm | 72 +++++++++++ FS/FS/cust_pkg_detail.pm | 140 ++++++++++++++++++++++ FS/MANIFEST | 2 + FS/t/cust_pkg_detail.t | 5 + httemplate/edit/cust_pkg_detail.html | 142 ++++++++++++++++++++++ httemplate/edit/process/cust_pkg_detail.html | 59 +++++++++ httemplate/pref/pref-process.html | 2 +- httemplate/pref/pref.html | 24 +++- httemplate/view/cust_main/packages.html | 140 ++++++++++++++++++++-- 13 files changed, 678 insertions(+), 99 deletions(-) create mode 100644 FS/FS/cust_pkg_detail.pm create mode 100644 FS/t/cust_pkg_detail.t create mode 100644 httemplate/edit/cust_pkg_detail.html create mode 100644 httemplate/edit/process/cust_pkg_detail.html diff --git a/FS/FS.pm b/FS/FS.pm index a2f72bc8c..b0ff81116 100644 --- a/FS/FS.pm +++ b/FS/FS.pm @@ -210,6 +210,8 @@ L - Customer package class L - Customer package option class +L - Customer package details class + L - Reason type class L - Reason class diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index db2a31f4d..9ef35249c 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -121,6 +121,8 @@ tie my %rights, 'Tie::IxHash', 'Cancel customer package later', 'Add on-the-fly cancel reason', #NEW 'Add on-the-fly suspend reason', #NEW + 'Edit customer package invoice details', #NEW + 'Edit customer package comments', #NEW ], ### diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 94a56248b..ed535f7de 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -500,9 +500,6 @@ sub tables_hashref { 'quantity', 'int', 'NULL', '', '', '', 'unitsetup', @money_typen, '', '', 'unitrecur', @money_typen, '', '', - 'duplicate', 'char', 'NULL', 1, '', '', - 'post_total', 'char', 'NULL', 1, '', '', - 'type', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'billpkgnum', 'unique' => [], @@ -945,6 +942,19 @@ sub tables_hashref { 'index' => [ [ 'pkgnum' ], [ 'optionname' ] ], }, + 'cust_pkg_detail' => { + 'columns' => [ + 'pkgdetailnum', 'serial', '', '', '', '', + 'pkgnum', 'int', '', '', '', '', + 'detail', 'varchar', '', $char_d, '', '', + 'detailtype', 'char', '', 1, '', '', # "I"nvoice or "C"omment + 'weight', 'int', '', '', '', '', + ], + 'primary_key' => 'pkgdetailnum', + 'unique' => [], + 'index' => [ [ 'pkgnum', 'detailtype' ] ], + }, + 'cust_pkg_reason' => { 'columns' => [ 'num', 'serial', '', '', '', '', diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index e9e21b80b..3f974b607 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -64,7 +64,7 @@ $realtime_bop_decline_quiet = 0; # 1 is mostly method/subroutine entry and options # 2 traces progress of some operations # 3 is even more information including possibly sensitive data -$DEBUG = 0; +$DEBUG = 2; $me = '[FS::cust_main]'; $import = 0; @@ -2047,7 +2047,6 @@ Used in conjunction with the I