diff options
-rw-r--r-- | FS/FS/Schema.pm | 2 | ||||
-rw-r--r-- | FS/FS/part_pkg.pm | 8 | ||||
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 15 |
3 files changed, 22 insertions, 3 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 1f8fa8fa1..d264fd01f 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1194,6 +1194,8 @@ sub tables_hashref { 'taxclass', 'varchar', 'NULL', $char_d, '', '', 'classnum', 'int', 'NULL', '', '', '', 'taxproductnum', 'int', 'NULL', '', '', '', + 'setup_cost', @money_typen, '', '', + 'recur_cost', @money_typen, '', '', 'pay_weight', 'real', 'NULL', '', '', '', 'credit_weight', 'real', 'NULL', '', '', '', 'agentnum', 'int', 'NULL', '', '', '', diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index 8cfd6143c..fe56c62e1 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -85,6 +85,10 @@ inherits from FS::Record. The following fields are currently supported: =item disabled - Disabled flag, empty or `Y' +=item setup_cost - for cost tracking + +=item recur_cost - for cost tracking + =item pay_weight - Weight (relative to credit_weight and other package definitions) that controls payment application to specific line items. =item credit_weight - Weight (relative to other package definitions) that controls credit application to specific line items. @@ -448,6 +452,10 @@ sub check { || $self->ut_enum('recurtax', [ '', 'Y' ] ) || $self->ut_textn('taxclass') || $self->ut_enum('disabled', [ '', 'Y' ] ) + #|| $self->ut_moneyn('setup_cost') + #|| $self->ut_moneyn('recur_cost') + || $self->ut_floatn('setup_cost') + || $self->ut_floatn('recur_cost') || $self->ut_floatn('pay_weight') || $self->ut_floatn('credit_weight') || $self->ut_numbern('taxproductnum') diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index a2ec63068..6391db92a 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -37,6 +37,8 @@ 'taxproduct_select'=> 'Tax products', 'plan' => 'Price plan', 'disabled' => 'Disable new orders', + 'setup_cost' => 'Setup cost', + 'recur_cost' => 'Recur cost', 'pay_weight' => 'Payment weight', 'credit_weight' => 'Credit weight', 'agentnum' => 'Agent', @@ -131,10 +133,10 @@ { field=>'promo_code', type=>'text', size=>15 }, { type => 'tablebreak-tr-title', - value => 'Line-item revenue recogition', #better name? + value => 'Cost tracking', #better name? }, - { field=>'pay_weight', type=>'text', size=>6 }, - { field=>'credit_weight', type=>'text', size=>6 }, + { field=>'setup_cost', type=>'money', }, + { field=>'recur_cost', type=>'money', }, { type => 'columnnext' }, @@ -148,6 +150,13 @@ }, }, + { type => 'tablebreak-tr-title', + value => 'Line-item revenue recogition', #better name? + }, + { field=>'pay_weight', type=>'text', size=>6 }, + { field=>'credit_weight', type=>'text', size=>6 }, + + { type => 'columnend' }, { 'type' => 'tablebreak-tr-title', |